:root {
  --bg: #f7f6f2; --surface: #ffffff; --ink: #1d1c1a; --muted: #6b675f; --line: #e3e0d8;
  --accent: #1f5c4a; --accent-ink: #ffffff; --warn: #9a3412; --warn-bg: #fff4ec;
  --ok-bg: #e5f2ec; --pend-bg: #f1ede2; --new-bg: #e8eefb; --new-ink: #1e3a8a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151513; --surface: #1e1e1b; --ink: #ecebe6; --muted: #a29e94; --line: #34332f;
    --accent: #5fb394; --accent-ink: #0c1a14; --warn: #fdba74; --warn-bg: #2a1d14;
    --ok-bg: #1d3329; --pend-bg: #2b2820; --new-bg: #1c2540; --new-ink: #b8c8f5;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif; }
a { color: var(--accent); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { font-weight: 700; text-decoration: none; color: var(--ink); letter-spacing: -0.01em; }
.brand span { color: var(--accent); }
nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
nav a { text-decoration: none; color: var(--ink); }
nav form { margin: 0; }
main { max-width: 980px; margin: 0 auto; padding: 28px 16px 48px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }
h1 { font-size: 28px; letter-spacing: -0.02em; margin: 6px 0 12px; }
h2 { font-size: 18px; margin: 28px 0 10px; }
.lede { color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); font-size: 14px; }
.warn { color: var(--warn); }
.narrow { max-width: 460px; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 12px 0; }
label { display: block; margin: 0 0 14px; font-weight: 550; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }
input[type=text], input[type=email], input[type=password], input:not([type]), textarea, input[type=file] {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
textarea { resize: vertical; }
button { font: inherit; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.link { border: 0; background: none; padding: 0; color: var(--ink); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row form { margin: 0; }
.flash { background: var(--pend-bg); border: 1px solid var(--line); border-radius: 10px; padding: 4px 16px; margin-bottom: 16px; }
.banner { display: block; background: var(--new-bg); color: var(--new-ink); border-radius: 10px; padding: 12px 16px; text-decoration: none; margin-bottom: 16px; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.steps li.done { border-color: var(--accent); }
.steps li.done h3::after { content: " ✓"; color: var(--accent); }
.steps h3 { margin: 0 0 4px; font-size: 16px; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; }
.pill { display: inline-block; font-size: 13px; padding: 2px 10px; border-radius: 99px; background: var(--pend-bg); }
.pill.active { background: var(--ok-bg); }
.pill.paused, .pill.cancelled { background: var(--warn-bg); color: var(--warn); }
.pill.new { background: var(--new-bg); color: var(--new-ink); }
.interview { display: grid; grid-template-columns: 220px 1fr; gap: 28px; }
.interview aside ol { padding-left: 20px; margin: 8px 0; font-size: 14px; }
.interview aside li { margin: 4px 0; }
.interview aside li.cur a { font-weight: 700; color: var(--ink); }
.lanes { display: grid; gap: 10px; margin-bottom: 16px; }
.lane { display: grid; grid-template-columns: auto auto 1fr; gap: 12px; align-items: start; cursor: pointer; margin: 0; font-weight: 400; }
.lane input { margin-top: 5px; }
.lane .rank { color: var(--muted); font-variant-numeric: tabular-nums; }
.lane-body { display: grid; gap: 2px; }
.lane .score { font-size: 13px; color: var(--accent); font-weight: 650; }
.lane .weak, .lane .detail { font-size: 14px; color: var(--muted); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.queue { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.facts { display: flex; gap: 8px; flex-wrap: wrap; }
.facts span { font-size: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; overflow-wrap: anywhere; }
.flags { border-color: var(--warn); background: var(--warn-bg); }
.flags h2 { margin-top: 0; color: var(--warn); }
.decide .edit { margin-top: 14px; }
.docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.docs figure { margin: 0; }
.docs figcaption { font-size: 14px; margin-bottom: 6px; overflow-wrap: anywhere; }
.docs iframe { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.doc { overflow-x: auto; }
.doc h3, .doc h4 { margin: 12px 0 6px; }
.files li { margin: 4px 0; }
code { font-size: 0.92em; }
details summary { cursor: pointer; margin: 18px 0 8px; font-weight: 600; }
@media (max-width: 700px) {
  .interview { grid-template-columns: 1fr; }
  .interview aside { display: none; }
  .bar { padding: 12px 16px; }
}

/* onboarding */
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--accent); font-weight: 700; margin: 0; }
a.button { display: inline-block; padding: 10px 18px; border-radius: 8px; text-decoration: none; }
a.button.primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 22px; }
.progress span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.chat { max-width: 640px; margin: 0 auto; display: grid; gap: 10px; }
.bubble { padding: 10px 14px; border-radius: 16px; max-width: 85%; font-size: 15px; }
.bubble.them { background: var(--surface); border: 1px solid var(--line); justify-self: start; border-bottom-left-radius: 4px; color: var(--muted); }
.bubble.you { background: var(--ok-bg); justify-self: end; border-bottom-right-radius: 4px; }
.ask { display: grid; gap: 14px; }
.question { font-size: 21px; line-height: 1.35; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.tot { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; }
.tot .or { align-self: center; color: var(--muted); font-size: 13px; }
.choice { padding: 22px 14px; font-size: 17px; font-weight: 600; border-width: 2px; border-radius: 14px; }
.choice:hover { border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { margin: 0; font-weight: 500; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 99px; cursor: pointer; background: var(--bg); }
.chip input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip input:disabled + span { opacity: .4; cursor: not-allowed; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.slider { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); }
.slider span:last-child { text-align: right; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.addnote summary { font-size: 14px; color: var(--muted); }
.skip { font-size: 14px; color: var(--muted); justify-self: start; text-decoration: underline; }
.portrait { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; }
.strengths, .energy { padding-left: 18px; }
.strengths li { margin: 0 0 10px; }
.strengths li span { display: block; color: var(--muted); font-size: 14px; }
.strengths li em { display: block; font-size: 12px; color: var(--accent); font-style: normal; }
.bars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 22px; gap: 6px; margin: 4px 0; }
.bar { position: relative; display: block; min-height: 22px; background: var(--pend-bg); border-radius: 6px; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--ok-bg); }
.bar b { position: relative; font-size: 11px; line-height: 16px; font-weight: 600; padding: 3px 6px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane .why { font-size: 14px; }
output { font-weight: 700; margin-left: 8px; }
.confirm h3 { font-size: 15px; margin: 18px 0 6px; color: var(--muted); }
.fact { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding: 10px 12px; margin: 6px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.fact textarea { grid-column: 1; margin: 0; background: transparent; border-color: transparent; padding: 4px 6px; }
.fact textarea:focus { border-color: var(--line); background: var(--bg); }
.fact .meta { grid-column: 1; font-size: 13px; }
.fact .meta .q { font-weight: 600; }
.fact .opts { grid-column: 2; grid-row: 1 / span 2; display: grid; gap: 4px; align-content: center; font-size: 14px; }
.fact .opts label { margin: 0; font-weight: 500; white-space: nowrap; }
.fact.ask { border-color: var(--warn); }
.fact.removed { opacity: .5; }
.fact.removed textarea { text-decoration: line-through; }
.fact.confirmed, .fact.edited { border-color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 12px 0; }
legend { font-weight: 600; margin-bottom: 6px; }
label.radio { font-weight: 400; margin: 4px 0; }
select { display: block; margin-top: 6px; padding: 9px; font: inherit; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); max-width: 100%; }
.sticky { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; border-top: 1px solid var(--line); margin-top: 18px; }
#wait { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 85%, transparent); display: grid; place-items: center; z-index: 10; }
#wait[hidden] { display: none; }
#wait div { text-align: center; max-width: 320px; }
.spin { display: inline-block; width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) {
  .portrait { grid-template-columns: 1fr; }
  .bars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tot { grid-template-columns: 1fr; }
  .tot .or { justify-self: center; }
  .fact { grid-template-columns: 1fr; }
  .fact .opts { grid-column: 1; grid-row: auto; display: flex; gap: 16px; }
  .slider { grid-template-columns: 1fr; }
  .slider span:last-child { text-align: left; }
}
.ident input { max-width: 520px; }
label.rule { display: block; font-weight: 400; padding: 8px 0; border-bottom: 1px solid var(--line); }
label.rule span:first-of-type { color: var(--muted); font-size: 13px; margin-right: 6px; }
.sendto { font-size: 14px; overflow-wrap: anywhere; }
.chip input[name^="drop_"]:checked + span { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); text-decoration: line-through; }
label.rule:has(input:checked) { opacity: .5; text-decoration: line-through; }

.work .note { white-space: pre-wrap; font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; max-height: 160px; overflow: auto; }
.iv-card .options { display: grid; gap: 10px; }
.iv-card .choice.picked { border-color: var(--accent); }
.iv-card .row { justify-content: space-between; }
.rank-list { padding-left: 1.5rem; }
.rank-list li { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; margin: .3rem 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: grab; }
.rank-list li span { flex: 1; }
.dim { margin: .9rem 0; }
.theme ul { margin: .4rem 0; }
