/* Open Screen design system, shared by the employer and candidate sites.
   Each site sets its accent on <body class="site-employer"> or "site-candidate". */
:root {
  --paper: #f5f2ea;
  --card: #fffdf8;
  --ink: #17191e;
  --ink-2: #3a3e47;
  --muted: #5d6270;
  --line: #ddd6c6;
  --line-2: #ebe5d8;
  --ok: #17663f;
  --ok-bg: #e4f2e9;
  --warn: #8a4b00;
  --warn-bg: #fbefd9;
  --bad: #9b1c1c;
  --bad-bg: #fbe5e3;
  --accent: #1f2a44;
  --accent-ink: #ffffff;
  --accent-soft: #e8ebf2;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(23, 25, 30, 0.04), 0 8px 24px -12px rgba(23, 25, 30, 0.18);
}
.site-employer { --accent: #a4470b; --accent-soft: #f7e7d9; }
.site-candidate { --accent: #0d6657; --accent-soft: #dcefe9; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code, pre, .mono { font-family: var(--mono); font-size: 0.86em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.7rem); }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }
img, svg { max-width: 100%; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.stack > * + * { margin-top: var(--gap, 16px); }

/* Top bar */
.topbar { border-bottom: 1px solid var(--line); background: rgba(245, 242, 234, 0.9); backdrop-filter: saturate(1.4) blur(8px); position: sticky; top: 0; z-index: 20; }
.topbar .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; letter-spacing: -0.01em; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--ink); display: grid; place-items: center; }
.brand-mark span { width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--paper); border-right-color: var(--accent); }
.brand small { color: var(--muted); font-weight: 500; }
.nav { display: flex; gap: 18px; margin-left: auto; font-size: 0.94rem; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }

