/* Shared design system for every user-facing page (design direction, 5 Oct:
   "a calm, teal-inked record on pond-mist paper, where yellow marks only what
   is verified or new"). Tokens first; components use only tokens.

   Depth comes from white surfaces on the pond canvas plus hairlines; the only
   shadow is for floating UI. One teal-tinted ink at three opacities for the
   text tiers. Action teal is for actions only; strike yellow marks verified
   figures and "New today" only; beak yellow is the logo only. */

:root {
  --pond: #eef2f1;
  --surface: #ffffff;
  --surface-2: #f5f7f6;
  --ink: #14262b;
  --ink-2: rgb(20 38 43 / .62);
  --ink-3: rgb(20 38 43 / .42);
  --hairline: rgb(20 38 43 / .10);
  --hairline-row: rgb(20 38 43 / .08);
  --action: #1f4e5f;
  --action-ink: #ffffff;
  --action-soft: #e3ecee;
  --strike: #f5d77a;
  --strike-ink: #14262b;
  --beak: #e2a33b;
  --stage-applied: #6b7a80;
  --stage-interview: #2f6b5e;
  --stage-offer: #8a6a14;
  --stage-closed: #9a4a3a;
  --warn: var(--stage-closed);
  --warn-soft: #f6e9e5;
  --ok: var(--stage-interview);
  --shadow-float: 0 8px 24px rgba(20, 38, 43, .14);

  /* older names, kept so every component follows the new palette */
  --bg: var(--pond);
  --line: var(--hairline);
  --accent: var(--action);
  --accent-ink: var(--action-ink);
  --accent-soft: var(--action-soft);
  --figure: var(--strike);
  --figure-ink: var(--strike-ink);

  --radius: 10px;             /* content blocks */
  --radius-sm: 6px;           /* insets and inputs */
  --radius-pill: 24px;        /* buttons */
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem;
  --text-small: 12px; --text-meta: 13px; --text-body: 15px; --text-row: 16px;
  --text-role: 22px; --text-head: 28px; --text-number: 40px;
  --font: "Hanken Grotesk", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Newsreader", Georgia, serif;
  --measure: 680px;
}

/* dark: pond becomes a deep teal-black, surfaces one step lighter, the ink
   near-white at the same three opacities; yellow stays */
