/* Valueatorpro — Apple-language dashboard. Sampled from approved comp:
   ground #F7F7F8 · card #FFFFFF · ink #15181B · accent #1B8CE8 */

:root {
  --ground: #f7f7f8;
  --panel: #f2f2f4;
  --card: #ffffff;
  --ink: #15181b;
  --ink-2: #55555c;
  --ink-3: #6e6e73;
  --hairline: rgba(21, 24, 27, 0.08);
  --hairline-strong: rgba(21, 24, 27, 0.16);
  --accent: #1b8ce8;
  --accent-deep: #1173c8;
  --accent-press: #0f6ab8;
  --accent-tint: rgba(27, 140, 232, 0.1);
  --green: #1c6b40;
  --green-tint: #e4f4ea;
  --amber: #7d5406;
  --amber-tint: #faf0da;
  --red: #c23934;
  --red-tint: #fdeae8;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 24px rgba(16, 24, 40, 0.055);
  --shadow-raise: 0 2px 4px rgba(16, 24, 40, 0.06), 0 14px 36px rgba(16, 24, 40, 0.09);
  --r-card: 16px;
  --r-ctl: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { color-scheme: light; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.008em;
  color: var(--ink);
  /* Same flat ground color, with a barely-there depth field behind it —
     the calm register stays, the page just isn't a single flat fill. */
  background:
    radial-gradient(1100px 620px at 14% -8%, rgba(27, 140, 232, 0.055), transparent 60%),
    radial-gradient(900px 560px at 108% 18%, rgba(27, 140, 232, 0.035), transparent 55%),
    var(--ground);
  background-attachment: fixed;
  accent-color: var(--accent);
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent-tint); color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: rgba(21, 24, 27, 0.16); border-radius: 999px; border: 3px solid var(--ground); }
::-webkit-scrollbar-thumb:hover { background: rgba(21, 24, 27, 0.28); }
::-webkit-scrollbar-track { background: transparent; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ic {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Shell ---------- */

.app { display: flex; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; align-self: flex-start;
  display: flex; flex-direction: column;
  width: 248px; height: 100vh; flex: none;
  padding: 28px 16px 20px;
  background: var(--panel);
  border-right: 1px solid var(--hairline);
}

.wordmark {
  display: flex; align-items: center; gap: 9px;
  font-size: 21px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
  padding: 4px 12px; margin-bottom: 26px;
}
.wordmark img { width: 24px; height: 24px; flex: none; }

.nav { display: flex; flex-direction: column; gap: 2px; }

.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--r-ctl);
  color: var(--ink-2); text-decoration: none;
  font-size: 14.5px; font-weight: 500;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.nav a .ic { color: var(--ink-3); transition: color 160ms ease-out; }
.nav a:hover { background: rgba(21, 24, 27, 0.05); color: var(--ink); }
.nav a.is-active { background: var(--accent-tint); color: var(--accent-deep); }
.nav a.is-active .ic { color: var(--accent); }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }

.plan-chip {
  display: flex; flex-direction: column; gap: 1px;
  width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r-ctl);
  background: var(--card); box-shadow: var(--shadow-card);
  font: inherit; text-align: left; cursor: pointer;
  transition: box-shadow 160ms ease-out;
}
.plan-chip:hover { box-shadow: var(--shadow-raise); }
.plan-name { font-size: 13px; font-weight: 600; }
.plan-renew { font-size: 12px; color: var(--ink-3); }

.admin-link {
  display: block; padding: 6px 12px; font-size: 12.5px; font-weight: 600;
  color: var(--ink-3); text-decoration: none;
}
.admin-link:hover { color: var(--ink); }

.account-row { display: flex; align-items: center; gap: 4px; }

