/* Forelock — "honest instrument". Brand tokens (field/paper/ink/slate/rule, pennant =
   the only action color, chestnut = logo mark only, dawn = small highlights), mapped onto
   the app's working variables below. Honesty spectrum = meaningful data palette. See DESIGN.md. */
:root {
  color-scheme: light dark;
  --field: #f3f4f1;
  --paper: #ffffff;
  --brand-ink: #141821;
  --slate: #5b6272;
  --rule: #d9dcd6;
  --pennant: #2c46d6;
  --pennant-ink: #ffffff;
  --chestnut: #8c4a24;
  --dawn: #e9b949;
  --ok: #2f7d4f;
  --warn: #b5651d;
  --bad: #c0392b;

  --canvas: var(--field);
  --surface: var(--paper);
  --surface-2: color-mix(in srgb, var(--field) 60%, var(--paper));
  --rail: var(--paper);
  --line: var(--rule);
  --ink: var(--brand-ink);
  --muted: var(--slate);
  --accent: var(--pennant);
  --accent-ink: var(--pennant-ink);
  --explicit: var(--ok);
  --related: oklch(0.58 0.12 85);
  --analogous: oklch(0.57 0.15 55);
  --none: oklch(0.55 0.20 25);
  --safe: var(--explicit);
  --target: var(--accent);
  --reach: var(--related);
  --drop: var(--none);
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage Grotesque", var(--sans);
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --field: #0f1217;
    --paper: #171b22;
    --brand-ink: #e8eaee;
    --slate: #9aa1ae;
    --rule: #2a303a;
    --pennant: #8194ff;
    --pennant-ink: #0f1217;
    --chestnut: #cf8655;
    --dawn: #f0c766;
    --ok: #6cc591;
    --warn: #e0a25a;
    --bad: #ef7b6e;
    --surface-2: color-mix(in srgb, var(--paper) 70%, var(--rule));
    --rail: color-mix(in srgb, var(--field) 50%, var(--paper));
    --related: oklch(0.82 0.14 85);
    --analogous: oklch(0.75 0.15 55);
    --none: oklch(0.70 0.19 25);
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
.muted { color: var(--muted); }
.display { font-family: var(--display); letter-spacing: -0.01em; }
code { font-family: var(--mono); font-size: .82em; color: var(--accent); }
input, select, textarea, button { font-family: inherit; }

.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }

/* Rail */
.rail { background: var(--rail); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px; gap: 4px; }
.brand { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; text-transform: lowercase; color: var(--ink); display: flex; align-items: center; gap: 9px; margin: 2px 8px 20px; }
.brand .mark { width: 24px; height: 24px; flex: none; display: block; }
#nav { display: flex; flex-direction: column; gap: 2px; }
.rail nav button, .rail-foot button { all: unset; cursor: pointer; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 13.5px; display: flex; align-items: center; gap: 9px; transition: background .15s, color .15s; }
.rail nav button::before, .rail-foot button::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .35; }
.rail nav button:hover, .rail-foot button:hover { color: var(--ink); background: var(--surface); }
.rail nav button.active, .rail-foot button.active { color: var(--accent); background: color-mix(in oklch, var(--accent) 12%, transparent); }
.rail nav button.active::before { opacity: 1; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.honesty-key { display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 10px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); }
.honesty-key span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.explicit { background: var(--explicit); } .dot.related { background: var(--related); }
.dot.analogous { background: var(--analogous); } .dot.none { background: var(--none); }

/* Main + topbar */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 32px; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 21px; font-weight: 600; }
.status { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--explicit); box-shadow: 0 0 0 0 color-mix(in oklch, var(--explicit) 60%, transparent); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--explicit) 50%, transparent); } 70%,100% { box-shadow: 0 0 0 7px transparent; } }

.view { display: none; padding: 28px 32px 56px; }
.view.active { display: block; }

