/* C2C Portal stylesheet. One file, no build step.
   Palette: blackboard green, chalk white, marigold. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque.ada540c0e24a.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk.c501f578bf3f.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --board: #0e4b43;
  --board-deep: #08332d;
  --marigold: #f2b01e;
  --marigold-deep: #c98a00;
  --paper: #f5f8f6;
  --surface: #ffffff;
  --ink: #14211e;
  --muted: #55655f;
  --line: #d6dfda;
  --line-soft: #e7ede9;
  --good: #1a7a55;
  --good-bg: #e2f3ea;
  --info: #23597d;
  --info-bg: #e3eef6;
  --bad: #b3382a;
  --bad-bg: #fbe9e6;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 10px;
  --radius-small: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: var(--board); text-underline-offset: 3px; }
a:hover { color: var(--board-deep); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); font-weight: 700; }
h2 { font-size: 1.45rem; font-weight: 650; }
h3 { font-size: 1.1rem; font-weight: 650; }
h4 { font-size: 0.95rem; font-weight: 650; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; border-radius: 3px; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(640px, 100% - 2.5rem); margin-inline: auto; }
.page { padding: 2.2rem 0 4rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stack > * + * { margin-top: 1.25rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.row-between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.pre-line { white-space: pre-line; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; flex-wrap: wrap; }
.brand {
  font-family: var(--display); font-weight: 750; font-size: 1.3rem; color: var(--ink);
  text-decoration: none; display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.6rem 0;
}
.brand::before {
  content: ""; width: 0.95rem; height: 0.95rem; background: var(--marigold);
  border-radius: 3px; transform: rotate(8deg); box-shadow: 4px 4px 0 var(--board);
}
.site-header .nav-toggle { display: none; margin-left: auto; }
.nav { display: flex; align-items: center; gap: 0.25rem; flex: 1; flex-wrap: wrap; }
.nav a:not(.btn), .nav .link-button {
  color: var(--ink); text-decoration: none; padding: 0.45rem 0.7rem; border-radius: var(--radius-small);
  font-weight: 550; font-size: 0.95rem;
}
.nav a:not(.btn):hover, .nav .link-button:hover { background: var(--paper); }
.nav a.is-active:not(.btn), .nav a.is-active:not(.btn):hover { background: var(--board); color: #fff; }
.nav .push { margin-left: auto; }
.nav form { margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font: inherit; font-weight: 650; line-height: 1.2; cursor: pointer; text-decoration: none;
  padding: 0.68rem 1.15rem; border-radius: var(--radius-small); border: 2px solid transparent;
  background: var(--board); color: #fff;
}
.btn:hover { background: var(--board-deep); color: #fff; }
.btn-primary { background: var(--marigold); color: var(--ink); }
.btn-primary:hover { background: #ffc233; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--board); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); border-color: var(--board); color: var(--board); }
.btn-danger { background: transparent; color: var(--bad); border-color: #e6bdb6; }
.btn-danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn-small { padding: 0.38rem 0.7rem; font-size: 0.875rem; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--board); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.nav .link-button { text-decoration: none; }
.inline-form { display: inline; margin: 0; }

/* ---------- Forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.field { margin: 0 0 1.15rem; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 650; margin-bottom: 0.35rem; padding: 0; }
.optional { font-weight: 400; color: var(--muted); font-size: 0.85rem; margin-left: 0.3rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"],
input[type="date"], input[type="search"], input[type="tel"], input[type="file"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid #b9c6c0; border-radius: var(--radius-small); padding: 0.6rem 0.7rem;
}
textarea { resize: vertical; min-height: 6rem; }
input:focus, select:focus, textarea:focus { border-color: var(--board); outline: 3px solid rgba(242, 176, 30, 0.55); outline-offset: 0; }
.help { color: var(--muted); font-size: 0.875rem; margin: 0.35rem 0 0; }
.error, .errorlist { color: var(--bad); font-size: 0.9rem; font-weight: 600; margin: 0.35rem 0 0; padding: 0; list-style: none; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--bad); }
.field-check label { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 550; }
.field-check input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; accent-color: var(--board); flex: none; }
.choice-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice { display: inline-flex; align-items: center; gap: 0.45rem; border: 1.5px solid #b9c6c0; border-radius: 999px; padding: 0.4rem 0.9rem; background: #fff; cursor: pointer; font-weight: 550; }
.choice input { accent-color: var(--board); }
.choice:has(input:checked) { border-color: var(--board); background: var(--good-bg); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 0.5rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
fieldset.group { border: 0; border-top: 1px solid var(--line); padding: 1.4rem 0 0.2rem; margin: 1.4rem 0 0; }
fieldset.group > legend { font-family: var(--display); font-weight: 650; font-size: 1.1rem; padding: 0 0.6rem 0 0; }

/* skill picker */
.skill-picker .skill-filter { max-width: 22rem; margin-bottom: 0.9rem; }
.skill-groups { max-height: 22rem; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-small); padding: 0.9rem 1rem; background: var(--paper); }
.skill-group + .skill-group { margin-top: 0.9rem; }
.skill-group h4 { color: var(--muted); margin-bottom: 0.4rem; }
.chip-check { display: inline-flex; cursor: pointer; position: relative; }
.chip-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-check span { border: 1.5px solid #b9c6c0; background: #fff; border-radius: 999px; padding: 0.22rem 0.75rem; font-size: 0.9rem; font-weight: 550; }
.chip-check input:checked + span { background: var(--board); border-color: var(--board); color: #fff; }
.chip-check input:focus-visible + span { outline: 3px solid var(--marigold); outline-offset: 2px; }
.chip-check[hidden], .skill-group[hidden] { display: none; }

/* ---------- Messages ---------- */
.flash { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.flash li, .alert { border-radius: var(--radius-small); padding: 0.75rem 1rem; border-left: 5px solid var(--info); background: var(--info-bg); font-weight: 550; }
.flash .success { border-color: var(--good); background: var(--good-bg); }
.flash .error, .alert-bad { border-color: var(--bad); background: var(--bad-bg); color: var(--ink); font-size: 1rem; }
.alert-warn { border-color: var(--marigold-deep); background: #fdf3d7; }
.alert p:last-child { margin-bottom: 0; }

.alert-demo {
  border-left: 5px solid var(--board);
  background: var(--good-bg);
  border-radius: var(--radius-small);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(14, 75, 67, 0.08);
}
.alert-demo-title {
  font-weight: 700;
  color: var(--board);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.alert-demo-text {
  font-size: 0.93rem;
  color: var(--ink);
  margin-bottom: 0.75rem;
  line-height: 1.45;
}
.alert-demo-code-wrapper {
  margin: 0.5rem 0;
}
.alert-demo-code {
  display: inline-block;
  background: #ffffff;
  color: var(--board);
  font-family: monospace;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-small);
  border: 2px dashed var(--board);
}
.alert-demo-hint {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 0.65rem;
  line-height: 1.4;
}

/* ---------- Hero ---------- */
.hero { background: var(--board); color: #fff; padding: 3.2rem 0 3.6rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem; align-items: start; }
.hero h1 { font-size: clamp(2.1rem, 1.2rem + 3.6vw, 3.7rem); font-weight: 750; line-height: 1.02; letter-spacing: -0.025em; margin-bottom: 1rem; max-width: 14ch; }
.hero .lead { color: #cfe2dc; }
.search-bar { display: grid; grid-template-columns: 1.2fr 0.85fr 1.15fr auto; gap: 0.5rem; background: var(--board-deep); padding: 0.6rem; border-radius: var(--radius); margin-top: 1.6rem; }
.search-bar input, .search-bar select, .search-bar .pincode-input { border-color: transparent; height: 100%; border-radius: var(--radius-small); font-size: 0.95rem; }
.search-bar select { cursor: pointer; color: var(--ink); background-color: #fff; }

/* ---------- Searchable PIN code dropdown ---------- */
.pincode-picker { position: relative; width: 100%; }
.search-bar .pincode-picker { height: 100%; }
/* The search bar sits above the lines after it so its dropdown is never covered. */
.search-bar { position: relative; z-index: 3; }
.pincode-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: min(290px, calc(100vw - 2rem));
  background: #ffffff;
  color: var(--ink);
  border: 1.5px solid #b9c6c0;
  border-radius: var(--radius-small);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  max-height: 290px;
  overflow-y: auto;
  z-index: 1000;
  text-align: left;
}
.pincode-group-header {
  padding: 0.45rem 0.75rem 0.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: #f7faf8;
  border-top: 1px solid #edf2ef;
}
.pincode-group-header:first-child { border-top: none; }
.pincode-option {
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--ink);
  border-bottom: 1px solid #f2f5f3;
  line-height: 1.3;
}
.pincode-option:last-child { border-bottom: none; }
.pincode-option:hover, .pincode-option.is-active {
  background: #eef7f3;
  color: var(--board);
}
.pincode-option strong {
  font-family: monospace;
  font-size: 0.95rem;
  color: var(--board);
  flex-shrink: 0;
}
.pincode-option .pincode-desc {
  flex-grow: 1;
}
.pincode-empty-state {
  padding: 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
.hero-links { margin-top: 1.4rem; color: #cfe2dc; }
.hero-links a { color: #fff; font-weight: 600; }
.board-title { font-family: var(--display); font-weight: 600; color: var(--marigold); margin: 0 0 0.9rem; font-size: 1.05rem; }
.slips { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.slip { background: #fffdf5; color: var(--ink); border-radius: 4px; padding: 0.8rem 1rem 0.85rem 1.25rem; position: relative; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18); }
.slip::before { content: ""; position: absolute; left: 0.5rem; top: 0.95rem; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--marigold); }
.slip:nth-child(odd) { transform: rotate(-0.8deg); }
.slip:nth-child(even) { transform: rotate(0.6deg); margin-left: 0.8rem; }
.slip a { color: var(--ink); font-weight: 700; text-decoration: none; font-family: var(--display); }
.slip a:hover { text-decoration: underline; }
.slip p { margin: 0.1rem 0 0; font-size: 0.9rem; color: var(--muted); }

.section { padding: 3rem 0 0; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.steps li { counter-increment: step; border-top: 3px solid var(--board); padding-top: 0.9rem; }
.steps li::before { content: counter(step); font-family: var(--display); font-weight: 750; font-size: 1.6rem; color: var(--marigold-deep); display: block; line-height: 1; margin-bottom: 0.4rem; }
.steps p { color: var(--muted); margin: 0; }
.audience { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.audience article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; display: flex; flex-direction: column; }
.audience article:first-child { background: var(--board); color: #fff; border-color: var(--board); }
.audience article:first-child p { color: #cfe2dc; }
.audience p { color: var(--muted); flex: 1; }

/* ---------- Panels, stats, tables ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.panel-flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; align-items: baseline; margin-bottom: 0.9rem; }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel-flush .panel-head { padding: 1.2rem 1.4rem 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { padding: 1.1rem 1.3rem; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); margin: 0 -1px -1px 0; }
.stat dt { color: var(--muted); font-size: 0.9rem; }
.stat dd { margin: 0.1rem 0 0; font-family: var(--display); font-weight: 700; font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats-wrap { margin: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.75rem; align-items: start; }
.split-left { grid-template-columns: 280px minmax(0, 1fr); }
.table-scroll { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th { text-align: left; font-weight: 650; color: var(--muted); font-size: 0.85rem; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--paper); }
.table td { padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.empty { text-align: center; padding: 2.5rem 1.5rem; color: var(--muted); }
.empty h3 { color: var(--ink); }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 0.7rem 0; border-bottom: 1px solid var(--line-soft); }
.plain-list li:last-child { border-bottom: 0; }

/* ---------- Pills and chips ---------- */
.pill { display: inline-block; font-size: 0.8rem; font-weight: 650; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--line-soft); color: var(--muted); white-space: nowrap; }
.pill-strong { background: var(--good-bg); color: var(--good); }
.pill-good { background: #eef6d9; color: #55700c; }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.pill-mark { background: var(--marigold); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.chip { font-size: 0.82rem; font-weight: 550; padding: 0.14rem 0.6rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.chip-have { border-color: #9fd3bb; background: var(--good-bg); color: #0e5a3d; }
.chip-miss { border-style: dashed; color: var(--muted); background: transparent; }
.chip-verified { border-color: var(--marigold-deep); background: #fdf3d7; color: #6b4a00; font-weight: 650; }
.chip-verified::before { content: "✓ "; }

/* ---------- Job rows ---------- */
.job-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.job-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line-soft); align-items: start; }
.job-row:last-child { border-bottom: 0; }
.tile { width: 2.9rem; height: 2.9rem; border-radius: 8px; background: var(--board); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 1rem; flex: none; }
.tile-light { background: var(--line-soft); color: var(--board); }
.tile-large { width: 4rem; height: 4rem; font-size: 1.35rem; }
.job-row h3 { margin: 0; font-size: 1.12rem; }
.job-row h3 a { color: var(--ink); text-decoration: none; }
.job-row h3 a:hover { text-decoration: underline; }
.meta { display: flex; flex-wrap: wrap; gap: 0.15rem 0.9rem; color: var(--muted); font-size: 0.92rem; margin: 0.15rem 0 0.55rem; padding: 0; list-style: none; }
.meta strong { color: var(--ink); font-weight: 600; }
.job-side { text-align: right; display: grid; gap: 0.4rem; justify-items: end; }

/* match ring: an SVG donut whose arc length is the score */
.ring { position: relative; width: 3.6rem; height: 3.6rem; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.ring circle { fill: none; stroke-width: 3.6; }
.ring .ring-track { stroke: var(--line-soft); }
.ring .ring-arc { stroke: var(--muted); stroke-linecap: round; }
.ring-strong .ring-arc { stroke: var(--good); }
.ring-good .ring-arc { stroke: var(--marigold-deep); }
.ring-partial .ring-arc { stroke: #9aa8a2; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 0.98rem; font-variant-numeric: tabular-nums; }
.ring-large { width: 6rem; height: 6rem; }
.ring-large b { font-size: 1.6rem; }
.match-box { display: flex; gap: 1rem; align-items: center; }

/* ---------- Filters and pagination ---------- */
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.filters .field { margin-bottom: 0.9rem; }
.pagination { display: flex; gap: 0.6rem; align-items: center; justify-content: center; margin-top: 1.5rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; margin-bottom: 1rem; }
.toolbar .field { margin: 0; }
.toolbar input, .toolbar select { min-width: 11rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 1rem; }
.tabs a { text-decoration: none; padding: 0.35rem 0.8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.tabs a.is-active { background: var(--board); border-color: var(--board); color: #fff; }

/* ---------- Detail pages ---------- */
.detail-head { display: flex; gap: 1.1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.detail-head h1 { margin-bottom: 0.2rem; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); }
.prose { max-width: 70ch; }
.prose p { margin-bottom: 0.9em; }
.keyfacts { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; margin: 0; }
.keyfacts dt { color: var(--muted); }
.keyfacts dd { margin: 0; font-weight: 600; }

progress { width: 100%; height: 0.7rem; border: 0; border-radius: 999px; overflow: hidden; background: var(--line-soft); accent-color: var(--board); }
progress::-webkit-progress-bar { background: var(--line-soft); }
progress::-webkit-progress-value { background: var(--board); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--board); }

.role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.role-card { display: block; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 1.3rem; text-decoration: none; color: var(--ink); }
.role-card:hover { border-color: var(--board); color: var(--ink); }
.role-card h2 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.role-card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* quiz */
.quiz-bar { position: sticky; top: 0; z-index: 5; background: var(--board); color: #fff; padding: 0.7rem 1.1rem; border-radius: var(--radius-small); display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1.2rem; }
.quiz-bar .timer { font-family: var(--display); font-weight: 700; font-size: 1.3rem; font-variant-numeric: tabular-nums; color: var(--marigold); }
.question { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin: 0 0 1rem; }
.question legend { font-weight: 650; padding: 0 0.4rem; }
.question label { display: flex; gap: 0.6rem; padding: 0.5rem 0.6rem; border-radius: var(--radius-small); cursor: pointer; }
.question label:hover { background: var(--paper); }
.question input { accent-color: var(--board); margin-top: 0.3rem; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.badge-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; display: flex; flex-direction: column; gap: 0.5rem; }
.badge-card.is-earned { border: 2px solid var(--marigold-deep); background: #fffaf0; }
.badge-card p { margin: 0; color: var(--muted); flex: 1; }
.result-score { font-family: var(--display); font-size: 4rem; font-weight: 750; line-height: 1; }

/* resume preview */
.sheet { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 2rem; box-shadow: 0 10px 0 var(--line-soft); }
.sheet h2 { font-size: 1.7rem; margin-bottom: 0.1rem; }
.sheet h3 { color: var(--board); border-bottom: 1.5px solid var(--board); padding-bottom: 0.2rem; margin: 1.2rem 0 0.5rem; font-size: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--board-deep); color: #cfe2dc; padding: 2rem 0; margin-top: 3rem; font-size: 0.92rem; }
.site-footer a { color: #fff; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; }
.site-footer nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .hero-grid, .split, .split-left, .steps, .audience, .role-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 2.2rem 0 2.6rem; }
  .search-bar { grid-template-columns: minmax(0, 1fr); }
  .pincode-menu { max-height: min(290px, 50vh); overscroll-behavior: contain; }
  .pincode-option { padding: 0.75rem 0.85rem; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .site-header .nav-toggle { display: inline-flex; }
  .nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; padding-bottom: 0.8rem; }
  .nav.is-open { display: flex; }
  .nav .push { margin-left: 0; }
  .job-row { grid-template-columns: auto minmax(0, 1fr); }
  .job-side { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; text-align: left; }
  .slip:nth-child(even) { margin-left: 0; }
  .detail-head { flex-wrap: wrap; }
}
/* ---- Landing page scroll animation -------------------------------------
   Driven by static/js/app.js. Uses the individual `translate`/`scale`/`rotate`
   properties so it never overrides the slips' own tilt (`transform`). */
.scroll-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 50; pointer-events: none;
  background: linear-gradient(90deg, var(--marigold), var(--marigold-deep));
  transform: scaleX(0); transform-origin: 0 50%;
}
.site-header { position: relative; z-index: 20; transition: box-shadow 0.25s ease; }
.site-header.is-scrolled { box-shadow: 0 6px 18px rgba(8, 51, 45, 0.08); }

/* Hero: a dotted "pinboard" layer that drifts with scroll */
.hero { position: relative; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1.2px, transparent 1.4px);
  background-size: 22px 22px;
  background-position: 0 var(--hero-shift, 0px);
}
.hero-copy, [data-parallax] { will-change: transform; }
/* Keep the PIN dropdown above the board column and the sections below the hero,
   which get their own layers from the scroll effects. */
.hero { z-index: 2; }
.hero-copy { position: relative; z-index: 2; }

/* Shared reveal base */
.js-reveal [data-reveal] {
  opacity: 0; translate: 0 22px;
  transition: opacity 0.7s ease, translate 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
    scale 0.6s cubic-bezier(0.3, 1.5, 0.5, 1), rotate 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.js-reveal [data-reveal].is-visible { opacity: 1; translate: 0 0; scale: 1; rotate: 0deg; }

/* drop: job slips fall onto the board, then their pin pops */
.js-reveal [data-reveal="drop"] { translate: 0 -26px; scale: 1.04; }
.js-reveal [data-reveal="drop"]::before { scale: 0; transition: scale 0.4s cubic-bezier(0.3, 1.8, 0.5, 1); transition-delay: calc(var(--reveal-delay, 0ms) + 420ms); }
.js-reveal [data-reveal="drop"].is-visible::before { scale: 1; }

/* section titles: a marigold rule draws in under the heading */
.section-title { position: relative; padding-bottom: 0.45rem; }
.section-title::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 3.5rem; height: 3px; border-radius: 2px;
  background: var(--marigold);
}
.js-reveal .section-title::after { transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s; }
.js-reveal .section-title.is-visible::after { transform: scaleX(1); }

/* step: the top rule draws across, then the number pops */
.steps li { position: relative; }
.js-reveal [data-reveal="step"] { border-top-color: var(--line-soft); }
.js-reveal [data-reveal="step"]::after {
  content: ""; position: absolute; left: 0; right: 0; top: -3px; height: 3px; background: var(--board);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--reveal-delay, 0ms);
}
.js-reveal [data-reveal="step"].is-visible::after { transform: scaleX(1); }
.js-reveal [data-reveal="step"]::before { scale: 0.4; opacity: 0; transition: scale 0.5s cubic-bezier(0.3, 1.8, 0.5, 1), opacity 0.3s ease; transition-delay: calc(var(--reveal-delay, 0ms) + 350ms); }
.js-reveal [data-reveal="step"].is-visible::before { scale: 1; opacity: 1; }

/* pop: skill chips spring in */
.js-reveal [data-reveal="pop"] { translate: 0 8px; scale: 0.6; }

/* card: audience cards swing in from alternating sides */
.js-reveal [data-reveal="card"] { translate: 0 40px; rotate: -1.5deg; }
.js-reveal [data-reveal="card"]:nth-child(3n+1) { translate: -36px 30px; rotate: -2.5deg; }
.js-reveal [data-reveal="card"]:nth-child(3n) { translate: 36px 30px; rotate: 2.5deg; }
.audience article { transition: box-shadow 0.25s ease, translate 0.25s ease; }
.js-reveal .audience article.is-visible:hover { translate: 0 -4px; box-shadow: 0 12px 24px rgba(8, 51, 45, 0.12); transition-delay: 0ms; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .js-reveal [data-reveal], .js-reveal [data-reveal]::before { opacity: 1; translate: none; scale: none; rotate: none; }
  .js-reveal .section-title::after, .js-reveal [data-reveal]::after { transform: none; }
  .scroll-progress { display: none; }
}
@media print {
  .site-header, .site-footer, .no-print { display: none; }
  body { background: #fff; }
  .sheet { border: 0; box-shadow: none; padding: 0; }
}
/* Embedded PDF: shaped like an A4 page and never taller than the window, so the
   whole page is visible at once (the src asks the viewer to fit the page). */
.pdf-frame {
  display: block; margin: 0 auto; border: 1px solid var(--line); border-radius: 4px; background: #fff;
  aspect-ratio: 210 / 297; height: min(85vh, 1100px); width: auto; max-width: 100%;
}
@supports not (aspect-ratio: 1) { .pdf-frame { width: 100%; height: 85vh; } }

/* Resume check panel */
.resume-check h4 { font-size: 0.9rem; margin: 1rem 0 0.4rem; }
.rc-score { display: flex; align-items: center; gap: 0.8rem; margin: 0.8rem 0 0.2rem; }
.rc-number { font-family: var(--display); font-weight: 750; font-size: 2rem; line-height: 1; min-width: 3.2rem; text-align: center; padding: 0.45rem 0.3rem; border-radius: var(--radius); }
.rc-good { background: var(--good-bg); color: var(--good); }
.rc-fair { background: #fdf3d7; color: var(--marigold-deep); }
.rc-weak { background: var(--bad-bg); color: var(--bad); }
.rc-list { margin: 0; padding-left: 1.1rem; font-size: 0.9rem; }
.rc-list li { margin: 0.25rem 0; }
ul.rc-good, ul.rc-tips { background: none; color: inherit; padding: 0 0 0 1.1rem; }
.rc-good li::marker { content: "\2713  "; color: var(--good); }
.rc-details summary { cursor: pointer; font-size: 0.875rem; color: var(--board); font-weight: 600; }
.rc-details[open] summary { margin-bottom: 0.3rem; }
.rc-empty { margin: 0.8rem 0 0; padding: 0.8rem 0.9rem; border-radius: var(--radius); background: var(--line-soft); font-size: 0.9rem; }
