/* EnrollGoal app. Dense, quiet, readable at a glance before coffee. */

/* Tokens: the EnrollGoal design system (claude.ai artifact "EnrollGoal", tokens.json,
   Nov 2026), mapped onto the names this stylesheet already used so every screen
   picks it up. Design-system name in each comment. Fonts are self-hosted in
   web/fonts so the app still opens with no network. */

@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url("/fonts/Manrope-latin.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/fonts/JetBrainsMono-latin.woff2") format("woff2"); }

:root {
  --brand-teal:   #0F766E;   /* brand-teal */
  --brand-signal: #14B8A6;   /* brand-signal: fills only, never text on white */
  --brand-aqua:   #5EEAD4;   /* brand-aqua */
  --brand-ink:    #0B1F1C;   /* brand-ink */

  --bg:      #FFFFFF;        /* bg: content area */
  --panel:   #FFFFFF;        /* surface-raised: cards */
  --sunk:    #F3F5F4;        /* surface: left nav, table heads, wells */
  --ink:     #0B1F1C;        /* text */
  --muted:   #4B5A57;        /* text-muted */
  --faint:   #56655F;        /* text-muted, one step lighter; 5.4:1 on surface */
  --line:    #D5DEDB;        /* border */
  --line-hi: #7C8E8A;        /* border-strong: control outlines */

  --accent:      #0F766E;    /* primary */
  --accent-hover:#0B5F58;    /* primary-hover */
  --on-accent:   #FFFFFF;    /* on-primary */
  --accent-soft: #CCFBF1;    /* primary-soft */

  /* status: the design system's success / warning / danger, plus neutrals */
  --live:    #15803D;        /* success */
  --written: #B45309;        /* warning */
  --queued:  #475569;        /* slate: waiting, not a brand colour */
  --blocked: #B91C1C;        /* danger */
  --planned: #64748B;        /* chart-3 */
  --parked:  #6B7280;
  --hot:     #B91C1C;
  --warm:    #B45309;

  --radius: 10px;            /* radius-md: controls */
  --radius-lg: 16px;         /* radius-lg: cards, dialogs */
  --shadow-sm: 0 1px 2px rgba(11,31,28,.06);
  --shadow-md: 0 8px 24px rgba(11,31,28,.08);
  --shadow-lg: 0 24px 48px rgba(11,31,28,.12);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: Manrope, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;

  /* Native <select>, the search field's clear affordance and the scrollbar
     are painted by the OS. Without this they stay light on a dark page and
     read as unstyled holes in the layout. */
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1F1C; --panel: #17362F; --sunk: #112B27; --ink: #F1F7F5; --muted: #A7C4BE; --faint: #93B1AB;
    --line: #24463F; --line-hi: #5E7F78;
    --accent: #5EEAD4; --accent-hover: #99F6E4; --on-accent: #0B1F1C; --accent-soft: #123F38;
    --live: #4ADE80; --written: #FBBF24; --queued: #94A3B8; --blocked: #F87171; --planned: #94A3B8; --parked: #9CA3AF;
    --hot: #F87171; --warm: #FBBF24;
    --shadow-sm: none; --shadow-md: 0 8px 24px rgba(0,0,0,.4); --shadow-lg: 0 24px 48px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1F1C; --panel: #17362F; --sunk: #112B27; --ink: #F1F7F5; --muted: #A7C4BE; --faint: #93B1AB;
  --line: #24463F; --line-hi: #5E7F78;
  --accent: #5EEAD4; --accent-hover: #99F6E4; --on-accent: #0B1F1C; --accent-soft: #123F38;
  --live: #4ADE80; --written: #FBBF24; --queued: #94A3B8; --blocked: #F87171; --planned: #94A3B8; --parked: #9CA3AF;
  --hot: #F87171; --warm: #FBBF24;
  --shadow-sm: none; --shadow-md: 0 8px 24px rgba(0,0,0,.4); --shadow-lg: 0 24px 48px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 14px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------ app shell -- */
/* Sidebar + topbar. The sidebar carries navigation and the exam scope; the
   topbar carries where you are and how fresh the data is. The client selector
   lives at the foot of the sidebar because a tenant switcher is a property of
   the workspace, not of the page you happen to be on.

   Grid, not fixed positioning: the main column then has a real width, so a
   wide table inside it scrolls within its own panel instead of pushing the
   whole page sideways. */

:root { --side-w: 224px; --side-w-collapsed: 64px; --top-h: 60px; }

.app {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100vh;
}
.app.collapsed { --side-w: var(--side-w-collapsed); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--panel); color: var(--ink); padding: 10px 14px;
  border: 1px solid var(--line-hi); border-radius: var(--radius);
}
.skip:focus { left: 8px; top: 8px; }

/* ----------------------------------------------------------------- side -- */

.side {
  position: sticky; top: 0; align-self: start;
  height: 100vh; display: flex; flex-direction: column;
  background: var(--sunk);
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.side-brand { padding: 14px 12px 10px; }
.brand-link {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit; border-radius: var(--radius);
  padding: 4px; min-height: 44px;
}
.brand-mark { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; }
.brand-mark img { width: 28px; height: 28px; border-radius: 6px; display: block; }
.brand-mark .initials {
  width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font: 600 11px var(--mono);
}
.app:not(.collapsed) .side-brand.has-logo .brand-mark { display: none; }
.brand-logo { min-width: 0; overflow: hidden; }
.brand-logo img { height: 30px; width: auto; display: block; }
.brand-logo .wordmark { font: 600 15px var(--sans); white-space: nowrap; }

/* Both supplied lockups are dark ink on transparent, with no light-on-dark
   variant in the repo, so in dark mode the logo sits on a light plate. A CSS
   filter would shift the blue and the green, and those are the brand. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .side-brand.plated .brand-logo {
    background: #FFFFFF; border-radius: 6px; padding: 3px 7px;
  }
}

/* Collapsed: the wide lockup goes, the square mark stays. */
.app.collapsed .brand-logo,
.app.collapsed .nav-text,
.app.collapsed .side-label,
.app.collapsed #client,
.app.collapsed .collapse-text { display: none; }
.app.collapsed .side-brand { padding: 14px 0 10px; }
.app.collapsed .brand-link,
.app.collapsed .side-nav button,
.app.collapsed .side-exams button,
.app.collapsed .collapse { justify-content: center; }
.app.collapsed .side-nav,
.app.collapsed .side-scope { padding-inline: 8px; }

/* ------------------------------------------------------------- side nav -- */

.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; }
.side-nav button, .side-exams button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 40px; padding: 8px 10px;
  font: 500 13px var(--sans); color: var(--muted);
  background: transparent; border: 0; border-radius: var(--radius);
  cursor: pointer; text-align: left;
}
.side-nav button:hover, .side-exams button:hover { background: var(--panel); color: var(--ink); }
.side-nav button.on {
  position: relative;
  background: var(--panel); color: var(--ink); font-weight: 600;
  box-shadow: var(--shadow-sm);
}
/* The active screen gets a rail as well as a fill: two cues, so the current
   location survives a greyscale print and a colour-blind reader. */
