/* Fulo console design system.
   Editorial monochrome: a quiet canvas, hairline structure, display type for titles and figures, and one dark "feature"
   surface for the AI itself. The Fulo orange is the only accent; green / amber / red only ever mean state. */
:root {
  --bg: #fcfcfc; --surface: #ffffff; --surface-2: #f6f6f6; --surface-3: #eeeeee;
  --ink: #141414; --ink-2: #474747; --muted: #737373; --faint: #9d9d9d;
  --line: #ebebeb; --line-2: #dfdfdf; --line-3: #cccccc;
  --dark: #111111; --dark-2: #1c1c1c; --dark-line: #2a2a2a; --dark-muted: #9a9a9a;
  --brand: #e2552b; --brand-soft: #fdeee8;
  --ok: #1f7a3f; --ok-bg: #f0f8f3; --ok-line: #cfe6d7;
  --warn: #946200; --warn-bg: #fcf7ea; --warn-line: #eedfb6;
  --err: #b3261e; --err-bg: #fcf2f1; --err-line: #f1d0cd;
  --live: #1f9d55;
  --r-xs: 4px; --r-sm: 6px; --r: 8px; --r-lg: 12px; --r-xl: 16px;
  --shadow-pop: 0 1px 1px rgba(20, 20, 20, .04), 0 16px 40px -16px rgba(20, 20, 20, .2);
  --ring: 0 0 0 3px rgba(20, 20, 20, .10);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sidebar: 248px;
  --font: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --display: "Space Grotesk", "Geist", "Inter", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  font-family: var(--font); color: var(--ink); font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); min-height: 100vh; }
a { color: inherit; text-decoration: none; }
p a, .muted a, dd a { text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; transition: text-decoration-color .15s; }
p a:hover, .muted a:hover, dd a:hover { text-decoration-color: currentColor; }
h1, h2, h3, p, blockquote { margin: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--brand-soft); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: var(--r-xs); }
.i { flex: none; display: block; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0; }
.num, .num-cell, .kpi-value, .fig-value, dd { font-variant-numeric: tabular-nums; }

/* ---------- shell: sidebar + content ---------- */
.shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--sidebar); display: flex; flex-direction: column; gap: 28px;
  padding: 22px 16px 18px; background: var(--surface); border-right: 1px solid var(--line); }
.sidebar:not([hidden]) ~ .container { margin-left: var(--sidebar); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; }
.brand-text { display: grid; line-height: 1.15; }
.mark { width: 30px; height: 30px; border-radius: var(--r); background: var(--brand); color: #fff; display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: -.02em; flex: none; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -.035em; }
.brand-tag { color: var(--muted); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); padding: 14px 10px 6px; }
.nav-label:first-child { padding-top: 0; }
.nav a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--r-sm); white-space: nowrap;
  color: var(--ink-2); font-weight: 500; font-size: 13.5px; transition: color .15s, background .15s; }
