/* EvenMatch: styles from the "EvenMatch mobile POC" design canvas.
   Inter for text, Space Grotesk for headings and numbers (both SIL OFL, self-hosted: no third-party requests).
   Fit is blue, interest is orange, break-even is the dark card. No inline styles anywhere (strict CSP). */
@font-face { font-family: "Inter"; src: url("/static/fonts/inter-latin-wght.woff2") format("woff2");
             font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/static/fonts/space-grotesk-latin-wght.woff2") format("woff2");
             font-weight: 300 700; font-display: swap; }

:root {
  --bg: #F4F6F8; --card: #FFFFFF; --ink: #101828; --text: #344054; --muted: #475467; --line: #D0D5DD;
  --soft: #E4E7EC; --link: #0B5E57; --link-hover: #084743;
  --fit: #1D4ED8; --fit-ink: #1E3A8A; --fit-bg: #EEF3FF;
  --int: #C2410C; --int-ink: #7A2E0B; --int-bg: #FFF1E7;
  --dark: #101828; --dark-text: #D0D5DD; --dark-track: #344054; --dark-low: #98A2B3; --dark-high: #FDBA74;
  --good: #0B5E57; --good-bg: #E6F4F2; --warn: #B54708; --bad: #B42318; --bad-bg: #FEE4E2;
  --v-apply: #0B5E57; --v-apply-bg: #E6F4F2;
  --v-enquire: #7A2E0B; --v-enquire-bg: #FEEBD9;
  --v-gap: #1E3A8A; --v-gap-bg: #EEF3FF;
  --v-skip: #912018; --v-skip-bg: #FEE4E2;
  --btn: #101828; --btn-text: #FFFFFF;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.06);
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  color-scheme: light;
}
/* Dark colours: when the device prefers dark (unless the person chose Light), or when they chose Dark.
   The choice is on their account and arrives as data-theme on <html>; public pages never set it. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C111D; --card: #161B26; --ink: #F5F5F6; --text: #CECFD2; --muted: #94969C; --line: #333741;
    --soft: #1F242F; --link: #5FD4C5; --link-hover: #8BE3D8;
    --fit: #84ADFF; --fit-ink: #B2CCFF; --fit-bg: #172554;
    --int: #FDA56B; --int-ink: #FDCFAE; --int-bg: #431A06;
    --dark: #1F242F; --dark-text: #CECFD2; --dark-track: #333741; --dark-low: #85888E; --dark-high: #FDBA74;
    --good: #5FD4C5; --good-bg: #0A2E2B; --warn: #FDB022; --bad: #F97066; --bad-bg: #3D1210;
    --v-apply: #5FD4C5; --v-apply-bg: #0A2E2B;
    --v-enquire: #FDCFAE; --v-enquire-bg: #4A1D07;
    --v-gap: #B2CCFF; --v-gap-bg: #172554;
    --v-skip: #FDA29B; --v-skip-bg: #3D1210;
    --btn: #F5F5F6; --btn-text: #0C111D;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C111D; --card: #161B26; --ink: #F5F5F6; --text: #CECFD2; --muted: #94969C; --line: #333741;
  --soft: #1F242F; --link: #5FD4C5; --link-hover: #8BE3D8;
  --fit: #84ADFF; --fit-ink: #B2CCFF; --fit-bg: #172554;
  --int: #FDA56B; --int-ink: #FDCFAE; --int-bg: #431A06;
  --dark: #1F242F; --dark-text: #CECFD2; --dark-track: #333741; --dark-low: #85888E; --dark-high: #FDBA74;
  --good: #5FD4C5; --good-bg: #0A2E2B; --warn: #FDB022; --bad: #F97066; --bad-bg: #3D1210;
  --v-apply: #5FD4C5; --v-apply-bg: #0A2E2B;
  --v-enquire: #FDCFAE; --v-enquire-bg: #4A1D07;
  --v-gap: #B2CCFF; --v-gap-bg: #172554;
  --v-skip: #FDA29B; --v-skip-bg: #3D1210;
  --btn: #F5F5F6; --btn-text: #0C111D;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
h1, h2, .display { font-family: var(--display); color: var(--ink); }
h1 { font-size: 1.75rem; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5rem; }
h2 { font-size: 1rem; font-family: inherit; font-weight: 700; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }
p:last-child { margin-bottom: 0; }
code { font-size: .9em; background: var(--soft); border-radius: 4px; padding: 0 .25rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Frame */
.top { display: flex; align-items: center; gap: 8px; max-width: 640px; margin: 0 auto; padding: 16px 20px 8px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.brand span { font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.logo-bar { stroke: var(--ink); }
.tag { font-size: .75rem; font-weight: 600; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 2px 8px; }
.me { margin-left: auto; display: flex; width: 44px; height: 44px; align-items: center; justify-content: center;
      border-radius: 999px; background: var(--soft); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .875rem; }
.me:hover { color: var(--ink); }
/* The bell sits top right, just before "Me"; its menu drops down under it. */
.bell { position: relative; margin-left: auto; }
.bell + .me-menu { margin-left: 4px; }
/* "Me": a menu with Account and Sign out, the same pattern as the bell. */
.me-menu { position: relative; margin-left: auto; }
.me-menu summary { list-style: none; cursor: pointer; margin-left: 0; }
.me-menu summary::-webkit-details-marker { display: none; }
.me-menu[open] summary { background: var(--line); }
.me-menu .menu { position: absolute; right: 0; top: 52px; z-index: 20; width: 200px; background: var(--card);
                 border: 1px solid var(--soft); border-radius: 14px; box-shadow: var(--shadow); padding: 6px;
                 display: flex; flex-direction: column; }
.me-menu .menu a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px;
                   text-decoration: none; color: var(--ink); font-weight: 600; }
.me-menu .menu a:hover { background: var(--soft); }
.me-menu .menu a + a, .me-menu .menu form + a { border-top: 1px solid var(--soft); border-radius: 0 0 10px 10px; }
/* Appearance: Auto (match the device) / Light / Dark, as a small segmented control. */
.me-menu .menu { width: 236px; }
.appearance { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px 10px; border-top: 1px solid var(--soft); }
.appearance .menu-k { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--soft); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { min-height: 36px; padding: 0 6px; border-radius: 8px; background: none; color: var(--text); font-size: .8125rem; width: 100%; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); font-weight: 700; }
.field .label { font-size: .875rem; font-weight: 600; color: var(--text); }
.field .value { margin: 0; }
.bell summary { list-style: none; position: relative; display: flex; width: 44px; height: 44px; align-items: center;
                justify-content: center; border-radius: 999px; cursor: pointer; color: var(--ink); }