.side-nav button.on::before {
  content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.app.collapsed .side-nav button.on::before { left: -8px; }
.ico { width: 18px; height: 18px; flex: 0 0 auto; }

.side-scope {
  padding: 10px 10px 6px; margin-top: 6px;
  border-top: 1px solid var(--line);
  overflow-y: auto; flex: 1 1 auto;
}
.side-label {
  font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .08em;
  color: var(--faint); margin: 0 0 6px; padding-left: 10px; display: block;
}
.side-exams { display: flex; flex-direction: column; gap: 1px; }
.side-exams button { min-height: 34px; padding-block: 6px; font-size: 12.5px; }
.side-exams button.on { color: var(--ink); font-weight: 600; background: var(--panel); }
.dot-exam { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; background: var(--line-hi); }
.side-exams button.on .dot-exam { background: var(--accent); }

/* Collapsed, a column of identical grey dots says nothing and cannot be picked
   from, so the rail shows the exam's own short code instead. */
.exam-abbr { display: none; font: 600 9px var(--mono); letter-spacing: .02em; }
.app.collapsed .exam-abbr { display: block; }
.app.collapsed .side-exams .dot-exam { display: none; }
.app.collapsed .side-exams button.on { color: var(--accent); }

.side-foot { padding: 10px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.side-foot .picker { width: 100%; font-size: 13px; }
.collapse {
  display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px;
  font: 500 12px var(--sans); color: var(--faint);
  background: transparent; border: 0; border-radius: var(--radius); cursor: pointer;
}
.collapse:hover { background: var(--panel); color: var(--ink); }
.collapse-icon { width: 18px; flex: 0 0 auto; text-align: center; }
.collapse-icon::before { content: "\00AB"; font-size: 14px; }
.app.collapsed .collapse-icon::before { content: "\00BB"; }

/* --------------------------------------------------------------- topbar -- */

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  min-height: var(--top-h); padding: 10px 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { min-width: 0; flex: 1; }
.topbar-title h1 { font: 600 18px/1.2 var(--sans); margin: 0; }
.topbar-sub {
  margin: 2px 0 0; font-size: 12px; color: var(--faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar-right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.stamp { font: 11px var(--mono); color: var(--faint); }

.icon-btn {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: 0 0 auto;
  background: transparent; border: 1px solid var(--line-hi);
  border-radius: var(--radius); cursor: pointer; color: var(--ink);
}
.menu::before {
  content: ""; width: 16px; height: 2px; background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.picker {
  font: 600 14px var(--sans);
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line-hi);
  border-radius: var(--radius);
  padding: 6px 10px;
}

.scrim { position: fixed; inset: 0; z-index: 19; background: rgba(0,0,0,.42); }

/* ------------------------------------------------------------------ main -- */

main { padding: 22px 24px 64px; max-width: 1180px; width: 100%; }
.loading { color: var(--muted); }
#view:focus { outline: none; }

/* ---------------------------------------------------------------- narrow -- */
/* Under 900px the sidebar goes off-canvas. Same element, same markup, so there
   is one navigation in the accessibility tree rather than a duplicate mobile
   copy that screen readers would announce twice. */

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app.collapsed { --side-w: 224px; }
  .side {
    position: fixed; top: 0; left: 0; z-index: 20;
    width: 264px; transform: translateX(-100%);
    box-shadow: 0 0 0 1px var(--line);
  }
  .app.drawer-open .side { transform: translateX(0); }
  .icon-btn { display: flex; }
  .topbar { padding: 10px 16px; }
  main { padding: 18px 16px 64px; }

  /* Collapsing is a desktop affordance. Inside a drawer it would strip the
     labels off the only navigation on screen, so the whole collapsed state is
     unwound here rather than merely hiding the button. */
  .collapse { display: none; }
  .app.collapsed .brand-logo,
  .app.collapsed .nav-text,
  .app.collapsed .side-label,
  .app.collapsed #client { display: revert; }
  .app.collapsed .side-label { display: block; }
  .app.collapsed .side-brand { padding: 14px 12px 10px; }
  /* The drawer keeps whatever .collapsed the desktop left in storage, so the
     mark has to be hidden on the class-independent selector here too, or the
     lockup's own figure is drawn twice. */
  .side-brand.has-logo .brand-mark { display: none; }
  .app.collapsed .brand-link,
  .app.collapsed .side-nav button,
  .app.collapsed .side-exams button { justify-content: flex-start; }
  .app.collapsed .exam-abbr { display: none; }
  .app.collapsed .side-exams .dot-exam { display: block; }
}

@media (prefers-reduced-motion: no-preference) {
  .side { transition: transform 200ms ease; }
}

h2.screen {
  font: 600 13px var(--sans);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--faint);
  margin: 28px 0 10px;
}
h2.screen:first-child { margin-top: 0; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.pick { grid-template-columns: minmax(0,2.2fr) minmax(0,1fr); }
@media (max-width: 860px) { .grid.two, .grid.pick { grid-template-columns: 1fr; } }

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ today: pick -- */

.pick-card { border-left: 3px solid var(--accent); }
.pick-kicker {
  font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .08em;
  color: var(--faint); margin-bottom: 6px;
}
.pick-topic { font-size: 18px; font-weight: 600; line-height: 1.35; margin: 0 0 8px; }
.pick-why { color: var(--muted); margin: 0 0 12px; }
.cmd {
  display: inline-block; font: 13px var(--mono);
  background: var(--sunk); border: 1px solid var(--line);
  border-radius: 5px; padding: 5px 9px; color: var(--ink);
}

.meter-num { font: 600 34px/1 var(--mono); font-variant-numeric: tabular-nums; }
.meter-of { font: 400 18px var(--mono); color: var(--faint); }
.meter-label { color: var(--muted); margin-top: 4px; }
.meter-bar { display: flex; gap: 3px; margin-top: 12px; }
.meter-bar i { flex: 1; height: 6px; border-radius: 2px; background: var(--sunk); }
.meter-bar i.done { background: var(--live); }
.meter-bar i.due  { background: var(--queued); }

/* -------------------------------------------------------- today: signals -- */

.signals { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.signal { padding: 12px 14px; text-align: left; font: inherit; color: inherit; }
button.signal { cursor: pointer; }
.signal .n { font: 600 26px/1 var(--mono); font-variant-numeric: tabular-nums; }
.signal .k { color: var(--muted); font-size: 13px; margin-top: 5px; }
.signal.alert { border-color: color-mix(in srgb, var(--hot) 45%, var(--line)); }
.signal.alert .n { color: var(--hot); }
.signal.ok .n { color: var(--live); }

/* ------------------------------------------------------------- list rows -- */

.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 0; border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.countdown {
  font: 600 13px var(--mono); font-variant-numeric: tabular-nums;
  min-width: 62px; text-align: right; color: var(--muted);
}
.countdown.hot  { color: var(--hot); }
.countdown.warm { color: var(--warm); }
.countdown.past { color: var(--faint); }

.tag {
  font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 6px; border-radius: 4px;
  background: var(--sunk); color: var(--muted); white-space: nowrap;
}
.tag.exam { background: transparent; border: 1px solid var(--line-hi); }

.dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; align-self: center; }
.s-live    { background: var(--live); }
.s-written { background: var(--written); }
.s-queued  { background: var(--queued); }
.s-blocked { background: var(--blocked); }
.s-planned { background: var(--planned); }
.s-parked  { background: var(--parked); }

.state-live    { color: var(--live); }
.state-written { color: var(--written); }
.state-queued  { color: var(--queued); }
.state-blocked { color: var(--blocked); }
.state-planned { color: var(--planned); }
.state-parked  { color: var(--parked); }

/* -------------------------------------------------------------- map tree -- */

.exam-block { margin-bottom: 26px; }
.exam-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 10px;
}
.exam-name { font-size: 17px; font-weight: 600; }
.stack { display: flex; height: 6px; border-radius: 3px; overflow: hidden; width: 180px; background: var(--sunk); }
.stack i { height: 100%; }

.hub {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 11px 14px; border-radius: var(--radius);
  background: var(--sunk); border: 1px solid var(--line);
}
.hub-label {
  font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .06em;
  color: var(--faint);
}
.hub a { color: var(--ink); font-weight: 600; text-decoration: none; }
.hub a:hover { text-decoration: underline; }

.pillar { margin-left: 18px; padding-left: 20px; border-left: 1px solid var(--line-hi); }
.pillar-name {
  font: 600 12px var(--sans); color: var(--muted);
  margin: 14px 0 2px; position: relative;
}
.pillar-name::before {
  content: ""; position: absolute; left: -20px; top: 50%;
  width: 13px; height: 1px; background: var(--line-hi);
}

.spoke {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-top: 1px solid var(--line);
}
.spoke:first-of-type { border-top: 0; }
.spoke .kw { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spoke .cid { font: 600 11px var(--mono); color: var(--faint); min-width: 30px; }
.spoke .vol { font: 12px var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); min-width: 56px; text-align: right; }
.spoke .meta { font: 11px var(--mono); color: var(--faint); min-width: 92px; text-align: right; }
.spoke a { color: inherit; text-decoration: none; }
.spoke a:hover { text-decoration: underline; }
@media (max-width: 700px) { .spoke .vol, .spoke .meta { display: none; } }

/* ----------------------------------------------------------------- queue -- */

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font: 600 11px var(--sans); text-transform: uppercase;
  letter-spacing: .06em; color: var(--faint);
  padding: 0 10px 7px 0; border-bottom: 1px solid var(--line-hi);
}
td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.overdue td { background: color-mix(in srgb, var(--hot) 7%, transparent); }

.week-label {
  font: 600 11px var(--mono); color: var(--faint);
  text-transform: uppercase; letter-spacing: .06em;
  padding: 16px 0 6px;
}

.empty { color: var(--faint); font-style: italic; padding: 10px 0; }
.note { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

/* ---------------------------------------------------------------- review -- */

.signal[data-goto] { cursor: pointer; }
.signal[data-goto]:hover { border-color: var(--line-hi); }
.signal.attn { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.signal.attn .n { color: var(--accent); }

.review { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 18px; }
@media (max-width: 900px) { .review { grid-template-columns: 1fr; } }

.draft-list { display: flex; flex-direction: column; gap: 8px; align-self: start; position: sticky; top: 64px; }
.draft-card {
  text-align: left; cursor: pointer; font: inherit; color: inherit;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 12px;
}
.draft-card:hover { border-color: var(--line-hi); }
.draft-card.on { border-color: var(--accent); box-shadow: inset 2px 0 0 var(--accent); }
.draft-card-top { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.draft-card-title { font-weight: 600; line-height: 1.35; font-size: 13px; }
.draft-card-meta { font-size: 11px; color: var(--faint); margin-top: 4px; }

.chip {
  font: 600 10px var(--mono); padding: 2px 6px; border-radius: 4px;
  background: var(--sunk); color: var(--muted);
}
.chip.pass { background: color-mix(in srgb, var(--live) 16%, transparent); color: var(--live); }
.chip.fail { background: color-mix(in srgb, var(--blocked) 16%, transparent); color: var(--blocked); }
.chip.na   { color: var(--faint); }

.tag.stage-live   { color: var(--live); }
.tag.stage-in-repo { color: var(--written); }
.tag.stage-draft  { color: var(--queued); }

.detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.detail-title { font-size: 20px; font-weight: 600; line-height: 1.3; margin: 2px 0 0; }

.decision {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; border-radius: var(--radius); margin-top: 12px;
  border: 1px solid var(--line);
}
.decision.yes { border-color: color-mix(in srgb, var(--live) 45%, var(--line)); }
.decision.yes strong { color: var(--live); }
.decision.no { border-color: color-mix(in srgb, var(--blocked) 45%, var(--line)); }
.decision.no strong { color: var(--blocked); }

.decide { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.note-input {
  flex: 1; min-width: 200px; font: 13px var(--sans); color: var(--ink);
  background: var(--panel); border: 1px solid var(--line-hi);
  border-radius: var(--radius); padding: 7px 10px;
}
.btn {
  font: 600 13px var(--sans); cursor: pointer; padding: 7px 14px;
  border-radius: var(--radius); border: 1px solid var(--line-hi);
  background: var(--panel); color: var(--ink);
}
.btn:hover { border-color: var(--ink); }
.btn.yes { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.yes:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.yes:disabled:hover { background: var(--accent); border-color: var(--accent); }
.btn.no  { background: transparent; border-color: var(--blocked); color: var(--blocked); }
.btn.ghost { font-weight: 500; padding: 4px 9px; font-size: 12px; color: var(--muted); }
.btn.ghost.on { color: var(--ink); border-color: var(--ink); }

.check {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-top: 1px solid var(--line);
}
.check:first-child { border-top: 0; }
.check-mark { width: 7px; height: 7px; border-radius: 50%; background: var(--planned); flex: 0 0 auto; }
.check.ok   .check-mark { background: var(--live); }
.check.warn .check-mark { background: var(--written); }
.check.fail .check-mark { background: var(--blocked); }
.check.info .check-mark { background: var(--line-hi); }
.check-value { font: 600 13px var(--mono); font-variant-numeric: tabular-nums; }
.check.ok   .check-value { color: var(--live); }
.check.warn .check-value { color: var(--written); }
.check.fail .check-value { color: var(--blocked); }
.check-hint { font-size: 11px; min-width: 110px; text-align: right; }
@media (max-width: 700px) { .check-hint { display: none; } }

/* ------------------------------------------------------------- preview --- */

.preview { max-width: 68ch; }
.preview .hero { width: 100%; height: auto; border-radius: var(--radius); margin-bottom: 18px; }
.preview h1 { font-size: 26px; line-height: 1.25; margin: 0 0 16px; }
.preview h2 { font-size: 19px; margin: 28px 0 8px; line-height: 1.3; }
.preview h3 { font-size: 16px; margin: 22px 0 6px; }
.preview p, .preview li { font-size: 15px; line-height: 1.7; }
.preview blockquote {
  margin: 16px 0; padding: 10px 16px; border-left: 3px solid var(--line-hi);
  background: var(--sunk); border-radius: 0 var(--radius) var(--radius) 0;
}
.preview blockquote p:first-child { margin-top: 0; }
.preview blockquote p:last-child { margin-bottom: 0; }
.preview table { margin: 16px 0; font-size: 13px; }
.preview code { font: 13px var(--mono); background: var(--sunk); padding: 1px 4px; border-radius: 3px; }
.preview pre { background: var(--sunk); padding: 12px; border-radius: var(--radius); overflow-x: auto; }
.preview pre code { background: none; padding: 0; }
.preview a { color: var(--accent); }
.preview hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

.report { font-size: 13px; }
.report h1 { font-size: 18px; margin: 0 0 10px; }
.report h2 { font-size: 15px; margin: 20px 0 6px; }
.report h3 { font-size: 14px; margin: 16px 0 4px; }
.report table { font-size: 12px; }
.report td, .report th { padding: 5px 8px 5px 0; }
.report a { color: var(--accent); }

/* ------------------------------------------------- accessibility & polish -- */
/* Against the ui-ux-pro-max pre-delivery checklist: visible focus, hover
   transitions, reduced-motion respected, tables that scroll instead of
   breaking the layout. */

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

@media (prefers-reduced-motion: no-preference) {
  .side-nav button, .side-exams button, .collapse, .icon-btn,
  .draft-card, .btn, .signal[data-audit-severity], .picker {
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  }
}

.table-wrap { overflow-x: auto; }
.table-wrap table { min-width: 620px; }

/* ------------------------------------------------------------- queue row -- */

.queue-row { margin-top: 12px; border-left: 3px solid var(--accent); }
.queue-row.blocked { border-left-color: var(--blocked); }
.queue-row.none { border-left-color: var(--line-hi); }

.queue-label {
  font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .06em;
  color: var(--faint);
}
.queue-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.queue-top .grow { flex: 1; }
.queue-top .state-live, .queue-top .state-queued, .queue-top .state-blocked {
  font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .05em;
}

.queue-fields { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; }
.qfield { font-family: var(--mono); }
.qfield .faint { text-transform: uppercase; letter-spacing: .05em; font-size: 10px; }
.queue-fields a { color: var(--accent); font: 12px var(--mono); }

.queue-notes {
  margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px; line-height: 1.6;
}

/* -------------------------------------------------------------- keywords -- */

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 22px; }
.kpi-n { font: 600 26px/1 var(--mono); font-variant-numeric: tabular-nums; }
.kpi-k { color: var(--muted); font-size: 13px; margin-top: 5px; }
.kpi-h { font-size: 11px; margin-top: 2px; }

/* Data bars, not a chart library: sorted descending, value label always
   visible, so the bar is decoration and the number is the data. */
.databar {
  display: inline-block; width: 74px; height: 6px; border-radius: 2px;
  background: var(--sunk); vertical-align: middle; margin-right: 8px;
  overflow: hidden;
}
.databar i { display: block; height: 100%; background: var(--accent); }
.bar-label { font-variant-numeric: tabular-nums; }

.kw-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.url-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }

/* Position banding. Colour is a second cue; the number is always shown. */
.pos-top   { color: var(--live); font-weight: 600; }
.pos-page1 { color: var(--live); }
.pos-page2 { color: var(--written); }
.pos-deep  { color: var(--muted); }
.pos-none  { color: var(--faint); }

/* map: the SERP column */
.spoke .serp { font: 11px var(--mono); color: var(--faint); min-width: 74px; text-align: right; }
.spoke .ai { font: 600 10px var(--mono); min-width: 20px; text-align: center; }
@media (max-width: 860px) { .spoke .serp, .spoke .ai { display: none; } }

/* ----------------------------------------------------------------- audit -- */
/* The densest screen in the app: ~77 rows across four groups. Everything here
   exists to make that list scannable rather than merely present.

   Status is said once, in the group heading. Severity leads each row as a word
   AND a colour — never colour alone, which is the one accessibility rule this
   screen is most tempted to break. Scope is drawn as a bar so blast radius is
   comparable at a glance instead of being six greyscale digits. */

.group { margin-bottom: 26px; }
.group-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: 0 0 8px; font-size: 13px; font-weight: 600;
  padding-left: 3px; border-left: 3px solid var(--line-hi); padding-left: 10px;
}
.group-name { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; font-family: var(--mono); }
.group-n {
  font: 600 11px var(--mono); color: var(--muted); background: var(--sunk);
  padding: 1px 7px; border-radius: 9px;
}
.group-hint { font-weight: 400; font-size: 12px; color: var(--faint); flex: 1 1 240px; }

.g-waiting  .group-head { border-left-color: var(--written); }
.g-waiting  .group-name { color: var(--written); }
.g-new      .group-head { border-left-color: var(--queued); }
.g-new      .group-name { color: var(--queued); }
.g-pending  .group-head { border-left-color: var(--line-hi); }
.g-pending  .group-name { color: var(--muted); }
.g-resolved .group-head { border-left-color: var(--live); }
.g-resolved .group-name { color: var(--live); }

/* Severity as a word. Fixed width so the titles start on one vertical line and
   the eye can run straight down them. */
.sev-chip {
  flex: 0 0 auto; min-width: 66px; text-align: center;
  font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 6px; border-radius: 4px; white-space: nowrap;
}
/* The only solid fill among the chips, so the only one whose text contrast
   depends on the fill. White on the light-mode --blocked is 5.9:1; on the
   dark-mode --blocked, which is a much lighter red, the same white is 3.15:1
   and fails. Dark ink on that fill is 5.9:1, so the pairing flips with the
   theme rather than the fill being darkened for both. */
.chip-critical { color: #fff; background: var(--blocked); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip-critical { color: #0B1F1C; }
}
:root[data-theme="dark"] .chip-critical { color: #0B1F1C; }
.chip-high     { color: var(--blocked); background: color-mix(in srgb, var(--blocked) 16%, transparent); }
.chip-medium   { color: var(--written); background: color-mix(in srgb, var(--written) 16%, transparent); }
.chip-low      { color: var(--muted); background: var(--sunk); }
.chip-info     { color: var(--faint); background: transparent; border: 1px dashed var(--line-hi); }
.chip-todo     { color: var(--queued); background: color-mix(in srgb, var(--queued) 14%, transparent); }

.finding { border-top: 1px solid var(--line); }
.finding:first-child { border-top: 0; }
.finding-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 0; min-height: 44px;           /* 44px touch target */
  background: none; border: 0; color: inherit; font: inherit;
  text-align: left; cursor: pointer;
}
.finding-head:hover .ftitle { color: var(--accent); }
.ftitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finding.open .ftitle { white-space: normal; font-weight: 600; }

.fscope {
  flex: 0 0 auto; width: 92px; text-align: right;
  font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.databar.tiny { width: 46px; height: 5px; margin-right: 6px; }
.fage { flex: 0 0 auto; width: 42px; text-align: right; font-size: 11px; }
.tag.ghost-tag { background: transparent; border: 1px dashed var(--line-hi); color: var(--faint); }

.finding-body {
  padding: 2px 0 14px 76px; color: var(--muted); font-size: 13px; line-height: 1.65;
  max-width: 80ch;
}
.finding-body p { margin: 0 0 8px; }
.fmeta { display: flex; gap: 10px; }
.fkey {
  font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .05em;
  color: var(--faint); min-width: 74px; flex: 0 0 auto; padding-top: 3px;
}
.furls { margin: 6px 0 8px; padding-left: 18px; font: 12px var(--mono); }
.furls a { color: var(--accent); }

/* Toolbar: text, category, severity. Three axes because 77 rows is too many
   for one, and the count on the right is the feedback that a filter did
   something — without it an empty group reads as a bug. */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search {
  flex: 1 1 200px; min-width: 150px; min-height: 34px;
  padding: 6px 10px; border: 1px solid var(--line-hi); border-radius: var(--radius);
  background: var(--panel); color: var(--ink); font: 13px var(--sans);
}
.search::placeholder { color: var(--faint); }
.toolbar-count { font: 11px var(--mono); margin-left: auto; }

/* Four severity tiles beside the score meter. The shared .signals grid is
   auto-fit, which lands four tiles as 3 + 1; a 2x2 block squares them off
   against the meter panel instead. */
.signals.quad { grid-template-columns: 1fr 1fr; }

.signal.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.signal[data-audit-severity] { cursor: pointer; text-align: left; font: inherit; color: inherit; }

.up   { color: var(--live); }
.down { color: var(--blocked); }
.warn-text { color: var(--written); }

tfoot th, tfoot td {
  border-top: 1px solid var(--line-hi); padding-top: 8px; font-weight: 600;
}

@media (max-width: 820px) {
  .finding-head { flex-wrap: wrap; row-gap: 4px; }
  .ftitle { flex-basis: 100%; order: 3; white-space: normal; }
  .fscope { width: auto; text-align: left; }
  .fage { width: auto; }
  .finding-body { padding-left: 0; }
  .fmeta { flex-direction: column; gap: 0; }
  .fkey { min-width: 0; }
}


/* ----------------------------------------------------------- owner view -- */
/* product-spec.md M2. Larger type and one action per card: an owner reads this
   once a week, often on a phone between lessons. Status is drawn as
   answer-sheet bubbles (the prototype's motif); everything else reuses the
   tokens above, so dark mode and the shell come for free. */

.view-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 0 12px 10px;
  padding: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sunk); }
.view-switch button { font: 600 12px var(--sans); color: var(--muted); background: transparent; border: 0;
  border-radius: 5px; padding: 6px 0; cursor: pointer; min-height: 32px; }
.view-switch button.on { background: var(--panel); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.app.collapsed .view-switch { grid-template-columns: 1fr; margin-inline: 8px; }
.app.collapsed .view-switch button { font-size: 10px; }
.nav-count { margin-left: auto; font: 600 11px var(--mono); background: var(--accent); color: var(--on-accent);
  border-radius: 9px; padding: 1px 7px; }
.app.collapsed .nav-count { display: none; }

.lede { font-size: 16px; color: var(--muted); margin: 0 0 18px; max-width: 68ch; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bubbles { display: inline-flex; gap: 3px; vertical-align: middle; }
.bubbles i { width: 11px; height: 14px; border-radius: 50%; border: 1.5px solid var(--faint); display: block; }
.bubbles i.on { background: var(--ink); border-color: var(--ink); }
.status { display: inline-flex; gap: 7px; align-items: center; font-weight: 600; white-space: nowrap; }

.ostats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ostat { padding: 16px 18px; }
.ostat-n { font: 600 30px/1.1 var(--sans); font-variant-numeric: tabular-nums; }
.ostat-what { font-size: 15px; margin-top: 4px; }
.ostat-sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.ostat.lead { border-left: 3px solid var(--live); }
.ostat.lead.off { border-left-color: var(--warm); }
.ostat.lead.off .ostat-n { font-size: 22px; color: var(--warm); }

.olist { list-style: none; padding: 0; margin: 0 0 12px; }
.olist li { padding: 8px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.olist li:first-child { border-top: 0; }

.oitem { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 12px 0;
  border-top: 1px solid var(--line); align-items: start; }
.oitem:first-child { border-top: 0; }
.oitem-title { font-size: 15px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.oitem-place { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 6px; }
.oitem-side { text-align: right; font-size: 12px; max-width: 32ch; }
.ofilters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.ofilters .btn { min-height: 36px; }
.ofilters .btn.on { border-color: var(--ink); color: var(--ink); }

.lk-form { display: flex; gap: 8px; }
.lk-form input { flex: 1; min-width: 0; font: 15px var(--sans); padding: 10px 12px; min-height: 44px;
  border: 1px solid var(--line-hi); border-radius: var(--radius); background: var(--panel); color: var(--ink); }
.lk-form input:focus-visible, .btn:focus-visible, .view-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lk-form .btn { min-height: 44px; padding-inline: 18px; }
.lookup-card { margin-top: 12px; border-left: 3px solid var(--accent); }
.lk-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 16px; margin-bottom: 8px; }
dl.lk { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
dl.lk dt { color: var(--muted); }
dl.lk dd { margin: 0; }

.oweek { margin-bottom: 10px; }
.oweek h3 { font-size: 14px; margin: 0 0 6px; color: var(--muted); font-weight: 600; }
.oplan { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.oweek h3 + .oplan { border-top: 0; }
.oplan.done .grow a { color: var(--ink); }
.oseason { display: block; font-size: 12px; margin-top: 2px; }

.tablewrap { overflow-x: auto; }
table.otable { width: 100%; border-collapse: collapse; font-size: 13px; }
table.otable th, table.otable td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.otable th { color: var(--muted); font-weight: 600; white-space: nowrap; }
table.otable td.c { text-align: center; white-space: nowrap; }
.yes { color: var(--live); font-weight: 600; }
.no { color: var(--faint); }

.oappr { margin-bottom: 12px; }
.oappr .note-input { width: 100%; min-height: 64px; }
.oappr-act { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.oappr-act .btn { min-height: 44px; padding-inline: 16px; }
.cmdblock { font: 12px/1.5 var(--mono); background: var(--sunk); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 12px; overflow-x: auto; white-space: pre; }

@media (max-width: 720px) {
  .oitem { grid-template-columns: 1fr; }
  .oitem-side { text-align: left; max-width: none; }
  .grid.two.ohome { grid-template-columns: 1fr; }
  .lk-form { flex-direction: column; }
  dl.lk { grid-template-columns: 1fr; }
  dl.lk dt { margin-top: 6px; }
}

/* conversations (owner view): one card per Reddit/Quora thread */
.oconv { display: grid; gap: 6px; margin-bottom: 12px; }
.oconv p { margin: 0; }
.oconv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.oconv-title { color: var(--ink); text-decoration: none; font-size: 1.05rem; line-height: 1.35; }
.oconv-title:hover, .oconv-title:focus-visible { text-decoration: underline; }
.oconv .oappr-act a.btn { text-decoration: none; }

.oteam summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 8px; }
.oteam-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 6px 0; }
.oteam-form, .oreply { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 10px; }
.oteam-form label, .oreply label { display: grid; gap: 4px; font-size: .9rem; color: var(--muted); }
.oteam-form input, .oreply input, .oreply select { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line, #ccc);
  border-radius: 6px; background: var(--bg, transparent); color: var(--ink); min-width: 220px; }
.oreply input { min-width: min(420px, 100%); }
.oalert { border-left: 3px solid var(--blocked); }
.btn.small { min-height: 32px; padding: 2px 10px; }


/* ---------------------------------------------------------------- sign-in -- */
[hidden] { display: none !important; }
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.signin-card { width: min(400px, 100%); padding: 28px 26px; }
.signin-brand { font-weight: 700; letter-spacing: .02em; color: var(--accent); margin: 0 0 18px; }
.signin h1 { font-size: 24px; margin: 0 0 6px; }
.signin-form { display: grid; gap: 8px; margin-top: 18px; }
.signin-form label { font-size: 13px; color: var(--muted); }
.signin-form input { font: 16px var(--sans); padding: 11px 12px; min-height: 46px; border: 1px solid var(--line-hi);
  border-radius: var(--radius); background: var(--panel); color: var(--ink); }
.signin-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.signin-form .btn { min-height: 46px; margin-top: 6px; font-size: 15px; }
.signin-code { letter-spacing: .5em; font-variant-numeric: tabular-nums; font-size: 22px !important; text-align: center; }
.signin-error { color: var(--blocked); min-height: 1.4em; margin: 12px 0 0; font-size: 14px; }
.signin-alt { font-size: 13px; margin-top: 14px; color: var(--faint); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.linkish:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- refresh -- */
.rhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rhead .btn { min-height: 44px; padding-inline: 18px; }
.rjob { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.rjob:first-child { border-top: 0; }
.rjob-act { align-self: center; }
.rjob code, .lede code { font: 12px var(--mono); background: var(--sunk); padding: 1px 5px; border-radius: 4px; word-break: break-word; }
.rbadge { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px;
  border: 1px solid currentColor; color: var(--planned); }
.r-ok { color: var(--live); } .r-failed { color: var(--blocked); } .r-needs_approval { color: var(--warm); }
.r-running, .r-requested { color: var(--queued); } .r-due { color: var(--warm); }
.rrun { border-top: 1px solid var(--line); padding: 10px 0; }
.rrun:first-child { border-top: 0; }
.rrun summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.rlog { font: 12px/1.45 var(--mono); background: var(--sunk); padding: 10px 12px; border-radius: var(--radius);
  max-height: 280px; overflow: auto; white-space: pre-wrap; word-break: break-word; }

/* ---------------------------------------------------------------- team ----- */
.aform { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; }
.aform label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.aform input, .aform select, .auser-act select { font: 14px var(--sans); padding: 8px 10px; min-height: 40px;
  border: 1px solid var(--line-hi); border-radius: var(--radius); background: var(--panel); color: var(--ink); }
.aform .btn { min-height: 40px; }
.arole-help { margin: 12px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.auser { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.auser:first-child { border-top: 0; }
.auser.off { opacity: .6; }
.auser-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.aroles { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; font-size: 13px; }
.arole { background: var(--sunk); padding: 2px 8px; border-radius: 999px; }
@media (max-width: 640px) {
  .rjob, .auser { grid-template-columns: 1fr; }
  .auser-act { justify-content: flex-start; }
}

/* ------------------------------------------------------ plan & billing ----- */
/* The owner reads this top to bottom: what am I on, am I running out, what
   would more cost, what have I paid. The free plan's countdown reuses the
   answer-sheet bubbles from the owner view: that is the one bold mark here,
   everything else stays in the dashboard's quiet tokens. */
.bmsg { padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--panel);
  border-radius: var(--radius); margin: 0 0 14px; }
.bplan { padding: 22px 24px; margin-bottom: 18px; border-left: 3px solid var(--accent); }
.bplan-name { font-size: 24px; line-height: 1.2; margin: 0 0 10px; }
.bplan-line { font-size: 16px; margin: 0; max-width: 68ch; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.bplan-left { flex: 1 1 32ch; }
.bplan-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.bplan-act .btn, .bt-act .btn, .badd .btn, .sauto .btn { min-height: 44px; padding-inline: 16px; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.bubbles.big { gap: 4px; }
.bubbles.big i { width: 14px; height: 18px; }
.warnt { color: var(--blocked); }

.bmeters { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.bmeter { padding: 14px 16px; }
.bmeter-n { font: 600 26px/1.1 var(--sans); font-variant-numeric: tabular-nums; }
.bmeter-of { font-size: 15px; font-weight: 400; color: var(--muted); }
.bmeter-l { color: var(--muted); margin: 4px 0 10px; }
.bbar { height: 8px; border-radius: 4px; background: var(--sunk); overflow: hidden; }
.bbar i { display: block; height: 100%; background: var(--live); border-radius: 4px; }
.bmeter.warn .bbar i { background: var(--warm); }
.bmeter.full .bbar i { background: var(--blocked); }
.bmeter-more { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--accent); }

.bplans-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.bplans-head h2.screen { margin-bottom: 0; }
.seg { display: inline-grid; grid-auto-flow: column; gap: 2px; padding: 2px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--sunk); }
.seg button { font: 600 13px var(--sans); color: var(--muted); background: transparent; border: 0; border-radius: 5px;
  padding: 0 14px; min-height: 40px; cursor: pointer; }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.seg button:focus-visible, .switch:focus-visible, .onb-opt input:focus-visible + span, .month:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }

table.btable { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 720px; margin: 12px 0 6px; }
.btable th, .btable td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.btable thead td { border-bottom: 0; }
.btable th { text-transform: none; letter-spacing: normal; font-size: 14px; }
.btable thead th { vertical-align: top; font-weight: 400; color: var(--ink); }
.bt-rec-slot { display: block; min-height: 24px; }
.btable tbody th { font-weight: 400; color: var(--muted); width: 22%; }
.btable td { font-weight: 600; }
/* the current plan's column, outlined end to end like a marked answer */
.btable .on { background: var(--panel); border-left: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.btable thead th.on { border-top: 2px solid var(--accent); border-radius: var(--radius) var(--radius) 0 0; }
.btable .bt-act td.on { border-bottom: 2px solid var(--accent); border-radius: 0 0 var(--radius) var(--radius); }
.bt-name { display: block; font-size: 17px; font-weight: 700; }
.bt-rec { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--live);
  border: 1px solid currentColor; border-radius: 999px; padding: 0 8px; }
.bt-price { display: block; font: 600 28px/1.1 var(--sans); font-variant-numeric: tabular-nums; margin-top: 8px; }
.bt-per { display: block; font-size: 13px; color: var(--muted); }
.bt-blurb { display: block; font-size: 13px; color: var(--muted); margin-top: 8px; max-width: 26ch; line-height: 1.4; }
.bt-act td { border-bottom: 0; padding-top: 14px; padding-bottom: 14px; }
.bcur { font-weight: 600; color: var(--accent); }
.bnote { margin: 8px 0 24px; }

.badd { padding: 18px 20px; margin: 18px 0; }
.bsub { font-size: 17px; margin: 0 0 6px; }
.stepper { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.stepper > .btn:not(.yes) { min-width: 44px; font-size: 18px; padding: 0; }
.stepper output { min-width: 18ch; text-align: center; }
.badd-cost { color: var(--muted); margin-right: auto; font-variant-numeric: tabular-nums; }
table.binv td.links a { margin-right: 12px; }
table.binv .num { text-align: right; }

/* the plan banner, above every screen */
.pbanner { padding: 10px 14px; margin: 0 0 14px; border-radius: var(--radius); background: var(--panel);
  border: 1px solid var(--line); border-left: 3px solid var(--accent); }
.pbanner.soon { border-left-color: var(--warm); }
.pbanner.stop { border-left-color: var(--blocked); }
.pbanner a { color: var(--accent); font-weight: 600; margin-left: 4px; }

/* ------------------------------------------------------------ settings ----- */
.sauto { padding: 20px 22px; margin-bottom: 14px; }
.sblock { margin-bottom: 14px; }
.sauto-row { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; }
.sauto-what { margin: 0; font-size: 15px; }
.sauto-list { margin: 14px 0 0; padding-left: 18px; color: var(--muted); max-width: 72ch; }
.sauto-list li { margin: 4px 0; }
.sauto-list strong { color: var(--ink); }
.switch { flex: none; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px 0 4px;
  border: 1px solid var(--line-hi); border-radius: 999px; background: var(--sunk); color: var(--ink);
  font: 600 14px var(--sans); cursor: pointer; }
.switch-knob { width: 44px; height: 26px; border-radius: 13px; background: var(--line-hi); position: relative;
  transition: background .15s; }
.switch-knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--panel); transition: transform .15s; box-shadow: 0 0 0 1px var(--line-hi); }
.switch[aria-checked="true"] .switch-knob { background: var(--live); }
.switch[aria-checked="true"] .switch-knob::after { transform: translateX(18px); }
.switch[disabled] { opacity: .55; cursor: not-allowed; }
.months { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.btn.month { min-height: 40px; min-width: 52px; font-weight: 500; }
.btn.month.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.oauto { padding: 14px 16px; margin-bottom: 14px; border-left: 3px solid var(--live); max-width: 80ch; }
.oauto a { color: var(--accent); }

/* ----------------------------------------------------------- onboarding ---- */
.onb-card { width: min(560px, 100%); }
.onb-card h1 { font-size: 22px; margin: 8px 0 4px; }
.onb-steps { list-style: none; padding: 0; margin: 0 0 6px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.onb-steps li { display: grid; gap: 6px; font-size: 12px; color: var(--faint); }
.onb-steps i { display: block; height: 4px; border-radius: 2px; background: var(--line); }
.onb-steps li.done i { background: var(--live); }
.onb-steps li.now { color: var(--ink); font-weight: 600; }
.onb-steps li.now i { background: var(--accent); }
.onb-choice, .onb-months { border: 0; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.onb-choice legend, .onb-months legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; padding: 0; }
.onb-choice.exams { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.onb-opt { display: block; cursor: pointer; }
.onb-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.onb-opt > span { display: grid; gap: 2px; padding: 12px 14px; min-height: 56px; border: 1px solid var(--line-hi);
  border-radius: var(--radius); background: var(--panel); }
.onb-opt > span .muted { font-size: 13px; }
.signin-form .onb-opt, .onb-card .onb-opt { color: var(--ink); font-size: 15px; font-weight: 400; }
.onb-opt input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.onb-place { display: grid; grid-template-columns: 1fr 160px auto; gap: 8px; align-items: end; }
.onb-place > div { display: grid; gap: 6px; }
.onb-place select { font: 16px var(--sans); padding: 10px; min-height: 46px; border: 1px solid var(--line-hi);
  border-radius: var(--radius); background: var(--panel); color: var(--ink); }
.onb-place .linkish { padding-bottom: 12px; }
.onb-free { border-left: 3px solid var(--live); padding: 2px 0 2px 14px; margin: 10px 0; }
.onb-free p { margin: 6px 0; }
.onb-free ul { margin: 6px 0; padding-left: 18px; }
.onb-paid { font-size: 13px; color: var(--muted); }
.onb-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }
.onb-nav .btn { min-width: 120px; }
@media (max-width: 640px) {
  .onb-place { grid-template-columns: 1fr; }
  .sauto-row { flex-direction: column; }
  .bplan { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .switch-knob, .switch-knob::after { transition: none; }
}
/* on a phone the plan table scrolls sideways; the row labels stay put */
@media (max-width: 640px) {
  .btable tbody th, .btable thead td:first-child { position: sticky; left: 0; z-index: 1;
    background: var(--bg); width: 110px; min-width: 110px; font-size: 13px; box-shadow: 1px 0 0 var(--line); }
  table.btable { min-width: 640px; }
}


/* ------------------------------------------------- design system, applied -- */
/* Type: Manrope 800 for page titles, 700 for section and card titles, 500 for
   body; JetBrains Mono for numbers (the design system's "data" style). Cards
   take radius-lg and shadow-sm; controls take radius-md. */
.topbar-title h1 { font-weight: 800; font-size: 20px; letter-spacing: -0.015em; }
h2.screen { font: 700 12px/16px var(--sans); letter-spacing: .08em; color: var(--muted); }
.panel, .draft-card, .bmsg, .pbanner { border-radius: var(--radius-lg); }
.panel { box-shadow: var(--shadow-sm); }
.signin h1, .onb-card h1, .bplan-name, .detail-title { font-weight: 800; letter-spacing: -0.02em; }
.pick-topic, .exam-name, .bt-name, .bsub, .oitem-title { font-weight: 700; }
.ostat-n, .bmeter-n, .bt-price { font-family: var(--mono); font-weight: 600; letter-spacing: -0.02em; }
.btn { font-weight: 700; min-height: 36px; }
.btn.ghost, .btn.small { min-height: 30px; }

/* Left nav on surface; the current screen gets primary-soft plus the rail. */
.side-nav button.on, .side-exams button.on { background: var(--accent-soft); color: var(--ink); }
.side-nav button:hover:not(.on), .side-exams button:hover:not(.on) { background: var(--bg); }
.nav-count { color: var(--on-accent); }

/* Answer-sheet bubbles fill with the signal teal: the brand mark inside the app. */
.bubbles i.on { background: var(--brand-signal); border-color: var(--brand-signal); }
.bbar i, .onb-steps li.done i, .switch[aria-checked="true"] .switch-knob { background: var(--accent); }
.bt-rec { color: var(--accent); }

/* Made by EnrollGoal: the product logo in the sidebar foot. The top of the
   sidebar belongs to the client's own logo. */
.side-made { display: flex; align-items: center; padding: 6px 10px 2px; }
.side-made img { display: block; height: 22px; width: auto; }
.side-made .made-mark { display: none; height: 26px; }
.app.collapsed .side-made { justify-content: center; padding-inline: 0; }
.app.collapsed .side-made .made-logo { display: none !important; }
.app.collapsed .side-made .made-mark { display: block; }
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-dark { display: block !important; }
}
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
.signin-logo { display: block; height: 32px; width: auto; margin: 0 0 20px; }

/* ------------------------------------------------- signed-out sign-in page -- */
/* /login: what sits behind the email-code dialog (app.js showLanding). The
   public site itself is web/site/. */
#landing { min-height: 100dvh; display: grid; place-items: center; background: var(--sunk); padding: 24px 16px; }
.gate { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 32px 28px; text-align: center; }
.gate h1 { margin: 20px 0 8px; font-size: 24px; letter-spacing: -.02em; }
.gate p { margin: 0; color: var(--muted); }
.gate-act { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }
.gate-act .btn { min-height: 44px; padding: 0 20px; font-weight: 700; }
.gate-back { display: inline-block; margin-top: 18px; color: var(--muted); font-size: 14px; }
.gate .logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gate .logo-light { display: none; } :root:not([data-theme="light"]) .gate .logo-dark { display: inline; } }
:root[data-theme="dark"] .gate .logo-light { display: none; }
:root[data-theme="dark"] .gate .logo-dark { display: inline; }

/* ----------------------------------------------------------- auth dialog -- */
/* Log in and Register open this over the landing page. Inside is the same
   two-step email-code flow as before (screens/signin.js). */
.auth-dialog { border: 0; padding: 0; background: transparent; color: var(--ink);
  width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
.auth-dialog::backdrop { background: rgba(11,31,28,.6); backdrop-filter: blur(3px); }
.auth-card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 28px 28px 22px; }
.auth-card .signin-card { width: auto; padding: 0; border: 0; box-shadow: none; background: transparent; }
.auth-card .signin-brand { display: none; }
.auth-card .signin-mark { width: 40px; height: 40px; display: block; margin-bottom: 14px; }
.auth-x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.auth-x:hover { background: var(--sunk); color: var(--ink); }
.auth-x svg { width: 18px; height: 18px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin: 0 0 18px; border-radius: 999px;
  background: var(--sunk); border: 1px solid var(--line); }
.auth-tabs button { min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font: 700 14px var(--sans); cursor: pointer; }
.auth-tabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-sm); }
@media (prefers-reduced-motion: no-preference) {
  .auth-dialog[open] .auth-card { animation: auth-in .25s ease-out; }
  @keyframes auth-in { from { opacity: 0; transform: translateY(8px); } }
}

/* The sign-in card inside the Log in / Register dialog: no full-screen centring. */
.auth-card.signin { min-height: 0; display: block; padding: 28px 28px 22px; }
.auth-card.signin .signin-card { margin: 0; box-shadow: none; border: 0; }

/* Owner input on a page due in the next 7 days (Plan screen). */
.onote-intro { margin: -4px 0 14px; }
.onote { margin: 0 0 10px 52px; }
.onote summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; min-height: 32px; display: flex; align-items: center; }
.onote summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.onote form { display: grid; gap: 6px; padding: 10px 0 4px; }
.onote label { font-weight: 600; font-size: 13px; }
.onote textarea { width: 100%; min-height: 76px; resize: vertical; font: inherit; padding: 10px 12px; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line-hi); border-radius: var(--radius); }
.onote textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.onote-help { margin: 0; font-size: 12px; }
.onote-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.onote-mic { display: inline-flex; gap: 6px; align-items: center; min-height: 40px; }
.onote-mic[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .onote-mic[aria-pressed="true"] svg { animation: onote-pulse 1.2s ease-in-out infinite; }
  @keyframes onote-pulse { 50% { opacity: .35; } }
}
@media (max-width: 640px) { .onote { margin-left: 0; } }

/* ------------------------------------------- topbar: user menu and bell -- */
/* Top right: the alerts bell, then who is signed in (name, role) with My
   profile and Log out. Both are buttons that open a panel under them; Escape
   or a click outside closes it and focus goes back to the button. */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pop { position: relative; }
.tb-btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; min-width: 44px; padding: 4px 8px;
  background: transparent; color: var(--ink);
  border: 1px solid transparent; border-radius: var(--radius); cursor: pointer;
  font: inherit;
}
.tb-btn:hover { background: var(--sunk); }
.tb-btn[aria-expanded="true"] { background: var(--sunk); border-color: var(--line); }
.tb-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bell { justify-content: center; position: relative; }
.bell .ico { width: 22px; height: 22px; }
.bell-count {
  position: absolute; top: 4px; right: 3px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--blocked); color: #fff; border: 2px solid var(--bg);
  font: 700 10px/14px var(--sans); text-align: center;
}
:root[data-theme="dark"] .bell-count { color: #0B1F1C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bell-count { color: #0B1F1C; } }

.avatar {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  font: 700 13px var(--sans); letter-spacing: .02em;
}
.user-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; text-align: left; }
.user-name { font: 600 14px/1.2 var(--sans); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: 12px; line-height: 1.3; color: var(--faint); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { width: 8px; height: 8px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
         transform: translateY(-2px) rotate(45deg); margin: 0 2px 0 2px; }

.pop-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
@media (prefers-reduced-motion: no-preference) {
  .pop-panel:not([hidden]) { animation: pop-in .16s ease-out; }
  @keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}

.user-menu { width: 260px; padding: 6px; }
.um-head { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.um-head strong { font-size: 14px; overflow-wrap: anywhere; }
.um-head span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.um-head .um-role { color: var(--faint); }
.um-item {
  display: block; width: 100%; text-align: left; min-height: 44px; padding: 10px 12px;
  background: none; border: 0; border-radius: var(--radius); color: var(--ink);
  font: 500 14px var(--sans); cursor: pointer;
}
.um-item:hover { background: var(--sunk); }
.um-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.notes { width: 360px; max-height: min(70vh, 520px); overflow: auto; }
.notes-head {
  position: sticky; top: 0; background: var(--panel);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--line);
}
.notes-head h2 { font: 700 14px var(--sans); margin: 0; }
.notes-head .linkish { font-size: 13px; min-height: 32px; }
.notes-list { list-style: none; margin: 0; padding: 4px; }
.note-item {
  display: flex; gap: 10px; width: 100%; text-align: left; padding: 10px 12px;
  background: none; border: 0; border-radius: var(--radius); color: var(--ink);
  font: inherit; cursor: pointer;
}
.note-item:hover { background: var(--sunk); }
.note-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.note-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: transparent; }
.note-item.unread .note-dot { background: var(--accent); }
.note-item.unread.lvl-warning .note-dot { background: var(--written); }
.note-item.unread.lvl-danger .note-dot { background: var(--blocked); }
.note-item.unread.lvl-success .note-dot { background: var(--live); }
.note-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.note-body strong { font-size: 13.5px; font-weight: 600; }
.note-item:not(.unread) .note-body strong { font-weight: 500; color: var(--muted); }
.note-text { font-size: 13px; color: var(--muted); line-height: 1.45; }
.note-at { font-size: 12px; color: var(--faint); }
.notes-empty { margin: 0; padding: 20px 16px 22px; color: var(--muted); font-size: 13px; }

/* ----------------------------------------------------------------- footer -- */
/* When the data was read, who makes this, and how to reach us. */
.app-foot {
  margin-top: auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
  padding: 14px 24px 18px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--faint);
}
.app-foot .stamp { font-size: 11px; }
.foot-right { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.app-foot a { color: var(--accent); text-underline-offset: 2px; }
.app-foot a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.main main { padding-bottom: 32px; }

/* ---------------------------------------------------------------- profile -- */
.profile { max-width: 640px; }
.profile-form label { display: block; font: 600 13px var(--sans); margin: 4px 0 6px; }
.pf-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pf-row input {
  flex: 1 1 240px; min-height: 44px; padding: 8px 12px;
  font: 15px var(--sans); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-hi); border-radius: var(--radius);
}
.pf-row input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pf-row .btn { min-height: 44px; }
.pf-msg { min-height: 1.2em; margin: 6px 0 4px; font-size: 13px; }
.pf-msg.ok { color: var(--live); }
.pf-msg.bad { color: var(--blocked); }
.pf-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 10px 0 8px; font-size: 14px; }
.pf-facts dt { color: var(--faint); }
.pf-facts dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .app-foot { padding: 12px 16px 16px; }
}
@media (max-width: 640px) {
  .user-text, .caret { display: none; }
  .topbar-title h1 { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tb-btn.user-btn { padding: 4px; }
  .topbar-right { gap: 4px; }
  .notes { position: fixed; left: 8px; right: 8px; top: calc(var(--top-h) + 8px); width: auto; }
  .user-menu { position: fixed; left: auto; right: 8px; top: calc(var(--top-h) + 8px); width: min(260px, calc(100vw - 16px)); }
}

/* Profile photo: initials until one is uploaded. */
#user-avatar { display: inline-flex; }
img.avatar { object-fit: cover; display: block; padding: 0; background: var(--sunk); }
.avatar.lg { width: 88px; height: 88px; font-size: 28px; }
.pf-photo { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 6px 0 18px; }
.pf-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; flex: 1 1 220px; }
.pf-photo-actions .btn { min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; }
.pf-photo-actions .note, .pf-photo-actions .pf-msg { flex-basis: 100%; margin: 0; }
.pf-photo-actions input:focus-visible + .btn, .pf-photo-actions label.btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Settings: prove you own your website */
.dom-verify { border-left: 3px solid var(--written); }
.dom-steps { margin: 10px 0 12px; padding-left: 20px; line-height: 1.7; }
.dom-steps li + li { margin-top: 6px; }
.dom-code { display: inline-block; max-width: 100%; overflow-wrap: anywhere; padding: 2px 6px; border-radius: 6px;
            background: var(--sunk); border: 1px solid var(--line); font: 12.5px var(--mono); user-select: all; }