@media (prefers-color-scheme: dark) {
  :root {
    --pond: #0e1a1d;
    --surface: #16252a;
    --surface-2: #1c2e33;
    --ink: #e8f0ef;
    --ink-2: rgb(232 240 239 / .62);
    --ink-3: rgb(232 240 239 / .42);
    --hairline: rgb(232 240 239 / .10);
    --hairline-row: rgb(232 240 239 / .08);
    --action: #7fb3c2;
    --action-ink: #0e1a1d;
    --action-soft: #1f3a42;
    --warn: #e09a88;
    --warn-soft: #3a211b;
    --ok: #86c4b4;
    --stage-applied: #93a3a9;
    --stage-interview: #6fb3a2;
    --stage-offer: #d2b25a;
    --stage-closed: #d98a76;
    --shadow-float: 0 8px 24px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: var(--text-body)/1.55 var(--font); -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: var(--action); text-decoration-thickness: 1px; text-underline-offset: 2px; transition: color 150ms ease; }

/* --- layout ---------------------------------------------------------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1080px; margin: 0 auto; padding: var(--space-4) var(--space-5);
}
.wordmark { font-weight: 600; font-size: var(--text-row); letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.wordmark span { color: var(--accent); }
.topbar .step { color: var(--ink-2); font-size: var(--text-meta); margin-left: var(--space-3); }
main { max-width: var(--measure); margin: 0 auto; padding: var(--space-5) var(--space-5) var(--space-7); }
main.wide { max-width: 1080px; }

h1 {
  font-family: var(--font-serif); font-weight: 500; font-size: clamp(26px, 4vw, 30px);
  line-height: 1.2; letter-spacing: -.005em; margin: var(--space-5) 0 var(--space-3);
}
h2 { font-size: var(--text-row); font-weight: 600; margin: 0 0 var(--space-2); }
h3 { font-weight: 600; }
.serif { font-family: var(--font-serif); font-weight: 500; }
.lead { font-size: var(--text-row); color: var(--ink-2); margin: 0 0 var(--space-5); }
.muted { color: var(--ink-2); font-size: var(--text-meta); }
.number { font-size: var(--text-number); font-weight: 600; line-height: 1; }

/* --- components -------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--space-5); margin: 0 0 var(--space-4);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  border: 1px solid transparent; border-radius: var(--radius-pill); padding: .65rem 1.25rem;
  font: 600 var(--text-body)/1 var(--font); cursor: pointer; text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}
.btn-primary { background: var(--action); color: var(--action-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--action) 88%, var(--ink)); }
.btn-primary[disabled] { opacity: .5; cursor: default; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--hairline); }
.btn-secondary:hover { border-color: var(--ink-3); }
.btn-ghost { background: none; color: var(--ink-2); padding-left: .4rem; padding-right: .4rem; }
.btn-ghost:hover { color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-5); }
.actions .spacer { flex: 1; }

.steps { list-style: none; padding: 0; margin: 0 0 var(--space-5); display: grid; gap: var(--space-3); }
.steps li { display: flex; gap: var(--space-3); align-items: baseline; }
.steps .n {
  flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 650; font-size: .85rem;
}

.notice {
  display: flex; gap: var(--space-3); border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4);
  background: var(--warn-soft); color: var(--warn); font-size: .95rem;
}
.notice strong { color: inherit; }
.notice.soft { background: var(--accent-soft); color: var(--ink-2); margin: var(--space-2) 0 var(--space-3); }

.progress { margin: var(--space-2) 0 var(--space-5); }
.progress .bar { height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress .fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width 150ms ease; }
.progress .label { display: flex; justify-content: space-between; color: var(--ink-2); font-size: var(--text-meta); margin-top: var(--space-2); }

.dropzone {
  display: grid; place-items: center; text-align: center; gap: var(--space-2);
  border: 1px dashed var(--ink-3); border-radius: var(--radius); padding: var(--space-7) var(--space-5);
  background: var(--surface); cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { display: none; }
.dropzone .big { font-weight: 600; font-size: 1.05rem; }
.dropzone .file { color: var(--accent); font-weight: 600; }

label.field { display: block; font-weight: 600; margin: var(--space-4) 0 var(--space-2); }
textarea, input[type=text], input[type=email], input[type=url] {
  width: 100%; font: var(--text-body)/1.5 var(--font); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75rem .9rem;
}
textarea { min-height: 7rem; resize: vertical; }
textarea:focus, input[type=text]:focus, input[type=email]:focus, input[type=url]:focus { outline: 2px solid var(--action); outline-offset: 1px; border-color: transparent; }

.question { font-family: var(--font-serif); font-weight: 500; font-size: 26px; line-height: 1.25; margin: 0 0 var(--space-3); }
.quote {
  border-left: 2px solid var(--hairline); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-3) var(--space-4); margin: var(--space-3) 0; color: var(--ink);
}
.hint { color: var(--ink-2); font-size: var(--text-meta); margin-top: var(--space-2); }

.checklist { list-style: none; padding: 0; margin: var(--space-3) 0 0; display: grid; gap: var(--space-2); }
.checklist label {
  display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer;
}
.checklist input { margin-top: .3rem; accent-color: var(--accent); width: 1.05rem; height: 1.05rem; flex: none; }
.checklist label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

mark.fig { background: var(--strike); color: var(--strike-ink); border-radius: 3px; padding: 0 .15em; }
.badge {
  display: inline-block; font-size: var(--text-small); font-weight: 600; border-radius: var(--radius-pill); padding: .1rem .55rem;
  background: var(--surface-2); color: var(--ink-2);
}
.badge.ok { background: var(--accent-soft); color: var(--accent); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

.role { padding: var(--space-4) 0; border-top: 1px solid var(--line); }
.role:first-of-type { border-top: 0; padding-top: 0; }
.role .where { color: var(--ink-3); font-size: .9rem; }
.role ul { margin: var(--space-2) 0 0; padding-left: 1.1rem; }
.role li { margin: .3rem 0; }
.stats { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-3) 0 var(--space-5); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); min-width: 9rem; }
.stat b { display: block; font-size: var(--text-head); font-weight: 600; line-height: 1.1; }
.stat span { color: var(--ink-3); font-size: .88rem; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.compare figure { margin: 0; }
.compare figcaption { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-2); font-weight: 600; }
.pdf { width: 100%; aspect-ratio: 8.5 / 11; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.choice { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.loading { display: none; align-items: center; gap: var(--space-3); color: var(--ink-2); margin-top: var(--space-4); }
.htmx-request .loading, .htmx-request.loading, .loading.show { display: flex; }
.htmx-request .hide-while-loading { display: none; }
.spinner {
  display: inline-block; flex-shrink: 0; vertical-align: -0.25em; width: 1.2rem; height: 1.2rem; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- onboarding: documents, form, interview ---------------------------------------- */
.sources { list-style: none; padding: 0; margin: var(--space-3) 0 0; display: grid; gap: var(--space-2); }
.sources li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); }
.sources .file { color: var(--accent); font-weight: 600; overflow-wrap: anywhere; }
select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .45rem .6rem; }
.grid-2, .grid-3 { display: grid; gap: var(--space-3); }
.grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.job-row { margin-bottom: var(--space-3); }
.role-options { display: grid; gap: var(--space-2); margin-top: var(--space-3); font-size: .92rem; }
.check { display: flex; gap: var(--space-2); align-items: flex-start; cursor: pointer; }
.check input { margin-top: .3rem; accent-color: var(--accent); }
.unit-tag { color: var(--ink-2); font-size: var(--text-meta); font-weight: 600; margin-bottom: var(--space-2); }
.answer-box { position: relative; }
.answer-box textarea, .answer-box input[type=text] { padding-right: 2.6rem; }
.mic {
  position: absolute; right: .45rem; bottom: .5rem; width: 2rem; height: 2rem; display: inline-flex;
  align-items: center; justify-content: center; border: 0; border-radius: 999px; background: none;
  color: var(--ink-3); cursor: pointer; transition: color 150ms ease, background-color 150ms ease;
}
.mic:hover { color: var(--ink); background: var(--surface-2); }
.mic.on { color: var(--accent-ink); background: var(--accent); }
.mic.on svg { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.unit-intro { color: var(--ink-2); margin: 0 0 var(--space-3); }
.rewrites summary { cursor: pointer; }
.rewrites ul { list-style: none; padding: 0; margin: var(--space-3) 0 0; display: grid; gap: var(--space-3); }
.rewrites .before { color: var(--ink-3); font-size: .9rem; text-decoration: line-through; text-decoration-color: var(--line); }
.rewrites .after { margin-top: var(--space-1); }
.edit-group h2 { margin-bottom: var(--space-3); }
.edit-row { padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.edit-slot:first-of-type .edit-row { border-top: 0; padding-top: 0; }
.edit-label { font-size: .85rem; font-weight: 600; color: var(--ink-3); margin-bottom: var(--space-2); }
.edit-row textarea { min-height: 3rem; }
.edit-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-top: var(--space-2); }
.edit-actions input[type=text] { flex: 1; min-width: 12rem; }
.btn-small { padding: .45rem .9rem; font-size: .9rem; }
.saved { color: var(--ok); font-weight: 600; }
.master-role { margin-bottom: var(--space-4); }
.master-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-3); }
.master-head h2 { margin: 0; }
.meter { flex: 0 0 80px; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; align-self: center; }
.meter span { display: block; height: 100%; background: var(--accent); }
.master-lines { list-style: none; padding: 0; margin: var(--space-3) 0; display: grid; gap: var(--space-2); }
.master-line { padding: var(--space-2) 0; border-top: 1px solid var(--line); }
.master-line .line-meta { display: inline-flex; gap: var(--space-2); margin-left: var(--space-2); font-size: .82rem; }
.master-line.removed .line-text { text-decoration: line-through; color: var(--ink-3); }
.master-line details summary { cursor: pointer; font-size: .85rem; color: var(--ink-3); display: inline; margin-left: var(--space-2); }
.master-engagement { margin: var(--space-3) 0 0 var(--space-4); }
.master-engagement h3 { font-size: 1rem; margin: 0; }
.master-add { display: flex; gap: var(--space-2); margin-top: var(--space-2); }
.master-add input { flex: 1; }
.badge.ok { background: var(--accent-soft); color: var(--accent); }
.prompts { margin: 0 0 var(--space-3); padding-left: 1.1rem; color: var(--ink-2); }
.prompts li { margin: .2rem 0; }
details.fix { margin-top: var(--space-3); }
details.fix summary { cursor: pointer; color: var(--ink-2); font-size: .92rem; }
details.fix textarea.line { min-height: 3.2rem; margin-bottom: var(--space-2); }
.related { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3);
  padding: var(--space-4) 0; border-top: 1px solid var(--line); }
