@font-face { font-family: "FK Display"; src: url(/static/fk-display.otf) format("opentype"); font-display: swap; }
@font-face { font-family: "FK Grotesk"; src: url(/static/fk-grotesk.otf) format("opentype"); font-display: swap; }

:root {
  --blue: #0033a1; --blue-hover: #002a85; --blue-soft: #e8eefb;
  --orange: #ff921a; --orange-soft: #fff1e0;
  --bg: #ffffff; --surface: #ffffff; --side: #f6f4ef; --card: #faf9f6; --ink: #14171f; --muted: #626a79;
  --line: #e6e3db; --panel: #2a2523; --panel-ink: #f4f1ea;
  --ok: #17803d; --ok-soft: #e4f4ea; --warn: #a15c00; --warn-soft: #fdf0d8; --bad: #b3261e; --bad-soft: #fbe6e4;
  --radius: 14px; --pill: 999px;
  --font-ui: "FK Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "FK Display", "FK Grotesk", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --blue: #6f95ff; --blue-hover: #8aa9ff; --blue-soft: #1a2747; --orange-soft: #3a2810;
    --bg: #12141a; --surface: #181b23; --side: #1b1e27; --card: #1d212b; --ink: #eef0f5; --muted: #9aa2b2; --line: #2b303c;
    --ok: #4cc27b; --ok-soft: #14301f; --warn: #f0b24a; --warn-soft: #3a2c10; --bad: #ff8179; --bad-soft: #3a1a18;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font-ui); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); } h2 { font-size: 1.5rem; } h3 { font-size: 1.1rem; }
a { color: var(--blue); } p { margin: 0 0 1em; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 620px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .5em; border: 1px solid transparent; background: var(--blue); color: #fff;
  font: inherit; font-weight: 600; padding: .7em 1.4em; border-radius: var(--pill); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--blue-hover); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--card); }
.btn.dark { background: var(--panel); color: var(--panel-ink); }
.btn.small { padding: .4em 1em; font-size: .875rem; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--line); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* forms */
label { display: block; font-weight: 600; margin: 0 0 .35em; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .65em .8em; }
textarea { min-height: 7em; resize: vertical; }
.field { margin-bottom: 1.1rem; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.choice { display: flex; gap: .6rem; flex-wrap: wrap; }
.choice label { display: inline-flex; align-items: center; gap: .5em; font-weight: 500; border: 1px solid var(--line); border-radius: var(--pill);
  padding: .55em 1.1em; cursor: pointer; margin: 0; background: var(--surface); }
.choice input { accent-color: var(--blue); }
.choice label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.error { background: var(--bad-soft); color: var(--bad); padding: .7em 1em; border-radius: 10px; margin-bottom: 1rem; }

/* public */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.topbar img { height: 40px; display: block; }
.hero { padding: 40px 0 28px; }
.hero p.lead { font-size: 1.25rem; max-width: 34em; color: var(--muted); }
.hero .accent { color: var(--blue); }
.jobgrid { display: grid; gap: 14px; margin: 24px 0 60px; }
.jobcard { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; }
.jobcard:hover { border-color: var(--blue); }
.jobcard h3 { margin: 0 0 .2em; font-size: 1.3rem; }
.tags { display: flex; gap: .5rem; flex-wrap: wrap; }
.tag { background: var(--surface); border: 1px solid var(--line); border-radius: var(--pill); padding: .15em .8em; font-size: .85rem; color: var(--muted); }
.desc { white-space: pre-wrap; }
.steps { display: flex; gap: 6px; margin: 0 0 28px; }
.steps span { flex: 1; height: 6px; border-radius: 6px; background: var(--line); }
.steps span.on { background: var(--blue); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.qcard { min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: .875rem; margin-top: 40px; }

/* admin shell */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line); padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand img { height: 28px; display: block; margin: 4px 8px 22px; }
.side nav a { display: flex; align-items: center; gap: .6em; padding: .5em .7em; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.side nav a:hover { background: rgba(0,0,0,.05); }
.side nav a.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.side h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 8px 6px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; }
.dot.open { background: var(--ok); } .dot.draft { background: var(--orange); }
.main { padding: 0 28px 60px; min-width: 0; }
.mtop { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.mtop .spacer { flex: 1; }
.iconbtn { border: 1px solid var(--line); background: var(--surface); width: 36px; height: 36px; border-radius: 9px; display: inline-grid; place-items: center;
  color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; }
.iconbtn[aria-disabled=true] { opacity: .35; pointer-events: none; }
.grid { display: grid; gap: 14px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 28px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font: 600 2rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .7em .6em; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; border-radius: var(--pill); padding: .15em .75em; font-size: .8rem; font-weight: 600; background: var(--blue-soft); color: var(--blue); }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.mute { background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.avatar { width: 64px; height: 64px; border-radius: 16px; background: var(--orange); color: #14171f; display: grid; place-items: center;
  font: 700 1.4rem var(--font-display); flex: none; }
.avatar.sm { width: 34px; height: 34px; border-radius: 10px; font-size: .9rem; }
.cand-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.cand-head h1 { font-size: 2rem; margin: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.section { margin: 28px 0; }
.section > h3 { margin-bottom: .6em; }
.row { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; }
.stagebar { display: flex; flex-wrap: wrap; gap: 6px; }
.stagebar button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; padding: .4em 1em; border-radius: var(--pill); cursor: pointer; }
.stagebar button.cur { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.panel { background: var(--panel); color: var(--panel-ink); border-radius: var(--radius); padding: 20px; position: sticky; top: 16px; }
.panel h3 { color: var(--panel-ink); }
.panel textarea, .panel select { background: #1e1a19; color: var(--panel-ink); border-color: #4a4240; }
.panel .muted { color: #b9b1a6; }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.stars input { position: absolute; opacity: 0; }
.stars label { font-size: 1.8rem; color: #6b625c; cursor: pointer; margin: 0; line-height: 1; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: var(--orange); }
.stars input:focus-visible + label { outline: 3px solid var(--orange); }
.star-static { color: var(--orange); letter-spacing: 2px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.lane { background: var(--side); border-radius: var(--radius); padding: 12px; min-height: 160px; }
.lane h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: flex; justify-content: space-between; font-family: var(--font-ui); }
.pcard { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; text-decoration: none; color: inherit; }
.pcard:hover { border-color: var(--blue); }
.check { display: flex; gap: 10px; align-items: center; }
.check button { border: 2px solid var(--line); background: var(--surface); width: 24px; height: 24px; border-radius: 7px; cursor: pointer; color: #fff; font-weight: 700; line-height: 1; }
.check button.done { background: var(--ok); border-color: var(--ok); }
.bar { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--blue); }
.inline { display: inline; }
.inline-form { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .main { padding: 0 16px 40px; }
  .cols { grid-template-columns: 1fr; }
  .panel { position: static; }
}

fieldset { min-width: 0; margin: 0 0 14px; }
