@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("fonts/caveat-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #f6f1e7;
  --paper-deep: #ede5d4;
  --sheet: #fffdf8;
  --ink: #1d2742;
  --ink-soft: #4b5470;
  --hairline: #d9cfbb;
  --field-border: #8a8170;
  --red: #d7263d;
  --red-ink: #b51f34;
  --red-deep: #a81a2e;
  --pen-blue: #1f3a8a;
  --box-blue: #2f6fd6;
  --rule: #cfd9e6;
  --margin: #ec9aa4;
  --success: #1f6b3a;
  --graphite: #4d5058;
  --focus: #1f3a8a;
  --font: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-hand: "Caveat", "Bradley Hand", cursive;
  --pen-line: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8.5C38 4 80 9.5 120 6s62-1.5 76-3' fill='none' stroke='%23d7263d' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  --header-h: 64px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--ink-soft) var(--paper-deep);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  caret-color: var(--red);
  font-variant-numeric: oldstyle-nums proportional-nums;
}

::selection { background: color-mix(in srgb, var(--red) 22%, transparent); color: var(--ink); }

img, svg { max-width: 100%; }

a { color: inherit; text-decoration-color: color-mix(in srgb, var(--red) 70%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
a:hover { color: var(--red-ink); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

h1, h2, h3 { margin: 0 0 0.5em; font-weight: 650; text-wrap: balance; }
h2, h3 { line-height: 1.25; }
h3 { font-size: 1.2rem; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 1rem; }
.container-narrow { max-width: 780px; }
@media (min-width: 640px) { .container { padding: 0 1.75rem; } }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--ink);
  color: var(--sheet);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  z-index: 100;
}
.skip-link:focus, .skip-link:hover { top: 1rem; color: var(--sheet); }

.pen-underline {
  background: var(--pen-line) left bottom / 100% 0.32em no-repeat;
  padding-bottom: 0.1em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; font-weight: 700; font-size: 1.2rem; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; color: var(--red); }
.site-header nav { margin-left: auto; }
.nav-list { display: none; list-style: none; margin: 0; padding: 0; gap: 0.5rem; }
.nav-list a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.6rem; text-decoration: none; color: var(--ink-soft); }
.nav-list a:hover { color: var(--ink); text-decoration: underline; }
@media (min-width: 760px) { .nav-list { display: flex; } }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: 6px;
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s, box-shadow 0.18s;
}
.btn-small { min-height: 44px; padding: 0.45rem 1rem; font-size: 1rem; }
.site-header .btn-small { margin-left: auto; }
@media (min-width: 760px) { .site-header .btn-small { margin-left: 0; } }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 1px 2px rgb(120 20 30 / 0.25); }
.btn-primary:hover { background: var(--red-deep); color: #fff; box-shadow: 0 4px 12px -4px rgb(120 20 30 / 0.45); }
.btn-primary[disabled] { opacity: 0.7; cursor: progress; }
.btn-ghost { border-color: var(--ink-soft); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: var(--sheet); }

/* Hero */
.hero { padding: 2.5rem 0 4rem; }
.hero-grid { display: grid; gap: 2.75rem; align-items: center; }
.hero-grid > * { min-width: 0; }
@media (max-width: 939px) {
  .hero-copy { display: contents; }
  .hero-grid { gap: 0; }
  .hero-figure { order: 1; margin-top: 2rem; }
  .hero-note { order: 2; margin-top: 1.5rem; }
}
@media (min-width: 940px) {
  .hero { padding: 4.5rem 0 6rem; }
  .hero-grid { grid-template-columns: 1.12fr 0.88fr; gap: 4rem; }
}
.hero h1 {
  font-size: clamp(1.8rem, 7.4vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 1.5rem;
  hyphens: manual;
}
.hero h1 .pen-underline { color: var(--red-ink); }
.hero h1 .pen-underline { display: inline; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 60ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 1.25rem; }
.cta-row .btn { flex: 1 1 auto; }
@media (min-width: 480px) { .cta-row .btn { flex: 0 0 auto; } }
.hero-note { font-size: 0.98rem; color: var(--ink-soft); max-width: 52ch; }

.hero-figure { margin: 0; }
.hero-figure figcaption { text-wrap: balance; text-align: center; font-size: 0.95rem; color: var(--ink-soft); margin-top: 1rem; font-style: italic; }
.essay {
  display: block;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  transform: rotate(1.2deg);
  filter: drop-shadow(0 18px 28px rgb(60 45 20 / 0.18)) drop-shadow(0 2px 3px rgb(60 45 20 / 0.12));
}

/* Paper sheets (shared by hero and journey) */
.paper { fill: var(--sheet); }
.margin-line { stroke: var(--margin); stroke-width: 1.5; }
.ruling line { stroke: var(--rule); stroke-width: 1; }
.redact { fill: #15161a; }
.sheet .hand { font-size: 22px; }
.hand { font-family: var(--font-hand); font-size: 23px; fill: var(--pen-blue); }
.hand-title { font-size: 25px; font-weight: 600; text-decoration: underline; }
.redpen .pen-stroke { fill: none; stroke: var(--red); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.redpen .mark { font-family: var(--font-hand); font-size: 30px; font-weight: 700; fill: var(--red); }
.teacher-note { fill: var(--graphite); font-size: 23px; }
.teacher-grade { fill: var(--graphite); font-size: 38px; font-weight: 700; }
.teacher-label { font-family: var(--font); font-size: 14px; font-style: italic; fill: var(--graphite); text-anchor: end; }
.review-card .card { fill: #fff; stroke: var(--hairline); stroke-width: 1; filter: drop-shadow(0 3px 5px rgb(60 45 20 / 0.16)); }
.review-card .card-text { font-family: var(--font); font-size: 12px; fill: var(--ink); }
.review-card .card-mark { font-family: var(--font-hand); font-size: 17px; font-weight: 700; fill: var(--red); }
.review-card .btn-accept { fill: var(--ink); }
.review-card .btn-reject { fill: #fff; stroke: var(--field-border); stroke-width: 1.2; }
.review-card .icon-accept { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.review-card .icon-reject { fill: none; stroke: var(--ink-soft); stroke-width: 1.8; stroke-linecap: round; }
.review-card .card-meta { font-family: var(--font); font-size: 11px; fill: var(--ink-soft); text-anchor: end; }
.boxes rect { fill: color-mix(in srgb, var(--box-blue) 6%, transparent); stroke: var(--box-blue); stroke-width: 1.2; rx: 2; }
.scribble { fill: none; stroke: var(--pen-blue); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.redpen .pen-dashed { fill: none; stroke: var(--red); stroke-width: 1.5; stroke-dasharray: 4 3; }
.redpen .unreadable { font-family: var(--font-hand); font-size: 15px; font-weight: 700; fill: var(--red); }
.sheet-foot text { font-family: var(--font); font-size: 13px; font-style: italic; fill: var(--graphite); }
.sheet-foot line { stroke: var(--graphite); stroke-width: 1; }
.box-num text { font-family: var(--font); font-size: 9.5px; font-weight: 700; fill: var(--box-blue); }

@media (prefers-reduced-motion: no-preference) {
  .essay .redpen .pen-stroke {
    stroke-dasharray: 1;
    animation: pen-draw 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .essay .redpen text { animation: pen-ink 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .essay .redpen :nth-child(1), .essay .redpen :nth-child(2) { animation-delay: 0.5s; }
  .essay .redpen :nth-child(3), .essay .redpen :nth-child(4) { animation-delay: 0.85s; }
  .essay .redpen :nth-child(5), .essay .redpen :nth-child(6) { animation-delay: 1.2s; }
  .essay .redpen :nth-child(7), .essay .redpen :nth-child(8) { animation-delay: 1.55s; }
  .essay .teacher { animation: pen-ink 0.6s cubic-bezier(0.16, 1, 0.3, 1) 2.1s both; }
}
@keyframes pen-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pen-ink { from { opacity: 0; } to { opacity: 1; } }

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--paper-deep); }
@media (min-width: 940px) { .section { padding: 6rem 0; } }
.section-title { font-size: clamp(1.75rem, 4.4vw, 2.5rem); line-height: 1.18; letter-spacing: -0.015em; margin-bottom: 1.5rem; }

.split { display: grid; gap: 1.5rem 4rem; }
@media (min-width: 940px) {
  .split { grid-template-columns: 0.85fr 1.15fr; align-items: start; }
  .split > :first-child { position: sticky; top: calc(var(--header-h) + 2.5rem); }
}

.prose-list { list-style: none; margin: 0; padding: 0; }
.prose-list li { padding: 1.25rem 0; border-top: 1px solid var(--hairline); color: var(--ink-soft); max-width: 62ch; }
.prose-list li:first-child { border-top: 0; padding-top: 0.25rem; }
.prose-list strong { display: block; color: var(--ink); font-size: 1.25rem; margin-bottom: 0.2rem; }

/* Journey */
.journey { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 3rem; counter-reset: journey; }
@media (min-width: 900px) { .journey { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.journey-step p { color: var(--ink-soft); margin: 0; }
.journey-step h3 { margin-top: 1.4rem; }
.sheet {
  display: block;
  width: 100%;
  filter: drop-shadow(0 10px 18px rgb(60 45 20 / 0.14)) drop-shadow(0 1px 2px rgb(60 45 20 / 0.12));
}
.journey-step:nth-child(2) .sheet { transform: rotate(-0.8deg); }
.journey-step:nth-child(3) .sheet { transform: rotate(0.7deg); }
.journey-note { margin: 3rem 0 0; padding-top: 1.75rem; border-top: 1px solid var(--hairline); color: var(--ink-soft); }
.journey-note p { max-width: 75ch; margin: 0 0 0.4rem; }
.marks-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0.5rem 1.5rem; margin: 0 0 1.25rem; padding: 0; }
.marks-legend div { display: flex; align-items: baseline; gap: 0.45rem; }
.marks-legend dt { font-family: var(--font-hand); font-size: 1.6rem; font-weight: 700; line-height: 1; color: var(--red-ink); min-width: 1.3em; text-align: right; }
.marks-legend dd { margin: 0; color: var(--ink); }

/* Privacy */
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 1.1rem 0 1.1rem 2.6rem; border-top: 1px solid var(--hairline); color: var(--ink-soft); max-width: 62ch; }
.ticks li:first-child { border-top: 0; padding-top: 0.25rem; }
.ticks li:first-child::before { top: 0.4rem; }
.ticks li strong { color: var(--ink); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.25rem;
  width: 1.6rem;
  height: 1.4rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 22'%3E%3Cpath d='M2 12.5c2.5 1.6 4.6 4 6.2 7C12 12 17 6 24 2' fill='none' stroke='%23d7263d' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.honest { margin: 1.5rem 0 0; padding: 1.25rem 1.4rem; background: var(--sheet); border-radius: 4px; box-shadow: 0 1px 2px rgb(60 45 20 / 0.1); color: var(--ink); max-width: 62ch; }
.honest-lead { font-family: var(--font-hand); font-size: 1.6rem; font-weight: 700; line-height: 1; color: var(--red-ink); margin-right: 0.2rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--hairline); }
.faq details:first-child { border-top: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 56px;
  padding: 0.9rem 0.25rem;
  font-weight: 650;
  font-size: 1.15rem;
}
.faq summary:hover { color: var(--red-ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--font-hand);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--red);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-soft); padding: 0 0.25rem 0.75rem; max-width: 68ch; }

/* Waitlist */
.sheet-card {
  background: var(--sheet);
  border-radius: 4px;
  padding: 1.75rem 1.25rem;
  box-shadow: 0 18px 40px -18px rgb(60 45 20 / 0.28), 0 1px 3px rgb(60 45 20 / 0.12);
}
@media (min-width: 640px) { .sheet-card { padding: 3rem 3.25rem; } }

.form { margin-top: 1.75rem; display: grid; gap: 1.4rem; }
.field { display: grid; gap: 0.35rem; min-width: 0; }
.field-row { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label, .choice legend { font-weight: 650; }
.optional { font-weight: 400; color: var(--ink-soft); white-space: nowrap; }

.form input[type="email"],
.form input[type="text"],
.form select:not([hidden]) {
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.8rem;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--field-border);
  border-radius: 6px;
}
.form input:hover, .form select:hover { border-color: var(--ink-soft); }
.form input::placeholder { color: var(--ink-soft); opacity: 1; }
.form [aria-invalid="true"] { border-color: var(--red-ink); box-shadow: 0 0 0 1px var(--red-ink); }

.choice { border: 0; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.choice legend { padding: 0; margin-bottom: 0.6rem; }
.choice-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--field-border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink-soft);
  transition: border-color 0.18s, background-color 0.18s;
}
.choice-option strong { color: var(--ink); }
.choice-option:hover { border-color: var(--ink); }
.choice-option:has(input:checked) { border-color: var(--focus); background: color-mix(in srgb, var(--focus) 6%, var(--sheet)); }
.choice-option input { width: 22px; height: 22px; margin: 0.2rem 0 0; accent-color: var(--focus); }
.check input { width: 22px; height: 22px; margin: 0.2rem 0 0; accent-color: var(--red); }

.more { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.more summary { cursor: pointer; padding: 0.8rem 0; font-weight: 650; }
.more summary::marker { color: var(--red); }
.more-body { display: grid; gap: 1.1rem; padding: 0.25rem 0 1.25rem; }

.check { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; }
.check label { color: var(--ink-soft); font-size: 1rem; }
.check label a { color: var(--ink); }
.check input[aria-invalid="true"] { outline: 2px solid var(--red-ink); outline-offset: 2px; }

.error { color: var(--red-ink); font-weight: 650; font-size: 1rem; margin: 0; }
.error::before { content: "✗ "; font-family: var(--font-hand); font-size: 1.3em; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form .btn { justify-self: start; }
@media (max-width: 479px) { .form .btn { justify-self: stretch; } }
.fineprint { font-size: 0.95rem; color: var(--ink-soft); max-width: 65ch; margin: -0.6rem 0 0; }

.status { border-radius: 6px; padding: 1.1rem 1.25rem; background: var(--paper); border: 1.5px solid var(--hairline); }
.status:focus { outline: none; }
.form.is-done > :not(.status) { display: none; }
.status strong { display: block; font-size: 1.15rem; }
.status[data-state="success"] { border-color: var(--success); }
.status[data-state="success"] strong { color: var(--success); }
.status[data-state="error"] { border-color: var(--red-ink); }
.status[data-state="error"] strong { color: var(--red-ink); }
.status[data-state="dev"] { border-style: dashed; border-color: var(--ink-soft); }
.status p { margin: 0.35rem 0 0; color: var(--ink-soft); max-width: 62ch; }

.contact { margin: 2rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--hairline); color: var(--ink-soft); font-size: 1rem; }

/* Mobile dock */
.dock {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 20;
  box-shadow: 0 10px 24px -8px rgb(120 20 30 / 0.5);
  opacity: 0;
  transform: translateY(150%);
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
}
.dock.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.dock::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -1rem;
  right: -1rem;
  top: -1.5rem;
  bottom: calc(-1 * max(1rem, env(safe-area-inset-bottom)));
  background: linear-gradient(to bottom, transparent, var(--paper) 45%);
  pointer-events: none;
}
@media (min-width: 760px) { .dock { display: none; } }
@media (max-width: 759px) {
  .site-header .btn-small { transition: opacity 0.2s; }
  .dock-on .site-header .btn-small { opacity: 0; visibility: hidden; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding: 1.5rem 0 6rem; font-size: 1rem; color: var(--ink-soft); }
@media (min-width: 760px) { .site-footer { padding-bottom: 1.5rem; } }
.footer-inner { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; justify-content: space-between; align-items: center; }
.footer-inner p { margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.5rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.4rem; }

/* Consent banner */
.consent {
  position: fixed; z-index: 60; left: 1rem; right: 1rem; bottom: 1rem;
  max-width: 26rem; padding: 1.1rem 1.25rem;
  background: var(--sheet); color: var(--ink);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgb(60 45 20 / 0.14), 0 14px 28px -12px rgb(60 45 20 / 0.32);
}
@media (min-width: 640px) { .consent { left: auto; right: 1.5rem; bottom: 1.5rem; } }
.consent[hidden] { display: none; }
.consent h2 { font-size: 1.2rem; margin: 0 0 0.4rem; }
.consent p { font-size: 0.98rem; color: var(--ink-soft); margin: 0; }
.consent a { color: var(--ink); }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 1rem; }
.consent-actions .btn { min-height: 44px; padding: 0.45rem 0.75rem; font-size: 1rem; background: var(--sheet); font-family: inherit; }
.consent-actions .btn:hover { background: var(--paper-deep); }
@media (max-width: 639px) { .consent p { font-size: 0.93rem; } .consent-actions { margin-top: 0.8rem; } }

.link-button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--red) 70%, transparent);
  text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; min-height: 44px;
}
.link-button:hover { color: var(--red-ink); }
.link-button[hidden] { display: none; }

/* Legal and confirmation pages */
.legal { padding: 2.5rem 0 4rem; }
@media (min-width: 940px) { .legal { padding: 4rem 0 6rem; } }
.legal h1 { font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1.15; letter-spacing: -0.015em; margin-bottom: 0.4rem; }
.legal .legal-meta { color: var(--ink-soft); font-style: italic; margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.45rem; margin: 2.5rem 0 0.6rem; padding-top: 1.5rem; border-top: 1px solid var(--hairline); }
.legal h3 { margin: 1.5rem 0 0.4rem; }
.legal p, .legal li { max-width: 68ch; }
.legal ul { padding-left: 1.2rem; margin: 0 0 1em; }
.legal li { margin-bottom: 0.3rem; }
.legal address { font-style: normal; margin: 0 0 1em; }
.legal code { font-size: 0.92em; background: var(--paper-deep); padding: 0.05em 0.3em; border-radius: 3px; }
.legal .note { margin: 1.25rem 0; padding: 1rem 1.25rem; background: var(--sheet); border-radius: 4px; box-shadow: 0 1px 2px rgb(60 45 20 / 0.1); }
.legal .btn { margin-top: 1rem; }
.back-link { margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); text-decoration: none; }
.back-link:hover { color: var(--ink); text-decoration: underline; }

/* Squared paper (maths) */
.grid line { stroke: var(--rule); stroke-width: 0.8; }

/* Subjects */
.section-subjects { border-top: 1px solid var(--hairline); }
.section-subjects .lead { margin-bottom: 2.5rem; }
.subjects { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .subjects { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.subject a { display: block; text-decoration: none; color: inherit; height: 100%; }
.subject .sheet { transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.subject:nth-child(1) .sheet { transform: rotate(-0.6deg); }
.subject:nth-child(2) .sheet { transform: rotate(0.5deg); }
.subject:nth-child(3) .sheet { transform: rotate(-0.4deg); }
.subject a:hover .sheet, .subject a:focus-visible .sheet { transform: rotate(0deg) translateY(-3px); }
.subject h3 { margin-top: 1.3rem; }
.subject-sub { font-weight: 400; color: var(--ink-soft); font-size: 0.95em; }
.subject p { color: var(--ink-soft); margin: 0 0 0.6rem; }
.subject-link { color: var(--red-ink); font-weight: 650; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
.subject-link::after { content: " →"; }
@media (prefers-reduced-motion: reduce) { .subject .sheet { transition: none; } }

/* Subject pages */
.subject-more { color: var(--ink-soft); margin: 1.75rem 0 0; }

/* Hero: the essay on top of a maths sheet and a typed tablet page */
.hero { overflow-x: clip; }
.stack { position: relative; max-width: 460px; margin: 0 auto 2.75rem; }
.stack .essay { position: relative; z-index: 2; }
.stack-back {
  position: absolute; inset: 0; width: 100%; height: auto; display: block;
  filter: drop-shadow(0 10px 18px rgb(60 45 20 / 0.14)) drop-shadow(0 1px 2px rgb(60 45 20 / 0.1));
}
.stack-math { z-index: 1; transform: translate(7%, -7.5%) rotate(3deg); }
.stack-typed { z-index: 0; transform: translate(-13%, 7%) rotate(-6deg); }
@media (max-width: 639px) {
  .stack { margin-bottom: 2rem; }
  .stack-math { transform: translate(5%, -2.5%) rotate(4deg); }
  .stack-typed { transform: translate(-6%, 5.5%) rotate(-4deg); }
}
.tablet { fill: #2a2f3d; }
.screen-bar { fill: var(--paper-deep); }
.typed { font-family: "Helvetica Neue", Arial, sans-serif; font-size: 15px; fill: var(--ink); }
.typed-bar { font-size: 12px; fill: var(--ink-soft); }
.mark-small { font-size: 22px; }
.pen-stroke-static { fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; }

/* Goal line */
.goal { margin: 2rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--hairline); font-size: 1.2rem; line-height: 1.5; color: var(--ink); max-width: 56ch; }
.goal-lead { font-family: var(--font-hand); font-size: 1.7rem; font-weight: 700; line-height: 1; color: var(--red-ink); margin-right: 0.25rem; }

/* Subject cards: the mark in the margin, explained */
.subject-key { display: block; margin-top: 0.5rem; font-size: 0.95rem; color: var(--ink-soft); }
.subject-key b { font-family: var(--font-hand); font-size: 1.35rem; font-weight: 700; color: var(--red-ink); margin-right: 0.3rem; }

/* Where the work goes */
.flow-figure { margin: 2rem 0 0; max-width: 460px; }
.flow { display: block; width: 100%; height: auto; }
.flow-sheet { stroke: var(--hairline); stroke-width: 1; filter: drop-shadow(0 4px 6px rgb(60 45 20 / 0.12)); }
.flow-scribble path { fill: none; stroke: var(--pen-blue); stroke-width: 1.5; stroke-linecap: round; }
.flow-ink path { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.flow-box { fill: var(--sheet); stroke: var(--hairline); stroke-width: 1; }
.flow-box-no { fill: transparent; stroke-dasharray: 4 4; }
.flow-label { font-family: var(--font); font-size: 14px; font-weight: 650; fill: var(--ink); }
.flow-sub { font-family: var(--font); font-size: 12.5px; fill: var(--ink-soft); }
.flow-no { fill: var(--ink-soft); }
.flow-hand { font-family: var(--font-hand); font-size: 19px; font-weight: 700; fill: var(--red-ink); }
.flow-strike { fill: none; stroke: var(--red); stroke-width: 2.6; stroke-linecap: round; }

/* Schulträger, Länder, Ministerien: the one dark band */
.section-ink { background: var(--ink); color: var(--paper); }
.section-ink .section-title { color: var(--sheet); }
.section-ink .lead { color: #c9cfdf; }
.section-ink a { color: var(--sheet); text-decoration-color: rgb(255 255 255 / 0.5); }
.section-ink a:hover { color: #fff; }
.section-ink :focus-visible { outline-color: #fff; }
.ticks-ink li { color: #c9cfdf; border-top-color: rgb(255 255 255 / 0.14); }
.ticks-ink li strong { color: var(--sheet); }
.ticks-ink li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 22'%3E%3Cpath d='M2 12.5c2.5 1.6 4.6 4 6.2 7C12 12 17 6 24 2' fill='none' stroke='%23ff7a8a' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.section-ink .cta-row { margin: 1.75rem 0 1rem; }
.section-ink .btn-primary { color: #fff; }
.btn-ghost-light { border-color: rgb(255 255 255 / 0.55); color: var(--sheet); }
.btn-ghost-light:hover { border-color: #fff; color: #fff; background: rgb(255 255 255 / 0.08); }
.authorities-note { color: #c9cfdf; font-size: 1rem; margin: 0; }

/* Critique round 2 */
.lead { text-wrap: pretty; }
.hero-note a { color: inherit; }
.section-rule { border-top: 1px solid var(--hairline); }
.footer-button { padding: 0 0.4rem; }

/* Subjects as rows next to the heading, not a third card grid */
.section-subjects .lead { margin-bottom: 0; }
.subjects { grid-template-columns: 1fr; gap: 0; }
@media (min-width: 900px) { .subjects { grid-template-columns: 1fr; gap: 0; } }
.subject { border-top: 1px solid var(--hairline); }
.subject:first-child { border-top: 0; }
.subject a { display: grid; grid-template-columns: minmax(0, 200px) 1fr; gap: 0.5rem 1.5rem; align-items: start; padding: 1.4rem 0; }
.subject:first-child a { padding-top: 0.25rem; }
.subject a > .sheet { grid-row: span 4; }
.subject h3 { margin: 0.2rem 0 0.2rem; }
.subject p { margin: 0; }
@media (max-width: 559px) { .subject a { grid-template-columns: 1fr; } .subject a > .sheet { grid-row: auto; max-width: 280px; } }

/* Development status */
.status-lists { display: grid; gap: 2rem; }
@media (min-width: 640px) { .status-lists { grid-template-columns: 1fr 1fr; } }
.status-lists h3 { margin: 0 0 0.75rem; }
.ticks-compact li { padding: 0.55rem 0 0.55rem 2.3rem; border-top: 0; }
.ticks-compact li::before { top: 0.6rem; width: 1.35rem; height: 1.2rem; }
.ticks-compact li:first-child::before { top: 0.35rem; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { position: relative; padding: 0.55rem 0 0.55rem 2.3rem; color: var(--ink-soft); }
.todo li:first-child { padding-top: 0.25rem; }
.todo li::before {
  content: ""; position: absolute; left: 0.1rem; top: 0.75rem; width: 1rem; height: 1rem;
  border: 1.6px solid var(--graphite); border-radius: 2px; transform: rotate(-3deg);
}
.todo li:first-child::before { top: 0.45rem; }

/* What the pilot asks */
.pilot-terms { margin: 0 0 0.5rem; padding-left: 1.2rem; color: var(--ink-soft); }
.pilot-terms li { margin: 0.25rem 0; max-width: 62ch; }
.pilot-terms li::marker { color: var(--red); }

/* Consent: slim full-width bar on phones, above the sticky button */
@media (max-width: 639px) {
  .consent { left: 0; right: 0; bottom: 0; max-width: none; border-radius: 0; padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom)); }
  .consent h2 { font-size: 1.05rem; margin-bottom: 0.25rem; }
  body.dock-on .consent { bottom: 4.75rem; box-shadow: 0 -8px 20px -12px rgb(60 45 20 / 0.35); }
}

/* Data flow (draft) */
.draft-stamp {
  display: inline-block; margin: 0 0 1rem; padding: 0.15rem 0.7rem;
  font-family: var(--font-hand); font-size: 1.6rem; font-weight: 700; color: var(--red-ink);
  border: 2px solid var(--red-ink); border-radius: 4px; transform: rotate(-4deg);
}
.flow-steps { padding-left: 1.3rem; }
.flow-steps li { margin-bottom: 0.5rem; max-width: 68ch; }
.table-wrap { overflow-x: auto; margin: 0 0 1em; }
.dataflow table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 1rem; }
.dataflow th, .dataflow td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--hairline); }
.dataflow thead th { color: var(--ink); border-bottom: 1.5px solid var(--ink-soft); }
.dataflow tbody th { font-weight: 600; }
@media print {
  .site-header, .site-footer, .consent, .print-button, .skip-link { display: none !important; }
  body { background: #fff; }
  .legal { padding: 0; }
  .draft-stamp { border-color: #000; color: #000; }
}

/* Phones and tablets: keep the fanned sheets clear of the hero buttons */
@media (max-width: 939px) { .hero-figure { margin-top: 2.5rem; } }
@media (max-width: 639px) { .hero-figure { margin-top: 3rem; } }

/* Hyphenation: body copy breaks long German compounds, headings and controls never auto-hyphenate */
p, li, dd, figcaption, td, th {
  -webkit-hyphens: auto;
  hyphens: auto;
  hyphenate-limit-chars: 10 4 4;
  -webkit-hyphenate-limit-before: 4;
  -webkit-hyphenate-limit-after: 4;
  text-wrap: pretty;
}
h1, h2, h3, summary, label, legend, .btn, .nav-list, .footer-links, .consent-actions, .brand, a[href^="mailto:"] {
  -webkit-hyphens: manual;
  hyphens: manual;
}

/* Phones and tablets: the problem section follows the hero closely */
@media (max-width: 939px) {
  .hero { padding-bottom: 1.5rem; }
  #problem { padding-top: 2.5rem; }
  .split > .section-title, .split > div > .section-title:last-child { margin-bottom: 0.25rem; }
}

/* Footer: one calm line of links that wraps between items, never inside them */
.footer-links { flex-wrap: wrap; gap: 0 1.25rem; }
.footer-links li { -webkit-hyphens: manual; hyphens: manual; white-space: nowrap; }
.footer-links a, .footer-links .footer-button { padding: 0; }
.nav-list li, .consent-actions * { -webkit-hyphens: manual; hyphens: manual; }
@media (max-width: 759px) {
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .footer-links { margin-left: -0.05rem; }
}

/* Subject pages: switcher under the header */
.subject-switch { border-bottom: 1px solid var(--hairline); background: var(--paper); }
.subject-switch ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem 1.5rem; overflow-x: auto; scrollbar-width: none; }
.subject-switch ul::-webkit-scrollbar { display: none; }
.subject-switch li { flex: 0 0 auto; }
.subject-switch a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.subject-switch a:hover { color: var(--ink); }
.subject-switch a[aria-current="page"] { color: var(--ink); font-weight: 650; border-bottom-color: var(--red); }

/* Subject sheets */
.hand-lines path { fill: none; stroke: var(--pen-blue); stroke-width: 1.7; stroke-linecap: round; }
.typed-lg { font-size: 17px; }
.typed-title { font-size: 19px; font-weight: 700; }
.teacher-grade-sm { font-size: 30px; }
.correction { font-family: var(--font-hand); font-size: 21px; font-weight: 700; fill: var(--red); }
.back-title { font-size: 22px; }
@media (max-width: 639px) { .essay .unreadable { font-size: 19px; } }
.marks-note { color: var(--ink-soft); font-size: 1rem; margin: 0; }

/* One subject-specific proof: a marked-up scoring sheet */
.proof { margin: 0; }
.proof table {
  width: 100%; border-collapse: collapse; background: var(--sheet); border-radius: 4px;
  box-shadow: 0 1px 2px rgb(60 45 20 / 0.12), 0 12px 24px -14px rgb(60 45 20 / 0.3);
  transform: rotate(-0.4deg);
}
.proof caption { caption-side: top; text-align: left; padding: 0 0 0.75rem; font-weight: 650; color: var(--ink); }
.proof th, .proof td { padding: 0.65rem 1rem; text-align: left; vertical-align: baseline; border-bottom: 1px solid var(--rule); }
.proof thead th { font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); border-bottom: 1.5px solid var(--hairline); }
.proof tbody th { font-weight: 400; color: var(--ink); }
.proof-mark { font-family: var(--font-hand); font-size: 1.45rem; font-weight: 700; color: var(--red-ink); width: 4.5rem; }
.proof-points { font-family: var(--font-hand); font-size: 1.4rem; font-weight: 600; color: var(--graphite); white-space: nowrap; text-align: right !important; }
.proof tfoot th { font-weight: 650; color: var(--ink); border-bottom: 0; }
.proof tfoot td { border-bottom: 0; }
.proof tfoot .proof-points { color: var(--ink); font-size: 1.6rem; }

/* Shared basis, kept short */
.basis p { max-width: 62ch; color: var(--ink-soft); }
.basis .basis-links { margin: 1rem 0 1.75rem; }
