/* ==========================================================================
   DIB Jobs - styled to the QuotaBird UI and UX style guide
   White canvas, near-black ink, pale blue-gray panels, sky-blue action.
   Flat fills and fine separators; only floating menus and dialogs have elevation.
   Inter throughout; a 900-weight headline over reading-weight interface text.
   ========================================================================== */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin-wght-normal.woff2) format('woff2'); }

:root {
    /* Tokens measured in the style guide */
    --page: #ffffff;
    --ink: #0b1215;
    --muted: #4f5b66;
    --panel: #eef2f8;
    --control: #e2e8f0;
    --action: #7cc0f5;
    --caution: #fcec60;
    /* Not in the guide: companions to the caution yellow for the other two verdicts, and a hairline */
    --good: #9fe7b5;
    --bad: #ffa79b;
    --hairline: #d5dce6;
    --action-hover: #68b3ee;
    --control-hover: #d5dde8;
    --danger-ink: #a3180e;
    --good-ink: #0d5c2e;
    /* Radii: small controls / panels / verdict / pill / inset segment */
    --r-sm: 12px; --r-md: 16px; --r-lg: 24px; --r-pill: 999px; --r-seg: 8px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --ease: cubic-bezier(0.2, 0, 0, 1);
    --float: 0 8px 28px rgba(11, 18, 21, 0.16), 0 1px 3px rgba(11, 18, 21, 0.12);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--page); color: var(--ink); font: 400 17px/25px var(--font); letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--ink); text-underline-offset: 3px; }