/* Evaluate */
.evaluate-grid { display: grid; grid-template-columns: 360px 1fr; gap: 22px; align-items: start; }
@media (max-width: 920px) { .app { grid-template-columns: 1fr; } .rail { flex-direction: row; overflow:auto; } .evaluate-grid { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.panel-label, .section-label { font-family: var(--display); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 14px; }
.section-label { margin: 26px 0 10px; }
.job-input label { display: block; margin: 14px 0; font-size: 12px; color: var(--muted); }
.job-input input, .job-input select, .job-input textarea { width: 100%; margin-top: 6px; background: var(--canvas); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; font-size: 14px; }
.job-input input:focus, .job-input select:focus, .job-input textarea:focus { outline: none; border-color: var(--accent); }
.job-input textarea { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; resize: vertical; }
.job-input .row { display: flex; gap: 10px; align-items: flex-end; }
.job-input .grow { flex: 1; }
.job-input .check { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.job-input .check input { width: auto; margin: 0; }
.jd-paste { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.jd-paste textarea { width: 100%; background: var(--canvas); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; font-size: 13px; line-height: 1.5; resize: vertical; }
.jd-paste textarea:focus { outline: none; border-color: var(--accent); }
.jd-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.jd-msg { font-size: 11.5px; } .jd-msg.jd-err { color: var(--none); }
button.ghost-sm { all: unset; cursor: pointer; font-size: 12px; font-weight: 600; font-family: var(--display); padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line); color: var(--accent); white-space: nowrap; }
button.ghost-sm:hover { border-color: var(--accent); background: color-mix(in oklch, var(--accent) 10%, transparent); }
button.ghost-sm:disabled { opacity: .6; cursor: default; }
button.ghost-sm:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.presets button { all: unset; cursor: pointer; font-size: 12px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); padding: 5px 11px; border-radius: 20px; }
.presets button:hover { border-color: var(--accent); color: var(--accent); }
button.primary { all: unset; cursor: pointer; text-align: center; width: 100%; margin-top: 6px; padding: 12px; font-weight: 600; font-family: var(--display); letter-spacing: .01em; background: var(--accent); color: var(--accent-ink); border-radius: 9px; transition: filter .15s; }
button.primary:hover { filter: brightness(1.08); }
button.primary:disabled { opacity: .6; cursor: default; }

.empty { color: var(--muted); padding: 48px 8px; max-width: 60ch; line-height: 1.7; }

/* Verdict gauge (instrument readout, not hero-metric) */
.verdict { display: flex; gap: 24px; align-items: center; }
.gauge { --val: 0; --col: var(--target); width: 112px; height: 112px; flex: none; border-radius: 50%; background: conic-gradient(var(--col) calc(var(--val) * 1%), var(--line) 0); display: grid; place-content: center; position: relative; }
.gauge::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface); }
.gauge b { position: relative; font-family: var(--mono); font-size: 30px; font-weight: 600; line-height: 1; text-align: center; }
.gauge span { position: relative; display: block; text-align: center; font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.verdict-line { display: flex; align-items: center; gap: 10px; }
.tier { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; padding: 4px 11px; border-radius: 6px; }
.tier.safe { background: color-mix(in oklch, var(--safe) 16%, transparent); color: var(--safe); }
.tier.target { background: color-mix(in oklch, var(--target) 16%, transparent); color: var(--target); }
.tier.reach { background: color-mix(in oklch, var(--reach) 16%, transparent); color: var(--reach); }
.tier.drop { background: color-mix(in oklch, var(--drop) 16%, transparent); color: var(--drop); }
.decision { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.reason { margin-top: 7px; font-size: 12.5px; }
.callouts { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; }
.callouts .gap { color: var(--none); } .callouts .flag { color: var(--analogous); }

table.reqs { width: 100%; border-collapse: collapse; font-size: 13px; }
table.reqs th { text-align: left; color: var(--muted); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 7px 8px; border-bottom: 1px solid var(--line); }
table.reqs td { padding: 9px 8px; border-bottom: 1px solid var(--surface-2); }
.rel { font-weight: 600; font-family: var(--mono); font-size: 12px; }
.rel.explicit { color: var(--explicit); } .rel.related { color: var(--related); }
.rel.analogous { color: var(--analogous); } .rel.none { color: var(--none); }
td.conf { font-family: var(--mono); color: var(--muted); }
.where { font-size: 11px; color: var(--muted); } .where.withheld { color: var(--analogous); }

.tabs { display: flex; gap: 3px; margin-top: 26px; }
.tabs button { all: unset; cursor: pointer; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; padding: 9px 15px; font-size: 12.5px; }
.tabs button.active { background: var(--canvas); color: var(--ink); }
.doc { margin: 0; background: var(--canvas); border: 1px solid var(--line); border-radius: 0 8px 8px 8px; padding: 18px; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; white-space: pre-wrap; max-height: 440px; overflow: auto; }
.polishnote { margin-top: 10px; font-size: 11px; }

/* Tracker board */
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .board { grid-template-columns: repeat(2, 1fr); } }
.col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; min-height: 120px; }
.col h3 { margin: 0 0 12px; font-family: var(--display); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; display: flex; justify-content: space-between; }
.col h3 .n { font-family: var(--mono); color: var(--muted); }
.col.safe h3 { color: var(--safe); } .col.target h3 { color: var(--target); } .col.reach h3 { color: var(--reach); } .col.drop h3 { color: var(--drop); }
.appcard { background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; margin-bottom: 8px; }
.appcard .t { font-weight: 600; font-size: 13px; }
.appcard .c { color: var(--muted); font-size: 12px; margin-top: 2px; }
.appcard .s { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 6px; }
.board-empty { grid-column: 1 / -1; }

