@font-face {
  font-family: "Bitter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/bitter-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bitter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/bitter-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/work-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/work-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


:root {
  --ochre: #d9a441;
  --ink: #24180b;
  --graphite: #4a3415;
  --pencil: #24572f;
  --paper: #fffdf7;
  --kraft: #ead7b0;
  --tape: rgb(255 253 247 / 0.62);
  --rule: rgb(36 87 47 / 0.14);
  --head: "Bitter", Georgia, serif;
  --body: "Work Sans", "Segoe UI", system-ui, sans-serif;
  --measure: 66ch;
  --gap: clamp(1rem, 3vw, 2.25rem);
}

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

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgb(36 87 47 / 0.2);
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  background:
    radial-gradient(120% 60% at 10% 0%, rgb(255 230 170 / 0.35), transparent 60%),
    radial-gradient(90% 50% at 100% 100%, rgb(150 95 20 / 0.18), transparent 70%),
    var(--ochre);
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--head);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 0.55em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 6.2vw, 4.75rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.18rem, 2vw, 1.4rem); }
p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

a, button, summary, label, select, input { touch-action: manipulation; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 60;
  background: var(--paper);
  color: var(--ink);
  padding: 0.6rem 1rem;
  font-weight: 600;
}
.skip:focus { top: 1rem; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap, .desk { width: min(100% - 2 * var(--gap), 78rem); margin-inline: auto; }

.ring {
  display: inline-grid;
  place-items: center;
  width: 1.9em;
  height: 1.9em;
  flex-shrink: 0;
  border: 2.5px solid var(--pencil);
  border-radius: 52% 46% 50% 48% / 48% 52% 46% 54%;
  color: var(--pencil);
  font-family: var(--head);
  font-weight: 700;
  line-height: 1;
}
.ring.big { font-size: clamp(1.6rem, 3vw, 2.2rem); background: var(--paper); }

.top { padding-top: 1.1rem; }
.top-row {
  width: min(100% - 2 * var(--gap), 78rem);
  margin-inline: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 3px solid var(--ink);
}
.top-row > * { flex-shrink: 0; white-space: nowrap; }
.tag-brand {
  display: inline-block;
  margin: 0 0 0.9rem 0.3rem;
  padding: 0.45rem 1rem 0.5rem;
  background: var(--paper);
  font-family: var(--head);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  text-decoration: none;
  rotate: -2deg;
  box-shadow: 0 6px 10px -6px rgb(60 35 5 / 0.5);
  position: relative;
}
.tag-brand::after {
  content: "";
  position: absolute;
  top: -0.6rem;
  left: 1.2rem;
  width: 3.6rem;
  height: 1.2rem;
  background: var(--tape);
  rotate: 4deg;
}
.tabs { display: flex; align-items: flex-end; }
.tabs-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 46px;
  margin-bottom: 0.7rem;
  padding: 0.5rem 1rem;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 600 1rem/1 var(--body);
  cursor: pointer;
  anchor-name: --tabs-toggle;
}
.tabs-toggle svg { width: 1.3rem; height: 1.3rem; }
.tabs-list {
  position: fixed;
  inset: auto;
  top: 4.5rem;
  top: anchor(--tabs-toggle bottom);
  right: 1rem;
  margin: 0.4rem 0 0;
  width: min(80dvw, 20rem);
  max-height: calc(100dvh - 6rem);
  overflow: auto;
  padding: 0.6rem 0;
  list-style: none;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 16px 28px -14px rgb(60 35 5 / 0.6);
}
.tabs-list a {
  display: block;
  padding: 0.75rem 1.2rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.tabs-list a[aria-current="page"] { font-weight: 700; text-decoration: underline 3px var(--pencil); text-underline-offset: 0.3em; }

.top.is-wide .tabs-toggle { display: none; }
.top.is-wide .tabs-list {
  position: static;
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  width: auto;
  max-height: none;
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.top.is-wide .tabs-list a {
  padding: 0.6rem 1rem 0.5rem;
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: var(--kraft);
}
.top.is-wide .tabs-list li:nth-child(even) a { background: var(--paper); }
.top.is-wide .tabs-list a:hover { padding-bottom: 0.8rem; }
.top.is-wide .tabs-list a[aria-current="page"] {
  padding-bottom: 1rem;
  background: var(--paper);
  text-decoration: none;
  box-shadow: inset 0 4px 0 var(--pencil);
}
.top.is-measuring * { transition: none !important; }
@media (prefers-reduced-motion: no-preference) {
  .top.is-wide .tabs-list a { transition: padding-bottom 0.15s ease-out; }
}

main { padding-bottom: clamp(3rem, 8vw, 6rem); }

.collage {
  position: relative;
  display: grid;
  gap: 2rem;
  padding-block: clamp(2rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem);
}
.sheet-hero {
  position: relative;
  padding: clamp(1.6rem, 4vw, 3.2rem);
  background: var(--paper);
  rotate: -1.2deg;
  box-shadow: 0 1px 0 rgb(36 24 11 / 0.06), 0 22px 34px -20px rgb(60 35 5 / 0.6);
}
.sheet-hero::before {
  content: "";
  position: absolute;
  top: -0.9rem;
  left: 50%;
  width: 7rem;
  height: 1.7rem;
  translate: -50% 0;
  rotate: -3deg;
  background: var(--tape);
}
.sheet-hero a { color: var(--pencil); }
.sheet-hero h1 { max-width: 12ch; }
.sheet-hero .lead { font-size: clamp(1.08rem, 1.5vw, 1.22rem); max-width: 52ch; }
.start { margin: 1.6rem 0 0; font-weight: 600; font-size: 1.08rem; }
.start a { color: var(--pencil); text-decoration-thickness: 2px; }
.start span { color: var(--graphite); font-weight: 400; margin-inline: 0.35rem; }
.snapshot {
  margin: 0;
  padding: 0.7rem 0.7rem 0.7rem;
  background: var(--paper);
  position: relative;
  rotate: 2deg;
  box-shadow: 0 18px 30px -18px rgb(60 35 5 / 0.65);
}
.snapshot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.snapshot::before {
  content: "";
  position: absolute;
  top: -0.8rem;
  left: 18%;
  width: 5.5rem;
  height: 1.6rem;
  rotate: -8deg;
  background: var(--tape);
  z-index: 1;
}
.snapshot::after {
  content: "";
  position: absolute;
  bottom: -0.7rem;
  right: 12%;
  width: 5.5rem;
  height: 1.6rem;
  background: var(--tape);
  rotate: 6deg;
}
.pencil-arrow { display: none; color: var(--ink); width: 9rem; }
.scrap {
  justify-self: start;
  margin: 0;
  padding: 0.5rem 1rem;
  background: var(--kraft);
  font-family: var(--head);
  font-size: 1.05rem;
  rotate: -3deg;
  box-shadow: 0 6px 10px -7px rgb(60 35 5 / 0.55);
}
@media (min-width: 960px) {
  .collage {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: clamp(2rem, 5vw, 4.5rem);
  }
  .sheet-hero { grid-row: 1 / 3; margin-top: 1rem; }
  .snapshot { margin-top: 3rem; }
  .pencil-arrow { display: block; position: absolute; left: 47%; top: 1.5rem; rotate: 8deg; }
  .scrap { justify-self: end; margin-right: 8%; }
}

.steps, .tracker { margin-block: 1.5rem 0; }
.steps ol, .tracker ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  position: relative;
}
.steps ol::before {
  content: "";
  position: absolute;
  left: 1.55rem;
  top: 0.8rem;
  bottom: 0.8rem;
  border-left: 2.5px dashed var(--ink);
}
.steps a, .tracker a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 48px;
  padding: 0.35rem 1rem 0.35rem 0.5rem;
  background: var(--kraft);
  font-family: var(--head);
  font-size: 1.1rem;
  text-decoration: none;
  box-shadow: 0 5px 8px -6px rgb(60 35 5 / 0.55);
}
.steps li:nth-child(odd) a { rotate: -1.2deg; }
.steps li:nth-child(even) a { rotate: 1deg; background: var(--paper); }
.steps .ring, .tracker .ring { background: var(--paper); font-size: 1rem; }
.steps a:is(:target-current, .target-current), .tracker a:is(:target-current, .target-current) {
  background: var(--ink);
  color: var(--paper);
}
.steps a:is(:target-current, .target-current) .ring, .tracker a:is(:target-current, .target-current) .ring { color: var(--pencil); border-color: var(--paper); }
.steps { scroll-target-group: auto; }
.tracker { scroll-target-group: auto; }
@media (min-width: 760px) {
  .steps ol { grid-template-columns: repeat(5, auto); justify-content: space-between; }
  .steps ol::before { left: 1rem; right: 1rem; top: 50%; bottom: auto; border-left: 0; border-top: 2.5px dashed var(--ink); }
}

