:root {
  font-family:
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #203b34;
  background: #f5f5ef;
  --bg: #f5f5ef;
  --card: #fff;
  --ink: #203b34;
  --muted: #64766e;
  --line: #dce3da;
  --accent: #264f44;
  --tint: #eaf1e4;
  --lime: #d6f69c;
  --danger: #a63d38;
  --shadow: 0 16px 45px #263f3410;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #16211f;
  --card: #202e2a;
  --ink: #eef3eb;
  --muted: #a9b9b0;
  --line: #3b4c43;
  --accent: #badaad;
  --tint: #2a3b30;
  --lime: #d6f69c;
  --danger: #ffa49e;
  --shadow: 0 16px 45px #0002;
  color-scheme: dark;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 16px;
  background: var(--card);
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  background: var(--tint);
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
button.primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
button.danger {
  color: var(--danger);
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  overflow-wrap: anywhere;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -1.7px;
  margin-bottom: 14px;
}
h2 {
  font-size: 22px;
  letter-spacing: -0.55px;
}
h3 {
  font-size: 17px;
}
p {
  line-height: 1.6;
}
small,
.muted {
  color: var(--muted);
}
small {
  line-height: 1.5;
}
strong {
  font-weight: 700;
}
.shell {
  max-width: 1240px;
  margin: auto;
  padding: 26px 40px 60px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.8px;
  white-space: nowrap;
}
.brand img {
  width: 40px;
  height: 40px;
}
.tag {
  font:
    600 10px ui-monospace,
    monospace;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px;
  color: var(--muted);
}
.topbar nav {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.topbar nav button {
  border-color: transparent;
  background: transparent;
  font-size: 14px;
}
.topbar nav button[aria-current="page"] {
  background: var(--tint);
  color: var(--accent);
}
.page {
  padding-top: 38px;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}
.eyebrow {
  font:
    600 11px ui-monospace,
    monospace;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.lead {
  max-width: 620px;
  color: var(--muted);
  margin-bottom: 0;
}
.hero {
  border-radius: 24px;
  background: var(--accent);
  color: var(--bg);
  padding: 32px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
}
.hero p {
  margin-bottom: 0;
  max-width: 500px;
  opacity: 0.82;
}
.hero h2 {
  font-size: 26px;
}
.hero .orb {
  font-size: 72px;
  line-height: 1;
  align-self: center;
  color: var(--lime);
  font-weight: 300;
  letter-spacing: -14px;
  padding-right: 12px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.card,
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 25px;
  box-shadow: var(--shadow);
}
.card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.card h2 {
  margin: 0;
  overflow-wrap: anywhere;
}
.card-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.avatar {
  height: 46px;
  width: 46px;
  border-radius: 14px;
  background: var(--tint);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex: none;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  background: var(--tint);
  color: var(--accent);
  border-radius: 20px;
  padding: 6px 10px;
  white-space: nowrap;
}
.badge.active:before {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}
.card .badge {
  margin-left: auto;
}
.meta {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.mono {
  font-family: ui-monospace, monospace;
  overflow-wrap: anywhere;
}
.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
}
.card .actions {
  margin-top: auto;
}
.card .actions button {
  font-size: 13px;
  padding: 9px 13px;
}
.strip {
  border-radius: 14px;
  background: var(--tint);
  padding: 14px 17px;
  font-size: 13px;
  line-height: 1.55;
  margin: 18px 0;
}
.strip.warning {
  border-left: 3px solid #b99048;
}
.empty {
  padding: 52px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 20px;
}
.empty p {
  color: var(--muted);
  max-width: 460px;
  margin: 12px auto 22px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 24px;
  align-items: start;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.section-title {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 23px;
}
.step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tint);
  font:
    600 12px ui-monospace,
    monospace;
  color: var(--accent);
}
.section-title h2 {
  margin: 0;
  font-size: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.field:last-child {
  margin-bottom: 0;
}
label {
  font-size: 13px;
  font-weight: 650;
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  padding: 12px;
  outline-offset: 3px;
}
textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}
input[type="range"] {
  padding: 0;
  accent-color: var(--accent);
}
input[type="password"] {
  font-family: ui-monospace, monospace;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
}
:focus-visible {
  outline: 3px solid #93b56f;
  outline-offset: 3px;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.choice {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 650;
}
.choice:has(input:checked) {
  background: var(--tint);
  border-color: var(--accent);
}
.choice input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0 8px 0 0;
  accent-color: var(--accent);
}
.choice small {
  display: block;
  margin-top: 8px;
  font-weight: 400;
}
.aside {
  position: sticky;
  top: 22px;
}
.aside p {
  font-size: 13px;
}
.aside h3 {
  margin-bottom: 10px;
}
.sticky-save {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
}
.sticky-save small {
  max-width: 340px;
}
summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  padding: 12px 0;
}
details[open] summary {
  margin-bottom: 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 15px;
}
.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}
.stat strong {
  font-size: 18px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.money {
  font-family: ui-monospace, monospace;
  font-size: 13px !important;
  line-height: 1.5;
}
.notice {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(560px, 90vw);
  background: var(--ink);
  color: var(--bg);
  padding: 15px 20px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 100;
  font-size: 14px;
}
.error {
  color: var(--danger);
  font-size: 14px;
  line-height: 1.5;
  margin: 12px 0;
}
.welcome {
  max-width: 920px;
  margin: 8vh auto;
  padding: 28px;
}
.welcome-art {
  min-height: 230px;
  border-radius: 24px;
  background: var(--tint);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 40px 0 30px;
  transform: rotate(-1deg);
}
.bubble-art {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px 22px 22px 4px;
  padding: 25px;
  font-size: 20px;
  box-shadow: var(--shadow);
}
.bubble-art:last-child {
  background: var(--accent);
  color: var(--bg);
  margin-top: 65px;
  border-radius: 22px 22px 4px 22px;
}
.welcome h1 {
  font-size: clamp(38px, 7vw, 66px);
  max-width: 740px;
}
.welcome .lead {
  font-size: 18px;
}
.back {
  font-size: 13px;
  margin-bottom: 20px;
  background: transparent;
  padding-left: 0;
  border: 0;
}
.chat {
  min-height: 310px;
  max-height: 55vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0 20px;
}
.message {
  max-width: 88%;
  border-radius: 17px 17px 17px 4px;
  background: var(--tint);
  padding: 12px 16px;
  align-self: flex-start;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message.human {
  background: var(--accent);
  color: var(--bg);
  align-self: flex-end;
  border-radius: 17px 17px 4px 17px;
}
.composer {
  display: flex;
  align-items: end;
  gap: 10px;
}
.composer .field {
  flex: 1;
  margin: 0;
}
.composer textarea {
  min-height: 52px;
  height: 52px;
}
.delivery {
  min-height: 26px;
  color: var(--muted);
  font-size: 12px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.probability {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 16px 0;
}
.probability meter {
  grid-column: 1/-1;
  width: 100%;
  height: 18px;
  accent-color: var(--accent);
}
dialog {
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  max-width: 440px;
  width: calc(100% - 36px);
}
dialog::backdrop {
  background: #142c2477;
  backdrop-filter: blur(3px);
}
.skip {
  position: fixed;
  top: -100px;
  left: 10px;
  background: var(--card);
  padding: 10px;
  z-index: 100;
}
.skip:focus {
  top: 10px;
}
[hidden] {
  display: none !important;
}
.footnote {
  font-size: 12px;
  color: var(--muted);
  margin-top: 25px;
}
.loading {
  padding: 70px 10px;
  text-align: center;
  color: var(--muted);
}
.loading:before {
  content: "";
  display: block;
  width: 26px;
  height: 26px;
  margin: 0 auto 16px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 760px) {
  .shell {
    padding: 18px 18px 100px;
  }
  .topbar {
    padding-bottom: 18px;
  }
  .tag {
    display: none;
  }
  .topbar nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: var(--card);
    border-top: 1px solid var(--line);
    z-index: 20;
    justify-content: space-around;
  }
  .topbar nav button {
    font-size: 12px;
    padding: 10px;
  }
  .page {
    padding-top: 27px;
  }
  .heading {
    align-items: start;
    gap: 14px;
    margin-bottom: 22px;
  }
  .heading h1 {
    font-size: 31px;
  }
  .heading .primary {
    padding: 11px;
    font-size: 13px;
    white-space: nowrap;
  }
  .lead {
    font-size: 14px;
  }
  .hero {
    padding: 24px;
    gap: 10px;
  }
  .hero h2 {
    font-size: 22px;
  }
  .hero .orb {
    font-size: 50px;
  }
  .hero p {
    font-size: 13px;
  }
  .grid,
  .layout {
    grid-template-columns: 1fr;
  }
  .card,
  .panel {
    padding: 20px;
  }
  .aside {
    position: static;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stats .stat:first-child {
    grid-column: 1/-1;
  }
  .two {
    grid-template-columns: 1fr;
  }
  .option-grid {
    gap: 8px;
  }
  .choice {
    padding: 13px;
    font-size: 13px;
  }
  .choice small {
    font-size: 11px;
  }
  .welcome {
    padding: 22px;
    margin: 3vh auto;
  }
  .welcome-art {
    gap: 10px;
    min-height: 195px;
  }
  .bubble-art {
    font-size: 15px;
    padding: 16px;
  }
  .notice {
    bottom: 88px;
  }
  .sticky-save {
    align-items: start;
    flex-direction: column;
  }
  .sticky-save button {
    width: 100%;
  }
  .chat {
    max-height: 45vh;
  }
  .composer {
    align-items: stretch;
    flex-direction: column;
  }
  .composer button {
    align-self: end;
  }
  .card-head {
    gap: 8px;
  }
  .card h2 {
    font-size: 19px;
  }
  .badge {
    font-size: 10px;
    padding: 6px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