.signin-legal { margin: 2px 0 0; font-size: 12.5px; color: var(--faint); line-height: 1.5; }
.signin-legal a { color: var(--accent); }

/* ----------------------------------------------------------- prospects ---- */
/* One card per business; the card shows only the next thing to do. */
.r-q { color: var(--queued); } .r-w { color: var(--warm); } .r-x { color: var(--parked); }
.pform .pnote { grid-column: span 2; }
.pfilter { margin: 18px 0 12px; display: flex; flex-wrap: wrap; }
.plist { display: grid; gap: 12px; }
.prow { padding: 16px 18px; }
.prow-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.prow-name { font-size: 17px; margin: 0 0 2px; }
.prow .rbadge { font-size: 12px; padding: 2px 9px; white-space: nowrap; }
.pact { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.pact .btn, .prow > .btn { min-height: 44px; padding-inline: 16px; }
.prow > .btn { margin-top: 10px; }
.pdetails { margin-top: 10px; }
.pdetails summary { cursor: pointer; color: var(--accent); font-weight: 600; min-height: 32px; }
.pdetails ul { margin: 4px 0 8px; padding-left: 18px; }
.pmail { display: grid; gap: 10px; margin-top: 8px; max-width: 70ch; }
.pmail label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.pmail input, .pmail textarea { font: 15px/1.5 var(--sans); padding: 10px 12px; border: 1px solid var(--line-hi);
  border-radius: var(--radius); background: var(--panel); color: var(--ink); }
.pmail .btn { justify-self: start; min-height: 44px; }
.psent { margin: 10px 0 0; }
@media (max-width: 640px) { .pform .pnote { grid-column: auto; } .prow-head { flex-direction: column; } }
