/* Demo stylesheet. Tokens mirror packages/ui/src/tokens.css; the brand kit overrides the
   --primary family at runtime after passing the contrast guard. Light only, by brief. */
:root {
  --font-body: 'Inter', Helvetica, Arial, sans-serif;
  --font-display: 'Montserrat', 'Inter', Helvetica, Arial, sans-serif;

  --surface: #faf8f5;
  --surface-raised: #ffffff;
  --surface-sunken: #f3efe9;
  --on-surface: #1f1b17;
  --on-surface-muted: #5f574f;
  --border: #e4ddd3;
  --border-strong: #8a8076;

  --primary: #4f3bc4;
  --primary-hover: #3f2ea3;
  --primary-subtle: #efebff;
  --on-primary: #ffffff;
  --on-primary-subtle: #3a2b93;

  --success: #1f7a3a; --success-subtle: #e6f4ea;
  --warning: #855400; --warning-subtle: #fcf1d9;
  --danger: #b3261e; --danger-subtle: #fbe9e7;
  --info: #1f5fa6; --info-subtle: #e6f0fb;

  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px;
  --shadow-pop: 0 10px 30px -12px rgb(31 27 23 / 0.28), 0 2px 6px -2px rgb(31 27 23 / 0.12);
  --shadow-card: 0 1px 2px rgb(31 27 23 / 0.05);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --rail: 236px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--surface); color: var(--on-surface);
  font: 400 14.5px/1.55 var(--font-body); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--primary-subtle); color: var(--on-primary-subtle); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