/* Placeholder views */
.view.soon::before { content: attr(data-soon); display: block; max-width: 56ch; color: var(--muted); line-height: 1.7; }
.view.soon { padding-top: 40px; }

/* Document views (résumé / cover letter) */
.doc-empty { color: var(--muted); max-width: 60ch; line-height: 1.7; padding: 12px 0; }
.doc-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.doc-variant { margin: 0; }
.doc-variant button { all: unset; cursor: pointer; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); padding: 6px 14px; font-size: 12.5px; border-radius: 8px; }
.doc-variant button:first-child { border-radius: 8px 0 0 8px; }
.doc-variant button:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.doc-variant button.active { background: color-mix(in oklch, var(--accent) 14%, transparent); color: var(--accent); }
.doc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.doc-note { font-size: 12px; margin-bottom: 12px; }
.doc-render { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px 32px; max-width: 760px; line-height: 1.6; }
.doc-render h2 { font-family: var(--display); font-size: 22px; margin: 0 0 4px; }
.doc-render h3 { font-family: var(--display); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 20px 0 8px; border-bottom: 1px solid var(--line); padding-bottom: 5px; }
.doc-render p { margin: 6px 0; font-size: 13.5px; }
.doc-render ul { margin: 6px 0; padding-left: 20px; }
.doc-render li { font-size: 13.5px; margin: 3px 0; }
.doc-render strong { color: var(--ink); }