.account {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  padding: 8px 10px; border: 0; border-radius: var(--r-ctl);
  background: transparent; font: inherit; text-align: left; cursor: pointer;
  transition: background-color 160ms ease-out;
}
.account:hover { background: rgba(21, 24, 27, 0.05); }
.account-meta { display: flex; flex-direction: column; min-width: 0; }
.account-name { font-size: 13.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.signout {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 32px; border: 0; border-radius: var(--r-ctl);
  background: transparent; color: var(--ink-3); cursor: pointer;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.signout .ic { width: 16px; height: 16px; transform: scaleX(-1); }
.signout:hover { background: rgba(21, 24, 27, 0.06); color: var(--ink); }
.account-role { font-size: 12px; color: var(--ink-3); }

.monogram {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: linear-gradient(180deg, #41729f, #35608f);
  color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
}
.monogram-accent { background: linear-gradient(180deg, var(--accent-deep), var(--accent-press)); }
.monogram-accent .ic { width: 16px; height: 16px; }
.monogram-sm { width: 30px; height: 30px; font-size: 11.5px; }

.main { flex: 1; min-width: 0; padding: 32px 40px 96px; max-width: 1180px; margin: 0 auto; }

/* ---------- Page bar ---------- */

.pagebar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  margin: 4px 0 24px; padding: 16px 22px;
  background: var(--card); border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.pagebar h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.022em; line-height: 1.2; }
.pagebar-sub { margin-top: 3px; font-size: 13.5px; color: var(--ink-3); }
.pagebar-side { display: flex; align-items: center; gap: 12px; }

.quality-pill {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow-card);
  font-size: 13px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.quality-pill strong { font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.quality-pill .chip { margin-left: 4px; }

.search {
  display: flex; align-items: center; gap: 8px;
  width: 250px; padding: 8px 14px;
  background: var(--ground); border-radius: 999px;
  color: var(--ink-3);
  transition: box-shadow 160ms ease-out, background-color 160ms ease-out;
}
.search:focus-within { background: var(--card); box-shadow: 0 0 0 2px var(--accent); }
.search .ic { width: 16px; height: 16px; }
.search input {
  border: 0; outline: 0; background: transparent; width: 100%;
  font: inherit; font-size: 14px; color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
}

.card h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.014em; }

.card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.card-head .card-sub { flex-basis: 100%; }
.card-sub { margin-top: 2px; font-size: 13px; color: var(--ink-3); }

.view > * + *, .view .two-col, .view .compare-row { margin-bottom: 20px; }
.view > :last-child { margin-bottom: 0; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.ra-sub { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.ra-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Chips & buttons ---------- */

.chip {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0;
  white-space: nowrap;
}
.chip-green { background: var(--green-tint); color: var(--green); }
.chip-amber { background: var(--amber-tint); color: var(--amber); }
.chip-red { background: var(--red-tint); color: var(--red); }
.chip-gray { background: rgba(21, 24, 27, 0.06); color: var(--ink-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px; border: 0; border-radius: 999px;
  font: inherit; font-size: 14px; font-weight: 600; letter-spacing: -0.006em;
  white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background-color 160ms ease-out, box-shadow 160ms ease-out, transform 160ms ease-out;
}
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--accent-deep); color: #fff; }
.btn-primary:hover { background: var(--accent-press); }
.btn-primary:active { transform: scale(0.98); }
.btn-quiet { background: rgba(21, 24, 27, 0.055); color: var(--ink); }
.btn-quiet:hover { background: rgba(21, 24, 27, 0.1); }
.btn-small { padding: 6px 13px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: default; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.text-btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; background: none; padding: 0;
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--accent); text-decoration: none; cursor: pointer;
  transition: color 160ms ease-out;
}
.text-btn .ic { width: 15px; height: 15px; transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1); }
.text-btn:hover { color: var(--accent-deep); }
.text-btn:hover .ic { transform: translateX(3px); }

/* ---------- Overview ---------- */

.hero-row { display: grid; grid-template-columns: minmax(300px, 2fr) 3fr; gap: 20px; }

.score-card { display: flex; flex-direction: column; }

.ring-wrap { position: relative; width: 200px; margin: 18px auto 6px; }
.ring-wrap::before {
  /* The score ring is the product's signature moment — it earns a soft
     glow the way nothing else on the page does. One instance, not a
     reusable "glow" utility: this is the one number worth looking twice at. */
  content: ""; position: absolute; inset: -34px; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(27, 140, 232, 0.16), transparent 68%);
}
.ring { display: block; width: 100%; height: auto; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 13; stroke-linecap: round; }
.ring-track { stroke: #eceef1; }
.ring-value {
  stroke: var(--accent);
  stroke-dasharray: 527.8;                 /* 2πr, r=84 */
  stroke-dashoffset: calc(527.8 * (1 - var(--score, 0)));
  transition: stroke-dashoffset 900ms cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 2px 6px rgba(27, 140, 232, 0.35));
}
.ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.ring-number {
  font-size: 52px; font-weight: 700; letter-spacing: -0.03em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.score-note { margin-top: 16px; font-size: 13.5px; color: var(--ink-2); text-align: center; max-width: 34ch; align-self: center; }

.trend-card { display: flex; flex-direction: column; }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.legend .dot { margin-left: 10px; }
.legend .dot:first-child { margin-left: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-accent { background: var(--accent); }
.dot-gray { background: #c9ccd1; }

.chart { flex: 1; min-height: 220px; }
.chart svg { display: block; width: 100%; height: 100%; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.stat {
  display: flex; flex-direction: column; gap: 4px;
  text-decoration: none; color: inherit;
  transition: box-shadow 180ms ease-out, transform 180ms ease-out;
}
.stat:hover { box-shadow: var(--shadow-raise); transform: translateY(-1px); }
.stat-label { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.stat-delta { font-size: 12.5px; font-weight: 600; }
.stat-delta.up { color: var(--green); }

.action-list { list-style: none; }
.action-list li {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
}
.action-list li:first-child { border-top: 0; }
.action-body { flex: 1; min-width: 0; }
.action-title { font-size: 14.5px; font-weight: 600; }
.action-sub { margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.action-list .chip { margin-top: 2px; }

.tick { position: relative; display: inline-flex; margin-top: 2px; cursor: pointer; }
.tick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tick .box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--hairline-strong);
  color: transparent; background: var(--card);
  transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out;
}
.tick .box .ic { width: 13px; height: 13px; stroke-width: 2.2; }
.tick input:checked + .box { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.tick input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.tick input:checked ~ * { text-decoration: line-through; }
.action-list li:has(input:checked) .action-title { text-decoration: line-through; color: var(--ink-3); }
.action-list li:has(input:checked) .action-sub { color: var(--ink-3); }

/* ---------- Pro-locked content ---------- */
.action-list li.is-locked { opacity: 0.82; }
.box-locked {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; margin-top: 2px;
  border: 1.5px solid var(--hairline-strong); background: var(--wash-chip); color: var(--ink-3);
}
.box-locked .ic { width: 12px; height: 12px; stroke-width: 2; }
.action-sub-locked { color: var(--ink-3); }
.action-sub-locked a { color: var(--accent-deep); font-weight: 600; text-decoration: none; }
.action-sub-locked a:hover { text-decoration: underline; }

.apply-col-locked { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.pro-lock { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.pro-lock .ic { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.pro-lock a { color: var(--accent-deep); font-weight: 600; text-decoration: none; }
.pro-lock a:hover { text-decoration: underline; }

/* ---------- Audit ---------- */

.audit-list { list-style: none; }
.audit-list > li { border-top: 1px solid var(--hairline); }
.audit-list > li:first-child { border-top: 0; }

.audit-row {
  display: grid; grid-template-columns: 148px 1fr 64px 20px;
  align-items: center; gap: 16px;
  width: 100%; padding: 13px 0;
  border: 0; background: none; font: inherit; text-align: left;
  color: inherit; cursor: pointer;
}
.audit-name { font-size: 14.5px; font-weight: 600; }
.meter { height: 6px; border-radius: 999px; background: #eceef1; overflow: hidden; }
.meter i {
  display: block; height: 100%; width: var(--w, 0%);
  border-radius: inherit; background: var(--accent);
  transition: width 700ms cubic-bezier(0.22, 1, 0.36, 1);
  /* Segmented/dot texture instead of a flat fill — the same bar, just
     built from small cells instead of one solid block. Every meter in
     the app (sub-scores, audit rows, benchmarks, history, trend) is this
     one component, so this single change carries everywhere at once. */
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 4px, transparent 4px 6px);
  mask-image: repeating-linear-gradient(90deg, #000 0 4px, transparent 4px 6px);
}
.meter.low i { background: #e8a13d; }
.audit-score { font-size: 14px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.audit-row .ic { width: 16px; height: 16px; color: var(--ink-3); transition: transform 200ms ease-out; }
.audit-row[aria-expanded="true"] .ic { transform: rotate(90deg); }

.audit-detail { padding: 2px 0 16px; display: grid; grid-template-columns: 148px 1fr; gap: 16px; }
.audit-detail > p {
  grid-column: 2; font-size: 13.5px; color: var(--ink-2);
  max-width: 62ch;
}
.audit-detail .text-btn { grid-column: 2; justify-self: start; font-size: 13.5px; }

.rewrite { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rewrite-col { padding: 14px 16px; border-radius: 12px; background: var(--ground); }
.rewrite-col.suggested { background: var(--accent-tint); }
.rewrite-col h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); margin-bottom: 8px; }
.rewrite-col.suggested h3 { color: var(--accent-deep); }
.rewrite-col p { font-size: 13.5px; color: var(--ink-2); }
.rewrite-col.suggested p { color: var(--ink); }

.fineprint { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }

.history { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.history li { display: grid; grid-template-columns: 34px 1fr 32px; align-items: center; gap: 12px; }
.history-month { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.history-bar { height: 8px; border-radius: 999px; background: #eceef1; overflow: hidden; }
.history-bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--accent); border-radius: inherit; opacity: 0.85; }
.history li:first-child .history-bar i { opacity: 1; }
.history-score { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Benchmarking ---------- */

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(21, 24, 27, 0.06); }
.seg-btn {
  padding: 6px 16px; border: 0; border-radius: 999px;
  background: transparent; font: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--ink-2); cursor: pointer;
  transition: background-color 160ms ease-out, color 160ms ease-out, box-shadow 160ms ease-out;
}
.seg-btn.is-on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12); }

.compare-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compare-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); }
.compare-head .monogram { width: 40px; height: 40px; }

.metric-list { list-style: none; }
.metric-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 0; border-top: 1px solid var(--hairline);
}
.metric-list li:first-child { border-top: 0; }
.metric-name { font-size: 14px; color: var(--ink-2); }
.metric-side { display: flex; align-items: center; gap: 10px; }
.metric-value { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

.bench-bars { display: flex; flex-direction: column; gap: 16px; }
.bench-group { display: grid; grid-template-columns: 148px 1fr 44px; gap: 16px; align-items: center; }
.bench-name { font-size: 14px; font-weight: 600; }
.bench-pair { display: flex; flex-direction: column; gap: 5px; }
.bench-bar { height: 8px; border-radius: 999px; background: #eceef1; overflow: hidden; }
.bench-bar i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; transition: width 700ms cubic-bezier(0.22, 1, 0.36, 1); }
.bench-bar.you i { background: var(--accent); }
.bench-bar.them i { background: #c9ccd1; }
.bench-delta { font-size: 12.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.bench-delta.up { color: var(--green); }
.bench-delta.down { color: var(--amber); }
.bench-delta.flat { color: var(--ink-3); }

.note-card { display: flex; gap: 16px; align-items: flex-start; }
.note-ic { width: 24px; height: 24px; color: var(--accent); margin-top: 2px; }
.note-card h2 { margin-bottom: 6px; }
.note-card p { font-size: 14px; color: var(--ink-2); max-width: 68ch; }
.note-card .text-btn { margin-top: 10px; }

/* ---------- Content Studio ---------- */

.gen-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field textarea, .field select, .field input[type="text"] {
  font: inherit; font-size: 14px; color: var(--ink);
  padding: 10px 12px; border-radius: var(--r-ctl);
  border: 1px solid var(--hairline-strong); background: var(--card);
  transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
  resize: vertical;
}
.field textarea:hover, .field select:hover { border-color: rgba(21, 24, 27, 0.28); }
.field textarea:focus-visible, .field select:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint);
}
.field-row { display: flex; gap: 14px; }
.gen-form .btn { align-self: flex-start; }

.draft-card { display: flex; flex-direction: column; }
.draft-body { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--ink); max-width: 62ch; }
.draft-body.is-thinking { opacity: 0.4; }
.draft-body p { transition: opacity 300ms ease-out; }

.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.week-day { display: flex; flex-direction: column; gap: 6px; align-items: stretch; text-align: center; }
.week-name { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.week-slot {
  height: 34px; border-radius: 8px; background: #eceef1;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: transparent;
}
.week-slot.hot { background: var(--accent-deep); color: #fff; }
.week-slot.warm { background: var(--accent-tint); color: var(--accent-deep); }

.queue { list-style: none; }
.queue li {
  display: grid; grid-template-columns: 128px 1fr auto; gap: 12px; align-items: center;
  padding: 13px 0; border-top: 1px solid var(--hairline);
}
.queue li:first-child { border-top: 0; }
.queue-when { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.queue-when .ic { width: 15px; height: 15px; color: var(--ink-3); }
.queue p { font-size: 14px; }

/* ---------- Engagement ---------- */

.comment-list { list-style: none; }
.comment-list > li {
  display: flex; gap: 14px;
  padding: 16px 0; border-top: 1px solid var(--hairline);
}
.comment-list > li:first-child { border-top: 0; padding-top: 4px; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { font-size: 13px; color: var(--ink-3); }
.comment-meta strong { color: var(--ink); font-weight: 600; }
.comment-text { margin-top: 4px; font-size: 14px; color: var(--ink); max-width: 66ch; }

.reply-suggest {
  margin-top: 12px; padding: 13px 16px;
  border-radius: 12px; background: var(--ground);
}
.reply-suggest p { font-size: 13.5px; color: var(--ink-2); max-width: 66ch; }
.reply-tag {
  display: inline-block; margin-right: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--accent-deep);
}
.reply-suggest .btn-row { margin-top: 12px; }
.more-link { margin-top: 14px; }

/* ---------- Testimonials ---------- */

.request-list { list-style: none; }
.request-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0; border-top: 1px solid var(--hairline);
}
.request-list li:first-child { border-top: 0; }
.request-list div { flex: 1; min-width: 0; }
.req-name { font-size: 14px; font-weight: 600; }
.req-sub { font-size: 12.5px; color: var(--ink-3); }

.quote { padding: 16px 18px; border-radius: 12px; background: var(--ground); }
.quote p { font-size: 14.5px; color: var(--ink); max-width: 58ch; }
.quote footer { margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }

/* ---------- Resume ---------- */

.gap-list, .extract-list { list-style: none; }
.gap-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 0; border-top: 1px solid var(--hairline);
}
.gap-list li:first-child { border-top: 0; }
.gap-list .ic { width: 18px; height: 18px; margin-top: 2px; }
.gap-list li.ok .ic { color: var(--green); }
.gap-list li.gap .ic { color: var(--amber); }
.gap-list li.ok .apply-num { background: var(--green-tint); color: var(--green); }
.gap-list li.gap .apply-num { background: var(--amber-tint); color: var(--amber); }
.gap-title { font-size: 14px; font-weight: 600; }
.gap-sub { font-size: 13px; color: var(--ink-2); max-width: 56ch; }

.extract-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0; border-top: 1px solid var(--hairline);
}
.extract-list li:first-child { border-top: 0; }
.extract-list li .apply-num { flex-shrink: 0; }
.extract-text { font-size: 14px; max-width: 48ch; }

.file-input { max-width: 280px; font-size: 13px; color: var(--ink-2); }
.wording-head { margin-top: 20px; }
.wording-list { list-style: none; margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.wording-list li { font-size: 13px; color: var(--ink-2); padding: 10px 12px; border-radius: var(--r-ctl); background: var(--ground); }

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

.app-foot { margin-top: 36px; padding: 18px 4px 6px; border-top: 1px solid var(--hairline); }
.app-foot p { font-size: 12.5px; color: var(--ink-3); }

/* ---------- Overview sub-scores ---------- */

.subscore-list { list-style: none; margin: 18px auto 0; width: 100%; max-width: 300px; display: flex; flex-direction: column; gap: 9px; }
.subscore-list li { display: grid; grid-template-columns: 92px 1fr 28px; align-items: center; gap: 10px; }
.subscore-name { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.subscore-value { font-size: 12.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* ---------- Playbook ---------- */

.positioning p { font-size: 16px; line-height: 1.55; }

.pillar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pillar {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px; border-radius: 12px;
  background: var(--ground); text-decoration: none; color: inherit;
  transition: background-color 160ms ease-out, box-shadow 160ms ease-out, transform 160ms ease-out;
}
.pillar:hover { background: var(--accent-tint); transform: translateY(-1px); }
.pillar-name { font-size: 14.5px; font-weight: 600; }
.pillar p { font-size: 13px; color: var(--ink-2); }
.pillar-meta { font-size: 12px; font-weight: 600; color: var(--accent-deep); }

.plan-list { list-style: none; }
.plan-list li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 0; border-top: 1px solid var(--hairline);
}
.plan-list li:first-child { border-top: 0; }
.plan-week { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); flex: none; width: 58px; margin-top: 3px; }
.plan-body { flex: 1; min-width: 0; }
.plan-title { font-size: 13.5px; font-weight: 600; }
.plan-title.done { text-decoration: line-through; color: var(--ink-3); }
.plan-sub { font-size: 12.5px; color: var(--ink-3); }
.plan-list .chip { margin-top: 2px; }

.pillar-tag {
  display: inline-block; margin-left: 6px; padding: 1px 8px;
  border-radius: 999px; background: var(--accent-tint);
  font-size: 11px; font-weight: 600; color: var(--accent-deep);
  white-space: nowrap; vertical-align: 1px;
}

/* ---------- Intelligence ---------- */

.memory-list { list-style: none; }
.memory-list li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--hairline);
}
.memory-list li:first-child { border-top: 0; }
.memory-list .ic { width: 18px; height: 18px; margin-top: 2px; }
.memory-list .ic.ok { color: var(--green); }
.memory-list .ic.wait { color: var(--amber); }
.memory-list div { flex: 1; min-width: 0; }
.mem-title { font-size: 14px; font-weight: 600; }
.mem-sub { font-size: 12.5px; color: var(--ink-3); }

.alert-list { list-style: none; }
.alert-list li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 0; border-top: 1px solid var(--hairline);
}
.alert-list li:first-child { border-top: 0; }
.alert-when { flex: none; width: 52px; font-size: 12px; font-weight: 600; color: var(--ink-3); margin-top: 2px; font-variant-numeric: tabular-nums; }
.alert-list p { font-size: 13.5px; color: var(--ink); max-width: 58ch; }

.growth-compare { display: flex; flex-direction: column; gap: 14px; margin: 8px 0 4px; }
.growth-row { display: grid; grid-template-columns: 92px 1fr 40px; align-items: center; gap: 12px; }
.growth-name { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.growth-value { font-size: 14px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; color: var(--green); }
.growth-note { text-align: left; align-self: auto; max-width: none; }

.bench-controls { flex-wrap: wrap; }

.chart-empty {
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  height: 100%; min-height: 200px; padding: 20px 24px;
  border-radius: 12px; background: var(--ground);
}
.chart-empty p { font-size: 13.5px; color: var(--ink-2); max-width: 48ch; }
.chart-empty strong { color: var(--ink); font-weight: 600; }

/* ---------- Toggle switch ---------- */

.tips-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 2px 4px 4px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  cursor: pointer;
}

.switch { position: relative; display: inline-flex; flex: none; }
.switch input {
  position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer;
}
.switch-track {
  display: block; width: 36px; height: 21px; border-radius: 999px;
  background: rgba(21, 24, 27, 0.16);
  transition: background-color 160ms ease-out;
}
.switch-thumb {
  display: block; width: 17px; height: 17px; margin: 2px; border-radius: 50%;
  background: var(--card); box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12); /* Thumb shadow, matches .seg-btn.is-on */
  transition: transform 160ms ease-out;
}
.switch input:checked + .switch-track { background: var(--accent-deep); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(15px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Coachmarks ---------- */

.coachmark {
  position: fixed; z-index: 45;
  width: 280px; padding: 14px 16px;
  border-radius: 12px;
  background: var(--card); box-shadow: var(--shadow-raise);
  animation: coach-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.coachmark-head { display: flex; align-items: center; gap: 8px; }
.coachmark-head .ic { width: 16px; height: 16px; color: var(--accent-deep); flex: none; }
.coachmark-title { font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; }
.coachmark-body { margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.coachmark-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px;
}
.coachmark-off {
  border: 0; background: none; padding: 0; font: inherit;
  font-size: 11.5px; color: var(--ink-3); cursor: pointer; text-decoration: underline;
}
.coachmark-off:hover { color: var(--ink-2); }
.coachmark-got {
  border: 0; border-radius: 999px; padding: 6px 13px;
  background: var(--accent-deep); color: #fff; font: inherit;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.coachmark-got:hover { background: var(--accent-press); }

.coachmark-caret {
  position: absolute; width: 12px; height: 12px;
  background: var(--card); transform: rotate(45deg);
}
.coachmark[data-side="top"] .coachmark-caret { bottom: -5px; left: 24px; box-shadow: 2px 2px 3px rgba(16, 24, 40, 0.06); }
.coachmark[data-side="bottom"] .coachmark-caret { top: -5px; left: 24px; box-shadow: -2px -2px 3px rgba(16, 24, 40, 0.05); }
.coachmark[data-side="left"] .coachmark-caret { right: -5px; top: 20px; box-shadow: 2px -2px 3px rgba(16, 24, 40, 0.05); }
.coachmark[data-side="right"] .coachmark-caret { left: -5px; top: 20px; box-shadow: -2px 2px 3px rgba(16, 24, 40, 0.06); }

@media (max-width: 540px) {
  .coachmark {
    left: 16px !important; right: 16px !important; top: auto !important; bottom: 16px !important;
    width: auto;
  }
  .coachmark .coachmark-caret { display: none; }
  .tips-toggle { padding: 6px 4px; }
}

/* ---------- Data-source banner ---------- */

.data-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 12px 18px;
  border-radius: var(--r-card);
  background: var(--amber-tint);
}
.data-banner .ic { width: 18px; height: 18px; color: var(--amber); flex: none; }
.data-banner p { flex: 1; min-width: 240px; font-size: 13px; color: var(--amber); }
.data-banner.is-real { background: var(--green-tint); }
.data-banner.is-real .ic, .data-banner.is-real p { color: var(--green); }

.field-help { font-size: 12.5px; color: var(--ink-3); margin-bottom: 2px; }

.cannot-list { list-style: none; }
.cannot-list li {
  padding: 10px 0; border-top: 1px solid var(--hairline);
  font-size: 13.5px; color: var(--ink-2);
}
.cannot-list li:first-child { border-top: 0; }

.apply-col .fineprint { margin-top: 8px; }

/* ---------- Billing dialog ---------- */

.billing-dialog { width: min(420px, calc(100vw - 32px)); }
.billing-body { padding: 6px 28px 26px; }
.billing-points { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.billing-points li {
  position: relative; padding-left: 22px; font-size: 13.5px; color: var(--ink-2);
}
.billing-points li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent-deep);
}
.billing-active { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--green-tint); color: var(--green); font-size: 13px; }
#billing-paypal-slot { margin-top: 18px; min-height: 44px; }
.billing-note { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }

/* ---------- Apply dialog ---------- */

.apply {
  width: min(620px, calc(100vw - 32px));
  max-height: min(88vh, 860px);
  margin: auto;              /* the global reset zeroes the UA centering margin */
  padding: 0; border: 0;
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: var(--shadow-raise);
  color: var(--ink);
  overflow: visible;
}
.apply::backdrop { background: var(--ground); }
.apply[open] { animation: coach-in 220ms cubic-bezier(0.22, 1, 0.36, 1); }

.apply-close-form { position: absolute; top: 14px; right: 14px; margin: 0; }
.apply-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-3); cursor: pointer;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.apply-close .ic { width: 16px; height: 16px; transform: rotate(45deg); }
.apply-close:hover { background: var(--wash-chip); color: var(--ink); }

.apply-head { padding: 24px 28px 0; }
.apply-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.apply-dest { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }

.apply-steps { list-style: none; margin: 0; padding: 18px 28px 4px; overflow-y: auto; max-height: calc(88vh - 190px); }
.apply-steps > li {
  display: grid; grid-template-columns: 28px 1fr; gap: 14px;
  padding: 14px 0; border-top: 1px solid var(--hairline);
}
.apply-steps > li:first-child { border-top: 0; padding-top: 4px; }
.apply-steps > li:not(.is-current):not(.is-done) { opacity: 0.42; }
.apply-steps > li:not(.is-current) .apply-body > *:not(h3) { display: none; }

.apply-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--wash-chip); color: var(--ink-2);
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.is-current > .apply-num { background: var(--accent-deep); color: #fff; }
.is-done > .apply-num { background: var(--green-tint); color: var(--ink); }

.apply-body h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin-top: 3px; }
.apply-note { margin-top: 5px; font-size: 13.5px; color: var(--ink-2); max-width: 56ch; }
.apply-body .btn-row { margin-top: 14px; }

.apply-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.apply-col { padding: 12px 14px; border-radius: 12px; background: var(--ground); }
.apply-col h4 { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.apply-col p { font-size: 13px; color: var(--ink-2); }
.apply-col-new { background: var(--accent-tint); }
.apply-col-new h4 { color: var(--accent-deep); }
.apply-col-new p { color: var(--ink); }

.apply-edit-toggle { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.apply-edit {
  width: 100%; margin-top: 10px; font: inherit; font-size: 13.5px; color: var(--ink);
  padding: 10px 12px; border-radius: var(--r-ctl); resize: vertical;
  border: 1px solid var(--hairline-strong); background: var(--card);
}
.apply-edit:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }

.apply-howto { margin: 12px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.apply-howto li { font-size: 13px; color: var(--ink-2); }

.apply-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--ink-2); min-height: 18px; }
.apply-status:empty { margin-top: 0; min-height: 0; }

.apply-result { padding: 26px 28px 8px; text-align: center; }
.apply-tick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--green-tint); color: var(--green); margin-bottom: 12px;
}
.apply-tick .ic { width: 24px; height: 24px; stroke-width: 2.2; }
.apply-result h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.018em; }
.apply-result p { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); }
.apply-result .btn-row { justify-content: center; }