.bell summary::-webkit-details-marker { display: none; }
.bell summary:hover, .bell[open] summary { background: var(--soft); }
.bell svg { stroke: currentColor; }
.bell .badge { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
               background: var(--bad); color: #FFFFFF; font-size: .6875rem; font-weight: 700; line-height: 18px; text-align: center; }
.bell .menu { position: absolute; right: -52px; top: 52px; z-index: 20; width: min(340px, calc(100vw - 32px));
              background: var(--card); border: 1px solid var(--soft); border-radius: 14px; box-shadow: var(--shadow);
              padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.bell .menu-h { margin: 0; font-weight: 700; }
.bell ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.bell li + li { border-top: 1px solid var(--soft); }
.bell li a { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; text-decoration: none; color: var(--ink); }
.bell li span { font-size: .8125rem; color: var(--warn); }
main { max-width: 640px; margin: 0 auto; padding: 8px 20px 24px; display: flex; flex-direction: column; gap: 14px; }
main > form { display: flex; flex-direction: column; gap: 14px; }
.foot { max-width: 640px; margin: 0 auto; padding: 8px 20px 24px; color: var(--muted); font-size: .8125rem;
        display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
/* Phones: the nav is a tab bar fixed to the bottom of the screen (it sits in the header in the HTML). */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
        border-top: 1px solid var(--soft); background: var(--card); padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); }
.tabs a { display: flex; justify-content: center; align-items: center; height: 48px; font-size: .8125rem; font-weight: 600;
          text-decoration: none; color: var(--muted); }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; }
body.has-tabs { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }   /* keep the footer clear of the tab bar */

/* Phones: everything in one column. These wrappers only lay things out on wide screens. */
.report, .summary, .details, .board { display: flex; flex-direction: column; gap: 14px; }
.board > .card { margin: 0; }

