/* LingerLens client portal. Dark is the default ("instrument at night"); light is its own design, not an inversion.
   Drawers, tooltips and toasts are attached to <body>, outside .app (re-renders clear .app), so they get the tokens too. */
.app, body > .drawer, body > .scrim, body > .tooltip, body > .toasts {
  --bg: #0E0F0D; --surface: #151613; --surface-2: #1C1D1A; --surface-3: #24251F; --line: #2A2B26; --line-2: #3A3B35;
  --text: #ECE9E2; --text-2: #A3A198; --text-3: #8A887F; --heat: #F5622D; --heat-text: #FF8A5C; --cool: #6592F2;
  --grid: #262722; --axis: #474842; --on-heat: #0E0F0D; --scrim: rgba(5, 5, 4, .62);
  --good: #53C556; --bad: #FF8A6B; --warn: #FBB315;
  --heat-ramp-0: #1C1D1A; --heat-ramp-1: #4A1606; --heat-ramp-2: #8F230A; --heat-ramp-3: #D23F10; --heat-ramp-4: #F5622D; --heat-ramp-5: #FFA45C; --heat-ramp-6: #FFE3B3;
  color-scheme: dark;
}
.app[data-theme="light"], body.light > .drawer, body.light > .scrim, body.light > .tooltip, body.light > .toasts {
  --bg: #F2F1EC; --surface: #FFFFFF; --surface-2: #F7F6F2; --surface-3: #EFEEE8; --line: #E2E0D8; --line-2: #CFCDC4;
  --text: #121311; --text-2: #5A5A53; --text-3: #6B6962; --heat: #E0531C; --heat-text: #B9410F; --cool: #2F6BD6;
  --grid: #ECEAE3; --axis: #C2C0B8; --on-heat: #FFFFFF; --scrim: rgba(18, 19, 17, .35);
  --good: #0A7D1C; --bad: #C2340F; --warn: #9A6A00;
  --heat-ramp-0: #F4F2EC; --heat-ramp-1: #FBE0D2; --heat-ramp-2: #F8BFA2; --heat-ramp-3: #F2946C; --heat-ramp-4: #E8693A; --heat-ramp-5: #C9440F; --heat-ramp-6: #7E2606;
  color-scheme: light;
}
.app { background: var(--bg); color: var(--text); min-height: 100vh; min-height: 100dvh; }
body { background: #0E0F0D; }
body.light { background: #F2F1EC; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100dvh; }
@media (min-width: 980px) { .shell { grid-template-columns: 236px minmax(0, 1fr); } }
.side { display: none; }
@media (min-width: 980px) {
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; border-right: 1px solid var(--line); padding: 20px 14px 16px; background: var(--bg); }
}
.side .wordmark { padding: 4px 10px 18px; color: var(--text); }
.biz { padding: 12px 10px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.biz-name { font-weight: 650; font-size: 15px; line-height: 1.3; }
.biz-type { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.tag-demo { font-size: 11px; font-weight: 600; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--text-2); }
.side-nav { display: grid; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r-btn); text-decoration: none; color: var(--text-2); font-size: 15px; font-weight: 500; transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease); }
.nav-item svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--surface-2); color: var(--text); box-shadow: inset 2px 0 0 var(--heat); }
.side-foot { margin-top: auto; display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; }
.side-foot button, .side-foot a { justify-content: flex-start; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--bg); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 980px) { .tabbar { display: none; } }
.tab { display: grid; justify-items: center; gap: 3px; padding: 9px 0 8px; text-decoration: none; color: var(--text-3); font-size: 11.5px; font-weight: 500; min-height: 56px; }
.tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current="page"] { color: var(--text); }
.tab[aria-current="page"] svg { stroke: var(--heat); }