.related:first-child { border-top: 0; padding-top: 0; }
.related h2 { margin: 0; } .related p { margin: var(--space-1) 0 0; }
.choice-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: .35rem .85rem; cursor: pointer;
  font-weight: 600; font-size: .9rem; background: var(--surface); }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill:has(input:checked) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pill:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.facts { margin: var(--space-2) 0 var(--space-4); padding-left: 1.1rem; }
.facts li { margin: .35rem 0; }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* --- blind ranking (review tool) ---------------------------------------------- */
main.full, .topbar.full { max-width: 1440px; }
.blind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); align-items: start; }
.version { padding: var(--space-4); }
.version h2 { display: flex; justify-content: space-between; align-items: center; }
.doc {
  white-space: pre-wrap; font-size: .86rem; line-height: 1.5; color: var(--ink);
  background: var(--surface-2); border-radius: var(--radius-sm); padding: var(--space-3);
  max-height: 70vh; overflow: auto; margin: var(--space-2) 0;
}
.version details summary { cursor: pointer; font-weight: 600; margin-top: var(--space-3); }
.rank-pick { display: flex; gap: var(--space-2); }
.rank-pick label {
  border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; cursor: pointer;
  font-weight: 600; font-size: .9rem; background: var(--surface);
}
.rank-pick input { position: absolute; opacity: 0; pointer-events: none; }
.rank-pick label:has(input:checked) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.rank-pick label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.version textarea {
  width: 100%; min-height: 2.6rem; font: inherit; font-size: .9rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: var(--space-2);
}
.posting-text { white-space: pre-wrap; font-size: .88rem; max-height: 50vh; overflow: auto; }
table.plain { border-collapse: collapse; width: 100%; }
table.plain th, table.plain td { text-align: left; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line); }
@media (max-width: 1000px) { .blind-grid { grid-template-columns: 1fr; } }