/* Building blocks */
.card { background: var(--card); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card > * { margin: 0; }
.card.raised { box-shadow: var(--shadow); }
.lede { font-size: 1rem; line-height: 1.5; color: var(--muted); }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.eyebrow { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.hero h1 { font-size: 2.25rem; line-height: 1.1; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--int); }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; color: var(--text); font-size: .9375rem; }
.ticks li { display: flex; gap: 10px; align-items: center; }
.ticks svg { flex: none; stroke: var(--good); }
.note { background: var(--good-bg); color: var(--ink); border-radius: 14px; padding: 14px; font-size: .875rem; line-height: 1.45; }
.alert { background: var(--bad-bg); color: var(--ink); border-radius: 14px; padding: 14px 16px; }
.alert ul { margin: .25rem 0 0; padding-left: 1.2rem; }

.button, button {
  display: flex; justify-content: center; align-items: center; min-height: 52px; padding: 0 18px; width: 100%;
  border: 0; border-radius: 14px; background: var(--btn); color: var(--btn-text);
  font: inherit; font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.button:hover { color: var(--btn-text); }
button:disabled { opacity: .6; cursor: progress; }
.button.secondary, button.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.button.small, button.small { min-height: 44px; border-radius: 10px; font-size: .875rem; width: auto; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pair .button, .pair button { min-height: 48px; border-radius: 12px; font-size: .9375rem; }

/* Forms */
label { display: block; font-size: .875rem; font-weight: 600; color: var(--text); }
.field { display: flex; flex-direction: column; gap: 6px; }
input[type=text], input[type=number], input[type=email], input[type=url], input[type=tel], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); font: inherit; font-size: 1rem;
}
textarea { min-height: 9rem; line-height: 1.5; resize: vertical; border-radius: 12px; padding: 14px; }
textarea.tall { min-height: 16rem; }
textarea.short { min-height: 5.5rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--fit); outline-offset: 2px; }
input[type=checkbox] { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--ink); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 400; color: var(--text); }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.sub { font-size: .8125rem; font-weight: 500; color: var(--muted); }
.clearance { display: grid; grid-template-columns: 4rem minmax(0, 1fr); align-items: center; gap: 10px; }
/* Pay range: two handles on one track (two stacked range inputs; only the thumbs take the pointer) */
.band { gap: 10px; }
.dual { position: relative; height: 44px; margin: 4px 12px 22px; }
.dual-val { position: absolute; top: 22px; font-size: .8125rem; font-weight: 700; color: var(--ink); white-space: nowrap;
            font-variant-numeric: tabular-nums; }