a { color: var(--primary); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; line-height: 1.2; }
h2 { font-size: 17px; font-weight: 600; line-height: 1.3; }
h3 { font-size: 14.5px; font-weight: 600; font-family: var(--font-body); letter-spacing: 0; }
p { margin: 0; }
.muted { color: var(--on-surface-muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex: none; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface-raised); color: var(--on-surface);
  font: 500 14px/1 var(--font-body); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background 140ms var(--ease-out), border-color 140ms, transform 80ms;
}
.btn:hover { background: var(--surface-sunken); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--on-surface-muted); }
.btn.ghost:hover { background: var(--surface-sunken); color: var(--on-surface); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, white); }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn[aria-busy='true'] { opacity: 0.7; pointer-events: none; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.icon-btn { min-height: 38px; width: 38px; padding: 0; }

/* ---------- pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500; line-height: 1.35; white-space: nowrap;
  background: var(--surface-sunken); color: var(--on-surface-muted);
}
.pill.success { background: var(--success-subtle); color: var(--success); }
.pill.warning { background: var(--warning-subtle); color: var(--warning); }
.pill.danger { background: var(--danger-subtle); color: var(--danger); }
.pill.info { background: var(--info-subtle); color: var(--info); }
.pill.accent { background: var(--primary-subtle); color: var(--on-primary-subtle); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100dvh; }
.rail {
  position: sticky; top: 0; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column;
  border-right: 1px solid var(--border); background: var(--surface-raised); padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary); font: 700 15px/1 var(--font-display);
}
.brand-name { font: 600 14.5px/1.25 var(--font-display); overflow-wrap: anywhere; }
.brand-sub { font-size: 12px; color: var(--on-surface-muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--on-surface-muted); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: var(--surface-sunken); color: var(--on-surface); }
.nav a[aria-current='page'] { background: var(--primary-subtle); color: var(--on-primary-subtle); }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--on-primary-subtle); background: var(--primary-subtle); border-radius: 999px; padding: 1px 7px; }
.nav a[aria-current='page'] .count { background: var(--surface-raised); }
.rail-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; min-width: 0; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--surface-sunken); color: var(--on-surface); font: 600 12.5px/1 var(--font-body);
}
.avatar.lg { width: 42px; height: 42px; font-size: 14px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 10px 28px; min-height: 56px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--border);
}
.topbar .menu-btn { display: none; }
.demo-note { font-size: 12.5px; color: var(--on-surface-muted); }
.page { padding: 26px 28px 64px; max-width: 1240px; width: 100%; }
.page.entering { animation: enter 260ms var(--ease-out); }
@keyframes enter { from { opacity: 0.001; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .page.entering, .toast, .persona { animation: none; transition: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .sub { margin-top: 6px; color: var(--on-surface-muted); max-width: 70ch; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--on-surface-muted); text-decoration: none; font-size: 13.5px; margin-bottom: 10px; }
.back:hover { color: var(--on-surface); }

/* ---------- surfaces ---------- */
.panel { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: clip; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.panel-body { padding: 16px 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.section + .section, .section + .grid-2, .section + .grid-3, .grid-2 + .section, .grid-3 + .section, .grid-2 + .grid-2 { margin-top: 22px; }
.grid-2 > .section, .grid-3 > .section { margin-top: 0; }

/* Monday view columns: lists, not metric tiles */
.column-list { list-style: none; margin: 0; padding: 0; }
.column-list li { padding: 12px 18px; border-top: 1px solid var(--border); }
.column-list li:first-child { border-top: 0; }
.column-list a { color: inherit; text-decoration: none; display: block; }
.column-list a:hover .title { color: var(--primary); }
.column-list .title { font-weight: 550; }
.column-list .spread { flex-wrap: nowrap; align-items: flex-start; }
.column-list .spread > .dot { margin-top: 7px; }
.column-list .spread > .pill { flex: none; }
.column-total { font: 600 13px/1 var(--font-body); color: var(--on-surface-muted); }

/* ---------- tables ---------- */
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 12.5px; font-weight: 600; color: var(--on-surface-muted); background: var(--surface-sunken); white-space: nowrap; position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
tr[data-row] { cursor: pointer; }
tr[data-row]:hover td { background: color-mix(in srgb, var(--primary-subtle) 45%, white); }
td .title { font-weight: 550; }
td .sub, .cell-sub { font-size: 13px; color: var(--on-surface-muted); }
.lowest { background: var(--success-subtle); color: var(--success); font-weight: 600; }
td.lowest { background: var(--success-subtle); }

/* ---------- stage track ---------- */
.stages { display: flex; gap: 4px; margin-top: 4px; }
.stages .s { flex: 1 1 0; min-width: 0; }
.stages .bar { height: 6px; border-radius: 3px; background: var(--border); }
.stages .s.done .bar { background: color-mix(in srgb, var(--primary) 55%, white); }
.stages .s.now .bar { background: var(--primary); }
.stages .lbl { font-size: 11.5px; color: var(--on-surface-muted); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stages .s.now .lbl { color: var(--on-surface); font-weight: 600; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-sunken); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 3px; transition: width 400ms var(--ease-out); }
.progress.warn > span { background: #c28a1a; }
.progress.done > span { background: var(--success); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--on-surface-muted); text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--on-surface); }
.tabs a[aria-current='page'] { color: var(--on-surface); border-color: var(--primary); }

/* ---------- facts ---------- */
/* Cells grow to fill each row; the outer edges tuck under the panel's clipped border. */
.facts-wrap { overflow: hidden; border-radius: inherit; }
.facts { display: flex; flex-wrap: wrap; margin: 0 -1px -1px 0; }
.fact { flex: 1 1 160px; padding: 14px 18px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.fact dt { font-size: 12.5px; color: var(--on-surface-muted); }
.fact dd { margin: 4px 0 0; font-weight: 600; font-size: 15px; }

/* ---------- timeline ---------- */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.tl li:first-child { border-top: 0; }
.tl .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--on-surface-muted); }
.tl .who { color: var(--on-surface); font-weight: 600; }
.tl .text { margin-top: 4px; overflow-wrap: anywhere; }
.tl .reactions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.flag-note { margin-top: 8px; font-size: 13px; background: var(--warning-subtle); color: var(--warning); padding: 8px 10px; border-radius: var(--radius-sm); }
.system-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-sunken); color: var(--on-surface-muted); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-size: 13px; font-weight: 600; }
.field .hint { font-size: 12.5px; color: var(--on-surface-muted); }
input[type='text'], input[type='number'], input[type='tel'], textarea {
  font: inherit; color: inherit; width: 100%; min-height: 40px; padding: 9px 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-raised);
}
textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #6a6057; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
input:disabled, textarea:disabled { background: var(--surface-sunken); color: var(--on-surface-muted); cursor: not-allowed; }
input[aria-invalid='true'], textarea[aria-invalid='true'] { border-color: var(--danger); }
.error-text { font-size: 13px; color: var(--danger); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface-raised); cursor: pointer; font: 500 13.5px/1 var(--font-body); color: var(--on-surface);
}
.chip[aria-pressed='true'], .chip[aria-checked='true'] { background: var(--primary-subtle); border-color: var(--primary); color: var(--on-primary-subtle); }
.composer { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; background: var(--surface-raised); }