/* .fade-in is kept as a no-op: no fade-up on load in this design */

@media (max-width: 760px) {
  main { padding: var(--space-4) var(--space-4) var(--space-6); }
  .topbar { padding: var(--space-3) var(--space-4); }
  .compare { grid-template-columns: 1fr; }
  .card { padding: var(--space-4); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* "Experience we found together": what recall questions surfaced */
.found { margin-bottom: var(--space-4); }
.found-list { list-style: none; padding: 0; margin: var(--space-3) 0 0; display: grid; gap: var(--space-3); }
.found-list li { display: grid; gap: 2px; padding-left: var(--space-3); border-left: 3px solid var(--accent); }
.found-skill { color: var(--ink-2); font-size: .9rem; }
.found-line { color: var(--ink); }

/* data credits (O*NET, CC BY 4.0): small and quiet, under every page */
.credits { max-width: 46rem; margin: 3rem auto 1.5rem; padding: 0 1rem; font-size: .75rem;
           color: var(--ink-3); line-height: 1.5; text-align: center; }

/* app navigation and the jobs dashboard (Phase 2 Step 3) */
.appnav { display: flex; gap: var(--space-4); margin-left: auto; font-size: .92rem; }
.appnav a { color: var(--ink-2); text-decoration: none; transition: color 150ms ease; }
.appnav a:hover { color: var(--accent); }
.jobs-filter { display: flex; gap: var(--space-3); margin: var(--space-3) 0 var(--space-4); font-size: .92rem; }
.jobs-filter a { color: var(--ink-2); }
.jobs-filter a.on { color: var(--ink); font-weight: 600; text-decoration: none; }
.job { margin-bottom: var(--space-3); }
.job-head { display: flex; justify-content: space-between; gap: var(--space-3); align-items: baseline; }
.job-head h3 { margin: 0; font-size: 1.1rem; }
.job-meta { color: var(--ink-3); font-size: .9rem; margin: 2px 0 var(--space-2); }
.job-reasons { margin: 0 0 var(--space-3); padding-left: 1.1rem; color: var(--ink-2); }
.job-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.job-actions form { margin: 0; }
.job.decided { opacity: .65; }
.pkg-files { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0; }
.pkg-preview { white-space: pre-wrap; font-family: inherit; font-size: .9rem; background: var(--surface-2);
               border-radius: var(--radius-sm); padding: var(--space-4); max-height: 32rem; overflow: auto; }


/* company list (Phase 2 Step 4) */
.company-add-row { display: flex; gap: var(--space-2); }
.company-add-row input { flex: 1; }
.company-add details { margin-top: var(--space-2); font-size: .9rem; }
.company-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3);
               padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.company-row form { margin: 0; }
.company-name { font-weight: 600; }

/* a request failed (base.html) */
.global-error { position: fixed; left: 50%; bottom: var(--space-4); transform: translateX(-50%);
                display: flex; gap: var(--space-3); align-items: center; max-width: calc(100% - 32px);
                background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-sm);
                padding: var(--space-3) var(--space-4); box-shadow: var(--shadow-float); z-index: 50; }