/* Print: only #print-area, as a clean black-on-white document. */
#print-area { display: none; }
@media print {
  body { background: #fff; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block; color: #111; font: 12pt/1.5 Georgia, "Times New Roman", serif; padding: 0; }
  #print-area h2 { font-size: 20pt; margin: 0 0 2pt; }
  #print-area h3 { font-size: 11pt; text-transform: uppercase; letter-spacing: .08em; color: #333; border-bottom: 1px solid #ccc; padding-bottom: 3pt; margin: 14pt 0 6pt; }
  #print-area ul { padding-left: 18pt; margin: 4pt 0; }
  #print-area p, #print-area li { font-size: 11pt; margin: 3pt 0; }
}

/* Account */
.acct-panel { max-width: 600px; margin-bottom: 18px; }
.acct-p { margin: 0 0 16px; line-height: 1.6; font-size: 13px; }
.acct-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.acct-btn { width: auto; padding: 11px 18px; }
.ext-token-out { margin-top: 16px; }
.token-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.token-row code { flex: 1; color: var(--accent); font-size: 12px; word-break: break-all; }

/* Sign-in gate */
.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(120% 90% at 50% -10%, color-mix(in oklch, var(--accent) 9%, var(--canvas)), var(--canvas)); }
.gate-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 30px 28px 24px; }
.gate-card .brand { font-size: 17px; margin: 0 0 22px; }
.gate-h { margin: 0 0 6px; font-size: 22px; font-weight: 600; }
.gate-sub { margin: 0 0 22px; font-size: 13px; line-height: 1.6; }
.gate .google { all: unset; cursor: pointer; box-sizing: border-box; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-weight: 500; font-size: 13.5px; transition: border-color .15s, background .15s; }
.gate .google:hover { border-color: var(--accent); background: var(--canvas); }
.gate-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.gate-or::before, .gate-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gate-field { display: block; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.gate-field input { width: 100%; margin-top: 6px; background: var(--canvas); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 11px; font-size: 14px; }
.gate-field input:focus { outline: none; border-color: var(--accent); }
.gate .primary { margin-top: 0; }
.gate-msg { margin-top: 14px; font-size: 12.5px; line-height: 1.55; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--canvas); }
.gate-msg.ok { border-color: color-mix(in oklch, var(--explicit) 50%, var(--line)); color: var(--explicit); }
.gate-msg.err { border-color: color-mix(in oklch, var(--none) 50%, var(--line)); color: var(--none); }
.gate-msg a { color: var(--accent); }
.gate-foot { margin: 22px 0 0; font-size: 11px; line-height: 1.55; }
.signout { font-size: 12.5px; }
.signout:hover { color: var(--none) !important; }
/* all:unset strips the native focus ring — restore a visible one for keyboard users. */
.gate .google:focus-visible, .gate .primary:focus-visible, .signout:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }

/* Boot / gate / onboard visibility. Exactly one surface shows at a time; nothing
   flashes before the session + profile resolve. */
.gate, .onboard { display: none; }
body.signed-out:not(.booting) .gate { display: grid; }
body.needs-profile:not(.booting):not(.signed-out) .onboard { display: grid; }
body.booting .app, body.signed-out .app, body.needs-profile .app { display: none; }

/* Onboarding — build/review your profile */
.onboard { position: fixed; inset: 0; z-index: 50; place-items: start center; overflow-y: auto; padding: 40px 24px;
  background: radial-gradient(120% 80% at 50% -10%, color-mix(in oklch, var(--accent) 8%, var(--canvas)), var(--canvas)); }
