/* SOEI litepaper. Tokens copied from 02-brand/design-system/tokens.json (Paper theme).
   Three voices: Anton shouts, Courier Prime explains, Permanent Marker annotates.
   One blue element per layout; the illustrations' lion badge counts as one. */
:root {
  --surface-000: #f2ede4;
  --surface-100: #faf7f1;
  --surface-kraft: #b79a70;
  --surface-blue: #9fd8f5;
  --ink: #141414;
  --ink-muted: #5c5852;
  --blue: #9fd8f5;
  --ash: #c8c4bc;
  --font-display: "Anton", "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --font-mono: "Courier Prime", "IBM Plex Mono", "Courier New", monospace;
  --font-marker: "Permanent Marker", "Comic Sans MS", cursive;
  --stroke-mark: 3px;
  --stroke-rule: 2px;
  --tilt: -3deg;
  --shadow-offset: 4px 4px 0 #141414;
  --side-w: 288px;
  --rail-w: 220px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--surface-000);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: break-word;
}
/* Photocopier grain over the whole sheet. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .22;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .08 0 0 0 0 .08 0 0 0 0 .08 0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: var(--stroke-mark) solid var(--ink); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--surface-000); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.main { min-width: 0; padding: 56px 48px 48px; }
.page { max-width: 720px; margin: 0 auto; }
.rail { display: none; }
@media (min-width: 1280px) {
  .layout { grid-template-columns: var(--side-w) minmax(0, 1fr) var(--rail-w); }
  .rail { display: block; position: sticky; top: 0; align-self: start; max-height: 100vh; overflow: auto; padding: 64px 24px 24px 0; }
}

/* ---------- Sidebar ---------- */
.side {
  position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto;
  padding: 32px 24px 32px 28px;
  border-right: var(--stroke-rule) solid var(--ink);
  background: var(--surface-000);
}
.side__brand { display: flex; align-items: flex-end; gap: 10px; text-decoration: none; }
.side__brand img { width: 126px; height: auto; }
.side__brand span { font-family: var(--font-marker); font-size: 18px; line-height: 1; transform: rotate(var(--tilt)); transform-origin: left bottom; padding-bottom: 6px; }
.side__ver { margin: 10px 0 24px; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.side ul { list-style: none; margin: 0 0 8px; padding: 0; }
.side li { margin: 0; }
.side li a { display: block; padding: 7px 10px; margin: 0 -10px; text-decoration: none; font-size: 15px; line-height: 22px; border-left: 4px solid transparent; }
.side li a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.side li a[aria-current="page"] { font-weight: 700; background: var(--surface-100); border-left-color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.side__group { margin: 22px 0 6px; font-size: 13px; line-height: 20px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.side__links a { color: var(--ink-muted); }

/* ---------- Mobile top bar ---------- */
.topbar { display: none; }
@media (max-width: 899px) {
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 40;
    padding: 10px var(--gutter); background: var(--surface-000); border-bottom: var(--stroke-rule) solid var(--ink);
  }
  .topbar__brand { display: flex; align-items: flex-end; gap: 8px; text-decoration: none; }
  .topbar__brand img { width: 84px; height: auto; }
  .topbar__brand span { font-family: var(--font-marker); font-size: 15px; line-height: 1; padding-bottom: 4px; }
  .topbar__menu { font: 700 15px/22px var(--font-mono); color: var(--ink); background: var(--surface-100); border: var(--stroke-rule) solid var(--ink); border-radius: 4px; padding: 6px 14px; cursor: pointer; }
  .layout { display: block; }
  .side { display: none; position: fixed; top: 60px; right: 0; bottom: 0; left: 0; height: auto; align-self: auto; z-index: 39; border-right: 0; padding: 20px var(--gutter) 40px; }
  .side.is-open { display: block; }
  .side__brand, .side__ver { display: none; }
  .side li a { padding: 10px; font-size: 16px; }
  .main { padding: 28px var(--gutter) 40px; }
  html { scroll-padding-top: 72px; }
}

/* ---------- On this page ---------- */
.rail__title { margin: 0 0 8px; font-size: 13px; line-height: 20px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.rail ul { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: var(--stroke-rule) solid var(--ink); }
.rail a { display: block; padding: 5px 0; font-size: 13px; line-height: 19px; text-decoration: none; }
.rail a:hover { text-decoration: underline; }

/* ---------- Type ---------- */
.kicker { margin: 0 0 14px; font-size: 14px; line-height: 20px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
h1, h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; margin: 0; }
h1 { font-size: clamp(44px, 7.2vw, 80px); line-height: .95; letter-spacing: -.01em; max-width: 13ch; text-wrap: balance; }
h2 { font-size: clamp(28px, 3.6vw, 38px); line-height: 1.02; margin: 64px 0 16px; text-wrap: balance; }
h3 { font-family: var(--font-mono); font-size: 18px; line-height: 26px; font-weight: 700; margin: 36px 0 8px; }
h4 { font-family: var(--font-mono); font-size: 14px; line-height: 20px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 28px 0 8px; }
p { margin: 0 0 18px; }
.lede { font-size: 18px; line-height: 1.6; margin: 20px 0 28px; max-width: 46ch; }
strong, b { font-weight: 700; }
/* The one hand-drawn blue underline, under one word of the headline. */
.ul { background: linear-gradient(transparent 80%, var(--blue) 80%, var(--blue) 95%, transparent 95%); }
sup { font-size: 11px; line-height: 0; }
sup a { text-decoration: none; font-weight: 700; padding: 0 1px; }
hr { border: 0; border-top: var(--stroke-rule) solid var(--ink); margin: 48px 0; }

ul, ol { margin: 0 0 18px; padding-left: 26px; }
li { margin: 0 0 8px; }
li::marker { font-weight: 700; }
.page ul:not([class]) > li::marker { content: "▸  "; }

.note { font-family: var(--font-marker); font-size: 20px; line-height: 1.15; margin: 4px 0 24px; transform: rotate(-1.5deg); transform-origin: left center; display: inline-block; }

/* ---------- Figures: paste-up sheets with tape ---------- */
figure { margin: 36px 0; position: relative; }
figure img { width: 100%; border: var(--stroke-rule) solid var(--ink); background: var(--surface-100); }
figure::before {
  content: ""; position: absolute; top: -11px; left: 36px; width: 84px; height: 22px; z-index: 1;
  background: var(--ash); opacity: .88; transform: rotate(var(--tilt));
}
figure.tape-r::before { left: auto; right: 36px; transform: rotate(3deg); }
figure a { display: block; }
figcaption { margin-top: 10px; font-size: 13px; line-height: 20px; color: var(--ink-muted); }

/* ---------- Cover ---------- */
.cover { margin-bottom: 8px; }
.cover h1 { font-size: clamp(56px, 10vw, 112px); line-height: .92; max-width: 8ch; }
.cover__art { margin-top: 36px; }
.stamp {
  position: absolute; right: -10px; bottom: 34px; z-index: 2;
  font-family: var(--font-display); font-size: clamp(22px, 3.4vw, 36px); line-height: 1.02; letter-spacing: .01em; text-transform: uppercase; text-align: center;
  color: var(--ink); background: var(--surface-blue); border: 4px solid var(--ink); border-radius: 10px; padding: 8px 14px;
  transform: rotate(var(--tilt)); box-shadow: 3px 3px 0 var(--ink);
}
@media (max-width: 899px) { .stamp { right: 6px; bottom: 28px; } }

/* ---------- Shout quote ---------- */
.shout {
  margin: 32px 0; padding: 4px 0 4px 20px; border-left: 6px solid var(--ink);
  font-family: var(--font-display); text-transform: uppercase; font-size: clamp(26px, 3.6vw, 36px); line-height: 1.05;
}
.shout p { margin: 0; }

/* ---------- Paper callout ---------- */
.callout {
  position: relative; margin: 32px 0; padding: 22px 22px 6px;
  background: var(--surface-100); border: var(--stroke-rule) solid var(--ink);
}
.callout::before { content: ""; position: absolute; top: -11px; right: 28px; width: 72px; height: 20px; background: var(--ash); opacity: .88; transform: rotate(3deg); }
.callout__label { margin: 0 0 10px; font-size: 14px; line-height: 20px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.callout--kraft { background: var(--surface-kraft); }

/* ---------- Quick-link cards ---------- */
.cards { list-style: none; padding: 0; margin: 20px 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.cards li { margin: 0; }
.cards a {
  display: block; height: 100%; padding: 14px 16px 16px; text-decoration: none;
  background: var(--surface-100); border: var(--stroke-rule) solid var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.cards a:hover { transform: translate(-4px, -4px); box-shadow: var(--shadow-offset); }
.cards b { display: block; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 22px; line-height: 1.05; margin-bottom: 6px; }
.cards span { display: block; font-size: 14px; line-height: 21px; color: var(--ink-muted); }

/* ---------- Stat tiles ---------- */
.stats { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border: var(--stroke-rule) solid var(--ink); background: var(--surface-100); }
.stats li { margin: 0; padding: 16px 16px 14px; border-right: var(--stroke-rule) solid var(--ink); border-bottom: var(--stroke-rule) solid var(--ink); margin: 0 -2px -2px 0; }
.stats b { display: block; font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 4vw, 42px); line-height: 1; text-transform: uppercase; }
.stats span { display: block; margin-top: 8px; font-size: 14px; line-height: 20px; }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }
.source { font-size: 13px; line-height: 20px; color: var(--ink-muted); margin: -8px 0 24px; }

/* ---------- The loop ---------- */
.loop { list-style: none; counter-reset: loop; padding: 0; margin: 24px 0; border: var(--stroke-rule) solid var(--ink); background: var(--surface-100); }
.loop li { counter-increment: loop; display: grid; grid-template-columns: 56px 1fr; gap: 0 14px; align-items: baseline; margin: 0; padding: 12px 16px; border-bottom: var(--stroke-rule) solid var(--ink); }
.loop li:last-child { border-bottom: 0; }
.loop li::before { content: counter(loop, decimal-leading-zero); font-family: var(--font-display); font-size: 30px; line-height: 1; }
.loop b { display: block; }
.loop span { display: block; grid-column: 2; color: var(--ink-muted); font-size: 15px; line-height: 23px; }

/* ---------- Value-flow infographic (token chapter) ---------- */
.flow { position: relative; margin: 28px 0 32px; padding: 24px 22px 16px; background: var(--surface-100); border: var(--stroke-rule) solid var(--ink); }
.flow::before { content: ""; position: absolute; top: -11px; left: 36px; width: 84px; height: 22px; background: var(--ash); opacity: .88; transform: rotate(var(--tilt)); }
.flow__kicker { margin: 0 0 6px; font-size: 13px; line-height: 20px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.flow__title { margin: 0 0 20px; font-family: var(--font-display); text-transform: uppercase; font-size: clamp(30px, 4.4vw, 44px); line-height: 1; }
.flow__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 30px; }
.flow__steps li { position: relative; margin: 0; }
.flow__steps img, .flow__retire img { width: 100%; max-width: 128px; height: auto; border: 0; background: none; }
.flow__steps img { margin-bottom: 10px; }
.flow__steps b, .flow__retire b { display: block; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 22px; line-height: 1.05; margin-bottom: 6px; }
.flow__steps span, .flow__retire span { display: block; font-size: 14px; line-height: 21px; }
/* marker arrow from one station to the next */
.flow__steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 50px; right: -29px; width: 28px; height: 24px;
  background: center / contain no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 24'><path d='M2.5 12.6c5.6-1.2 11.6-1.4 19.4-.8M15.4 4.2l8.2 7.8-7.6 8' fill='none' stroke='%23141414' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
.flow__retire { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 18px; align-items: center; margin: 22px 0 0; padding: 12px 16px; background: var(--surface-000); border: var(--stroke-rule) solid var(--ink); }
.flow__retire p { margin: 0; }
.flow__foot { margin: 14px 0 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
@media (max-width: 640px) {
  .flow { padding: 22px 16px 14px; }
  .flow__steps { grid-template-columns: 1fr; gap: 0; }
  .flow__steps li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 0 14px; align-items: center; padding-bottom: 40px; }
  .flow__steps li:last-child { padding-bottom: 0; }
  .flow__steps img { grid-row: 1 / span 2; margin: 0; }
  .flow__steps b { align-self: end; }
  .flow__steps span { align-self: start; }
  .flow__steps li:not(:last-child)::after { top: auto; right: auto; bottom: 8px; left: 28px; transform: rotate(90deg); }
  .flow__retire { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 12px; }
}

/* ---------- Roadmap lists ---------- */
.checks { list-style: none; padding: 0; margin: 16px 0 28px; }
.checks li { position: relative; margin: 0; padding: 11px 0 11px 46px; border-bottom: var(--stroke-rule) solid var(--ash); }
.checks li:last-child { border-bottom: 0; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 28px; height: 28px; background: center / contain no-repeat; }
.checks--done li::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'><rect x='2.5' y='3' width='23' height='22.5' rx='2' fill='%23faf7f1' stroke='%23141414' stroke-width='2.4' transform='rotate(-3 14 14)'/><path d='M7.5 14.6l4.6 4.9 8.9-11.3' fill='none' stroke='%23141414' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/></svg>"); }
.checks--soon li::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'><path d='M7 3.5h14M7 24.5h14M8.6 3.8c0 6.4 4.2 6.6 5.4 10.2 1.2-3.6 5.4-3.8 5.4-10.2M8.6 24.2c0-6.4 4.2-6.6 5.4-10.2 1.2 3.6 5.4 3.8 5.4 10.2' fill='none' stroke='%23141414' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/><path d='M10.6 22.8c.4-2.5 2.2-3.2 3.4-4.6 1.2 1.4 3 2.1 3.4 4.6z' fill='%23141414'/></svg>"); }
.checks b { display: block; }
.checks span { display: block; color: var(--ink-muted); font-size: 15px; line-height: 23px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 24px 0; border: var(--stroke-rule) solid var(--ink); background: var(--surface-100); }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 23px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: var(--stroke-rule) solid var(--ink); }
tr:last-child td { border-bottom: 0; }
th { font-size: 13px; line-height: 20px; letter-spacing: .08em; text-transform: uppercase; background: var(--ink); color: var(--surface-000); }
td:first-child { font-weight: 700; min-width: 150px; }
@media (max-width: 560px) { th, td { padding: 10px; } td:first-child { min-width: 0; } }
td:nth-child(2):not(:last-child) { font-family: var(--font-display); font-size: 22px; line-height: 1; white-space: nowrap; }

/* ---------- People ---------- */
.people { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.people li { margin: 0; padding: 16px 16px 14px; background: var(--surface-100); border: var(--stroke-rule) solid var(--ink); }
.people b { display: block; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 24px; line-height: 1.05; }
.people i { display: block; font-style: normal; font-size: 13px; line-height: 20px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin: 6px 0 8px; }
.people span { display: block; font-size: 15px; line-height: 23px; }

/* ---------- Accordions (steps, FAQ) ---------- */
details { margin: 0 0 12px; background: var(--surface-100); border: var(--stroke-rule) solid var(--ink); }
summary { cursor: pointer; list-style: none; padding: 14px 48px 14px 16px; font-weight: 700; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 16px; top: 7px; font-family: var(--font-display); font-size: 30px; line-height: 1.3; }
details[open] > summary::after { content: "–"; }
details[open] > summary { border-bottom: var(--stroke-rule) solid var(--ink); }
.details__body { padding: 16px 16px 2px; }

/* ---------- Buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 20px; }
.btn {
  display: inline-block; font: 700 16px/24px var(--font-mono); text-decoration: none;
  padding: 10px 20px; border: var(--stroke-rule) solid var(--ink); border-radius: 4px; background: var(--surface-100); color: var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.btn--ink { background: var(--ink); color: var(--surface-000); }
.btn:hover { transform: translate(-4px, -4px); box-shadow: var(--shadow-offset); }

/* ---------- Footnotes ---------- */
.footnotes { margin: 56px 0 0; padding-top: 16px; border-top: var(--stroke-rule) solid var(--ink); font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.footnotes ol { padding-left: 20px; margin: 0; }
.footnotes li { margin-bottom: 6px; }

/* ---------- Next chapter ---------- */
.next { margin: 64px 0 0; }
.next__card {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 16px;
  padding: 18px 20px; text-decoration: none; background: var(--ink); color: var(--surface-000);
  border: var(--stroke-rule) solid var(--ink); transition: transform .15s, box-shadow .15s;
}
.next__card:hover { transform: translate(-4px, -4px); box-shadow: 4px 4px 0 var(--ash); }
.next__label { font-size: 13px; line-height: 20px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ash); }
.next__title { grid-column: 1; font-family: var(--font-display); text-transform: uppercase; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.05; }
.next__arrow { grid-column: 2; grid-row: 1 / span 2; font-family: var(--font-display); font-size: 36px; line-height: 1; }

.foot { max-width: 720px; margin: 40px auto 0; padding-top: 16px; border-top: var(--stroke-rule) solid var(--ink); font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.foot p { margin: 0; }
