/* SAS Hub visual layer, September 2026 revamp.
   Loaded after hub.css. Everything here is look and layout only: no behaviour.
   To switch the revamp off, remove this file's <link> from app.html, index.html and admin.html
   (or check out the git tag `pre-revamp`). Tokens are in tokens.css. */

/* ── Base ─────────────────────────────────────────────────────── */
body { color: var(--ink-soft); background: var(--paper); font-size: var(--text-base); }
h1, h2, h3, .h-section { color: var(--ink); }
h1 { font-size: var(--display-lg); line-height: 1.04; letter-spacing: var(--track-display); font-weight: 500; font-variation-settings: 'opsz' 144; margin-bottom: 10px; }
h2, .h-section { font-size: var(--display-sm); letter-spacing: -0.012em; font-variation-settings: 'opsz' 72; margin-bottom: var(--s4); }
h3 { font-size: 15px; font-weight: 600; letter-spacing: 0; }
a { color: var(--ink); text-decoration-color: var(--line-strong); }
a:hover { text-decoration-color: var(--ink); }
.muted { color: var(--ink-muted); }
.mono, .num, .row-val, .section-val { font-family: var(--sans); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
.eyebrow { font-size: 11px; letter-spacing: var(--track-eyebrow); color: var(--ink-muted); font-weight: 500; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.rail :focus-visible, .summary :focus-visible, .next-move :focus-visible { outline-color: var(--brass-bright); }
::selection { background: var(--brass-tint); color: var(--ink); }

/* ── Three columns: sidebar | main | right rail ───────────────── */
.shell { margin-left: var(--rail-w); display: grid; grid-template-columns: minmax(0, var(--main-max)); justify-content: center; gap: var(--s7); padding: var(--s7) var(--s7) var(--s8); }
.main { margin: 0; padding: 0; max-width: none; min-width: 0; }
.aside { display: grid; gap: var(--s4); align-content: start; min-width: 0; }
@media (min-width: 1280px) {
  .shell { grid-template-columns: minmax(0, var(--main-max)) var(--aside-w); }
  .aside { position: sticky; top: var(--s7); max-height: calc(100vh - var(--s8)); overflow-y: auto; scrollbar-width: none; }
  .aside::-webkit-scrollbar { display: none; }
}
@media (min-width: 901px) and (max-width: 1279px) { .aside { grid-template-columns: repeat(2, minmax(0, 1fr)); } .aside > .aside-wide { grid-column: 1 / -1; } }
.page-head { margin: 0 0 var(--s6); max-width: 640px; }
.page-head p { font-size: 17px; line-height: 1.5; color: var(--ink-muted); }
.page-where { margin-bottom: var(--s3); color: var(--brass); }

/* ── Sidebar ──────────────────────────────────────────────────── */
.rail { width: var(--rail-w); background: var(--ink); border: 0; padding: var(--s5) var(--s3) var(--s3); color: rgba(255, 255, 255, .78); overflow: visible; }
.rail-brand { display: block; padding: var(--s2) var(--s3) var(--s5); border: 0; margin: 0; }
.brand-mark { display: block; width: 158px; }
.brand-mark .logo { display: block; width: 100%; height: auto; }
.brand-mark-sm { width: 74px; }
.brand-mark-sm .logo > text { display: none; }  /* the strapline only: the S letters sit inside a <g> */
.rail-scroll { flex: 1; overflow-y: auto; scrollbar-width: none; margin: 0 calc(var(--s3) * -1); padding: 0 var(--s3); }
.rail-scroll::-webkit-scrollbar { display: none; }
.rail-group { margin: 0 0 var(--s2); }
.rail-heading { font-size: 10.5px; letter-spacing: var(--track-eyebrow); color: rgba(255, 255, 255, .42); padding: var(--s4) var(--s3) 6px; }
.rail .nav-item { color: rgba(255, 255, 255, .74); font-size: 14.5px; min-height: 40px; padding: 8px var(--s3); border-radius: var(--radius-sm); transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.rail .nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.rail .nav-item.active { background: rgba(255, 255, 255, .11); color: #fff; font-weight: 500; box-shadow: inset 2px 0 0 var(--brass-bright); }
.rail .nav-ico { color: rgba(255, 255, 255, .5); width: 18px; height: 18px; }
.rail .nav-item:hover .nav-ico, .rail .nav-item.active .nav-ico { color: #fff; }
/* The two proprietary methods carry a small brass marker */
.nav-item[data-method]::after { content: 'Method'; margin-left: auto; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--brass-bright); border: 1px solid rgba(176, 141, 87, .5); border-radius: var(--radius-pill); padding: 2px 7px; }
.more-sheet .nav-item[data-method]::after { color: var(--brass); border-color: var(--brass-bright); }

.member { position: relative; margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid rgba(255, 255, 255, .1); }
.member-card { display: flex; align-items: center; gap: var(--s3); width: 100%; padding: var(--s2); border: 0; border-radius: var(--radius-sm); background: none; color: #fff; text-align: left; cursor: pointer; transition: background var(--fast) var(--ease); }
.member-card:hover, .member-card[aria-expanded="true"] { background: rgba(255, 255, 255, .07); }
.avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brass-bright); color: var(--ink); font-weight: 600; font-size: 14px; letter-spacing: .02em; }
.member-text { min-width: 0; flex: 1; display: grid; }
.member-name { font-weight: 500; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-sub { font-size: 12px; color: rgba(255, 255, 255, .55); }
.member-caret { flex: none; color: rgba(255, 255, 255, .5); transition: transform var(--fast) var(--ease); }
.member-card[aria-expanded="true"] .member-caret { transform: rotate(180deg); }
.member-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow-lift); padding: 6px; z-index: 40; }
.member-menu .member-email { font-size: 12.5px; color: var(--ink-muted); padding: 8px 10px 6px; overflow: hidden; text-overflow: ellipsis; }
.rail .member-menu .nav-item { color: var(--ink-soft); min-height: 38px; }
.rail .member-menu .nav-item:hover { background: var(--paper); color: var(--ink); }
.rail .member-menu .nav-ico { color: var(--ink-muted); }
.rail .member-menu .nav-item.active { background: var(--paper); color: var(--ink); box-shadow: none; }
.rail .member-menu .nav-item.active .nav-ico { color: var(--ink); }

/* ── Cards ────────────────────────────────────────────────────── */
.panel { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: var(--s5); margin-bottom: var(--s4); background: var(--surface); }
.panel-tight { padding: var(--s1) var(--s5); }
/* The old tinted cards: white, hairline, no coloured edge, no dot before the heading */
.tint, .tint-slate, .tint-blue, .tint-sand, .tint-green, .tint-violet, .tint-stone { background: var(--surface); border: 1px solid var(--line); border-left-width: 1px; }
.tint .h-section, .tint-blue .h-section, .tint-sand .h-section, .tint-green .h-section, .tint-violet .h-section, .tint-stone .h-section { color: var(--ink); display: block; }
.tint .h-section::before, .tint h3::before { content: none; display: none; }
.tint h3 { display: block; }
.tint input, .tint select, .tint textarea { background: var(--surface); }
.tint .tbl { background: transparent; border-radius: 0; }
.step-num, .tint-blue .step-num, .tint-sand .step-num, .tint-violet .step-num { background: var(--ink); }
.notice { border-radius: var(--radius-sm); border-color: var(--line); background: var(--paper); }
.recorder { background: var(--paper); border-color: var(--line); }
.explainer { background: var(--paper); border-color: var(--line); }
.clickable { transition: background var(--fast) var(--ease); }

/* ── Buttons: primary, secondary, ghost ───────────────────────── */
.btn { border-radius: var(--radius-sm); font-weight: 500; letter-spacing: .005em; transition: transform var(--fast) var(--ease), background var(--fast) var(--ease), box-shadow var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #1B2740; border-color: #1B2740; transform: translateY(-1px); box-shadow: 0 10px 22px -14px rgba(14, 22, 36, .7); }
.btn-secondary { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover:not(:disabled) { border-color: var(--ink); background: var(--surface); }
.btn-ghost { color: var(--ink); }
.btn:active:not(:disabled) { transform: translateY(0); }
/* Size to content on desktop; full width only on phones and inside sheets */
@media (min-width: 761px) {
  .main .btn-block, .aside .btn-block { width: auto; min-width: 200px; padding-left: var(--s6); padding-right: var(--s6); }
  .main .field > .btn-block { width: 100%; min-width: 0; }
}
.hero .btn-primary, .summary .btn-primary, .next-move .btn-primary { background: #fff; border-color: #fff; color: var(--ink); }
.hero .btn-primary:hover:not(:disabled), .next-move .btn-primary:hover:not(:disabled) { background: var(--paper); border-color: var(--paper); }

/* ── Inputs ───────────────────────────────────────────────────── */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=date], input[type=tel], select, textarea, .input {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); box-shadow: none; transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
input:hover, select:hover, textarea:hover { border-color: #B5AE9E; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(14, 22, 36, .1); }
.field > span { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.choice { border-radius: var(--radius-sm); border-color: var(--line-strong); transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease), color var(--fast) var(--ease); }
.choice:hover { border-color: var(--ink); }
.choice.selected { background: var(--ink); border-color: var(--ink); color: #fff; }
input[type=range] { accent-color: var(--ink); }
input[type=checkbox] { accent-color: var(--ink); }

/* ── Tags, chips, tables, rows ────────────────────────────────── */
.tag { border-radius: var(--radius-pill); font-weight: 500; }
.tag-brand { background: var(--paper-deep); color: var(--ink); border-color: transparent; }
.tag-good { background: var(--positive-tint); color: var(--positive); border-color: transparent; }
.tag-caution { background: var(--caution-tint); color: var(--caution); border-color: transparent; }
.tag-risk { background: var(--risk-tint); color: var(--risk); border-color: transparent; }
.tbl th { font-family: var(--sans); font-size: 11px; letter-spacing: var(--track-eyebrow); color: var(--ink-muted); font-weight: 500; }
.tbl tr.current td { background: var(--brass-tint); }
.row-title { color: var(--ink); }
.progress { background: var(--paper-deep); height: 6px; border-radius: var(--radius-pill); overflow: hidden; }
.progress > span { background: var(--ink); border-radius: var(--radius-pill); transition: width var(--slow) var(--ease); }
.progress-good > span { background: var(--positive); }

/* Segmented control: pipeline stages, assignment modules */
.chips { gap: 0; padding: 4px; margin-bottom: var(--s5); background: var(--paper-deep); border-radius: var(--radius-pill); display: inline-flex; max-width: 100%; }
.chip { border: 0; background: transparent; min-height: 36px; padding: 6px 16px; font-size: 13.5px; color: var(--ink-muted); transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.chip:hover { color: var(--ink); }
.chip.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(14, 22, 36, .12); }
.chip.active .chip-n { color: var(--ink-muted); }

/* ── Verdict language (the strongest thing in the product) ────── */
.verdict { border: 1px solid var(--line); border-top: 0; border-radius: var(--radius); background: var(--surface); padding: var(--s6); box-shadow: var(--shadow-card); position: relative; overflow: hidden; }
.verdict::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--line-strong); }
.verdict-good, .verdict-caution, .verdict-risk { background: var(--surface); }
.verdict-good::before { background: var(--positive); } .verdict-caution::before { background: var(--caution); } .verdict-risk::before { background: var(--risk); }
.verdict-headline { font-size: var(--display-lg); letter-spacing: var(--track-display); font-variation-settings: 'opsz' 144; }
.verdict-fig { font-size: 40px; letter-spacing: var(--track-display); color: var(--ink); }
.verdict p { color: var(--ink-soft); font-size: 16px; max-width: 60ch; }
.summary, .hero { background: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-lift); border-top: 0; }
.summary-good .summary-headline { color: #9BD3B4; } .summary-caution .summary-headline { color: #E8C680; } .summary-risk .summary-headline { color: #EBA3A3; }
.summary-num { letter-spacing: var(--track-display); }
.summary-num.neg { color: #EBA3A3; }

/* ── Motion ───────────────────────────────────────────────────── */
.panel.clickable-card, .stat, .deal-card { transition: transform var(--slow) var(--ease), box-shadow var(--slow) var(--ease), border-color var(--slow) var(--ease); }
.stat:hover, .deal-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page.active > * { animation: rise var(--slow) var(--ease) both; }
.page.active > *:nth-child(2) { animation-delay: 40ms; } .page.active > *:nth-child(3) { animation-delay: 80ms; }
@keyframes brass-pop { 0% { transform: scale(.6); opacity: 0; } 40% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes brass-ray { from { opacity: .9; transform: translate(-50%, -50%) rotate(var(--a)) translateY(-26px) scaleY(.4); } to { opacity: 0; transform: translate(-50%, -50%) rotate(var(--a)) translateY(-70px) scaleY(1); } }
.celebrate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(14, 22, 36, .42); animation: rise var(--fast) var(--ease) both; pointer-events: none; }
.celebrate-card { position: relative; background: var(--ink); color: #fff; border-radius: var(--radius); padding: var(--s6) var(--s7); text-align: center; box-shadow: var(--shadow-lift); animation: brass-pop 420ms var(--ease) both; }
.celebrate-card .eyebrow { color: var(--brass-bright); }
.celebrate-card strong { display: block; font-family: var(--serif); font-weight: 500; font-size: var(--display-md); letter-spacing: var(--track-display); margin-top: 6px; }
.celebrate-card i { position: absolute; left: 50%; top: 50%; width: 2px; height: 22px; border-radius: 2px; background: var(--brass-bright); animation: brass-ray 700ms var(--ease) 120ms both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; } }

/* ── Phone ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .shell { margin-left: 0; display: block; padding: var(--s4) 18px calc(var(--tabbar-h) + var(--s6) + env(safe-area-inset-bottom)); }
  .aside { margin-top: var(--s5); }
  .topbar { background: rgba(247, 245, 240, .94); border-bottom-color: var(--line); margin: calc(var(--s4) * -1) -18px var(--s5); padding: 10px 18px; }
  h1 { font-size: var(--display-md); }
  .verdict-headline { font-size: var(--display-md); }
  .tab.active { color: var(--ink); }
  .tab-primary .tab-glyph { background: var(--ink); border-radius: 12px; }
  .more-sheet .rail-heading { color: var(--ink-muted); padding: var(--s3) var(--s3) 2px; }
  .chips { display: flex; border-radius: var(--radius); }
}

/* ── Dashboard ────────────────────────────────────────────────── */
.link-btn { border: 0; background: none; padding: 0; margin-left: 8px; font: inherit; font-size: 14px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { text-decoration-color: var(--ink); }
#dash-sub { font-size: 16px; color: var(--ink-muted); }

.next-move { background: var(--ink); color: #fff; border-radius: var(--radius); padding: var(--s6) var(--s6) var(--s5); margin-bottom: var(--s4); box-shadow: var(--shadow-lift); position: relative; overflow: hidden; }
.next-move::after { content: ''; position: absolute; left: var(--s6); top: 0; width: 44px; height: 3px; background: var(--brass-bright); border-radius: 0 0 3px 3px; }
.next-move .eyebrow { color: var(--brass-bright); }
.next-move h2 { color: #fff; font-size: var(--display-md); line-height: 1.08; letter-spacing: var(--track-display); margin: var(--s2) 0 var(--s3); font-variation-settings: 'opsz' 144; max-width: 18ch; }
.next-move p { color: rgba(255, 255, 255, .74); max-width: 56ch; margin: 0 0 var(--s5); font-size: 16px; }
.next-move-foot { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.next-move-time { font-size: 13px; color: rgba(255, 255, 255, .58); }
.next-move-time::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--brass-bright); margin-right: 8px; vertical-align: middle; }

.section-head .h-section { margin: 0; }
.journey .section-head { margin-bottom: var(--s5); }
.track { list-style: none; margin: 0 0 var(--s5); padding: 0; display: grid; grid-template-columns: repeat(12, 1fr); position: relative; }
.track::before { content: ''; position: absolute; left: calc(100% / 24); right: calc(100% / 24); top: 50%; height: 2px; background: var(--line); transform: translateY(-50%); }
.track-step { display: grid; place-items: center; position: relative; }
.track-step button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink-muted); font: 500 13px var(--sans); font-variant-numeric: tabular-nums; display: grid; place-items: center; cursor: pointer; position: relative; z-index: 1; transition: transform var(--fast) var(--ease), border-color var(--fast) var(--ease), background var(--fast) var(--ease); }
.track-step button:hover { transform: scale(1.1); border-color: var(--ink); color: var(--ink); }
.track-past button { border-color: var(--ink); color: var(--ink); }
.track-done button { background: var(--brass-bright); border-color: var(--brass-bright); color: var(--ink); }
.track-current button { width: 42px; height: 42px; background: var(--ink); border-color: var(--ink); color: #fff; font-size: 15px; box-shadow: 0 0 0 5px rgba(14, 22, 36, .1); }
.journey-now { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: var(--s5); align-items: center; padding-top: var(--s5); border-top: 1px solid var(--line); }
.journey-title { font-family: var(--serif); font-size: 21px; color: var(--ink); letter-spacing: -0.01em; margin-top: 2px; }
.journey-progress .progress { margin-top: 8px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); margin-bottom: var(--s4); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5) var(--s5) var(--s4); box-shadow: var(--shadow-card); min-width: 0; }
.stat-label { font-size: 12.5px; color: var(--ink-muted); font-weight: 500; }
.stat-num { font-family: var(--serif); font-size: var(--display-lg); line-height: 1.05; letter-spacing: var(--track-display); color: var(--ink); font-variant-numeric: tabular-nums; font-variation-settings: 'opsz' 144; margin: 6px 0 4px; }
.stat-note { font-size: 13px; color: var(--ink-muted); line-height: 1.4; }

.deal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.deal-card { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); width: 100%; text-align: left; padding: var(--s4) var(--s4) var(--s4) var(--s5); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; position: relative; overflow: hidden; font: inherit; color: inherit; }
.deal-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line-strong); }
.verdict-edge-good::before { background: var(--positive); } .verdict-edge-caution::before { background: var(--caution); } .verdict-edge-risk::before { background: var(--risk); }
.deal-main { display: grid; min-width: 0; }
.deal-name { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-sub { font-size: 13px; color: var(--ink-muted); }
.deal-figs { display: flex; align-items: center; gap: var(--s4); flex: none; }
.deal-profit { font-family: var(--serif); font-size: 21px; color: var(--ink); font-variant-numeric: tabular-nums; }
.deal-profit small { font-family: var(--sans); font-size: 12px; color: var(--ink-muted); }
.empty-state { display: grid; justify-items: start; gap: var(--s3); padding: var(--s2) 0; }
.empty-state p { margin: 0; color: var(--ink-muted); max-width: 52ch; }

/* ── Right rail ───────────────────────────────────────────────── */
.aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); box-shadow: var(--shadow-card); min-width: 0; }
.aside-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--s4); }
.aside-head h2 { font-size: 19px; margin: 0; letter-spacing: -0.01em; }
.plan-goal { display: grid; margin-bottom: var(--s3); }
.plan-goal-num { font-family: var(--serif); font-size: var(--display-md); letter-spacing: var(--track-display); color: var(--ink); line-height: 1.05; font-variant-numeric: tabular-nums; }
.plan-goal-label { font-size: 13px; color: var(--ink-muted); }
.progress-brass > span { background: var(--brass-bright); }
.plan-row { display: flex; justify-content: space-between; gap: var(--s4); padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.plan-row > span:first-child { color: var(--ink-muted); flex: none; }
.plan-row > span:last-child { color: var(--ink); text-align: right; font-weight: 500; min-width: 0; }
.coach { display: flex; align-items: center; gap: var(--s3); }
.coach-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--brass-bright); }
.coach-name { font-weight: 600; color: var(--ink); }
.coach-call { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); }
.coach-when { font-family: var(--serif); font-size: 20px; color: var(--ink); margin-top: 4px; letter-spacing: -0.01em; }
.week-calls { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s4); }
.week-num { font-family: var(--serif); font-size: var(--display-md); color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }

