:root {
  --paper: #faf7f0;
  --card: #ffffff;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #e7e0d2;
  --gold: #b8860b;
  --gold-deep: #8b6914;
  --gold-wash: #fdf6e3;
  --pass: #166534;
  --pass-wash: #ecfdf3;
  --fail: #b91c1c;
  --fail-wash: #fef2f2;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink); background: var(--paper); margin: 0; line-height: 1.55;
}
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.2; }
a { color: var(--gold-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* disclaimer + nav */
.disclaimer { background: var(--ink); color: #f5f0e6; font-size: .82rem; padding: .55rem 1rem; text-align: center; }
.disclaimer strong { color: var(--gold); }
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: .7rem 1.25rem; background: rgba(250, 247, 240, .94);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: Georgia, serif; font-weight: bold; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.nav-links { display: flex; gap: 1rem; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.nav-links a:hover { color: var(--ink); text-decoration: underline; }

main { max-width: 780px; margin: 0 auto; padding: 0 1.25rem 3rem; }

/* hero */
.hero { text-align: center; padding: 3.5rem 0 2.5rem; }
.kicker {
  display: inline-block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold-deep); border: 1px solid var(--gold); border-radius: 999px; padding: .25rem .9rem; margin: 0 0 1rem;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin: 0 0 .75rem; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 34rem; margin: 0 auto 1.5rem; }
.cta-row { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.stats { list-style: none; display: flex; gap: 2rem; justify-content: center; padding: 1.75rem 0 0; margin: 0; flex-wrap: wrap; }
.stats li { display: flex; flex-direction: column; }
.stats strong { font-family: Georgia, serif; font-size: 1.9rem; color: var(--gold-deep); }
.stats span { font-size: .85rem; color: var(--muted); max-width: 11rem; }

/* buttons */
.btn {
  display: inline-block; border-radius: 8px; font-size: 1rem; cursor: pointer;
  padding: .65rem 1.3rem; text-decoration: none; border: 1px solid transparent; min-height: 44px;
}
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover { background: #000; }
.btn-primary:disabled { opacity: .55; cursor: wait; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-small { font-size: .88rem; padding: .45rem .9rem; min-height: 44px; }
.btn-big { width: 100%; margin-top: .5rem; font-size: 1.08rem; }

/* 3D tab stage: one card forward, the rest floating behind.
   The hero above always stays in front (position + z-index); cards never overlap it. */
main > .hero { position: relative; z-index: 5; }
.stage { position: relative; perspective: 1600px; }
.card {
  transition: transform .55s cubic-bezier(.2, .7, .3, 1.05), opacity .45s ease, filter .45s ease;
}
.card.active { position: relative; z-index: 2; transform: none; opacity: 1; }
.card.background {
  position: absolute; inset: 0; z-index: 1; overflow: hidden;
  opacity: .55; filter: blur(2px) saturate(.85);
  transform: translateZ(-300px) scale(.93);
  animation: floaty 7s ease-in-out infinite alternate;
}
.stage > .card.background:nth-child(2) { animation-delay: -1.5s; }
.stage > .card.background:nth-child(3) { animation-delay: -3s; }
.stage > .card.background:nth-child(4) { animation-delay: -4.5s; }
.stage > .card.background:nth-child(5) { animation-delay: -6s; }
@keyframes floaty { from { translate: 0 0; } to { translate: 0 10px; } }
.card[inert] { pointer-events: none; }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 700; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
  .card.background { display: none; }
  .card { animation: none; }
}

/* panels */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.5rem 1.75rem; margin: 1.5rem 0; }
.panel h2 { margin-top: 0; }
.row { display: flex; gap: .75rem; align-items: center; margin: .6rem 0; flex-wrap: wrap; }
label { font-weight: 600; }
select { font-size: 1rem; padding: .5rem .75rem; border-radius: 8px; border: 1px solid var(--line); background: #fff; min-height: 44px; }
.uni-note { font-size: .88rem; color: var(--muted); }

/* dropzone */
.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 2rem 1rem; text-align: center; margin-top: 1rem;
  transition: border-color .15s, background .15s;
}
.dropzone .doc-icon { color: var(--gold-deep); }
.dz-title { font-size: 1.05rem; margin: .5rem 0; }
.dz-pick {
  display: inline-block; background: var(--gold-wash); border: 1px solid var(--gold);
  color: var(--gold-deep); font-weight: 600; border-radius: 8px;
  padding: .55rem 1.2rem; cursor: pointer; min-height: 44px; line-height: 1.6;
}
.dz-pick:hover { background: #f7ead0; }
#file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#file:focus-visible + .dz-rules { outline: none; }
.dropzone:focus-within { border-color: var(--gold); }
.dz-rules { font-size: .85rem; color: var(--muted); margin: .75rem 0 0; }
.dz-state { font-size: .9rem; margin: .5rem 0 0; min-height: 1.4em; }
.dropzone.dragover { border-style: solid; border-color: var(--gold-deep); background: var(--gold-wash); }
.dropzone.dragover .dz-title::after { content: " — drop to add"; font-weight: 600; color: var(--gold-deep); }
.dropzone.invalid { border-color: var(--fail); }
.dropzone.invalid .dz-state { color: var(--fail); font-weight: 600; }

/* privacy promise */
.privacy-strip {
  background: var(--pass-wash); border: 1px solid var(--pass); border-radius: 8px;
  padding: .7rem .9rem; font-size: .92rem; margin: 0 0 .5rem;
}

/* queue + progress */
.queue { margin-top: 1rem; }
.file-card {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem; background: var(--paper);
}
.file-meta { display: flex; flex-direction: column; overflow: hidden; }
.file-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta span { font-size: .82rem; color: var(--muted); }
.progress { margin-top: .75rem; }
.progress-bar {
  height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; position: relative;
}
.progress-bar::after {
  content: ""; position: absolute; inset: 0; width: 40%; border-radius: 999px; background: var(--gold);
  animation: slide 1.1s ease-in-out infinite alternate;
}
@keyframes slide { from { left: -40%; } to { left: 100%; } }
.progress-step { font-size: .9rem; color: var(--muted); }
.form-error { color: var(--fail); font-weight: 600; }

/* results */
.results { border-top: 4px solid var(--line); }
.results.verdict-pass { border-top-color: var(--pass); }
.results.verdict-fail { border-top-color: var(--fail); }
#verdict { margin-bottom: .25rem; }
#verdict.pass { color: var(--pass); }
#verdict.fail { color: var(--fail); }
.report-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: .75rem 0; }
.ada-heading .tag {
  font-family: -apple-system, "Segoe UI", sans-serif; font-size: .72rem; letter-spacing: .06em;
  background: var(--gold-wash); border: 1px solid var(--gold); color: var(--gold-deep);
  border-radius: 999px; padding: .15rem .6rem; vertical-align: middle; white-space: nowrap;
}
.section-note { color: var(--muted); font-size: .9rem; }
details.rule { border: 1px solid var(--line); border-radius: 8px; margin: .5rem 0; background: #fff; }
details.rule summary { padding: .6rem .8rem; cursor: pointer; font-weight: 600; list-style: none; }
details.rule summary::-webkit-details-marker { display: none; }
details.rule summary::before { content: "+ "; color: var(--gold-deep); }
details.rule[open] summary::before { content: "− "; }
.sev { font-size: .72rem; border-radius: 4px; padding: .12rem .45rem; margin-right: .5rem; color: #fff; font-family: -apple-system, "Segoe UI", sans-serif; }
.sev.ERROR { background: var(--fail); }
.sev.INFO { background: var(--muted); }
details.rule ul { margin: .25rem 0 .8rem; padding-left: 1.6rem; }
details.rule li { margin: .35rem 0; font-size: .92rem; }
details.rule code.loc { color: var(--gold-deep); font-size: .85rem; }
.empty { color: var(--muted); font-style: italic; }

/* how it works */
.steps { padding-left: 1.4rem; }
.steps li { margin: .6rem 0; }
code { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 0 .3rem; font-size: .88em; }

footer { margin-top: 2rem; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; text-align: center; }

@media (max-width: 560px) {
  .nav-links { display: none; }
  .hero { padding: 2.25rem 0 1.5rem; }
  .panel { padding: 1.1rem 1rem 1.4rem; }
}

/* REVISION 1 — retro-futurist shell */
:root {
  --paper: #dfe8b5;
  --card: #f3f0dc;
  --ink: #171a17;
  --muted: #4f5748;
  --line: #20251f;
  --acid: #d7ff52;
  --coral: #ff765f;
  --violet: #8c73ff;
  --cyan: #66d8d0;
  --gold: var(--acid);
  --gold-deep: #293117;
  --gold-wash: #ebf7bd;
  --pass: #244d36;
  --pass-wash: #d8efbc;
  --fail: #8b2929;
  --fail-wash: #ffddd0;
  --radius: 4px;
}
html { background: var(--ink); }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 15%, rgba(215,255,82,.18), transparent 21rem),
    radial-gradient(circle at 90% 42%, rgba(140,115,255,.2), transparent 26rem),
    linear-gradient(rgba(23,26,23,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,26,23,.05) 1px, transparent 1px),
    var(--paper);
  background-size: auto, auto, 32px 32px, 32px 32px, auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .22;
  background-image: repeating-radial-gradient(circle at 0 0, transparent 0 2px, #182018 3px);
  background-size: 5px 5px; mix-blend-mode: multiply;
}
h1, h2, h3, .brand {
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-weight: 900;
  letter-spacing: -.035em;
}
.disclaimer {
  background: var(--ink); color: #eaf3c5; border-bottom: 1px solid #48533d;
  letter-spacing: .02em; font-size: .8rem; line-height: 1.45;
}
.disclaimer strong { color: var(--acid); }
.nav {
  top: 0; padding: .85rem clamp(1rem, 4vw, 3rem);
  background: rgba(223,232,181,.86); border-bottom: 1.5px solid var(--ink);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.brand { font-size: 1.25rem; text-transform: uppercase; letter-spacing: -.02em; }
.brand::after { content: " / FORMAT LAB"; color: var(--muted); font: 700 .65rem/1 monospace; letter-spacing: .12em; }
.nav-links { align-items: center; gap: .25rem; }
.nav-links a {
  padding: .48rem .7rem; border: 1px solid transparent; color: var(--ink);
  font: 750 .78rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: .035em; text-transform: uppercase;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  background: var(--ink); color: var(--acid); border-color: var(--ink); text-decoration: none;
}
main { max-width: 1180px; padding: 0 clamp(1rem, 4vw, 3rem) 4rem; }
.hero {
  min-height: 690px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .88fr);
  align-items: center; gap: clamp(2rem, 5vw, 6rem); text-align: left; padding: 5rem 0 4rem;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1rem;
  font: 800 .78rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: .1em; text-transform: uppercase;
}
.signal-dot {
  width: .65rem; aspect-ratio: 1; border-radius: 50%; background: var(--coral);
  box-shadow: 0 0 0 5px rgba(255,118,95,.18), 0 0 20px var(--coral);
  animation: signal 1.6s ease-in-out infinite;
}
@keyframes signal { 50% { opacity: .45; transform: scale(.82); } }
.kicker {
  display: block; width: fit-content; border: 1px solid var(--ink); border-radius: 0;
  color: var(--ink); background: var(--acid); box-shadow: 4px 4px 0 var(--ink);
  font: 800 .75rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: .075em; padding: .55rem .75rem; margin-bottom: 1.4rem;
}
.hero h1 {
  margin: 0; max-width: 12ch; font-size: clamp(4rem, 8vw, 7.4rem);
  line-height: .9; text-transform: uppercase; letter-spacing: -.065em;
}
.hero h1 em { color: transparent; -webkit-text-stroke: 2px var(--ink); font-style: normal; }
.lede { max-width: 42rem; margin: 1.7rem 0 1.5rem; color: var(--ink); font-size: 1.14rem; line-height: 1.68; }
.cta-row { justify-content: flex-start; }
.btn {
  border-radius: 0; border: 1.5px solid var(--ink);
  font: 800 .84rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: .05em; text-transform: uppercase; box-shadow: 5px 5px 0 var(--ink);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--ink); }
.btn-primary { background: var(--ink); color: var(--acid); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--ink); }
.stats { justify-content: flex-start; gap: 0; padding-top: 2.5rem; }
.stats li { min-width: 9.2rem; padding: .7rem 1rem .7rem 0; border-top: 1px solid var(--ink); }
.stats li + li { padding-left: 1rem; border-left: 1px solid var(--ink); }
.stats strong { color: var(--ink); font: 900 2.2rem/1 "Arial Black", Arial, sans-serif; }
.stats span {
  margin-top: .35rem; font: 750 .72rem/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  text-transform: uppercase;
}

/* Original CSS-built thesis object — no image or 3D library. */
.hero-visual {
  position: relative; min-height: 510px; perspective: 1100px; transform-style: preserve-3d;
}
.hero-visual::before {
  content: ""; position: absolute; inset: 12% 2% 4%; border: 1px solid var(--ink);
  background: rgba(243,240,220,.35); transform: rotate(-3deg);
  box-shadow: 18px 22px 0 rgba(23,26,23,.12);
}
.thesis-object {
  position: absolute; left: 20%; top: 16%; width: 58%; height: 64%;
  transform-style: preserve-3d; transform: rotateX(58deg) rotateZ(-28deg) rotateY(5deg);
  filter: drop-shadow(30px 36px 20px rgba(23,26,23,.28));
}
.book-cover, .book-pages, .book-spine { position: absolute; border: 2px solid var(--ink); }
.book-cover {
  inset: 0; z-index: 3; padding: 2rem; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, var(--violet), #b19dff);
  transform: translateZ(42px);
}
.book-cover::after {
  content: ""; position: absolute; width: 130%; height: 38px; left: -15%; top: 45%;
  background: var(--acid); border-block: 2px solid var(--ink); transform: rotate(-16deg);
}
.book-cover strong { position: relative; z-index: 1; font: 900 clamp(2.2rem,5vw,4.5rem)/.78 Impact,sans-serif; }
.book-cover small, .book-kicker { position: relative; z-index: 1; font: 700 .57rem/1.25 monospace; letter-spacing: .1em; }
.book-lines { width: 42%; border-top: 7px double var(--ink); }
.book-pages {
  inset: 5px -18px -17px 18px; z-index: 1; background: repeating-linear-gradient(#f4efda 0 5px,#bbb99f 6px);
  transform: translateZ(10px);
}
.book-spine {
  left: -42px; top: 0; width: 43px; height: 100%; background: var(--coral);
  transform-origin: right center; transform: rotateY(-90deg) translateZ(42px);
  display: grid; place-items: center; writing-mode: vertical-rl;
  font: 800 .65rem monospace; letter-spacing: .12em;
}
.orbit { position: absolute; border: 1.5px solid var(--ink); border-radius: 50%; transform-style: preserve-3d; }
.orbit::before, .orbit::after { content: ""; position: absolute; width: 10px; aspect-ratio: 1; border-radius: 50%; background: var(--acid); border: 1px solid var(--ink); }
.orbit-a { width: 88%; height: 46%; left: 4%; top: 27%; transform: rotate(-20deg); }
.orbit-a::before { left: 8%; top: 8%; } .orbit-a::after { right: 4%; bottom: 22%; background: var(--coral); }
.orbit-b { width: 58%; height: 84%; left: 21%; top: 4%; transform: rotate(47deg); }
.orbit-b::before { right: 12%; top: 3%; background: var(--cyan); } .orbit-b::after { left: 0; bottom: 30%; }
.scan-beam {
  position: absolute; z-index: 5; left: 8%; right: 8%; height: 2px; top: 26%;
  background: var(--acid); box-shadow: 0 0 18px 5px rgba(215,255,82,.65);
  animation: scan 3.6s ease-in-out infinite;
}
@keyframes scan { 50% { top: 76%; } }
.data-chip {
  position: absolute; z-index: 6; padding: .55rem .7rem; border: 1px solid var(--ink);
  background: var(--card); box-shadow: 4px 4px 0 var(--ink);
  font: 800 .65rem/1 monospace; letter-spacing: .08em;
}
.data-chip span { color: var(--violet); font-size: 1rem; margin-right: .35rem; }
.chip-a { left: 0; top: 17%; transform: rotate(-5deg); }
.chip-b { right: -2%; top: 37%; transform: rotate(4deg); }
.chip-c { left: 5%; bottom: 8%; transform: rotate(3deg); }
.axis { position: absolute; font: 600 .55rem/1 monospace; letter-spacing: .08em; color: var(--muted); }
.axis-x { bottom: 0; right: 8%; } .axis-y { top: 4%; left: 4%; writing-mode: vertical-rl; }

.stage {
  min-height: max(610px, calc(100vh - 5.5rem));
  perspective: 1800px;
  scroll-margin-top: 5.5rem;
}
.panel {
  border: 1.5px solid var(--ink); border-radius: 0; padding: clamp(1.3rem,3vw,2.5rem);
  background: var(--card); box-shadow: 12px 12px 0 var(--ink); margin: 1.5rem 0 3rem;
}
.panel {
  font-size: 1rem;
  line-height: 1.7;
}
.panel h2 {
  font-size: clamp(2rem,4.5vw,3.6rem); line-height: 1.02;
  text-transform: uppercase; letter-spacing: -.045em;
}
.panel h3 { font-size: 1.45rem; line-height: 1.25; }
.card::before {
  content: attr(data-tab); display: block; width: fit-content; margin: -1rem 0 1.25rem auto;
  padding: .38rem .55rem; border: 1px solid var(--ink); background: var(--acid);
  font: 800 .74rem/1.1 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: .08em; text-transform: uppercase;
}
.card.active { z-index: 10; animation: deck-in .62s cubic-bezier(.16,.84,.34,1) both; }
.card.background {
  opacity: 1; filter: none; height: min(700px, calc(100% - 8px));
  transform: translate3d(var(--deck-x, 20px), var(--deck-y, 24px), var(--deck-z, -300px))
             rotateZ(var(--deck-r, 1deg)) scale(.98);
  box-shadow: 8px 8px 0 var(--ink);
}
.card.background > * { visibility: hidden; }
.card.background::before { visibility: visible; position: absolute; right: 1rem; top: .7rem; margin: 0; }
#checker.background { --deck-x: -28px; --deck-y: 38px; --deck-z: -460px; --deck-r: -1deg; background: var(--cyan); z-index: 5; }
#rules.background { --deck-x: 30px; --deck-y: 26px; --deck-z: -360px; --deck-r: 1.3deg; background: var(--violet); z-index: 6; }
#how.background { --deck-x: -18px; --deck-y: 20px; --deck-z: -260px; --deck-r: -.7deg; background: var(--coral); z-index: 7; }
#universities.background { --deck-x: 20px; --deck-y: 14px; --deck-z: -160px; --deck-r: .55deg; background: var(--cyan); z-index: 8; }
#about.background { --deck-x: -10px; --deck-y: 8px; --deck-z: -80px; --deck-r: -.3deg; background: var(--acid); z-index: 9; }
@keyframes deck-in {
  from { opacity: .25; transform: translate3d(48px,38px,-280px) rotateY(-4deg) scale(.95); }
  to { opacity: 1; transform: translate3d(0,0,0) rotateY(0) scale(1); }
}
.privacy-strip { border: 1px solid var(--ink); border-radius: 0; box-shadow: 4px 4px 0 var(--ink); }
.trust-grid {
  display: grid; grid-template-columns: repeat(3,1fr); border: 1.5px solid var(--ink);
  margin: 0 0 1.2rem; background: var(--ink); gap: 1px;
}
.trust-grid p {
  display: grid; gap: .25rem; margin: 0; padding: .8rem; background: var(--card);
}
.trust-grid span, .trust-grid small {
  color: var(--muted);
  font: 750 .72rem/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  text-transform: uppercase; letter-spacing: .05em;
}
.trust-grid strong {
  font: 900 1.15rem/1.15 "Arial Black", Arial, sans-serif;
  text-transform: uppercase;
}
.trust-grid p:nth-child(1) strong { color: #513ebc; }
.trust-grid p:nth-child(2) strong { color: var(--pass); }
.trust-grid p:nth-child(3) strong { color: #9b352a; }
.dropzone { border: 1.5px dashed var(--ink); border-radius: 0; background: rgba(255,255,255,.35); }
.dz-pick { border: 1px solid var(--ink); border-radius: 0; background: var(--acid); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
select, details.rule, code, .file-card { border-color: var(--ink); border-radius: 0; }
details.rule { background: #f8f5e4; }
details.rule summary {
  padding: .8rem 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
}
details.rule .section-note { padding: 0 1rem; }
details.rule li { font-size: .98rem; line-height: 1.58; margin: .55rem 0; }
.section-note { font-size: .98rem; line-height: 1.65; }
.dz-rules { font-size: .92rem; line-height: 1.55; }
.dz-state, .uni-note, .progress-step { font-size: .95rem; }
.steps li { margin: .85rem 0; }
.sev { border-radius: 0; }
footer { color: var(--ink); border-color: var(--ink); }

/* Results are a checker output, not another card in the 3D stack. Keep them
   above every decorative background layer and make long thesis filenames wrap
   like report text rather than display headings. */
.results {
  position: relative;
  z-index: 20;
  isolation: isolate;
  background: var(--card);
  box-shadow: 12px 12px 0 var(--ink);
  scroll-margin-top: 5.5rem;
}
#verdict {
  max-width: 100%;
  margin: 0 0 .65rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -.025em;
  text-transform: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.results #summary { font-size: 1.05rem; line-height: 1.65; }
.results .report-actions { position: relative; z-index: 1; margin: 1.15rem 0; }

/* REVISION 3 — scroll choreography. JS writes two unitless variables only. */
.scroll-meter {
  position: fixed; z-index: 30; right: 0; top: 0; bottom: 0; width: 5px;
  background: rgba(23,26,23,.15); pointer-events: none;
}
.scroll-meter span {
  display: block; width: 100%; height: calc(var(--page-progress, 0) * 100%);
  background: linear-gradient(var(--acid), var(--coral), var(--violet));
  box-shadow: 0 0 14px rgba(215,255,82,.8);
}
.hero-copy {
  transform: translate3d(0, calc(var(--hero-progress, 0) * -34px), 0);
  opacity: calc(1 - var(--hero-progress, 0) * .28);
  transition: opacity .08s linear;
}
.hero-visual {
  transform: translate3d(0, calc(var(--hero-progress, 0) * 58px), 0)
             rotate(calc(var(--hero-progress, 0) * 2deg));
}
.thesis-object {
  transform: rotateX(calc(58deg - var(--hero-progress, 0) * 10deg))
             rotateZ(calc(-28deg + var(--hero-progress, 0) * 14deg))
             rotateY(calc(5deg + var(--hero-progress, 0) * 10deg))
             translateZ(calc(var(--hero-progress, 0) * 45px));
}
.orbit-a { rotate: calc(var(--hero-progress, 0) * 18deg); }
.orbit-b { rotate: calc(var(--hero-progress, 0) * -24deg); }
.chip-a { translate: calc(var(--hero-progress, 0) * -36px) calc(var(--hero-progress, 0) * 18px); }
.chip-b { translate: calc(var(--hero-progress, 0) * 34px) calc(var(--hero-progress, 0) * -10px); }
.chip-c { translate: calc(var(--hero-progress, 0) * -12px) calc(var(--hero-progress, 0) * 30px); }
.stage {
  transform: translateY(calc((1 - var(--hero-progress, 0)) * 24px));
  transition: transform .08s linear;
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 3.5rem; }
  .hero-visual { min-height: 440px; max-width: 580px; width: 100%; margin: 0 auto; }
  .nav-links { max-width: 72%; overflow-x: auto; scrollbar-width: none; }
}
@media (max-width: 560px) {
  .nav-links { display: flex; max-width: 68%; }
  .nav-links a { white-space: nowrap; }
  .brand::after { display: none; }
  .hero h1 { font-size: clamp(3.5rem,18vw,5.4rem); }
  .hero-visual { min-height: 350px; }
  .book-cover { padding: 1rem; }
  .stats li { min-width: 33%; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-grid p { grid-template-columns: 5rem 1fr; align-items: center; }
  .trust-grid small { grid-column: 2; }
}
