/* =====================================================================
   Breaking Point — Consulting Case Prep
   Design system: crisp white canvas, Inter throughout, one confident blue
   accent, soft borders and shadows, generous spacing. Phone and tablet
   adjustments live in the media queries at the end.
   ===================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  /* Neutrals */
  --bg: #ffffff;
  --bg-subtle: #f7f8fa;
  --bg-muted: #f1f3f6;
  --border: #e6e8ec;
  --border-strong: #d4d8df;
  --text: #0b0d12;
  --text-2: #3f4652;
  --text-3: #6b7280;

  /* Brand */
  --accent: #2457f5;
  --accent-hover: #1b47d8;
  --accent-ink: #14286b;
  --accent-soft: #edf2ff;
  --accent-soft-2: #d9e3ff;

  /* Status */
  --easy: #15803d;
  --medium: #b45309;
  --hard: #dc2626;

  /* Shape */
  --r-sm: 8px;
  --r: 10px;
  --r-lg: 12px;
  --shadow-sm: 0 0 #0000;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 6px 16px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, 0.14);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --header-h: 64px;
  --measure: 44rem;

  /* Aliases used by inline styles and scripts */
  --ink: var(--text);
  --paper: var(--bg);
  --muted: var(--text-2);
  --faint: var(--text-3);
  --rule: var(--border);
  --panel: var(--bg-subtle);
  --panel-strong: var(--bg-muted);
  --card: var(--bg);
  --ui: var(--font);
  --serif: var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