.apply-foot {
  padding: 14px 28px 20px; margin-top: 8px;
  border-top: 1px solid var(--hairline);
  font-size: 12.5px; color: var(--ink-3);
}

@media (max-width: 540px) {
  .apply { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .apply-steps { max-height: calc(100dvh - 200px); padding-inline: 20px; }
  .apply-head, .apply-foot, .apply-result { padding-inline: 20px; }
  .apply-compare { grid-template-columns: 1fr; }
}

/* ---------- Print (playbook / intelligence export) ---------- */

@media print {
  .sidebar, .coach-fab, .coach, .search, .btn, .text-btn, .onboard { display: none !important; }
  .main { padding: 0; max-width: none; }
  .card, .pagebar { box-shadow: none; border: 1px solid var(--hairline-strong); break-inside: avoid; }
  body { background: #ffffff; }
  /* The synthetic-data label must survive every path out of the product. */
  .app-foot { display: block !important; margin-top: 20px; break-inside: avoid; }
  .app-foot p { color: var(--ink-2); }
  /* A printed toggle can't be toggled: keep only the option this export shows. */
  .seg { background: transparent; padding: 0; }
  .seg-btn { display: none; }
  .seg-btn.is-on { display: inline-flex; box-shadow: none; color: var(--ink-3); font-weight: 600; padding: 0; }
}

/* ---------- Onboarding ---------- */

.onboard {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: var(--ground);
  overflow-y: auto;
}

.onboard-card {
  width: 100%; max-width: 560px;
  background: var(--card); border-radius: var(--r-card);
  box-shadow: var(--shadow-raise);
  padding: 28px 32px 24px;
  display: flex; flex-direction: column;
}

.onboard-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 24px;
}
.onboard-mark { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.onboard-mark img { width: 22px; height: 22px; }
.onboard-skip { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.onboard-skip:hover { color: var(--ink-2); }

.onboard-title { font-size: 24px; font-weight: 700; letter-spacing: -0.022em; line-height: 1.2; }
.onboard-lede { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); max-width: 52ch; }

.onboard-points { list-style: none; margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.onboard-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.onboard-points li strong { color: var(--ink); font-weight: 600; }
.onboard-points .ic { width: 19px; height: 19px; color: var(--accent); margin-top: 2px; }

.onboard-time { margin-top: 18px; font-size: 12.5px; color: var(--ink-3); }
.onboard-step .btn-row { margin-top: 20px; }

#ob-import-banner { margin-top: 18px; }
#ob-import-banner .text-btn { font-size: 12.5px; flex: none; }

.ob-extension {
  margin-top: 18px; padding: 12px 14px;
  border-radius: var(--r-ctl); border: 1px solid var(--hairline-strong);
  background: var(--panel);
}
.ob-extension summary {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  cursor: pointer; list-style: none;
}
.ob-extension summary::-webkit-details-marker { display: none; }
.ob-extension summary .ic { width: 16px; height: 16px; color: var(--accent); flex: none; }
.ob-extension[open] summary { margin-bottom: 10px; }
.ob-extension p { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.ob-extension ol { margin: 8px 0 0 18px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.ob-extension code {
  font: 11.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--hairline); padding: 1.5px 5px; border-radius: 4px;
}
.ob-extension-note { margin-top: 8px; color: var(--ink-3); }
.ob-copy-path { display: inline-flex; margin-top: 4px; font-size: 12px; }
#ob-extension-detected { margin-top: 18px; margin-bottom: 0; }

.onboard-form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.field input[type="text"], .field input[type="url"] {
  font: inherit; font-size: 14px; color: var(--ink);
  padding: 10px 12px; border-radius: var(--r-ctl);
  border: 1px solid var(--hairline-strong); background: var(--card);
  transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}
.field input[type="text"]:hover, .field input[type="url"]:hover { border-color: rgba(21, 24, 27, 0.28); }
.field input[type="text"]:focus-visible, .field input[type="url"]:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint);
}

.goal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.goal {
  padding: 12px 14px; border-radius: var(--r-ctl);
  border: 1px solid var(--hairline-strong); background: var(--card);
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  text-align: left; cursor: pointer;
  transition: border-color 160ms ease-out, background-color 160ms ease-out, color 160ms ease-out;
}
.goal:hover { border-color: rgba(21, 24, 27, 0.28); }
.goal[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-deep); }

.onboard-audit { text-align: center; }
.onboard-audit .onboard-lede { margin-left: auto; margin-right: auto; }
.ring-wrap-sm { width: 168px; margin: 22px auto 8px; }
.ring-wrap-sm .ring-number { font-size: 42px; }
.onboard-audit .btn-row { justify-content: center; }

.onboard-progress {
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-size: 12px; font-weight: 600; color: var(--ink-3);
}

/* ---------- Coach ---------- */

.coach-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 30;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border: 0; border-radius: 999px;
  background: var(--accent-deep); color: #fff;
  font: inherit; font-size: 14px; font-weight: 600; letter-spacing: -0.006em;
  box-shadow: var(--shadow-raise);
  cursor: pointer;
  transition: background-color 160ms ease-out, transform 160ms ease-out, opacity 160ms ease-out;
}
.coach-fab .ic { width: 17px; height: 17px; }
.coach-fab:hover { background: var(--accent-press); }
.coach-fab:active { transform: scale(0.97); }
.coach-fab[aria-expanded="true"] { opacity: 0; pointer-events: none; }