.global-error[hidden] { display: none; }

/* phones (pre-alpha item 10): the top bar wraps; PDFs become text */
.narrow-only { display: none; }
.doc-text { white-space: pre-wrap; font: inherit; font-size: .88rem; margin: 0 0 var(--space-3); }
.job-miss { color: var(--warn); font-size: .92rem; margin: 0 0 var(--space-3); }
.job-closed { font-size: .9rem; }
.issues { padding-left: 1.1rem; }
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; row-gap: var(--space-2); }
  .appnav { flex-wrap: wrap; gap: var(--space-3); margin-left: 0; width: 100%; }
  .topbar .step { order: 3; width: 100%; }
  .wide-only { display: none; }
  .narrow-only { display: block; }
}
.mic-note { font-size: .85rem; margin-left: var(--space-2); }

/* freshness (round 2, item B) */
.job-fresh { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-2); font-size: .85rem; color: var(--ink-3); }
.job-fresh span + span::before { content: ","; margin: 0 var(--space-1) 0 calc(-1 * var(--space-2)); }
.job-fresh .urgent { color: var(--action); font-weight: 600; }

/* "Send it to" (round 2, item C) */
.send-to .who { margin: var(--space-3) 0; }
.send-to .search { display: flex; gap: var(--space-2); align-items: center; margin-top: var(--space-1); flex-wrap: wrap; }
.send-to code { background: var(--surface-2); border-radius: var(--radius-sm); padding: 2px 8px; font-size: .88rem; }

/* applications (round 2, item D) */
.app-totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); margin: var(--space-3) 0 var(--space-4); }
.app-totals div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-3); text-align: center; }
.app-totals b { display: block; font-size: 1.4rem; }
.app-totals span { color: var(--ink-3); font-size: .85rem; }
.application .nudge { background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); font-size: .92rem; }
.app-update { display: flex; gap: var(--space-2); align-items: center; margin: var(--space-2) 0; }
.application textarea { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 760px) { .app-totals { grid-template-columns: repeat(2, 1fr); } }