.path { padding-block: clamp(2.5rem, 6vw, 4.5rem) 1rem; }
.path-intro { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.path-intro p { font-size: 1.08rem; color: var(--ink); }
.lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(2.2rem, 5vw, 3.5rem); }
.lesson {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  scroll-margin-top: 5rem;
}
.lesson-sheet {
  position: relative;
  padding: 0.8rem 0.8rem 1.4rem;
  background: var(--paper);
  max-width: 34rem;
}
.lesson-sheet img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 1.1rem; }
.lesson-sheet h3, .lesson-sheet p { padding-inline: 0.5rem; }
.lesson-sheet h3 a { color: var(--ink); text-decoration: none; }
.lesson-sheet h3 a:hover { text-decoration: underline; }
.lesson-sheet h3 a::after { content: ""; position: absolute; inset: 0; }
.lesson-sheet:has(a:focus-visible) { outline: 3px solid var(--ink); outline-offset: 5px; }
.lesson-sheet h3 a:focus-visible { outline: none; }
.pencil-tags {
  margin: 0;
  font-family: var(--head);
  font-size: 0.95rem;
  color: var(--pencil);
}
.lesson:nth-child(1) .lesson-sheet { rotate: -1.4deg; box-shadow: 0 16px 24px -16px rgb(60 35 5 / 0.55); }
.lesson:nth-child(2) .lesson-sheet { rotate: 1.1deg; box-shadow: 0 6px 10px -6px rgb(60 35 5 / 0.5); }
.lesson:nth-child(3) .lesson-sheet { rotate: -0.6deg; }
.lesson:nth-child(4) .lesson-sheet { rotate: 1.6deg; box-shadow: 0 20px 30px -20px rgb(60 35 5 / 0.6); }
.lesson-last .lesson-sheet { rotate: -1deg; background: var(--kraft); padding-top: 1.4rem; }
.lesson .lesson-sheet::before {
  content: "";
  position: absolute;
  top: -0.8rem;
  left: var(--tape-x, 50%);
  width: 5.5rem;
  height: 1.6rem;
  translate: -50% 0;
  rotate: var(--tape-r, -3deg);
  background: var(--tape);
}
.lesson:nth-child(2) { --tape-x: 20%; --tape-r: 5deg; }
.lesson:nth-child(3) { --tape-x: 78%; --tape-r: -6deg; }
.lesson:nth-child(4) { --tape-x: 30%; --tape-r: 2deg; }
.lesson:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(clamp(1.6rem, 3vw, 2.2rem) * 0.95);
  top: clamp(3.4rem, 6vw, 4.6rem);
  bottom: calc(clamp(2.2rem, 5vw, 3.5rem) * -1);
  border-left: 2.5px dashed var(--ink);
}
@media (min-width: 900px) {
  .lessons { grid-template-columns: repeat(12, minmax(0, 1fr)); row-gap: 0; }
  .lesson { grid-column: 1 / span 7; }
  .lessons {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M30 8 C 60 14, 70 18, 70 28 S 30 40, 30 50 S 70 62, 70 72 S 40 86, 30 94' fill='none' stroke='%2324180b' stroke-width='2.5' stroke-dasharray='8 7' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  }
  .lesson-sheet { max-width: 31rem; }
  .lesson:nth-child(even) { grid-column: 6 / span 7; margin-top: -4rem; }
  .lesson:nth-child(even) { grid-template-columns: minmax(0, 1fr) auto; justify-items: end; }
  .lesson:nth-child(even) .ring { order: 2; }
  .lesson:nth-child(3) { margin-top: -2rem; }
  .lesson:nth-child(5) { margin-top: -1rem; }
  .lesson:not(:last-child)::after { display: none; }
}

.index-card {
  display: grid;
  gap: 1.2rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: 1.2rem;
  max-width: 50rem;
  background:
    linear-gradient(transparent 3.3rem, rgb(36 87 47 / 0.45) 3.3rem, rgb(36 87 47 / 0.45) calc(3.3rem + 2px), transparent calc(3.3rem + 2px)),
    var(--paper);
  rotate: -0.8deg;
  margin-left: auto;
  box-shadow: 0 10px 18px -12px rgb(60 35 5 / 0.55);
}
.index-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.index-card h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.index-card h2 a { color: var(--pencil); }
@media (min-width: 700px) {
  .index-card { grid-template-columns: 15rem 1fr; align-items: center; }
}

.bench { padding-block: clamp(3rem, 7vw, 5rem) 1rem; }
.bench-head { max-width: 44rem; margin-bottom: 2rem; }
.bench-head p { font-size: 1.08rem; }
.bench-grid { display: grid; gap: clamp(2rem, 4vw, 3rem); align-items: start; }
@media (min-width: 1040px) {
  .bench-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
}
.graph-sheet {
  position: relative;
  padding: clamp(1.3rem, 3vw, 2rem);
  background:
    linear-gradient(var(--rule) 1px, transparent 1px) 0 0 / 1.25rem 1.25rem,
    linear-gradient(90deg, var(--rule) 1px, transparent 1px) 0 0 / 1.25rem 1.25rem,
    var(--paper);
  rotate: 0.8deg;
  box-shadow: 0 14px 22px -14px rgb(60 35 5 / 0.6);
}
.graph-sheet::before {
  content: "";
  position: absolute;
  top: -0.8rem;
  left: 70%;
  width: 6rem;
  height: 1.6rem;
  rotate: 7deg;
  background: var(--tape);
}
.kraft-sheet {
  padding: clamp(1.3rem, 3vw, 2rem);
  background: var(--kraft);
  rotate: -0.5deg;
}
.kraft-sheet p { color: var(--graphite); }

.calc fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); }
.calc legend { font-family: var(--head); font-size: 1.35rem; margin-bottom: 1rem; padding: 0; }
.field { display: flex; flex-direction: column; gap: 0.25rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field small { color: var(--graphite); font-size: 0.85rem; }
input, select {
  font: inherit;
  font-size: max(1rem, 1em);
  min-height: 48px;
  padding: 0.5rem 0.7rem;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--graphite);
  border-radius: 0;
}
input:user-invalid { border-color: #9b2c13; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.3rem;
  border: 2px solid var(--pencil);
  background: var(--pencil);
  color: var(--paper);
  font: 600 1rem/1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #1b4524; }
.btn.ghost { background: transparent; color: var(--pencil); }
.btn.ghost:hover { background: rgb(36 87 47 / 0.08); }
.job .btn.ghost { color: var(--pencil); }
.calc .btn { margin-top: 1.2rem; }
.calc output { display: block; margin-top: 1.4rem; padding-top: 1.1rem; border-top: 2px dashed var(--pencil); }
.calc dl { display: grid; grid-template-columns: 1fr auto; gap: 0.45rem 1rem; margin: 0; }
.calc dt { color: var(--graphite); }
.calc dd { margin: 0; font-family: var(--head); font-size: 1.25rem; text-align: right; font-variant-numeric: tabular-nums; }
.calc .verdict { margin: 1rem 0 0; font-weight: 600; }

.table-box { overflow-x: auto; container-type: inline-size; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.96rem; }
caption { text-align: left; padding: 0 0 0.6rem; font-family: var(--head); font-size: 1.15rem; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 0.8rem; border-bottom: 1px solid rgb(36 24 11 / 0.2); }
thead th { color: var(--graphite); font-weight: 600; font-size: 0.88rem; border-bottom: 2px solid var(--ink); }
tbody th { font-family: var(--head); color: var(--pencil); }
tbody tr:last-child > * { border-bottom: 0; }
@container (width < 40rem) {
  .stages, .stages thead, .stages tbody, .stages tr, .stages th, .stages td, .stages caption { display: block; }
  .stages thead { display: none; }
  .stages tr { padding: 0.5rem 0; border-bottom: 1px solid rgb(36 24 11 / 0.2); }
  .stages tbody th, .stages td { border: 0; padding: 0.2rem 0; }
  .stages td::before { content: attr(data-col) ": "; color: var(--graphite); font-weight: 600; }
}

.folded-note {
  position: relative;
  margin: clamp(3rem, 7vw, 5rem) 0 0;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  max-width: 54rem;
  background: linear-gradient(225deg, transparent 2.2rem, var(--paper) 2.2rem);
  rotate: 0.6deg;
}
.folded-note::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 3.1rem;
  height: 3.1rem;
  background: linear-gradient(225deg, transparent 50%, var(--kraft) 50%);
  box-shadow: -3px 3px 6px -3px rgb(60 35 5 / 0.4);
}
.folded-note p { max-width: var(--measure); }
@media (min-width: 900px) {
  .folded-note { columns: 2; column-gap: 3rem; }
  .folded-note h2 { column-span: all; }
}

