:root {
  --ink: var(--sentinel-text);
  --muted: var(--sentinel-text-muted);
  --paper: var(--sentinel-bg);
  --line: var(--sentinel-border);
  --accent: var(--sentinel-accent);
  --wash: color-mix(in srgb, var(--accent) 12%, var(--sentinel-surface));
  --bad: var(--sentinel-danger);
  --badwash: color-mix(in srgb, var(--bad) 10%, var(--sentinel-surface));
  --button-ink: #160d2b;
  font-family: var(--sentinel-font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="light"] { --button-ink: #fff; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 60; transform: translateY(-160%); padding: 10px 16px; background: var(--sentinel-surface); border: 1px solid var(--accent); border-radius: var(--sentinel-radius-md); }
.skip-link:focus { transform: none; }
.wrap { max-width: 1200px; margin: auto; padding: 32px; }
header { background: radial-gradient(ellipse at 90% 0%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 65%), var(--sentinel-surface); border-bottom: 1px solid var(--line); }
header .wrap { padding-bottom: 38px; }
nav, .nav-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
nav { margin-bottom: 44px; }
nav a { color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
nav a:hover { color: var(--accent); }
nav > a { letter-spacing: -.02em; font-size: 17px; }
.nav-actions { gap: 16px; }
.theme-toggle { font-size: 12px; min-height: 40px; }
h1 { font-size: clamp(34px, 5.5vw, 56px); letter-spacing: -.045em; line-height: 1.08; margin: 12px 0 18px; font-weight: 700; }
h2 { font-size: 22px; line-height: 1.3; letter-spacing: -.025em; margin: 0; }
h3 { font-size: 16px; line-height: 1.45; letter-spacing: -.015em; margin: 0; }
.lede { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 58ch; margin: 0 0 20px; }
.eyebrow { font-size: 11px; font-weight: 750; letter-spacing: .12em; color: var(--accent); margin: 0 0 8px; }
.privacy { display: inline-block; font-size: 12px; color: var(--muted); background: var(--sentinel-surface-2); border: 1px solid var(--line); border-radius: var(--sentinel-radius-sm); padding: 8px 12px; margin: 0; }
.panel, .check { background: var(--sentinel-surface); border: 1px solid var(--line); border-radius: var(--sentinel-radius-lg); padding: 24px; margin-bottom: 24px; box-shadow: var(--sentinel-shadow-sm); }
.panel > p { font-size: 14px; }
.panel > p:not(.eyebrow):not(#status):not(#export-status) { color: var(--muted); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tag { font-size: 11px; font-weight: 650; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: 30px; padding: 4px 10px; background: var(--wash); color: var(--accent); white-space: nowrap; }
.context-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.wide { grid-column: 1/-1; }
label { display: block; font-size: 13px; font-weight: 650; }
input, select, textarea { display: block; width: 100%; border: 1px solid var(--sentinel-border-light); border-radius: var(--sentinel-radius-md); padding: 10px 12px; background: var(--sentinel-bg); color: var(--ink); margin-top: 6px; min-height: 44px; font-size: 14px; transition: border-color .16s, box-shadow .16s; }
input::placeholder, textarea::placeholder { color: var(--sentinel-text-dim); opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
textarea { resize: vertical; min-height: 80px; }
.hint { color: var(--muted); font-size: 12px; }
.workspace { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(320px,1fr); gap: 28px; align-items: start; margin-top: 36px; }
.workspace > section > p { color: var(--muted); font-size: 14px; margin: 12px 0 22px; }
.workspace > * { min-width: 0; }
.check { padding: 20px; }
.check p { font-size: 13px; color: var(--muted); margin: 8px 0 16px; }
.check .stage-label { font-size: 10px; text-transform: uppercase; font-weight: 700; letter-spacing: .1em; color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 18px 0; }
legend { font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.answers { display: flex; gap: 8px; flex-wrap: wrap; }
.answers label { display: flex; gap: 8px; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); background: var(--sentinel-surface-2); border-radius: var(--sentinel-radius-md); cursor: pointer; font-size: 13px; }
.answers label:hover { border-color: var(--sentinel-border-light); }
.answers label:has(input:checked) { border-color: var(--accent); background: var(--wash); }
.answers input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--accent); box-shadow: none; }
.sources { font-size: 11px; margin-top: 16px; }
.sources a { display: inline-block; margin-right: 12px; padding: 3px 0; }
.summary { position: sticky; top: 24px; border-top: 2px solid var(--accent); }
progress { appearance: none; width: 100%; height: 7px; border: 0; border-radius: 10px; overflow: hidden; background: var(--sentinel-surface-3); accent-color: var(--accent); }
progress::-webkit-progress-bar { background: var(--sentinel-surface-3); }
progress::-webkit-progress-value { background: var(--accent); border-radius: 10px; }
progress::-moz-progress-bar { background: var(--accent); }
#status { font-weight: 650; font-size: 14px; margin-top: 20px; }
#actions { padding-left: 22px; margin: 20px 0 24px; }
#actions li { padding: 12px 0 12px 4px; border-top: 1px solid var(--line); font-size: 13px; }
#actions li::marker { color: var(--sentinel-text-dim); font-size: 11px; }
#actions strong { display: block; font-weight: 650; }
#actions .critical { color: var(--bad); }
#actions span { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.export-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
button { border: 1px solid var(--accent); background: var(--accent); color: var(--button-ink); border-radius: var(--sentinel-radius-md); min-height: 44px; padding: 10px 12px; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .16s, border-color .16s, box-shadow .16s; }
button:hover { background: var(--sentinel-accent-bright); border-color: var(--sentinel-accent-bright); }
button:active { transform: translateY(1px); }
.secondary { background: var(--sentinel-surface-2); border-color: var(--sentinel-border-light); color: var(--ink); }
.secondary:hover { background: var(--sentinel-surface-3); border-color: var(--accent); }
.reset { background: transparent; color: var(--muted); border: 0; text-decoration: underline; text-underline-offset: 3px; padding-left: 0; }
.reset:hover { color: var(--bad); background: transparent; }
#reset-confirm { padding: 14px; background: var(--badwash); border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--line)); border-radius: var(--sentinel-radius-md); }
#reset-confirm button { margin-bottom: 6px; }
#export-status:empty { display: none; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.7; padding: 18px; background: var(--sentinel-bg); border: 1px solid var(--line); border-radius: var(--sentinel-radius-md); }
footer { color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 650; }
#source-list { padding-left: 20px; font-size: 13px; }
#source-list li { margin-bottom: 8px; }
#sources details { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 24px; font-size: 13px; }
#sources details p { color: var(--muted); }
.stage-group { margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--sentinel-radius-lg); background: var(--sentinel-surface-2); overflow: clip; }
.stage-group > summary { padding: 16px 20px; min-height: 56px; list-style-position: inside; }
.stage-group > summary::marker { color: var(--accent); }
.stage-group > summary:hover { background: var(--wash); }
.stage-summary-title { font-size: 15px; margin-right: 12px; }
.stage-summary-count { font-size: 11px; color: var(--muted); font-weight: 500; }
.stage-group .check { margin: 0 12px 12px; border-radius: var(--sentinel-radius-md); }
.check, #report-title, #context-title { scroll-margin-top: 24px; }
.mobile-handoff { display: none; }
@media (max-width: 800px) {
  body { padding-bottom: calc(132px + env(safe-area-inset-bottom,0px)); }
  .workspace { grid-template-columns: 1fr; gap: 8px; margin-top: 28px; }
  .summary { position: static; }
  .wrap { padding: 24px 20px; }
  header .wrap { padding-bottom: 28px; }
  .context-grid { grid-template-columns: 1fr; gap: 16px; }
  .panel { padding: 20px; }
  .lede { font-size: 17px; }
  nav { align-items: flex-start; gap: 12px; margin-bottom: 32px; }
  .nav-actions { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
  .nav-actions a { font-size: 12px; min-height: 44px; display: inline-flex; align-items: center; }
  .theme-toggle { min-height: 44px; padding: 8px 10px; }
  .mobile-handoff { display: block; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: var(--sentinel-surface); border-top: 1px solid var(--line); padding: 10px 20px calc(12px + env(safe-area-inset-bottom,0px)); box-shadow: var(--sentinel-shadow-md); }
  .mobile-handoff p { font-size: 12px; font-weight: 650; line-height: 1.5; margin: 0 0 8px; }
  .mobile-handoff > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .mobile-handoff button { padding: 8px; }
  .stage-group > summary { padding: 14px; }
  .stage-summary-count { display: block; margin-left: 20px; }
  .stage-group .check { margin: 0 8px 10px; padding: 16px; }
  html { scroll-padding-bottom: 145px; }
  input, select, textarea { font-size: 16px; }
}
@media (max-width: 420px) {
  nav { flex-wrap: wrap; }
  .nav-actions { width: 100%; justify-content: space-between; }
  .section-head { align-items: flex-start; }
  .tag { font-size: 10px; padding: 4px 8px; }
  h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  :root { color-scheme: light; --ink: #000; --muted: #333; --paper: #fff; --line: #bbb; }
  body, header, .panel, pre { background: #fff; color: #000; box-shadow: none; }
  header { border: 0; }
  nav, .privacy, .workspace, .context-grid, button, details, footer, .mobile-handoff, .skip-link { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .panel { border: 0; padding: 10px 0; break-inside: avoid; }
  #report-section { display: block !important; }
  #sources { font-size: 11px; }
  h1 { font-size: 28px; }
  .lede { font-size: 14px; color: #333; }
  pre { font-size: 10px; padding: 0; border: 0; }
  a, .eyebrow { color: #000; }
  body { padding-bottom: 0; }
}
