/* hub.css: Regalis Pro members hub styles, ported from the 17 picked frames (design/picked).
   Tokens from the frames: navy #002950, cream #f6f1e7, gold #fcd981, ink #1a2332.
   Fraunces 600 for headings, Lato 400 and 700 for text, both self-hosted (no font service call).
   Desktop is drawn at 1440 wide, phones at 390; under 900px the sidebar becomes a top bar with a
   labelled Menu button. Numbers on lists come from CSS counters, so removing a gated item renumbers. */

@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/fraunces-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/lato-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/lato-latin-700-normal.woff2') format('woff2'); }

:root {
  --navy: #002950; --navy-2: #0a3a6b; --cream: #f6f1e7; --gold: #fcd981; --gold-deep: #e6b94a;
  --ink: #1a2332; --grey: #525252; --line: #e3dccd; --ring: #b9c3cf; --hover: #fbf6ea; --hilite: #fff8e6;
  --eyebrow: #7a5d14; --white: #ffffff; --side-text: #d9e2ec;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Lato', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.4; }
a { color: var(--navy); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font-family: inherit; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold-deep); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* icons */
.ic { width: 20px; height: 20px; flex: none; }
.ic-sm { width: 16px; height: 16px; }
.ic-xs { width: 14px; height: 14px; }
.ic-lg { width: 22px; height: 22px; }
.ic-tile { width: 18px; height: 18px; }

/* gated parts stay hidden until /api/me has answered; shell.js then removes what the member doesn't have */
.gating [data-gate] { display: none !important; }
.gating [data-greeting] { visibility: hidden; }

/* ---------- app shell ---------- */
.app { display: flex; min-height: 100vh; background: var(--cream); }
.topbar { display: none; }
.side { flex: 0 0 248px; width: 248px; background: var(--navy); display: flex; flex-direction: column; gap: 28px;
  padding: 24px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; align-self: flex-start; }
.side-head { display: flex; align-items: center; padding: 0 10px; }
.side-head .btn-menu { display: none; }
.side-logo { display: flex; align-items: center; }
.side-logo img { height: 30px; width: auto; }
.side-list { display: flex; flex-direction: column; gap: 4px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 46px; padding: 0 14px; border: 0; border-radius: 10px;
  background: transparent; color: #ffffff; font-size: 15px; font-weight: 400; text-align: left; text-decoration: none; cursor: pointer; }
.nav-item:hover { background: rgba(255, 255, 255, 0.10); }
.nav-item.is-active { background: var(--gold); color: var(--navy); font-weight: 700; }
.nav-item.is-active:hover { background: var(--gold); }
.nav-item--quiet { color: var(--side-text); font-size: 14px; }
.nav-item .ic { width: 20px; height: 20px; }
.nav-item--quiet .ic { width: 18px; height: 18px; }

.btn-menu { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border: 0; border-radius: 10px;
  background: var(--gold); color: var(--navy); font-weight: 700; font-size: 15px; cursor: pointer; }
.btn-menu:hover { filter: brightness(1.06); }

.main { flex: 1 1 0; min-width: 0; padding: 48px 48px 56px; display: flex; flex-direction: column; gap: 28px; }
.main--learn { padding: 40px 40px 64px; }

.h1 { font-family: var(--serif); font-weight: 600; font-size: 40px; line-height: 1.1; color: var(--navy); }
.lead { font-size: 18px; line-height: 1.55; color: var(--ink); max-width: 780px; }
.muted { color: var(--grey); }
.banner-error { background: #ffffff; border: 2px solid #8a1c1c; border-radius: 10px; padding: 12px 16px; font-size: 15px; line-height: 1.5; color: #8a1c1c; max-width: 780px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--eyebrow); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 2px solid var(--navy);
  border-radius: 10px; background: var(--navy); color: #ffffff; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.12); }
.btn-out { background: #ffffff; color: var(--navy); }
.btn-out:hover { filter: none; background: #efe7d6; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; filter: none; }
.btn-link { background: none; border: 0; padding: 0 4px; min-height: 44px; color: var(--navy); font-weight: 700; font-size: 15px; text-decoration: underline; cursor: pointer; }

/* ---------- cards ---------- */
.card { background: #ffffff; border: 2px solid var(--navy); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.card-link { text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
.card-link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 41, 80, 0.16); }
.card-head { display: flex; align-items: center; gap: 12px; }
.tile { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; background: var(--navy); color: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; }
.tile .ic { width: 22px; height: 22px; }
.card-title { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--navy); }
.stats { display: flex; gap: 32px; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--serif); font-size: 40px; line-height: 1; color: var(--navy); min-height: 40px; }
.stat-label { font-size: 13px; color: var(--grey); }
.card-note { font-size: 15px; line-height: 1.45; color: var(--grey); }
.card-note strong, .card-strong { font-size: 15px; font-weight: 700; color: var(--navy); }
.card-cta { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: auto; height: 46px; border-radius: 10px;
  background: var(--navy); color: #ffffff; font-weight: 700; font-size: 15px; }
.card-cta .ic { width: 16px; height: 16px; stroke-width: 2.5; }

.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 1000px; }
.bar { grid-column: 1 / -1; background: var(--navy); border-radius: 16px; padding: 24px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
.bar:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 41, 80, 0.16); }
.bar .tile { background: var(--gold); color: var(--navy); }
.bar .card-title { color: #ffffff; }
.bar .bar-cta { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 10px;
  background: var(--gold); color: var(--navy); font-weight: 700; font-size: 15px; }
.bar .bar-cta .ic { width: 16px; height: 16px; stroke-width: 2.5; }

.segs { display: flex; gap: 4px; }
.seg { flex: 1; height: 8px; border-radius: 4px; background: var(--line); }
.seg.is-done { background: var(--navy); }
.seg.is-current { background: var(--gold-deep); }
.step-line { font-size: 15px; font-weight: 700; color: var(--navy); }

/* ---------- panels (navy header bar over a white body) ---------- */
.panel { background: #ffffff; border: 2px solid var(--navy); border-radius: 16px; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 24px; background: var(--navy); }
.panel-head h2 { font-family: var(--serif); font-weight: 600; font-size: 20px; color: #ffffff; }
.panel-count { font-size: 14px; font-weight: 700; color: var(--gold); white-space: nowrap; }

.progress { display: flex; align-items: center; gap: 14px; }
.progress-text { font-size: 14px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.progress .segs { flex: 1; max-width: 260px; }

/* ---------- Learning home ---------- */
.stack { display: flex; flex-direction: column; gap: 8px; }
.panels { align-self: stretch; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.stat-tiles { display: flex; gap: 12px; }
.stat-tile { background: #ffffff; border: 2px solid var(--navy); border-radius: 12px; padding: 10px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.stat-tile dt { font-size: 13px; color: var(--grey); }
.stat-tile dd { font-family: var(--serif); font-weight: 600; font-size: 24px; color: var(--navy); min-height: 29px; }

.learn-grid { display: grid; grid-template-columns: 500px minmax(0, 1fr); gap: 24px; align-items: start; }
.step-list { background: #ffffff; border: 2px solid var(--navy); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.step-row { display: flex; align-items: center; gap: 14px; text-decoration: none; padding: 14px 18px; min-height: 68px; border-bottom: 1px solid var(--line); }
.step-row:last-child { border-bottom: 0; }
.step-row:hover { background: var(--hover); }
.step-row[aria-current="true"], .step-row[aria-current="page"] { background: var(--hilite); box-shadow: inset 4px 0 0 var(--gold-deep); }
.step-dot { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ring); display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--grey); }
.step-dot .ic { width: 16px; height: 16px; stroke-width: 3; display: none; }
.step-row.is-done .step-dot { background: var(--navy); border-color: var(--navy); color: var(--gold); }
.step-row.is-done .step-dot .ic { display: block; }
.step-row.is-done .step-dot span { display: none; }
.step-row.is-current .step-dot, .step-row[aria-current] .step-dot { background: var(--gold); border-color: var(--navy); color: var(--navy); }
.step-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.step-name { font-size: 16px; font-weight: 700; color: var(--ink); }
.step-row.is-done .step-name, .step-row.is-current .step-name, .step-row[aria-current] .step-name { color: var(--navy); }
.step-desc { font-size: 13.5px; line-height: 1.35; color: var(--grey); }
.step-status { font-size: 13px; font-weight: 700; color: var(--grey); white-space: nowrap; }
.step-status.is-pill { color: var(--navy); background: var(--gold); padding: 4px 10px; border-radius: 999px; }
.step-status:empty { display: none; }
.step-row > .ic { width: 18px; height: 18px; stroke-width: 2.5; color: var(--navy); }

.step-panel { position: sticky; top: 24px; background: #ffffff; border: 2px solid var(--navy); border-radius: 16px; padding: 28px 32px;
  display: flex; flex-direction: column; gap: 22px; }
.step-panel h2 { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.1; color: var(--navy); }
.panel-block { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.panel-block h3 { font-size: 14px; font-weight: 700; color: var(--navy); }
.tick-list { display: flex; flex-direction: column; gap: 4px; }
.tick-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--ink); min-height: 30px; }
.tick-box { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--ring); display: inline-flex; align-items: center; justify-content: center; color: var(--gold); }
.tick-box .ic { width: 13px; height: 13px; stroke-width: 3; display: none; }
.tick-list li.is-done { color: var(--grey); }
.tick-list li.is-done .tick-box { background: var(--navy); border-color: var(--navy); }
.tick-list li.is-done .tick-box .ic { display: block; }
.lesson-mini { display: flex; flex-direction: column; margin: 0 -10px; }
.lesson-mini a { display: flex; align-items: center; gap: 12px; text-decoration: none; min-height: 48px; padding: 0 10px; border-radius: 10px; }
.lesson-mini a:hover { background: var(--hover); }
.lesson-mini .dot { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; }
.lesson-mini .dot .ic { width: 16px; height: 16px; }
.lesson-mini .t { flex: 1; font-size: 15px; font-weight: 700; color: var(--navy); }
.lesson-mini .d { font-size: 14px; color: var(--grey); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; border: 2px solid var(--navy); border-radius: 10px; min-height: 44px; padding: 0 14px;
  font-size: 14px; font-weight: 700; color: var(--navy); background: #ffffff; }
.chip:hover { background: var(--navy); color: #ffffff; }
.chip .ic { width: 16px; height: 16px; }

/* ---------- step page ---------- */
.step-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 36px; align-items: start; }
.step-aside { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 18px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 700; text-decoration: none; }
.back-link .ic { width: 18px; height: 18px; stroke-width: 2.5; }
.back-link:hover { text-decoration: underline; }
.steps-toggle { display: none; }
.rail { background: #ffffff; border: 2px solid var(--navy); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.rail-row { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 0 14px; height: 46px; border-bottom: 1px solid var(--line); }
.rail-row:last-child { border-bottom: 0; }
.rail-row:hover { background: var(--hover); }
.rail-row[aria-current] { background: var(--hilite); box-shadow: inset 4px 0 0 var(--gold-deep); }
.rail-row .step-dot { flex-basis: 24px; width: 24px; height: 24px; font-size: 12px; }
.rail-row .step-dot .ic { width: 14px; height: 14px; }
.rail-row.is-done .step-dot { background: var(--navy); border-color: var(--navy); color: var(--gold); }
.rail-row[aria-current] .step-dot { background: var(--gold); border-color: var(--navy); color: var(--navy); }
.rail-name { flex: 1; min-width: 0; font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-row.is-done .rail-name { color: var(--navy); }
.rail-row[aria-current] .rail-name { font-weight: 700; color: var(--navy); }
.rail-row .step-status { font-size: 13px; }
.onpage { display: flex; flex-direction: column; gap: 2px; }
.onpage-title { font-size: 13px; font-weight: 700; color: var(--grey); padding: 0 4px 6px; }
.onpage a { display: flex; justify-content: space-between; align-items: center; text-decoration: none; min-height: 44px; padding: 0 12px; border-radius: 10px; font-size: 15px; font-weight: 700; }
.onpage a:hover { background: var(--hover); }
.onpage a div:last-child { font-weight: 400; color: var(--grey); }
.step-main { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.step-head { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }

.check-row { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 2px 24px; font-size: 16px; color: var(--ink); cursor: pointer; border-top: 1px solid var(--line); }
.check-row:first-child { border-top: 0; }
.check-row:hover { background: var(--hover); }
.check-row input { width: 22px; height: 22px; accent-color: var(--navy); margin: 0; flex: 0 0 22px; cursor: pointer; }
.check-row input:checked + span { color: var(--grey); }
.panel-body { padding: 6px 0; }
.note { padding: 10px 24px; font-size: 14px; color: var(--grey); }

.lesson-row { display: grid; grid-template-columns: 48px 40px minmax(0, 1fr) 96px 72px; align-items: center; gap: 14px; text-decoration: none; padding: 14px 24px; border-top: 1px solid var(--line); }
.lesson-row:first-of-type { border-top: 0; }
.lesson-row:hover { background: var(--hover); }
.lesson-row .circle { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; }
.lesson-row .circle .ic { width: 20px; height: 20px; }
.lesson-row .key { font-size: 15px; font-weight: 700; color: var(--eyebrow); }
.lesson-row .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lesson-row .ttl { font-size: 17px; font-weight: 700; color: var(--navy); }
.lesson-row .sub { font-size: 14px; color: var(--grey); }
.lesson-row .dur { font-size: 14px; color: var(--grey); }
.lesson-row .go { justify-self: end; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--navy); }
.lesson-row .go .ic { width: 16px; height: 16px; stroke-width: 2.5; }
.lesson-row.is-read .circle { background: var(--hilite); color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }

.tools-head, .tool-row { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 32px; }
.tools-head { padding: 12px 24px; background: var(--cream); font-size: 13px; font-weight: 700; color: var(--grey); }
.tool-row { padding: 20px 24px; border-top: 1px solid var(--line); align-items: start; }
.tool-left { display: flex; flex-direction: column; gap: 10px; }
.tool-name { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; color: var(--navy); }
.tool-ic { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; background: var(--navy); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; }
.tool-when { font-size: 15px; line-height: 1.5; color: var(--grey); }
.tool-left .btn { align-self: flex-start; }
.how { counter-reset: how; display: flex; flex-direction: column; gap: 8px; }
/* Batch 20 (visual QA): a how step is 1 block of running text with the number circle hung in the left gutter. It was a flex row,
   which turned every text run and every tool link inside a step into its own side-by-side column once the steps got links. */
.how li { counter-increment: how; position: relative; padding-left: 36px; min-height: 24px; font-size: 15px; line-height: 1.5; color: var(--ink); }
.how li::before { content: counter(how); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #ffffff;
  font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.how--lg li { font-size: 16px; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.pager--rule { border-top: 2px solid var(--line); padding-top: 22px; }

/* ---------- lesson page ---------- */
.lesson-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 40px; align-items: start; }
.lesson-aside { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 18px; }
.lesson-list { background: #ffffff; border: 2px solid var(--navy); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.lesson-list-title { font-size: 13px; font-weight: 700; color: #ffffff; background: var(--navy); padding: 10px 14px; }
.lesson-item { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 10px 14px; min-height: 56px; border-top: 1px solid var(--line); }
.lesson-item:first-of-type { border-top: 0; }
.lesson-item:hover { background: var(--hover); }
.lesson-item[aria-current] { background: var(--hilite); box-shadow: inset 4px 0 0 var(--gold-deep); }
.lesson-item .dot { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; }
.lesson-item[aria-current] .dot { background: var(--gold); color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.lesson-item .dot .ic { width: 14px; height: 14px; }
.lesson-item .t { font-size: 15px; font-weight: 700; color: var(--navy); }
.lesson-item .d { font-size: 13px; color: var(--grey); }
.lesson-item .lbl { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.lesson-main { display: flex; flex-direction: column; gap: 32px; min-width: 0; max-width: 840px; }
.lesson-head { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.meta-line { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--grey); }
.meta-line .ic { width: 16px; height: 16px; }

.video { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: 14px; overflow: hidden; background: #000000; }
.video iframe, .video > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.prose { display: flex; flex-direction: column; gap: 40px; }
.prose-section { display: flex; flex-direction: column; gap: 14px; }
.prose h2 { font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.2; color: var(--navy); }
.prose h3 { font-size: 19px; font-weight: 700; color: var(--navy); }
/* Batch 20 (visual QA): a sub-heading sits closer to the text it heads than to the text above it */
.prose-section > h3:not(:first-child) { margin-top: 14px; }
.prose p, .prose li { font-size: 17.5px; line-height: 1.65; color: var(--ink); }
.prose-list { display: flex; flex-direction: column; gap: 8px; padding-left: 4px; }
.prose-list li { position: relative; padding-left: 22px; }
.prose-list li::before { content: ''; position: absolute; left: 4px; top: 0.72em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-deep); }
.prose-steps { counter-reset: ps; display: flex; flex-direction: column; gap: 10px; }
.prose-steps li { counter-increment: ps; position: relative; padding-left: 40px; }
.prose-steps li::before { content: counter(ps); position: absolute; left: 0; top: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #ffffff;
  font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.prose-quote { margin: 4px 0; padding: 14px 20px; border-left: 4px solid var(--gold-deep); background: #ffffff; border-radius: 0 10px 10px 0; display: flex; flex-direction: column; gap: 10px; }
.prose a { font-weight: 700; }

.doit { background: #ffffff; border: 2px solid var(--navy); border-radius: 14px; overflow: hidden; display: grid; grid-template-columns: 320px minmax(0, 1fr); }
.doit-left { background: var(--gold); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.doit-left h2 { font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.15; color: var(--navy); }
.doit-left .btn { white-space: normal; text-align: center; }
.doit-tools { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.doit-right { padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; }
.doit-right .after { font-size: 16px; line-height: 1.5; color: var(--ink); }
.read-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }


.prose-table-wrap { overflow-x: auto; border: 2px solid var(--navy); border-radius: 12px; background: #ffffff; }
.prose-table { border-collapse: collapse; width: 100%; font-size: 16px; }
.prose-table th { text-align: left; background: var(--navy); color: #ffffff; font-weight: 700; padding: 10px 16px; }
.prose-table td { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--ink); vertical-align: top; line-height: 1.5; }
/* Batch 20 (visual QA): only number columns are right-aligned (md.mjs marks them class="num"); sentences read left-aligned. */
.prose-table th { vertical-align: bottom; }
.prose-table th.num, .prose-table td.num { text-align: right; white-space: nowrap; }
/* a number table is as wide as its content (at least 440 px, never wider than the column), so each number sits near its row */
.prose-table-wrap--fit { align-self: flex-start; min-width: min(100%, 440px); max-width: 100%; }
@media (min-width: 641px) {
  /* desktop only: on a phone this gap squeezes the row names to 1 word a line */
  .prose-table-wrap--fit .prose-table th.num, .prose-table-wrap--fit .prose-table td.num { padding-left: 32px; }
}
@media (max-width: 640px) {
  /* a table with sentences in its columns stacks: 1 block per row, each cell under its column name */
  .prose-table--stack thead { display: none; }
  .prose-table--stack, .prose-table--stack tbody, .prose-table--stack tr, .prose-table--stack td { display: block; width: 100%; }
  .prose-table--stack tr { padding: 12px 16px; border-top: 1px solid var(--line); }
  .prose-table--stack tr:first-child { border-top: 0; }
  .prose-table--stack td, .prose-table--stack td.num { padding: 4px 0; border: 0; text-align: left; white-space: normal; }
  .prose-table--stack td:empty { display: none; }
  .prose-table--stack td::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 700; line-height: 1.4; color: var(--eyebrow); }
  .prose-table--stack td:first-child { font-weight: 700; color: var(--navy); }
}

/* ---------- login ---------- */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--cream); }
.login-card { width: 100%; max-width: 440px; background: #ffffff; border: 2px solid var(--navy); border-radius: 16px; overflow: hidden; }
.login-brand { background: var(--navy); padding: 22px 28px; display: flex; align-items: center; }
.login-brand img { height: 34px; width: auto; }
.login-inner { padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.login-inner h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.15; color: var(--navy); }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.field-label { font-size: 14px; font-weight: 700; color: var(--navy); }
.input { width: 100%; height: 48px; border: 2px solid var(--navy); border-radius: 10px; padding: 0 14px; font-family: inherit; font-size: 16px; color: var(--ink); background: #ffffff; }
.input--code { font-size: 24px; letter-spacing: 0.4em; text-align: center; font-weight: 700; }
.input::placeholder { color: #6b6b6b; }
.notice { font-size: 15px; line-height: 1.5; color: var(--navy); background: var(--hilite); border-left: 4px solid var(--gold-deep); padding: 10px 14px; border-radius: 0 8px 8px 0; }
.msg { font-size: 15px; line-height: 1.5; color: #8a1c1c; }
.help { font-size: 14px; line-height: 1.5; color: var(--grey); }
.login-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- phone: under 900px ---------- */
@media (max-width: 899px) {
  .app { flex-direction: column; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--navy); }
  .topbar-logo { height: 26px; width: auto; }
  .side { display: none; }
  body.menu-open { overflow: hidden; }
  body.menu-open .side { display: flex; position: fixed; inset: 0; z-index: 50; width: 100%; height: 100%; flex: none; gap: 0; padding: 0; align-self: stretch; }
  body.menu-open .side-head { justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
  body.menu-open .side-head .btn-menu { display: inline-flex; }
  .side-logo img { height: 26px; }
  .side-list { padding: 16px 12px; }
  .nav-item { height: 54px; font-size: 17px; gap: 14px; border-radius: 12px; padding: 0 16px; }
  .nav-item .ic { width: 22px; height: 22px; }
  .side-foot { margin-top: auto; padding: 8px 12px 16px; border-top: 1px solid rgba(255, 255, 255, 0.15); }
  .nav-item--quiet { font-size: 15px; }

  .main, .main--learn { padding: 24px 16px 32px; gap: 14px; }
  .h1 { font-size: 28px; }
  .lead { font-size: 16px; }
  .home-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .card { padding: 18px; gap: 14px; border-radius: 14px; }
  .tile { flex-basis: 40px; width: 40px; height: 40px; border-radius: 10px; }
  .tile .ic { width: 20px; height: 20px; }
  .card-head { gap: 10px; }
  .card-title { font-size: 22px; }
  .stats { gap: 28px; }
  .stat-num { font-size: 32px; min-height: 32px; }
  .stat-label { font-size: 12px; }
  .bar { padding: 18px; gap: 12px; border-radius: 14px; flex-wrap: nowrap; }
  .bar .bar-cta { display: none; }
  .bar::after { content: ''; margin-left: auto; width: 22px; height: 22px; background: no-repeat center / contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fcd981' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14M13 6l6 6-6 6'/></svg>"); }

  .page-head { align-items: flex-start; }
  .stat-tiles { width: 100%; }
  .stat-tile { flex: 1; min-width: 0; }
  .learn-grid { grid-template-columns: minmax(0, 1fr); }
  .step-panel { position: static; padding: 20px; }
  .step-panel h2 { font-size: 28px; }
  .step-layout, .lesson-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .step-aside, .lesson-aside { position: static; }
  .steps-toggle { display: inline-flex; align-self: flex-start; }
  .rail { display: none; }
  .rail.is-open { display: flex; }
  .onpage { display: none; }
  .panel-head { padding: 14px 16px; }
  .check-row { padding: 2px 16px; }
  .lesson-row { grid-template-columns: 44px minmax(0, 1fr) auto; padding: 14px 16px; row-gap: 4px; }
  .lesson-row .key, .lesson-row .dur { display: none; }
  .tools-head { display: none; }
  .tool-row { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 18px 16px; }
  .doit { grid-template-columns: minmax(0, 1fr); }
  .doit-right { padding: 18px 16px; }
  .prose p, .prose li { font-size: 16.5px; }
  .pager .btn { width: 100%; }
}

@media (min-width: 900px) and (max-width: 1180px) {
  .learn-grid { grid-template-columns: minmax(0, 1fr); }
  .step-panel { position: static; }
  .main, .main--learn { padding-left: 28px; padding-right: 28px; }
}

@media print {
  .side, .topbar, .pager, .steps-toggle { display: none !important; }
  .app { display: block; }
  .main { padding: 0; }
}

/* =====================================================================================
   Wednesday batch 2: Deal hub, Market intelligence, drawers, requests.
   Ported from F/Deals-B-matches, F/Deals-A-pipeline, F/Deals-B-deal, F/Market-B-read and F/Market-B-sandbox.
   Class names avoid the ones above (.chip, .note, .check-row, .bar belong to earlier pages).
   ===================================================================================== */

.num { font-variant-numeric: tabular-nums; }
.lnk { color: var(--navy); font-weight: 700; text-decoration: none; }
.lnk:hover { text-decoration: underline; }
.right { text-align: right; }
.h1--md { font-size: 36px; }
.main--wide { padding: 40px 40px 64px; }
.main--market { padding: 0; gap: 0; }
.btn-pill { border-radius: 999px; }
.btn-quiet { color: #3b3b3b; border-color: #d6ccb8; }
.btn-wide { flex: 1 1 200px; }
.btn-left { justify-content: flex-start; }
.hnote { font-size: 13px; line-height: 1.45; color: var(--grey); }
.hnote--ok { font-size: 14px; font-weight: 700; color: var(--navy); }
.hnote--ok:empty { display: none; }
#intro-status:empty { display: none; }

/* ---------- the Deal hub header and tabs ---------- */
.dh-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dh-head-left { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.dh-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dh-head--line { align-items: flex-end; border-bottom: 2px solid var(--line); }
.dh-head--line .dh-head-left { align-items: flex-end; gap: 28px; }
.dh-head--line .h1 { margin-bottom: 10px; font-size: 34px; }
.dh-head--line .dh-head-actions { margin-bottom: 12px; }
.tabs--pill { display: inline-flex; gap: 4px; background: #ebe2cf; border-radius: 999px; padding: 4px; }
.tabs--pill .tab { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; text-decoration: none; font-size: 15px; color: #3b3b3b; }
.tabs--pill .tab.is-current { background: #ffffff; color: var(--navy); font-weight: 700; box-shadow: 0 2px 6px rgba(0, 41, 80, 0.18); }
.tabs--line { display: flex; gap: 4px; margin-bottom: -2px; }
.tabs--line .tab { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; text-decoration: none; font-size: 16px; color: var(--grey); }
.tabs--line .tab.is-current { color: var(--navy); font-weight: 700; box-shadow: inset 0 -3px 0 var(--navy); }
.tab-count { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--navy); color: #ffffff; }
.tab-count:empty { display: none; }
.tab-count--gold { background: var(--gold); color: var(--navy); }
.tabs--line .tab-count--sand { background: var(--line); color: var(--navy); }

/* ---------- the buy box strip ---------- */
.box-strip { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--navy); border-radius: 16px; padding: 12px 14px 12px 20px; }
.box-strip-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 320px; }
.box-strip-title { font-size: 13px; font-weight: 700; color: var(--gold); }
.box-strip .chips { gap: 6px; }
.box-strip-side { margin-left: auto; display: inline-flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.box-count { color: #ffffff; font-size: 14px; line-height: 1.1; text-align: right; }
.box-count b { display: block; font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--gold); }
.pchip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px 0 14px; border: 2px solid var(--navy); border-radius: 10px; background: #fbf3df; font-size: 15px; font-weight: 700; color: var(--navy); }
.pchip--strip { min-height: 0; gap: 6px; padding: 5px 10px; font-size: 13px; font-weight: 400; color: #ffffff; background: transparent; border: 1.5px solid rgba(252, 217, 129, 0.55); border-radius: 999px; }
.chip-ic { display: inline-flex; color: var(--gold); }
.chip-ic .ic { width: 13px; height: 13px; }
.pchip-x { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--navy); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pchip-x:hover { background: rgba(0, 41, 80, 0.1); }
.pchip-x-ic .ic { width: 14px; height: 14px; }
.pchip-badge { font-size: 11px; font-weight: 700; background: var(--gold); color: var(--navy); border-radius: 999px; padding: 1px 8px; }

/* ---------- Matches: list and pane ---------- */
.matches { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 24px; align-items: start; }
.matches-list { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { background: #ffffff; color: var(--navy); border: 2px solid #d6ccb8; border-radius: 999px; min-height: 44px; padding: 0 14px; font-size: 14px; font-weight: 700; cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--navy); color: #ffffff; border-color: var(--navy); }
.pill .num { font-weight: 400; opacity: 0.8; }
.group-head { margin: 4px 0 0; font-size: 13px; font-weight: 700; color: var(--grey); display: flex; gap: 8px; align-items: center; }
.pips { display: inline-flex; gap: 2px; align-items: center; }
.pip { width: 5px; height: 10px; border-radius: 2px; background: var(--line); }
.pip.is-on { background: var(--navy); }
.pip--big { width: 14px; height: 18px; }
.mcard { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 8px; background: #ffffff; border: 2px solid var(--line);
  border-radius: 14px; padding: 14px 16px 14px 20px; transition: transform .12s ease, box-shadow .12s ease; }
.mcard:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 41, 80, 0.16); }
.mcard:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 2px; }
.mcard[aria-pressed="true"] { border-color: var(--navy); box-shadow: inset 5px 0 0 var(--gold-deep), 0 8px 20px rgba(0, 41, 80, 0.12); }
.mcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mcard-top .muted { font-size: 13px; }
.mcard-title { font-size: 16px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.mcard-place { font-size: 13px; }
.mcard-nums { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--ink); }
.mcard-score { margin-left: auto; font-weight: 700; color: var(--navy); }
.status-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; background: var(--gold); color: var(--navy); border-radius: 999px; padding: 3px 10px; }
.status-chip:empty { display: none; }
.status-chip--saved { background: var(--navy); color: #ffffff; }
.status-chip--saved .chip-ic { color: var(--gold); }
.status-chip--logged { background: #2f8f5b; color: #ffffff; }
.status-chip--dismissed { background: var(--line); color: var(--grey); }

.pane { background: #ffffff; border: 2px solid var(--navy); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; position: sticky; top: 24px; }
.pane-back { display: none; align-self: flex-start; }
.pane-empty { color: var(--grey); font-size: 16px; padding: 24px 0; }
.pane-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.pane-meta a { display: inline-flex; align-items: center; gap: 4px; }
.pane-title { display: flex; flex-direction: column; gap: 6px; }
.pane-title h2 { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.15; color: var(--navy); }
.pane-place { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; color: var(--grey); }
.pane-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.pane-actions .btn { min-height: 52px; }
.pane-actions .btn-wide { font-size: 16px; }
.facts { display: grid; gap: 10px; }
.facts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facts--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fact { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--cream); border-radius: 12px; min-width: 0; }
.fact--line { background: #ffffff; border: 2px solid var(--line); padding: 14px 16px; }
.fact-label { font-size: 13px; color: var(--grey); }
.fact-num { font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1; color: var(--navy); overflow-wrap: anywhere; }
.fact-num--md { font-size: 24px; }
.checks { display: flex; flex-direction: column; gap: 10px; }
.checks-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.checks-title { font-size: 16px; font-weight: 700; color: var(--navy); }
.crow { display: grid; grid-template-columns: 28px 130px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid #efe8da; }
.crow .check-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.crow .check-ask { font-size: 14px; }
.crow .check-got { font-size: 14px; font-weight: 700; color: var(--ink); text-align: right; }
.mark { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #ffffff; }
.mark--pass { background: #2f8f5b; }
.mark--fail { background: #b3402f; }
.mark--unknown { background: #8a8478; }
.mark-ic .ic { width: 14px; height: 14px; stroke-width: 3; }

/* ---------- drawers and forms ---------- */
body.drawer-open { overflow: hidden; }
.drawer { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(0, 41, 80, 0.45); }
.drawer-panel { position: relative; width: min(520px, 100%); height: 100%; background: #ffffff; display: flex; flex-direction: column; box-shadow: -12px 0 32px rgba(0, 41, 80, 0.25); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px; background: var(--navy); }
.drawer-head h2 { font-family: var(--serif); font-weight: 600; font-size: 22px; color: #ffffff; }
.icon-btn { width: 46px; height: 46px; flex: 0 0 46px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--navy); border-radius: 10px; background: #ffffff; color: var(--navy); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: #efe7d6; }
.drawer-head .icon-btn { background: transparent; color: #ffffff; border-color: rgba(255, 255, 255, 0.4); }
.drawer-head .icon-btn:hover { background: rgba(255, 255, 255, 0.12); }
.drawer-body { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.drawer-foot { display: flex; gap: 10px; padding: 16px 24px; border-top: 2px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > label, .field > legend { font-size: 14px; font-weight: 700; color: var(--ink); }
fieldset.field > legend { padding: 0; margin-bottom: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field input[type="text"], .field input[type="url"], .field input[type="number"], .field input[type="date"], .field select,
.offer-row input, .picker-type input { width: 100%; min-height: 46px; padding: 0 14px; font-family: inherit; font-size: 16px; color: var(--ink); background: #ffffff; border: 2px solid #d6ccb8; border-radius: 10px; }
textarea { width: 100%; min-height: 200px; resize: vertical; padding: 14px 16px; font-family: inherit; font-size: 15px; line-height: 1.5; color: var(--ink); background: #fffdf8; border: 2px solid #d6ccb8; border-radius: 14px; }
#req-note { min-height: 120px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--navy); }
.hint { font-size: 13px; color: var(--grey); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; cursor: pointer; }
.check input, .choice input { width: 20px; height: 20px; accent-color: var(--navy); margin: 0; }
.choice { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 2px solid var(--navy); border-radius: 10px; background: #ffffff; font-size: 15px; font-weight: 700; color: var(--navy); cursor: pointer; }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.form-msg { background: #ffffff; border: 2px solid #8a1c1c; border-radius: 10px; padding: 10px 14px; font-size: 14px; line-height: 1.45; color: #8a1c1c; }
.fit-line { min-height: 22px; font-size: 15px; font-weight: 700; color: var(--navy); }
.picker { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.picker-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.picker-chips:empty { display: none; }
.picker-type { display: flex; gap: 8px; width: 100%; }
.picker-type .btn { white-space: nowrap; flex-shrink: 0; } /* batch 23: "Add word" never wraps to 2 lines */
.select-dash { min-height: 44px; max-width: 100%; padding: 0 12px; font-family: inherit; font-size: 15px; font-weight: 700; color: var(--navy); background: #ffffff; border: 2px dashed #b9ad94; border-radius: 10px; cursor: pointer; }
.select-stage { width: 100%; min-height: 44px; padding: 0 12px; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--navy); background: #ffffff; border: 2px solid var(--navy); border-radius: 10px; cursor: pointer; }

/* ---------- empty states ---------- */
.empty { background: #ffffff; border: 2px dashed var(--ring); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.empty--inline { padding: 20px; }
.empty-title { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--navy); }
.empty-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- My deals ---------- */
.stage-filter { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
.stage-btn { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 64px; padding: 8px 12px; background: #ffffff; color: var(--navy); border: 2px solid var(--navy); border-radius: 10px; cursor: pointer; text-align: left; font-family: inherit; }
.stage-btn .num { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1; }
.stage-btn span:last-child { font-size: 13px; font-weight: 700; line-height: 1.2; }
.stage-btn[aria-pressed="true"] { background: var(--navy); color: #ffffff; }
.stage-btn.is-empty { background: transparent; color: #6f6a5f; border-color: var(--line); }
.list-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.list-line { font-size: 15px; color: var(--grey); }
.list-bar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg-toggle { display: inline-flex; border: 2px solid var(--navy); border-radius: 10px; overflow: hidden; }
.seg-toggle button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 0; background: #ffffff; color: var(--navy); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.seg-toggle button[aria-pressed="true"] { background: var(--navy); color: #ffffff; }
.deal-table { background: #ffffff; border: 2px solid var(--navy); border-radius: 14px; overflow: hidden; }
.deal-row { display: grid; grid-template-columns: minmax(0, 1fr) 210px 150px minmax(0, 0.9fr) 96px 132px; column-gap: 16px; align-items: center; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.deal-row:hover { background: #fbf7ee; }
.deal-row--head { height: 42px; padding-top: 0; padding-bottom: 0; background: var(--cream); font-size: 12px; font-weight: 700; color: var(--grey); text-transform: uppercase; letter-spacing: 0.06em; }
.deal-row--head:hover { background: var(--cream); }
.row-deal { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tile--sm { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px; }
.tile--xs { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; }
.row-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-name .lnk { font-size: 16px; overflow-wrap: anywhere; }
.row-name .muted { font-size: 13px; }
.row-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.row-price .muted { font-size: 12px; }
.row-price .num { font-size: 15px; font-weight: 700; }
.row-upd { display: flex; flex-direction: column; gap: 2px; }
.row-upd .muted { font-size: 13px; }
.row-update { font-size: 15px; font-weight: 700; color: var(--ink); }
.row-update .muted { font-weight: 400; font-size: 15px; }
.files-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.row-open { display: flex; justify-content: flex-end; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; align-items: start; }
.bcol { background: rgba(235, 226, 207, 0.55); border: 2px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.bcol-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; color: var(--navy); }
.bcard { background: #ffffff; border: 2px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.bcard-name { font-size: 15px; overflow-wrap: anywhere; }
.bcard-price { font-size: 14px; }

/* ---------- the deal page ---------- */
.deal-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.deal-side { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 24px; }
.deal-list { display: flex; flex-direction: column; gap: 10px; }
#deal-list-body { display: flex; flex-direction: column; gap: 10px; }
.deal-list-toggle { display: none; }
.dcard { text-decoration: none; display: flex; flex-direction: column; gap: 8px; background: #ffffff; border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px 14px 20px; color: var(--ink); transition: transform .12s ease, box-shadow .12s ease; }
.dcard:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 41, 80, 0.16); }
.dcard.is-current { border-color: var(--navy); box-shadow: inset 5px 0 0 var(--gold-deep), 0 8px 20px rgba(0, 41, 80, 0.12); }
.dcard-top { display: flex; align-items: center; gap: 10px; }
.dcard-name { display: flex; flex-direction: column; min-width: 0; }
.dcard-title { font-size: 16px; font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }
.dcard-name .muted { font-size: 13px; }
.dcard-mid { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.stage-chip { font-size: 12px; font-weight: 700; color: var(--navy); background: #f3ecdc; border-radius: 999px; padding: 3px 10px; }
.dcard-last { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.deal { background: #ffffff; border: 2px solid var(--navy); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.deal-top { display: flex; flex-direction: column; gap: 18px; padding: 28px; }
.deal-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.deal-title-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.deal-title { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.1; color: var(--navy); overflow-wrap: anywhere; }
.deal-sub { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--grey); }
.deal-sub .lnk { display: inline-flex; align-items: center; gap: 4px; }
.stage-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--cream); border-radius: 14px; padding: 12px 14px; }
.stage-bar label { font-size: 14px; font-weight: 700; color: var(--grey); }
.stage-bar .select-stage { width: auto; min-width: 220px; border-radius: 999px; background: var(--gold); border-color: var(--gold-deep); }
.stage-dots { display: inline-flex; gap: 5px; align-items: center; margin-left: auto; }
.stage-dots .dot { width: 10px; height: 10px; border-radius: 999px; background: var(--line); }
.stage-dots .dot--done { background: var(--navy); }
.stage-dots .dot--now { width: 28px; background: var(--gold-deep); }
.offer-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.offer-row label { font-size: 14px; font-weight: 700; color: var(--grey); }
.offer-row input { width: 200px; }
.deal-sec { display: flex; flex-direction: column; gap: 14px; padding: 24px 28px; border-top: 2px solid #efe8da; }
.deal-sec h2 { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--navy); }
.ask-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ask-btn { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 14px; background: var(--navy); color: #ffffff; border-radius: 14px; padding: 14px 16px; min-height: 64px; transition: transform .12s ease, box-shadow .12s ease; }
.ask-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 41, 80, 0.16); }
.ask-btn:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 2px; }
.ask-btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.ask-ic { flex: 0 0 40px; height: 40px; border-radius: 10px; background: var(--gold); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; }
.ask-text { font-size: 15px; font-weight: 700; line-height: 1.3; }
.dates-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dates-grid--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }
.countdown { display: flex; align-items: center; gap: 10px; background: var(--cream); border-radius: 999px; padding: 10px 16px; color: var(--grey); font-size: 14px; flex-wrap: wrap; }
.countdown b { color: var(--navy); }
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.file-list { display: flex; flex-direction: column; gap: 10px; }
.file-row { display: flex; align-items: center; gap: 12px; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; flex-wrap: wrap; }
.file-ic { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; background: var(--cream); display: inline-flex; align-items: center; justify-content: center; color: var(--navy); }
.file-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.file-name { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.file-info .muted { font-size: 12px; }
.fields-body { display: flex; flex-direction: column; gap: 10px; }
.cf-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) 46px; gap: 12px; align-items: center; }
.cf-row label { font-size: 14px; font-weight: 700; color: var(--grey); overflow-wrap: anywhere; }
.cf-row input, .cf-row select { width: 100%; min-height: 46px; padding: 0 14px; font-family: inherit; font-size: 16px; border: 2px solid #d6ccb8; border-radius: 10px; background: #ffffff; color: var(--ink); }
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { display: flex; gap: 14px; padding: 0 0 18px; }
.tl-rail { flex: 0 0 14px; display: flex; flex-direction: column; align-items: center; }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--navy); margin-top: 3px; }
.tl-dot--now { background: var(--gold-deep); }
.tl-line { flex: 1; width: 2px; background: var(--line); margin-top: 4px; }
.tl-item:last-child .tl-line { background: transparent; }
.tl-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tl-title { font-size: 15px; color: var(--ink); }
.tl-detail { font-size: 14px; color: var(--grey); }
.tl-files { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; background: #f3ecdc; border-radius: 999px; padding: 5px 10px; overflow-wrap: anywhere; }

/* ---------- the print view ---------- */
.print-bar { display: flex; gap: 10px; flex-wrap: wrap; }
.sheet { background: #ffffff; border: 2px solid var(--navy); border-radius: 14px; padding: 28px; max-width: 8.5in; display: flex; flex-direction: column; gap: 14px; }
.sheet-head { display: flex; flex-direction: column; gap: 4px; }
.sheet-head h2 { font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.15; color: var(--navy); }
.sheet-sub { font-size: 14px; color: var(--grey); }
.sheet-sec { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.sheet-sec h3 { font-size: 12px; font-weight: 700; color: var(--grey); text-transform: uppercase; letter-spacing: 0.06em; }
.sheet-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; margin: 0; }
.sheet-facts dt { font-size: 12px; color: var(--grey); }
.sheet-facts dd { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.sheet-checks { display: flex; flex-direction: column; }
.sheet-checks-head { font-size: 14px; font-weight: 700; color: var(--navy); padding-bottom: 4px; }
.sheet-check { display: grid; grid-template-columns: 64px 140px minmax(0, 1fr); gap: 8px; font-size: 13px; padding: 3px 0; border-top: 1px solid #efe8da; }
.sheet-check-mark { font-weight: 700; }
.sheet-check--pass .sheet-check-mark { color: #2f8f5b; }
.sheet-check--fail .sheet-check-mark { color: #b3402f; }
.sheet-notes { white-space: pre-wrap; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }

/* ---------- Market intelligence ---------- */
.market-wrap { display: flex; align-items: stretch; flex: 1 1 auto; min-width: 0; }
.market-main { flex: 1; min-width: 0; padding: 36px 32px 48px; display: flex; flex-direction: column; gap: 22px; }
.market-head { display: flex; flex-direction: column; gap: 14px; }
.market-head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.market-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.market-meta .pchip--strip { color: var(--navy); background: #ffffff; border-color: #b9ad94; }
.market-meta .chip-ic { color: var(--eyebrow); }
.market-dock { flex: 0 0 384px; background: #ffffff; border-left: 2px solid var(--navy); padding: 32px 24px 40px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.dock-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dock-head h2 { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.2; color: var(--navy); }
.tries { display: inline-flex; flex-direction: column; gap: 6px; }
.tries-text { font-size: 14px; color: var(--navy); font-weight: 700; }
.tries-bars { display: flex; flex-wrap: wrap; gap: 2px; }
.tick { width: 6px; height: 14px; border-radius: 2px; background: var(--line); }
.tick.is-on { background: var(--gold-deep); }
.sandbox-form { display: flex; flex-direction: column; gap: 18px; }
.sandbox-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.was { font-size: 12px; color: var(--grey); }
.dock-compare { background: var(--cream); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.dock-compare-title { font-size: 13px; font-weight: 700; color: var(--grey); }
.dock-nums { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; }
.dock-nums b { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--navy); }
.mk { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.mk-tile { grid-column: span 2; background: #ffffff; border: 2px solid var(--navy); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mk-tile--hero { grid-column: span 4; }
.mk-tile--wide { grid-column: 1 / -1; }
.mk-tile--thin { grid-column: 1 / -1; background: var(--cream); }
.mk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mk-label { font-size: 13px; font-weight: 700; color: var(--grey); text-transform: uppercase; letter-spacing: 0.06em; }
.mk-big { font-family: var(--serif); font-weight: 600; font-size: 48px; line-height: 1; color: var(--navy); min-height: 48px; }
.mk-note { font-size: 13px; color: var(--grey); }
.mk-sub { font-size: 14px; color: var(--grey); }
.mk-pair { display: flex; gap: 24px; }
.mk-pair-item { display: flex; flex-direction: column; gap: 6px; }
.band-badge { align-self: flex-start; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 3px 12px; background: var(--gold); color: var(--navy); }
.band-badge:empty { display: none; }
.band-badge--tight { background: var(--line); }
.band-badge--wide { background: #d6e4f0; }
.meter { display: flex; flex-direction: column; gap: 8px; }
.meter-track { position: relative; display: flex; gap: 3px; margin-top: 30px; }
.zone { display: block; height: 12px; background: var(--line); }
.zone--tight { width: 18.75%; border-radius: 6px 0 0 6px; }
.zone--healthy { width: 59.35%; background: var(--gold); }
.zone--wide { width: 21.9%; border-radius: 0 6px 6px 0; }
.meter-marker { position: absolute; top: -30px; width: 48px; text-align: center; font-size: 13px; font-weight: 700; color: var(--navy); }
.meter-marker::after { content: ''; position: absolute; left: 50%; top: 18px; margin-left: -7px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 9px solid var(--navy); }
.meter-legend { display: flex; gap: 3px; font-size: 12px; line-height: 1.35; color: var(--grey); }
.legend--tight { width: 18.75%; }
.legend--healthy { width: 59.35%; text-align: center; color: var(--navy); }
.legend--wide { width: 21.9%; text-align: right; }
.spark { display: flex; flex-wrap: wrap; gap: 2px; }
.spark-bar { flex: 1 0 4px; height: 14px; border-radius: 3px; }
.spark-bar.is-new { background: var(--navy); }
.spark-bar.is-gone { background: var(--gold-deep); }
.range-track { position: relative; height: 8px; background: var(--line); border-radius: 4px; margin: 10px 0; }
.range-dot { position: absolute; top: -4px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--navy); }
.range-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--grey); }
.range-ends > span { display: flex; flex-direction: column; }
.range-ends b { font-size: 16px; color: var(--navy); }
.days-rows { display: flex; flex-direction: column; gap: 14px; }
.days-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; font-size: 14px; }
.days-row b { color: var(--navy); }
.days-track, .share-track { grid-column: 1 / -1; height: 10px; background: var(--line); border-radius: 5px; }
.days-fill, .share-fill { display: block; height: 100%; border-radius: 5px; background: var(--navy); }
.days-fill.is-good { background: var(--gold-deep); }
.history { display: flex; align-items: flex-end; gap: 6px; height: 170px; }
.hist-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.hist-num { font-size: 11px; color: var(--grey); }
.hist-bar { display: block; width: 100%; background: var(--navy); border-radius: 4px 4px 0 0; }
.hist-col:last-child .hist-bar { background: var(--gold-deep); }
.share-rows { display: flex; flex-direction: column; gap: 12px; }
.share-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; font-size: 14px; }
.share-name { overflow-wrap: anywhere; }
.share-n b { color: var(--navy); }
.mk-read h2 { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--navy); }
.read-text { display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.55; color: var(--ink); max-width: 760px; }

/* ---------- the full-size sandbox ---------- */
.try-head { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.try-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; width: 100%; }
.try-body { display: grid; grid-template-columns: 380px minmax(0, 1fr); border: 2px solid var(--navy); border-radius: 16px; overflow: hidden; background: #ffffff; }
.try-form { padding: 28px 24px; border-right: 2px solid var(--navy); display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.try-form h2, .try-compare h2 { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--navy); }
.try-compare { padding: 28px; background: var(--cream); display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.compare-lines { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.compare-line { display: flex; gap: 10px; }
.compare-line b { min-width: 70px; color: var(--navy); }
.compare-empty { font-size: 15px; color: var(--grey); }
.cmp-row { background: #ffffff; border: 2px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.cmp-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cmp-title { font-weight: 700; color: var(--navy); }
.cmp-diff { font-size: 14px; font-weight: 700; color: var(--navy); background: var(--gold); border-radius: 999px; padding: 2px 10px; }
.cmp-nums { display: flex; gap: 20px; font-family: var(--serif); font-weight: 600; font-size: 28px; color: var(--navy); }
.cmp-live { color: var(--grey); }
.cmp-bars { display: flex; flex-direction: column; gap: 6px; }
.cmp-bar { display: grid; grid-template-columns: 80px minmax(0, 1fr) 60px; gap: 8px; align-items: center; font-size: 13px; }
.cmp-bar-track { height: 12px; background: var(--line); border-radius: 6px; overflow: hidden; }
.cmp-bar-fill { display: block; height: 100%; border-radius: 6px; }
.cmp-bar-fill.is-live { background: var(--navy); }
.cmp-bar-fill.is-try { background: var(--gold-deep); }
.cmp-solo { display: flex; gap: 20px; font-size: 16px; }
.verdicts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.verdict { background: #ffffff; border: 2px solid var(--navy); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.verdict-title { font-size: 13px; font-weight: 700; color: var(--grey); }
.make-live { background: #ffffff; border: 2px solid var(--navy); border-radius: 14px; }
.make-live summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; font-weight: 700; color: var(--navy); }
.make-live summary::-webkit-details-marker { display: none; }
.make-live-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; border-top: 2px solid var(--line); }
.make-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.make-box { font-size: 14px; line-height: 1.5; background: var(--cream); border-radius: 10px; padding: 10px 12px; margin-top: 6px; }
.make-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Home: Introductions ---------- */
.intro-buttons { display: flex; flex-direction: column; gap: 10px; }
.intro-btn { width: 100%; }
.intro-list-wrap { display: flex; flex-direction: column; gap: 8px; }
#intro-list { font-size: 14px; color: var(--grey); }
.req-list { display: flex; flex-direction: column; }
.req-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; font-size: 14px; padding: 6px 0; border-top: 1px solid var(--line); color: var(--ink); }
.req-status { font-weight: 700; color: var(--navy); }
.req-due { grid-column: 1 / -1; } /* W2 batch 39: a team valuation's due time, on its own line under the row */

/* ---------- tablet and phone ---------- */
@media (min-width: 900px) and (max-width: 1180px) {
  .main--wide { padding-left: 28px; padding-right: 28px; }
  .matches { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
  .market-wrap { flex-direction: column; }
  .market-dock { flex: none; border-left: 0; border-top: 2px solid var(--navy); }
  .stage-filter { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .deal-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .try-body { grid-template-columns: minmax(0, 1fr); }
  .try-form { border-right: 0; border-bottom: 2px solid var(--navy); }
}

@media (max-width: 899px) {
  .main--wide { padding: 24px 16px 32px; }
  .main--market { padding: 0; }
  .h1--md { font-size: 28px; }
  .dh-head--line .h1 { font-size: 28px; }
  .dh-head-left { gap: 14px; }
  .dh-head-actions { width: 100%; }
  .dh-head-actions .btn { flex: 1 1 auto; }
  .dh-head--line { border-bottom: 0; }
  .box-strip { padding: 14px; }
  .box-strip-side { margin-left: 0; width: 100%; justify-content: space-between; }
  .matches { grid-template-columns: minmax(0, 1fr); }
  .pane { display: none; position: static; padding: 18px; border-radius: 14px; }
  .pane[hidden] { display: none; }
  .matches.is-detail .matches-list { display: none; }
  .matches.is-detail .pane { display: flex; }
  .matches.is-detail .pane-back { display: inline-flex; }
  .pane-title h2 { font-size: 24px; }
  .facts--3, .facts--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact-num { font-size: 22px; }
  .crow { grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr); }
  .crow .check-ask { display: none; }
  .drawer-panel { width: 100%; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .stage-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .deal-table { overflow-x: auto; }
  .deal-row { min-width: 1040px; grid-template-columns: minmax(240px, 1fr) 190px 140px minmax(200px, 0.9fr) 96px 132px; }
  .seg-toggle button[data-view="board"] { display: none; }
  .board { display: none !important; }
  .deal-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .deal-side { position: static; }
  .deal-list-toggle { display: inline-flex; align-self: flex-start; }
  .deal-list { display: none; }
  .deal-list.is-open { display: flex; }
  .deal-top { padding: 18px; }
  .deal-title { font-size: 26px; }
  .deal-sec { padding: 18px; }
  .stage-dots { margin-left: 0; }
  .ask-grid { grid-template-columns: minmax(0, 1fr); }
  .dates-grid, .dates-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cf-row { grid-template-columns: minmax(0, 1fr) 46px; }
  .cf-row label { grid-column: 1 / -1; }
  .sheet-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-wrap { flex-direction: column; }
  .market-main { padding: 24px 16px; }
  .market-dock { flex: none; border-left: 0; border-top: 2px solid var(--navy); padding: 24px 16px 32px; }
  .mk { grid-template-columns: minmax(0, 1fr); }
  .mk-tile, .mk-tile--hero, .mk-tile--wide, .mk-tile--thin { grid-column: auto; padding: 16px; }
  .mk-big { font-size: 40px; min-height: 40px; }
  .try-body { grid-template-columns: minmax(0, 1fr); }
  .try-form { border-right: 0; border-bottom: 2px solid var(--navy); padding: 20px 16px; }
  .try-compare { padding: 20px 16px; }
  .verdicts, .make-two { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  body .main--wide { padding: 0; }
  .print-bar, .drawer, body.is-print-view h1.h1 { display: none !important; }
  .sheet { border: 0; padding: 0; max-width: none; font-size: 11pt; }
  .sheet-notes { max-height: 3.2in; overflow: hidden; }
  .sheet-facts dd { font-size: 12pt; }
  @page { size: letter; margin: 0.5in; }
}

/* ================================================================================================
   Batch 3 (Wednesday 13:00 to 23:00): Tools library, tool pages, AI tool pages, Recordings, staff.
   Frames: F/Tools-A-library, F/Tools-B-calc, F/Tools-A-ai, F/Rec-B-home, F/Rec-B-lesson(-text).
   Class names are new (tp-, lib-, ai-, tl-, rc-, st-) so they never touch the earlier pages.
   ================================================================================================ */

.main--tool { padding: 40px 48px 64px; }
.tool-page { max-width: 1240px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.tool-top { display: flex; align-items: center; gap: 16px; }
.tool-search { position: relative; flex: 1; display: flex; align-items: center; }
.tool-search-ic { position: absolute; left: 14px; display: inline-flex; color: var(--navy); pointer-events: none; }
.tool-search input, .lib-search input { width: 100%; height: 52px; border: 2px solid var(--navy); border-radius: 10px; padding: 0 16px 0 44px; font-size: 16px; color: var(--ink); background: #ffffff; }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.tool-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.tool-head { display: flex; flex-direction: column; gap: 12px; }
.tool-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 16px; background: #ffffff; border: 1px solid var(--line); font-size: 14px; color: var(--navy); text-decoration: none; }
.tag--step { background: var(--gold); border-color: var(--gold); font-weight: 700; }
a.tag:hover { filter: brightness(0.97); }
.h1--tool { font-size: 44px; }
.tool-head .lead { font-size: 19px; }

/* cards and fields */
.tp-card { background: #ffffff; border: 2px solid var(--navy); border-radius: 18px; padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.tp-card-h { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--navy); }
.tp-grid { display: grid; gap: 18px 20px; }
.tp-grid--1 { grid-template-columns: minmax(0, 1fr); }
.tp-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tp-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tp-field--full { grid-column: 1 / -1; }
.tp-field label, .tp-field > .tp-label { font-size: 14px; font-weight: 700; color: var(--navy); }
.tp-field input[type="text"], .tp-field input[type="date"], .tp-field input[type="search"], .tp-field select, .tp-field textarea, .tp-table input[type="text"], .tp-table input[type="date"], .tp-table select, .tp-note-in {
  height: 48px; border: 2px solid var(--navy); border-radius: 10px; padding: 0 12px; font-size: 16px; color: var(--ink); background: #ffffff; width: 100%; min-width: 0; font-family: inherit; }
.tp-field textarea { height: auto; padding: 10px 12px; line-height: 1.45; resize: vertical; }
.tp-field input.is-bad, .tp-table input.is-bad, .tp-msg.is-bad { border-color: #8a1c1c; }
.tp-hint { font-size: 13px; color: var(--grey); line-height: 1.4; }
.tp-note-in { height: 40px; margin-top: 8px; font-size: 14px; }
.tp-msg { font-size: 14px; line-height: 1.5; color: var(--navy); }
.tp-msg.is-bad { color: #8a1c1c; border: 0; }
.tp-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tp-reminder { font-size: 15px; font-weight: 700; color: var(--navy); background: var(--hilite); border: 2px solid var(--gold-deep); border-radius: 12px; padding: 12px 16px; }
.tp-list { display: flex; flex-direction: column; gap: 8px; list-style: disc; padding-left: 22px; font-size: 15px; line-height: 1.5; }
.tp-list li strong { color: var(--navy); }
.tp-list--num { list-style: decimal; }
.tp-computed { font-family: var(--serif); font-size: 22px; color: var(--navy); min-height: 48px; display: flex; align-items: center; }
.tp-item-hint { padding-left: 34px; }

/* the result card */
.tp-result { background: var(--navy); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 22px; color: #ffffff; }
.tp-result--plain { padding: 22px 28px; }
.tp-empty { font-size: 17px; line-height: 1.5; color: var(--side-text); }
.tp-res-body { display: flex; flex-direction: column; gap: 22px; }
.tp-res-top { display: flex; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.tp-verdict { flex: 1 1 320px; display: flex; flex-direction: column; gap: 10px; }
.tp-verdict h2 { font-family: var(--serif); font-weight: 600; font-size: 38px; line-height: 1.1; color: #ffffff; }
.tp-verdict p { font-size: 17px; line-height: 1.5; color: var(--side-text); }
.tp-vic { width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; }
.tp-vic .ic { width: 22px; height: 22px; stroke-width: 3; }
.tp-result.is-mid .tp-vic { background: #e6b94a; }
.tp-result.is-bad .tp-vic { background: #f4a9a6; }
.tp-hero { flex: 0 0 260px; background: rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; container-type: inline-size; }
.tp-hero-label { font-size: 14px; color: #c8d3df; }
.tp-hero-val { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 15.5cqi, 44px); line-height: 1.05; color: var(--gold); word-break: keep-all; overflow-wrap: normal; min-height: 46px; }
.tp-hero-sub { font-size: 13px; color: #c8d3df; }
.tp-meter { display: block; position: relative; height: 32px; margin-top: 6px; }
.tp-meter-bar { position: absolute; left: 0; right: 0; top: 6px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #d9534f 0%, #d9534f 50%, #e6b94a 50%, #e6b94a 60%, #4caf7d 60%, #4caf7d 100%); }
.tp-meter-mark { position: absolute; left: 0; top: 0; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: #ffffff; }
.tp-meter-t { position: absolute; top: 18px; font-size: 11px; color: #c8d3df; }
.tp-meter-t--a { left: 50%; transform: translateX(-100%); padding-right: 3px; }
.tp-meter-t--b { left: 60%; padding-left: 3px; }
.tp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(255, 255, 255, 0.2); padding-top: 20px; container-type: inline-size; }
.tp-tile { padding: 4px 20px; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid rgba(255, 255, 255, 0.2); min-width: 0; }
.tp-tile:first-child { border-left: 0; padding-left: 0; }
.tp-tile-label { font-size: 14px; color: #c8d3df; }
.tp-tile-val { font-family: var(--serif); font-weight: 600; font-size: clamp(16px, calc(4.76cqi - 5.7px), 28px); line-height: 1.15; color: #ffffff; word-break: keep-all; overflow-wrap: normal; }
.tp-tile-sub { font-size: 13px; color: #c8d3df; }
.tp-toggles { display: flex; flex-direction: column; gap: 10px; }
.tp-toggle { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 14px 16px; }
.tp-toggle label { font-size: 16px; font-weight: 700; color: #ffffff; cursor: pointer; }
.tp-toggle-note { font-size: 14px; color: #c8d3df; margin-left: auto; }
.switch { appearance: none; -webkit-appearance: none; width: 52px; height: 30px; border-radius: 15px; background: #6b7c90; position: relative; cursor: pointer; margin: 0; flex: 0 0 52px; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #ffffff; transition: left .15s ease; }
.switch:checked { background: var(--gold-deep); }
.switch:checked::after { left: 25px; }
.tp-notes { display: flex; flex-direction: column; gap: 8px; list-style: disc; padding-left: 22px; font-size: 15px; line-height: 1.5; color: #ffffff; }
.tp-result--plain .tp-verdict h2 { font-size: 28px; }

/* tables */
.tp-tablewrap { overflow-x: auto; max-width: 100%; position: relative; }
.tp-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tp-table th, .tp-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tp-table thead th { font-size: 13px; font-weight: 700; color: var(--grey); text-transform: none; white-space: nowrap; }
.tp-table tbody th { font-weight: 700; color: var(--navy); }
.tp-table td[data-out] { font-weight: 700; color: var(--navy); white-space: nowrap; }
.tp-table--rows td { min-width: 130px; }
.tp-table--rows .tp-row-x { min-width: 0; }
.tp-table tr.is-bad td { color: #8a1c1c; }
.tp-table input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--navy); }
.tp-table select, .tp-table input[type="text"], .tp-table input[type="date"] { height: 44px; font-size: 15px; }
.tp-out-row th, .tp-out-row td { background: #faf6ec; }
.tp-best { font-size: 15px; font-weight: 700; color: var(--navy); }

/* checklists */
.tp-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tp-count { font-size: 14px; font-weight: 700; color: var(--grey); }
.tp-items { display: flex; flex-direction: column; gap: 6px; list-style: none; padding: 0; }
.tp-items--clauses { gap: 14px; }
.tp-item { border-bottom: 1px solid var(--line); padding: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.tp-item:last-child { border-bottom: 0; }
.tp-item.is-skipped { opacity: 0.45; }
.tp-tick { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; cursor: pointer; font-size: 16px; line-height: 1.4; color: var(--ink); padding: 6px 0; }
.tp-tick input { width: 22px; height: 22px; accent-color: var(--navy); flex: 0 0 22px; margin-top: 2px; }
.tp-q { border: 0; padding: 0; margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tp-q legend, .tp-q > label { font-size: 16px; line-height: 1.4; color: var(--ink); float: left; flex: 1 1 340px; padding: 0; }
.tp-q--score { justify-content: space-between; }
.tp-q--score select { width: 110px; height: 44px; }
.tp-seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tp-seg label { display: inline-flex; }
.tp-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tp-seg span { display: inline-flex; align-items: center; justify-content: center; min-width: 76px; min-height: 44px; padding: 0 14px; border: 2px solid var(--navy); border-radius: 22px; font-size: 14px; font-weight: 700; color: var(--navy); background: #ffffff; cursor: pointer; }
.tp-seg input:checked + span { background: var(--navy); color: #ffffff; }
.tp-seg input:focus-visible + span { outline: 3px solid var(--gold-deep); outline-offset: 2px; }
.tp-seg input:disabled + span { opacity: 0.6; cursor: default; }
.tp-ask { font-size: 14px; line-height: 1.45; color: #7a5d14; background: var(--hilite); border-radius: 8px; padding: 8px 12px; }

/* purchase agreement review */
.tp-clause { border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.tp-clause.is-flagged { border-color: #b4423d; background: #fdf3f2; }
.tp-clause-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.tp-clause-name { font-weight: 700; color: var(--navy); font-size: 16px; }
.tp-flag { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 700; color: #8a1c1c; cursor: pointer; }
.tp-flag input { width: 20px; height: 20px; accent-color: #8a1c1c; }
.tp-clause-what { font-size: 14px; color: var(--grey); }
.tp-clause-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; font-size: 14px; line-height: 1.5; }
.tp-clause-cols strong { color: var(--navy); font-size: 13px; text-transform: none; }
.tp-sendbox { background: #fdf3f2; border: 2px solid #b4423d; border-radius: 14px; padding: 14px 18px; }
.tp-sendbox h3 { font-family: var(--serif); font-size: 18px; color: #8a1c1c; margin-bottom: 6px; }

/* message blocks */
.tp-blocks { display: flex; flex-direction: column; gap: 18px; }
.tp-block { background: #ffffff; border: 2px solid var(--navy); border-radius: 16px; padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.tp-block-head h3 { font-family: var(--serif); font-size: 20px; color: var(--navy); }
.tp-when { font-size: 14px; color: var(--grey); }
.tp-subject { font-size: 15px; color: var(--ink); }
.tp-subject-l { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--eyebrow); margin-right: 6px; }
.tp-body { background: #faf6ec; border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.55; }
.tp-body p { white-space: pre-line; }
.tp-body [data-token].is-blank { background: #ffe9a8; border-radius: 4px; padding: 0 3px; }
.tp-block .btn { align-self: flex-start; }

/* document preview */
.tp-doc { background: #ffffff; border: 1px solid var(--line); border-radius: 12px; padding: 22px 26px; font-size: 14px; line-height: 1.6; display: flex; flex-direction: column; gap: 8px; max-height: 560px; overflow-y: auto; }
.tp-doc .tp-doc-title { font-family: var(--serif); font-size: 20px; text-align: center; color: var(--navy); }
.tp-doc .tp-doc-h1 { font-size: 15px; font-weight: 700; color: var(--navy); margin-top: 8px; }
.tp-doc .tp-doc-h2 { font-size: 14px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: 0.02em; margin-top: 8px; }
.tp-doc .tp-doc-p, .tp-doc .tp-doc-li { white-space: pre-wrap; }
.tp-doc .tp-doc-li { list-style: disc; margin-left: 22px; }

/* side column */
.tool-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 24px; align-self: start; }
.side-card { background: #ffffff; border: 2px solid var(--navy); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.side-h { font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--navy); }
.how-list { display: flex; flex-direction: column; gap: 14px; list-style: none; }
.how-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; }
.how-n { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.how-list li > span:last-child { padding-top: 4px; }
.tp-deals { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tp-deal { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 15px; color: var(--navy); }
.tp-deal:has(input:checked) { border-color: var(--navy); background: var(--hilite); font-weight: 700; }
.tp-deal input { width: 20px; height: 20px; accent-color: var(--navy); margin: 0; }
.side-card .btn { width: 100%; }
.tp-saved { font-size: 13px; color: var(--grey); min-height: 16px; }
.side-plain { padding: 4px 6px; display: flex; flex-direction: column; gap: 6px; }
.side-eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey); }
.also-list { display: flex; flex-direction: column; list-style: none; }
.also-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px; border-radius: 8px; text-decoration: none; color: var(--navy); font-size: 15px; }
.also-link:hover { background: var(--hover); }

/* ---------- Tools library ---------- */
.lib { max-width: 1320px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.lib-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.lib-title { display: flex; flex-direction: column; gap: 8px; }
.lib-intro { font-size: 17px; color: var(--grey); }
.lib-search { position: relative; display: flex; align-items: center; width: 420px; max-width: 100%; }
.lib-search input { height: 48px; }
.lib-kinds { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.lib-kinds-l { font-size: 14px; font-weight: 700; color: var(--navy); margin-right: 4px; }
.lib-kinds .pill { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; font-size: 15px; }
.lib-kinds .pill .ic { width: 16px; height: 16px; }
.pill-n { font-weight: 400; color: var(--grey); }
.lib-kinds .pill[aria-pressed="true"] .pill-n { color: var(--gold); }
.lib-body { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 40px; align-items: start; }
.lib-rail { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; }
.rail-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey); padding: 0 12px 8px; }
.rail-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px; border-radius: 10px; text-decoration: none; color: var(--navy); font-size: 15px; }
.rail-link:hover { background: var(--hover); }
.rail-link--ai { background: #ffffff; box-shadow: inset 4px 0 0 var(--gold-deep); font-weight: 700; }
.rail-ic { width: 26px; height: 26px; border-radius: 8px; background: var(--navy); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; }
.rail-ic .ic { width: 15px; height: 15px; }
.rail-num { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--navy); background: #ffffff; color: var(--navy); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: 0 0 26px; }
.rail-n { font-size: 13px; color: var(--grey); font-weight: 400; }
.rail-rule { height: 1px; background: var(--line); margin: 10px 12px; }
.lib-rail .rail-name, .ai-rail .rail-name { white-space: normal; overflow: visible; line-height: 1.2; font-size: 15px; }
.your-step { font-size: 11px; font-weight: 700; color: var(--navy); background: var(--gold); border-radius: 9px; padding: 2px 7px; margin-left: 6px; }
.lib-main { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.ai-group { background: var(--navy); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 24px; }
.ai-head { display: flex; align-items: center; gap: 12px; }
.ai-head-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--gold); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; }
.ai-head h2 { font-family: var(--serif); font-weight: 600; font-size: 26px; color: #ffffff; }
.ai-head-n { margin-left: auto; font-size: 14px; color: #c8d3df; }
.ai-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ai-card { text-decoration: none; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; min-height: 176px; transition: transform .12s ease, box-shadow .12s ease; }
.ai-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3); }
.ai-card-name { font-size: 16px; font-weight: 700; color: #ffffff; line-height: 1.25; }
.ai-card-line { font-size: 14px; color: #c8d3df; line-height: 1.4; }
.ai-card-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.ai-meter { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.ai-meter-fill { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 3px; }
.ai-card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--gold); }
.ai-counter { font-size: 13px; font-weight: 700; color: var(--gold); }
.lib-step { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 24px; }
.lib-step-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.step-badge { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 600; font-size: 18px; }
.lib-step-head h2 { font-family: var(--serif); font-weight: 600; font-size: 24px; color: var(--navy); }
.lib-step-n { font-size: 14px; color: var(--grey); }
.tcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tcard { text-decoration: none; background: #ffffff; border: 2px solid var(--navy); border-radius: 12px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; min-height: 88px; transition: transform .12s ease, box-shadow .12s ease; }
.tcard:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 41, 80, 0.16); }
.tcard-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--cream); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; color: var(--navy); }
.tcard-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tcard-name { font-size: 16px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.tcard-kind { font-size: 13px; color: var(--grey); }
.tcard-line { font-size: 14px; line-height: 1.4; color: var(--ink); }
.tcard-go { display: inline-flex; margin-top: 2px; color: var(--navy); }
.lib-none { font-size: 17px; color: var(--grey); }

/* ---------- AI tool page ---------- */
.ai-page { max-width: 1320px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; align-items: start; }
.ai-rail-wrap { position: sticky; top: 24px; }
.ai-rail-sum { display: none; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 2px solid var(--navy); border-radius: 10px; background: #ffffff; font-weight: 700; color: var(--navy); cursor: pointer; list-style: none; }
.ai-rail-sum::-webkit-details-marker { display: none; }
.ai-rail { display: flex; flex-direction: column; gap: 2px; }
.rail-back { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; margin-bottom: 14px; border: 2px solid var(--navy); border-radius: 10px; background: #ffffff; color: var(--navy); font-weight: 700; font-size: 15px; text-decoration: none; }
.rail-sub { display: flex; flex-direction: column; gap: 1px; padding: 6px 12px 6px 48px; border-radius: 8px; text-decoration: none; color: var(--navy); font-size: 14px; }
.rail-sub:hover { background: var(--hover); }
.rail-sub[aria-current] { background: var(--hilite); font-weight: 700; box-shadow: inset 4px 0 0 var(--gold-deep); }
.rail-sub-n { font-size: 12px; color: var(--grey); font-weight: 400; }
.ai-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--grey); flex-wrap: wrap; }
.crumbs a { color: var(--navy); }
.ai-hero { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.ai-hero-main { flex: 1 1 360px; display: flex; flex-direction: column; gap: 10px; }
.ai-hero-t { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ai-tag { background: var(--navy); color: var(--gold); border-color: var(--navy); font-weight: 700; }
.ai-count { flex: 0 0 280px; background: var(--navy); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.ai-count-n { font-size: 17px; font-weight: 700; color: var(--gold); line-height: 1.35; min-height: 24px; }
.ai-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ai-uses { margin-left: auto; font-size: 14px; color: var(--grey); }
.ai-result { background: #ffffff; color: var(--ink); border: 2px solid var(--navy); }
.ai-res-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ai-res-head h2, .ai-res-h { font-family: var(--serif); font-weight: 600; font-size: 26px; color: var(--navy); }
.ai-res-sum { font-size: 15px; color: var(--grey); }
.verdict-badge { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 20px; font-size: 15px; font-weight: 700; background: var(--gold); color: var(--navy); }
.verdict-badge.is-yes { background: #cfeedd; color: #15663f; }
.verdict-badge.is-no { background: #f7d6d3; color: #8a1c1c; }
.verdict-badge.is-maybe { background: var(--gold); color: var(--navy); }
.ai-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ai-fact { background: #faf6ec; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.ai-fact-l { font-size: 13px; color: var(--grey); }
.ai-fact-v { font-family: var(--serif); font-size: 22px; color: var(--navy); }
.ai-lines { display: flex; flex-direction: column; list-style: none; }
.ai-line { display: grid; grid-template-columns: 170px minmax(0, 1fr) 84px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ai-line-l { font-weight: 700; color: var(--navy); }
.ai-line-t { font-size: 15px; line-height: 1.45; }
.ai-line-s { justify-self: end; font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 12px; background: #cfeedd; color: #15663f; }
.ai-line.is-caution .ai-line-s { background: #fbe9bd; color: #7a5d14; }
.ai-line.is-fail .ai-line-s { background: #f7d6d3; color: #8a1c1c; }
.ai-sec { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.ai-sec h3 { font-family: var(--serif); font-size: 19px; color: var(--navy); }
.ai-sec-body { display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.5; }
.ai-kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 6px 14px; }
.ai-kv dt { font-weight: 700; color: var(--navy); text-transform: capitalize; }
.ai-kv dd { margin: 0; }

/* ---------- phones and small laptops ---------- */
@media (max-width: 1180px) {
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-side { position: static; }
  .ai-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .main--tool { padding: 24px 16px 48px; }
  .tool-top { flex-direction: column; align-items: stretch; }
  .h1--tool { font-size: 32px; }
  .tp-card { padding: 18px 16px; }
  .tp-grid--2, .tp-grid--3, .tp-clause-cols { grid-template-columns: minmax(0, 1fr); }
  .tp-result { padding: 20px 16px; }
  .tp-hero { flex: 1 1 100%; }
  .tp-tiles { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .tp-tile { border-left: 0; padding: 0; }
  .tp-tile-val { font-size: clamp(16px, 14cqi, 28px); }
  .tp-verdict h2 { font-size: 30px; }
  .tp-toggle-note { margin-left: 0; }
  .lib-body { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .lib-rail { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .lib-rail .rail-eyebrow, .lib-rail .rail-rule { display: none; }
  .lib-rail .rail-link { border: 1px solid var(--line); background: #ffffff; min-height: 44px; }
  .lib-rail .rail-n { display: none; }
  .ai-grid, .tcards { grid-template-columns: minmax(0, 1fr); }
  .lib-search { width: 100%; }
  .ai-page { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ai-rail-wrap { position: static; }
  .ai-rail-sum { display: flex; }
  .ai-rail-wrap:not([open]) .ai-rail { display: none; }
  .ai-count { flex: 1 1 100%; }
  .ai-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-line { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ai-line-s { justify-self: start; }
  .ai-kv { grid-template-columns: minmax(0, 1fr); }
  .tp-table--rows thead { display: none; }
  .tp-table--rows tr, .tp-table--rows td { display: block; width: 100%; }
  .tp-table--rows tr[data-row] { border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-bottom: 12px; }
  .tp-table--rows td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--grey); margin-bottom: 2px; }
  .tp-table--rows .tp-row-x::before { content: none; }
  .tp-q legend, .tp-q > label { flex-basis: 100%; }
}

/* ---------- print: the tool body only ---------- */
@media print {
  body.tool-view .side, body.tool-view .topbar, body.tool-view .tool-top, body.tool-view .tool-side, body.tool-view .tp-actions, body.tool-view [data-row-add], body.tool-view [data-row-remove], body.tool-view [data-copy], body.tool-view .ai-rail-wrap { display: none !important; }
  body.tool-view .main--tool { padding: 0; }
  body.tool-view .tool-grid { display: block; }
  body.tool-view .tp-result { background: #ffffff; color: #000000; border: 2px solid #000000; }
  body.tool-view .tp-result * { color: #000000 !important; }
  body.tool-view .tp-card, body.tool-view .tp-block { break-inside: avoid; }
  body.tool-view .tp-doc { max-height: none; overflow: visible; }
}

/* ---------- Recordings (frames F/Rec-B-home, F/Rec-B-lesson, F/Rec-B-lesson-text) ---------- */
.rc { max-width: 1320px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.rc-head, .rc-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.rc-top { align-items: center; }
.rc-title { display: flex; flex-direction: column; gap: 8px; }
.rc-intro { font-size: 17px; color: var(--grey); }
.rc-search { position: relative; display: flex; align-items: center; width: 420px; max-width: 100%; }
.rc-search input { width: 100%; height: 48px; border: 2px solid var(--navy); border-radius: 10px; padding: 0 16px 0 44px; font-size: 16px; color: var(--ink); background: #ffffff; }
.rc-top .rc-search { flex: 1; width: auto; }
.rc-body { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 32px; align-items: start; }
.rc--lesson .rc-body { grid-template-columns: 340px minmax(0, 1fr); }
.rc-nav { background: #ffffff; border: 2px solid var(--navy); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; }
.rc-progress { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.rc-progress-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rc-progress-l { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey); }
.rc-progress-n { font-size: 15px; font-weight: 700; color: var(--navy); }
.rc-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.rc-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.rc-dot.is-done { background: var(--navy); }
.rc-mod { border-top: 1px solid var(--line); }
.rc-mod:first-of-type { border-top: 0; }
.rc-mod summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; cursor: pointer; list-style: none; background: #faf6ec; }
.rc-mod summary::-webkit-details-marker { display: none; }
.rc-mod-n { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: 0 0 26px; }
.rc-mod-ic { width: 26px; height: 26px; border-radius: 8px; background: var(--navy); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; }
.rc-mod-ic .ic { width: 15px; height: 15px; }
.rc-mod-t { flex: 1; font-weight: 700; color: var(--navy); font-size: 15px; }
.rc-mod-c { font-size: 13px; color: var(--grey); }
.rc-chev { display: inline-flex; color: var(--navy); transition: transform .15s ease; }
.rc-mod[open] .rc-chev { transform: rotate(180deg); }
.rc-lessons { display: flex; flex-direction: column; }
.rc-lesson { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); }
.rc-lesson:hover { background: var(--hover); }
.rc-lesson[aria-current], .rc-lesson.is-current { background: var(--hilite); box-shadow: inset 4px 0 0 var(--gold-deep); }
.rc-lic { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; }
.rc-lic .ic { width: 14px; height: 14px; }
.rc-lesson.is-done .rc-lic { background: var(--hilite); color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.rc-lkey { font-size: 14px; font-weight: 700; color: var(--eyebrow); min-width: 26px; }
.rc-ltitle { flex: 1; min-width: 0; font-size: 15px; color: var(--navy); font-weight: 700; line-height: 1.25; }
.rc-ltitle--stack { display: flex; flex-direction: column; gap: 2px; }
.rc-rdate { font-weight: 700; color: var(--navy); }
.rc-rtopic { font-size: 13px; font-weight: 400; color: var(--grey); }
.rc-ldur { font-size: 13px; color: var(--grey); white-space: nowrap; }
.rc-none { padding: 16px 18px; color: var(--grey); }
.rc-panel { background: #ffffff; border: 2px solid var(--navy); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.rc-thumb { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 240px; padding: 20px; background: linear-gradient(135deg, #002950 0%, #0a3a6b 100%); text-decoration: none; color: #ffffff; }
.rc-thumb-play { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; background: var(--gold); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; }
.rc-thumb-play .ic { width: 30px; height: 30px; }
.rc-thumb-mod { font-size: 14px; color: #c8d3df; }
.rc-thumb-key { font-family: var(--serif); font-size: 28px; }
.rc-panel-main { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 16px; }
.rc-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--eyebrow); }
.rc-eyebrow--sub { color: var(--grey); letter-spacing: 0.04em; text-transform: none; font-size: 14px; }
.rc-panel h2 { font-family: var(--serif); font-weight: 600; font-size: 28px; color: var(--navy); }
.rc-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 15px; color: var(--grey); }
.rc-meta-i { display: inline-flex; align-items: center; gap: 6px; }
.rc-meta-link { color: var(--navy); font-weight: 700; }
.rc-bar { display: flex; flex-direction: column; gap: 8px; }
.rc-bar-top { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; color: var(--navy); }
.rc-track { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.rc-fill { display: block; height: 100%; width: 0; background: var(--navy); border-radius: 5px; }
.rc-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.rc-sec { display: flex; flex-direction: column; gap: 10px; }
.rc-sec h2, .rc-sec h3 { font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--navy); }
.rc-sec--card { background: #ffffff; border: 2px solid var(--navy); border-radius: 16px; padding: 22px 24px; }
.rc-chapters { display: flex; flex-direction: column; list-style: none; }
.rc-chap { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; padding: 6px 10px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; text-decoration: none; color: var(--ink); font-size: 15px; font-family: inherit; }
.rc-chap:hover { background: var(--hover); }
.rc-chap-t { font-weight: 700; color: var(--eyebrow); min-width: 48px; }
.rc-chap-n { flex: 1; color: var(--navy); font-weight: 700; }
.rc-chap-s { font-size: 13px; color: var(--grey); }
.rc-tools { display: flex; flex-direction: column; list-style: none; gap: 8px; }
.rc-tool { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.rc-tool-ic { width: 32px; height: 32px; border-radius: 8px; background: var(--cream); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; }
.rc-tool-name { flex: 1; font-weight: 700; color: var(--navy); }
.rc-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; max-width: 900px; }
.rc-lhead { display: flex; flex-direction: column; gap: 8px; }
.rc-topics { font-size: 17px; color: var(--grey); }
.rc-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.rc-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 16px; background: #ffffff; border: 1px solid var(--line); font-size: 14px; color: var(--navy); }
.rc-step { display: flex; align-items: center; justify-content: space-between; gap: 16px; text-decoration: none; background: var(--gold); border-radius: 14px; padding: 16px 20px; color: var(--navy); }
.rc-step-t { display: flex; flex-direction: column; }
.rc-step-l { font-size: 13px; }
.rc-step-n { font-family: var(--serif); font-size: 20px; }
.rc-step-go { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.rc-pn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rc-pn-a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; background: #ffffff; border: 2px solid var(--navy); border-radius: 14px; padding: 14px 18px; color: var(--navy); }
.rc-pn-a:hover { background: var(--hover); }
.rc-pn-a--next { text-align: right; align-items: flex-end; }
.rc-pn-l { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--grey); }
.rc-pn-t { font-weight: 700; font-size: 16px; }
.rc-pn-s { font-size: 13px; color: var(--grey); }
.pager--top { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 1180px) {
  .rc-body, .rc--lesson .rc-body { grid-template-columns: minmax(0, 1fr); }
  .rc-nav { position: static; max-height: none; }
}
@media (max-width: 899px) {
  .rc-search { width: 100%; }
  .rc-panel-main { padding: 18px 16px 22px; }
  .rc-thumb { min-height: 180px; }
  .rc-pn { grid-template-columns: minmax(0, 1fr); }
  .rc-pn-a--next { text-align: left; align-items: flex-start; }
  .rc-nav .rc-mod { }
}

/* ---------- Learning home: Words we use ---------- */
.words { margin-top: 8px; max-width: 1180px; }
.words-wrap { background: #ffffff; border: 2px solid var(--navy); border-radius: 16px; overflow: hidden; }
.words-sum { display: flex; align-items: center; gap: 12px; padding: 16px 24px; background: var(--navy); cursor: pointer; list-style: none; min-height: 56px; }
.words-sum::-webkit-details-marker { display: none; }
.words-sum h2 { font-family: var(--serif); font-weight: 600; font-size: 20px; color: #ffffff; flex: 1; }
.words-n { font-size: 14px; font-weight: 700; color: var(--gold); }
.words-sum .rc-chev { color: var(--gold); }
.words-wrap[open] .rc-chev { transform: rotate(180deg); }
.words-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; padding: 8px 24px 20px; }
.word { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.word dt { font-weight: 700; color: var(--navy); font-size: 16px; }
.word dd { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
@media (max-width: 899px) { .words-list { grid-template-columns: minmax(0, 1fr); padding: 4px 16px 16px; } .words-sum { padding: 12px 16px; } }

/* ---------- Staff (team-facing, frame tokens) ---------- */
.st { max-width: 1320px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.st-head { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.st-sub { font-size: 15px; color: var(--grey); max-width: 820px; line-height: 1.5; }
.st-gate { font-size: 17px; color: #8a1c1c; }
#st-body { display: flex; flex-direction: column; gap: 24px; }
.st-card { background: #ffffff; border: 2px solid var(--navy); border-radius: 16px; padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.st-h { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--navy); }
.st-h2 { font-family: var(--serif); font-size: 20px; color: var(--navy); margin-top: 8px; }
.st-h3 { font-size: 14px; font-weight: 700; color: var(--grey); margin-top: 10px; }
.st-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.st-counts { font-size: 15px; font-weight: 700; color: var(--navy); }
.st-jobs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.st-job { display: flex; flex-direction: column; gap: 4px; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.st-job.is-stale { border-color: #b4423d; background: #fdf3f2; }
.st-job-t { color: var(--grey); }
.st-bad { color: #8a1c1c; font-weight: 700; }
.st-flag { align-self: flex-start; font-size: 12px; font-weight: 700; color: #ffffff; background: #b4423d; border-radius: 10px; padding: 2px 8px; }
.st-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.st-tools input[type="search"], .st-tools select, .st-field input, .st-field select, .st-field textarea, .st-table input[type="text"] { height: 44px; border: 2px solid var(--navy); border-radius: 10px; padding: 0 12px; font-size: 15px; background: #ffffff; font-family: inherit; color: var(--ink); min-width: 0; }
.st-tools input[type="search"] { width: 320px; max-width: 100%; }
.st-field textarea { height: auto; padding: 10px 12px; }
.st-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; min-height: 44px; cursor: pointer; }
.st-check input { width: 20px; height: 20px; accent-color: var(--navy); }
.st-wrap { position: relative; overflow-x: auto; max-width: 100%; }
.st-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.st-table th, .st-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.st-table thead th { font-size: 12px; color: var(--grey); white-space: nowrap; }
.st-table tbody th { font-weight: 700; color: var(--navy); }
.st-access--disabled { color: #8a1c1c; font-weight: 700; }
.st-access--lapsed, .st-access--cancelling { color: #7a5d14; font-weight: 700; }
.st-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; align-items: end; }
.st-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.st-field--full { grid-column: 1 / -1; }
.st-field label { font-size: 14px; font-weight: 700; color: var(--navy); }
.st-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.st-actions-box { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.st-msg { font-size: 14px; color: var(--navy); }
.st-msg.is-bad { color: #8a1c1c; }
/* Batch 28: the staff page gaps (the fee change member list, the export link, the held events) */
.st-picks { border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.st-picks legend { font-size: 14px; font-weight: 700; color: var(--navy); padding: 0 4px; }
.st-picks .st-check { min-height: 32px; }
.st-link-out { overflow-wrap: anywhere; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.st-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.st-fact { background: #faf6ec; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.st-fact-l { font-size: 12px; color: var(--grey); }
.st-switches { display: flex; gap: 20px; flex-wrap: wrap; }
.st-evidence { display: flex; flex-direction: column; gap: 8px; border-top: 2px solid var(--line); padding-top: 14px; scroll-margin-top: 20px; }
.st-frame { width: 100%; height: 640px; border: 2px solid var(--navy); border-radius: 12px; background: #ffffff; }
@media (max-width: 899px) {
  .st-jobs, .st-facts { grid-template-columns: minmax(0, 1fr); }
  .st-form { grid-template-columns: minmax(0, 1fr); }
  .st-tools input[type="search"], .st-tools select, .st-field input, .st-field select, .st-field textarea { width: 100%; }
}

.st-table--sm { font-size: 13px; }
.rc-lesson.is-progress .rc-ldur { font-weight: 700; color: var(--navy); }
.rc-mod--qa summary { background: #fff8e6; }

.tp-seg label { position: relative; }
.tp-cheat { border-top: 2px solid var(--line); padding-top: 14px; }
.tp-cheat summary { cursor: pointer; font-family: var(--serif); font-size: 18px; color: var(--navy); min-height: 44px; display: flex; align-items: center; }
.tp-cheat h3 { font-size: 15px; font-weight: 700; color: var(--navy); margin: 14px 0 6px; }

/* Batch 4: the saved results list on a tool page, the How to use it card on an AI tool page, and the website builder form */
.saved-list { display: flex; flex-direction: column; gap: 10px; }
.saved-row { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #ffffff; min-width: 0; }
.saved-row-name { font-size: 15px; font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }
.saved-row-meta { font-size: 13px; color: var(--grey); }
.saved-row-line { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.saved-row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.side-card .saved-row-actions .btn { width: auto; flex: 1 1 auto; }
.ai-how .how-list { max-width: 820px; }
.st-form .st-h2 { margin-top: 10px; }
.st-note { font-size: 13px; color: var(--grey); line-height: 1.4; }
.st-runs { font-size: 14px; color: var(--grey); }
@media print { body.tool-view [data-saved-card], body.tool-view .ai-saved { display: none !important; } }

/* ---------- batch 8a (W2): request briefs, Report a problem, file rules, the market slide-out, tool inputs ---------- */
/* request brief drawer */
.req-intro { font-size: 15px; line-height: 1.5; color: var(--ink); }
.req-fields { display: flex; flex-direction: column; gap: 18px; }
.req-attached { background: var(--cream); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.req-attached h3 { font-size: 13px; font-weight: 700; color: var(--grey); text-transform: none; }
.req-att-list { display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.req-att-name { font-weight: 700; color: var(--navy); }
.field-err { font-size: 13px; line-height: 1.4; color: #8a1c1c; font-weight: 700; }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: #8a1c1c; }
.req-done-text, .bug-done-text { font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 1.35; color: var(--navy); }
.req-fields textarea, .req-fields input, .req-fields select, #bug-text, #bug-shot { width: 100%; max-width: 100%; }
/* Report a problem */
.bug-sends { background: var(--cream); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.bug-sends h3 { font-size: 13px; font-weight: 700; color: var(--grey); }
.bug-sends ul { list-style: disc; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.bug-shot-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* deal files: the notice and the limits under the Upload button */
.files-rules { display: flex; flex-direction: column; gap: 4px; margin: 2px 0 10px; }
.files-notice { font-size: 13px; line-height: 1.45; font-weight: 700; color: var(--ink); }
.tp-field .files-notice { display: block; }
/* market: the sandbox slides out from the right, closed by default */
.drawer--try .drawer-panel.market-dock { flex: 0 0 auto; width: min(440px, 100%); border-left: 0; border-top: 0; padding: 0; gap: 0; }
.drawer-head-acts { display: flex; gap: 8px; align-items: center; }
.dock-body { gap: 20px; }
/* the 7 reading tool pages: what to put in, what you get back */
.ai-io { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; }
.ai-io-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ai-io-text { font-size: 15px; line-height: 1.55; max-width: 60ch; }
@media (max-width: 899px) {
  .ai-io { grid-template-columns: minmax(0, 1fr); }
  .drawer--try .drawer-panel.market-dock { width: 100%; padding: 0; border-top: 0; }
}

/* ---------- batch 8b (W2b): Recordings in 2 sections, the workshop video slot, the community cards, the footer links, the public pages ---------- */
.rc-body--two { grid-template-columns: minmax(0, 1fr) 380px; }
.rc-lists { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.rc-section { background: #ffffff; border: 2px solid var(--navy); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.rc-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 22px; background: var(--navy); }
.rc-section-head h2 { font-family: var(--serif); font-weight: 600; font-size: 24px; color: #ffffff; }
.rc-section-c { font-size: 14px; font-weight: 700; color: var(--gold); }
.rc-empty { padding: 18px 22px; font-size: 16px; line-height: 1.5; color: var(--grey); }
.rc-rows { display: flex; flex-direction: column; }
.rc-row { display: flex; flex-direction: column; gap: 6px; padding: 14px 22px 16px; border-top: 1px solid var(--line); min-width: 0; }
.rc-rows .rc-row:first-child { border-top: 0; }
.rc-row-main { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; color: var(--navy); }
.rc-row-main:hover .rc-row-t { text-decoration: underline; }
.rc-row-t { flex: 1; min-width: 0; font-size: 17px; font-weight: 700; color: var(--navy); line-height: 1.3; overflow-wrap: anywhere; }
.rc-row-title { font-size: 15px; font-weight: 700; color: var(--navy); }
.rc-row-d, .rc-row-goes { font-size: 15px; line-height: 1.5; color: var(--ink); padding-left: 40px; overflow-wrap: anywhere; }
.rc-row-state { font-size: 14px; font-weight: 700; color: var(--eyebrow); padding-left: 40px; }
.rc-row.is-done .rc-lic { background: var(--hilite); color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.lnk-inline { color: var(--navy); font-weight: 700; }
.rc--solo .rc-main { max-width: 900px; }
.rc-chap--plain { cursor: default; }
.rc-chap--plain:hover { background: none; }
.rc-goes { gap: 14px; }
.rc-goes-line { font-size: 16px; line-height: 1.5; color: var(--ink); }
.lesson-video { display: flex; flex-direction: column; gap: 12px; }
.lesson-video-also { font-size: 16px; line-height: 1.5; color: var(--ink); }
.step-card-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.step-card .note { padding: 0; }
.step-card.is-joined .panel-head { background: var(--navy-2); }
.card-community { grid-column: 1 / -1; }
.hub-foot { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; }
.hub-foot a { color: var(--grey); text-decoration: underline; min-height: 24px; display: inline-flex; align-items: center; }
.hub-foot a:hover { color: var(--navy); }
.pub-body { min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 32px 16px; background: var(--cream); }
.pub-card { width: 100%; max-width: 860px; background: #ffffff; border: 2px solid var(--navy); border-radius: 16px; overflow: hidden; }
.pub-inner { padding: 32px 36px 40px; }
.prose--notice { gap: 28px; }
.prose--notice p, .prose--notice li, .prose--notice td { overflow-wrap: anywhere; }
.prose--notice .prose-table td, .prose--notice .prose-table th { font-size: 15px; line-height: 1.5; vertical-align: top; }
.pub-col { flex-direction: column; gap: 16px; }
.pub-foot { width: 100%; max-width: 860px; border-top: 0; padding-top: 0; justify-content: center; }
.optout { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; padding: 20px; border: 2px solid var(--navy); border-radius: 12px; background: var(--hilite); }
.optout-gpc { width: 100%; }
.optout-form { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.optout-row { display: flex; gap: 10px; align-items: center; width: 100%; }
.optout-row .input { flex: 1 1 auto; min-width: 0; }
.optout-row .btn { flex: 0 0 auto; }
@media (max-width: 899px) {
  .rc-body--two { grid-template-columns: minmax(0, 1fr); }
  .rc-section-head { padding: 14px 16px; }
  .rc-empty { padding: 16px; }
  .rc-row { padding: 12px 16px 14px; }
  .rc-row-d, .rc-row-goes, .rc-row-state { padding-left: 0; }
  .pub-body { padding: 16px 12px; }
  .pub-inner { padding: 22px 16px 28px; }
  .prose--notice h1.h1 { font-size: 32px; }
  .optout { padding: 16px; }
  .optout-row { flex-direction: column; align-items: stretch; }
}
/* batch 8b: the 2 privacy links in the Menu nav (side-foot) */
.side-legal { display: flex; flex-direction: column; gap: 0; padding: 10px 12px 0; margin-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.side-legal a { display: inline-flex; align-items: center; min-height: 32px; font-size: 13px; line-height: 1.3; color: var(--side-text); text-decoration: underline; }
.side-legal a:hover { color: #ffffff; }
/* batch 8b: the step panels built on intro-body (Step 1 community card, Step 2 lender intro) get inner padding; on phones the Recordings "pick up where you left off" panel comes first */
.intro-body { padding: 16px 24px 20px; display: flex; flex-direction: column; gap: 14px; }
.intro-text { font-size: 16px; line-height: 1.5; color: var(--ink); }
@media (max-width: 899px) {
  .intro-body { padding: 14px 16px 18px; }
  .rc-body--two .rc-panel { order: -1; }
}

/* ---------- batch 9 (W2): onboarding card beside the community card, the staff page parts ---------- */
/* Home: the community and onboarding cards sit side by side (1 column each); a lone community card keeps the full row */
.home-grid .card-community:has(+ .card-onboarding) { grid-column: auto; }
.card-onboarding[data-state="booked"] .card-title { color: var(--navy-2); }
.step-card[data-state="booked"] .panel-head { background: var(--navy-2); }
/* staff: the bug report context */
.st-list { list-style: decimal; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.st-list--code { list-style: disc; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.st-bug-text { font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
#st-dl { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
#st-dl .st-field { min-width: 0; flex: 1 1 260px; }
#st-request-body, #st-bug-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
@media (max-width: 899px) {
  #dl-gb, #rq-note, #bg-note, #bug-filter { width: 100%; }
}

/* batch 10 (W2): the bug screenshot inside the staff page */
.st-shot { display: block; max-width: min(100%, 640px); height: auto; border: 2px solid var(--line); border-radius: 10px; }
/* batch 10 (W2): the bot check on the sign-in form (only shown when the server turns it on) */
.bot-check { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.bot-widget { min-height: 65px; max-width: 100%; overflow: hidden; }

/* batch 14 (W2): the fully onboarded marker on the staff page */
.st-onb-list { display: flex; flex-wrap: wrap; gap: 4px 6px; list-style: none; padding: 0; margin: 4px 0 0; }
.st-onb { font-size: 12px; line-height: 1.3; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.st-onb.is-yes { background: #e6f2ea; border-color: #2e7d4f; color: #1d5a37; }
.st-onb.is-no { background: #fbeaea; border-color: #8a1c1c; color: #8a1c1c; }
.st-onb.is-unknown { background: #f3f3f3; color: var(--grey); border-style: dashed; }
.st-onb-sum { font-size: 13px; }
.st-onb-cell { min-width: 220px; }
.st-onb-box { display: flex; flex-direction: column; gap: 8px; }

/* W2 batch 18: /terms/ (Membership terms and cancellation), the agreement quoted at build time */
.terms { display: flex; flex-direction: column; gap: 28px; max-width: 820px; margin-top: 20px; }
.terms-sec { display: flex; flex-direction: column; gap: 14px; }
.terms-h { font-size: 20px; color: var(--navy); margin: 0; }
.terms-h3 { font-size: 14px; letter-spacing: 0.04em; color: var(--navy); margin: 0 0 8px; }
.terms-part { font-size: 16px; line-height: 1.6; color: var(--ink); margin: 0; overflow-wrap: anywhere; }
.terms-tablewrap { position: relative; overflow-x: auto; }
.terms-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.terms-table th, .terms-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.terms-table thead th { font-size: 13px; color: var(--grey); }
.terms-table tbody th { font-weight: 700; color: var(--navy); white-space: nowrap; }
.terms-close { display: flex; flex-direction: column; gap: 12px; max-width: 820px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.terms-close p { margin: 0; }
@media (max-width: 600px) {
  .terms-table thead { display: none; }
  .terms-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .terms-table th, .terms-table td { display: block; padding: 2px 0; border: 0; }
  .terms-table tbody th { white-space: normal; }
}

/* W2 batch 19 (LEARNING-REDESIGN-SPEC.md 2.3 and 2.6): the Learning course player and the Words we use page. The old Learning
   rules (.learn-grid, .step-*, .rail*, .lesson-layout, .lesson-aside, .lesson-list, .lesson-item, .lesson-row, .lesson-mini,
   .doit-left, .doit-right, .read-bar, .words-wrap, .words-sum) stay in this file unused; nothing was deleted. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.player { display: grid; grid-template-columns: 320px minmax(0, 760px); gap: 32px; align-items: start; }
.player-main { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.outline { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; background: #ffffff; border: 2px solid var(--navy);
  border-radius: 14px; display: flex; flex-direction: column; }
.outline-title { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #ffffff; background: var(--navy); padding: 12px 16px; }
.outline-close, .lessons-toggle, .outline-backdrop { display: none; }
.mod { border-top: 1px solid var(--line); }
.mod:first-of-type { border-top: 0; }
.mod > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; cursor: pointer; list-style: none; }
.mod > summary::-webkit-details-marker { display: none; }
.mod > summary:hover { background: var(--hover); }
.mod .step-dot { flex: 0 0 26px; width: 26px; height: 26px; font-size: 12px; }
.mod .step-dot .ic { width: 14px; height: 14px; }
.mod.is-done .step-dot { background: var(--navy); border-color: var(--navy); color: var(--gold); }
.mod.is-done .step-dot .ic { display: block; }
.mod.is-done .step-dot span { display: none; }
.mod[open] .step-dot { border-color: var(--navy); }
.mod-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; color: var(--navy); }
.mod-count { font-size: 12.5px; color: var(--grey); white-space: nowrap; }
.mod-lessons { display: flex; flex-direction: column; padding: 0 0 8px; }
.mod-lesson { display: grid; grid-template-columns: 26px 30px minmax(0, 1fr); align-items: center; column-gap: 8px; row-gap: 2px; min-height: 48px;
  padding: 6px 14px 6px 24px; text-decoration: none; color: var(--ink); }
.mod-lesson:hover { background: var(--hover); }
.mod-lesson .dot { grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ring); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; }
.mod-lesson .dot .ic { width: 13px; height: 13px; }
.mod-num { grid-row: span 2; font-size: 13px; font-weight: 700; color: var(--eyebrow); }
.mod-title { font-size: 14.5px; line-height: 1.3; color: var(--ink); }
.mod-time { font-size: 12.5px; color: var(--grey); }
.mod-lesson.is-current { background: var(--hilite); box-shadow: inset 4px 0 0 var(--gold-deep); }
.mod-lesson.is-current .mod-title { font-weight: 700; color: var(--navy); }
.mod-lesson.is-read .dot { background: var(--navy); border-color: var(--navy); color: var(--gold); }
.mod-lesson.is-read .dot .ic { display: none; }
.mod-lesson.is-read .dot::after { content: ""; width: 10px; height: 6px; border-left: 2.5px solid var(--gold); border-bottom: 2.5px solid var(--gold); transform: translateY(-1px) rotate(-45deg); }
.lesson-head { display: flex; flex-direction: column; gap: 10px; }
.course-progress { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.course-count { font-size: 14px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.course-progress progress { flex: 1; min-width: 120px; height: 10px; border: 0; border-radius: 5px; background: var(--line); overflow: hidden; -webkit-appearance: none; appearance: none; }
.course-progress progress::-webkit-progress-bar { background: var(--line); border-radius: 5px; }
.course-progress progress::-webkit-progress-value { background: var(--navy); border-radius: 5px; }
.course-progress progress::-moz-progress-bar { background: var(--navy); border-radius: 5px; }
.start-here { background: var(--hilite); border: 2px solid var(--gold-deep); border-radius: 14px; padding: 18px 22px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.start-here-title { font-size: 17px; font-weight: 700; color: var(--navy); }
.start-here-line { font-size: 16px; line-height: 1.5; color: var(--ink); }
.before { background: #ffffff; border: 2px solid var(--navy); border-radius: 14px; padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.before h2, .doit--player h2, .lesson-tools h2 { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.2; color: var(--navy); }
.before-line, .doit-line { font-size: 15.5px; line-height: 1.5; color: var(--grey); }
.before-list, .do-list { display: flex; flex-direction: column; gap: 4px; }
.do-item, .before-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.do-item:first-child, .before-item:first-child { border-top: 0; }
.do-item > input[type="checkbox"] { flex: 0 0 22px; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); cursor: pointer; }
.do-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.do-text { font-size: 16px; line-height: 1.5; color: var(--ink); }
.before-tick { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 5px; border: 2px solid var(--ring); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.before-tick .ic { width: 14px; height: 14px; stroke-width: 3; visibility: hidden; }
.before-item.is-done .before-tick { background: var(--navy); border-color: var(--navy); }
.before-item.is-done .before-tick .ic { visibility: visible; }
.before-title { font-size: 16px; font-weight: 700; color: var(--navy); }
.before-text { font-size: 15.5px; line-height: 1.5; color: var(--ink); }
.before .note, .doit--player .note { padding: 0; }
.doit.doit--player { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px; background: #ffffff; border: 2px solid var(--navy); border-radius: 14px; }
.doit--player .how-title { font-size: 17px; font-weight: 700; color: var(--navy); margin-top: 10px; padding-top: 16px; border-top: 2px solid var(--line); }
.do-action { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.do-action-line { font-size: 14.5px; line-height: 1.45; color: var(--grey); }
.lesson-tools { display: flex; flex-direction: column; gap: 14px; }
.tool-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tool-card { background: #ffffff; border: 2px solid var(--navy); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.tool-card-head { display: flex; align-items: center; gap: 10px; }
.tool-card .tool-ic { flex-basis: 32px; width: 32px; height: 32px; }
.tool-card-name { font-size: 16px; font-weight: 700; color: var(--navy); }
.tool-card-line { font-size: 14.5px; line-height: 1.45; color: var(--ink); flex: 1; }
.tool-card-tag { font-size: 12.5px; font-weight: 700; color: var(--eyebrow); background: var(--hilite); border-radius: 999px; padding: 3px 10px; }
/* Batch 20 (visual QA): the pager has the same 2 rows on every lesson: Mark lesson done centered on top, then Previous on the left
   and Next on the right, each as wide as its label (the first lesson has no Previous, the last no Next). It was a wrapping flex row:
   long labels pushed Next alone onto a second row and Mark lesson done floated in the gap. */
.player .pager { display: grid; grid-template-columns: auto auto; grid-template-areas: "mark mark" "prev next"; justify-content: space-between; column-gap: 12px; row-gap: 16px; align-items: center; }
.player .pager .pager-prev { grid-area: prev; justify-self: start; }
.player .pager #mark-read { grid-area: mark; justify-self: center; }
.player .pager .pager-next { grid-area: next; justify-self: end; }
/* a button label that wraps keeps padding above and below it (single-line buttons keep their height: min-height governs) */
.player .btn { padding-top: 9px; padding-bottom: 9px; line-height: 1.3; max-width: 100%; }
.term { text-decoration: underline dotted; text-underline-offset: 3px; color: inherit; }
.prose a.term { font-weight: inherit; }
.card-sub { font-size: 14px; color: var(--grey); }
/* Words we use */
.az { display: flex; flex-wrap: wrap; gap: 6px; max-width: 1000px; }
.az a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; border: 2px solid var(--navy);
  border-radius: 10px; background: #ffffff; color: var(--navy); font-weight: 700; text-decoration: none; }
.az a:hover { background: var(--hover); }
.words-page { display: flex; flex-direction: column; gap: 24px; max-width: 1000px; }
.az-group { background: #ffffff; border: 2px solid var(--navy); border-radius: 16px; overflow: hidden; scroll-margin-top: 16px; }
.az-group > h2 { font-family: var(--serif); font-weight: 600; font-size: 22px; color: #ffffff; background: var(--navy); padding: 12px 24px; }
.words-page .words-list { grid-template-columns: minmax(0, 1fr); }
.word { scroll-margin-top: 16px; }
.word:target { background: var(--hilite); }
.word-first { font-size: 14px; color: var(--grey); }
.word-first a { font-weight: 700; }
@media (max-width: 1180px) and (min-width: 900px) {
  .player { grid-template-columns: 270px minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 899px) {
  .player { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .outline { position: fixed; inset: 0 auto 0 0; width: min(360px, 88vw); max-height: none; height: 100%; border-radius: 0; border-width: 0 2px 0 0;
    transform: translateX(-100%); transition: transform .18s ease; z-index: 60; }
  .outline.is-open { transform: none; }
  .outline-close { display: inline-flex; align-self: flex-end; margin: 10px 12px 6px; }
  .outline.is-open + .outline-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 41, 80, 0.45); z-index: 59; }
  .lessons-toggle { display: inline-flex; margin-left: auto; }
  .course-progress progress { order: 3; flex-basis: 100%; }
  .tool-cards { grid-template-columns: minmax(0, 1fr); }
  .before, .doit.doit--player { padding: 18px 16px; }
  .player .pager { display: flex; flex-direction: column-reverse; align-items: stretch; }
  .player .pager .btn { width: 100%; text-align: center; }
  .player .pager #mark-read { margin: 0; }
}
@media print {
  .outline, .outline-backdrop, .lessons-toggle { display: none !important; }
  .player { grid-template-columns: minmax(0, 1fr); }
}

/* W2 batch 30: the Admin view-as banner (view-as.js). Fixed at the top while a team member views the hub as a member; the
   member's page below is unchanged, only moved down by the banner's height (body.has-va), with the sticky menu, the drawers
   and the phone menu and lessons list starting below it, so nothing of the member's page hides under the banner. */
:root { --va-h: 56px; }
.va-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 80; height: var(--va-h); display: flex; align-items: center; justify-content: center;
  gap: 16px; padding: 0 16px; background: var(--gold); color: var(--navy); border-bottom: 2px solid var(--navy); font-weight: 700; font-size: 15px; }
.va-banner .btn { min-height: 40px; }
body.has-va { padding-top: var(--va-h); }
body.has-va .side { top: var(--va-h); height: calc(100vh - var(--va-h)); }
body.has-va .drawer { top: var(--va-h); }
@media (max-width: 899px) {
  body.has-va.menu-open .side { top: var(--va-h); height: calc(100% - var(--va-h)); }
  body.has-va .outline { top: var(--va-h); height: calc(100% - var(--va-h)); }
  body.has-va .outline.is-open + .outline-backdrop { top: var(--va-h); }
}
@media (max-width: 640px) { .va-banner { font-size: 13px; gap: 10px; } }
@media print { .va-banner { display: none !important; } body.has-va { padding-top: 0; } }