.envelope {
  margin: clamp(3rem, 7vw, 5rem) 0 0 auto;
  max-width: 64rem;
  background: var(--kraft);
  position: relative;
  padding: clamp(4rem, 8vw, 6rem) clamp(1.2rem, 3vw, 2.4rem) clamp(1.4rem, 3vw, 2.4rem);
}
.envelope::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: clamp(3rem, 7vw, 5rem);
  background: #dcc391;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.envelope-flap { position: relative; max-width: 44rem; }
.envelope-flap p { color: var(--graphite); }
.contact-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); margin-block: 1.2rem 0.5rem; }
.contact-card { padding: 1.1rem 1.2rem; background: var(--paper); }
.contact-card h3 { margin: 0 0 0.7rem; font-size: 1.12rem; }
.contact-card dl { margin: 0; display: grid; gap: 0.4rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.contact-card dt { color: var(--graphite); font-size: 0.88rem; }
.contact-card dd { margin: 0 0 0.6rem; overflow-wrap: anywhere; }
.contact-card a { color: var(--pencil); }
.contact-card ul { margin: 0; padding-left: 1.1rem; }

.foot { background: var(--ink); color: var(--paper); padding-block: 0 2rem; font-size: 0.95rem; }
.foot a { color: var(--paper); }
.warning {
  position: relative;
  top: -1.4rem;
  max-width: 52rem;
  margin: 0;
  padding: 0.9rem 1.2rem;
  background: var(--paper);
  color: var(--ink);
  rotate: -0.6deg;
  font-size: 0.95rem;
  box-shadow: 0 8px 14px -8px rgb(0 0 0 / 0.5);
}
.warning p { margin: 0; }
.foot-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr)); padding-top: 1.2rem; }
.foot h2 { font-size: 1.02rem; margin-bottom: 0.6rem; color: var(--kraft); }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot ul li { overflow-wrap: anywhere; }
.foot ul a { display: inline-block; padding: 0.35rem 0; text-decoration: none; }
.foot ul a:hover, .foot ul a[aria-current="page"] { text-decoration: underline; }
.foot-name { font-family: var(--head); font-size: 1.35rem; margin-bottom: 0.4rem; }
.foot-brand p:not(.foot-name) { color: var(--kraft); max-width: 30ch; }
.copy { margin: 2rem 0 0; padding-top: 1.1rem; border-top: 1px solid rgb(234 215 176 / 0.3); color: var(--kraft); font-size: 0.88rem; }