/* ---------- callouts and states ---------- */
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-sunken); }
.callout.warning { background: var(--warning-subtle); color: var(--warning); }
.callout.danger { background: var(--danger-subtle); color: var(--danger); }
.callout.success { background: var(--success-subtle); color: var(--success); }
.callout.info { background: var(--info-subtle); color: var(--info); }
.callout .ic { margin-top: 2px; }
.state { text-align: center; padding: 56px 20px; max-width: 460px; margin: 0 auto; }
.state .ic-wrap { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; background: var(--surface-sunken); color: var(--on-surface-muted); }
.state h2 { margin-bottom: 8px; }
.state p { color: var(--on-surface-muted); margin-bottom: 18px; }

/* ---------- decisions and comparison ---------- */
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.option { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; background: var(--surface-raised); display: flex; flex-direction: column; gap: 10px; }
.option.chosen { border: 2px solid var(--primary); padding: 13px; }
.swatch { height: 104px; border-radius: var(--radius-sm); position: relative; overflow: hidden; }
.swatch::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgb(255 255 255 / 0.09) 0 2px, transparent 2px 9px); }

/* ---------- lead board ---------- */
/* More stages sit to the right: the fade says so, and the end padding keeps the last column clear of it. */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 14px; overflow-x: auto; padding: 0 48px 8px 0; mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.board-col { background: var(--surface-sunken); border-radius: var(--radius-lg); padding: 10px; min-height: 200px; }
.board-col h3 { display: flex; justify-content: space-between; padding: 4px 6px 10px; font-size: 13.5px; }
.lead-card { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; }
.lead-card + .lead-card { margin-top: 8px; }

/* ---------- cash chart ---------- */
.cash { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; align-items: end; height: 170px; padding: 0 2px; }
.cash .col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.cash .bar { border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--primary) 70%, white); min-height: 4px; }
.cash .bar.crunch { background: var(--danger); }
.cash .val { font-size: 11.5px; text-align: center; color: var(--on-surface-muted); white-space: nowrap; }
.cash-labels { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; margin-top: 8px; font-size: 11.5px; color: var(--on-surface-muted); text-align: center; }

