/* Carlito (SIL Open Font License, fonts/OFL.txt): Calibri's metrics, for the document editor. */
@font-face { font-family: "Carlito"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/Carlito-Regular.ttf") format("truetype"); }
@font-face { font-family: "Carlito"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/Carlito-Bold.ttf") format("truetype"); }
@font-face { font-family: "Carlito"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/Carlito-Italic.ttf") format("truetype"); }
@font-face { font-family: "Carlito"; font-weight: 700; font-style: italic; font-display: swap; src: url("../fonts/Carlito-BoldItalic.ttf") format("truetype"); }
/* Application Desk. Colors and layout carried over from the original desk. */
:root {
  --ground: #eaefee; --surface: #ffffff; --surface-2: #f4f7f6; --ink: #16252a; --muted: #5a6c71;
  --line: #d3dcdb; --accent: #1f5563; --accent-ink: #ffffff; --accent-soft: #dbe9eb; --focus: #2b7f93;
  --apply: #2b7348; --apply-soft: #e1f0e6; --call: #8f5d00; --call-soft: #f7ecd6; --skip: #6f7b7f;
  --skip-soft: #e9eced; --danger: #a33a2c; --danger-soft: #f6e3e0;
  --k-req: #1c5cab; --k-duty: #3987e5; --k-pref: #86b6ef;
  --paper: #fdfdfb; --paper-ink: #1c2326; --paper-muted: #5d6468; --paper-heading: #1f4e5a;
  --mark: #fbe7a1; --moved: #2b7f93; --moved-soft: #e3f0f2;
  --shadow: 0 1px 2px rgba(22, 37, 42, .06), 0 8px 24px rgba(22, 37, 42, .08);
  --ui: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0e1618; --surface: #152125; --surface-2: #1a282c; --ink: #e2eaea; --muted: #93a6aa;
    --line: #273a3e; --accent: #86c6d3; --accent-ink: #0e1c20; --accent-soft: #1b3940; --focus: #86c6d3;
    --apply: #7fd09c; --apply-soft: #1b3325; --call: #e7b65a; --call-soft: #3a2d12; --skip: #9aa6aa;
    --skip-soft: #242f32; --danger: #f08b7c; --danger-soft: #3a1f1b;
    --k-req: #86b6ef; --k-duty: #3987e5; --k-pref: #184f95;
    --paper: #eceee9; --moved-soft: #1b3940; --mark: #5c4a12;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0e1618; --surface: #152125; --surface-2: #1a282c; --ink: #e2eaea; --muted: #93a6aa;
  --line: #273a3e; --accent: #86c6d3; --accent-ink: #0e1c20; --accent-soft: #1b3940; --focus: #86c6d3;
  --apply: #7fd09c; --apply-soft: #1b3325; --call: #e7b65a; --call-soft: #3a2d12; --skip: #9aa6aa;
  --skip-soft: #242f32; --danger: #f08b7c; --danger-soft: #3a1f1b;
  --k-req: #86b6ef; --k-duty: #3987e5; --k-pref: #184f95;
  --paper: #eceee9; --moved-soft: #1b3940; --mark: #5c4a12;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 14px/1.5 var(--ui); padding: 16px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.loading { color: var(--muted); text-align: center; margin-top: 20vh; }
.hidden { display: none !important; }

/* ---------- buttons, fields ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 13.5px; font-weight: 500;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 3px 9px; font-size: 12.5px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 12px; }
label .hint { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
input[type=text], input[type=email], input[type=url], input[type=password], input[type=date], input:not([type]), select, textarea {
  display: block; width: 100%; margin-top: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
  background: var(--surface-2); font-weight: 400; font-size: 13.5px;
}
input:focus, select:focus, textarea:focus { background: var(--surface); }
textarea { resize: vertical; min-height: 64px; line-height: 1.45; }
.inline-field { display: inline-block; width: auto; margin: 0; }

/* ---------- top bar ---------- */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; max-width: 1480px; margin: 0 auto 14px; }
.top h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.top h1 a { color: inherit; text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px; }
.top nav a { color: var(--muted); text-decoration: none; padding: 5px 10px; border-radius: 999px; font-weight: 500; font-size: 13.5px; }
.top nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.tally { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 13px; max-width: 1480px; margin: -6px auto 12px; }
.tally b { color: var(--ink); font-weight: 600; }
.notice { max-width: 1480px; margin: 0 auto 12px; padding: 10px 14px; border-radius: 8px; background: var(--call-soft); border: 1px solid var(--line); font-size: 13.5px; }
.notice.error { background: var(--danger-soft); }

/* ---------- layout ---------- */
.desk { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 16px; max-width: 1480px; margin: 0 auto; align-items: start; }
.pane { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.list-pane { position: sticky; top: 16px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.page { max-width: 980px; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin-bottom: 16px; }
.card h2 { margin: 0 0 6px; font-size: 17px; }
.card h3 { margin: 18px 0 8px; font-size: 14.5px; }
.card > p:first-of-type { margin-top: 0; }

/* ---------- job list ---------- */
.search { padding: 10px 10px 0; }
.search input { margin: 0; }
.filters { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.filters button { border: 1px solid transparent; background: none; padding: 4px 10px; border-radius: 999px; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 500; }
.filters button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.filters button .num { opacity: .75; margin-left: 3px; font-size: 12px; }
.jobs { overflow-y: auto; padding: 6px; flex: 1; }
.group-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 8px 4px; }
.job-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 2px 8px; width: 100%; text-align: left; border: 0; background: none; padding: 8px; border-radius: 8px; cursor: pointer; }
.job-row:hover { background: var(--surface-2); }
.job-row[aria-current="true"] { background: var(--accent-soft); }
.job-row .n { color: var(--muted); font-size: 12px; padding-top: 1px; }
.job-row .t { font-weight: 600; font-size: 13.5px; line-height: 1.3; overflow-wrap: anywhere; }
.job-row .c { grid-column: 2; color: var(--muted); font-size: 12.5px; }
.job-row .side { grid-row: 1 / span 2; grid-column: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.no-match { padding: 18px 14px; color: var(--muted); font-size: 13.5px; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.chip.apply { background: var(--apply-soft); color: var(--apply); }
.chip.call { background: var(--call-soft); color: var(--call); }
.chip.skip { background: var(--skip-soft); color: var(--skip); }
.chip.pending { background: var(--surface-2); color: var(--muted); }
.chip.error { background: var(--danger-soft); color: var(--danger); }
.chip.done { background: var(--accent-soft); color: var(--accent); }
.chip.applied { background: var(--apply-soft); color: var(--apply); }
.chip.applied::before { content: "✓"; font-size: 10px; }
.fit { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.dot-spin { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dot-spin { animation: none; opacity: .7; } }

/* ---------- job detail ---------- */
.detail { padding: 8px 22px 24px; }
.detail-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; align-items: flex-start;
  position: sticky; top: 0; z-index: 6; background: var(--surface); margin: 0 -22px; padding: 10px 22px 12px;
  transition: box-shadow .15s ease; }
.detail-head.stuck { box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .28); border-bottom: 1px solid var(--line); }
.detail-pin { height: 1px; margin-bottom: -1px; }
.check-field.head-applied { height: 32px; margin: 0; font-size: 13px; white-space: nowrap; }
@media (max-width: 820px) {
  .detail-head { gap: 8px; }
  .detail-head h2 { font-size: 16px; }
  .detail-head .btn-row { flex-wrap: nowrap; }
}
.detail-head h2 { margin: 0; font-size: 19px; line-height: 1.25; }
.detail-head .co { color: var(--muted); margin-top: 2px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; margin: 14px 0; padding: 12px 0; border-block: 1px solid var(--line); }
.facts div { font-size: 13px; }
.facts dt { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two h3, .section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
.two p { margin: 0; white-space: pre-line; }
.progress { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 16px; align-items: end; margin: 18px 0; padding: 14px; background: var(--surface-2); border-radius: 10px; }
.progress label { margin: 0; }
.progress .wide { grid-column: 1 / -1; }
.lock { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--accent); font-weight: 600; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 20px 0 14px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 8px 12px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }
.flags { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; background: var(--call-soft); }
.flags h4 { margin: 0 0 6px; font-size: 13.5px; }
.flags li { margin-bottom: 6px; font-size: 13px; }
.posting { white-space: pre-wrap; font-size: 13px; background: var(--surface-2); border-radius: 10px; padding: 14px 16px; max-height: 70vh; overflow: auto; }
.reqs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.req { font-size: 12px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); }
.req.have { background: var(--apply-soft); }
.req.partial { background: var(--call-soft); }
.req.gap { background: var(--danger-soft); }
.req i { font-style: normal; color: var(--muted); margin-left: 4px; font-size: 11px; }

/* ---------- documents (always paper) ---------- */
.paper { background: var(--paper); color: var(--paper-ink); border-radius: 6px; box-shadow: var(--shadow); padding: 36px 42px; font: 13px/1.38 Helvetica, Arial, sans-serif; max-width: 820px; }
.paper .name { font-size: 22px; font-weight: 700; margin: 0; }
.paper .headline { font-weight: 700; color: var(--paper-heading); margin: 2px 0 0; font-size: 12.5px; letter-spacing: .03em; }
.paper .contact { color: var(--paper-muted); font-size: 12px; margin: 3px 0 0; }
.paper h5 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--paper-heading); border-bottom: 1px solid var(--paper-heading); margin: 14px 0 5px; padding-bottom: 2px; }
.paper p { margin: 0 0 5px; }
.paper ul { margin: 2px 0 6px; padding-left: 18px; }
.paper .jh { display: flex; justify-content: space-between; gap: 12px; }
.paper .jh span:last-child { color: var(--paper-muted); white-space: nowrap; }
.paper .letter p { margin-bottom: 11px; }
mark.changed { background: var(--mark); color: inherit; border-radius: 2px; padding: 0 1px; }
.moved { border-left: 3px solid var(--moved); padding-left: 6px; margin-left: -9px; }
.changes { display: grid; gap: 12px; }
.change { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.change h4 { margin: 0 0 6px; font-size: 13px; }
.change .was { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.change ol { margin: 4px 0 0; padding-left: 22px; }

/* ---------- stats ---------- */
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 70px; gap: 10px; align-items: center; font-size: 13px; }
.bar .track { display: flex; height: 14px; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.bar .seg.have { background: var(--apply); }
.bar .seg.partial { background: var(--call); }
.bar .seg.gap { background: var(--danger); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin: 6px 0 14px; flex-wrap: wrap; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; background: var(--c); }

/* ---------- profile editor ---------- */
.repeat { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: var(--surface-2); }
.repeat .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 12px; }
.question-list { background: var(--call-soft); border-radius: 10px; padding: 10px 14px 10px 30px; }
.steps { display: flex; gap: 8px; margin: 0 0 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.steps b { color: var(--ink); }
.p-tabs { align-items: center; margin-top: 0; }
.p-tools { margin-left: auto; }
.p-pane[hidden] { display: none; }
/* The toast sets display:flex inline, which would otherwise beat [hidden] and leave it on screen. */
#toast[hidden] { display: none !important; }
.draft-notice { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.draft-notice span { flex: 1 1 320px; }
.p-head { display: flex; justify-content: space-between; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 4px; }
.p-head h2 { margin: 0; }
dialog.preview { width: min(920px, calc(100vw - 32px)); }
.preview-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.preview-bar h2 { margin: 0 0 2px; }
.token-box { font-family: var(--mono); background: var(--surface-2); border: 1px dashed var(--line); padding: 10px 12px; border-radius: 8px; overflow-wrap: anywhere; user-select: all; }
table.simple { width: 100%; border-collapse: collapse; font-size: 13px; }
table.simple td, table.simple th { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }

/* ---------- dialogs ---------- */
dialog { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); padding: 20px 22px; width: min(640px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(10, 20, 24, .45); }
dialog h2 { margin: 0 0 10px; font-size: 17px; }

/* ---------- sign-in, privacy ---------- */
body.auth { display: grid; place-items: center; min-height: 100vh; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 28px 18px; width: min(400px, 100%); box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 4px; font-size: 22px; }
.auth-card .btn { width: 100%; justify-content: center; padding: 9px; margin-top: 4px; }
#message { min-height: 1.5em; margin-top: 10px; font-size: 13px; color: var(--danger); }
.prose { max-width: 720px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 28px; }
.prose h2 { font-size: 16px; margin-top: 22px; }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .desk { grid-template-columns: 1fr; }
  .list-pane { position: static; max-height: none; }
  .desk.has-detail .list-pane { display: none; }
  .desk:not(.has-detail) .detail-pane { display: none; }
  .two { grid-template-columns: 1fr; }
  .paper { padding: 22px 18px; }
  .bar { grid-template-columns: 110px 1fr 54px; }
}
@media (min-width: 821px) { .back-to-list { display: none; } }

/* ======================================================================================
   v2: ported from the original desk (stats, history, outreach, work history) + editor
   ====================================================================================== */
:root { --series-1: #2a78d6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --series-1: #3987e5; } }
:root[data-theme="dark"] { --series-1: #3987e5; }

/* ---------- tiles, cards, tables (history + stats) ---------- */
.insights { max-width: 1100px; margin: 0 auto; display: grid; gap: 18px; padding-bottom: 40px; }
.insights h2 { margin: 0; font-size: 18px; }
.insights h3 { margin: 0 0 10px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.h-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.h-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.h-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.h-tile .v { font-size: 28px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.h-tile .l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.s-tile-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.h-chart { overflow-x: auto; padding-top: 18px; }
.h-plot { position: relative; height: 180px; display: flex; align-items: flex-end; gap: 2px; padding-left: 22px; border-bottom: 1px solid var(--line); min-width: 100%; box-sizing: border-box; }
.h-grid { position: absolute; left: 22px; right: 0; border-top: 1px solid var(--line); pointer-events: none; }
.h-grid span { position: absolute; left: -22px; top: -8px; width: 18px; text-align: right; font-size: 11px; color: var(--muted); }
.h-col { flex: 1 0 14px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; outline-offset: 2px; }
.h-bar { width: min(24px, 70%); background: var(--series-1); border-radius: 4px 4px 0 0; }
.h-col:hover .h-bar, .h-col:focus-visible .h-bar { filter: brightness(1.15); }
.h-col .peak { position: absolute; font-size: 11.5px; font-weight: 600; color: var(--ink); }
.h-x { display: flex; gap: 2px; padding: 4px 0 0 22px; min-width: 100%; box-sizing: border-box; }
.h-x span { flex: 1 0 14px; font-size: 11px; color: var(--muted); white-space: nowrap; width: 0; }
.h-tip { position: fixed; z-index: 40; pointer-events: none; background: var(--ink); color: var(--surface); font-size: 12.5px; padding: 6px 9px; border-radius: 6px; max-width: 280px; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.h-tip b { display: block; }
.h-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.h-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.h-table th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.h-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.h-table td.n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; width: 1%; white-space: nowrap; }
.h-table td.c { color: var(--muted); font-size: 12.5px; }
.h-note { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }

/* ---------- stats ---------- */
.s-intro { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; max-width: 75ch; }
.s-filters { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.s-group { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.s-group > .lbl { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; vertical-align: middle; }
.seg button { border: 0; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; padding: 5px 10px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover { background: var(--surface-2); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.seg button:disabled { opacity: .45; cursor: default; }
.s-filters select, .s-filters input[type=search] { display: inline-block; width: auto; margin: 0; font-size: 13px; padding: 5px 8px; }
.s-filters label.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; margin: 0; font-weight: 500; }
.s-legend { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.s-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.k-req { background: var(--k-req); } .k-duty { background: var(--k-duty); } .k-pref { background: var(--k-pref); }
.s-row { border-top: 1px solid var(--line); }
.s-head { display: grid; grid-template-columns: minmax(170px, 2.3fr) 96px minmax(120px, 3fr) 96px; align-items: center; gap: 12px; width: 100%; padding: 8px 6px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 6px; }
.s-head:hover { background: var(--surface-2); }
.s-name { font-size: 13.5px; font-weight: 500; }
.s-name .caret { display: inline-block; width: 12px; color: var(--muted); font-size: 10px; }
.s-stat { font-size: 12px; font-weight: 600; white-space: nowrap; }
.s-stat.have { color: var(--apply); } .s-stat.some { color: var(--call); } .s-stat.gap { color: var(--danger); } .s-stat.cond { color: var(--skip); }
.s-bar { display: flex; gap: 2px; height: 14px; }
.s-bar i { display: block; height: 100%; min-width: 3px; }
.s-bar i:last-child { border-radius: 0 4px 4px 0; }
.s-n { font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.s-n b { color: var(--ink); font-weight: 600; }
.s-more { padding: 2px 6px 14px 24px; font-size: 13px; display: grid; gap: 8px; }
.s-more p { margin: 0; }
.s-more .k { color: var(--muted); font-weight: 600; }
.s-jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.s-jobs li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.s-jobs .link { background: none; border: 0; padding: 2px 0; font: inherit; color: var(--accent); cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 2px; }
.s-kind { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.s-kind i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.s-applied { font-size: 11px; font-weight: 600; color: var(--apply); }
.s-empty { color: var(--muted); font-size: 13.5px; padding: 12px 6px; margin: 0; }
.s-edit { display: grid; grid-template-columns: 160px 1fr; gap: 8px 12px; align-items: start; }
.s-edit label { margin: 0; }
.fit-dots { letter-spacing: 1px; color: var(--call); font-size: 11px; }
@media (max-width: 700px) {
  .s-head { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  .s-bar { grid-column: 1; }
  .s-more { padding-left: 6px; }
  .s-edit { grid-template-columns: 1fr; }
}

/* ---------- outreach + work history ---------- */
.outreach { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 14px; display: grid; gap: 12px; }
.outreach.is-done { border-color: var(--apply); }
.o-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.o-top h3 { margin: 0; font-size: 15px; }
.o-track { display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.o-track label { margin: 0; display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.o-track input[type=date] { display: inline-block; width: auto; margin: 0; padding: 3px 6px; font-size: 12.5px; }
.o-person { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.o-person .who { font-weight: 700; }
.o-person .what { color: var(--muted); }
.o-src { font-size: 12.5px; color: var(--muted); flex-basis: 100%; }
.o-src.warn { color: var(--call); }
.o-links { display: flex; gap: 8px; flex-wrap: wrap; }
.o-msg { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; }
.o-msg .lab { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.o-msg textarea { background: var(--surface); }
.o-text { margin: 0; white-space: pre-wrap; font-size: 13.5px; }
.o-hint { font-size: 12.5px; color: var(--muted); margin: 0; }


/* ---------- PDF viewer (sent documents) ---------- */
.pdf-frame { width: 100%; height: 78vh; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }

/* ---------- drop zones ---------- */
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; cursor: pointer; background: var(--surface-2); transition: border-color .12s, background-color .12s; margin-bottom: 14px; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop b { display: block; font-size: 15px; margin-bottom: 4px; }
.drop .file { margin-top: 8px; font-weight: 600; color: var(--apply); }
.drop input { display: none; }

/* ---------- editor ---------- */
.ed-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px 14px; flex-wrap: wrap; position: sticky; top: var(--head-h, 0); z-index: 5;
  background: var(--surface); padding: 8px 0; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.ed-status { font-size: 12.5px; color: var(--muted); }
.ed-status.warn { color: var(--danger); font-weight: 600; }
.ed { background: var(--paper); color: var(--paper-ink); border-radius: 6px; box-shadow: var(--shadow); padding: 28px 34px; font: 13px/1.4 "Carlito", Calibri, Helvetica, Arial, sans-serif; max-width: 860px; }
.ed input, .ed textarea, .ed select { background: transparent; color: var(--paper-ink); border: 1px solid transparent; border-radius: 4px; padding: 2px 4px; margin: 0; font: inherit; width: 100%; display: block; }
.ed input:hover, .ed textarea:hover { border-color: #d6dad7; }
.ed input:focus, .ed textarea:focus { border-color: #8bb3bb; background: #fff; outline: none; }
.ed textarea { resize: none; overflow: hidden; min-height: 0; line-height: 1.4; }
.ed .c-name { text-align: center; font-size: 22px; font-weight: 700; color: #1B474D; text-transform: uppercase; }
.ed .c-contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 2px 6px; font-size: 12px; text-align: center; }
.ed .hl-row { text-align: center; margin: 4px 0; }
.ed .hl-row input { text-align: center; font-weight: 700; text-transform: uppercase; font-size: 13px; }
.ed .sec { margin-top: 14px; }
.ed .sec-head { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid #1B474D; margin-bottom: 6px; }
.ed .sec-head input { color: #1B474D; font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .02em; flex: 1; }
.ed .tools { display: inline-flex; gap: 2px; opacity: .25; transition: opacity .12s; flex: none; }
.ed .sec:hover > .sec-head .tools, .ed .row:hover > .tools, .ed .entry:hover > .entry-head .tools, .ed .tools:focus-within { opacity: 1; }
.ed .tb { border: 0; background: none; color: #5d6468; cursor: pointer; font-size: 13px; padding: 2px 5px; border-radius: 4px; line-height: 1; }
.ed .tb:hover { background: #e7ebe9; color: #1c2326; }
.ed .tb.danger:hover { color: #a33a2c; }
.ed .row { display: flex; align-items: flex-start; gap: 4px; border-radius: 4px; }
.ed .row.dragging { opacity: .4; }
.ed .row.drop-before { box-shadow: 0 -2px 0 #2b7f93; }
.ed .handle { cursor: grab; color: #9aa3a0; padding: 4px 2px; user-select: none; flex: none; font-size: 12px; }
.ed .bullet-dot { padding: 3px 2px 0 0; flex: none; }
.ed .skill-label { flex: 0 0 32%; font-weight: 700; }
.ed .entry { margin: 8px 0 10px; }
.ed .entry-head { display: grid; grid-template-columns: 2.2fr 1.5fr 1.1fr 1fr auto; gap: 2px 4px; align-items: center; }
.ed .entry-head .e-title { font-weight: 700; }
.ed .entry-head .e-dates { font-style: italic; color: #444; }
.ed .e-intro textarea, .ed .e-tech input { font-style: italic; color: #555; }
.ed .tags { display: flex; gap: 3px; flex-wrap: wrap; padding: 0 0 2px 22px; }
.ed .tag { font-size: 10.5px; padding: 0 6px; border-radius: 999px; background: #e3eef0; color: #1f4e5a; }
.ed .tag.hit { background: #1f4e5a; color: #fff; }
.ed .tag button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 0 0 3px; font-size: 10px; }
.ed .tag-add { font-size: 10.5px; border: 1px dashed #b9c4c1; border-radius: 999px; padding: 0 6px; width: auto; display: inline-block; }
.ed .add-row { font-size: 12px; margin: 4px 0 0 22px; display: flex; gap: 6px; flex-wrap: wrap; }
.ed .add-row button, .ed .add-row select { font-size: 12px; border: 1px dashed #b9c4c1; background: none; color: #1f4e5a; border-radius: 6px; padding: 2px 8px; cursor: pointer; width: auto; display: inline-block; }
.ed .add-row select { max-width: 100%; min-width: 0; text-overflow: ellipsis; }
.ed .changed-mark { box-shadow: inset 3px 0 0 #e0b93a; }
.ed .left-out { font-family: var(--ui); margin: 6px 0 2px 22px; border: 1px dashed #c9d1ce; border-radius: 6px; padding: 6px 8px; background: #f6f7f6; }
.ed .lo-head { font-size: 11.5px; font-weight: 700; color: #5d6468; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 2px; }
.ed .lo-row { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; border-top: 1px solid #e6e9e7; }
.ed .lo-row:first-of-type { border-top: 0; }
.ed .lo-text { flex: 1; font-size: 12.5px; color: #6b7377; }
.ed .lo-why, .bullet-compare .lo-why { display: block; font-size: 11.5px; font-style: italic; color: #8a6d1f; }
.ed .lo-row button { flex: none; font-size: 12px; border: 1px solid #b9c4c1; background: #fff; color: #1f4e5a; border-radius: 6px; padding: 1px 8px; cursor: pointer; width: auto; }
.ed .lo-row button:hover { border-color: #2b7f93; }
.bullet-compare { margin-top: 18px; }
.bullet-compare .bc-entry { padding: 8px 0; border-top: 1px solid var(--line); }
.bullet-compare h4 { margin: 0 0 4px; font-size: 13px; }
.bullet-compare ul { margin: 0; padding-left: 20px; font-size: 13px; }
.bullet-compare .bc-label { margin: 6px 0 2px; font-size: 12px; font-weight: 700; color: var(--muted); }
.bullet-compare .bc-out li { color: var(--muted); }
.ed .variant { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 2px 0 4px; font-family: var(--ui); }
.ed .variant .seg button { font-size: 12px; padding: 3px 9px; }
.ed .variant .muted { font-size: 12px; }
.ed .suggest { font-family: var(--ui); font-size: 12.5px; background: #fdf3d6; border: 1px solid #ecd28a; color: #3d3100; border-radius: 8px; padding: 6px 10px; margin: 4px auto 6px; max-width: 640px; text-align: left; }
.ed .suggest b { display: block; }
.ed .push { font-family: var(--ui); font-size: 12px; margin: 2px 0 4px 22px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; color: #5d6468; }
.ed .push button { font-size: 12px; padding: 1px 8px; border-radius: 6px; border: 1px solid #b9c4c1; background: #fff; color: #1f4e5a; cursor: pointer; }
.ed .add-sec { margin-top: 18px; font-family: var(--ui); display: flex; gap: 6px; align-items: center; }
.ed .add-sec select { width: auto; display: inline-block; border: 1px solid #b9c4c1; }
.ed.locked input, .ed.locked textarea { pointer-events: none; }
.ed .para { margin-bottom: 8px; }
.ed .para.tailored > textarea { background: #fbf6e3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ed input:focus, :root:not([data-theme="light"]) .ed textarea:focus { background: #f5f6f2; } }
@media (max-width: 820px) {
  .ed { padding: 18px 14px 18px 36px; }
  .ed .entry-head { grid-template-columns: 1fr 1fr; }
  .ed .skill-label { flex-basis: 40%; }
}

/* ---------- misc v2 ---------- */
.dl-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin: 6px 0; }
.dl-row .btn-row { gap: 6px; }
.chip.out-todo { background: var(--call-soft); color: var(--call); }
.chip.out-done { background: var(--apply-soft); color: var(--apply); }
.notice .btn { margin-left: 8px; }
.undo-list { display: grid; gap: 6px; }
.undo-list .row { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 13px; border-bottom: 1px solid var(--line); padding: 6px 0; }
.briefing textarea { min-height: 90px; font-size: 13px; }

/* ---------- assistant panel ---------- */
.chat { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: var(--shadow); z-index: 50; display: flex; flex-direction: column; }
.chat[hidden] { display: none; }
body.chat-open { padding-right: min(436px, 0px); }
@media (min-width: 1300px) { body.chat-open { padding-right: 436px; } }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chat-list { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.chat-list .sugg { text-align: left; white-space: normal; }
.cm { display: flex; flex-direction: column; gap: 4px; }
.cm.user { align-items: flex-end; }
.cm .bubble { max-width: 90%; padding: 8px 11px; border-radius: 12px; white-space: pre-wrap; font-size: 13.5px; line-height: 1.45; }
.cm.user .bubble { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.cm.bot .bubble { background: var(--surface-2); border-bottom-left-radius: 4px; }
.cm.bot.err .bubble { background: var(--danger-soft); }
.cm.bot .btn { align-self: flex-start; }
.chat-form { display: flex; gap: 8px; padding: 10px 14px 4px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-form textarea { margin: 0; resize: none; }
.chat-foot { padding: 0 14px 10px; margin: 0; }
.cm .bubble .li { display: block; padding-left: 12px; text-indent: -10px; }

/* ---------- decision: a label in the list, a field on the job ---------- */
.dlabel { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.dlabel::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dlabel.apply { color: var(--apply); }
.dlabel.call { color: var(--call); }
.dlabel.skip { color: var(--skip); }
.progress select { appearance: none; -webkit-appearance: none; padding-right: 38px; background-repeat: no-repeat; background-position: right 6px center; background-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23738080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.progress select.dsel { font-weight: 600; }
.progress select.dsel.apply { color: var(--apply); background-color: var(--apply-soft); border-color: var(--apply); }
.progress select.dsel.call { color: var(--call); background-color: var(--call-soft); border-color: var(--call); }
.progress select.dsel.skip { color: var(--skip); background-color: var(--skip-soft); }
.job-row { cursor: pointer; }

/* ---------- ⋯ job actions menu ---------- */
.more-wrap { position: relative; display: inline-block; }
.act-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; display: grid; }
.act-menu[hidden] { display: none; }
.act-menu button { display: grid; gap: 2px; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; color: var(--ink); font: inherit; }
.act-menu button span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.act-menu button:hover, .act-menu button:focus-visible { background: var(--surface-2); outline: none; }
.act-menu button.danger b { color: var(--danger); }
.act-menu a { color: var(--ink); }

/* ---------- the posting at the top of a job ---------- */
.posting-sec { margin: 0 0 16px; display: grid; gap: 10px; }
.req-key { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 8px; display: inline-flex; gap: 4px 10px; align-items: center; flex-wrap: wrap; }
.req-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; border: 1px solid var(--line); margin-right: -6px; vertical-align: -1px; }
.req-key i.have { background: var(--apply-soft); }
.req-key i.partial { background: var(--call-soft); }
.req-key i.gap { background: var(--danger-soft); }
/* A clear button, closed on every job (no remembered state). */
.posting-more summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--accent); width: fit-content;
  list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 12px;
  background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 999px; }
.posting-more summary::-webkit-details-marker { display: none; }
.posting-more summary::before { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: rotate(-45deg); transition: transform .15s; }
.posting-more[open] summary::before { transform: rotate(45deg); margin-top: -3px; }
.posting-more summary:hover { background: var(--accent); color: var(--accent-ink); }
.posting-more summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.posting-more[open] summary { margin-bottom: 8px; }

/* ---------- Download menu ---------- */
.dl-row .btn { display: inline-flex; align-items: center; gap: 6px; }
.dl-row .btn .chev { margin-right: -3px; }
.dl-menu { left: 0; right: auto; width: 320px; }
.dl-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; }
.dl-item > span:first-child { display: grid; gap: 1px; }
.dl-item > span:first-child span { font-size: 12.5px; color: var(--muted); }
.dl-links { display: inline-flex; gap: 4px; }
.dl-links a { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border: 1px solid var(--line); border-radius: 7px; text-decoration: none; }
.dl-links a:hover, .dl-links a:focus-visible { background: var(--surface-2); outline: none; }
.dl-menu button { border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; margin-top: 2px; }

/* ---------- copy buttons (application forms) ---------- */
.cp { display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: none; color: #7a8584; cursor: pointer; flex: none; }
.cp:hover, .cp:focus-visible { color: #1f4e5a; background: #e7ebe9; border-color: #cfd6d3; outline: none; }
.cp.copied { color: var(--apply); }
.ed .sec, .ed .entry, .ed .para { position: relative; }
.ed .sec > .cp { position: absolute; left: -31px; top: -1px; }
.ed .entry > .cp { position: absolute; left: -31px; top: 0; }
.ed .para > .cp { position: absolute; left: -31px; top: 2px; }
.copy-list { margin-top: 18px; display: grid; gap: 4px; }
.cl-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cl-head h3 { margin: 0; }
.cl-item { display: grid; grid-template-columns: 28px 1fr; gap: 6px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); }
.cl-item .cp { color: var(--muted); }
.cl-item b { font-size: 13px; }
.cl-item p { margin: 2px 0 0; font-size: 13px; white-space: pre-line; color: var(--muted); max-height: 6.4em; overflow: hidden; }

.regen { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- polish (Oct 11) ---------- */
.search { padding: 12px 12px 0; }
.search input[type=search], input[type=search] { display: block; width: 100%; margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
  background: var(--surface-2); font-size: 13.5px; }
.search input[type=search]:focus { background: var(--surface); }
.btn.primary.small { box-shadow: 0 1px 2px rgba(22, 37, 42, .18); }
.progress { align-items: start; padding: 14px 16px; }
.progress label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.progress input, .progress select { color: var(--ink); height: 38px; }
.check-field { display: flex; align-items: center; gap: 8px; height: 38px; margin-top: 4px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface-2); color: var(--ink); font-weight: 500; font-size: 13.5px; cursor: pointer; }
.check-field input { width: 16px; height: 16px; margin: 0; accent-color: var(--apply); }
.check-field.on { background: var(--apply-soft); border-color: var(--apply); color: var(--apply); font-weight: 600; }
.progress input.readonly { background: transparent; border-style: dashed; color: var(--muted); }
.progress textarea { color: var(--ink); }

.pop-note { position: absolute; z-index: 55; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--line); box-shadow: var(--shadow); opacity: 0; transform: translateY(-3px); transition: opacity .2s, transform .2s; pointer-events: none; white-space: nowrap; }
.pop-note.show { opacity: 1; transform: none; }
.link-form { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.link-form[hidden] { display: none; }
.link-form label { flex: 1; min-width: 240px; margin: 0; }
.link-form .btn { margin-left: 0; }
.cm-ctx { font-size: 11.5px; color: var(--muted); text-align: right; margin-top: 3px; }
/* ---------- interview prep ---------- */
.prep-tools { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 12px; }
.prep-tools input[type=search] { flex: 1 1 220px; max-width: 320px; }
.prep-bar { height: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.prep-bar span { display: block; height: 100%; background: var(--apply); }
.prep-topic { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.prep-head { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.prep-count { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; margin-left: 6px; white-space: nowrap; }
.prep-count.c0 { background: var(--danger-soft); color: var(--danger); }
.prep-count.c1 { background: var(--call-soft); color: var(--call); }
.prep-count.c2 { background: var(--apply-soft); color: var(--apply); }
.prep-detail { margin: 6px 0 0; font-size: 13.5px; }
.prep-source { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.prep-for { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.prep-story { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.prep-story summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.prep-story-body { white-space: pre-wrap; font-size: 13.5px; line-height: 1.5; margin: 8px 0; }
.prep-form { display: grid; gap: 8px; margin-top: 10px; padding: 12px; background: var(--surface-2); border-radius: 8px; }
.prep-form label { margin: 0; }
.prep-story-edit { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.prep-story-edit > .prep-form { margin-top: 0; }
.prep-tabs { margin-top: 0; }
.prep-q .prep-head b { font-size: 14.5px; }
.prep-noanswer { margin: 8px 0 0; }
.q-add-row { margin-top: 12px; }
.prep-q > .prep-form { margin-top: 0; }
.prep-missing { display: flex; flex-wrap: wrap; gap: 8px; }
.prep-miss { display: inline-flex; gap: 6px; align-items: center; }

/* "Try the demo" visitors: a slim note above the app. */
.demo-banner { background: var(--accent-soft); color: var(--ink); border-bottom: 1px solid var(--line);
  padding: 8px 16px; font: 14px/1.4 var(--ui); text-align: center; }
.demo-banner a { color: var(--accent); font-weight: 600; margin-left: 8px; white-space: nowrap; }