.coach {
  position: fixed; right: 22px; bottom: 22px; z-index: 35;
  width: min(400px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 44px));
  display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--r-card);
  box-shadow: var(--shadow-raise);
  overflow: hidden;
  animation: coach-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes coach-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.coach-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--hairline);
  background: var(--panel);
}
.coach-id { display: flex; align-items: center; gap: 10px; }
.coach-id h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.coach-mode { font-size: 12px; color: var(--ink-3); }
.coach-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-3); cursor: pointer;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.coach-close .ic { width: 16px; height: 16px; transform: rotate(45deg); }
.coach-close:hover { background: rgba(21, 24, 27, 0.06); color: var(--ink); }

.coach-msgs {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px;
}
.msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; }
.msg-user { align-self: flex-end; background: var(--accent-deep); color: #fff; border-bottom-right-radius: 5px; }
.msg-coach { align-self: flex-start; background: var(--ground); color: var(--ink); border-bottom-left-radius: 5px; }
.msg-note { align-self: center; font-size: 12px; color: var(--ink-3); text-align: center; max-width: 95%; padding: 0; }
.msg-coach.is-typing i {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--ink-3); margin-right: 3px;
  animation: coach-dot 1s ease-in-out infinite;
}
.msg-coach.is-typing i:nth-child(2) { animation-delay: 0.15s; }
.msg-coach.is-typing i:nth-child(3) { animation-delay: 0.3s; margin-right: 0; }
@keyframes coach-dot { 0%, 60%, 100% { opacity: 0.35; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }

.coach-suggest { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 10px; }
.coach-suggest button {
  padding: 6px 12px; border: 1px solid var(--hairline-strong); border-radius: 999px;
  background: var(--card); font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); cursor: pointer; white-space: nowrap;
  transition: border-color 160ms ease-out, background-color 160ms ease-out, color 160ms ease-out;
}
.coach-suggest button:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-tint); }