::selection { background: var(--accent-soft-2); }
::placeholder { color: var(--text-3); opacity: 1; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { color: var(--text); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: 2.6rem; line-height: 1.1; letter-spacing: -0.035em; }
h2 { font-size: 1.6rem; line-height: 1.25; margin: 2.6rem 0 0.8rem; }
h3 { font-size: 1.15rem; line-height: 1.35; margin: 1.6rem 0 0.5rem; }
h4 { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin: 0 0 0.4rem; }
p { margin: 0.8rem 0; max-width: var(--measure); color: var(--text-2); }
ul, ol { color: var(--text-2); padding-left: 1.3rem; max-width: var(--measure); }
li { margin: 0.25rem 0; }
strong, b { color: var(--text); font-weight: 600; }
em { font-style: italic; }
code, kbd { font-family: var(--mono); font-size: 0.86em; }
kbd { border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0 0.35em; background: var(--bg-subtle); color: var(--text-2); }
.muted { color: var(--text-3); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
article { padding: 2.8rem 0 5rem; }

p.subtitle { font-size: 1.15rem; line-height: 1.6; color: var(--text-2); margin: 0.8rem 0 2rem; max-width: 40rem; }
.note { font-size: 0.92rem; line-height: 1.55; color: var(--text-3); }

/* ---------- Buttons, chips, fields ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font: 600 0.92rem/1.2 var(--font); letter-spacing: -0.005em;
  color: #fff; background: var(--accent); border: 1px solid var(--accent);
  padding: 0.6rem 1rem; border-radius: var(--r-sm); cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-sm); transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}
a.btn, a.btn:hover { color: #fff; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn.ghost, a.btn.ghost { color: var(--text); background: var(--bg); border-color: var(--border-strong); }
.btn.ghost:hover, a.btn.ghost:hover { color: var(--text); background: var(--bg-subtle); border-color: var(--text-3); }
.btn.lg { padding: 0.8rem 1.3rem; font-size: 1rem; border-radius: 10px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.linkish { font: 600 0.9rem var(--font); background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; }
.linkish:hover { color: var(--accent-hover); text-decoration: underline; }

.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.chip {
  font: 500 0.86rem/1.2 var(--font); color: var(--text-2); background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 0.4rem 0.8rem; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--text-3); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: #fff; }
.chip:disabled { opacity: 0.45; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.field label, .field .label { font: 600 0.78rem var(--font); color: var(--text-2); }
input[type="text"], input[type="search"], input[type="password"], input[type="email"], input:not([type]), select {
  font: 400 0.95rem var(--font); color: var(--text); background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 0.6rem 0.75rem; width: 100%;
  outline: none; box-shadow: var(--shadow-sm); transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft-2); }
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.7rem center;
}
.status { font-size: 0.9rem; color: var(--text-3); min-height: 1.4rem; margin: 0.6rem 0 0.2rem; }
.status.ok { color: var(--easy); }
.status.err { color: var(--hard); }

.diff { font: 600 0.78rem var(--font); display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.55rem; border-radius: 999px; }
.diff::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.diff.easy { color: var(--easy); background: #ecfdf3; }
.diff.medium { color: var(--medium); background: #fff7ed; }
.diff.hard { color: var(--hard); background: #fef2f2; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.82); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 2rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand small { display: none; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.tabs { display: flex; gap: 0.25rem; }
.tabs a { font-weight: 500; font-size: 0.92rem; color: var(--text-2); padding: 0.45rem 0.8rem; border-radius: var(--r-sm); transition: background 0.15s, color 0.15s; }
.tabs a:hover { color: var(--text); background: var(--bg-subtle); }
.tabs a[aria-current="page"] { color: var(--text); background: var(--bg-muted); }
.header-cta { margin-left: auto; }

/* ---------- Footer ---------- */

footer { border-top: 1px solid var(--border); background: var(--bg-subtle); color: var(--text-3); font-size: 0.88rem; padding: 2rem 0; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
footer a { color: var(--text-2); }
footer a:hover { color: var(--text); }
.foot-brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text); font-weight: 600; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; }

/* ---------- Landing (Learn tab) ---------- */

.section-head { margin: 4.5rem 0 1.5rem; }
.section-head .kicker { font: 600 0.82rem var(--font); color: var(--accent); margin: 0 0 0.4rem; }
.section-head h2 { margin: 0; font-size: 1.6rem; letter-spacing: -0.03em; }
.section-head p { margin: 0.5rem 0 0; }

.learn-cards { list-style: none; padding: 0; margin: 0; max-width: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.learn-cards li { margin: 0; }
.learn-cards a {
  display: flex; flex-direction: column; height: 100%; padding: 1.4rem; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.learn-cards a:hover { border-color: var(--accent-soft-2); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--text); }
.learn-cards .n { font: 700 0.8rem var(--font); color: var(--accent); background: var(--accent-soft); width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.learn-cards .t { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.02em; margin: 0.9rem 0 0.35rem; }
.learn-cards .d { font-size: 0.94rem; color: var(--text-2); line-height: 1.55; flex: 1; }
.learn-cards .go { font-weight: 600; font-size: 0.9rem; color: var(--accent); margin-top: 1rem; }

.cta-band { margin: 4.5rem 0 0; padding: 2.4rem; border-radius: 20px; background: var(--accent-ink); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0; font-size: 1.6rem; }
.cta-band p { color: #c3cff8; margin: 0.4rem 0 0; }
.cta-band .btn { background: #fff; color: var(--accent-ink); border-color: #fff; }
.cta-band .btn:hover { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Learn pages ---------- */

.learn-page { max-width: 60rem; }
.crumbs { font-size: 0.88rem; color: var(--text-3); margin: 0 0 1rem; }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--text); }
.crumbs span[aria-hidden] { margin: 0 0.4rem; }
.section-links { list-style: none; padding: 4px; margin: 0 0 2.2rem; max-width: 100%; display: inline-flex; flex-wrap: wrap; gap: 2px; background: var(--bg-muted); border-radius: 10px; }
.section-links li { margin: 0; }
.section-links a { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 500; font-size: 0.88rem; color: var(--text-2); padding: 0.4rem 0.8rem; border-radius: 7px; }
.section-links a:hover { color: var(--text); }
.section-links a[aria-current="page"] { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
.section-links .n { font-size: 0.75rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.learn-page > h1 { margin-top: 0; }
.jump { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.2rem 0 0.5rem; }
.jump a { font-size: 0.85rem; font-weight: 500; color: var(--text-2); border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.75rem; }
.jump a:hover { border-color: var(--accent); color: var(--accent); }

.box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm); }
.box > h2:first-child, .box > h3:first-child { margin-top: 0; }
.box p { max-width: none; }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0 1rem; }
.duo h2 { font-size: 1.15rem; margin: 0 0 0.4rem; }
.duo p { margin: 0; }

.fw { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.6rem 1.7rem 1.2rem; margin: 1.4rem 0 0; box-shadow: var(--shadow-sm); scroll-margin-top: 90px; }
.fw > h3 { margin: 0 0 0.2rem; font-size: 1.3rem; }
.fw > h3 a { color: var(--text); }
.fw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.fw-grid p, .fw-grid ul { margin: 0; max-width: none; font-size: 0.97rem; }
.fw-when { background: var(--accent-soft); border-radius: var(--r); padding: 1rem 1.1rem; }
.fw-when h4 { color: var(--accent); }
.fw-when p { color: var(--accent-ink); }
.fw-example h4 { margin-top: 1rem; }
.fw-example p, .fw-example li { font-size: 0.97rem; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0.6rem 0; }
.compare > div { background: var(--bg-subtle); border-radius: var(--r); padding: 1rem 1.1rem; }
.compare p { font-size: 0.95rem; margin: 0.3rem 0; max-width: none; }
.label-sc { font: 700 0.76rem var(--font) !important; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text) !important; }
.formula { font-family: var(--mono); font-size: 0.92rem; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0.5rem 0.75rem; display: inline-block; color: var(--text); }
.checklist { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; margin: 0.4rem 0 0; max-width: none; }
.checklist li { margin: 0; border: 1px solid var(--border); border-radius: 999px; padding: 0.25rem 0.75rem; font-size: 0.86rem; color: var(--text-2); background: var(--bg); }
.mini-fw { border: 1px solid var(--border); border-radius: var(--r); padding: 1.1rem 1.2rem; margin: 1rem 0 0.5rem; background: var(--bg-subtle); }
.mini-fw > h4 { color: var(--text); }
.nest { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 0.6rem 0; }
.nest div { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0.75rem 0.85rem; font-size: 0.9rem; line-height: 1.5; color: var(--text-2); }
.nest b { display: block; font-size: 0.85rem; color: var(--accent); margin-bottom: 0.2rem; }
.assume { background: var(--accent-soft); color: var(--accent-ink); border-radius: 6px; padding: 0.05rem 0.4rem; font-size: 0.92em; }
.assume::before { content: "assume "; font-size: 0.72em; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); margin-right: 0.15rem; }

table.plain { border-collapse: collapse; width: 100%; max-width: 52rem; margin: 1rem 0; font-size: 0.92rem; }
table.plain th, table.plain td { text-align: left; padding: 0.6rem 0.9rem 0.6rem 0; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
table.plain th { font: 600 0.74rem var(--font); letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
table.plain td.num, table.plain th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.plain tr.total td { border-top: 1px solid var(--border-strong); border-bottom: 0; color: var(--text); font-weight: 600; }
.steps-table td:first-child { white-space: nowrap; font-weight: 600; color: var(--text); }

.tips { list-style: none; padding: 0; margin: 1.5rem 0 0; max-width: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.tips li { margin: 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.3rem; font-size: 0.95rem; color: var(--text-2); box-shadow: var(--shadow-sm); }
.tips b { display: block; font-size: 1.05rem; margin-bottom: 0.3rem; }
.tips .eg { display: block; color: var(--text-3); font-size: 0.88rem; margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px dashed var(--border); }
.tip-ico { width: 40px; height: 40px; display: block; margin-bottom: 0.8rem; padding: 9px; border-radius: 10px; background: var(--accent-soft); }
.tip-ico * { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tip-ico text { fill: var(--accent); stroke: none; font-family: var(--font); font-weight: 700; }

.stepper-bar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 1.4rem 0 1rem; }
.stepper-bar .progress { font-size: 0.9rem; color: var(--text-3); margin: 0 auto 0 0; }
.steps-x { list-style: none; padding: 0; margin: 0; max-width: none; display: grid; gap: 0.6rem; }
.step-x { margin: 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden; }
.step-x[data-open="true"] { border-color: var(--accent-soft-2); box-shadow: var(--shadow); }
.step-x[data-locked="true"] { background: var(--bg-subtle); box-shadow: none; }
.step-x > button { all: unset; box-sizing: border-box; display: flex; gap: 0.9rem; align-items: center; width: 100%; cursor: pointer; padding: 1rem 1.2rem; font-family: var(--font); }
.step-x > button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.step-x .n { width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; }
.step-x[data-locked="true"] .n { background: var(--bg-muted); color: var(--text-3); }
.step-x .t { flex: 1; font-weight: 600; font-size: 1rem; color: var(--text); }
.step-x[data-locked="true"] .t { color: var(--text-3); }
.step-x .chev { color: var(--text-3); font-size: 1.2rem; }
.step-x .chev::after { content: "+"; }
.step-x[data-open="true"] .chev::after { content: "\2212"; }
.step-x[data-locked="true"] .chev::after { content: "Locked"; font-size: 0.78rem; font-weight: 600; }
.step-x .body { padding: 0 1.2rem 1.3rem 3.9rem; }
.step-x .body p, .step-x .body li { font-size: 0.97rem; }
.qa { margin: 0.4rem 0; padding: 0; list-style: none; max-width: none; display: grid; gap: 0.6rem; }
.qa li { margin: 0; background: var(--bg-subtle); border-radius: var(--r-sm); padding: 0.75rem 0.9rem; }
.qa .q { display: block; font-weight: 600; color: var(--text); }
.qa .a { display: block; color: var(--text-2); }
.qa .why { display: block; color: var(--text-3); font-size: 0.88rem; margin-top: 0.2rem; }
.qa .why::before { content: "Why it matters: "; font-weight: 600; color: var(--accent); }
.answer { background: var(--accent-soft); border-radius: var(--r); padding: 1rem 1.2rem; margin: 1rem 0; max-width: none; }
.answer p { margin: 0.3rem 0; max-width: none; color: var(--accent-ink); }

.subtabs { display: inline-flex; gap: 2px; padding: 4px; background: var(--bg-muted); border-radius: 10px; margin: 1.4rem 0 0.4rem; flex-wrap: wrap; }
.subtabs button { all: unset; cursor: pointer; font: 500 0.9rem var(--font); color: var(--text-2); padding: 0.45rem 0.9rem; border-radius: 7px; }
.subtabs button[aria-selected="true"] { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
.subtabs button:focus-visible { outline: 2px solid var(--accent); }
.num-group .box { margin-top: 1rem; }
.num-group .box h3 { margin: 0 0 0.3rem; }
.num-group table.plain { margin-bottom: 0; }
.num-group table.plain tr:last-child td { border-bottom: 0; }
table.numbers { max-width: none; table-layout: fixed; }
table.numbers th:nth-child(1) { width: 26%; }
table.numbers th:nth-child(2) { width: 34%; }
table.numbers th:nth-child(3) { width: 28%; }
table.numbers th:nth-child(4) { width: 12%; }
table.numbers td:nth-child(2) { color: var(--text); font-weight: 500; }
table.numbers td.src, table.numbers td.yr { color: var(--text-3); font-size: 0.86rem; }
table.numbers .flag { font: 600 0.68rem var(--font); letter-spacing: 0.04em; text-transform: uppercase; color: var(--medium); background: #fff7ed; border-radius: 4px; padding: 0.05rem 0.3rem; margin-left: 0.4rem; }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; padding-top: 1.4rem; border-top: 1px solid var(--border); max-width: none; }
.pager a { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.9rem 1.1rem; border: 1px solid var(--border); border-radius: var(--r); min-width: 12rem; color: var(--text); transition: border-color 0.15s, box-shadow 0.15s; }
.pager a:hover { border-color: var(--accent-soft-2); box-shadow: var(--shadow-sm); color: var(--text); }
.pager a.next { text-align: right; margin-left: auto; }
.pager .lbl { font-size: 0.8rem; color: var(--text-3); }
.pager .ttl { font-weight: 600; }

/* ---------- Illustrations & charts ---------- */

figure.fig { margin: 1.4rem 0; max-width: 60rem; }
figure.fig.box { padding: 1.3rem 1.4rem 1.1rem; }
figure.fig figcaption { font-size: 0.88rem; line-height: 1.5; color: var(--text-3); margin-top: 0.8rem; max-width: var(--measure); }
.fig-title { font: 600 0.84rem var(--font); color: var(--text-2); margin: 0 0 0.8rem; max-width: none; }
svg.ill { width: 100%; height: auto; display: block; overflow: visible; }
.ill text { font-family: var(--font); fill: var(--text); font-size: 14px; }
.ill text.sm { font-size: 12.5px; fill: var(--text-2); }
.ill text.xs { font-size: 11.5px; fill: var(--text-3); }
.ill text.lg { font-size: 16px; font-weight: 600; }
.ill text.xl { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.ill text.b { font-weight: 700; }
.ill text.sc { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--text-3); }
.ill text.on-dark { fill: #fff; }
.ill text.mid { text-anchor: middle; }
.ill text.end { text-anchor: end; }
.ill .card { fill: #fff; stroke: var(--border-strong); stroke-width: 1; }
.ill .card-ink { fill: #fff; stroke: var(--accent); stroke-width: 1.5; }
.ill .panel { fill: var(--accent-soft); }
.ill .rule { stroke: var(--border); stroke-width: 1; fill: none; }
.ill .axis { stroke: var(--border-strong); stroke-width: 1; fill: none; }
.ill .line { stroke: var(--accent-ink); stroke-width: 1.5; fill: none; }
.ill .line2 { stroke: var(--accent); stroke-width: 2.5; fill: none; }
.ill .dash { stroke: var(--text-3); stroke-width: 1.2; stroke-dasharray: 4 4; fill: none; }
.ill .ink { fill: var(--accent); }
.ill .gap { stroke: #fff; stroke-width: 2; }
.ill .hit:hover { opacity: 0.85; }
.legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; list-style: none; padding: 0; margin: 0.8rem 0 0; max-width: none; font-size: 0.85rem; color: var(--text-2); }
.legend li { margin: 0; display: flex; align-items: center; gap: 0.4rem; }
.legend i { width: 0.7rem; height: 0.7rem; display: inline-block; border-radius: 3px; }
.legend b { font-weight: 500; color: var(--text-3); }
.charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 1.4rem 0 0.4rem; max-width: 50rem; }

/* ---------- Question bank ---------- */

.filters {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem 1.2rem; align-items: end;
  padding: 1.2rem; margin: 1.5rem 0 1rem; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r-lg);
}
.filters .field.search { grid-column: span 2; }
.filters .field.diff-field { grid-column: span 2; }
.result-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; color: var(--text-3); margin: 1rem 0 0.8rem; }
.qlist { list-style: none; padding: 0; margin: 0; max-width: none; display: grid; gap: 0.75rem; }
.qitem {
  margin: 0; display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) auto; gap: 0.35rem 1.2rem; align-items: start;
  padding: 1.1rem 1.3rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.qitem:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.qitem .qid { font: 600 0.8rem var(--font); color: var(--text-3); padding-top: 0.2rem; font-variant-numeric: tabular-nums; }
.qitem .qtitle { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text); margin: 0; max-width: none; line-height: 1.4; }
.qitem .qmeta { grid-column: 2; font-size: 0.84rem; color: var(--text-3); display: flex; gap: 0.35rem 0.9rem; flex-wrap: wrap; align-items: center; }
.qitem .firm { color: var(--text); font-weight: 600; }
.qitem .qactions { grid-row: 1 / span 3; grid-column: 3; display: flex; flex-direction: column; gap: 0.45rem; align-self: center; }
.qitem details { grid-column: 2; margin-top: 0.2rem; }
.qitem summary { cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--accent); list-style: none; }
.qitem summary::-webkit-details-marker { display: none; }
.qitem summary::before { content: "+ "; }
.qitem details[open] summary::before { content: "\2212 "; }
.qitem details p { font-size: 0.92rem; margin: 0.4rem 0 0; max-width: none; color: var(--text-2); }
.empty { padding: 3rem 1rem; text-align: center; color: var(--text-3); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); list-style: none; }

/* ---------- Model interview reader ---------- */

body.reader-open { overflow: hidden; }
.reader { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 3vh 16px; }
.reader-backdrop { position: absolute; inset: 0; background: rgba(11, 13, 18, 0.5); backdrop-filter: blur(2px); }
.reader-panel { position: relative; background: var(--bg); width: min(800px, 100%); max-height: 94vh; display: flex; flex-direction: column; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.reader-head { display: flex; gap: 1rem; align-items: flex-start; padding: 1.3rem 1.5rem 1.1rem; border-bottom: 1px solid var(--border); }
.reader-titles { flex: 1; min-width: 0; }
.reader-kicker { font: 600 0.78rem var(--font); color: var(--accent); margin: 0 0 0.35rem; max-width: none; }
.reader-kicker .skip { margin-left: 0.8rem; color: var(--text-3); font-weight: 500; }
.reader-kicker .skip:hover { color: var(--text); }
.reader-head h2 { font-size: 1.3rem; line-height: 1.3; margin: 0; }
.reader-meta { font-size: 0.86rem; color: var(--text-3); margin: 0.4rem 0 0; max-width: none; }
.reader-body { overflow-y: auto; padding: 0.4rem 1.5rem 1.5rem; overscroll-behavior: contain; }
.reader-body:focus { outline: none; }
.transcript { list-style: none; padding: 0; margin: 0; max-width: none; }
.turn { margin: 0; display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.turn:last-child { border-bottom: 0; }
.turn .spk { font: 600 0.78rem var(--font); padding-top: 0.15rem; }
.turn.is-i .spk { color: var(--text-3); }
.turn.is-c .spk { color: var(--accent); }
.turn .txt p, .turn .txt ul, .turn .txt ol { font-size: 0.97rem; line-height: 1.65; margin: 0.35rem 0; max-width: none; }
.turn .txt > :first-child { margin-top: 0; }
.turn .txt > :last-child { margin-bottom: 0; }
.turn .txt ul { list-style: disc; }
.turn .txt ol { list-style: decimal; }
.turn.is-i .txt p { color: var(--text-2); }
.turn.is-c .txt p, .turn.is-c .txt li { color: var(--text); }
.reader-answer { margin-top: 1.2rem; background: var(--accent-soft); border-radius: var(--r); padding: 1.1rem 1.2rem; }
.reader-answer .lbl { font: 700 0.74rem var(--font); letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); margin: 0 0 0.2rem; }
.reader-answer .lbl ~ .lbl { margin-top: 0.8rem; }
.reader-answer p { margin: 0; max-width: none; color: var(--accent-ink); font-weight: 500; }
.reader-note { font-size: 0.82rem; color: var(--text-3); margin: 1rem 0 0; max-width: none; }
.reader-foot { display: flex; gap: 0.6rem; justify-content: space-between; align-items: center; padding: 0.9rem 1.5rem; border-top: 1px solid var(--border); background: var(--bg-subtle); }
.reader-foot .btn:disabled { visibility: hidden; }
.icon-btn { display: none; flex: none; width: 38px; height: 38px; border: 0; background: transparent; border-radius: 10px; align-items: center; justify-content: center; cursor: pointer; color: var(--text-2); }
.icon-btn:hover { background: var(--bg-muted); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.reader-close { display: inline-flex; margin: -0.4rem -0.6rem 0 0; }

/* ---------- AI mode: setup ---------- */

#ai-setup > h2 { margin-top: 1rem; }
.setup-steps { list-style: none; padding: 0; margin: 1.5rem 0 1.4rem; max-width: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.setup-steps li { margin: 0; position: relative; display: flex; flex-direction: column; padding: 1.3rem; }
.setup-steps .step-n { position: absolute; top: 1.2rem; right: 1.2rem; font: 700 0.8rem var(--font); color: var(--accent); background: var(--accent-soft); width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; }
.setup-steps h3 { margin: 0.9rem 0 0.3rem; font-size: 1.02rem; }
.setup-steps p { font-size: 0.92rem; margin: 0 0 0.9rem; flex: 1; }
.setup-steps .btn { align-self: flex-start; }
.step-ico { width: 40px; height: 40px; padding: 8px; border-radius: 10px; background: var(--accent-soft); }
.step-ico * { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.connect { max-width: 44rem; }
.key-row { display: flex; gap: 0.6rem; align-items: flex-end; flex-wrap: wrap; }
.key-row .field { flex: 1 1 16rem; }

/* ---------- AI mode: full-page chat ---------- */

body.ai-full { overflow: hidden; }
body.ai-full footer, body.ai-full .site-header { display: none; }
body.ai-full #view-ai > h1, body.ai-full #view-ai > .subtitle { display: none; }
.chat-shell { position: fixed; inset: 0; z-index: 5; height: 100vh; height: 100dvh; display: grid; grid-template-columns: 300px minmax(0, 1fr); background: var(--bg); }

.picker-panel { border-right: 1px solid var(--border); background: var(--bg-subtle); display: flex; flex-direction: column; min-height: 0; }
.side-top { padding: 1rem 1rem 0.8rem; border-bottom: 1px solid var(--border); }
.side-brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; font-size: 1rem; color: var(--text); margin-bottom: 0.7rem; letter-spacing: -0.02em; }
.side-brand:hover { color: var(--text); }
.side-nav { display: flex; gap: 2px; padding: 3px; background: var(--bg-muted); border-radius: 9px; }
.side-nav a { flex: 1; text-align: center; font-weight: 500; font-size: 0.8rem; color: var(--text-2); padding: 0.35rem 0.3rem; border-radius: 6px; white-space: nowrap; }
.side-nav a:hover { color: var(--text); }
.side-nav a[aria-current="page"] { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
.picker-head { padding: 1rem 1rem 0.8rem; border-bottom: 1px solid var(--border); }
.picker-head h2 { font-size: 0.95rem; margin: 0 0 0.6rem; }
.picker-head .chips { margin-top: 0.6rem; }
.picker-head .chip { font-size: 0.8rem; padding: 0.3rem 0.65rem; }
.pick-count { font-size: 0.8rem; color: var(--text-3); margin: 0.6rem 0 0; }
.pick-list { list-style: none; margin: 0; padding: 0.4rem; overflow-y: auto; flex: 1; max-width: none; overscroll-behavior: contain; }
.pick-list li { margin: 0; }
.pick-list button { all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; padding: 0.6rem 0.7rem; border-radius: var(--r-sm); font: 500 0.9rem/1.4 var(--font); color: var(--text); }
.pick-list button:hover { background: var(--bg-muted); }
.pick-list button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pick-list button[aria-pressed="true"] { background: var(--bg); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--accent-soft-2); }
.pick-list .pm { display: flex; align-items: center; gap: 0.3rem; font-size: 0.76rem; font-weight: 400; color: var(--text-3); margin-top: 0.25rem; }
.pick-list .pm .diff { padding: 0.05rem 0.4rem; font-size: 0.72rem; }
.side-foot { border-top: 1px solid var(--border); padding: 0.8rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.55rem; font-size: 0.85rem; color: var(--text-2); }
.side-foot .row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.ok-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--easy); box-shadow: 0 0 0 3px #dcfce7; }
.model-pick { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--text-3); }
.model-pick input { padding: 0.3rem 0.5rem; font-size: 0.82rem; }
.side-foot .linkish { font-size: 0.82rem; }

.chat-window { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-head { display: flex; gap: 0.9rem; align-items: center; padding: 0.8rem 1.5rem; min-height: 64px; border-bottom: 1px solid var(--border); background: var(--bg); }
.chat-q { flex: 1; min-width: 0; }
.chat-q-title { font-size: 0.98rem; font-weight: 600; color: var(--text); margin: 0; max-width: none; line-height: 1.35; }
.chat-q-meta { font-size: 0.8rem; color: var(--text-3); margin: 0.15rem 0 0; max-width: none; }
.chat-ctrl { display: flex; align-items: center; gap: 0.7rem; }
.timer { font: 600 0.85rem var(--mono); color: var(--text-2); background: var(--bg-muted); border-radius: 6px; padding: 0.25rem 0.5rem; }

.messages { position: relative; flex: 1; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.thread { max-width: 46rem; margin: 0 auto; padding: 2rem 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.empty-chat { margin: 10vh auto 0; max-width: 30rem; text-align: center; }
.empty-chat .lg { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); margin: 0 auto 0.8rem; }
.empty-chat ol { text-align: left; font-size: 0.95rem; line-height: 1.8; color: var(--text-2); display: inline-block; margin: 0; }
#empty-browse { display: none; margin-top: 0.8rem; }

.msg { font-size: 0.98rem; line-height: 1.7; }
.msg .who { font: 600 0.75rem var(--font); color: var(--text-3); margin-bottom: 0.3rem; }
.msg .bubble p, .msg .bubble ul, .msg .bubble ol { margin: 0.45rem 0; max-width: none; color: var(--text); }
.msg .bubble > :first-child { margin-top: 0; }
.msg .bubble > :last-child { margin-bottom: 0; }
.msg .bubble ul, .msg .bubble ol { padding-left: 1.3rem; }
.msg em { font-style: normal; font-weight: 600; }
.msg.user { align-self: flex-end; max-width: 80%; }
.msg.user .who { text-align: right; }
.msg.user .bubble { background: var(--accent); padding: 0.7rem 1rem; border-radius: 18px; border-bottom-right-radius: 6px; }
.msg.user .bubble p, .msg.user .bubble li, .msg.user .bubble strong { color: #fff; }
.msg.system { align-self: center; font-size: 0.82rem; color: var(--text-3); background: var(--bg-muted); border-radius: 999px; padding: 0.3rem 0.8rem; }
.msg.error .bubble p { color: var(--hard); }
.typing { display: inline-flex; gap: 0.3rem; padding: 0.4rem 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

.composer { padding: 0.5rem 1.5rem 1rem; background: var(--bg); }
.composer-inner { max-width: 46rem; margin: 0 auto; display: flex; flex-direction: column; gap: 0.55rem; }
.composer .quick { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.composer .chip { font-size: 0.82rem; }
.compose-row { display: flex; gap: 0.5rem; align-items: flex-end; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 22px; padding: 0.45rem 0.45rem 0.45rem 1.1rem; box-shadow: var(--shadow); transition: border-color 0.15s, box-shadow 0.15s; }
.compose-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft-2), var(--shadow); }
.compose-row textarea { flex: 1; resize: none; max-height: 12rem; min-height: 2.3rem; border: 0; background: transparent; padding: 0.5rem 0; font: 400 0.98rem/1.5 var(--font); color: var(--text); outline: none; }
.compose-row textarea:focus-visible { outline: none; }
.compose-row textarea:disabled { opacity: 0.6; }
.compose-row .send, .compose-row .voice-btn { flex: none; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.compose-row .send { border: 0; background: var(--accent); color: #fff; }
.compose-row .send:hover:not(:disabled) { background: var(--accent-hover); }
.compose-row .send:disabled { background: var(--bg-muted); color: var(--text-3); cursor: not-allowed; }
.compose-row .voice-btn { border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); }
.compose-row .voice-btn:hover:not(:disabled) { background: var(--bg-subtle); border-color: var(--text-3); }
.compose-row .voice-btn:disabled { color: var(--text-3); cursor: not-allowed; opacity: 0.55; }
.compose-row svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hint-line { font-size: 0.78rem; color: var(--text-3); margin: 0; max-width: none; text-align: center; }

/* Voice interview panel */
.voice-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem 1.3rem; align-items: center; max-width: 46rem; width: calc(100% - 3rem); margin: 0.6rem auto 1rem; padding: 1rem 1.2rem; background: var(--bg); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.orb { position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; transition: background 0.2s; }
.orb svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; position: relative; }
.orb .orb-ring { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; }
.orb[data-state="speaking"] { background: var(--accent); }
.orb[data-state="speaking"] .orb-ring { border-color: var(--accent); animation: orb-pulse 1.4s ease-out infinite; }
.orb[data-state="listening"] { background: var(--hard); }
.orb[data-state="listening"] .orb-ring { border-color: var(--hard); animation: orb-pulse 1.1s ease-out infinite; }
.orb[data-state="thinking"] { background: var(--text-2); }
.orb[data-state="thinking"] .orb-ring { border-color: var(--text-2); border-top-color: transparent; opacity: 0.8; animation: orb-spin 1s linear infinite; }
.orb[data-state="paused"], .orb[data-state="idle"] { background: var(--text-3); }
@keyframes orb-pulse { from { transform: scale(0.92); opacity: 0.7; } to { transform: scale(1.35); opacity: 0; } }
@keyframes orb-spin { to { transform: rotate(360deg); } }
.voice-info { min-width: 0; }
.voice-state { font-weight: 600; font-size: 0.95rem; color: var(--text); margin: 0; max-width: none; }
.voice-live { font-size: 0.92rem; line-height: 1.5; color: var(--text-2); margin: 0.2rem 0 0; max-width: none; min-height: 1.4rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.voice-actions { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* Scorecard */
.scorecard { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); box-shadow: var(--shadow); padding: 1.4rem; font-size: 0.95rem; }
.scorecard h3 { font-size: 1.1rem; margin: 0; }
.sc-top { display: flex; gap: 1.3rem; align-items: center; flex-wrap: wrap; padding-bottom: 1.1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--border); }
.sc-overall { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; background: var(--accent-soft); border-radius: var(--r); padding: 0.9rem 1rem; }
.sc-overall small { font-size: 1rem; color: var(--text-3); font-weight: 600; }
.sc-signal { display: inline-block; font: 600 0.78rem var(--font); padding: 0.2rem 0.6rem; border-radius: 999px; margin-top: 0.35rem; }
.sc-signal.good { color: var(--easy); background: #ecfdf3; }
.sc-signal.mid { color: var(--medium); background: #fff7ed; }
.sc-signal.low { color: var(--hard); background: #fef2f2; }
.sc-verdict { margin: 0.5rem 0 0; max-width: none; color: var(--text); }
.sc-meta { color: var(--text-3); font-size: 0.82rem; margin: 0.25rem 0 0; max-width: none; }
.sc-rows { display: grid; gap: 0.7rem; margin: 0 0 1.2rem; }
.sc-row { display: grid; grid-template-columns: 8.5rem 7rem 2.2rem minmax(0, 1fr); gap: 0.2rem 0.9rem; align-items: center; }
.sc-row .name { font-weight: 600; font-size: 0.86rem; color: var(--text); }
.sc-row .pips { display: flex; gap: 3px; }
.sc-row .pips i { flex: 1; height: 6px; border-radius: 3px; background: var(--bg-muted); }
.sc-row .pips i.on { background: var(--accent); }
.sc-row .num { font-weight: 600; font-size: 0.85rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.sc-row .cmt { color: var(--text-2); font-size: 0.88rem; line-height: 1.5; }
.sc-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.sc-block h4 { margin: 0 0 0.35rem; }
.sc-block ul, .sc-block ol { margin: 0; padding-left: 1.2rem; font-size: 0.9rem; max-width: none; }
.sc-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; background: var(--bg-subtle); border-radius: var(--r); padding: 0.9rem 1rem; margin-bottom: 1rem; }
.sc-compare p { margin: 0.1rem 0 0; max-width: none; color: var(--text); font-weight: 500; }
.sc-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  .typing i, .orb .orb-ring { animation: none !important; }
  .learn-cards a:hover { transform: none; }
}

/* ---------- Tablet ---------- */

@media (max-width: 1000px) {
  .learn-cards, .tips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat-shell { grid-template-columns: 260px minmax(0, 1fr); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Phone ---------- */

@media (max-width: 820px) {
  .wrap { padding: 0 16px; }
  .site-header .wrap { gap: 0.6rem; height: 58px; }
  .tabs { gap: 0; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
  .tabs a { font-size: 0.86rem; padding: 0.4rem 0.55rem; white-space: nowrap; }
  .header-cta, .brand .brand-name { display: none; }
  article { padding-top: 1.8rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.35rem; }
  p.subtitle { font-size: 1.02rem; }

  .learn-cards, .tips, .duo, .fw-grid, .compare, .nest, .sc-cols, .sc-compare, .setup-steps { grid-template-columns: minmax(0, 1fr); }
  .section-head { margin-top: 3rem; }
  .cta-band { padding: 1.6rem; }

  .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 1rem; }
  .filters .field.search, .filters .field.diff-field { grid-column: 1 / -1; }
  .qitem { grid-template-columns: minmax(0, 1fr); padding: 1rem; }
  .qitem .qid { padding: 0; }
  .qitem .qmeta, .qitem details { grid-column: 1; }
  .qitem .qactions { grid-row: auto; grid-column: 1; flex-direction: row; flex-wrap: wrap; order: 1; margin-top: 0.4rem; }
  .qitem details { order: 2; }

  .reader { padding: 0; align-items: stretch; }
  .reader-panel { width: 100%; max-height: none; height: 100%; border-radius: 0; }
  .reader-head { padding: 1rem; }
  .reader-body { padding: 0.2rem 1rem 1.4rem; }
  .turn { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  .reader-foot { padding: 0.6rem 0.8rem calc(0.6rem + env(safe-area-inset-bottom)); }
  .reader-foot .btn { padding: 0.5rem 0.75rem; font-size: 0.85rem; }

  .step-x .body { padding: 0 1rem 1.1rem; }
  .pager { flex-direction: column; }
  .pager a { min-width: 0; }
  table.numbers thead { display: none; }
  table.numbers, table.numbers tbody, table.numbers tr, table.numbers td { display: block; width: 100% !important; }
  table.numbers tr { border-bottom: 1px solid var(--border); padding: 0.6rem 0; }
  table.numbers td { border: 0; padding: 0.05rem 0; }
  table.numbers td:nth-child(1) { font-weight: 600; color: var(--text); }
  table.plain:not(.numbers) { display: block; overflow-x: auto; }
  table.plain:not(.numbers) th, table.plain:not(.numbers) td { white-space: nowrap; }
  .fig-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .fig-scroll svg.ill { min-width: 560px; }
  .fw { padding: 1.2rem; }
  .box, figure.fig.box { padding: 1.1rem; }

  /* Chat as a mobile app */
  .chat-shell { grid-template-columns: minmax(0, 1fr); }
  .picker-panel { position: absolute; inset: 0 auto 0 0; width: min(88vw, 340px); z-index: 3; transform: translateX(-102%); transition: transform 0.2s ease, visibility 0.2s; visibility: hidden; }
  .chat-shell.show-picker .picker-panel { visibility: visible; box-shadow: var(--shadow-lg); }
  .chat-shell.show-picker .picker-panel { transform: none; }
  .chat-shell.show-picker::after { content: ""; position: absolute; inset: 0; background: rgba(11, 13, 18, 0.35); z-index: 2; }
  .icon-btn { display: inline-flex; }
  #empty-browse { display: inline-flex; }
  .chat-head { padding: 0.45rem 0.6rem; gap: 0.4rem; min-height: 56px; }
  .chat-q { text-align: center; }
  .chat-q-title { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chat-q-meta { font-size: 0.74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #ai-start { padding: 0.4rem 0.75rem; font-size: 0.82rem; border-radius: 999px; }
  .timer { font-size: 0.75rem; }
  .thread { padding: 1.2rem 1rem; gap: 1.2rem; }
  .msg.user { max-width: 88%; }
  .empty-chat { margin-top: 6vh; }
  .composer { padding: 0.4rem 0.7rem calc(0.6rem + env(safe-area-inset-bottom)); }
  .composer .quick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .composer .chip { white-space: nowrap; }
  .compose-row textarea { font-size: 16px; }
  .hint-line { display: none; }
  .voice-bar { grid-template-columns: auto minmax(0, 1fr); width: calc(100% - 1.4rem); margin: 0.4rem auto calc(0.6rem + env(safe-area-inset-bottom)); padding: 0.8rem; gap: 0.7rem 0.9rem; }
  .voice-actions { grid-column: 1 / -1; justify-content: space-between; }
  .orb { width: 54px; height: 54px; }
  .sc-row { grid-template-columns: minmax(0, 1fr) 6rem 2rem; }
  .sc-row .cmt { grid-column: 1 / -1; }
  footer .wrap { flex-direction: column; align-items: flex-start; }
}

/* ---------- Home: module hub ---------- */

#modules { scroll-margin-top: 88px; }
.mod-group { font: 600 0.78rem var(--font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin: 2.2rem 0 0.8rem; }
.section-head + .mod-group { margin-top: 0.5rem; }
.mods { list-style: none; padding: 0; margin: 0; max-width: none; display: grid; gap: 0.75rem; }
.mod { margin: 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s; }
.mod-row { display: grid; grid-template-columns: 2.2rem 48px minmax(0, 1fr) auto; gap: 1.2rem; align-items: center; padding: 1.4rem 1.6rem; }
.mod-n { font: 600 0.85rem var(--font); color: var(--text-3); font-variant-numeric: tabular-nums; }
.mod-ico { width: 48px; height: 48px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-muted); color: var(--text-2); }
.mod-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mod-text h3 { margin: 0; font-size: 1.15rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.mod-text p { margin: 0.3rem 0 0; font-size: 0.95rem; max-width: 46rem; }
.mod-tags { list-style: none; padding: 0; margin: 0.75rem 0 0; max-width: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.mod-tags li { margin: 0; font-size: 0.8rem; font-weight: 500; color: var(--text-2); background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 6px; padding: 0.15rem 0.55rem; }
.mod-tags.firms li { color: var(--text); font-weight: 600; }
.mod-cta { display: flex; gap: 0.5rem; }
.badge { font: 600 0.72rem var(--font); letter-spacing: 0.01em; border-radius: 999px; padding: 0.18rem 0.6rem; white-space: nowrap; }
.badge.live { color: var(--easy); background: #ecfdf3; box-shadow: inset 0 0 0 1px #bbf7d0; }
.badge.live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 0.35rem; vertical-align: 1px; }
.badge.soon { color: var(--text-3); background: var(--bg-muted); }

.mod.is-live { border-color: var(--accent-soft-2); box-shadow: var(--shadow); }
.mod.is-live .mod-ico { background: var(--accent); color: #fff; }
.mod.is-live .mod-n { color: var(--accent); }
.mod.is-live .mod-tags li { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.mod.is-soon:hover { border-color: var(--border-strong); }
.mod.is-soon .mod-text h3 { color: var(--text); }

.mod-guides { display: flex; flex-wrap: wrap; gap: 0.25rem 0.4rem; padding: 0.8rem 1.6rem; background: var(--bg-subtle); border-top: 1px solid var(--border); }
.mod-guides a { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.86rem; font-weight: 500; color: var(--text-2); padding: 0.35rem 0.65rem; border-radius: 7px; }
.mod-guides a:hover { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
.mod-guides a span { font-size: 0.74rem; font-weight: 600; color: var(--accent); }
.mod-guides .ai-link { margin-left: auto; color: var(--accent); font-weight: 600; }
.mod-guides .ai-link:hover { color: var(--accent-hover); }

@media (max-width: 820px) {
  .mod-row { grid-template-columns: 44px minmax(0, 1fr); gap: 0.9rem 1rem; padding: 1.1rem; align-items: start; }
  .mod-n { display: none; }
  .mod-ico { width: 44px; height: 44px; }
  .mod-cta { grid-column: 1 / -1; }
  .mod-cta .btn { flex: 1; }
  .mod-guides { padding: 0.6rem 0.7rem; }
  .mod-guides .ai-link { margin-left: 0; }
}

/* ---------- Firm logos ---------- */

.flogo {
  --fc: #6b7280; --fi: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: 10px; background: var(--fc); color: var(--fi);
  font: 800 0.9rem/1 var(--font); letter-spacing: -0.03em; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 1px 2px rgba(16, 24, 40, 0.12);
}
.flogo.is-long { font-size: 0.74rem; }
.flogo svg { width: 46%; height: 46%; fill: currentColor; }
.flogo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.flogo-xs { width: 18px; height: 18px; border-radius: 5px; font-size: 0.5rem; margin-right: 0.35rem; vertical-align: -4px; }
.flogo-xs.is-long { font-size: 0.42rem; }
.flogo-xs + .flogo-xs { margin-left: -0.2rem; }
.flogo-sm { width: 32px; height: 32px; border-radius: 8px; font-size: 0.74rem; }
.flogo-sm.is-long { font-size: 0.6rem; }
.flogo-lg { width: 48px; height: 48px; border-radius: 12px; font-size: 1.05rem; }
.flogo-lg.is-long { font-size: 0.86rem; }
.flogo-xl { width: 72px; height: 72px; border-radius: 18px; font-size: 1.5rem; }
.flogo-xl.is-long { font-size: 1.2rem; }
.qitem .firm { display: inline-flex; align-items: center; }

.logo-wall { margin: 3rem 0 0; text-align: center; }
.logo-wall > p { font-size: 0.85rem; font-weight: 500; color: var(--text-3); margin: 0 auto 1rem; max-width: none; }
.logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 0.6rem; }
.logo-item { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.4rem 0.85rem 0.4rem 0.45rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text); font-weight: 600; font-size: 0.88rem; transition: border-color 0.15s, box-shadow 0.15s; }
.logo-item .flogo { width: 28px; height: 28px; border-radius: 999px; font-size: 0.62rem; }
.logo-item .flogo.is-long { font-size: 0.52rem; }
.logo-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); color: var(--text); }
.mod-logos { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.85rem; flex-wrap: wrap; }
.mod-logos .more { font-size: 0.82rem; font-weight: 600; margin-left: 0.3rem; }

/* ---------- Home: comparison ---------- */

.compare-table { padding: 0; overflow: hidden; }
.compare-table table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.compare-table th, .compare-table td { text-align: left; padding: 0.95rem 1.2rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.compare-table tr:last-child th, .compare-table tr:last-child td { border-bottom: 0; }
.compare-table thead th { font-size: 0.8rem; font-weight: 600; color: var(--text-3); background: var(--bg-subtle); }
.compare-table thead th.us { color: var(--accent); }
.compare-table tbody th { font-weight: 600; color: var(--text); width: 18%; }
.compare-table td { color: var(--text-3); width: 34%; }
.compare-table td.us { color: var(--text); font-weight: 500; background: rgba(36, 87, 245, 0.035); position: relative; padding-left: 2.6rem; }
.compare-table td.us::before { content: ""; position: absolute; left: 1.2rem; top: 1.12rem; width: 16px; height: 16px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 10px no-repeat; }

/* ---------- Shared page parts ---------- */

.page-head { margin-bottom: 1.8rem; }
.page-head .kicker { font: 600 0.82rem var(--font); color: var(--accent); margin: 0 0 0.4rem; }
.page-head .subtitle { margin-bottom: 0; }
.back-link { display: inline-block; font-size: 0.88rem; font-weight: 500; color: var(--text-3); margin-bottom: 1.2rem; }
.back-link:hover { color: var(--text); }
.kpis { list-style: none; padding: 0; margin: 0 0 1.5rem; max-width: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.kpis li { margin: 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 0.1rem; }
.kpis span { font-size: 0.82rem; font-weight: 500; color: var(--text-3); }
.kpis b { font-size: 1.9rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpis b em { font-style: normal; font-size: 1rem; color: var(--text-3); font-weight: 500; }
.kpis small { font-size: 0.8rem; color: var(--text-3); }
.linkish.danger { color: var(--hard); }
.tooltip { position: fixed; z-index: 80; pointer-events: none; background: var(--text); color: #fff; font-size: 0.8rem; font-weight: 500; padding: 0.35rem 0.6rem; border-radius: 6px; box-shadow: var(--shadow); white-space: nowrap; }
input[type="date"] { font: 400 0.95rem var(--font); color: var(--text); background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 0.52rem 0.75rem; box-shadow: var(--shadow-sm); }

/* ---------- Mental maths driller ---------- */

.step-h { display: flex; align-items: center; gap: 0.6rem; font-size: 1rem; margin: 1.8rem 0 0.8rem; }
.step-h span { width: 24px; height: 24px; border-radius: 7px; background: var(--text); color: #fff; font-size: 0.78rem; display: inline-flex; align-items: center; justify-content: center; }
.drill-setup .step-h:first-child { margin-top: 0; }
.dcats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; }
.dcat { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: var(--r); background: var(--bg); box-shadow: var(--shadow-sm); transition: border-color 0.15s, box-shadow 0.15s; }
.dcat:hover { border-color: var(--border-strong); }
.dcat:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dcat[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft-2); }
.dcat-top { display: flex; align-items: center; gap: 0.5rem; }
.dcat-name { font-weight: 600; color: var(--text); flex: 1; }
.dcat-ex { font-size: 0.86rem; color: var(--text-3); }
.dcat-acc { font-size: 0.78rem; font-weight: 600; color: var(--text-2); }
.lvl { display: inline-flex; gap: 3px; margin-left: 0.4rem; }
.lvl i { width: 6px; height: 14px; border-radius: 2px; background: var(--bg-muted); }
.lvl i.on { background: var(--accent); }
.seg { display: inline-grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--bg-muted); border-radius: 12px; min-width: min(100%, 520px); }
.seg button { all: unset; cursor: pointer; text-align: center; padding: 0.6rem 0.8rem; border-radius: 9px; display: flex; flex-direction: column; gap: 0.1rem; }
.seg button b { font-size: 0.92rem; color: var(--text); }
.seg button span { font-size: 0.78rem; color: var(--text-3); }
.seg button[aria-checked="true"] { background: var(--bg); box-shadow: var(--shadow-sm); }
.seg button:focus-visible { outline: 2px solid var(--accent); }
.drill-go { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: 1.8rem; }
.drill-go .note { margin: 0; }

.drill-run { max-width: 44rem; margin: 1rem auto 0; background: var(--bg); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: 0 0 1.5rem; overflow: hidden; text-align: center; }
.d-bar { height: 4px; background: var(--bg-muted); }
.d-bar-fill { height: 100%; background: var(--accent); transition: width 0.25s linear; }
.d-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.4rem; border-bottom: 1px solid var(--border); font-size: 0.88rem; color: var(--text-2); }
.d-cat { font-weight: 600; color: var(--text); display: inline-flex; align-items: center; }
.d-score b { color: var(--text); }
.d-streak { color: var(--accent); font-weight: 600; }
.d-time { font: 600 0.9rem var(--mono); background: var(--bg-muted); padding: 0.2rem 0.55rem; border-radius: 6px; color: var(--text); }
.d-q { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; letter-spacing: -0.03em; color: var(--text); margin: 2.4rem auto 1.6rem; max-width: 36rem; padding: 0 1rem; line-height: 1.25; font-variant-numeric: tabular-nums; }
.d-form { display: flex; gap: 0.6rem; justify-content: center; padding: 0 1.4rem; }
.d-form input { max-width: 18rem; font-size: 1.3rem; font-weight: 600; text-align: center; padding: 0.7rem 1rem; border-radius: 12px; font-variant-numeric: tabular-nums; }
.d-flash { min-height: 1.6rem; margin: 1rem auto 0; font-size: 0.92rem; font-weight: 500; max-width: 36rem; padding: 0 1rem; }
.d-flash.ok { color: var(--easy); }
.d-flash.bad { color: var(--hard); }
.d-flash.warn { color: var(--medium); }
.d-actions { display: flex; justify-content: center; gap: 1.6rem; margin-top: 0.8rem; }
.d-actions .linkish { color: var(--text-3); font-weight: 500; }
.d-break, .d-review { margin-bottom: 1rem; }
.d-break h3, .d-review h3 { margin-top: 0; }
.d-tip { background: var(--accent-soft); color: var(--accent-ink); border-radius: var(--r-sm); padding: 0.75rem 0.9rem; font-size: 0.92rem; max-width: none; margin-bottom: 0; }
.d-tip b { color: var(--accent-ink); }
.d-review ol { margin: 0; padding-left: 1.2rem; max-width: none; }
.d-review li { margin: 0.5rem 0; }
.d-review .q { display: block; font-weight: 600; color: var(--text); }
.d-review .a { display: block; font-size: 0.88rem; color: var(--text-3); }
.d-end-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.4rem; }

/* ---------- Firm prep ---------- */

.firm-grid { list-style: none; padding: 0; margin: 0; max-width: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.85rem; }
.firm-grid li { margin: 0; }
.firm-card { display: flex; flex-direction: column; gap: 0.35rem; height: 100%; padding: 1.2rem 1.3rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); color: var(--text); transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.firm-card:hover { color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.firm-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.6rem; }
.firm-go { color: var(--text-3); font-size: 1.1rem; transition: transform 0.15s, color 0.15s; }
.firm-card:hover .firm-go { color: var(--accent); transform: translateX(3px); }
.firm-name { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.015em; }
.firm-tag { font-size: 0.9rem; color: var(--text-2); line-height: 1.5; flex: 1; }
.firm-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.firm-meta span { font-size: 0.76rem; font-weight: 500; color: var(--text-2); background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 6px; padding: 0.1rem 0.5rem; }
.firm-note { margin-top: 2rem; }

.firm-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding: 2rem; border-radius: 20px; border: 1px solid var(--border); background: linear-gradient(135deg, color-mix(in srgb, var(--fc) 9%, #fff), #fff 60%); }
.firm-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: var(--fc); opacity: 0.06; }
.firm-hero-main { display: flex; align-items: center; gap: 1.2rem; min-width: 0; }
.firm-hero h1 { font-size: 2.1rem; }
.firm-hero .lead { margin: 0.35rem 0 0; color: var(--text-2); font-size: 1.05rem; }
.firm-hero-cta { display: flex; gap: 0.6rem; flex-wrap: wrap; position: relative; z-index: 1; }
.facts { list-style: none; padding: 0; margin: 1rem 0 0; max-width: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.facts li { margin: 0; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: var(--r); background: var(--bg); }
.facts span { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-3); margin-bottom: 0.25rem; }
.facts b { font-size: 0.95rem; font-weight: 600; line-height: 1.4; }
.firm-duo { margin-top: 1rem; }
.firm-duo h2, .firm-tips h2, .plan h2 { font-size: 1.15rem; margin: 0 0 0.6rem; }
.firm-duo ul, .firm-tips ol { margin: 0; max-width: none; font-size: 0.95rem; }
.ticks { list-style: none; padding: 0 !important; }
.ticks li { position: relative; padding-left: 1.6rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.32rem; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232457f5' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 10px no-repeat; }
.firm-tips { margin-bottom: 1rem; }
#firm-questions { margin-top: 2rem; }
#firm-questions h2 { font-size: 1.3rem; margin: 0 0 1rem; }

.plan { scroll-margin-top: 80px; }
.plan-head { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: flex-end; }
.plan-head p { margin: 0; font-size: 0.93rem; }
.plan-form { display: flex; gap: 0.6rem; align-items: flex-end; flex-wrap: wrap; }
.plan-form select { width: auto; }
.plan-status { display: flex; align-items: center; gap: 1rem; margin: 1.4rem 0 1rem; padding: 0.9rem 1rem; background: var(--bg-subtle); border-radius: var(--r); }
.plan-status > div { display: flex; flex-direction: column; min-width: 9rem; }
.plan-status span { font-size: 0.82rem; color: var(--text-3); }
.plan-meter { flex: 1; height: 8px; border-radius: 4px; background: var(--bg-muted); overflow: hidden; }
.plan-meter i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.plan-pct { font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-weeks { list-style: none; padding: 0; margin: 0; max-width: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.75rem; }
.plan-week { margin: 0; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.plan-week-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0.65rem 0.9rem; background: var(--bg-subtle); border-bottom: 1px solid var(--border); font-size: 0.82rem; color: var(--text-3); }
.plan-week-head b { color: var(--text); font-size: 0.9rem; }
.plan-week ul { list-style: none; padding: 0.4rem 0.5rem; margin: 0; max-width: none; }
.plan-week li { margin: 0; display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.4rem; border-radius: 6px; font-size: 0.88rem; }
.plan-week li:hover { background: var(--bg-subtle); }
.plan-week label { display: flex; gap: 0.55rem; flex: 1; cursor: pointer; color: var(--text); line-height: 1.45; }
.plan-week input { margin-top: 0.2rem; accent-color: var(--accent); width: 15px; height: 15px; flex: none; }
.plan-week li.is-done label span { color: var(--text-3); text-decoration: line-through; }
.plan-go { font-size: 0.8rem; font-weight: 600; white-space: nowrap; padding-top: 0.1rem; }

/* ---------- Progress dashboard ---------- */

.kpis:has(.kpi-ring) { grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); }
.kpis li.kpi-ring { flex-direction: row; align-items: center; gap: 1rem; }
.kpi-ring > div { display: flex; flex-direction: column; }
.ring { width: 76px; height: 76px; flex: none; }
.ring circle { fill: none; stroke-width: 8; }
.ring-bg { stroke: var(--bg-muted); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; }
.dash-h { font-size: 1.15rem; margin: 2rem 0 0.8rem; }
.recs { list-style: none; padding: 0; margin: 0 0 1.5rem; max-width: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.recs li { margin: 0; padding: 1.1rem 1.2rem; border-radius: var(--r-lg); background: var(--accent-soft); display: flex; flex-direction: column; }
.recs b { color: var(--accent-ink); }
.recs p { font-size: 0.9rem; margin: 0.3rem 0 0.7rem; color: var(--accent-ink); opacity: 0.85; flex: 1; }
.recs a { font-weight: 600; font-size: 0.88rem; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 0.75rem; }
.dash-grid .box h3 { margin: 0; font-size: 1rem; }
.dash-grid .fig-title { font-weight: 400; color: var(--text-3); margin: 0.15rem 0 1rem; }
.dash-wide { grid-column: 1 / -1; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .trend { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.chart .hit { fill: transparent; cursor: default; }
.chart-empty { color: var(--text-3); font-size: 0.9rem; padding: 2rem 0; text-align: center; max-width: none; margin: 0; }
.hbars { list-style: none; padding: 0; margin: 0; max-width: none; display: grid; gap: 0.7rem; }
.hbars li { margin: 0; display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) 5.5rem; gap: 0.8rem; align-items: center; font-size: 0.88rem; }
.hb-label { color: var(--text); font-weight: 500; }
.hb-track { height: 10px; background: var(--bg-muted); border-radius: 5px; overflow: hidden; }
.hb-track i { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.hb-val { color: var(--text-2); font-variant-numeric: tabular-nums; text-align: right; }
.heat { display: grid; grid-template-rows: repeat(7, 14px); grid-auto-flow: column; grid-auto-columns: 14px; gap: 3px; overflow-x: auto; padding-bottom: 2px; }
.heat i, .heat-legend i { width: 14px; height: 14px; border-radius: 3px; display: block; }
.h0 { background: var(--bg-muted); }
.h1 { background: #c7d5ff; }
.h2 { background: #8ca8fb; }
.h3 { background: var(--accent); }
.h4 { background: var(--accent-ink); }
.heat .future { background: transparent; }
.heat-legend { display: flex; align-items: center; gap: 3px; margin-top: 0.7rem; font-size: 0.76rem; color: var(--text-3); }
.heat-legend span { margin: 0 0.3rem; }
table.recent { max-width: none; margin: 0.4rem 0 0; }
table.recent td:first-child { white-space: nowrap; width: 5rem; }
table.recent td:last-child { white-space: nowrap; color: var(--text); font-weight: 500; }
.data-controls { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; font-size: 0.85rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.data-controls .linkish { font-size: 0.85rem; cursor: pointer; }
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-state h2 { margin: 1rem 0 0.4rem; }
.empty-state p { margin: 0 auto; }
.empty-ico { display: inline-flex; }
.empty-cta { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; }

@media (max-width: 1100px) {
  .header-cta { display: none; }
  .site-header .wrap { gap: 1rem; }
  .tabs { margin-left: auto; }
}
@media (max-width: 1000px) {
  .kpis, .kpis:has(.kpi-ring) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis li.kpi-ring { grid-column: 1 / -1; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recs { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .tabs { margin-left: 0; flex: 1; min-width: 0; }
  .site-header .wrap { gap: 0.4rem; }
  .compare-table { overflow-x: auto; }
  .compare-table table { min-width: 560px; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .hbars li { grid-template-columns: 7rem minmax(0, 1fr) 4.5rem; gap: 0.5rem; }
  .firm-hero { padding: 1.3rem; }
  .firm-hero h1 { font-size: 1.6rem; }
  .firm-hero-main { align-items: flex-start; }
  .firm-hero .flogo-xl { width: 56px; height: 56px; border-radius: 14px; font-size: 1.1rem; }
  .firm-hero-cta .btn { flex: 1 1 100%; }
  .plan-form { width: 100%; }
  .plan-form .field { flex: 1 1 8rem; }
  .seg { display: grid; width: 100%; }
  .d-form { flex-direction: column; align-items: stretch; }
  .d-form input { max-width: none; }
  .d-top { padding: 0.8rem 1rem; font-size: 0.8rem; flex-wrap: wrap; }
  .d-q { margin-top: 1.8rem; }
  .logo-item { font-size: 0.8rem; }
  .side-nav a { font-size: 0.74rem; }
}
@media (max-width: 820px) {
  .tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 1.5rem; }
}
@media (max-width: 820px) {
  table.plain.recent { display: table; }
  table.plain.recent td, table.plain.recent th { white-space: normal; }
  table.plain.recent th:first-child, table.plain.recent td:first-child, table.plain.recent td:last-child { white-space: nowrap; }
}

/* ---------- Home hero (product-first) ---------- */

.hero2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 3.5rem; align-items: center; padding: 3rem 0 0.5rem; }
.eyebrow { font: 600 0.85rem var(--font); color: var(--text-3); margin: 0 0 1rem; }
.hero2 h1 { font-size: clamp(2.3rem, 4.4vw, 3.5rem); line-height: 1.05; letter-spacing: -0.045em; max-width: 13ch; }
.hero2 .lead { font-size: 1.12rem; line-height: 1.65; color: var(--text-2); margin: 1.2rem 0 0; max-width: 33rem; }
.hero2 .cta { display: flex; gap: 0.7rem; margin-top: 1.8rem; flex-wrap: wrap; }
.hero2-firms { display: flex; align-items: center; gap: 0.9rem; margin-top: 2.2rem; font-size: 0.86rem; color: var(--text-3); flex-wrap: wrap; }
.logos-inline { display: flex; }
.logos-inline a { margin-left: -6px; border-radius: 9px; box-shadow: 0 0 0 2px #fff; transition: transform 0.15s; }
.logos-inline a:first-child { margin-left: 0; }
.logos-inline a:hover { transform: translateY(-2px); }
.hero2-demo { position: relative; padding: 2rem 2rem 4.6rem; border-radius: 18px; background: var(--bg-subtle); border: 1px solid var(--border); }
.demo-window { background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 16px 40px -12px rgba(16, 24, 40, 0.16); overflow: hidden; }
.demo-bar { display: flex; align-items: center; gap: 0.8rem; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--border); font-size: 0.8rem; }
.demo-bar b { flex: 1; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.demo-timer { font: 600 0.74rem var(--mono); color: var(--text-2); background: var(--bg-muted); border-radius: 5px; padding: 0.1rem 0.4rem; }
.demo-body { padding: 1.1rem 1.1rem 1.3rem; display: flex; flex-direction: column; gap: 0.85rem; }
.demo-msg { font-size: 0.86rem; line-height: 1.55; color: var(--text); max-width: 88%; }
.demo-msg span { display: block; font-size: 0.7rem; font-weight: 600; color: var(--text-3); margin-bottom: 0.15rem; }
.demo-msg.c { align-self: flex-end; background: var(--accent); color: #fff; border-radius: 14px 14px 4px 14px; padding: 0.55rem 0.8rem; }
.demo-msg.c span { color: rgba(255, 255, 255, 0.75); }
.demo-typing { display: inline-flex; gap: 4px; }
.demo-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s infinite ease-in-out; }
.demo-typing i:nth-child(2) { animation-delay: 0.15s; }
.demo-typing i:nth-child(3) { animation-delay: 0.3s; }
.demo-score { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 0.9rem 1rem; width: 230px; box-shadow: 0 12px 32px -10px rgba(16, 24, 40, 0.22); }
.demo-score.floating { position: absolute; right: -1.2rem; bottom: -3.2rem; }
.hero2 { margin-bottom: 2.5rem; }
.demo-score-top { display: flex; align-items: baseline; gap: 0.25rem; margin-bottom: 0.6rem; }
.demo-score-top b { font-size: 1.6rem; letter-spacing: -0.03em; color: var(--text); }
.demo-score-top span { font-size: 0.8rem; color: var(--text-3); }
.demo-score-top em { margin-left: auto; font-style: normal; font-size: 0.7rem; font-weight: 600; color: var(--easy); background: #ecfdf3; border-radius: 999px; padding: 0.1rem 0.5rem; }
.demo-score ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.demo-score li { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; font-size: 0.76rem; color: var(--text-2); }
.demo-score li i { width: 84px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--w), var(--bg-muted) var(--w)); }
.p3 { --w: 60%; } .p4 { --w: 80%; } .p5 { --w: 100%; }

/* Module list: one divided list instead of floating cards */
.mods { gap: 0; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.mod { border: 0; border-radius: 0; box-shadow: none; }
.mod + .mod { border-top: 1px solid var(--border); }
.mod.is-live { border-color: var(--border); box-shadow: none; }
.mod.is-soon .mod-text h3 { color: var(--text-2); }
.mod.is-soon .mod-ico { background: var(--bg-subtle); color: var(--text-3); }
.section-head { margin: 4rem 0 1.2rem; }
.section-head p { color: var(--text-3); }
.cta-band { background: var(--text); border-radius: var(--r-lg); }
.cta-band p { color: #a8afbd; }
.cta-band .btn { color: var(--text); }
.cta-band .btn:hover { color: var(--text); background: #f1f3f6; }

/* ---------- Sign in ---------- */

html.auth-pending body > :not(script) { visibility: hidden; }
body.auth-open .site-header, body.auth-open main, body.auth-open footer { display: none; }
body.auth-open { overflow: hidden; }
.auth { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #fff; overflow-y: auto; }
.auth-main { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 5rem 1.5rem 2.5rem; min-height: 100vh; min-height: 100dvh; }
.auth-brand { position: absolute; top: 1.6rem; left: 2rem; display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.auth-brand:hover { color: var(--text); }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 1.85rem; letter-spacing: -0.035em; }
.auth-sub { color: var(--text-2); margin: 0.45rem 0 1.6rem; font-size: 0.97rem; }
.auth-social { display: grid; gap: 0.6rem; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 0.7rem; width: 100%; height: 46px; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; font: 600 0.94rem var(--font); color: var(--text); cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.social-btn:hover { background: var(--bg-subtle); border-color: var(--text-3); }
.social-btn:disabled { opacity: 0.7; cursor: progress; }
.social-btn svg { width: 19px; height: 19px; flex: none; }
.auth-or { display: flex; align-items: center; gap: 0.8rem; color: var(--text-3); font-size: 0.8rem; margin: 1.3rem 0; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-form { display: grid; gap: 0.9rem; }
.auth-form input { height: 46px; font-size: 0.97rem; }
.auth-submit { width: 100%; height: 46px; }
.auth-msg { font-size: 0.87rem; line-height: 1.45; border-radius: 8px; padding: 0.6rem 0.75rem; margin: 0; max-width: none; color: var(--text-2); background: var(--bg-subtle); }
.auth-msg.err { color: #b42318; background: #fef3f2; }
.auth-msg.ok { color: #067647; background: #ecfdf3; }
.auth-msg.warn { color: #93370d; background: #fffaeb; }
#auth-preview { margin: -0.6rem 0 1.2rem; }
#auth-code-msg { margin-top: 0.9rem; }
.auth-switch { text-align: center; font-size: 0.9rem; color: var(--text-2); margin: 1.4rem 0 0; max-width: none; }
.linkish.nudge { animation: nudge 0.9s ease 2; }
@keyframes nudge { 50% { transform: scale(1.06); } }
.auth-card .back-link { margin-bottom: 1.2rem; font-weight: 500; color: var(--text-3); }
.otp { display: flex; gap: 0.5rem; margin: 0 0 1.1rem; }
.otp input { width: 100%; min-width: 0; height: 56px; text-align: center; font: 600 1.4rem var(--font); padding: 0; border-radius: 10px; font-variant-numeric: tabular-nums; }
.otp.shake { animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.auth-legal { max-width: 380px; font-size: 0.78rem; color: var(--text-3); text-align: center; margin: 1.8rem 0 0; }
.auth-guest { margin-top: 0.8rem; font-size: 0.88rem; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; margin-right: 0.5rem; animation: orb-spin 0.7s linear infinite; vertical-align: -2px; }

.auth-side { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 3rem; background: #0b1530; color: #fff; }
.auth-side::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 70% 20%, rgba(36, 87, 245, 0.35), transparent 70%); }
.auth-side-inner { position: relative; width: 100%; max-width: 440px; }
.auth-quote { color: #fff; font-size: 1.45rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1.35; margin: 0 0 1.4rem; max-width: none; }
.auth-side .demo-chat { display: flex; flex-direction: column; gap: 0.7rem; }
.auth-side .demo-msg { color: #dfe6ff; max-width: 92%; }
.auth-side .demo-msg span { color: #8d9bc6; }
.auth-side .demo-msg.i { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px 12px 12px 4px; padding: 0.55rem 0.8rem; }
.auth-side .demo-msg.c { color: #fff; }
.auth-side .demo-score { margin: 1.3rem 0 0 auto; }
.auth-points { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0.55rem; max-width: none; }
.auth-points li { margin: 0; position: relative; padding-left: 1.6rem; font-size: 0.92rem; color: #c6d0ef; }
.auth-points li::before { content: ""; position: absolute; left: 0; top: 0.3rem; width: 15px; height: 15px; border-radius: 50%; background: rgba(36, 87, 245, 0.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 9px no-repeat; }

/* ---------- Account menu ---------- */

.user-slot { display: flex; align-items: center; }
.user-slot:empty { display: none; }
.acct { position: relative; }
.acct-btn { width: 34px; height: 34px; border-radius: 50%; padding: 0; border: 1px solid var(--border); background: var(--accent-soft); color: var(--accent-ink); font: 700 0.78rem var(--font); cursor: pointer; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; }
.acct-btn:hover { box-shadow: 0 0 0 3px var(--bg-muted); }
.acct-btn img { width: 100%; height: 100%; object-fit: cover; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 250px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 0.35rem; z-index: 40; }
.acct-who { padding: 0.6rem 0.7rem 0.7rem; margin-bottom: 0.3rem; border-bottom: 1px solid var(--border); }
.acct-who b { display: block; font-size: 0.92rem; }
.acct-who span { display: block; font-size: 0.8rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu a, .acct-menu button { display: block; width: 100%; text-align: left; padding: 0.5rem 0.7rem; border-radius: 7px; font: 500 0.9rem var(--font); color: var(--text); background: none; border: 0; cursor: pointer; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--bg-subtle); color: var(--text); }
.acct-menu button { color: var(--text-2); }

/* ---------- Admin ---------- */

.admin-bar { display: flex; gap: 0.6rem; align-items: center; margin: 0 0 0.8rem; flex-wrap: wrap; }
.admin-bar input { flex: 1 1 16rem; max-width: 26rem; }
.admin-bar .muted { font-size: 0.85rem; margin-right: auto; }
.admin-table { padding: 0; overflow-x: auto; }
.admin-table table { margin: 0; max-width: none; }
.admin-table table.plain th, .admin-table table.plain td { padding: 0.75rem 1rem; vertical-align: middle; }
.admin-table table.plain th:first-child, .admin-table table.plain td:first-child { padding-left: 1.2rem; }
.who { display: flex; align-items: center; gap: 0.7rem; }
.who b { display: block; color: var(--text); font-size: 0.92rem; }
.who small { color: var(--text-3); font-size: 0.82rem; }
.av { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex: none; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 0.8rem; display: inline-flex; align-items: center; justify-content: center; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.prov { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; font-weight: 600; color: var(--text-2); background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 999px; padding: 0.12rem 0.55rem; white-space: nowrap; }
.prov::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.prov-google::before { background: #ea4335; }
.prov-facebook::before { background: #0866ff; }
.prov-email::before { background: var(--easy); }
.kpi-split { display: flex !important; flex-wrap: wrap; gap: 0.3rem; font-size: 0.9rem !important; padding: 0.35rem 0; }

@media (max-width: 1000px) {
  .hero2 { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .hero2-demo { max-width: 560px; }
}
@media (max-width: 820px) {
  .hero2 { padding-top: 1.6rem; }
  .hero2 .cta .btn { flex: 1 1 100%; }
  .hero2-demo { padding: 1rem 1rem 4.5rem; }
  .demo-score.floating { right: 0.8rem; bottom: -2.6rem; width: 210px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
  .auth-main { justify-content: flex-start; padding: 5.5rem 1.25rem 2rem; }
  .auth-brand { left: 1.25rem; top: 1.3rem; }
  .otp { gap: 0.35rem; }
  .otp input { height: 52px; }
  .user-slot { margin-left: 0.2rem; }
}
.hero2 .demo-msg.i { max-width: 62%; }
@media (max-width: 820px) { .hero2 .demo-msg.i { max-width: 100%; } .hero2 .demo-body { padding-bottom: 4.5rem; } }

/* ---------- Admin: tabs and visitors ---------- */

.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.admin-optout { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.82rem; color: var(--text-3); cursor: pointer; }
.admin-optout input { accent-color: var(--accent); }
.admin-tabs { display: flex; gap: 0.2rem; border-bottom: 1px solid var(--border); margin: 0 0 1.4rem; }
.admin-tabs a { padding: 0.6rem 0.9rem; margin-bottom: -1px; border-bottom: 2px solid transparent; font-weight: 600; font-size: 0.92rem; color: var(--text-3); }
.admin-tabs a:hover { color: var(--text); }
.admin-tabs a[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.admin-tabs a span { font-size: 0.75rem; font-weight: 600; color: var(--text-2); background: var(--bg-muted); border-radius: 999px; padding: 0.05rem 0.45rem; margin-left: 0.25rem; }
.seg-sm { min-width: 0; grid-template-columns: repeat(3, auto); border-radius: 10px; }
.seg-sm button { padding: 0.4rem 0.8rem; }
.seg-sm button b { font-size: 0.85rem; }
.box-h { font-size: 0.95rem; margin: 0 0 0.9rem; }
.chart .bar { fill: var(--accent); }
.chart rect.hit { fill: transparent; }
.chart rect.hit:hover + .bar, .chart .bar:hover { opacity: 0.85; }
.admin-grid { margin: 0.75rem 0 1.4rem; }
.hbars-wide li { grid-template-columns: minmax(0, 12rem) minmax(0, 1fr) 5.5rem; }
.hb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-in { color: var(--easy); font-weight: 600; }
.av.anon { background: var(--bg-muted); color: var(--text-3); }
.admin-table td.num, .admin-table th.num { text-align: right; }
@media (max-width: 820px) {
  .hbars-wide li { grid-template-columns: minmax(0, 8rem) minmax(0, 1fr) 4.5rem; }
  .admin-table table.plain td, .admin-table table.plain th { white-space: nowrap; }
}

.dash-grid .box .box-h, .box .box-h { margin: 0 0 0.9rem; }

.auth-social + .auth-msg { margin-top: 0.8rem; }

/* Privacy policy and terms pages */
.legal { max-width: 46rem; padding: 2.5rem 0 4rem; }
.legal h2 { font-size: 1.25rem; margin: 2.2rem 0 0.5rem; }
.legal h3 { font-size: 1rem; margin: 1.4rem 0 0.3rem; }
.legal-links { margin-top: 2.5rem; font-size: 0.92rem; }
.auth-legal a { color: var(--text-2); text-decoration: underline; }

/* Progress tab for signed-out visitors: just the sign-in button, centred */
.progress-locked { min-height: 55vh; display: flex; align-items: center; justify-content: center; }
.plan-locked { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.plan-locked h2 { margin: 0; }

/* ---------- Sign-in card (Progress, firm prep plans) ---------- */

.g-logo { width: 18px; height: 18px; flex: none; }
.header-signin { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.85rem; font-size: 0.88rem; }
.signin-card { position: relative; width: 100%; max-width: 420px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 2rem 2rem 1.5rem; text-align: center; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 24px 48px -16px rgba(16, 24, 40, 0.18); }
.signin-ico { width: 48px; height: 48px; margin: 0 auto 1rem; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.signin-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.signin-card h2 { font-size: 1.35rem; margin: 0; letter-spacing: -0.02em; }
.signin-card > p { margin: 0.5rem auto 0; color: var(--text-2); font-size: 0.95rem; max-width: 30rem; }
.signin-points { list-style: none; padding: 0; margin: 1.2rem 0 0; text-align: left; display: grid; gap: 0.5rem; max-width: none; }
.signin-points li { margin: 0; position: relative; padding-left: 1.6rem; font-size: 0.9rem; color: var(--text-2); }
.signin-points li::before { content: ""; position: absolute; left: 0; top: 0.28rem; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232457f5' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 10px no-repeat; }
.signin-google { margin-top: 1.5rem; }
.signin-card .auth-msg { margin-top: 0.8rem; text-align: left; }
.signin-note { font-size: 0.78rem !important; color: var(--text-3) !important; margin-top: 1rem !important; }
.signin-note a { color: var(--text-3); text-decoration: underline; }
.signin-card.is-compact { max-width: none; text-align: left; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 1.2rem; align-items: center; padding: 1.4rem 1.5rem; box-shadow: none; }
.signin-card.is-compact .signin-ico { grid-row: 1 / span 2; margin: 0; }
.signin-card.is-compact h2 { font-size: 1.1rem; }
.signin-card.is-compact > p { margin: 0.2rem 0 0; grid-column: 2; }
.signin-card.is-compact .signin-google { grid-column: 3; grid-row: 1 / span 2; margin: 0; width: auto; padding: 0 1.2rem; }
.signin-card.is-compact .auth-msg, .signin-card.is-compact .signin-note { grid-column: 1 / -1; }

/* Faded preview of the dashboard behind the card */
.locked-wrap { position: relative; min-height: 560px; }
.locked-preview { filter: blur(3px); opacity: 0.55; pointer-events: none; user-select: none; }
.lp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.lp-kpis span { height: 96px; border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(var(--bg-muted), var(--bg-muted)) 1.1rem 1.2rem / 40% 10px no-repeat, linear-gradient(var(--accent-soft-2), var(--accent-soft-2)) 1.1rem 2.4rem / 30% 26px no-repeat, #fff; }
.lp-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0.75rem; margin-top: 0.75rem; }
.lp-chart { height: 280px; border: 1px solid var(--border); border-radius: 12px; display: flex; align-items: flex-end; gap: 6%; padding: 1.5rem 1.5rem 1.2rem; background: #fff; }
.lp-chart i { flex: 1; background: var(--accent-soft-2); border-radius: 6px 6px 0 0; }
.lp-list { border: 1px solid var(--border); border-radius: 12px; padding: 1.4rem; display: grid; gap: 1.1rem; align-content: start; background: #fff; }
.lp-list b { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--accent-soft-2) 0 var(--w, 70%), var(--bg-muted) var(--w, 70%)); }
.lp-list b:nth-child(2) { --w: 55%; } .lp-list b:nth-child(3) { --w: 85%; } .lp-list b:nth-child(4) { --w: 40%; } .lp-list b:nth-child(5) { --w: 62%; }
.locked-overlay { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 2.5rem; background: linear-gradient(to bottom, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.85) 70%); }

@media (max-width: 820px) {
  .header-signin { padding: 0.4rem 0.65rem; font-size: 0.82rem; gap: 0.4rem; }
  .signin-card { padding: 1.6rem 1.2rem 1.2rem; }
  .signin-card.is-compact { grid-template-columns: auto minmax(0, 1fr); }
  .signin-card.is-compact .signin-google { grid-column: 1 / -1; grid-row: auto; margin-top: 1rem; width: 100%; }
  .lp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-row { grid-template-columns: minmax(0, 1fr); }
  .lp-list { display: none; }
  .locked-wrap { min-height: 600px; }
  .locked-overlay { padding-top: 1rem; }
}