.notice { background: var(--ink); color: #f1ede3; font-size: 0.86rem; }
.notice .wrap { padding: 8px 0; }
.notice a { color: #fff; }

/* Hero */
.hero { padding: 72px 0 40px; }
.eyebrow { font: 600 0.78rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.lede { font-size: 1.18rem; color: var(--ink-2); max-width: 62ch; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: center; }

/* Cards and panels */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card.flat { box-shadow: none; }
.panel-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kicker { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.section { padding: 48px 0; }
.section + .section { border-top: 1px solid var(--line-2); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 14px; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(step); width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); display: grid; place-items: center; font-weight: 650; font-size: 0.9rem; }

/* Buttons and inputs */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--ink); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font: 600 0.95rem/1.2 var(--sans); cursor: pointer; text-decoration: none; transition: transform 120ms ease, background 120ms ease; }
.btn:hover { background: #000; }
.btn:active { transform: translateY(1px); }
.btn.accent { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--line-2); }
.btn.small { padding: 6px 12px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible, a:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
textarea, input[type="text"], input[type="url"], select {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 12px 14px; font: 0.95rem/1.5 var(--sans); color: var(--ink);
}
textarea { min-height: 220px; resize: vertical; font-family: var(--mono); font-size: 0.84rem; }
label.field { display: grid; gap: 6px; font-weight: 600; font-size: 0.92rem; }

/* Chips and badges */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 0.8rem; color: var(--ink-2); }
.chip.lock::before { content: ""; width: 8px; height: 9px; border: 1.5px solid currentColor; border-radius: 2px; box-shadow: inset 0 -3px 0 0 currentColor; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.76rem; font-weight: 650; letter-spacing: 0.01em; white-space: nowrap; }
.badge.met, .badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.partial, .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.missing, .badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.must { background: var(--ink); color: #fff; }
.badge.neutral { background: var(--line-2); color: var(--ink-2); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 650; background: #fbf9f3; }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
tr.flash { animation: flash 1.6s ease; }
@keyframes flash { 0% { background: var(--accent-soft); } 100% { background: transparent; } }

/* Code and URL boxes */
.urlbox { display: flex; gap: 8px; align-items: center; background: #fff; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; font-family: var(--mono); font-size: 0.8rem; overflow-wrap: anywhere; }
.urlbox span { flex: 1; min-width: 0; }
pre.code { background: #15171c; color: #e9e6dd; padding: 16px; border-radius: 12px; overflow: auto; max-height: 420px; font-size: 0.78rem; line-height: 1.55; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 32px 0 56px; color: var(--muted); font-size: 0.88rem; }
.footer .wrap { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 900px) {
  .hero-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 24px; }
  .nav { gap: 12px; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .card { padding: 18px; }
  .topbar .wrap { flex-wrap: wrap; padding: 8px 0; }
  .nav { margin-left: 0; width: 100%; }
}

/* ---------------------------------------------------------------------------
   Page components
   --------------------------------------------------------------------------- */
.block { display: block; margin-top: 4px; }
.code-card { padding: 18px; background: #15171c; border-color: #15171c; }
.code-card figcaption { color: #a9a596; margin-bottom: 8px; font-family: var(--mono); }
.code-card pre.code { padding: 0; max-height: none; background: transparent; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { padding-left: 28px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.job-card h3 a { color: var(--ink); text-decoration: none; }
.job-card h3 a:hover { color: var(--accent); }
.job-card { display: grid; gap: 8px; align-content: start; }
.job-hero { padding-bottom: 12px; }
.job-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 36px; align-items: start; }
.prose p + p { margin-top: 12px; }
.network-card { position: sticky; top: 84px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.verdict q { display: block; margin-top: 6px; font-style: italic; color: var(--ink-2); font-size: 0.88rem; }
.verdict q::before, .verdict q::after, .report q::before, .report q::after { color: var(--muted); }
.quote-miss, .not-found { color: var(--bad); font-weight: 600; }
.found { color: var(--ok); font-weight: 600; }
.screen-summary { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.big { font: 600 2.6rem/1 var(--serif); }
.step-no { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font: 650 1rem/1 var(--sans); margin-right: 10px; vertical-align: 0.2em; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.split { display: grid; gap: 16px; }
.private-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.private-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; border-bottom: 1px dashed var(--line-2); padding-bottom: 6px; }
.private-list .masked { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-2); overflow-wrap: anywhere; text-align: right; }
.shared-text { white-space: pre-wrap; font: 0.82rem/1.55 var(--mono); max-height: 320px; overflow: auto; margin: 0; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; }
.job-pick { display: grid; gap: 8px; align-content: start; }
.flow { list-style: none; counter-reset: flow; padding: 0; margin: 0; display: grid; gap: 14px; }
.flow li { counter-increment: flow; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; }
.flow li::before { content: counter(flow); grid-row: span 2; width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; }
.flow b { font-size: 0.95rem; }
.flow span { color: var(--muted); font-size: 0.9rem; }
.report { display: grid; gap: 18px; }
.report-new { animation: rise 500ms ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.report-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.report-meta { display: grid; gap: 6px; flex: 1; min-width: 220px; }
.score-ring { --p: 0; width: 104px; height: 104px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line-2) 0); display: grid; place-items: center; flex: none; }
.score-ring span { width: 80px; height: 80px; border-radius: 50%; background: var(--card); display: grid; place-items: center; align-content: center; }
.score-ring b { font: 600 1.9rem/1 var(--serif); }
.score-ring small { color: var(--muted); font-size: 0.72rem; }
.report q { font-style: italic; color: var(--ink-2); }
.report-foot ul { margin: 6px 0 10px; }
.runs { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.runs li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px; }
td.paths { white-space: pre; font-family: var(--mono); font-size: 0.76rem; color: var(--ink-2); }
.lab-card { display: grid; gap: 10px; }
.lab-log { max-height: 360px; white-space: pre-wrap; }
.publish-grid textarea { min-height: 340px; }

/* The consent card (candidate site) */
dialog.consent-card { width: min(680px, 94vw); max-height: 90vh; overflow: auto; border: 1px solid var(--line); border-radius: 18px; padding: 26px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.5); }
dialog.consent-card::backdrop { background: rgba(23, 25, 30, 0.45); backdrop-filter: blur(2px); }
dialog.consent-card h2 { font-size: 1.5rem; margin: 6px 0 10px; outline: none; }
.consent-purpose { color: var(--ink-2); }
.consent-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 16px 0; font-size: 0.92rem; }
.consent-facts dt { color: var(--muted); }
.consent-facts dd { margin: 0; }
dialog.consent-card pre.code { max-height: 220px; white-space: pre-wrap; }
.consent-actions { margin-top: 16px; }
.consent-actions .btn.accent { color: #fff; }

@media (max-width: 900px) {
  .job-grid { grid-template-columns: 1fr; }
  .network-card { position: static; }
}
@media (max-width: 560px) {
  .consent-facts { grid-template-columns: 1fr; gap: 2px; }
  .consent-facts dd { margin-bottom: 8px; }
}