.page-head {
  position: relative;
  max-width: 48rem;
  margin: clamp(2rem, 6vw, 3.5rem) 0 2.2rem;
  padding: clamp(1.3rem, 3vw, 2rem) clamp(1.3rem, 3vw, 2.2rem);
  background: var(--paper);
  rotate: -1deg;
  box-shadow: 0 12px 20px -14px rgb(60 35 5 / 0.6);
}
.page-head::before {
  content: "";
  position: absolute;
  top: -0.8rem;
  left: 2.5rem;
  width: 6rem;
  height: 1.6rem;
  rotate: -5deg;
  background: var(--tape);
}
.page-head h1 { font-size: clamp(2rem, 5vw, 3.3rem); margin-bottom: 0.4em; }
.page-head p { max-width: 60ch; }
.page-head p:last-child { margin-bottom: 0; }
.lead { font-size: 1.12rem; }

.prose {
  max-width: 52rem;
  padding: clamp(1.4rem, 4vw, 2.8rem);
  background: var(--paper);
  box-shadow: 0 4px 0 -2px #f1e9d8, 0 8px 0 -4px #e9dfca;
}
.prose a { color: var(--pencil); }
.prose > * { max-width: var(--measure); }
.prose h2 { margin-top: 2rem; font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
.prose > h2:first-child, .prose > figure:first-child + h2 { margin-top: 0; }
.prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--pencil); }
.prose figure { margin: 0 0 1.6rem; max-width: none; }
.prose figcaption { color: var(--graphite); font-size: 0.9rem; margin-top: 0.6rem; }
.prose .photo img { width: 100%; }
.prose .contact-grid { max-width: none; }
.prose .contact-card { background: var(--kraft); }
.muted { color: var(--graphite); }

