:root {
  color-scheme: dark;
  --page: #101215;
  --surface: #171a1e;
  --surface-raised: #1d2226;
  --line: #343b41;
  --field-line: #69757b;
  --text: #f0f3ef;
  --muted: #b2bdb8;
  --sage: #a8d2bc;
  --sage-ink: #12251b;
  --amber: #ebcb99;
  --error: #f1b5ad;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  background: var(--page);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
a { color: var(--sage); text-underline-offset: .22em; }
button, select, input { font: inherit; }
button:enabled, select { cursor: pointer; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 4px; }
:where(h2, h3, main)[tabindex]:focus { outline: none; }

.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.skip { position: fixed; z-index: 10; inset: .75rem auto auto .75rem; padding: .7rem; background: var(--sage); color: var(--sage-ink); clip-path: inset(50%); }
.skip:focus { clip-path: none; }

.site-header { border-bottom: 1px solid var(--line); background: #121518; }
.header-inner { display: flex; justify-content: space-between; align-items: center; min-height: 4rem; gap: 1rem; }
.brand { display: inline-flex; gap: .65rem; align-items: center; min-height: 2.75rem; color: var(--text); text-decoration: none; font-weight: 730; }
.brand-mark { display: inline-grid; place-items: center; width: 1.6rem; aspect-ratio: 1; border: 1px solid var(--sage); border-radius: .35rem; flex: none; }
.brand-mark::after { content: ""; width: .7rem; height: .25rem; border: 1px solid var(--sage); border-radius: .12rem; }
.hub-link a { color: var(--muted); font-size: .88rem; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: 17.75rem;
  padding: clamp(1.3rem, 4.5vw, 3.25rem);
  margin: 1.35rem 0 .85rem;
  border: 1px solid var(--line);
  border-radius: .9rem;
  overflow: hidden;
  background: #171b1e;
}
.hero-copy { position: relative; z-index: 1; }
.hero-vault {
  position: absolute;
  inset: 0 0 0 33%;
  background-image: linear-gradient(90deg, #171b1e, transparent 49%), url("./assets/vault.webp");
  background-position: center, center 53%;
  background-size: cover;
}
.mode {
  display: inline-block;
  padding: .29rem .48rem;
  border: 1px solid #557164;
  border-radius: .25rem;
  color: var(--sage);
  background: #18221e;
  font: 650 .74rem/1.45 var(--mono);
}
.mode span { color: #8ca699; }
h1 { margin: .45rem 0 .12rem; font-size: clamp(2.75rem, 8.5vw, 5.2rem); font-weight: 765; line-height: .99; letter-spacing: -.073em; }
.descriptor { margin-top: .55rem; font-size: clamp(1.05rem, 2.4vw, 1.35rem); font-weight: 620; letter-spacing: -.022em; }
.hero-description { margin-top: .55rem; max-width: 38ch; color: var(--muted); font-size: .98rem; }
.demo-note { padding: .72rem .85rem; border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: .32rem; background: #1b1c1b; color: var(--muted); font-size: .9rem; }
.demo-note strong { color: var(--amber); }

.workspace { margin-top: 1.35rem; }
.role-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .25rem; padding: .28rem; border: 1px solid var(--line); border-radius: .55rem; background: #14171a; margin-bottom: 1rem; }
.role-nav a { display: grid; place-items: center; text-align: center; min-height: 3rem; padding: .35rem .25rem; border: 1px solid transparent; border-radius: .35rem; color: var(--muted); text-decoration: none; font-size: clamp(.78rem, 2.35vw, .92rem); font-weight: 650; line-height: 1.25; }
.role-nav a:hover { background: var(--surface-raised); color: var(--text); }
.role-nav a[aria-current] { border-color: #567468; background: #25332d; color: #d6efdf; }

.report-layout { display: grid; grid-template-columns: minmax(13rem, .8fr) minmax(0, 2.1fr); gap: 1rem; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: .72rem; background: var(--surface); padding: clamp(1rem, 2.8vw, 1.85rem); min-width: 0; }
.progress-panel h2 { font-size: 1rem; letter-spacing: -.018em; }
.report-panel h2, .role-panel h2 { font-size: clamp(1.45rem, 3.2vw, 2.05rem); line-height: 1.16; letter-spacing: -.04em; }
.section-copy { margin-top: .55rem; margin-bottom: 1.22rem; color: var(--muted); max-width: 65ch; }

.step-list { list-style: none; padding: 0; margin-top: .85rem; display: grid; gap: .32rem; }
.step-list li { display: flex; align-items: center; gap: .62rem; padding: .46rem .35rem; color: var(--muted); font-size: .91rem; border: 1px solid transparent; border-radius: .38rem; }
.step-list [aria-current] { background: #25332d; border-color: #567468; color: #e4f2e9; font-weight: 650; }
.step-number { flex: none; display: inline-grid; place-items: center; width: 1.54rem; aspect-ratio: 1; border: 1px solid #687773; border-radius: .3rem; font: 600 .75rem/1 var(--mono); }
.completed .step-number { border-color: var(--sage); color: var(--sage); }
.privacy-note { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--line); font-size: .84rem; color: var(--muted); }
.privacy-note strong { display: block; color: var(--text); margin-bottom: .25rem; }

.fields { display: grid; gap: .85rem; }
label { display: block; margin: 0 0 .35rem; color: var(--text); font-size: .9rem; font-weight: 650; }
select, input { display: block; width: 100%; min-height: 2.9rem; padding: .64rem .7rem; border: 1px solid var(--field-line); border-radius: .42rem; background: #111517; color: var(--text); font-size: 1rem; }
select { max-width: 36rem; }
input[type="file"] { padding: .5rem; }
input::file-selector-button { margin-right: .5rem; padding: .38rem .58rem; border: 1px solid var(--field-line); border-radius: .28rem; background: var(--surface-raised); color: var(--text); cursor: pointer; }
input[readonly] { font-family: var(--mono); max-width: 28rem; }
.hint { margin-top: .65rem; color: var(--muted); font-size: .86rem; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1rem; }
.button { min-height: 2.75rem; max-width: 100%; padding: .6rem .86rem; border: 1px solid #697873; border-radius: .42rem; background: #242b2b; color: var(--text); font-size: .88rem; font-weight: 670; }
.button:enabled:hover { background: #343c3c; }
.button:disabled { opacity: .53; }
.primary { border-color: var(--sage); background: var(--sage); color: var(--sage-ink); }
.primary:enabled:hover { background: #c3e3d3; }
.quiet { background: transparent; }

.feedback { margin-top: .9rem; padding: .75rem .85rem; border: 1px solid var(--line); border-left: 3px solid #8d9a94; border-radius: .32rem; background: #222729; font-size: .9rem; white-space: pre-line; }
.feedback[data-tone="success"] { border-left-color: var(--sage); color: #d5ebde; background: #202e27; }
.feedback[data-tone="error"] { border-left-color: var(--error); color: var(--error); background: #342625; }
.protection { list-style: none; display: grid; gap: .45rem; padding: 0; margin-top: 1.05rem; }
.protection li, .review-list > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .85rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.protection span, .review-list dt { color: var(--muted); }
.protection strong { font-weight: 625; }
.review-list dd { overflow-wrap: anywhere; }
.receipt, .case-state { margin-top: .9rem; padding: 1rem; border: 1px solid #786348; border-radius: .55rem; background: #24231e; }
.receipt[data-state="unlocked"], .case-state[data-state="unlocked"] { border-color: #5b7f68; background: #1e2c24; }
.receipt h3, .case-state h3, .watch-head h3 { font-size: 1.13rem; letter-spacing: -.025em; }
.progress-value { margin: .35rem 0; color: var(--amber); font-size: 1.02rem; font-weight: 670; }
[data-state="unlocked"] .progress-value { color: var(--sage); }
progress { width: 100%; height: .68rem; accent-color: var(--amber); vertical-align: middle; }
[data-state="unlocked"] progress { accent-color: var(--sage); }
.receipt label { margin-top: 1rem; }
#copy-result:not(:empty) { margin-top: .65rem; color: var(--muted); font-size: .86rem; }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.metrics > div { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .55rem; background: #1b2022; }
.metrics dt { color: var(--muted); font-size: .88rem; }
.metrics dd { margin-top: .3rem; font-size: 1.8rem; font-weight: 700; line-height: 1.14; letter-spacing: -.04em; overflow-wrap: anywhere; }
.metrics .hint { font-size: .8rem; font-weight: 450; letter-spacing: normal; }

.policy { margin-bottom: 1.1rem; padding: .78rem .9rem; border: 1px solid #786348; border-radius: .4rem; background: #27251f; color: var(--amber); font-size: .9rem; }
.policy p { margin-top: .2rem; color: var(--muted); }
.watch-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
#watched-case { margin-top: .95rem; }
.evidence-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .65rem; }
.evidence-gallery:not(:empty) { margin-top: .9rem; }
.evidence-gallery img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: .4rem; }

.site-footer { padding: 1rem 0 1.4rem; margin-top: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.site-footer p + p { margin-top: .28rem; }

@media (max-width: 48rem) {
  .report-layout { grid-template-columns: 1fr; gap: .75rem; }
  .step-list { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: .55rem; }
  .step-list li { flex-direction: column; align-items: flex-start; gap: .25rem; font-size: .77rem; line-height: 1.24; }
  .privacy-note { margin-top: .65rem; padding-top: .55rem; }
}

@media (max-width: 35rem) {
  .hero { min-height: 15.75rem; }
  .hero-vault { inset: 0; opacity: .5; background-image: linear-gradient(90deg, #171b1e 5%, #171b1e9c 57%, transparent), url("./assets/vault.webp"); background-position: center, 64% 54%; }
  .hero-description { font-size: .91rem; }
  .metrics { grid-template-columns: 1fr; }
  .actions .button { width: 100%; }
  .report-layout .panel { padding: .92rem; }
}