/* ── Module bar, tabs and picker ──────────────────────────────── */
.module-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin: 0 0 var(--s4); }
.module-bar-title { font-family: var(--serif); font-size: 22px; color: var(--ink); letter-spacing: -0.01em; }
#as-module-tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
#as-module-tabs::-webkit-scrollbar { display: none; }
#as-module-tabs .chip { min-width: 38px; padding: 6px 10px; flex: none; font-variant-numeric: tabular-nums; }
.chip-current:not(.active) { color: var(--ink); box-shadow: inset 0 -2px 0 var(--brass-bright); border-radius: 0; }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); margin-top: var(--s4); }
.module-pick { display: flex; align-items: center; gap: var(--s3); text-align: left; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font: inherit; color: var(--ink-soft); transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease); }
.module-pick:hover { border-color: var(--ink); }
.module-pick.selected { background: var(--ink); border-color: var(--ink); color: #fff; }
.module-pick-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-deep); color: var(--ink); font-weight: 600; font-size: 13px; }
.module-pick.selected .module-pick-n { background: var(--brass-bright); }
.module-pick-t { font-size: 13.5px; line-height: 1.25; }

@media (max-width: 900px) {
  .next-move { padding: var(--s5); }
  .next-move::after { left: var(--s5); }
  .next-move h2 { font-size: var(--display-sm); }
  .next-move .btn { width: 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .stat { padding: var(--s4); }
  .stat-num { font-size: var(--display-md); }
  .track { grid-template-columns: repeat(6, 1fr); row-gap: var(--s3); }
  .track::before { display: none; }
  .journey-now { grid-template-columns: 1fr; gap: var(--s3); }
  .journey-now .btn { width: 100%; }
  .deal-card { padding-left: var(--s4); }
  .deal-profit small { display: none; }
  .module-grid { grid-template-columns: 1fr; }
}
.rail .nav-item { white-space: nowrap; font-size: 14px; }
.nav-item[data-method]::after { font-size: 9px; padding: 1px 6px; }

/* ── Tool pages ───────────────────────────────────────────────── */
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-brass { color: var(--brass); }
.stage { margin-bottom: var(--s5); }
.stage-head { display: flex; align-items: baseline; gap: 10px; font-family: var(--serif); font-weight: 500; font-size: 20px; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 var(--s3); padding-bottom: var(--s2); border-bottom: 1px solid var(--line); }
.stage-head span { font-family: var(--sans); font-size: 13px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.stage-secured .stage-head { border-bottom-color: var(--brass-bright); }
.stage-empty { font-size: 14px; color: var(--ink-muted); padding: 2px 0 var(--s2); }
.pipeline-cols { display: block; }

/* Designed empty states: a line of explanation, an example, one action */
.empty-designed { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); align-items: center; padding: var(--s6); }
.empty-designed .h-section { margin-bottom: var(--s3); }
.empty-designed p { color: var(--ink-muted); margin-bottom: var(--s5); }
.example { position: relative; display: grid; gap: var(--s2); opacity: .62; filter: grayscale(.35); pointer-events: none; user-select: none; }
.example-tag { justify-self: start; font-size: 10.5px; letter-spacing: var(--track-eyebrow); text-transform: uppercase; font-weight: 600; color: var(--ink-muted); border: 1px dashed var(--line-strong); border-radius: var(--radius-pill); padding: 3px 10px; margin-bottom: var(--s1); background: var(--paper); }
#scorer-example { margin-top: var(--s5); }
#scorer-example .verdict { margin: 0; }

/* Compliance checks as a progress list */
.check-head { display: flex; gap: var(--s3); align-items: flex-start; }
.check-mark { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; }
.check-pass .check-mark { background: var(--positive); border-color: var(--positive); }
.check-pass .check-mark::after { content: ''; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.check-problem .check-mark { background: var(--risk); border-color: var(--risk); }
.check-problem .check-mark::after { content: '!'; color: #fff; font-weight: 700; font-size: 13px; line-height: 1; }
.check-row .choice.selected[data-state="ok"] { background: var(--positive-tint) !important; color: var(--positive) !important; border-color: var(--positive) !important; }
.check-row .choice.selected[data-state="problem"] { background: var(--risk-tint) !important; color: var(--risk) !important; border-color: var(--risk) !important; }
.check-row .choice.selected[data-state="not_checked"] { background: var(--paper-deep); color: var(--ink); border-color: var(--line-strong); }

@media (max-width: 900px) {
  .stats-3 { grid-template-columns: 1fr; }
  .empty-designed { grid-template-columns: 1fr; padding: var(--s5); }
}
@media (min-width: 761px) { .main .inline-actions > .btn, .aside .inline-actions > .btn { flex: 0 0 auto; } }

/* ── Phase 4: focus, keyboard, contrast, phone ────────────────── */
.skip-link { position: absolute; left: var(--s4); top: -60px; z-index: 300; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); transition: top var(--fast) var(--ease); }
.skip-link:focus { top: var(--s4); }
.nav-item:focus-visible, .chip:focus-visible, .track-step button:focus-visible, .deal-card:focus-visible, .module-pick:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rail .nav-item:focus-visible, .member-card:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: -2px; }
details > summary { cursor: pointer; }
details > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
/* AA contrast: secondary text on paper and on white, placeholder text, disabled buttons */
::placeholder { color: #7A8394; opacity: 1; }
.btn:disabled { opacity: 1; background: var(--paper-deep); border-color: var(--paper-deep); color: #6B7280; cursor: not-allowed; transform: none; box-shadow: none; }
.tag { color: var(--ink-soft); }
.row-sub, .stat-note, .deal-sub { color: var(--ink-muted); }

/* Admin page shares the tokens and card language */
body .adm-head { background: var(--ink); color: #fff; border: 0; }
body .adm-head img { background: #fff; border-radius: 8px; padding: 3px 6px; }
body .adm-head .muted, body .adm-head strong { color: #fff; }
body .adm-head .btn-secondary { color: #fff; border-color: rgba(255, 255, 255, .35); }
body .adm-head .btn-secondary:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
body .adm-tab.active { border-bottom-color: var(--brass-bright); color: var(--ink); }

@media (max-width: 900px) {
  .tabbar { background: rgba(255, 255, 255, .96); border-top-color: var(--line); }
  .more-sheet { max-height: 76vh; overflow-y: auto; border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow-sheet); }
  .more-sheet .nav-item { color: var(--ink-soft); min-height: 46px; }
  .more-sheet .nav-item.active { background: var(--paper-deep); color: var(--ink); }
  .more-sheet .nav-item.active .nav-ico { color: var(--ink); }
  .main .btn-primary:not(.btn-sm), .main .btn-block { width: 100%; }
  .main .inline-actions > .btn-primary { flex: 1 1 100%; }
  .page-head p { font-size: 16px; }
  .section-head { flex-wrap: wrap; }
  .aside-card { padding: var(--s4); }
  .verdict { padding: var(--s5); }
  .verdict-fig { font-size: 32px; }
  .deal-figs { gap: var(--s2); flex-direction: column; align-items: flex-end; }
}
@media (max-width: 420px) {
  .shell { padding-left: 14px; padding-right: 14px; }
  .topbar { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  h1 { font-size: 30px; }
  .panel { padding: var(--s4); }
  .next-move { padding: var(--s5) var(--s4); }
}
.summary .progress, .hero .progress, .next-move .progress, .progress.progress-on-dark { background: rgba(255, 255, 255, .16); }
.summary .progress > span, .progress.progress-on-dark > span { background: var(--brass-bright); }