.nav a .i { color: var(--muted); transition: color .15s; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.active { color: var(--ink); background: var(--surface-3); }
.nav a.active .i { color: var(--ink); }
.account { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 6px 0; border-top: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-text { display: grid; line-height: 1.2; min-width: 0; }
.who-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-role { font-size: 11.5px; color: var(--muted); }
.who-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; flex: none;
  font-size: 12px; font-weight: 600; color: #fff; }

.container { max-width: 1240px; padding: 52px 64px 120px; }
.enter { animation: enter .26s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ---------- masthead (every page header) ---------- */
.masthead { display: flex; align-items: flex-end; gap: 24px 32px; flex-wrap: wrap; padding-bottom: 32px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.masthead-text { flex: 1 1 420px; min-width: 0; }
.masthead h1 { font-family: var(--display); font-size: 54px; line-height: 1; font-weight: 500; letter-spacing: -.055em; overflow-wrap: anywhere; }
.title-note { font-size: .5em; color: var(--muted); letter-spacing: -.02em; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 500; color: var(--muted);
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--brand); }
.lede { color: var(--muted); font-size: 16px; line-height: 1.55; margin-top: 14px; max-width: 640px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 28px; flex-wrap: wrap; }
.crumbs a { transition: color .15s; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--line-3); }
.crumbs [aria-current] { color: var(--ink); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 56px 0 16px; }
.section-head h2 { font-family: var(--display); font-size: 24px; font-weight: 500; letter-spacing: -.035em; }

/* ---------- monograms ---------- */
.monogram { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: var(--r);
  background: var(--dark); color: #fff; font-family: var(--display); font-weight: 500; font-size: 20px; letter-spacing: -.02em; }
.monogram.sm { width: 26px; height: 26px; font-size: 13px; border-radius: var(--r-sm); }
.monogram.xl { width: 76px; height: 76px; font-size: 34px; border-radius: var(--r-lg); align-self: center; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px;
  border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 500;
  font-size: 13.5px; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .08s; }
.btn:hover { border-color: var(--line-3); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--ink-2); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #333; border-color: #333; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn.danger { color: var(--err); }
.btn.danger:hover { border-color: var(--err-line); background: var(--err-bg); }
.btn.ghost.danger:hover { border-color: transparent; }
.btn.danger-solid { background: var(--err); border-color: var(--err); color: #fff; }
.btn.danger-solid:hover { background: #9a1f18; border-color: #9a1f18; }
.btn.block { width: 100%; height: 46px; font-size: 14.5px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- status / pills / badges / chips ---------- */
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--faint); }
.status .dot { box-shadow: 0 0 0 3px rgba(157, 157, 157, .16); }
.status.ok .dot, .pill.ok .dot { background: var(--ok); }
.status.ok .dot { box-shadow: 0 0 0 3px rgba(31, 122, 63, .14); }
.status.warn .dot, .pill.warn .dot { background: #d18f0c; }
.status.warn .dot { box-shadow: 0 0 0 3px rgba(209, 143, 12, .16); }
.status.err .dot, .pill.err .dot { background: var(--err); }
.status.err .dot { box-shadow: 0 0 0 3px rgba(179, 38, 30, .14); }
.status.err { color: var(--err); }
.status.live .dot { background: var(--live); animation: breathe 1.6s ease-in-out infinite; }
.status.busy .dot { background: #d18f0c; animation: breathe 1s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 3px rgba(31, 157, 85, .2); } 50% { box-shadow: 0 0 0 7px rgba(31, 157, 85, .04); } }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.pill-row { list-style: none; margin: -12px 0 36px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-xs); font-size: 11.5px; font-weight: 500;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-2); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge.err { background: var(--err-bg); color: var(--err); border-color: var(--err-line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }

/* ---------- stat band ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.kpi { display: flex; flex-direction: column; gap: 10px; padding: 26px 28px 28px; border-left: 1px solid var(--line); }
.kpi:first-child { border-left: 0; padding-left: 0; }
.kpi-label { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.kpi-value { font-family: var(--display); font-size: 46px; font-weight: 500; letter-spacing: -.055em; line-height: .95; }
.kpi-value .of, .unit { font-family: var(--font); font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.kpi-sub { font-size: 12.5px; color: var(--muted); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 30px; }
.card + .card { margin-top: 20px; }
.card-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.card-head h2 { font-family: var(--display); font-size: 21px; font-weight: 500; letter-spacing: -.035em; line-height: 1.15; }
.card-kicker { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.card-note { margin-top: 18px; }
.empty-state { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 44px 16px; color: var(--muted);
  border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--surface-2); }
.empty-state .i { color: var(--faint); margin-bottom: 4px; }
.empty-state b { display: block; color: var(--ink); font-weight: 500; font-size: 15px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); font-size: 13.5px; margin-top: 12px; }
.alert.err { background: var(--err-bg); color: var(--err); border: 1px solid var(--err-line); }
.alert.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }
.alert .i { margin-top: 2px; }
.error-state { max-width: 560px; margin: 88px auto; text-align: center; display: grid; justify-items: center; gap: 10px; }
.error-state .eyebrow { margin: 10px 0 0; }
.error-state .error-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--err-bg); color: var(--err); border: 1px solid var(--err-line); }
.error-state h1 { font-family: var(--display); font-size: 38px; font-weight: 500; letter-spacing: -.05em; line-height: 1.05; }
.error-state p { color: var(--muted); }
.error-state .page-actions { margin-top: 12px; justify-content: center; }

/* ---------- restaurants directory ---------- */
.directory { border-top: 1px solid var(--line); }
.rrow { display: grid; grid-template-columns: minmax(260px, 1.4fr) minmax(220px, 1fr) minmax(170px, .8fr) auto; align-items: center; gap: 28px;
  padding: 24px 12px; margin: 0 -12px; border-bottom: 1px solid var(--line); border-radius: var(--r); transition: background .15s; }
.rrow:hover { background: var(--surface); }
.rrow.inactive { opacity: .6; }
.rrow-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.rrow-title { min-width: 0; }
.rrow-title h3 { font-family: var(--display); font-size: 22px; font-weight: 500; letter-spacing: -.04em; line-height: 1.15; }
.rrow-main:hover h3 { text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 4px; }
.rrow-title p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.rrow-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.rrow-stats dt { font-size: 11.5px; color: var(--muted); }
.rrow-stats dd { margin: 2px 0 0; font-family: var(--display); font-size: 26px; font-weight: 500; letter-spacing: -.045em; line-height: 1.1; }
.rrow-status { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rrow-actions { display: flex; gap: 8px; }
.add-row { display: flex; align-items: center; gap: 16px; margin-top: 20px; padding: 20px 22px; border: 1px dashed var(--line-3); border-radius: var(--r-lg);
  color: var(--muted); transition: border-color .15s, background .15s, color .15s; }
.add-row > span:nth-child(2) { display: grid; gap: 2px; flex: 1; }
.add-row b { color: var(--ink); font-weight: 500; font-size: 15px; }
.add-row .add-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--ink); }
.add-row:hover { border-color: var(--ink-2); background: var(--surface); color: var(--ink); }

/* ---------- restaurant control center ---------- */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.workspace > * { min-width: 0; }
.workspace-rail .card + .card, .workspace-main .card + .card { margin-top: 20px; }
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda-item { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto auto; align-items: center; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.agenda-item:first-child { border-top: 0; padding-top: 0; }
.agenda-time b { display: block; font-family: var(--display); font-size: 24px; font-weight: 500; letter-spacing: -.04em; line-height: 1.1; }
.agenda-time span, .agenda-guest span { font-size: 12.5px; color: var(--muted); }
.agenda-guest b { display: block; font-weight: 500; }
.agenda-ref { padding: 4px 8px; border-radius: var(--r-xs); background: var(--surface-2); border: 1px solid var(--line); }
td.tools { min-width: 200px; }
.tool-line { line-height: 1.5; }
.tool-dot { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--faint); vertical-align: 2px; }
.tool-dot.ok { background: var(--ok); }
.tool-dot.warn { background: #d18f0c; }
td.row-action { text-align: right; padding-right: 0; }
.cell-sub { display: block; color: var(--faint); margin-top: 3px; font-size: 11.5px; }
.btn.icon-only { width: 32px; padding: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the AI receptionist: the one dark surface on the page */
.card.feature { background: var(--dark); border-color: var(--dark); color: #f3f3f3; position: relative; overflow: hidden; }
.card.feature::before { content: ""; position: absolute; inset: -40% -30% auto auto; width: 320px; height: 320px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(226, 85, 43, .22), transparent); }
.card.feature > * { position: relative; }
.card.feature .card-kicker { color: var(--dark-muted); margin-bottom: 2px; }
.feature-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.feature-head > div { flex: 1; min-width: 0; }
.feature-head h2 { font-family: var(--display); font-size: 30px; font-weight: 500; letter-spacing: -.045em; line-height: 1.05; }
.feature-head .pill { background: rgba(255, 255, 255, .06); border-color: var(--dark-line); color: #e8e8e8; }
.persona { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--dark); flex: none;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .06); }
.card.feature .greeting { margin: 0 0 22px; padding: 0 0 0 16px; border-left: 2px solid var(--brand); font-family: var(--display);
  font-size: 18px; line-height: 1.4; letter-spacing: -.02em; color: #fff; overflow-wrap: anywhere; }
.card.feature .props dt { color: var(--dark-muted); }
.card.feature .props dd { color: #eaeaea; }
.card.feature .props dd .muted { color: #6f6f6f; }
.card.feature .chip { background: rgba(255, 255, 255, .06); border-color: var(--dark-line); color: #e6e6e6; }
.card.feature .props > div { padding: 10px 0; border-top: 1px solid var(--dark-line); }
.feature-note { font-size: 12.5px; color: var(--dark-muted); margin-top: 16px; line-height: 1.55; }
.btn.feature-cta { margin-top: 20px; width: 100%; height: 42px; background: #fff; color: var(--dark); border-color: #fff; }
.btn.feature-cta:hover { background: #ededed; border-color: #ededed; }
.props { display: grid; gap: 12px; margin: 0; }
.card.feature .props { gap: 0; }
.props > div { display: grid; grid-template-columns: 104px 1fr; gap: 12px; font-size: 13.5px; }
.props dt { color: var(--muted); }
.props dd { margin: 0; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.props.hours { gap: 0; }
.props.hours > div { grid-template-columns: 120px 1fr; padding: 10px 12px; margin: 0 -12px; border-radius: var(--r-sm); }
.props.hours dd { display: flex; flex-wrap: wrap; gap: 4px 12px; font-variant-numeric: tabular-nums; }
.props.hours > div.today { background: var(--ink); }
.props.hours > div.today dt, .props.hours > div.today dd { color: #fff; font-weight: 500; }
.today-tag { margin-left: 8px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); font-weight: 600; }
.spec { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--line); }
.spec > div { padding: 18px 0 16px; border-bottom: 1px solid var(--line); }
.spec > div:nth-child(odd) { padding-right: 16px; border-right: 1px solid var(--line); }
.spec > div:nth-child(even) { padding-left: 18px; }
.spec > div:nth-last-child(-n+2) { border-bottom: 0; padding-bottom: 0; }
.spec dt { font-size: 12px; color: var(--muted); }
.spec dd { margin: 6px 0 2px; font-family: var(--display); font-size: 28px; font-weight: 500; letter-spacing: -.045em; line-height: 1; }
.spec dd small { font-family: var(--font); font-size: 12px; letter-spacing: 0; color: var(--muted); margin-left: 4px; font-weight: 400; }
.spec span { font-size: 12px; color: var(--muted); }
.conn { padding: 18px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; justify-items: start; }
.conn:first-of-type { border-top: 0; padding-top: 0; }
.conn:last-child { padding-bottom: 0; }
.conn-head { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.conn-icon { width: 30px; height: 30px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); }
.conn p { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.conn .status { white-space: normal; }

/* ---------- tables ---------- */
.table-wrap { position: relative; overflow-x: auto; margin: 0 -30px; padding: 0 30px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-weight: 500; font-size: 11px; color: var(--faint); letter-spacing: .07em; text-transform: uppercase;
  padding: 0 16px 12px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr { transition: background .12s; }
tr:last-child td { border-bottom: 0; }
td.tools div + div { margin-top: 5px; }
th.num, td.num { text-align: right; padding-right: 0; white-space: nowrap; }
th.num + th, td.num + td { padding-left: 16px; }
.table-wrap td:first-child { white-space: nowrap; }   /* times, dates and labels never break mid-value */
td.strong { font-weight: 600; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }
tr.clickable td:first-child a { font-weight: 500; }

/* ---------- forms ---------- */
.settings { display: grid; gap: 0; }
.setting { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; padding: 36px 0; border-top: 1px solid var(--line); }
.setting:first-child { border-top: 0; padding-top: 0; }
.setting-n { display: block; font-family: var(--mono); font-size: 12px; color: var(--brand); margin-bottom: 10px; }
.setting-intro h2 { font-family: var(--display); font-size: 22px; font-weight: 500; letter-spacing: -.035em; }
.setting-intro p { color: var(--muted); font-size: 13.5px; margin-top: 8px; line-height: 1.6; }
.setting-body { display: grid; gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.fields { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.field { display: grid; gap: 7px; align-content: start; }
.field-label { font-size: 13px; font-weight: 500; color: var(--ink); }
.field-help { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
input, select, textarea { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); font: inherit;
  font-size: 14px; color: var(--ink); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
input:hover, textarea:hover { border-color: var(--line-3); }
input:focus, textarea:focus { outline: none; border-color: var(--ink-2); box-shadow: var(--ring); }
input:user-invalid, textarea:user-invalid { border-color: var(--err); box-shadow: 0 0 0 3px rgba(179, 38, 30, .08); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); font-size: 13px; color: var(--ink-2); transition: all .15s; user-select: none; }
.choice span::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line-3); background: #fff; transition: all .15s; }
.choice:hover span { border-color: var(--line-3); }
.choice input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.choice input:checked + span::before { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 9px no-repeat; border-color: #fff; }
.choice input:focus-visible + span { box-shadow: var(--ring); }
.shift { display: grid; grid-template-columns: 90px 1fr 18px 1fr; gap: 10px; align-items: center; }
.shift > span:first-child { font-size: 13px; font-weight: 500; color: var(--ink); }
.shift > .to { color: var(--faint); text-align: center; }
.form-bar { position: sticky; bottom: 16px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 24px;
  padding: 12px 12px 12px 16px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }
.form-bar #err { margin-right: auto; }
.form-bar .alert { margin: 0; }

/* ---------- login: split screen ---------- */
body.signed-out .container { max-width: none; padding: 0; margin: 0; }
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr); }
.auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 44px 56px;
  background: var(--dark); color: #fff; }
.auth-brand::before { content: ""; position: absolute; inset: auto -20% -35% auto; width: 720px; height: 720px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(226, 85, 43, .28), transparent); }
.auth-brand::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--dark-line) 1px, transparent 1px), linear-gradient(90deg, var(--dark-line) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: radial-gradient(closest-side at 30% 40%, #000, transparent); -webkit-mask-image: radial-gradient(closest-side at 30% 40%, #000, transparent); }
.auth-brand > * { position: relative; z-index: 1; }
.brand-lockup { display: flex; align-items: center; gap: 11px; }
.brand-lockup .brand-name { font-size: 20px; }
.auth-hero .eyebrow { color: var(--dark-muted); }
.auth-headline { font-family: var(--display); font-size: 56px; line-height: 1.02; letter-spacing: -.055em; font-weight: 500; max-width: 470px; }
.auth-orb { position: absolute; right: 64px; top: 50%; width: 132px; height: 132px; transform: translateY(-50%); display: grid; place-items: center;
  border-radius: 50%; background: #fff; color: var(--dark); }
.auth-orb span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16); animation: ripple 3.6s var(--ease) infinite; }
.auth-orb span:nth-child(2) { animation-delay: 1.2s; }
.auth-orb span:nth-child(3) { animation-delay: 2.4s; }
@keyframes ripple { from { transform: scale(1); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.auth-foot { color: var(--dark-muted); font-size: 12.5px; }
.auth-panel { display: grid; place-items: center; padding: 48px 32px; background: var(--bg); }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .brand-lockup.compact { display: none; margin-bottom: 28px; }
.auth-card h1 { font-family: var(--display); font-size: 40px; font-weight: 500; letter-spacing: -.05em; line-height: 1.05; }
.auth-card .lede { font-size: 15px; margin: 10px 0 32px; }
.stack { display: grid; gap: 20px; }

/* ---------- try AI: dark stage + conversation ---------- */
body.page-try .container { max-width: 1400px; }
.try-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 24px; align-items: start; }
.try-layout > * { min-width: 0; }
.stage { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 32px; min-height: 720px; padding: 26px 32px 28px;
  background: var(--dark); color: #fff; border-radius: var(--r-xl); }
.stage::before { content: ""; position: absolute; left: 50%; top: 42%; width: 760px; height: 760px; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(226, 85, 43, .2), transparent 70%); transition: opacity .4s; }
.stage[data-state="live"]::before { background: radial-gradient(closest-side, rgba(31, 157, 85, .22), transparent 70%); }
.stage > * { position: relative; }
.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stage-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.stage-brand .monogram { background: #fff; color: var(--dark); }
.stage-tag { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--dark-line); color: #d8d8d8; background: rgba(255, 255, 255, .04); }
.stage-center { flex: 1; display: grid; justify-items: center; align-content: center; text-align: center; }
.stage .eyebrow { color: var(--dark-muted); }
.stage h1 { font-family: var(--display); font-size: 60px; font-weight: 500; letter-spacing: -.06em; line-height: 1; }
.stage .lede { color: #a8a8a8; max-width: 460px; margin: 16px auto 0; }
.voice { display: grid; justify-items: center; gap: 18px; margin-top: 52px; }
.orb { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.orb-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); }
.orb-ring.r2 { inset: -22px; border-color: rgba(255, 255, 255, .08); }
.orb-ring.r3 { inset: -46px; border-color: rgba(255, 255, 255, .04); }
.stage[data-state="connecting"] .orb-ring { border-color: rgba(226, 191, 114, .45); animation: ripple 1.6s var(--ease) infinite; }
.stage[data-state="live"] .orb-ring { border-color: rgba(31, 157, 85, .5); animation: ripple 2.2s var(--ease) infinite; }
.stage[data-state="live"] .orb-ring.r2, .stage[data-state="connecting"] .orb-ring.r2 { animation-delay: .7s; }
.stage[data-state="live"] .orb-ring.r3, .stage[data-state="connecting"] .orb-ring.r3 { animation-delay: 1.4s; }
.voice-btn { position: relative; z-index: 1; width: 112px; height: 112px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: #fff; color: var(--dark); box-shadow: 0 0 0 8px rgba(255, 255, 255, .06), 0 24px 60px -18px rgba(0, 0, 0, .8);
  transition: transform .2s var(--ease), background .2s, box-shadow .2s, color .2s; }
.voice-btn:hover { transform: scale(1.04); }
.voice-btn:active { transform: scale(.97); }
.voice-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--dark), 0 0 0 6px #fff; }
.voice-btn.live { background: var(--err); color: #fff; box-shadow: 0 0 0 8px rgba(179, 38, 30, .18), 0 24px 60px -18px rgba(179, 38, 30, .7); }
.voice-btn.connecting { background: #f4e3bd; }
.voice-btn[disabled] { background: #2a2a2a; color: #666; box-shadow: none; cursor: not-allowed; transform: none; }
.voice-state .status { font-size: 16px; font-weight: 500; color: #fff; gap: 10px; white-space: normal; justify-content: center; }
.voice-state .status.err { color: #f7a9a2; }
.voice-timer { color: var(--dark-muted); font-size: 13.5px; min-height: 20px; font-variant-numeric: tabular-nums; }
.prompts { border-top: 1px solid var(--dark-line); padding-top: 22px; }
.prompts-label { font-size: 11px; color: var(--dark-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 500; }
.prompt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.prompt { display: flex; flex-direction: column; gap: 10px; justify-content: space-between; padding: 14px 16px; border-radius: var(--r);
  border: 1px solid var(--dark-line); background: rgba(255, 255, 255, .03); font-size: 13.5px; line-height: 1.45; color: #e2e2e2; }
.prompt small { color: var(--dark-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.prompt-note { display: flex; gap: 8px; align-items: center; margin-top: 14px; font-size: 12.5px; color: var(--dark-muted); }
.stage-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; font-size: 12.5px; color: var(--dark-muted); }
.stage-foot .status { font-size: 12.5px; color: var(--dark-muted); white-space: normal; }
.conversation .card + .card, .conversation #result + .card { margin-top: 20px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 14px; padding: 0 0 22px; animation: enter .24s var(--ease); }
.timeline li::before { content: ""; position: absolute; left: 11.5px; top: 26px; bottom: 2px; width: 1px; background: var(--line-2); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.ev-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted); }
.ev.ok .ev-dot { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.ev.warn .ev-dot { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.ev.pending .ev-dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live); animation: breathe 1.6s infinite; }
.ev-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 500; }
.ev-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.timeline li.placeholder { display: grid; grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 10px; color: var(--muted); padding: 36px 16px;
  border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--surface-2); }
.placeholder-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.timeline li.placeholder::before { display: none; }
.summary-figure { margin: 0 0 14px; }
.summary-figure b { display: block; font-family: var(--display); font-size: 44px; font-weight: 500; letter-spacing: -.055em; line-height: 1; }
.summary-figure span { font-size: 12.5px; color: var(--muted); }

/* reservation confirmation */
.confirm { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-pop); overflow: hidden; margin-bottom: 20px; animation: enter .3s var(--ease); }
.confirm-head { display: flex; gap: 14px; align-items: flex-start; padding: 24px 26px; border-bottom: 1px solid var(--line); }
.confirm.ok .confirm-head { background: linear-gradient(var(--ok-bg), var(--surface)); }
.confirm.warn .confirm-head { background: linear-gradient(var(--warn-bg), var(--surface)); }
.confirm-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ok); color: #fff; box-shadow: 0 0 0 6px rgba(31, 122, 63, .12); }
.confirm.warn .confirm-icon { background: #d18f0c; box-shadow: 0 0 0 6px rgba(209, 143, 12, .14); }
.confirm-head h2 { font-family: var(--display); font-size: 22px; font-weight: 500; letter-spacing: -.035em; }
.confirm-head p { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.confirm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 22px 26px; }
.confirm-grid dt { font-size: 12px; color: var(--muted); }
.confirm-grid dd { margin: 4px 0 0; font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.confirm-cal { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 26px; background: var(--surface-2); border-top: 1px solid var(--line); }
.confirm-cal .conn-head { font-size: 13.5px; gap: 10px; }

/* ---------- AI stack: architecture ---------- */
.architecture { background: var(--dark); color: #fff; border-radius: var(--r-xl); padding: 30px 32px 26px; margin-bottom: 24px; position: relative; overflow: hidden; }
.architecture::before { content: ""; position: absolute; inset: -30% auto auto -10%; width: 520px; height: 520px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(226, 85, 43, .16), transparent); }
.architecture > * { position: relative; }
.arch-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.arch-head h2 { font-family: var(--display); font-size: 30px; font-weight: 500; letter-spacing: -.045em; }
.arch-head .card-kicker { color: var(--dark-muted); }
.arch-head .pill { background: rgba(255, 255, 255, .05); border-color: var(--dark-line); color: #e6e6e6; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 3fr) minmax(0, .85fr) minmax(0, .85fr); gap: 28px; align-items: stretch; }
.flow > li { position: relative; }
.flow > li:not(:last-child)::after, .flow-inner > li:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -22px; width: 16px; height: 1px; background: #5a5a5a; }
.flow > li:not(:last-child)::before, .flow-inner > li:not(:last-child)::before { content: ""; position: absolute; top: calc(50% - 3px); right: -22px; width: 6px; height: 6px;
  border-top: 1px solid #5a5a5a; border-right: 1px solid #5a5a5a; transform: rotate(45deg); }
.node { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--dark-line); background: var(--dark-2); min-width: 0; }
.node-icon { width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center; background: rgba(255, 255, 255, .06); color: #fff; margin-bottom: 10px; }
.node-role { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dark-muted); }
.node-provider { font-family: var(--display); font-size: 20px; font-weight: 500; letter-spacing: -.035em; }
.node-model { color: #cfcfcf; font-size: 11.5px; overflow-wrap: anywhere; }
.node-extra { font-size: 11.5px; color: var(--dark-muted); overflow-wrap: anywhere; }
.node-purpose { font-size: 12.5px; color: #b3b3b3; margin-top: auto; padding-top: 12px; line-height: 1.45; }
.node.edge .node-provider:empty { display: none; }
.node.model { background: #232323; border-color: #3a3a3a; }
.flow-group { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--r-xl); border: 1px dashed #3d3d3d; background: rgba(255, 255, 255, .02); }
.group-label, .group-foot { font-size: 11.5px; color: var(--dark-muted); }
.group-label { color: #e0e0e0; font-weight: 500; }
.flow-inner { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; flex: 1; }
.flow-inner > li { position: relative; }
.arch-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--dark-line); font-size: 12.5px; color: var(--dark-muted); }
.arch-foot .status { color: #e6e6e6; }
.arch-note { margin-top: 18px; padding: 12px 14px; border-radius: var(--r); border: 1px solid #5a4416; background: rgba(209, 143, 12, .08); color: #f1d9a4; font-size: 13px; }
.voice-routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 32px; margin: 22px 0 0; }
.voice-route dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dark-muted); }
.voice-route dd { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: #f0f0f0; }
.voice-route .status { color: #d8d8d8; }

/* ---------- cost figures ---------- */
.hero-cost { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; }
.hero-cost.actual { margin-top: 24px; }
.hero-figs { display: grid; grid-template-columns: 1.3fr 1fr 1fr; }
.fig { display: flex; flex-direction: column; gap: 8px; padding: 0 30px; border-left: 1px solid var(--line); }
.fig:first-child { padding-left: 0; border-left: 0; }
.fig-value { font-family: var(--display); font-size: 44px; font-weight: 500; letter-spacing: -.055em; line-height: 1; }
.fig.primary .fig-value { font-size: 62px; }
.fig-value.good { color: var(--ok); }
.fig-label { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.fig-sub { font-size: 12.5px; color: var(--muted); }
.gauge { margin-top: 34px; }
.gauge-track { position: relative; height: 6px; border-radius: 999px; background: var(--surface-3); }
.gauge-fill { height: 100%; border-radius: 999px; background: var(--ink); transform-origin: left; animation: grow .7s var(--ease); }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.gauge-scale { position: relative; height: 20px; margin-top: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gauge-scale span { position: absolute; top: 0; white-space: nowrap; }
.gauge-scale .mid { transform: translateX(-50%); color: var(--ink); font-weight: 500; }
.gauge-scale .end { right: 0; }
.disclaimer { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.cost-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.cost-grid > * { min-width: 0; }
.cost-grid .card + .card { margin-top: 0; }
.span-3 { grid-column: 1 / -1; }
.stackbar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; margin: 0 0 24px; background: var(--surface); }
.seg { height: 100%; transition: opacity .15s; }
.seg:hover { opacity: .8; }
.s1 { background: #141414; } .s2 { background: #474747; } .s3 { background: #7a7a7a; } .s4 { background: #a8a8a8; } .s5 { background: #d0d0d0; }
.tel { background: repeating-linear-gradient(135deg, #e8b9a8 0 4px, #f8e3db 4px 8px); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 10px; flex: none; }
tr.sum td { font-weight: 600; border-top: 1px solid var(--line-2); }
tr.total td { font-size: 15px; border-top: 1px solid var(--ink); border-bottom: 0; }
.kv-list { display: grid; gap: 16px; margin: 0; }
.kv-list dt { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.kv-list dd { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.big-stat { display: flex; gap: 32px; flex-wrap: wrap; margin-bottom: 14px; }
.big-stat b { display: block; font-family: var(--display); font-size: 34px; font-weight: 500; letter-spacing: -.05em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.big-stat span { font-size: 12.5px; color: var(--muted); }
.assumptions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 32px; margin: 0; }
.assumptions div { border-top: 1px solid var(--line); padding-top: 12px; }
.assumptions.compact { margin-top: 26px; }

/* ---------- cost / usage analytics ---------- */
.cost-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 40px; align-items: end; padding-bottom: 36px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.cost-hero-main { display: grid; gap: 12px; }
.hero-number { font-family: var(--display); font-size: 88px; font-weight: 500; letter-spacing: -.065em; line-height: .9; font-variant-numeric: tabular-nums; }
.cost-hero-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); row-gap: 20px; }
.cost-hero-side .kpi { padding: 4px 0 4px 24px; }
.cost-hero-side .kpi:first-child { border-left: 1px solid var(--line); padding-left: 24px; }
.cost-hero-side .kpi-value { font-size: 32px; }
.kpi-value .version { font-size: 15px; letter-spacing: 0; }
.split { display: flex; gap: 3px; height: 14px; margin-bottom: 22px; }
.split-seg { border-radius: 3px; min-width: 4px; transition: opacity .15s; }
.split-seg:hover { opacity: .8; }
.c1 { background: #141414; } .c2 { background: #6b6b6b; } .c3 { background: var(--brand); } .c4 { background: #b3b3b3; } .c5 { background: #dcdcdc; }
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.legend > div { padding: 16px 18px 0; border-left: 1px solid var(--line); }
.legend > div:first-child { padding-left: 0; border-left: 0; }
.legend dt { display: flex; align-items: center; font-size: 12.5px; color: var(--muted); }
.legend dd { margin: 8px 0 0; font-family: var(--display); font-size: 26px; font-weight: 500; letter-spacing: -.045em; }
.parts { list-style: none; margin: 0; padding: 0; }
.part { display: grid; grid-template-columns: 210px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) 110px; gap: 20px; align-items: start; padding: 20px 0; border-top: 1px solid var(--line); }
.part-name { display: flex; align-items: flex-start; }
.part-name .swatch { margin-top: 5px; }
.part-name b { display: block; font-weight: 600; }
.part-name span { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.part-usage, .part-rate { font-size: 13px; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.part-k { display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
code.formula { display: block; font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; overflow-wrap: anywhere; }
.part-cost { text-align: right; font-family: var(--display); font-size: 20px; font-weight: 500; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.parts-total { display: grid; grid-template-columns: 210px minmax(0, 1fr) 150px; gap: 20px; align-items: center; padding-top: 22px; border-top: 1px solid var(--ink); }
.parts-total > span { font-weight: 600; font-size: 15px; }
.parts-total b { text-align: right; font-family: var(--display); font-size: 30px; font-weight: 500; letter-spacing: -.05em; }

/* ---------- dialog ---------- */
.dialog { width: min(460px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface);
  color: var(--ink); box-shadow: 0 32px 80px -24px rgba(20, 20, 20, .45); }
.dialog[open] { animation: pop .2s var(--ease); }
.dialog::backdrop { background: rgba(20, 20, 20, .35); backdrop-filter: blur(3px); animation: fade .2s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.dialog-body { padding: 28px 28px 8px; }
.dialog-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--err-bg); color: var(--err); border: 1px solid var(--err-line); margin-bottom: 18px; }
.dialog-body h2 { font-family: var(--display); font-size: 24px; font-weight: 500; letter-spacing: -.04em; line-height: 1.15; overflow-wrap: anywhere; }
.dialog-body p { color: var(--muted); margin-top: 10px; line-height: 1.6; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 22px 28px 26px; }

/* ---------- loading ---------- */
.sk { background: linear-gradient(90deg, var(--surface-3) 0%, #f7f7f7 50%, var(--surface-3) 100%); background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite; border-radius: var(--r-sm); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk-eyebrow { width: 90px; height: 12px; margin-bottom: 16px; }
.sk-title { width: 320px; max-width: 70%; height: 50px; margin-bottom: 16px; }
.sk-line { width: 420px; max-width: 80%; height: 14px; margin-bottom: 40px; }
.sk-bar { height: 108px; border-radius: var(--r-lg); margin-bottom: 24px; }
.sk-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.sk-card { height: 240px; border-radius: var(--r-lg); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 12px 18px 12px 15px;
  border-radius: 999px; background: var(--ink); color: #fff; font-size: 13.5px; box-shadow: 0 16px 40px -12px rgba(20, 20, 20, .5);
  opacity: 0; transform: translate(-50%, 10px); transition: opacity .2s var(--ease), transform .2s var(--ease); }
body:not(.signed-out) .toast { left: calc(50% + var(--sidebar) / 2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok .i { color: #7ee2a4; } .toast.err .i { color: #f7a9a2; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .rrow { grid-template-columns: minmax(0, 1.4fr) minmax(200px, 1fr) auto; }
  .rrow-status { display: none; }
  .flow { grid-template-columns: 1fr; gap: 26px; }
  .flow > li:not(:last-child)::after { top: auto; bottom: -18px; right: auto; left: 50%; width: 1px; height: 12px; }
  .flow > li:not(:last-child)::before { top: auto; bottom: -19px; right: auto; left: calc(50% - 3px); transform: rotate(135deg); }
  .part { grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr) 100px; }
  .part code.formula { grid-column: 2 / -1; grid-row: 2; }
}
@media (max-width: 1080px) {
  :root { --sidebar: 216px; }
  .container { padding: 44px 36px 112px; }
  .workspace, .try-layout { grid-template-columns: minmax(0, 1fr); }
  .cost-grid { grid-template-columns: 1fr 1fr; }
  .cost-hero { grid-template-columns: 1fr; gap: 28px; }
  .cost-hero-side .kpi:first-child { border-left: 0; padding-left: 0; }
  .masthead h1 { font-size: 46px; }
  .auth { grid-template-columns: 1fr 1fr; }
  .auth-orb { display: none; }
  .auth-headline { font-size: 44px; }
  .stage { min-height: 0; }
}
@media (max-width: 860px) {
  .sidebar { position: sticky; top: 0; inset: auto; width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 12px;
    padding: 12px 20px 0; border-right: 0; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .sidebar:not([hidden]) ~ .container { margin-left: 0; }
  .brand { padding: 0; }
  .brand-tag { display: none; }
  .account { order: 2; margin: 0 0 0 auto; padding: 0; border: 0; }
  .who-text { display: none; }
  .nav { order: 3; flex-direction: row; width: calc(100% + 40px); margin: 10px -20px 0; padding: 0 20px 10px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-label { display: none; }
  .nav a { flex: none; height: 34px; }
  body:not(.signed-out) .toast { left: 50%; }
  .container { padding: 32px 20px 96px; }
  .setting { grid-template-columns: 1fr; gap: 16px; }
  .hero-figs { grid-template-columns: 1fr; gap: 24px; }
  .fig { padding: 0; border-left: 0; }
  .fig + .fig { border-top: 1px solid var(--line); padding-top: 22px; }
  .cost-grid { grid-template-columns: minmax(0, 1fr); }
  .rrow { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 22px 0; margin: 0; }
  .rrow-stats { max-width: 360px; }
  .flow-inner { grid-template-columns: 1fr; gap: 22px; }
  .flow-inner > li:not(:last-child)::after { top: auto; bottom: -16px; right: auto; left: 50%; width: 1px; height: 10px; }
  .flow-inner > li:not(:last-child)::before { top: auto; bottom: -17px; right: auto; left: calc(50% - 3px); transform: rotate(135deg); }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 28px 24px; min-height: 0; gap: 36px; }
  .auth-headline { font-size: 34px; }
  .auth-foot { display: none; }
  .auth-panel { padding: 36px 24px 48px; place-items: start center; }
  .prompt-grid { grid-template-columns: 1fr; }
  .part { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; }
  .part-usage, .part-rate { grid-column: 1 / -1; }
  .part code.formula { grid-column: 1 / -1; grid-row: auto; }
  .part-cost { grid-row: 1; grid-column: 2; }
  .parts-total { grid-template-columns: minmax(0, 1fr) auto; }
  .parts-total code.formula { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 600px) {
  .masthead { padding-bottom: 24px; margin-bottom: 28px; }
  .masthead h1 { font-size: 38px; }
  .monogram.xl { width: 56px; height: 56px; font-size: 24px; }
  .lede { font-size: 15px; }
  .page-actions { width: 100%; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 18px 0 20px 18px; border-bottom: 1px solid var(--line); }
  .kpi:nth-child(odd) { border-left: 0; padding-left: 0; }
  .kpi:nth-last-child(-n+2) { border-bottom: 0; }
  .kpi-value { font-size: 36px; }
  .card { padding: 22px 18px; }
  .setting-body { padding: 20px 18px; }
  .table-wrap { margin: 0 -18px; padding: 0 18px; }
  .table-wrap table { min-width: 620px; }   /* keep columns readable; the table scrolls inside its card */
  .agenda-item { grid-template-columns: 84px minmax(0, 1fr); gap: 6px 16px; }
  .agenda-ref, .agenda-status { grid-column: 2; justify-self: start; }
  .agenda-time b { font-size: 20px; }
  .props > div { grid-template-columns: 92px 1fr; }
  .props.hours > div { grid-template-columns: 100px 1fr; }
  .spec dd { font-size: 24px; }
  .confirm-grid { grid-template-columns: 1fr 1fr; }
  .stage { padding: 20px 18px 22px; border-radius: var(--r-lg); }
  .stage h1 { font-size: 40px; }
  .voice { margin-top: 36px; }
  .hero-cost { padding: 24px 20px; }
  .fig.primary .fig-value { font-size: 46px; }
  .hero-number { font-size: 60px; }
  .gauge-scale .mid { display: none; }
  .cost-table th:nth-child(3), .cost-table td:nth-child(3) { display: none; }
  .architecture { padding: 22px 18px; border-radius: var(--r-lg); }
  .legend > div { padding: 14px 0 0; border-left: 0; }
  .legend { grid-template-columns: 1fr 1fr; row-gap: 4px; }
  .shift { grid-template-columns: 1fr 1fr; }
  .shift > span:first-child { grid-column: 1 / -1; }
  .shift > .to { display: none; }
  .form-bar { flex-wrap: wrap; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .btn { width: 100%; }
  .error-state h1 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* per-call latency panel (cost detail page) */
.latency-actions { display: flex; align-items: center; gap: 10px; }
.latency-kpis { margin: 18px 0 22px; }
.latency-kpis .kpi { padding: 16px 18px 18px; gap: 6px; }
.latency-kpis .kpi-value { font-size: 26px; letter-spacing: -.03em; }
.latency-turns th, .latency-turns td { white-space: nowrap; }
.sub-head { font-size: 14px; font-weight: 600; margin: 24px 0 8px; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.na { color: var(--faint); font-style: italic; }

/* API health & billing page */
.health-interval { display: inline-flex; align-items: center; gap: 8px; }
.health-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; margin-bottom: 18px; }
.health-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 18px; }
.health-card.stale { opacity: .82; }
.health-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px 16px; margin: 12px 0; }
.health-grid dt { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.health-grid dd { margin: 0; }
.health-error { color: var(--err); font-size: 13px; }
.health-action, .health-facts { font-size: 13px; margin-top: 8px; }
.health-legend summary { cursor: pointer; font-weight: 600; }

/* restaurant phone numbers (form Phone section, restaurant page card) */
.phones { display: grid; gap: 10px; }
.phone-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.phone-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.phone-empty { margin: 0; }
.phone-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.phone-add input { flex: 1 1 220px; max-width: 320px; }
.phone-error { color: var(--err); font-size: 13px; margin: 0; min-height: 0; }
.phone-error:empty { display: none; }

/* onboarding checklist, audit trail, team (restaurant page rail, Team page) */
a.who { color: inherit; text-decoration: none; border-radius: 10px; }
a.who:hover .who-name { text-decoration: underline; }
.setup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.setup-item { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.setup-item p { margin: 2px 0 0; }
.setup-mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.setup-item.done .setup-mark { background: var(--ok-bg, #e7f6ec); color: var(--ok, #1f7a3d); }
.setup-item.todo .setup-mark { background: var(--warn-bg, #fff4e0); color: var(--warn, #9a5b00); }
.activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.activity li { display: grid; gap: 2px; }
.activity-when { font-size: 12px; color: var(--muted, #6b7280); }
tr.inactive td { opacity: 0.6; }