.main { min-width: 0; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
@media (min-width: 980px) { .main { padding-bottom: 48px; } }
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1240px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (min-width: 720px) { .top-inner { padding: 18px 28px; } }
.top-mobile-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.top-mobile-brand svg { width: 22px; height: 22px; flex: none; }
.top-mobile-brand .biz-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 980px) { .top-mobile-brand { display: none; } }
.page-title { display: none; margin: 0; font-size: 26px; font-weight: 700; font-stretch: 110%; letter-spacing: -0.02em; line-height: 1.1; }
@media (min-width: 980px) { .page-title { display: block; } }
.page-sub { display: none; margin: 2px 0 0; color: var(--text-2); font-size: 14px; }
@media (min-width: 980px) { .page-sub { display: block; } }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.content { max-width: 1240px; margin: 0 auto; padding: 16px; }
@media (min-width: 720px) { .content { padding: 24px 28px; } }
.mobile-title { margin: 6px 0 14px; font-size: 24px; font-weight: 700; font-stretch: 110%; letter-spacing: -0.02em; }
@media (min-width: 980px) { .mobile-title { display: none; } }

/* ---------- controls ---------- */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-btn); padding: 2px; }
.seg button { border: 0; background: transparent; color: var(--text-2); font: 500 13.5px var(--mono); font-stretch: 92%; padding: 0 10px; min-height: 32px; border-radius: 4px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-btn); background: transparent; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease); white-space: nowrap; }
.btn-ghost:hover { border-color: var(--text-3); background: var(--surface-2); }
.btn-ghost svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn-plain { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: var(--r-btn); background: transparent; color: var(--text-2); font-size: 14.5px; cursor: pointer; text-decoration: none; }
.btn-plain:hover { background: var(--surface-2); color: var(--text); }
.btn-plain svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app .btn-primary { color: var(--on-heat); background: var(--heat); }
.app .btn-primary:hover { filter: brightness(1.08); }
.app .btn-secondary { color: var(--text); border-color: var(--line-2); }
.app .btn-secondary:hover { border-color: var(--text-3); }
.linklike { background: none; border: 0; padding: 0; color: var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--text-3); cursor: pointer; font-size: inherit; }
.linklike:hover { text-decoration-color: var(--text); }
.input, .select, .textarea {
  width: 100%; min-height: 44px; border-radius: var(--r-input); border: 1px solid var(--line-2); background: var(--bg); color: var(--text);
  padding: 0 12px; font-size: 16px; transition: border-color var(--fast) var(--ease);
}
.textarea { padding: 10px 12px; min-height: 140px; font: 13.5px/1.55 var(--mono); font-stretch: 92%; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--heat); }
.field { display: grid; gap: 6px; font-size: 14px; color: var(--text-2); }
.field > span { font-weight: 500; }
.field small { color: var(--text-3); font-size: 13px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.row > *, .card-body > *, .onb-body > * { min-width: 0; }
@media (min-width: 640px) { .row-2 { grid-template-columns: 1fr 1fr; } .row-3 { grid-template-columns: 2fr 1fr 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 34px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 13.5px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.chip:hover { color: var(--text); border-color: var(--text-3); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .n { font-family: var(--mono); font-size: 11.5px; opacity: .75; }

/* ---------- cards + layout ---------- */
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
  .r-2 { grid-row: span 2; }
  .s-12 { grid-column: span 12; } .s-8 { grid-column: span 8; } .s-7 { grid-column: span 7; } .s-6 { grid-column: span 6; } .s-5 { grid-column: span 5; } .s-4 { grid-column: span 4; }
}
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); min-width: 0; }
.card-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 0; flex-wrap: wrap; }
.card-title { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -0.005em; }
.card-sub { margin: 3px 0 0; font-size: 13.5px; color: var(--text-2); max-width: 60ch; }
.card-head .spacer { flex: 1; }
.card-body { padding: 14px 18px 18px; }
.muted { color: var(--text-2); }
.note { font-size: 13.5px; color: var(--text-2); margin: 10px 0 0; }

/* kind tags: text label is the identity; the tick mark is decoration */
.kind-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.kind-tag::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--text-3); }
.kind-tag.k-almost::before, .kind-tag.k-search::before, .kind-tag.k-filter::before { background: var(--heat); }
.kind-tag.k-gem::before, .kind-tag.k-swap::before, .kind-tag.k-fold::before { background: var(--cool); }
.kind-tag.k-star::before { background: var(--text); }