.coach-form {
  display: flex; gap: 8px; align-items: center;
  padding: 12px 16px 14px; border-top: 1px solid var(--hairline);
}
.coach-form input {
  flex: 1; font: inherit; font-size: 13.5px; color: var(--ink);
  padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--hairline-strong); background: var(--card);
  transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}
.coach-form input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.coach-send {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: none; border: 0; border-radius: 50%;
  background: var(--accent-deep); color: #fff; cursor: pointer;
  transition: background-color 160ms ease-out, transform 160ms ease-out;
}
.coach-send .ic { width: 17px; height: 17px; }
.coach-send:hover { background: var(--accent-press); }
.coach-send:active { transform: scale(0.95); }
.coach-send[disabled] { opacity: 0.5; cursor: default; }
.coach-send[disabled]:hover { background: var(--accent-deep); }

@media (max-width: 540px) {
  .goal-grid, .pillar-grid { grid-template-columns: 1fr; }
  .onboard-card { padding: 22px 20px 18px; }
  .coach { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; }
  .coach-fab { right: 16px; bottom: 16px; }
}

/* ---------- View switching ---------- */

.view { animation: view-in 240ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes view-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1060px) {
  .hero-row { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .two-col, .compare-row { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar {
    position: sticky; top: 0; z-index: 10;
    width: 100%; height: auto;
    flex-direction: row; align-items: center; gap: 8px;
    padding: 10px 16px;
    background: rgba(242, 242, 244, 0.82);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    border-right: 0; border-bottom: 1px solid var(--hairline);
  }
  .wordmark { margin-bottom: 0; padding: 4px 8px 4px 0; font-size: 18px; }
  .nav {
    flex-direction: row; gap: 2px; overflow-x: auto; flex: 1;
    scrollbar-width: none; -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 7px 12px; white-space: nowrap; font-size: 13.5px; }
  .nav a .ic { display: none; }
  .sidebar-foot { margin-top: 0; flex-direction: row; align-items: center; }
  .plan-chip { display: none; }
  .account { padding: 4px; }
  .account-meta { display: none; }
  .main { padding: 20px 16px 92px; }
  .pagebar h1 { font-size: 22px; }
  .search { width: 100%; }
  .pagebar { align-items: stretch; flex-direction: column; }
  .pagebar-side { justify-content: flex-start; flex-wrap: wrap; }
  .pagebar > .btn { align-self: flex-start; }
  .audit-row { grid-template-columns: 1fr 64px 20px; }
  .audit-row .meter { grid-column: 1 / -1; grid-row: 2; margin-top: 2px; }
  .audit-name { grid-row: 1; }
  .audit-detail { grid-template-columns: 1fr; }
  .audit-detail > p, .audit-detail .text-btn { grid-column: 1; }
  .rewrite { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; }
  .bench-group { grid-template-columns: 1fr 44px; }
  .bench-name { grid-column: 1 / -1; }
  .queue li { grid-template-columns: 1fr auto; }
  .queue-when { grid-column: 1 / -1; }
  .stat-strip { gap: 12px; }
  .stat-value { font-size: 24px; }
}

@media (max-width: 480px) {
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .card { padding: 18px; border-radius: 14px; }
  .ring-wrap { width: 172px; }
  .ring-number { font-size: 44px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