.dual-val.lo { transform: translateX(-100%); padding-right: 2px; }   /* ends at its handle: never overlaps the top */
.dual-val.hi { padding-left: 2px; }
.dual-track { position: absolute; left: 0; right: 0; top: 50%; height: 6px; margin-top: -3px; border-radius: 999px; background: var(--soft); }
.dual-fill { position: absolute; top: 0; bottom: 0; left: 0; right: 0; border-radius: 999px; background: var(--int); }
.dual-target { position: absolute; top: -7px; width: 2px; height: 20px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.dual input[type=range] { position: absolute; left: -12px; right: -12px; width: calc(100% + 24px); top: 0; height: 44px; margin: 0;
  background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.dual input[type=range]::-webkit-slider-runnable-track { background: none; border: 0; }
.dual input[type=range]::-moz-range-track { background: none; border: 0; }
.dual input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 24px; height: 24px;
  border-radius: 50%; background: var(--card); border: 2px solid var(--int); box-shadow: 0 1px 3px rgba(16,24,40,.25); cursor: grab; }
.dual input[type=range]::-moz-range-thumb { pointer-events: auto; width: 20px; height: 20px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--int); box-shadow: 0 1px 3px rgba(16,24,40,.25); cursor: grab; }
.dual input[type=range]:focus-visible { outline: none; }
.dual input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--fit); outline-offset: 2px; }
.dual input[type=range]:focus-visible::-moz-range-thumb { outline: 2px solid var(--fit); outline-offset: 2px; }
.slider { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.slider output { font-weight: 700; color: var(--ink); }
input[type=range] { width: 100%; min-height: 44px; margin: 0; accent-color: var(--int); }
.ticks-row { display: flex; justify-content: space-between; padding: 0 6px; margin-top: -8px; font-size: .75rem; color: var(--muted); }
.drop { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px dashed var(--muted);
        border-radius: 14px; padding: 14px; }
.drop svg { flex: none; stroke: var(--fit); }
.drop input[type=file] { max-width: 100%; font-size: .8125rem; color: var(--muted); }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
legend { padding: 0; margin-bottom: 4px; font-size: .875rem; font-weight: 600; color: var(--text); }

/* Report: job, then our recommendation first */
.job-head h1 { margin: 0; }
.job-head .meta { margin: 4px 0 0; font-size: .875rem; color: var(--muted); }
.verdict { gap: 4px; }
.verdict.v-apply { background: var(--v-apply-bg); } .verdict.v-enquire { background: var(--v-enquire-bg); }
.verdict.v-close_gap { background: var(--v-gap-bg); } .verdict.v-skip { background: var(--v-skip-bg); }
.verdict .eyebrow { color: var(--text); }
.verdict .label { font-family: var(--display); font-size: 1.875rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.verdict .reason { font-size: .9375rem; line-height: 1.45; color: var(--text); }
.verdict .reason strong { color: var(--ink); }
.v-apply .label { color: var(--v-apply); } .v-enquire .label { color: var(--v-enquire); }
.v-close_gap .label { color: var(--v-gap); } .v-skip .label { color: var(--v-skip); }

.pill { display: inline-block; font-size: .8125rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill.v-apply { color: var(--v-apply); background: var(--v-apply-bg); }
.pill.v-enquire { color: var(--v-enquire); background: var(--v-enquire-bg); }
.pill.v-close_gap { color: var(--v-gap); background: var(--v-gap-bg); }
.pill.v-skip { color: var(--v-skip); background: var(--v-skip-bg); }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.tile .k { font-size: .8125rem; font-weight: 600; }
.tile .n { font-family: var(--display); font-size: 2.375rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.tile .n.range { font-size: 2rem; }
.tile .q { font-size: .8125rem; color: var(--text); line-height: 1.4; }
.tile.fit { background: var(--fit-bg); } .tile.fit .k { color: var(--fit-ink); } .tile.fit .n { color: var(--fit); }
.tile.int { background: var(--int-bg); } .tile.int .k { color: var(--int-ink); } .tile.int .n { color: var(--int); }

.breakeven { background: var(--dark); color: #FFFFFF; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.breakeven > * { margin: 0; }
.breakeven .k { font-size: .8125rem; font-weight: 600; color: var(--dark-text); }
.breakeven .n { font-family: var(--display); font-size: 2.125rem; font-weight: 700; line-height: 1.1; color: #FFFFFF; }
.breakeven .n.none { font-size: 1.375rem; }
.breakeven .t { font-size: .875rem; color: var(--dark-text); line-height: 1.45; }
.breakeven progress { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border: 0; border-radius: 999px;
                      background: var(--dark-high); overflow: hidden; display: block; }
.breakeven progress::-webkit-progress-bar { background: var(--dark-high); border-radius: 999px; }
.breakeven progress::-webkit-progress-value { background: var(--dark-low); }
.breakeven progress::-moz-progress-bar { background: var(--dark-low); }
.breakeven .ends { display: flex; justify-content: space-between; gap: 8px; font-size: .75rem; color: var(--dark-text); }

.why h2.fit { color: var(--fit-ink); } .why h2.int { color: var(--int-ink); }
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: .875rem; color: var(--text); line-height: 1.4; }
.lines li { display: flex; gap: 8px; }
.lines .mk { flex: none; width: 1rem; text-align: center; font-weight: 700; }
.lines .body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lines .imp { color: var(--muted); }
.lines .ev { font-size: .8125rem; color: var(--muted); overflow-wrap: anywhere; }
.mk-met, .mk-for { color: var(--good); } .mk-partly { color: var(--warn); } .mk-not_met, .mk-against, .mk-deal { color: var(--bad); }
.mk-unknown { color: var(--muted); }
.gap-link { align-self: flex-start; font-size: .8125rem; font-weight: 600; padding: 10px 0; min-height: 44px;
            display: inline-flex; align-items: center; }
.quote { font-size: .875rem; color: var(--text); line-height: 1.5; }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list li { border-bottom: 1px solid var(--soft); }
.list li:last-child { border-bottom: 0; }
.list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0;
          text-decoration: none; color: var(--ink); }
.list .title { display: flex; flex-direction: column; min-width: 0; font-weight: 600; }
.list .title span { font-size: .8125rem; font-weight: 400; color: var(--muted); }

/* Tracker: home page groups, quiet reminders, the stage control on a report */
.note.warn { background: var(--v-enquire-bg); }
.group h2, .group summary { display: flex; align-items: center; gap: 8px; }
.group .count { font-size: .75rem; font-weight: 700; color: var(--muted); background: var(--soft); border-radius: 999px;
                padding: 1px 8px; }
.group .empty { padding: 4px 0 2px; }

/* Job cards on the board. The grip only shows when board.js runs (it adds .js-board); the Move menu always works. */
.cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.job { background: var(--bg); border: 1px solid var(--soft); border-radius: 12px; padding: 6px 10px 6px 8px;
       display: flex; flex-direction: column; gap: 2px; }
.job-top { display: flex; align-items: center; gap: 6px; }
.job-top a { flex: 1; min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px;
             min-height: 48px; text-decoration: none; color: var(--ink); }
.job .title { display: flex; flex-direction: column; min-width: 0; font-weight: 600; }
.job .title span { font-size: .8125rem; font-weight: 400; color: var(--muted); }
.grip { display: none; flex: none; width: 28px; height: 44px; align-items: center; justify-content: center;
        border-radius: 8px; color: var(--muted); cursor: grab; }
.grip svg { fill: currentColor; }
.grip:hover { background: var(--soft); color: var(--ink); }
.js-board .grip { display: flex; touch-action: none; }
.move summary { min-height: 32px; font-size: .8125rem; font-weight: 600; color: var(--link); }
.move form { display: flex; gap: 8px; align-items: center; padding: 4px 0 6px; }
.move select { flex: 1; min-height: 40px; }
.job.placeholder { opacity: .35; }
.job.saving { opacity: .6; }
.job.ghost { position: fixed; z-index: 50; margin: 0; pointer-events: none; background: var(--card);
             box-shadow: 0 10px 28px rgba(16,24,40,.22); transform-origin: center; }
body.dragging, body.dragging * { cursor: grabbing; user-select: none; }
.group.drop-over { outline: 2px dashed var(--link); outline-offset: -4px; background: var(--good-bg); }
#done-choice { border: 0; border-radius: 14px; padding: 18px; width: min(360px, calc(100vw - 32px));
               background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
#done-choice::backdrop { background: rgba(16,24,40,.45); }
#done-choice .stages { margin-top: 10px; }
#done-choice button.link { background: none; color: var(--link); min-height: 44px; }
.quiet { display: flex; flex-direction: column; gap: 8px; padding: 0 0 12px; font-size: .8125rem; font-weight: 600;
         color: var(--warn); }
.quiet .pair { grid-template-columns: repeat(2, max-content); justify-content: start; }
.quiet .pair button { white-space: nowrap; padding: 0 16px; }
.stages { display: flex; flex-direction: column; gap: 8px; }
.pill.stage { color: var(--ink); background: var(--soft); }
.pill.unchecked { color: var(--muted); background: var(--card); border: 1px dashed var(--line); font-weight: 600; }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card.invite { background: var(--fit-bg); }
@media (min-width: 900px) { .actions { display: flex; } .actions .button { width: auto; min-width: 220px; }
                            .card.invite .button { align-self: flex-start; width: auto; min-width: 280px; } }
.hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: .875rem; }
.hist span { color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px;
        background: var(--fit-bg); color: var(--fit-ink); font-size: .875rem; font-weight: 500; }

/* Landing page and example report */
.center { text-align: center; }
.example-card { text-decoration: none; color: var(--ink); gap: 14px; }
.example-card:hover { color: var(--ink); }
.example-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.example-foot { background: var(--bg); border-radius: 12px; padding: 12px; font-size: .875rem; line-height: 1.45; color: var(--text); }
.example-foot strong { color: var(--ink); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; font-size: .875rem; }
.facts div { display: flex; flex-direction: column; gap: 2px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.signin { margin-left: auto; font-size: .9375rem; font-weight: 600; text-decoration: none; padding: 12px 4px; }

details summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.jobtext { white-space: pre-wrap; font-size: .875rem; color: var(--muted); max-height: 20rem; overflow: auto; }
.prose ul { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.prose p { color: var(--text); }

@media (min-width: 720px) {
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.75rem; }
}

/* Desktop: a wider frame, the nav moves into the header, and long pages use two columns.
   Forms and reading pages stay at a comfortable 720px ("narrow"). */
@media (min-width: 900px) {
  .top, .foot { max-width: 1120px; padding-left: 32px; padding-right: 32px; }
  .top { padding-top: 20px; padding-bottom: 16px; }
  main { padding-left: 32px; padding-right: 32px; padding-bottom: 40px; }
  main.narrow { max-width: 784px; }   /* 720px of content */
  main.wide { max-width: 1120px; }

  body.has-tabs { padding-bottom: 0; }
  .tabs { position: static; display: flex; gap: 4px; margin-left: 24px; padding: 0; border: 0; background: none; }
  .tabs a { height: 40px; padding: 0 14px; border-radius: 10px; font-size: .9375rem; }
  .tabs a:hover { color: var(--ink); background: var(--soft); }
  .tabs a[aria-current="page"] { background: var(--soft); }

  /* Full-width buttons only on phones; on desktop a primary action is button-sized. */
  main > .button, main > .pair { align-self: flex-start; width: auto; min-width: 260px; }
  main > .pair { grid-template-columns: repeat(2, minmax(200px, auto)); }

  /* Report: the summary (verdict, scores, break-even, tracker) beside the reasons. */
  .report { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
  .details > .pair { align-self: flex-start; }

  /* Tracker: groups side by side. */
  .board { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }

  /* Landing: the pitch on the left, the example report on the right. */
  main.landing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 56px; row-gap: 16px;
                 grid-auto-flow: row dense; align-items: start; padding-top: 32px; }
  main.landing > * { grid-column: 1; }
  main.landing > .example-card { grid-column: 2; grid-row: 1 / span 6; align-self: center; }
}

/* Work history on the profile form: a card per role. */
.roles h3 { margin: 6px 0 0; font-size: .9375rem; }
#role-cards { display: flex; flex-direction: column; gap: 10px; }
.role-card { border: 1px solid var(--soft); border-radius: 12px; padding: 12px; background: var(--bg);
             display: flex; flex-direction: column; gap: 8px; }
.role-card label.field { font-size: .8125rem; }
/* Phones: one field per line, except From and To, which share a line. Wider: title and employer side by side. */
.role-card .row { display: grid; grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.role-card .row.dates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) { .role-card .row.names { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
button.link { background: none; border: 0; color: var(--link); min-height: 40px; padding: 0; width: auto;
              align-self: flex-start; font-weight: 600; }

/* Profile tabs. Phones: the tab bar sticks to the top while a long tab scrolls; Save sticks above the bottom nav. */
.profile-tabs { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 4px; padding: 4px; margin: 0 -4px; background: var(--soft); border-radius: 12px; }
.profile-tabs a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 6px;
                  border-radius: 9px; text-align: center; font-size: .875rem; font-weight: 600; line-height: 1.2;
                  text-decoration: none; color: var(--text); }
.profile-tabs a[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.tab-panel { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 64px; }
.profile-tabs a { -webkit-tap-highlight-color: transparent; }
/* Slim, so more of each tab shows on a phone: Save is always one tap away without filling the screen. */
.save-bar { position: sticky; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 4; box-shadow: var(--shadow);
            padding: 10px 12px; gap: 8px; }
.save-bar .check { font-size: .8125rem; line-height: 1.35; }
.save-bar button { min-height: 44px; }
@media (min-width: 900px) {
  .profile-tabs { top: 8px; }
  .save-bar { bottom: 12px; }
}

/* Multi-selects: chosen options as chips, the full list in a dropdown. */
.multi .picked { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.multi .picked:empty { display: none; }
.multi .chip { gap: 2px; padding-right: 4px; }
.chip-x { width: 28px; min-height: 28px; height: 28px; padding: 0; border-radius: 999px; background: none;
          color: var(--fit-ink); font-size: 1.1rem; line-height: 1; }
.chip-x:hover { background: var(--card); }
.multi-pick { position: relative; }
.multi-pick summary { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; font-size: .875rem;
                      font-weight: 600; color: var(--link); cursor: pointer; list-style: none; }
.multi-pick summary::-webkit-details-marker { display: none; }
.multi-pick summary::after { content: "\25BE"; font-size: .75rem; }
.multi-pick[open] summary::after { content: "\25B4"; }
.multi-pick summary, .chip-x { -webkit-tap-highlight-color: transparent; }
.multi-list { scroll-margin-bottom: calc(196px + env(safe-area-inset-bottom)); scroll-margin-top: 70px; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; background: var(--card);
              border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 50vh; overflow: auto; }