/* package pieces (round 2, item E) */
select.pieces { max-width: 16rem; font-size: .88rem; padding: 4px 6px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.job-actions form { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }

/* requirements coverage (round 2, item F) */
.coverage ul { list-style: none; padding: 0; }
.coverage li { margin: var(--space-2) 0; }
.coverage .tick { color: var(--accent); font-weight: 700; }
.coverage .where { font-size: .86rem; margin-left: 1.2rem; }
.coverage .left-out li { color: var(--ink-2); }

/* account (round 2, item H) */
.btn-danger { background: var(--warn); color: #fff; border-color: var(--warn); }
.card.danger h2 { color: var(--warn); }

/* --- design refresh 2: the Jobs page as rows ---------------------------------- */
.group-head { font-size: var(--text-meta); font-weight: 600; color: var(--ink-2); margin: var(--space-5) 0 var(--space-2); }
.rows { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.rows .job { margin: 0; border-top: 1px solid var(--hairline-row); }
.rows .job:first-child { border-top: 0; }
.job details > summary { list-style: none; }
.job details > summary::-webkit-details-marker { display: none; }
.job-sum { display: grid; grid-template-columns: 28px 1fr; gap: 0 var(--space-3); padding: var(--space-4) var(--space-4);
           cursor: pointer; transition: background-color 150ms ease; }
.job-sum:hover { background: var(--surface-2); }
.job-sum .glyph { color: var(--action); padding-top: 2px; }
.job-main { display: grid; gap: 1px; min-width: 0; }
.job-company { font-size: var(--text-row); font-weight: 600; }
.job-title { font-size: var(--text-row); }
.job-sum .job-meta { font-size: var(--text-meta); color: var(--ink-2); margin: 2px 0 0; }
.job-sum .job-meta .urgent { color: var(--action); font-weight: 600; }
.job-reason { color: var(--ink-2); margin-top: var(--space-1); }
.tag-new { display: inline-block; vertical-align: 2px; margin-left: var(--space-2); background: var(--strike); color: var(--strike-ink);
           font-size: var(--text-small); font-weight: 600; border-radius: 4px; padding: 0 6px; line-height: 1.6; }
.job-body { padding: 0 var(--space-4) var(--space-4) calc(28px + var(--space-3) + var(--space-4)); }
.job-body .job-reasons { margin: 0 0 var(--space-3); padding-left: 1.1rem; color: var(--ink-2); }
.job-body .job-actions + .job-actions { margin-top: var(--space-2); }
.job.decided .job-sum { opacity: .6; }
.btn-pill { background: none; color: var(--ink); border-color: var(--hairline); }
.btn-pill:hover { border-color: var(--ink-3); }
.btn-ghost { transition: color 150ms ease; }
.set-aside { margin-top: var(--space-5); }
.quiet-block { border: 1px solid var(--hairline); border-radius: var(--radius); padding: var(--space-3) var(--space-4); margin: 0 0 var(--space-4); }
.quiet-block > summary { cursor: pointer; }
.quiet-block[open] { background: var(--surface); }
.jobs-filter { flex-wrap: wrap; row-gap: var(--space-1); }
.jobs-filter a { white-space: nowrap; text-decoration: none; transition: color 150ms ease; }
.jobs-filter a:hover { color: var(--ink); }

/* phones: a fixed three-tab bar (Jobs, Your record, Applied); the top nav keeps the rest */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
            background: var(--surface); border-top: 1px solid var(--hairline); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; color: var(--ink-3); text-decoration: none; font-size: var(--text-small);
              font-weight: 600; transition: color 150ms ease; }
  .tabbar a.on { color: var(--action); }
  .appnav .tabbed { display: none; }
  body:has(.tabbar) { padding-bottom: 72px; }
  .job-body { padding-left: var(--space-4); }
}

/* --- design refresh 3: your record, as a document ------------------------------ */
.record-head { display: grid; grid-template-columns: 64px 1fr auto; gap: var(--space-4); align-items: center; margin-top: var(--space-5); }
.record-head h1 { margin: 0; }
.record-head .muted { margin: var(--space-1) 0 0; }
.ring { position: relative; width: 64px; height: 64px; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring circle { fill: none; stroke-width: 5; }
.ring-track { stroke: var(--hairline); }
.ring-fill { stroke: var(--action); stroke-linecap: round; transition: stroke-dashoffset 1200ms cubic-bezier(.2, .7, .2, 1); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 600; font-size: var(--text-meta); }
.record-head + .lead { margin-top: var(--space-4); }
.record { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
          padding: var(--space-2) var(--space-5) var(--space-4); margin-top: var(--space-4); }
.record-role { padding: var(--space-5) 0 var(--space-3); border-top: 1px solid var(--hairline); }
.record-role:first-child { border-top: 0; }
.role-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 var(--space-4); }
.role-name { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-role); line-height: 1.25; margin: 0; }
.role-dates { color: var(--ink-2); font-size: var(--text-meta); white-space: nowrap; }
.role-scope { color: var(--ink-2); margin: var(--space-1) 0 var(--space-2); }
.engagement-name { font-family: var(--font-serif); font-weight: 500; font-size: 18px; margin: var(--space-4) 0 0; }
.inset { background: var(--surface-2); border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4);
         color: var(--ink-2); font-size: var(--text-meta); margin: var(--space-2) 0; }