.onboard-card { width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 30px 28px; }
.onboard-card .brand { font-size: 17px; margin: 0 0 20px; }
#ob-resume { width: 100%; background: var(--canvas); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; resize: vertical; }
#ob-resume:focus { outline: none; border-color: var(--accent); }
#ob-paste .primary { margin-top: 0; }
#ob-paste .ghost { margin-top: 12px; }
#ob-file-btn { width: 100%; }
.ob-file-name { display: block; font-size: 12px; margin-top: 8px; word-break: break-all; }
.ob-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.ob-or::before, .ob-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ob-hint { font-size: 11.5px; margin: 14px 0 0; line-height: 1.5; }
.ob-format { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.ob-format li { font-size: 12.5px; color: var(--related); line-height: 1.5; }
.ob-section { margin-top: 22px; }
.ob-label { font-family: var(--display); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 10px; }
.ob-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ob-grid label { display: block; font-size: 12px; color: var(--muted); }
.ob-grid input, .ob-grid select { width: 100%; margin-top: 5px; background: var(--canvas); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font-size: 13.5px; }
.ob-grid input:focus, .ob-grid select:focus { outline: none; border-color: var(--accent); }
.ob-phrases, .ob-exp { display: flex; flex-direction: column; gap: 8px; }
.ob-phrase, .ob-exp-item { background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.ob-phrase-head, .ob-exp-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ob-phrase-name, .ob-exp-meta .t { font-weight: 600; font-size: 13px; }
.ob-exp-meta .c { color: var(--muted); font-size: 12px; margin-top: 2px; }
/* Notifications (bell, top right) */
.top-actions { display: flex; align-items: center; gap: 14px; }
.notif { position: relative; }
.notif-btn { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.notif-btn:hover { background: var(--surface-2); }
.notif-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.notif-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; box-shadow: 0 12px 32px -8px rgb(0 0 0 / .25); }
.notif-head { font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.notif-empty { font-size: 13px; }
.ob-gaps { display: flex; flex-direction: column; gap: 6px; }
.ob-gap { display: flex; flex-direction: column; gap: 8px; background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.ob-gap-text { font-size: 13px; overflow-wrap: anywhere; }
.ob-gap-acts { display: flex; gap: 8px; }
.ob-gaps-msg { font-size: 12px; margin-top: 6px; }
.ob-gaps-msg:empty { display: none; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.ob-chip { font-size: 11px; padding: 3px 8px; border-radius: 20px; border: 1px solid var(--line); color: var(--muted); }
.ob-chip.explicit { color: var(--explicit); border-color: color-mix(in oklch, var(--explicit) 40%, var(--line)); }
.ob-chip.related { color: var(--related); border-color: color-mix(in oklch, var(--related) 40%, var(--line)); }
.ob-chip.analogous { color: var(--analogous); border-color: color-mix(in oklch, var(--analogous) 40%, var(--line)); }
.ob-remove { all: unset; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 6px; border-radius: 6px; flex: none; }
.ob-remove:hover { color: var(--none); }
.ob-remove:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ob-actions { display: flex; gap: 10px; margin-top: 24px; }
.ob-actions .primary { margin-top: 0; }
button.ghost { all: unset; cursor: pointer; text-align: center; padding: 12px 18px; border-radius: 9px; border: 1px solid var(--line); color: var(--muted); font-family: var(--display); font-weight: 600; }
button.ghost:hover { color: var(--ink); border-color: var(--accent); }
.onboard .primary:focus-visible, button.ghost:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Résumés merged into the profile */
.ob-sources { list-style: none; padding: 0; margin: 6px 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.ob-sources li { font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; }
#ob-add-msg { margin-top: 8px; }
#ob-review.busy { opacity: .6; pointer-events: none; }

/* Guided setup (profile builder) */
.ob-progress { margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas); }
.ob-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.ob-stepchip { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 5px 11px; font-size: 12px; cursor: pointer; }
.ob-stepchip.done { color: var(--ink); }
.ob-stepchip.on { border-color: var(--accent); color: var(--ink); font-weight: 600; }
.ob-complete { margin-top: 10px; font-size: 12.5px; }
.ob-complete b { color: var(--accent); }
.ob-stepnav { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.ob-stepnav .primary { margin-top: 0; }
.ob-stepnav button:disabled { opacity: .45; cursor: default; }
@media (max-width: 640px) { .ob-grid { grid-template-columns: 1fr; } }
.ext-manual { margin-top: 14px; }
.ext-manual summary { cursor: pointer; font-size: 12.5px; }
a.acct-btn { display: inline-flex; align-items: center; text-decoration: none; }

/* Activity log */
.act-sum { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.act-tile { background: var(--surface-2); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.act-tile b { font-size: 20px; }
.act-tile span { font-size: 12px; color: var(--muted); }
.act-tools { margin-bottom: 10px; }
.act-scroll { overflow-x: auto; }
.act-table td { vertical-align: top; }
.act-table td:first-child, .aa-row-s { font-family: var(--mono); }
.act-table td:first-child { white-space: nowrap; color: var(--muted); }
.act-table tr.act-ok td:nth-child(4) { color: var(--ok); font-weight: 600; }
.act-table tr.act-warn td:nth-child(4) { color: var(--warn); font-weight: 600; }

/* Required setup questions: marked, and outlined when skipped. */
.ob-star { color: var(--accent); font-weight: 600; }
label.ob-need input, label.ob-need select { border-color: var(--bad); box-shadow: 0 0 0 2px color-mix(in srgb, var(--bad) 25%, transparent); }
label.ob-need { color: var(--bad); }
.ob-misslink { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; }

/* Auto apply */
.aa-grid { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .aa-grid { grid-template-columns: 1fr; } }
.aa-sources { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.aa-source { display: flex; align-items: center; gap: 8px; background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.aa-source .chk { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.aa-src-n { font-size: 12px; white-space: nowrap; }
.aa-source button.ghost-sm { padding: 4px 9px; }
.aa-source button.ghost-sm:disabled { opacity: .35; cursor: default; }
.aa-gap { margin-top: 18px; }
.aa-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; margin-bottom: 10px; }
.aa-field input, .aa-add-row input { background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--ink); font: inherit; font-size: 13px; }
.aa-chk { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.aa-note { font-size: 12px; margin: 6px 0; }
.aa-actions { display: flex; gap: 10px; align-items: center; }
.aa-actions button.ghost-sm { margin-top: 6px; }
.aa-add { margin-top: 14px; font-size: 13px; }
.aa-add summary { cursor: pointer; color: var(--accent); }
.aa-add-row { display: flex; gap: 8px; margin-top: 6px; }
.aa-add-row input { flex: 1; min-width: 0; }
.aa-log { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 70vh; overflow-y: auto; }
.aa-row { border: 1px solid var(--line); border-left-width: 3px; border-radius: 8px; padding: 8px 12px; background: var(--canvas); }
.aa-row.ok { border-left-color: var(--ok); }
.aa-row.err { border-left-color: var(--bad); }
.aa-row.busy { border-left-color: var(--accent); }
.aa-row-t { font-size: 13px; overflow-wrap: anywhere; }

/* Résumé score (profile + liaison page) */
.ob-score { display: flex; flex-direction: column; gap: 8px; }
.ob-score-top { display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 1.45; }
.ob-score-n { font-family: var(--display); font-size: 30px; font-weight: 800; letter-spacing: -.02em; min-width: 2.2ch; }
.ob-score-n.low, .ob-score-pill.low { color: var(--warn); }
.ob-score-n.mid, .ob-score-pill.mid { color: var(--related); }
.ob-score-n.good, .ob-score-pill.good { color: var(--ok); }
.ob-score-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.ob-score-meta { flex: 1; min-width: 0; font-size: 13px; }
.ob-score-meta .t { font-weight: 600; overflow-wrap: anywhere; }
.ob-score-meta .muted { font-size: 12px; margin-top: 2px; }
.ob-score-pill { font-family: var(--mono); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.ob-exp-item .ghost-sm { margin-left: auto; }

/* Field packs */
.ob-grid-1 { grid-template-columns: 1fr; }
.ob-talk { margin-top: 10px; }
.ob-packs { display: flex; flex-direction: column; gap: 14px; margin-bottom: 10px; }
.ob-pack { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--surface); }
.ob-pack-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; }
.ob-pack-head .ghost-sm { margin-left: auto; }
.ob-packs-empty { font-size: 13px; margin: 0; }

/* Liaison page */
.lh-top { margin-bottom: 16px; }
.lh-score { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 14px; }
.lh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 16px; }
.lh-card { display: flex; flex-direction: column; gap: 10px; }
.lh-card button.primary { box-sizing: border-box; margin-top: 0; }
.lh-card h3 { margin: 0; font-size: 18px; }
.lh-card p { margin: 0; font-size: 13px; line-height: 1.55; flex: 1; }
.lh-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.lh-field input, .lh-field select, .lh-field textarea { font: inherit; font-size: 13px; color: var(--ink); background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.lh-stories { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.lh-story { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface); }
.lh-story summary { cursor: pointer; }
.lh-story p { margin: 8px 0 0; line-height: 1.5; }
.lh-story .ghost-sm { margin-top: 10px; }

/* Liaison conversation panel */
.lz-wrap { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; }
.lz-wrap[hidden] { display: none; }
.lz-scrim { position: absolute; inset: 0; background: rgba(15, 18, 23, .45); }
.lz { position: relative; width: min(520px, 100%); height: 100%; background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(0,0,0,.18); }
.lz-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.lz-kicker { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--chestnut); font-weight: 600; }
.lz-title { margin: 4px 0 0; font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.lz-x { all: unset; cursor: pointer; padding: 6px 9px; border-radius: 7px; color: var(--muted); }
.lz-x:hover, .lz-x:focus-visible { background: var(--surface-2); color: var(--ink); }
.lz-log { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.lz-msg { max-width: 86%; padding: 10px 13px; border-radius: 12px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.lz-msg.them { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.lz-msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.lz-typing { color: var(--muted); letter-spacing: .2em; }
.lz-card { border: 1px solid var(--line); border-left: 3px solid var(--chestnut); border-radius: 10px; padding: 11px 13px; background: var(--canvas); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.lz-card.saved { border-left-color: var(--ok); }
.lz-card.skipped { opacity: .55; }
.lz-fb { border-left-color: var(--accent); }
.lz-card-kind { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.lz-old { text-decoration: line-through; color: var(--muted); }
.lz-new { font-weight: 600; line-height: 1.45; }
.lz-story-row { line-height: 1.5; }
.lz-better summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.lz-better p { margin: 6px 0 0; line-height: 1.55; }
.lz-card-actions { display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.lz-save, .lz-skip, .lz-send, .lz-mic { all: unset; cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 13px; padding: 7px 13px; border-radius: 8px; }
.lz-save, .lz-send { background: var(--accent); color: var(--accent-ink); }
.lz-skip { color: var(--muted); border: 1px solid var(--line); }
.lz-save:disabled, .lz-send:disabled { opacity: .6; cursor: default; }
.lz-done { font-size: 12px; font-weight: 600; color: var(--ok); }
.lz-compose { border-top: 1px solid var(--line); padding: 12px 20px 16px; display: flex; flex-direction: column; gap: 8px; }
.lz-compose textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: vertical; min-height: 44px; }
.lz-compose textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lz-actions { display: flex; align-items: center; gap: 10px; }
.lz-mic { border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 6px; }
.lz-mic.on { border-color: var(--bad); color: var(--bad); background: color-mix(in oklch, var(--bad) 10%, transparent); }
.lz-note { flex: 1; font-size: 11.5px; line-height: 1.4; }
.lz-save:focus-visible, .lz-skip:focus-visible, .lz-send:focus-visible, .lz-mic:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.lz-open { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) { .lz { animation: lz-in .18s ease-out; } @keyframes lz-in { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } } }
.aa-row-s { font-size: 12px; margin-top: 2px; }

/* Questions from your applications (ui/questions.js) */
.oq-list { display: flex; flex-direction: column; gap: 10px; }
.oq { display: flex; flex-direction: column; gap: 6px; background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.oq-q { font-weight: 600; }
.oq-where, .oq-note { font-size: 12px; }
.oq-text { width: 100%; box-sizing: border-box; font: inherit; resize: vertical; }
.oq-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.oq-bell-head { font-size: 12px; margin: 4px 0 6px; }

/* Run settings on the Auto apply page (same as the extension popup) */
.aa-settings { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.aa-field select { background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--ink); font: inherit; font-size: 13px; }
.aa-confirm { font-size: 12px; line-height: 1.5; margin-bottom: 10px; }

/* Stop rate on the Activity page */
.act-stops { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin: 10px 0; font-size: 13px; }
.act-stops-head b { font-family: var(--mono); font-size: 18px; margin-right: 6px; }
.act-stops-list { margin: 8px 0 0; padding-left: 18px; }
.act-stops-list li { margin: 3px 0; }