/* ---------- toast ---------- */
.toasts { position: fixed; bottom: 18px; right: 18px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 36px)); }
.toast { background: var(--on-surface); color: #fff; padding: 12px 14px; border-radius: var(--radius-md); box-shadow: var(--shadow-pop); display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; animation: toast 280ms var(--ease-out); }
@keyframes toast { from { opacity: 0.001; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- sign in ---------- */
.signin { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100dvh; }
.signin-brand { background: var(--primary); color: var(--on-primary); padding: 48px clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.signin-brand::before {
  content: ''; position: absolute; inset: 0; opacity: 0.16; pointer-events: none;
  background-image: linear-gradient(rgb(255 255 255 / 0.55) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 0.55) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: linear-gradient(160deg, black 10%, transparent 75%);
}
.signin-brand > * { position: relative; }
.signin-brand h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; max-width: 14ch; letter-spacing: -0.02em; }
.signin-brand p { max-width: 42ch; opacity: 0.92; font-size: 15.5px; }
.signin-brand .brand-mark { background: #fff; color: var(--primary); }
.signin-list { padding: 48px clamp(20px, 5vw, 64px); max-width: 720px; width: 100%; }
.persona-group { margin-top: 26px; }
.persona-group h2 { font-size: 13px; font-family: var(--font-body); font-weight: 600; color: var(--on-surface-muted); margin-bottom: 8px; }
.persona {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; margin-top: 8px; text-align: left;
  background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer; font: inherit; color: inherit;
  transition: border-color 140ms, box-shadow 140ms, transform 140ms var(--ease-out);
}
.persona:hover { border-color: var(--primary); box-shadow: var(--shadow-pop); transform: translateY(-1px); }
.persona .who { font-weight: 600; }
.persona .role { font-size: 13px; color: var(--on-surface-muted); }
.persona .ic { margin-left: auto; color: var(--on-surface-muted); }

/* ---------- portal (client) ---------- */
.portal { max-width: 760px; margin: 0 auto; padding: 22px 20px 72px; }
.portal-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.portal-top .inner { max-width: 760px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 12px; }
.portal-nav { display: flex; gap: 2px; overflow-x: auto; max-width: 760px; margin: 0 auto; padding: 0 12px; }
.portal-nav a { padding: 10px 12px; text-decoration: none; color: var(--on-surface-muted); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.portal-nav a[aria-current='page'] { color: var(--on-surface); border-color: var(--primary); }
.decision { padding: 18px; }
.decision + .decision { border-top: 1px solid var(--border); }
.photo { aspect-ratio: 4 / 3; border-radius: var(--radius-sm); display: flex; align-items: flex-end; padding: 10px; font-size: 12.5px; color: var(--on-surface); position: relative; overflow: hidden; }
.photo svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.photo span { position: relative; background: rgb(255 255 255 / 0.9); padding: 3px 7px; border-radius: 4px; }
.photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* ---------- site app (phone) ---------- */
.site-stage { min-height: 100dvh; display: grid; place-items: start center; padding: 28px 16px; background: var(--surface-sunken); }
.phone { width: 100%; max-width: 410px; background: var(--surface); border-radius: 30px; border: 1px solid var(--border); box-shadow: var(--shadow-pop); overflow: hidden; }
.phone-top { padding: 16px 18px 12px; background: var(--surface-raised); border-bottom: 1px solid var(--border); }
.phone-body { padding: 16px 18px 24px; }
.bi { display: block; font-size: 12.5px; color: var(--on-surface-muted); font-weight: 400; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.stepper:first-of-type { border-top: 0; }
.stepper .ctrl { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; }
.stepper output { min-width: 22px; text-align: center; font-weight: 700; font-size: 17px; }
.tick { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-raised); cursor: pointer; min-height: 52px; width: 100%; text-align: left; font: inherit; color: inherit; }
.tick + .tick { margin-top: 8px; }
.tick[aria-checked='true'] { border-color: var(--primary); background: var(--primary-subtle); }
.tick .box { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; flex: none; background: var(--surface-raised); }
.tick .box .ic { opacity: 0; transition: opacity 120ms; }
.tick[aria-checked='true'] .box { background: var(--primary); border-color: var(--primary); color: #fff; }
.tick[aria-checked='true'] .box .ic { opacity: 1; }
.site-section + .site-section { margin-top: 20px; }
.site-section h2 { font-size: 15px; margin-bottom: 8px; }
.big-btn { width: 100%; min-height: 52px; font-size: 16px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; background: none; border: 0; padding: 0; color: inherit; font-family: inherit; }
.switch .track { width: 40px; height: 24px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background 160ms; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 200ms var(--ease-out); }
.switch[aria-checked='true'] .track { background: var(--danger); }
.switch[aria-checked='true'] .track::after { transform: translateX(16px); }

/* ---------- mobile nav overlay ---------- */
.scrim { display: none; }

@media (max-width: 1080px) {
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 50; transform: translateX(-102%); transition: transform 240ms var(--ease-out); box-shadow: var(--shadow-pop); }
  .shell.nav-open .rail { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgb(31 27 23 / 0.35); }
  .topbar { padding: 10px 16px; }
  .topbar .menu-btn { display: inline-flex; }
  .page { padding: 20px 16px 56px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .signin { grid-template-columns: minmax(0, 1fr); }
  .signin-brand { padding: 32px 20px; gap: 18px; }
  .signin-brand h1 { font-size: 26px; max-width: none; }
  .signin-brand p { font-size: 14.5px; }
  .signin-list { padding: 24px 16px 48px; }
  .options { grid-template-columns: minmax(0, 1fr); }
  .demo-note { display: none; }
}
@media (max-width: 560px) {
  .stages .lbl { display: none; }
  .hide-sm { display: none; }
  .cash .val { display: none; }
  .phone { border-radius: 0; border: 0; box-shadow: none; }
  .site-stage { padding: 0; }
}