[hidden] { display: none !important; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
::selection { background: var(--action); color: var(--ink); }
.icon { width: 20px; height: 20px; flex: none; fill: currentColor; }
button { font: inherit; color: inherit; }

/* ---------- Type ---------- */
.h1 { font: 900 36px/1.02 var(--font); letter-spacing: -0.045em; }
.h1.sm { font-size: 36px; }
.h3, .section-title { font: 900 24px/28.8px var(--font); letter-spacing: -0.015em; }
.title-md { font: 700 17px/24px var(--font); letter-spacing: -0.01em; }
.title-sm, .label-lg { font: 700 15px/19.5px var(--font); }
.lede, .body-lg { font: 400 17px/25px var(--font); letter-spacing: -0.01em; }
.body-md { font: 400 15px/22px var(--font); letter-spacing: -0.005em; }
.body-sm { font: 400 13px/18px var(--font); }
.label-md { font: 600 13px/18px var(--font); }
.eyebrow, .overline { font: 600 12px/16px var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
@media (min-width: 960px) { .page-intro .h1 { font-size: 56px; line-height: 57.12px; } }

/* ---------- Frame: centered 920px wrapper, contents left-aligned ---------- */
.app { max-width: 920px; margin: 0 auto; padding: 0 20px; }
.site-header { display: flex; align-items: center; gap: 12px; min-height: 64px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand svg { width: 30px; height: 30px; color: #2b8fd9; }
.brand-title { font: 900 20px/24px var(--font); letter-spacing: -0.03em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav-more { display: flex; align-items: center; }
.nav-item { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border: 0; border-radius: var(--r-sm); background: none; cursor: pointer; text-decoration: none; font: 500 15px/20px var(--font); letter-spacing: -0.01em; color: var(--ink); }
.nav-item:hover { background: var(--panel); }
.nav-item[aria-current="page"] { background: var(--control); font-weight: 600; }
.nav-toggle { display: none; align-items: center; gap: 4px; min-height: 40px; padding: 8px 10px 8px 14px; border: 0; border-radius: var(--r-sm); background: var(--control); cursor: pointer; font: 600 15px/20px var(--font); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--ink); color: #fff; font: 600 12px/20px var(--font); text-align: center; font-variant-numeric: tabular-nums; }
.badge:not(.neutral) { background: var(--danger-ink); }

main { padding: 24px 0 56px; }
.view > * + * { margin-top: 32px; }
.page-intro { max-width: 760px; }
.page-intro .eyebrow + .h1 { margin-top: 12px; }
.page-intro .lede { margin-top: 16px; max-width: 680px; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.section { margin-top: 48px; }
.panel > .section:first-child, .view > .section:first-child { margin-top: 0; }
.section:not(.grid-2) > * + * { margin-top: 14px; }

/* Calculator layout: inputs left, answer right at 880px and up */
.calc { display: grid; gap: 24px; }
@media (min-width: 880px) {
    .calc { grid-template-columns: 5fr 6fr; gap: 32px; align-items: start; }
    .calc-inputs { grid-column: 1; grid-row: 1; }
    .calc-result { grid-column: 2; grid-row: 1; position: sticky; top: 16px; }
}
.calc-inputs > * + * { margin-top: 16px; }

/* ---------- Surfaces: flat, no resting shadow ---------- */
.panel, .card { border-radius: var(--r-md); padding: 20px; background: var(--panel); }
.panel.accent { background: var(--control); }
.plain { padding: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 0; border-radius: var(--r-sm); cursor: pointer; background: var(--control); color: var(--ink); font: 600 15px/20px var(--font); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; transition: background 120ms var(--ease); -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--control-hover); }
.btn.primary { background: var(--action); }
.btn.primary:hover { background: var(--action-hover); }
.btn.text { background: none; padding: 10px 8px; text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.btn.text:hover { background: var(--panel); }
.btn.danger { color: var(--danger-ink); }
.btn.lg { min-height: 52px; padding: 14px 22px; font-size: 17px; width: 100%; }
.btn .icon { width: 20px; height: 20px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; flex: none; border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer; transition: background 120ms var(--ease), transform 160ms var(--ease); }
.icon-btn:hover { background: var(--control); }
.icon-btn .icon { width: 22px; height: 22px; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Floating menu (the elevation exception) ---------- */
.menu-anchor { position: relative; }
.menu { position: absolute; right: 0; top: 48px; z-index: 40; min-width: 250px; padding: 8px; border-radius: var(--r-md); background: var(--page); box-shadow: var(--float); }
.menu-item { width: 100%; min-height: 44px; padding: 8px 12px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: var(--r-seg); background: none; cursor: pointer; font: 500 15px/20px var(--font); text-align: left; }
.menu-item:hover { background: var(--panel); }
.menu-item .tick { margin-left: auto; visibility: hidden; }
.menu-item[aria-checked="true"] .tick { visibility: visible; }
.menu-item.saved .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu hr { border: 0; height: 1px; background: var(--hairline); margin: 8px 4px; }
.menu .menu-empty { padding: 6px 12px; font: 600 12px/16px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Segmented control (result sections, templates) ---------- */
.tabs { display: flex; gap: 2px; padding: 4px; border-radius: var(--r-sm); background: var(--control); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1 0 auto; min-height: 40px; padding: 8px 14px; border: 0; border-radius: var(--r-seg); background: none; cursor: pointer; font: 600 15px/22px var(--font); letter-spacing: -0.01em; white-space: nowrap; }
.tab:hover { background: var(--control-hover); }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.tab:focus-visible { outline-offset: -3px; outline-color: var(--action); }
.panel-body, #results .panel[role="tabpanel"] { background: none; padding: 32px 0 0 !important; border-radius: 0; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 14px; border: 0; border-radius: var(--r-sm); background: var(--control); color: var(--ink); font: 500 15px/18.75px var(--font); letter-spacing: -0.01em; text-decoration: none; cursor: default; }
a.chip, button.chip { cursor: pointer; transition: background 120ms var(--ease); }
a.chip:hover, button.chip:hover { background: var(--control-hover); }
.chip .icon { width: 18px; height: 18px; }
.chip.sm { min-height: 28px; padding: 4px 10px; border-radius: var(--r-seg); font: 600 13px/18px var(--font); }
.chip.tonal { background: var(--ink); color: #fff; }
.chip.sm.tonal, .chip.ok { background: var(--control); color: var(--ink); }
.chip.miss { background: none; box-shadow: inset 0 0 0 1.5px var(--muted); color: var(--muted); }
.chip.status-ok { background: var(--good); }
.chip.warn { background: var(--caution); }
.chip.bad { background: var(--bad); }
.chip .star { font-size: 12px; }
#templateChips .chip.tonal { background: var(--ink); color: #fff; }

/* ---------- Fields ---------- */
.field { display: block; }
.field-label { display: block; margin-bottom: 6px; font: 700 15px/19.5px var(--font); }
.field textarea, .field input[type="text"], .field input[type="url"], .field input[type="date"], .field select, .select { width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid transparent; border-radius: var(--r-sm); background: var(--page); color: var(--ink); font: 400 17px/25px var(--font); letter-spacing: -0.01em; transition: border-color 120ms var(--ease); }
.field textarea { display: block; min-height: 150px; resize: vertical; font-size: 15px; line-height: 22px; }
.field textarea:hover, .field input:hover, .field select:hover, .select:hover { border-color: var(--hairline); }
.field textarea:focus, .field input:focus, .field select:focus, .select:focus { outline: none; border-color: var(--ink); }
.field textarea::placeholder, .field input::placeholder { color: var(--muted); opacity: 1; }
.field.sm input, .field.sm select, .select.sm { min-height: 44px; padding: 9px 12px; font-size: 15px; line-height: 22px; }
.field.sm textarea { min-height: 72px; }
.supporting { display: flex; justify-content: space-between; gap: 16px; margin-top: 6px; font: 400 13px/18px var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
.field-error { padding: 12px 14px; border-radius: var(--r-sm); background: var(--bad); font: 600 15px/22px var(--font); }
textarea.drop-target { border-color: var(--ink) !important; border-style: dashed !important; }
#jobField textarea { min-height: 200px; }
.analyze-bar { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Switch / checkbox ---------- */
.switch-row { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch { position: relative; flex: none; width: 48px; height: 28px; border-radius: var(--r-pill); background: var(--muted); transition: background 120ms var(--ease); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 160ms var(--ease); }
.switch-row input:checked + .switch { background: var(--ink); }
.switch-row input:checked + .switch::after { transform: translateX(20px); }
.switch-row input:focus-visible + .switch { outline: 3px solid var(--ink); outline-offset: 2px; }
.switch-row .body-sm { color: var(--muted); display: block; }
.checkbox { width: 20px; height: 20px; accent-color: var(--ink); cursor: pointer; flex: none; margin: 12px; }

/* ---------- Dropzone ---------- */
.dropzone { display: flex; align-items: center; gap: 14px; padding: 14px; cursor: pointer; border: 1.5px dashed var(--muted); border-radius: var(--r-sm); background: var(--page); transition: border-color 120ms var(--ease), background 120ms var(--ease); }
.dropzone:hover { border-color: var(--ink); }
.dropzone .dz-icon { width: 44px; height: 44px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none; background: var(--action); }
.dropzone .dz-icon .icon { width: 24px; height: 24px; }
.dropzone u { font-weight: 600; }
.dropzone .body-lg { font-size: 15px; line-height: 22px; font-weight: 500; }
body.file-dragging .dropzone, .dropzone.drop-target { border-color: var(--ink); border-style: solid; background: var(--control); }
.dropzone.busy { cursor: progress; opacity: .7; }

/* ---------- Banners ---------- */
.banner { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--page); font: 400 15px/22px var(--font); }
.banner > .icon { width: 22px; height: 22px; margin-top: 0; }
.banner .grow strong { font-weight: 700; word-break: break-word; }
.banner.warn { background: var(--caution); }
.banner.error { background: var(--bad); }
.banner.info { background: var(--control); }
.banner .btn { margin: -6px -6px -6px 0; background: var(--ink); color: #fff; }

/* ---------- Disclosure ---------- */
details.disclosure > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none; font: 600 15px/20px var(--font); border-radius: var(--r-seg); }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary .chev { margin-left: auto; transition: transform 160ms var(--ease); }
details.disclosure[open] > summary .chev { transform: rotate(180deg); }
details.disclosure > .disclosure-body { padding: 4px 0 8px; }
.calc-inputs .panel details.disclosure { border-top: 1px solid var(--hairline); margin-top: 12px !important; padding-top: 4px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font: 400 15px/22px var(--font); }
.checklist .pass .icon { color: var(--good-ink); }
.checklist .flag .icon { color: var(--ink); }
.bullets li { position: relative; padding: 3px 0 3px 18px; font: 400 15px/22px var(--font); color: var(--muted); }
.bullets li::before { content: ''; position: absolute; left: 4px; top: 12px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ---------- Loading ---------- */
.linear-progress { height: 6px; border-radius: 3px; background: var(--control); overflow: hidden; }
.linear-progress > div { height: 100%; width: 5%; border-radius: 3px; background: var(--ink); transition: width .6s var(--ease); }
.skeleton { position: relative; overflow: hidden; border-radius: var(--r-seg); background: var(--control); }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 16px; margin-top: 12px; }

/* ---------- Verdict: big number, plain judgment, explanation ---------- */
.verdict { border-radius: var(--r-lg); padding: 24px; background: var(--panel); transition: background 200ms var(--ease); }
.verdict[data-tone="good"] { background: var(--good); }
.verdict[data-tone="caution"] { background: var(--caution); }
.verdict[data-tone="bad"] { background: var(--bad); }
.verdict:not([data-tone="neutral"]) .eyebrow { color: var(--ink); }
.verdict-num { display: flex; align-items: flex-end; gap: 12px; margin-top: 12px; }
.verdict-num b { font: 900 96px/86.4px var(--font); letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.verdict-num span { font: 600 13px/17px var(--font); padding-bottom: 6px; }
.verdict-label { margin-top: 14px; font: 850 28px/29.4px var(--font); letter-spacing: -0.025em; }
.verdict-explain { margin-top: 10px; font: 500 22px/28.6px var(--font); letter-spacing: -0.015em; }
.rec-reasons { margin-top: 14px; }
.rec-reasons li { position: relative; padding: 3px 0 3px 18px; font: 400 15px/22px var(--font); }
.rec-reasons li::before { content: ''; position: absolute; left: 4px; top: 12px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.rec-next { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font: 700 15px/22px var(--font); }
.rec-next .icon { margin-top: 1px; }
.verdict-chips { margin-top: 16px; }
.verdict .chip.sm { background: rgba(255, 255, 255, .6); }
.verdict[data-tone="neutral"] .chip.sm { background: var(--page); }
.example-tag { display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 6px; background: var(--ink); color: #fff; }

/* Breakdown rows: labels left, values right, hairlines between */
.rows { border-radius: var(--r-md); background: var(--panel); padding: 0 16px; }
.row-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; font: 400 17px/25px var(--font); }
.row-item + .row-item { border-top: 1px solid var(--hairline); }
.row-item b { font: 500 19px/19px var(--font); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- Lists ---------- */
.list { border-radius: var(--r-md); background: var(--panel); padding: 0 16px; }
.list-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; }
.list-item + .list-item { border-top: 1px solid var(--hairline); }
.list-item .lead { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.list-item .lead.ok { color: var(--good-ink); }
.list-item .lead.gap { color: var(--danger-ink); }
.list-item .headline-text { font: 700 17px/24px var(--font); letter-spacing: -0.01em; }
.list-item .support-text { font: 400 15px/22px var(--font); color: var(--muted); }
.panel:not([role="tabpanel"]) .list { background: var(--page); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); background: var(--panel); padding: 0 16px; }
table.data { width: 100%; border-collapse: collapse; font: 400 15px/22px var(--font); font-variant-numeric: tabular-nums; }
table.data th { text-align: left; padding: 14px 12px 10px 0; font: 600 12px/16px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
table.data td { padding: 14px 12px 14px 0; border-top: 1px solid var(--hairline); vertical-align: top; }
table.data th[scope="row"] { font: 700 15px/22px var(--font); letter-spacing: -0.01em; text-transform: none; color: var(--ink); border-top: 1px solid var(--hairline); white-space: normal; padding: 14px 12px 14px 0; }
table.data td:last-child, table.data th:last-child { padding-right: 0; }
table.data td.status-cell { text-align: right; }
table.data td.best { font-weight: 700; }
table.data td.best strong { display: inline-block; padding: 2px 10px; border-radius: 8px; background: var(--good); }

/* ---------- Market intel charts ---------- */
.chart-card { padding: 16px 20px 20px; }
.chart-value { font: 900 28px/32px var(--font); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 6px; }
.comp-bar { position: relative; height: 12px; border-radius: 6px; background: var(--control); margin: 36px 0 12px; }
.comp-bar .base, .comp-bar .ote { position: absolute; top: 0; bottom: 0; border-radius: 6px; transition: left .4s var(--ease), width .4s var(--ease); }
.comp-bar .base { background: var(--muted); }
.comp-bar .ote { background: var(--action); box-shadow: inset 0 0 0 1.5px var(--ink); }
.comp-bar .marker { position: absolute; top: -5px; width: 4px; height: 22px; border-radius: 2px; background: var(--ink); transform: translateX(-50%); transition: left .4s var(--ease); }
.comp-bar .marker::after { content: attr(data-label); position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 600 13px/16px var(--font); font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 6px 14px; flex-wrap: wrap; font: 500 13px/18px var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; margin-top: 16px; }
.timeline div { position: relative; padding-top: 28px; font: 700 13px/18px var(--font); }
.timeline div::before { content: ''; position: absolute; top: 2px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--ink); z-index: 1; }
.timeline div + div::after { content: ''; position: absolute; top: 9px; right: 50%; width: 100%; height: 2px; background: var(--muted); }
.timeline small { display: block; font: 400 13px/18px var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Rewrites / Q&A / paper ---------- */
.rewrite { border-radius: var(--r-md); overflow: hidden; background: var(--panel); }
.rewrite > div { padding: 14px 16px; font: 400 15px/22px var(--font); }
.rewrite .before { color: var(--muted); }
.rewrite .after { border-top: 1px solid var(--hairline); }
.rewrite .before + .after { background: none; }
.rewrite .tag { display: block; font: 600 12px/16px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.rewrite .after > span:not(.tag) { font-weight: 500; color: var(--ink); }
.rewrite .why { margin-top: 6px; font-size: 13px; line-height: 18px; color: var(--muted); }
.rewrite .foot { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 4px 16px; border-top: 1px solid var(--hairline); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qa > summary { font: 700 17px/24px var(--font) !important; padding: 10px 0 !important; min-height: 52px !important; }
.qa + .qa { border-top: 1px solid var(--hairline); }
#interviewQuestionsList { border-radius: var(--r-md); background: var(--panel); padding: 4px 16px; }
.prose { font: 400 15px/23px var(--font); white-space: pre-wrap; overflow-wrap: anywhere; }
.paper { padding: 16px; border-radius: var(--r-md); background: var(--panel); }
.resume-preview { padding: 24px; background: var(--page); box-shadow: inset 0 0 0 1.5px var(--hairline); }
.resume-preview h3 { font: 900 24px/28px var(--font); letter-spacing: -0.03em; }
.resume-preview h4 { font: 600 12px/16px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--hairline); }
.resume-preview .job { margin-top: 10px; }
.resume-preview .job b { font-weight: 700; }
.resume-preview p, .resume-preview li, .resume-preview .job { font: 400 15px/22px var(--font); }
.resume-preview ul { margin: 4px 0 0; }
.resume-preview li { position: relative; padding-left: 16px; }
.resume-preview li::before { content: '•'; position: absolute; left: 2px; }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 12px 16px; border-radius: var(--r-md); font: 400 15px/23px var(--font); overflow-wrap: anywhere; }
.msg p + p { margin-top: 8px; }
.msg.user { align-self: flex-end; background: var(--ink); color: #fff; }
.msg.assistant { align-self: flex-start; background: var(--panel); }
.msg.thinking { color: var(--muted); font-style: italic; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--control); object-fit: cover; flex: none; }

/* ---------- Tracker ---------- */
.tracker-head { align-items: flex-end; flex-wrap: nowrap; }
.job-card { border-radius: var(--r-md); background: var(--panel); }
.job-card.overdue { box-shadow: inset 5px 0 0 var(--danger-ink); }
.job-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 8px 12px; align-items: center; padding: 10px 8px 10px 4px; }
.job-row .status-cell { grid-column: 4; grid-row: 1; }
.job-row > .icon-btn { grid-column: 5; grid-row: 1; }
.job-card .details { padding: 0 16px 16px 48px; }
.job-card .details-grid { display: grid; grid-template-columns: 1fr 180px; gap: 12px; }
.job-title { font: 700 17px/24px var(--font); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-sub { font: 400 15px/22px var(--font); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-card.overdue .job-sub { color: var(--danger-ink) !important; font-weight: 600; }
.score-pill { display: inline-block; min-width: 46px; text-align: center; padding: 6px 10px; border-radius: var(--r-seg); font: 900 17px/20px var(--font); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; background: var(--control); }
.score-pill.high { background: var(--good); }
.score-pill.mid { background: var(--caution); }
.score-pill.low { background: var(--bad); }
.empty { display: grid; justify-items: start; gap: 10px; padding: 24px; border-radius: var(--r-lg); background: var(--panel); }
.empty .art { display: none; }
.empty p { max-width: 520px; color: var(--muted); }
.empty .h3 { color: var(--ink); }

/* ---------- Snackbar + dialog (floating) ---------- */
.snackbar { position: fixed; left: 50%; bottom: 24px; z-index: 100; display: flex; align-items: center; gap: 8px; min-height: 48px; max-width: min(560px, calc(100vw - 32px)); padding: 4px 6px 4px 16px; border-radius: var(--r-sm); background: var(--ink); color: #fff; box-shadow: var(--float); font: 500 15px/22px var(--font); transform: translate(-50%, 24px); opacity: 0; pointer-events: none; visibility: hidden; transition: transform 240ms var(--ease), opacity 160ms var(--ease), visibility 0s linear 240ms; }
.snackbar.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.snackbar .grow { padding: 8px 0; }
.snackbar .icon-btn { color: #fff; }
.snackbar .icon-btn:hover { background: rgba(255,255,255,.16); }
dialog.dialog { width: min(480px, calc(100vw - 40px)); padding: 24px; border: 0; border-radius: var(--r-lg); background: var(--page); color: var(--ink); box-shadow: var(--float); }
dialog.dialog::backdrop { background: rgba(11, 18, 21, .45); }
dialog.dialog h2 { font: 900 24px/28.8px var(--font); letter-spacing: -0.015em; margin-bottom: 12px; }
dialog.dialog .dialog-body { font: 400 15px/22px var(--font); color: var(--muted); }
dialog.dialog .field input { background: var(--panel); }
dialog.dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
dialog.dialog .dialog-actions .btn.text { text-decoration: none; background: var(--control); font-weight: 600; padding: 10px 16px; }
dialog.dialog .dialog-actions #promptOk { background: var(--action); }
dialog.dialog .dialog-actions #promptOk.danger { background: var(--bad); color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { padding: 24px 0 48px; border-top: 1px solid var(--hairline); }
.site-footer .share { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.site-footer p { margin-top: 14px; font: 400 13px/19px var(--font); color: var(--muted); max-width: 680px; }
.print-only { display: none; }

/* ---------- Quiet motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.enter, .enter-l, .enter-r { animation: rise 240ms var(--ease) both; }

/* ---------- Responsive ---------- */
@media (max-width: 879px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .job-card .details-grid { grid-template-columns: 1fr; }
}
@media (max-width: 699px) {
    /* Secondary header links collapse into the menu */
    /* The three working views stay visible as a full-width row; secondary links collapse into the menu */
    .site-header { flex-wrap: wrap; padding-top: 10px; gap: 8px 12px; }
    .nav-toggle { display: inline-flex; order: 2; }
    .nav { order: 3; flex: 1 0 100%; gap: 4px; padding: 4px; border-radius: var(--r-sm); background: var(--panel); }
    .nav .nav-item { flex: 1 1 0; justify-content: center; min-height: 44px; padding: 8px 6px; border-radius: var(--r-seg); font-size: 14px; white-space: nowrap; }
    .nav .nav-item[aria-current="page"] { background: var(--ink); color: #fff; }
    .nav .nav-item[aria-current="page"] .badge { background: #fff; color: var(--ink); }
    .nav-more { display: none; position: absolute; right: 0; top: 54px; z-index: 40; flex-direction: column; align-items: stretch; min-width: 200px; padding: 8px; border-radius: var(--r-md); background: var(--page); box-shadow: var(--float); }
    .nav-more.open { display: flex; }
    .nav-more .nav-item { min-height: 44px; }
    .search-fields { grid-template-columns: 1fr !important; }
    .search-actions .btn.primary, #handoffActions .btn { flex: 1 1 100%; justify-content: center; }
    .app { padding: 0 16px; }
    .verdict-num b { font-size: 76px; line-height: 70px; }
    .verdict-label { font-size: 24px; line-height: 26px; }
    .verdict-explain { font-size: 19px; line-height: 25px; }
    .job-card .details { padding: 0 16px 16px; }
    .msg { max-width: 94%; }
    .tracker-head { flex-wrap: wrap; align-items: flex-start; }
    .tracker-head > .grow { flex-basis: 100%; }
    .tracker-head .btn span.keep { position: static; }
    .tracker-head .btn span:not(.keep) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    /* Fit signals become stacked rows: status sits beside the signal name */
    table.data.stackable thead { display: none; }
    table.data.stackable tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 0; }
    table.data.stackable tbody tr + tr { border-top: 1px solid var(--hairline); }
    table.data.stackable th[scope="row"], table.data.stackable td { padding: 0; border: 0; }
    table.data.stackable th[scope="row"] { grid-column: 1; grid-row: 1; }
    table.data.stackable td.status-cell { grid-column: 2; grid-row: 1; }
    table.data.stackable td[data-label] { grid-column: 1 / -1; color: var(--muted); }
    table.data.stackable td[data-label]::before { content: attr(data-label) ': '; font-weight: 600; color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Print: the report ---------- */
@media print {
    @page { margin: 14mm; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none !important; }
    .app { max-width: none; padding: 0; }
    .site-header, .tabs, .site-footer, .snackbar, .btn, .icon-btn, .page-intro, #inputs, #loading, #resultEmpty, #actionBar,
    #view-tracker, #view-explore, #panel-ask, #linkedinBlock, #templatesBlock, #researchBlock, #tailorBlock, .menu-anchor, .rec-next, .no-print { display: none !important; }
    #view-analyze { display: block !important; }
    main { padding: 0; }
    .calc { display: block; }
    .calc-result { position: static; }
    .print-only { display: block; }
    .print-header { display: flex !important; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 3px solid var(--ink); }
    .print-header svg { width: 34px; height: 34px; }
    .print-header .ph-title { font: 900 20px/24px var(--font); letter-spacing: -0.03em; }
    .print-header .ph-meta { margin-left: auto; text-align: right; font: 400 11px/16px var(--font); color: var(--muted); }
    #results .panel[role="tabpanel"] { display: block !important; padding-top: 20px !important; }
    #panel-resume, #panel-interview, #panel-outreach { break-before: page; }
    #results .panel[role="tabpanel"]:not(#panel-overview)::before { content: attr(data-title); display: block; font: 900 24px/28px var(--font); letter-spacing: -0.015em; margin-bottom: 12px; }
    .section { margin-top: 24px; }
    details.disclosure > .disclosure-body { display: block !important; }
    details.disclosure::details-content { content-visibility: visible; height: auto; }
    .panel, .list-item, .rewrite, .qa, .banner, tr, .verdict, .rows { break-inside: avoid; }
}

/* Compare table: column headers are job titles, so no uppercase label styling */
#compareTable thead th { text-transform: none; letter-spacing: -0.01em; font: 700 15px/20px var(--font); color: var(--ink); white-space: normal; vertical-align: bottom; }
#compareTable thead th .body-sm { font-weight: 400; color: var(--muted); }
@media print { #results #panel-ask { display: none !important; } }

/* ==========================================================================
   Recruiter page (screen/)
   ========================================================================== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.panel .rows { background: var(--page); }
.queue-row { padding: 6px 0; gap: 10px; }
.queue-name { display: block; font: 700 17px/24px var(--font); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-status { display: block; font: 400 14px/20px var(--font); color: var(--muted); }
.queue-row .grow { min-width: 0; }
.th-sort { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
th[aria-sort="ascending"] .th-sort::after { content: ' \2191'; }
th[aria-sort="descending"] .th-sort::after { content: ' \2193'; }
table.ranking td.rank { width: 36px; font: 900 17px/22px var(--font); letter-spacing: -0.03em; color: var(--muted); }
table.ranking th[scope="row"] .sub { display: block; font: 400 14px/20px var(--font); color: var(--muted); }
table.ranking td.actions { text-align: right; white-space: nowrap; }
table.ranking td.actions .btn { min-height: 40px; padding: 8px 14px; background: var(--page); }
table.ranking td.status-cell { text-align: left; }
dialog.dialog.wide { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto; }
dialog.dialog.wide h2 { margin-bottom: 0; }
dialog.dialog .verdict-num b { font-size: 72px; line-height: 66px; }
@media (max-width: 699px) {
    table.ranking.stackable tr { grid-template-columns: auto 1fr auto auto; align-items: center; }
    table.ranking.stackable td.rank { grid-column: 1; grid-row: 1; width: auto; }
    table.ranking.stackable th[scope="row"] { grid-column: 2; grid-row: 1; }
    table.ranking.stackable td.score { grid-column: 3; grid-row: 1; }
    table.ranking.stackable td.status-cell { grid-column: 4; grid-row: 1; }
    table.ranking.stackable td[data-label], table.ranking.stackable td.actions { grid-column: 1 / -1; }
    table.ranking.stackable td.actions { text-align: left; padding-top: 6px; }
    dialog.dialog.wide { padding: 16px; }
}

/* ==========================================================================
   v9: decision-first result, compact first screen
   ========================================================================== */
/* Number and call share the top line: the fit score stays big, the decision sits beside it */
.verdict-head { display: flex; align-items: flex-end; gap: 16px 20px; flex-wrap: wrap; margin-top: 12px; }
.verdict-head .verdict-num { margin-top: 0; flex: none; }
.verdict-head .verdict-label { margin-top: 0; flex: 1 1 260px; font-size: 30px; line-height: 31px; padding-bottom: 6px; }
.verdict.preview .verdict-num b { font-size: 72px; line-height: 66px; }
.verdict.preview .verdict-label { font-size: 24px; line-height: 26px; }
.verdict.preview .verdict-explain { font-size: 17px; line-height: 24px; }
.btn.ink { background: var(--ink); color: #fff; }
.btn.ink:hover { background: #26323a; }
/* The deciding requirement, shown as evidence: what the posting asks for vs what the resume shows */
.evidence { margin-top: 14px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .62); padding: 0 14px; }
.evidence > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; font: 400 15px/21px var(--font); }
.evidence > div + div { border-top: 1px solid rgba(11, 18, 21, .14); }
.evidence b { font-weight: 700; text-align: right; }
.ask-box { margin-top: 14px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .62); padding: 12px 14px; }
.ask-box .eyebrow { color: var(--ink); margin-bottom: 4px; }
.row-item span small { display: block; font: 400 13px/17px var(--font); color: var(--muted); }

/* Inputs */
#jobField textarea { min-height: 112px; max-height: 280px; }
.resume-summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--page); }
.resume-summary .icon { width: 22px; height: 22px; color: var(--good-ink); }
.resume-summary .title-sm { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-summary .btn { min-height: 40px; padding: 8px 14px; }
.analyze-bar .btn.text { align-self: flex-start; }

/* Tool cards (ready-to-use searches) */
.tool-card { border-radius: var(--r-md); background: var(--panel); padding: 14px 16px; }
.tool-card .title-md { display: block; }
.tool-card .body-sm { display: block; color: var(--muted); margin: 2px 0 10px; }

/* Tracker */
.follow-row { align-items: center; gap: 12px; padding: 8px 0; min-height: 60px; }
.follow-row .grow { min-width: 0; }
.link-btn { border: 0; background: none; padding: 0; cursor: pointer; text-align: left; font: 700 17px/24px var(--font); letter-spacing: -0.01em; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.due { font: 600 14px/20px var(--font); white-space: nowrap; font-variant-numeric: tabular-nums; }
.due.late { color: var(--danger-ink); }
.job-row { grid-template-columns: minmax(0, 1fr) auto auto auto; padding-left: 16px; }
.job-row > * { grid-row: 1; }
.job-row .jr-title { grid-column: 1; min-width: 0; }
.job-row .score-pill { grid-column: 2; }
.job-row .status-cell { grid-column: 3; }
.job-row > .icon-btn { grid-column: 4; }
/* Compare mode adds a leading checkbox column */
.job-row.selecting { grid-template-columns: auto minmax(0, 1fr) auto auto auto; padding-left: 4px; }
.job-row.selecting .checkbox { grid-column: 1; }
.job-row.selecting .jr-title { grid-column: 2; }
.job-row.selecting .score-pill { grid-column: 3; }
.job-row.selecting .status-cell { grid-column: 4; }
.job-row.selecting > .icon-btn { grid-column: 5; }
.job-card .details { padding-left: 16px; }

@media (max-width: 879px) {
    /* Before a check, the inputs lead. Once there is an answer (or one is loading), the answer leads. */
    .calc:not(.has-result) .calc-result { order: 2; }
    .calc:not(.has-result) #examplePreview { display: none; }
}
@media (max-width: 699px) {
    .verdict-head .verdict-label { font-size: 26px; line-height: 28px; flex-basis: 100%; }
    .job-row { grid-template-columns: minmax(0, 1fr) auto auto; }
    .job-row > .icon-btn { grid-column: 3; }
    .job-row .status-cell { grid-column: 1 / -1; grid-row: 2; }
    .job-row.selecting { grid-template-columns: auto minmax(0, 1fr) auto auto; }
    .job-row.selecting > .icon-btn { grid-column: 4; }
    .job-row.selecting .status-cell { grid-column: 2 / -1; grid-row: 2; }
    .evidence > div { flex-direction: column; gap: 2px; }
    .evidence b { text-align: left; }
}
@media print { .ask-box, #examplePreview { display: none !important; } }
/* Grid children may shrink below their content width (prevents sideways scroll on phones) */
.calc > * { min-width: 0; }
.row-item b { white-space: nowrap; }
.row-item > span { min-width: 0; }

/* ---------- Find Jobs ---------- */
.search-fields { display: grid; grid-template-columns: 3fr 2fr; gap: 12px 14px; }
.optional { font-weight: 400; font-size: 13px; color: var(--muted); margin-left: 4px; }
.search-actions { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.query-line span { font-weight: 600; color: var(--ink); word-break: break-word; }
#searchForm details.disclosure, .save-form { border-top: 1px solid var(--hairline); padding-top: 4px; }
.save-form { padding-top: 16px; }
#handoffInput { min-height: 96px; max-height: 240px; }
#suggestBox { border-radius: var(--r-sm); background: var(--page); padding: 12px 14px; }
#suggestBox .chips { margin-top: 8px; }
details.boards > summary { font: 900 20px/24px var(--font); letter-spacing: -0.015em; border-top: 1px solid var(--hairline); padding-top: 12px; min-height: 56px; }
/* Tracker: a saved posting that has not been checked yet */
.score-pill.none { min-width: 0; padding: 6px 10px; font: 600 13px/20px var(--font); letter-spacing: 0; color: var(--muted); background: none; box-shadow: inset 0 0 0 1.5px var(--hairline); white-space: nowrap; }
.checkbox-gap { width: 20px; }
.job-row.selecting .checkbox-gap { grid-column: 1; }
#jobLinkHelp { flex-wrap: wrap; align-items: center; }
#jobLinkHelp a { word-break: break-all; color: var(--ink); }
#jobLinkHelp .btn { margin: 0; }
.search-actions .btn.text { white-space: normal; text-align: left; flex: 0 1 auto; min-width: 0; }

/* v11: every search destination is visible up front */
.search-fields.three { grid-template-columns: 5fr 3fr 3fr; }
.search-fields.three select { width: 100%; min-height: 48px; }
.search-out { border-top: 1px solid var(--hairline); padding-top: 16px; }
.search-out > * + * { margin-top: 12px; }
.search-out strong { word-break: break-word; }
#starterChips .btn.text { min-height: 44px; }
@media (max-width: 879px) { .search-fields.three { grid-template-columns: 1fr 1fr; } .search-fields.three > :first-child { grid-column: 1 / -1; } }
#starterChips .btn.text { white-space: normal; text-align: left; min-width: 0; }
#exampleBanner { align-items: center; flex-wrap: wrap; } #exampleBanner .btn { margin: 0; }

/* v14: the example answer is on screen for first-time visitors */
.example-note { font: 400 15px/22px var(--font); color: var(--muted); }
.example-note strong { color: var(--ink); font-weight: 700; }
#exampleExpand { display: none; align-self: flex-start; }
@media (max-width: 879px) {
    /* On small screens the example stays compact so the inputs are still on the first screen */
    body.example-compact #recEvidence, body.example-compact #recReasons, body.example-compact #recNext,
    body.example-compact #actionBar, body.example-compact #breakdown, body.example-compact #results,
    body.example-compact #verdictChip, body.example-compact #scoreDelta { display: none !important; }
    body.example-compact #exampleExpand { display: inline-flex; }
    body.example-compact .verdict { padding: 16px 18px; }
    body.example-compact .verdict-num b { font-size: 64px; line-height: 58px; }
    body.example-compact #recHeadline { font-size: 17px; line-height: 24px; }
}
@media print { .example-note, #exampleExpand { display: none !important; } }
@media (max-width: 879px) {
    body.example-compact #recHeadline, body.example-compact .example-note { display: none !important; }
    body.example-compact .verdict-head { flex-wrap: nowrap; align-items: center; gap: 14px; }
    body.example-compact .verdict-head .verdict-label { flex: 1 1 auto; font-size: 24px; line-height: 26px; margin: 0; }
    body.example-compact .verdict-num { margin-top: 6px; }
    body.example-compact #verdictWrap { gap: 10px; }
}