.record-lines { list-style: none; padding: 0; margin: var(--space-2) 0 0; }
.record-lines .master-line { padding: var(--space-3) 0; border-top: 1px solid var(--hairline-row); }
.record-lines .edit-slot:first-child .master-line { border-top: 0; }
.master-line .line-end { display: inline-flex; gap: var(--space-3); margin-left: var(--space-2); font-size: var(--text-small); color: var(--ink-3); white-space: nowrap; }
.master-line .add-fig { color: var(--action); }
.master-line .line-edit summary { font-size: var(--text-small); color: var(--ink-3); margin-left: var(--space-2); }
.master-line .line-edit[open] { margin-top: var(--space-2); }
.master-line .line-edit .muted { margin: var(--space-2) 0; }
.add-line { margin-top: var(--space-2); }
.add-line > summary { list-style: none; cursor: pointer; color: var(--action); font-size: var(--text-meta); }
.add-line > summary::-webkit-details-marker { display: none; }
.add-line .master-add { margin-top: var(--space-2); }
@media (max-width: 760px) {
  .record-head { grid-template-columns: 64px 1fr; }
  .record-word { grid-column: 1 / -1; justify-self: start; }
  .record { padding: var(--space-1) var(--space-4) var(--space-3); }
  .master-line .line-end { white-space: normal; }
}
.record-lines .line-edit { display: inline; }
.record-lines .line-edit[open] { display: block; }
.record-lines .line-edit > summary { display: inline; list-style: none; }
.record-lines .line-edit > summary::-webkit-details-marker { display: none; }

/* --- design refresh 4: the interview card -------------------------------------- */
.interview-card { margin: 0 0 var(--space-4); }
.interview-card .question { font-size: 26px; margin-bottom: var(--space-2); }
.interview-card .why { color: var(--ink-2); font-size: var(--text-meta); margin: 0 0 var(--space-4); }
.interview-card .unit-tag { margin-bottom: var(--space-3); }
.interview-card .answer-box { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
                              padding-bottom: 56px; margin-top: var(--space-3); }
.interview-card .answer-box textarea, .interview-card .answer-box input[type=text] {
  border: 0; background: transparent; padding: var(--space-4); border-radius: var(--radius); resize: none; }
.interview-card .answer-box textarea:focus, .interview-card .answer-box input[type=text]:focus { outline: none; }
.interview-card .answer-box:focus-within { border-color: var(--action); }
.interview-card .answer-box::after { content: "Saved as you go"; position: absolute; right: var(--space-4); bottom: 18px;
                                     font-size: var(--text-small); color: var(--ink-3); }
.interview-card .mic { left: var(--space-3); right: auto; bottom: var(--space-2); width: 44px; height: 44px;
                       border: 1px solid var(--hairline); color: var(--ink-2); }
.interview-card .mic svg { width: 20px; height: 20px; }
.interview-card .quote { border-left: 0; background: var(--surface-2); border-radius: var(--radius-sm); }
.progress-links { display: inline-flex; gap: var(--space-3); }
.progress-links a { color: var(--ink-2); }
.session-note { display: flex; gap: var(--space-3); align-items: baseline; color: var(--ink-2); font-size: var(--text-meta);
                border-top: 1px solid var(--hairline); padding-top: var(--space-4); margin-top: var(--space-5); }
.session-note b { color: var(--ink); font-weight: 400; }
.session-note .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--strike); transform: translateY(-1px); }

/* --- design refresh 5: stages, empty states, everything else -------------------- */
.stage { font-size: var(--text-small); font-weight: 600; white-space: nowrap; }
.stage::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px;
                 background: currentColor; transform: translateY(-1px); }
.stage-applied { color: var(--stage-applied); }
.stage-screen, .stage-interview { color: var(--stage-interview); }
.stage-offer { color: var(--stage-offer); }
.stage-rejected, .stage-withdrawn { color: var(--stage-closed); }
.app-totals div { border-color: var(--hairline); border-radius: var(--radius); }
.app-totals b { font-size: var(--text-head); font-weight: 600; }
.empty { display: grid; justify-items: center; gap: var(--space-3); text-align: center; padding: var(--space-7) var(--space-4); }
.empty p { color: var(--ink-2); max-width: 30rem; margin: 0; }
.heron-mark { color: var(--action-soft); }
@media (prefers-color-scheme: dark) { .heron-mark { color: var(--action-soft); } }
.card h3, .job-head h3 { font-size: var(--text-row); }
@media (max-width: 760px) { .topbar .step { margin-left: 0; } }

/* the nav's Sign out is a small form (a POST), drawn like the links beside it */
.nav-form { display: inline; margin: 0; }
.nav-form button { font: inherit; color: var(--ink-2); background: none; border: 0; padding: 0; cursor: pointer;
                   transition: color 150ms ease; }
.nav-form button:hover { color: var(--action); }