.split { display: grid; gap: 1.2rem; max-width: none; }
@media (min-width: 800px) { .split { grid-template-columns: 1fr 1fr; } }
.split > div { padding: 1.1rem 1.2rem; background: var(--kraft); }
.split > div:nth-child(2) { rotate: 0.8deg; }
.split h2 { font-size: 1.25rem; margin-top: 0; }

.charter { list-style: none; padding: 0; }
.charter li { position: relative; padding-left: 3.2rem; margin-bottom: 1.3rem; counter-increment: point; }
.charter { counter-reset: point; }
.charter li::before {
  content: counter(point);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border: 2.5px solid var(--pencil);
  border-radius: 52% 46% 50% 48% / 48% 52% 46% 54%;
  color: var(--pencil);
  font-family: var(--head);
}
.prose .charter h3 { margin: 0 0 0.3rem; font-size: 1.15rem; padding-top: 0.2rem; }

.jobs { display: grid; gap: clamp(1.6rem, 4vw, 2.4rem); max-width: 60rem; }
.job { position: relative; padding: 1.4rem 1.5rem; background: var(--paper); box-shadow: 0 10px 16px -12px rgb(60 35 5 / 0.55); }
.job:nth-child(odd) { rotate: -0.6deg; }
.job:nth-child(even) { rotate: 0.5deg; margin-left: clamp(0rem, 4vw, 3rem); }
.job::before { content: ""; position: absolute; top: -0.75rem; left: 60%; width: 5rem; height: 1.5rem; rotate: 4deg; background: var(--tape); }
.job h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin-bottom: 0.3rem; }
.job .kind { color: var(--pencil); font-weight: 600; margin-bottom: 0.8rem; }
.job ul { margin: 0; padding-left: 1.2rem; }
.job li { margin-bottom: 0.35rem; }
.job li::marker { color: var(--pencil); }
.apply { margin: 1.1rem 0 0; }