/* ---------- brief ---------- */
.lead { padding: 22px 22px 22px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
@media (min-width: 720px) { .lead { padding: 28px 30px; } }
.lead::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--heat); }
.lead-eyebrow { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.lead-title { margin: 4px 0 0; font-size: clamp(24px, 1.6vw + 16px, 34px); font-weight: 700; font-stretch: 110%; letter-spacing: -0.022em; line-height: 1.1; max-width: 26ch; text-wrap: balance; }
.lead-body { margin: 0; color: var(--text-2); font-size: 16.5px; max-width: 64ch; }
.lead-action { margin: 0; font-size: 16.5px; max-width: 64ch; }
.lead-action::before { content: 'Try this: '; font-weight: 650; color: var(--heat-text); }
.lead-foot { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.kpi { background: var(--surface); padding: 16px 16px 15px; min-width: 0; }
.kpi-label { font-size: 13px; color: var(--text-2); }
.kpi-value { font-size: 30px; font-weight: 700; font-stretch: 108%; letter-spacing: -0.02em; line-height: 1.15; margin-top: 6px; }
.kpi-value small { font-size: 15px; font-weight: 500; color: var(--text-2); letter-spacing: 0; margin-left: 2px; }
.kpi-delta { font-size: 12.5px; margin-top: 4px; display: flex; align-items: center; gap: 5px; color: var(--text-2); }
.kpi-delta svg { width: 10px; height: 10px; }
.kpi-delta.up { color: var(--good); } .kpi-delta.down { color: var(--bad); }
.spark { display: block; width: 100%; max-width: 160px; height: 28px; margin-top: 10px; }
.ins-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .ins-grid { grid-template-columns: 1fr 1fr; } }
.ins { padding: 16px 18px 18px; border-top: 1px solid var(--line); display: grid; gap: 6px; align-content: start; text-align: left; background: transparent; border-left: 0; border-right: 0; border-bottom: 0; color: inherit; font: inherit; }
@media (min-width: 760px) { .ins:nth-child(odd) { border-right: 1px solid var(--line); } }
button.ins { cursor: pointer; transition: background-color var(--fast) var(--ease); }
button.ins:hover { background: var(--surface-2); }
.ins-title { font-weight: 650; font-size: 16px; line-height: 1.3; }
.ins-body { color: var(--text-2); font-size: 14.5px; }
.ins-action { font-size: 14.5px; }

/* ---------- charts ---------- */
.chart-box { position: relative; width: 100%; }
.chart-box svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-box text { font-family: var(--sans); }
.chart-box .tick { font-family: var(--mono); font-size: 10.5px; fill: var(--text-3); font-stretch: 92%; }
.chart-empty { display: grid; place-items: center; min-height: 160px; color: var(--text-3); font-size: 14px; text-align: center; padding: 20px; }
.tooltip {
  position: fixed; z-index: 80; pointer-events: none; background: var(--text); color: var(--bg); border-radius: 6px; padding: 8px 10px; font-size: 13px;
  line-height: 1.4; max-width: 260px; transform: translate(-50%, calc(-100% - 12px)); box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.tooltip b { display: block; font-size: 15px; font-weight: 700; }
.tooltip span { display: block; opacity: .8; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.heat-scale { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); margin-top: 10px; }
.heat-scale i { display: block; width: 120px; height: 8px; border-radius: 2px; background: linear-gradient(90deg, var(--heat-ramp-0), var(--heat-ramp-2), var(--heat-ramp-4), var(--heat-ramp-6)); }

/* bar list (demand) */
.bars { display: grid; gap: 2px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 7px 0; }
.bar-label { font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-val { font: 12.5px var(--mono); font-stretch: 92%; color: var(--text-2); font-variant-numeric: tabular-nums; }
.bar-track { grid-column: 1 / -1; height: 6px; background: var(--surface-3); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.bar-track i { display: block; height: 100%; background: var(--text-2); border-radius: 0 2px 2px 0; }
.bar-row.hot .bar-track i { background: var(--heat); }
.flag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--heat-text); margin-left: 8px; }
.flag svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.segbar { display: flex; height: 28px; gap: 2px; border-radius: 4px; overflow: hidden; }
.segbar div { display: flex; align-items: center; padding: 0 8px; font-size: 12.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; min-width: 0; }

/* ---------- items ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .input { max-width: 320px; flex: 1 1 200px; min-height: 40px; }
.toolbar .select { width: auto; min-height: 40px; }
.itable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.itable th { text-align: left; font-weight: 500; color: var(--text-2); font-size: 13px; padding: 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.itable th button { background: none; border: 0; color: inherit; font: inherit; padding: 12px 12px; cursor: pointer; width: 100%; text-align: inherit; }
.itable th.num, .itable td.num { text-align: right; }
.itable th[aria-sort] button { color: var(--text); }
.itable td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.itable td.num { font-family: var(--mono); font-stretch: 92%; font-size: 13px; font-variant-numeric: tabular-nums; }
.itable tbody tr { cursor: pointer; transition: background-color var(--fast) var(--ease); }
.itable tbody tr:hover { background: var(--surface-2); }
.itable tbody tr:focus-visible { outline: 2px solid var(--heat); outline-offset: -2px; }
.iname b { display: block; font-weight: 600; }
.iname small { color: var(--text-3); font-size: 12.5px; }
.scorebar { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.scorebar .track { flex: 1; height: 6px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.scorebar .track i { display: block; height: 100%; border-radius: 0 2px 2px 0; }
.scorebar .v { font: 600 13px var(--mono); font-stretch: 92%; width: 26px; text-align: right; }
.table-wrap { overflow-x: auto; }
.itable-mobile { display: grid; }
.icard { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.icard:last-child { border-bottom: 0; }
.icard .s { font: 700 22px var(--sans); font-stretch: 108%; text-align: right; grid-row: span 2; align-self: center; }
.icard .meta { font-size: 13px; color: var(--text-2); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
@media (max-width: 859px) { .desktop-only { display: none !important; } }
@media (min-width: 860px) { .mobile-only { display: none !important; } }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 60; }
.drawer {
  position: fixed; z-index: 70; background: var(--surface); color: var(--text); overflow: auto; overscroll-behavior: contain;
  left: 0; right: 0; bottom: 0; max-height: 88dvh; border-radius: var(--r-sheet) var(--r-sheet) 0 0; border-top: 1px solid var(--line);
  transform: translateY(16px); opacity: 0; transition: transform var(--mid) var(--ease), opacity var(--mid) var(--ease);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 860px) {
  .drawer { left: auto; top: 0; bottom: 0; right: 0; width: 460px; max-height: none; border-radius: 0; border-top: 0; border-left: 1px solid var(--line); transform: translateX(16px); }
}
.drawer.open { transform: none; opacity: 1; }
.drawer-head { position: sticky; top: 0; background: var(--surface); display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); z-index: 1; }
.drawer-head h2 { margin: 0; font-size: 22px; font-weight: 700; font-stretch: 108%; letter-spacing: -0.015em; line-height: 1.15; }
.drawer-head p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; }
.icon-btn { margin-left: auto; width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.drawer-body { padding: 18px 20px 28px; display: grid; gap: 22px; }
.big-score { display: flex; align-items: baseline; gap: 12px; }
.big-score b { font-size: 56px; font-weight: 700; font-stretch: 112%; letter-spacing: -0.03em; line-height: 1; }
.big-score span { color: var(--text-2); font-size: 14px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.fact { background: var(--surface); padding: 12px 14px; }
.fact dt { font-size: 12.5px; color: var(--text-2); }
.fact dd { margin: 4px 0 0; font: 600 18px var(--sans); font-stretch: 106%; }
.fact dd small { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.funnel { display: grid; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 64px; gap: 10px; align-items: center; font-size: 13.5px; }
.funnel-row .track { height: 10px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.funnel-row .track i { display: block; height: 100%; background: var(--text-2); border-radius: 0 2px 2px 0; }
.funnel-row:last-child .track i { background: var(--heat); }
.funnel-row .v { font: 12.5px var(--mono); font-stretch: 92%; text-align: right; color: var(--text-2); }
.drawer h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--text-2); }

/* ---------- setup ---------- */
.setup { display: grid; gap: 16px; }
.qr-wrap { display: grid; gap: 18px; align-items: start; }
@media (min-width: 720px) { .qr-wrap { grid-template-columns: 200px minmax(0, 1fr); } }
.qr { width: 200px; height: 200px; background: #fff; border-radius: 8px; padding: 10px; border: 1px solid var(--line); }
.qr img { width: 100%; height: 100%; }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-input); padding: 4px 4px 4px 12px; min-width: 0; }
.linkbox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 13px var(--mono); font-stretch: 92%; }
.snippet { position: relative; }
.snippet pre { margin: 0; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-input); padding: 14px 14px 14px; font: 12.5px/1.7 var(--mono); font-stretch: 90%; overflow-x: auto; white-space: pre; }
.snippet .btn-ghost { position: absolute; right: 8px; top: 8px; background: var(--surface); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tab-btn { background: none; border: 0; color: var(--text-2); font-size: 14px; font-weight: 500; padding: 10px 10px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab-btn[aria-selected="true"] { color: var(--text); border-bottom-color: var(--heat); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 15px; }
.steps code, .inline-code { font: 12.5px var(--mono); font-stretch: 92%; background: var(--surface-3); padding: 1px 5px; border-radius: 3px; }
.status-line { display: flex; align-items: center; gap: 10px; font-size: 14.5px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-input); background: var(--bg); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot.ok { background: var(--good); }
.dot.wait { background: var(--warn); }
.origin-chip { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px 0 12px; min-height: 34px; border: 1px solid var(--line-2); border-radius: var(--r-pill); font: 13px var(--mono); font-stretch: 92%; }
.origin-chip button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.item-rows { display: grid; }
.item-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.item-row:last-child { border-bottom: 0; }
.item-row.off { opacity: .55; }
.vlookup { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 4px; }
.vrows { display: grid; gap: 8px; }
.vrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr) minmax(0, .6fr) 34px; gap: 8px; align-items: center; }
.vrow.vhead { font-size: 12px; color: var(--text-3, var(--text-2)); }
/* Phones: the variant ID gets its own line so all of it shows; option and price share the line above. */
@media (max-width: 560px) {
  .vrows { gap: 16px; }
  .vrow { grid-template-columns: minmax(0, 1fr) minmax(0, .5fr) 34px; row-gap: 6px; }
  .vrow > :nth-child(2) { grid-column: 1 / 3; grid-row: 2; }
  .vrow > :nth-child(3) { grid-column: 2; grid-row: 1; }
  .vrow > :nth-child(4) { grid-column: 3; grid-row: 1; }
  .vrow.vhead { margin-bottom: -10px; }
  .vrow.vhead > :nth-child(2) { display: none; }
}
.item-row .thumb { width: 34px; height: 34px; border-radius: 5px; background: var(--surface-3); object-fit: cover; }
.item-row .pos { font: 12px var(--mono); font-stretch: 92%; color: var(--text-3); text-align: center; }
.item-row .nm { font-weight: 600; font-size: 15px; }
.item-row .sub { font-size: 13px; color: var(--text-2); }
.item-row .acts { display: flex; gap: 4px; }
.mini { width: 34px; height: 34px; border-radius: var(--r-btn); border: 1px solid var(--line); background: transparent; color: var(--text-2); cursor: pointer; display: grid; place-items: center; }
.mini:hover { color: var(--text); border-color: var(--line-2); }
.mini svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mini[disabled] { opacity: .35; cursor: default; }
.section-head { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.section-head::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.result { font-size: 14px; color: var(--text-2); }
.result.ok { color: var(--good); }
.result.err { color: var(--bad); }
.readonly-note { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: var(--r-input); font-size: 14px; color: var(--text-2); }

/* ---------- empty / waiting ---------- */
.waiting { padding: 28px 24px; display: grid; gap: 14px; }
.waiting h2 { margin: 0; font-size: clamp(24px, 1.5vw + 16px, 32px); font-weight: 700; font-stretch: 110%; letter-spacing: -0.02em; line-height: 1.1; }
.checklist { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.checklist .ck { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; margin-top: 1px; display: grid; place-items: center; }
.checklist .ck.done { background: var(--good); border-color: var(--good); }
.checklist .ck svg { width: 12px; height: 12px; fill: none; stroke: var(--bg); stroke-width: 2.5; }

/* ---------- welcome + onboarding ---------- */
.welcome { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .welcome { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.welcome-art { background: #0E0F0D; color: #ECE9E2; padding: 28px 24px; display: flex; flex-direction: column; gap: 28px; border-bottom: 1px solid var(--line); }
@media (min-width: 980px) { .welcome-art { padding: 40px 56px; border-bottom: 0; border-right: 1px solid #2B2C27; } }
.welcome-art .wordmark { color: #ECE9E2; }
.welcome-art h1 { margin: auto 0 0; font-size: clamp(34px, 3.4vw + 12px, 64px); font-weight: 700; font-stretch: 112%; letter-spacing: -0.025em; line-height: 1.02; max-width: 12ch; }
.welcome-art p { margin: 0; color: #A3A198; max-width: 40ch; }
.heat-trace { display: grid; gap: 6px; max-width: 420px; }
.heat-trace div { height: 10px; border-radius: 2px; background: linear-gradient(90deg, #2A0E05, #7A1E08 30%, #C9370E 55%, #F5622D 75%, #FFA45C 92%, #FFE3B3); }
.welcome-form { padding: 32px 24px 48px; display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 520px; width: 100%; margin: 0 auto; }
.welcome-form h2 { margin: 0; font-size: 26px; font-weight: 700; font-stretch: 110%; letter-spacing: -0.02em; }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.demo-links { display: flex; gap: 10px; flex-wrap: wrap; }

.onb { min-height: 100dvh; display: flex; flex-direction: column; }
.onb-top { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 5; }
@media (min-width: 720px) { .onb-top { padding: 16px 32px; } }
.onb-top .wordmark { color: var(--text); }
.onb-count { margin-left: auto; font: 12.5px var(--mono); font-stretch: 92%; color: var(--text-2); white-space: nowrap; }
.onb-top .linklike { white-space: nowrap; }
@media (max-width: 480px) { .onb-count .long { display: none; } }
.onb-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 0 16px; max-width: 860px; width: 100%; margin: 18px auto 0; }
.onb-bar i { height: 3px; border-radius: 2px; background: var(--line-2); }
.onb-bar i.on { background: var(--heat); }
.onb-body { width: 100%; max-width: 860px; margin: 0 auto; padding: 22px 16px 120px; flex: 1; }
@media (min-width: 720px) { .onb-body { padding: 36px 32px 120px; } }
.onb-title { margin: 0; font-size: clamp(28px, 2.2vw + 16px, 44px); font-weight: 700; font-stretch: 112%; letter-spacing: -0.024em; line-height: 1.05; max-width: 20ch; text-wrap: balance; }
.onb-sub { color: var(--text-2); margin: 12px 0 26px; max-width: 58ch; font-size: 16.5px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 720px) { .choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } }
.choice {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 4px 12px; align-items: start; text-align: left; padding: 14px; min-height: 84px;
  border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); color: var(--text); cursor: pointer;
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.choice svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; grid-row: span 2; margin-top: 1px; }
.choice b { font-size: 15px; font-weight: 600; line-height: 1.25; }
.choice span { font-size: 13px; color: var(--text-2); line-height: 1.35; }
.choice:hover { border-color: var(--line-2); background: var(--surface-2); }
.choice[aria-pressed="true"], .choice[aria-checked="true"] { border-color: var(--heat); box-shadow: inset 0 0 0 1px var(--heat); }
.choice[aria-pressed="true"] svg, .choice[aria-checked="true"] svg { stroke: var(--heat); }
@media (max-width: 420px) { .choice { grid-template-columns: minmax(0, 1fr); padding: 12px; } .choice svg { grid-row: auto; margin-bottom: 4px; } }
.surface-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .surface-grid { grid-template-columns: 1fr 1fr; } }
.surface { position: relative; display: grid; gap: 10px; text-align: left; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color var(--fast) var(--ease); }
.surface:hover { border-color: var(--line-2); }
.surface[aria-pressed="true"], .surface[aria-checked="true"] { border-color: var(--heat); box-shadow: inset 0 0 0 1px var(--heat); }
.surface .ill { height: 120px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; }
.surface .ill svg { height: 96px; width: auto; }
.surface b { font-size: 18px; font-weight: 650; font-stretch: 106%; }
.surface span { color: var(--text-2); font-size: 14.5px; }
.surface .rec, .rec { position: absolute; top: 12px; right: 12px; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 4px; background: var(--heat); color: var(--on-heat); }
.onb-foot { position: fixed; left: 0; right: 0; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); z-index: 5; }
.onb-foot-inner { max-width: 860px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
@media (min-width: 720px) { .onb-foot { padding: 14px 32px; } }
.onb-foot .btn-primary { margin-left: auto; }
.keybox { display: grid; gap: 10px; padding: 18px; border: 1px solid var(--heat); border-radius: var(--r-panel); background: var(--surface); }
.keybox code { font: 14px var(--mono); font-stretch: 92%; word-break: break-all; }

/* ---------- feedback ---------- */
.progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 100; overflow: hidden; pointer-events: none; }
.progress i { display: block; height: 100%; width: 40%; background: var(--heat); transform: translateX(-100%); animation: slide 1.1s var(--ease) infinite; }
@keyframes slide { to { transform: translateX(260%); } }
.loading-dim { opacity: .55; transition: opacity var(--mid) var(--ease); }
.toasts { position: fixed; left: 16px; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 90; display: grid; gap: 8px; justify-items: start; pointer-events: none; }
@media (min-width: 980px) { .toasts { left: 252px; bottom: 20px; right: auto; } }
.toast { background: var(--text); color: var(--bg); padding: 11px 14px; border-radius: 6px; font-size: 14.5px; max-width: 420px; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); pointer-events: auto; }
.toast.err { background: var(--bad); color: #fff; }

/* ---------- reading a menu: the review list ---------- */
.read-row { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.read-row.skipped > :not(.read-top) { opacity: .45; }
.read-top { display: flex; gap: 8px; align-items: center; min-width: 0; }
.read-top .input:first-of-type { flex: 1; min-width: 0; }
.read-row.existing .read-top { justify-content: space-between; flex-wrap: wrap; }
.read-row input[type="checkbox"] { width: 20px; height: 20px; flex: none; accent-color: var(--heat); }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.read-foot { position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 4px; border-top: 1px solid var(--line); }

/* ---------- Fix it drafts ---------- */
.fix-panel { display: grid; gap: 12px; margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--r-panel); background: var(--bg); }
.fix-title { margin: 0; font-size: 14px; font-weight: 600; color: var(--text-2); }
.fix-part { display: grid; gap: 4px; }
.fix-label { font-size: 12.5px; color: var(--text-2); }
.fix-quote { margin: 0; font-size: 16px; line-height: 1.45; }
.fix-acts { display: flex; gap: 14px; align-items: center; margin-top: 4px; }
.fix-plan { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
/* A draft opened under the lead finding makes that card tall; keep the number tiles their own height. */
.grid:has(.lead .fix-panel) .kpis { align-self: start; }

/* ---------- page designs ---------- */
.design-frame { position: relative; overflow: hidden; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); flex: none; }
.design-frame iframe { position: absolute; top: 0; left: 0; width: 390px; height: 663px; border: 0; transform-origin: 0 0; pointer-events: none; }
.design-now { display: flex; gap: 18px; align-items: flex-start; }
.design-info { display: grid; gap: 6px; min-width: 0; }
.design-info p { margin: 0; }
.design-info .muted { font-size: 14px; line-height: 1.45; }
.design-name { font-size: 18px; font-weight: 700; }
.design-meta { font-size: 13px; color: var(--text-2); }
@media (min-width: 760px) { .drawer.wide { width: min(720px, 100vw); } }
.design-count { margin: 0; font-size: 13px; }
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 22px 16px; }
.design-card { display: grid; gap: 6px; align-content: start; }
.design-card h3 { margin: 4px 0 0; font-size: 15px; font-weight: 650; color: var(--text); }
.design-card p { margin: 0; font-size: 13px; line-height: 1.4; }
.design-card.current .design-frame { outline: 2px solid var(--heat); outline-offset: 2px; }
.design-acts { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 4px; }
.design-acts .btn { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.design-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 14px 12px; }
.design-option { position: relative; display: grid; gap: 6px; justify-items: start; font-size: 13.5px; font-weight: 600; }
.design-hit { position: absolute; inset: -4px; border: 0; border-radius: 14px; background: transparent; cursor: pointer; }
.design-hit:focus-visible { outline: 2px solid var(--heat); }
.design-option:has(.design-hit[aria-checked="true"]) .design-frame { outline: 2px solid var(--heat); outline-offset: 2px; }

/* ---------- customizing a design ---------- */
.design-changed { font-size: 13px; font-weight: 600; color: var(--text-2); }
.customize { align-items: start; }
@media (min-width: 760px) { .customize { grid-template-columns: 250px minmax(0, 1fr); } .customize-preview { position: sticky; top: 92px; } }
.customize-preview { display: grid; gap: 8px; justify-items: start; }
.customize-controls { display: grid; gap: 18px; min-width: 0; }
.customize-group { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; min-width: 0; }
.customize-group legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 600; color: var(--text); }
.customize-hint { margin: 0; font-size: 13px; line-height: 1.45; }
.color-row { display: grid; grid-template-columns: minmax(96px, 1fr) 44px 108px; gap: 4px 10px; align-items: center; font-size: 14px; color: var(--text-2); }
.color-label { font-weight: 500; }
.color-swatch { width: 44px; height: 44px; padding: 2px; border-radius: var(--r-input); border: 1px solid var(--line-2); background: var(--bg); cursor: pointer; }
.color-hex { font: 14px var(--mono); font-stretch: 92%; text-transform: uppercase; }
.color-note { grid-column: 1; color: var(--text-3); font-size: 12.5px; }
.color-undo { grid-column: 2 / 4; justify-self: start; font-size: 13px; }
.color-undo[hidden] { display: none; }
.color-swatch:focus-visible { outline: 2px solid var(--heat); outline-offset: 2px; }

/* Legal links on the sign-in screen, and the agreement line under the business details. */
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; padding-top: 14px; border-top: 1px solid var(--line); }
.legal-links a { color: var(--text-2); text-underline-offset: 3px; }
.legal-links a:hover { color: var(--text); }
.fine { font-size: 13.5px; margin: 0; }
.fine a { color: inherit; text-underline-offset: 3px; }

/* Signing in: the email list in Setup, the reminder above pages, and the key form folded under email sign-in. */
.email-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.email-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.email-addr { font-weight: 600; overflow-wrap: anywhere; }
.email-ok { color: var(--good); font-size: 13.5px; }
.email-wait { color: var(--text-2); font-size: 13.5px; }
.nudge { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 12px 16px; margin: 0 0 16px; border: 1px solid var(--line-2); border-radius: var(--r-panel); background: var(--surface); font-size: 14.5px; }
.key-signin summary { cursor: pointer; color: var(--text-2); font-size: 14px; padding: 6px 0; }
.key-signin[open] summary { margin-bottom: 10px; }
.key-signin summary:focus-visible { outline: 2px solid var(--heat); outline-offset: 2px; border-radius: 3px; }
.snippet pre:focus-visible { outline: 2px solid var(--heat); outline-offset: 2px; }

/* Paying: the monthly and yearly choice reuses the onboarding cards. */
.plan-pick .surface { gap: 4px; padding: 16px 18px; }
.plan-pick .surface b span { color: var(--text); font-size: inherit; }
.plan-pick .plan-name { color: var(--text); font-weight: 600; font-size: 15px; }
.plan-seg { justify-self: start; align-self: start; }
.plan-seg button { font-family: inherit; font-stretch: 100%; padding: 0 14px; min-height: 36px; }
.plan-pick .surface b { font-size: 24px; }
.plan-pick .surface b small { font-size: 15px; font-weight: 500; color: var(--text-2); }
.plan-fine { margin: 0; font-size: 13.5px; max-width: 64ch; }
