/* Parley. Two sides, two colours: green for employers, orange for candidates.
   Headlines in Bricolage Grotesque, everything else in Figtree. Pale sage paper, no shadows. */
:root {
  --bg: #F4F7F3;
  --surface: #FFFFFF;
  --ink: #0F1F17;
  --muted: #5B6B62;
  --line: #D9E1DA;

  --green: #1C6B47;  --green-deep: #134D33;  --green-tint: #E1F0E7;  --green-line: #B5D9C5;
  --orange: #E0702C; --orange-deep: #B5531A; --orange-tint: #FCEBDE; --orange-line: #F4C7A4;

  --ok-ink: #14603F;  --ok-bg: #DFF2E7;  --ok-line: #AEDAC3;
  --warn-ink: #7A5000; --warn-bg: #FFF1CC; --warn-line: #EFD48A;
  --bad-ink: #A3291E;  --bad-bg: #FBE3DF; --bad-line: #F0ACA3;

  --radius: 12px;
  --radius-pill: 999px;
  --font-body: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Bricolage Grotesque", "Figtree", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); line-height: 1.55; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-deep); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- layout ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line);
}
.wordmark { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.mark { width: 26px; height: 26px; }
.topbar nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.topbar nav a:not(.button), .topbar nav .linklike { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.topbar nav a:not(.button):hover, .topbar nav .linklike:hover { color: var(--ink); }
.topbar form { margin: 0; display: inline; }
.linklike { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

main { margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
main.wide { max-width: 84rem; }
main.narrow { max-width: 46rem; }
.footer { max-width: 84rem; margin: 0 auto; padding: 2rem 1.5rem 3rem; display: flex; flex-direction: column; gap: 0.25rem; border-top: 1px solid var(--line); font-size: 0.92rem; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; margin: 0 0 0.6rem; }
h1 { font-size: clamp(1.85rem, 1.4rem + 1.8vw, 2.6rem); }
h2 { font-size: 1.3rem; margin-top: 2.25rem; }
h3 { font-size: 1.1rem; }
section > h2:first-child, .card > h2:first-child, .note > h2:first-child { margin-top: 0; }
p { margin: 0 0 0.9rem; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 40rem; margin-bottom: 1.5rem; }
.meta, .quiet { color: var(--muted); }
.quiet { font-size: 0.92rem; }
.org { color: var(--muted); margin-bottom: 0.2rem; }
.crumb { font-size: 0.92rem; color: var(--muted); margin-bottom: 0.4rem; }
.crumb a { color: var(--muted); }
.eyebrow { font-weight: 600; font-size: 0.9rem; margin: 0 0 0.5rem; }
.eyebrow-green { color: var(--green); }
.eyebrow-orange { color: var(--orange-deep); }
.empty { color: var(--muted); padding: 1.5rem; border: 1px dashed var(--line); border-radius: var(--radius); }
.banner { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 0.65rem 1rem; }

/* ---------- hero and cards ---------- */
.hero { padding: 1.5rem 0 2.5rem; max-width: 46rem; }
.hero h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem); margin-bottom: 1rem; }
.hero .lede { font-size: 1.2rem; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem; margin: 1rem 0 2rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.6rem; }
.card-accent { background: var(--orange-tint); border-color: var(--orange-line); }
.card-accent a { color: var(--orange-deep); }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.4rem; margin: 0 0 1.5rem; }
.note p:last-child { margin-bottom: 0; }

/* The one loud element on a posting: the candidate's promise block. Reused for readiness states. */
.expect { background: var(--orange-tint); border: 1px solid var(--orange-line); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1.25rem 0 1.75rem; }
.expect h2 { margin-top: 0; color: var(--orange-deep); }
.expect dl { margin: 0; display: grid; grid-template-columns: 11rem 1fr; gap: 0.55rem 1rem; }
.expect dt { color: var(--orange-deep); font-weight: 600; }
.expect dd { margin: 0; }
.expect ul { margin: 0; padding-left: 1.2rem; }
.expect p:last-child { margin-bottom: 0; }
.expect-ok   { background: var(--ok-bg);   border-color: var(--ok-line); }   .expect-ok h2, .expect-ok dt   { color: var(--ok-ink); }
.expect-warn { background: var(--warn-bg); border-color: var(--warn-line); } .expect-warn h2, .expect-warn dt { color: var(--warn-ink); }
.expect-bad  { background: var(--bad-bg);  border-color: var(--bad-line); }  .expect-bad h2, .expect-bad dt  { color: var(--bad-ink); }
@media (max-width: 520px) { .expect dl { grid-template-columns: 1fr; gap: 0.1rem 0; } .expect dd { margin-bottom: 0.6rem; } }

.description { margin-bottom: 2rem; }
.description p { max-width: 38rem; }
.alert { background: var(--bad-bg); border: 1px solid var(--bad-line); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.alert h2 { margin-top: 0; color: var(--bad-ink); }
.alert ul { margin: 0; padding-left: 1.2rem; }

/* ---------- lists and tables ---------- */
.joblist { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.joblist li { padding: 1rem 1.25rem; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap; border-top: 1px solid var(--line); }
.joblist li:first-child { border-top: 0; }
.joblist li a { font-weight: 600; font-size: 1.05rem; }
.joblist .pay { color: var(--green-deep); font-weight: 600; white-space: nowrap; }

.ledger { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ledger th, .ledger td { text-align: left; padding: 0.8rem 1rem; vertical-align: top; border-top: 1px solid var(--line); }
.ledger thead th { border-top: 0; color: var(--muted); font-weight: 500; font-size: 0.9rem; background: var(--bg); }
.ledger td a { font-weight: 600; }
.row-between { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.row-between h1, .row-between h2, .row-between h3 { margin-top: 0; }

/* ---------- status ---------- */
.pill { display: inline-block; font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: var(--radius-pill); vertical-align: middle; letter-spacing: 0; }
.pill-draft { background: var(--line); color: var(--muted); }
.pill-open { background: var(--ok-bg); color: var(--ok-ink); }
.pill-closed { background: var(--bad-bg); color: var(--bad-ink); }
.state-ok { color: var(--ok-ink); font-weight: 500; }
.state-warn { color: var(--warn-ink); font-weight: 500; }
.state-bad { color: var(--bad-ink); font-weight: 600; }
p.state-warn, p.state-bad, p.state-ok { padding: 0.75rem 1rem; border-radius: var(--radius); border: 1px solid; font-weight: 400; }
p.state-ok { background: var(--ok-bg); border-color: var(--ok-line); }
p.state-warn { background: var(--warn-bg); border-color: var(--warn-line); }
p.state-bad { background: var(--bad-bg); border-color: var(--bad-line); }

/* ---------- forms ---------- */
.stack { display: flex; flex-direction: column; gap: 1rem; }
form.card { gap: 1rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1.1rem 1.4rem 1.4rem; margin: 0; display: flex; flex-direction: column; gap: 0.9rem; }
legend { font-family: var(--font-head); font-weight: 700; padding: 0 0.4rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field.check label { display: flex; align-items: center; gap: 0.5rem; }
.field.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--green); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.9rem; }
.helptext { color: var(--muted); font-size: 0.88rem; margin-bottom: 0.35rem; }
input[type="text"], input[type="email"], input[type="number"], input[type="password"], input[type="date"], input[type="tel"], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
input[type="file"] { font: inherit; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: 2px solid var(--green-line); outline-offset: 0; }
.errorlist { list-style: none; margin: 0 0 0.3rem; padding: 0; color: var(--bad-ink); font-size: 0.92rem; }
.actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin: 0; }
.actions form { margin: 0; }
.button, .button-quiet {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  padding: 0.65rem 1.25rem; border-radius: var(--radius-pill); border: 1px solid transparent; line-height: 1.2;
}
.button { background: var(--green); color: #fff; }
.button:hover { background: var(--green-deep); color: #fff; }
.button-accent { background: var(--orange); color: #fff; }
.button-accent:hover { background: var(--orange-deep); color: #fff; }
.button-small { padding: 0.45rem 0.95rem; font-size: 0.92rem; }
.button-quiet { background: var(--surface); color: var(--ink); border-color: var(--line); }
.button-quiet:hover { border-color: var(--muted); }

/* ---------- messages ---------- */
.messages { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.messages li { padding: 0.65rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); margin-bottom: 0.5rem; }
.messages li.success { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.messages li.error { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad-ink); }

/* ---------- fit check (candidate side) ---------- */
.fitq { padding: 0.8rem 0; border-top: 1px solid var(--line); }
.fitq:last-of-type { border-bottom: 1px solid var(--line); }
.fitq-text { font-weight: 600; margin-bottom: 0.35rem; }
.fitq-text .quiet { font-weight: 400; margin-left: 0.35rem; }
.choices > div { display: flex; gap: 1.25rem; }
.choices label { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 400; }
.choices input[type="radio"] { accent-color: var(--orange); width: 1.05rem; height: 1.05rem; }

/* ---------- matches (candidate profile) ---------- */
.matchlist { display: flex; flex-direction: column; gap: 1rem; }
.match h3 { margin-bottom: 0.2rem; }
.fitpill { display: inline-block; font-size: 0.85rem; font-weight: 600; padding: 0.3rem 0.75rem; border-radius: var(--radius-pill); white-space: nowrap; }
.fit-strong { background: var(--ok-bg); color: var(--ok-ink); }
.fit-partial { background: var(--warn-bg); color: var(--warn-ink); }
.fit-unknown { background: var(--line); color: var(--muted); }
.reads { list-style: none; padding: 0; margin: 0.5rem 0 1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.verdict { display: inline-block; min-width: 7.5rem; font-size: 0.85rem; font-weight: 600; }
.verdict-met { color: var(--ok-ink); }
.verdict-not_met { color: var(--bad-ink); }
.verdict-unknown { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- job search ---------- */
.searchbar { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin: 0 0 1.25rem; }
.searchbar input[type="text"] { flex: 1 1 14rem; width: auto; }
.check-inline { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; white-space: nowrap; }
.check-inline input { accent-color: var(--green); }
.pager { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }

/* ---------- front page and employers page ---------- */
.hero-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 3rem; align-items: start; max-width: none; padding-bottom: 3rem; }
@media (max-width: 760px) { .hero-split { grid-template-columns: 1fr; gap: 1.5rem; } }
.hero-form { margin-top: 1.5rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0.5rem 0 0; display: flex; flex-direction: column; gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding-left: 3.25rem; min-height: 2.5rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; background: var(--orange-tint); color: var(--orange-deep); }
.steps-green li::before { background: var(--green-tint); color: var(--green-deep); }
.footnote { margin-top: 2.5rem; }
.jobgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.jobcard { display: flex; flex-direction: column; gap: 0.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; text-decoration: none; color: var(--ink); }
.jobcard:hover { border-color: var(--green); color: var(--ink); }
.jobcard-title { font-weight: 600; font-size: 1.05rem; }
.jobcard .pay { margin-top: 0.4rem; }

/* ---------- job rows (search page) ---------- */
.jobrows li.jobrow { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: center; }
@media (max-width: 760px) { .jobrows li.jobrow { grid-template-columns: 1fr; gap: 0.2rem; } }

/* ---------- profile: sidebar + grid ---------- */
.profile-layout { display: grid; grid-template-columns: 20rem minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 900px) { .profile-layout { grid-template-columns: 1fr; } }
.profile-side { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.profile-side h1 { font-size: 1.5rem; }
.profile-side .card { padding: 1.1rem 1.25rem; }
.profile-side .card h2 { font-size: 1.05rem; }
.profile-main > .row-between { align-items: baseline; margin-bottom: 0.75rem; }
.profile-main .row-between h2 { margin-top: 0; }
.matchgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr)); gap: 1rem; }
.match { padding: 1.1rem 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; }
.match h3 { margin: 0; font-size: 1.05rem; }
.match p { margin: 0; }
.match-line { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; font-size: 0.92rem; }
.match details { margin-top: 0.25rem; }
.match summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.match .reads { margin: 0.5rem 0 0.25rem; }
.match .actions { margin-top: 0.5rem; }

/* ---------- company logos ---------- */
.logo { border-radius: 8px; flex: 0 0 auto; object-fit: contain; background: var(--surface); border: 1px solid var(--line); }
.logo-initials { display: inline-grid; place-items: center; width: var(--size); height: var(--size); font-family: var(--font-head); font-weight: 700; font-size: calc(var(--size) * 0.4); color: hsl(var(--hue) 35% 28%); background: hsl(var(--hue) 45% 92%); border-color: hsl(var(--hue) 35% 82%); }
.orgline { display: flex; align-items: center; gap: 0.6rem; }
.jobcard-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.jobrow-main { display: flex; align-items: center; gap: 0.75rem; }
.match-head { display: flex; align-items: flex-start; gap: 0.75rem; }
.match-head h3 { margin-bottom: 0.15rem; }

/* ---------- résumé drop zone ---------- */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.35rem; text-align: center; padding: 1.75rem 1.25rem; border: 2px dashed var(--orange-line); border-radius: var(--radius); background: var(--orange-tint); color: var(--ink); cursor: pointer; transition: border-color 120ms, background 120ms; }
.dropzone:hover, .dropzone.is-drag { border-color: var(--orange); background: #FBE2CF; }
.dropzone:focus-within { outline: 2px solid var(--orange); outline-offset: 2px; }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.dropzone-icon { width: 2rem; height: 2rem; color: var(--orange-deep); }
.dropzone-text { font-size: 1rem; }
.dropzone-hint { font-size: 0.85rem; color: var(--muted); }
.dropzone-file { font-size: 0.9rem; font-weight: 600; color: var(--orange-deep); }
.dropzone.has-file { border-style: solid; border-color: var(--orange); }
.dropzone.is-busy { border-style: solid; border-color: var(--orange); opacity: 0.85; cursor: progress; }