.glossary { max-width: 52rem; margin-top: 2rem; display: grid; gap: 0.6rem; }
.glossary details { background: var(--paper); border-left: 6px solid var(--kraft); }
.glossary details:nth-child(3n + 2) { border-left-color: var(--pencil); }
.glossary details:nth-child(3n) { border-left-color: var(--graphite); }
.glossary summary {
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  font-family: var(--head);
  font-size: clamp(1.12rem, 2vw, 1.3rem);
}
.glossary summary::-webkit-details-marker { display: none; }
.glossary summary::before { content: "+"; width: 1em; color: var(--pencil); font-family: var(--body); font-weight: 700; }
.glossary details[open] > summary::before { content: "\2212"; }
.glossary summary:hover { color: var(--pencil); }
.glossary .def { padding: 0 1.1rem 1.2rem 2.9rem; max-width: 66ch; }
.glossary .ex { color: var(--graphite); font-size: 0.97rem; }
.glossary details::details-content { overflow: clip; contain: layout; interpolate-size: allow-keywords; }
.glossary details:not([open])::details-content { block-size: 0; }
@media (prefers-reduced-motion: no-preference) {
  .glossary details::details-content { transition: block-size 0.25s ease-in-out, content-visibility 0.25s allow-discrete; }
}

.filters {
  display: grid;
  gap: 1.1rem;
  margin-bottom: 2rem;
  padding: 1.1rem 1.2rem;
  background: var(--kraft);
  max-width: 64rem;
}
@media (min-width: 760px) { .filters { grid-template-columns: 1fr auto; align-items: end; } }
.filters fieldset { border: 0; margin: 0; padding: 0; }
.filters legend { font-weight: 600; margin-bottom: 0.5rem; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips label { display: inline-flex; align-items: center; min-height: 44px; padding: 0.35rem 0.9rem; border: 2px solid var(--ink); background: var(--paper); cursor: pointer; user-select: none; }
.chips label:hover { background: #f5ecd8; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips label:has(input:checked) { background: var(--ink); color: var(--paper); font-weight: 600; }
.chips label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.sorter { display: flex; flex-direction: column; gap: 0.25rem; }
.sorter label { font-weight: 600; }

.sheets { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(1.6rem, 3vw, 2.4rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); }
.sheet[hidden] { display: none; }
.catalogue .sheet { view-transition-name: match-element; }
.sheet-paper { position: relative; height: 100%; display: flex; flex-direction: column; padding: 0.6rem 0.6rem 1.1rem; background: var(--paper); }
.sheet:nth-child(1) .sheet-paper { rotate: -1deg; }
.sheet:nth-child(2) .sheet-paper { rotate: 0.8deg; background: var(--kraft); }
.sheet:nth-child(3) .sheet-paper { rotate: -0.4deg; }
.sheet:nth-child(4) .sheet-paper { rotate: 1.2deg; }
.sheet-paper img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.sheet-body { padding: 0.9rem 0.4rem 0; display: flex; flex-direction: column; flex: 1; }
.sheet :is(h2, h3) { font-size: 1.18rem; margin-bottom: 0.45rem; }
.sheet :is(h2, h3) a { color: var(--ink); text-decoration: none; }
.sheet :is(h2, h3) a::after { content: ""; position: absolute; inset: 0; }
.sheet :is(h2, h3) a:focus-visible { outline: none; }
.sheet:has(a:focus-visible) { outline: 3px solid var(--ink); outline-offset: 6px; }
.sheet p { font-size: 0.97rem; }
.sheet .meter { margin: auto 0 0; font-family: var(--head); font-size: 0.88rem; color: var(--pencil); }

.tracker {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: clamp(2.5rem, 6vw, 3.5rem) calc(var(--gap) * -1) 0;
  padding: 0.6rem var(--gap);
  background: var(--ochre);
  border-bottom: 2px solid var(--ink);
}
.tracker ol { grid-auto-flow: column; grid-auto-columns: max-content; gap: 0.5rem; overflow-x: auto; scrollbar-width: thin; padding: 0.2rem; }
.tracker a { font-size: 1rem; min-height: 44px; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none; }
}

.article {
  display: grid;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  padding-top: clamp(2.5rem, 6vw, 4rem);
  scroll-margin-top: 5.5rem;
}
.article:focus { outline: none; }
.article .prose {
  position: relative;
  padding-left: clamp(1.6rem, 6vw, 4.2rem);
  background:
    linear-gradient(90deg, transparent calc(clamp(1.6rem, 6vw, 4.2rem) - 0.9rem), rgb(36 87 47 / 0.55) calc(clamp(1.6rem, 6vw, 4.2rem) - 0.9rem), rgb(36 87 47 / 0.55) calc(clamp(1.6rem, 6vw, 4.2rem) - 0.75rem), transparent calc(clamp(1.6rem, 6vw, 4.2rem) - 0.75rem)),
    var(--paper);
}
@media (min-width: 1100px) {
  .article { grid-template-columns: 14rem minmax(0, 1fr); align-items: start; }
  .article .facts { position: sticky; top: 5.5rem; }
}
.facts {
  padding: 1rem 1.1rem;
  background: var(--kraft);
  font-size: 0.92rem;
  rotate: -1.5deg;
  max-width: 24rem;
}
.facts .ring.big { margin-bottom: 0.9rem; }
.facts dl { margin: 0; display: grid; gap: 0.55rem; }
.facts dt { color: var(--graphite); font-size: 0.8rem; font-weight: 600; }
.facts dd { margin: 0; }
.facts a { color: var(--pencil); }
.facts .src { word-break: break-word; }
.article-cover { position: relative; margin: 0 0 1.8rem; max-width: 40rem; rotate: 1deg; }
.article-cover::before { content: ""; position: absolute; top: -0.7rem; left: 15%; width: 5rem; height: 1.5rem; rotate: -6deg; background: var(--tape); z-index: 1; }
.article-cover img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border: 0.5rem solid #fff; box-shadow: 0 10px 16px -12px rgb(60 35 5 / 0.6); }

.diagram { margin: 1.8rem 0; padding: 1.1rem; background: var(--kraft); max-width: 40rem; }
.diagram svg { width: 100%; height: auto; }
.diagram figcaption { color: var(--graphite); margin-top: 0.7rem; font-size: 0.9rem; }

.task {
  position: relative;
  margin-top: 2.2rem;
  padding: 1.2rem 1.3rem;
  background:
    repeating-linear-gradient(transparent 0 1.6rem, rgb(36 87 47 / 0.12) 1.6rem calc(1.6rem + 1px)),
    #fff;
  border-top: 4px solid var(--pencil);
  rotate: -0.7deg;
  box-shadow: 0 8px 14px -10px rgb(60 35 5 / 0.55);
}
.task::before { content: ""; position: absolute; top: -0.9rem; right: 12%; width: 4.5rem; height: 1.5rem; rotate: 5deg; background: var(--tape); }
.task h3 { color: var(--pencil); font-size: 1.15rem; margin: 0 0 0.6rem; }
.task p:last-child, .task ol:last-child { margin-bottom: 0; }

.term { color: inherit; text-decoration: underline dotted var(--pencil); text-decoration-thickness: 2px; text-underline-offset: 0.22em; cursor: help; }
.prose a.term { color: inherit; }

.term-card { width: min(100% - 2rem, 30rem); padding: 1.5rem; border: 0; border-top: 6px solid var(--pencil); background: var(--paper); color: var(--ink); }
.term-card::backdrop { background: rgb(36 24 11 / 0.55); overflow: hidden; overscroll-behavior: contain; }
.term-card:modal { overscroll-behavior: contain; }
.term-card h2 { font-size: 1.5rem; margin-bottom: 0.7rem; }
.term-card .ex { color: var(--graphite); font-size: 0.95rem; }
.term-card form { margin: 1rem 0 0; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.term-card a { color: var(--pencil); font-weight: 600; }

.testing { padding-top: clamp(3rem, 7vw, 5rem); scroll-margin-top: 5.5rem; }
.testing:focus { outline: none; }
.testing .prose { rotate: 0.4deg; }
.testing .ring.big { margin-bottom: 0.8rem; }

.lost { min-height: 100vh; display: grid; place-content: center; padding: 2rem; }
.lost > div { padding: clamp(1.5rem, 5vw, 3rem); background: var(--paper); rotate: -1.5deg; max-width: 34rem; box-shadow: 0 16px 26px -16px rgb(60 35 5 / 0.6); }
.lost h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
.lost p { color: var(--graphite); }
.lost .code { font-family: var(--head); color: var(--pencil); font-size: 1.1rem; margin-bottom: 0.8rem; }
body.bare { padding: 0; }

@media (max-width: 600px) {
  .sheet-hero { rotate: -0.6deg; }
  .snapshot { rotate: 1deg; }
  .lesson-sheet, .job, .facts, .page-head, .index-card, .graph-sheet, .kraft-sheet, .folded-note, .task, .article-cover, .sheet-paper { rotate: 0deg !important; }
}

@media (forced-colors: active) {
  .tabs-list a[aria-current="page"], .steps a:is(:target-current, .target-current), .tracker a:is(:target-current, .target-current) { outline: 2px solid CanvasText; }
}
@media (max-width: 380px) {
  .top-row { gap: 0.5rem; }
  .tag-brand { font-size: 1rem; padding: 0.4rem 0.7rem; }
  .tabs-toggle { padding: 0.5rem 0.75rem; }
  .tabs-toggle svg { display: none; }
}
