/* Ideas Lab: Old School + Modern. Paper, ink, phosphor, turtle green. */
:root {
  --paper: #f2e8cf;
  --paper-2: #e8dab5;
  --card: #fbf6e9;
  --ink: #1e1912;
  --ink-2: #4b4234;
  --rule: #b9a77c;
  --rule-faint: rgba(30, 25, 18, 0.14);
  --red: #b3352b;
  --blue-rule: rgba(70, 110, 160, 0.22);
  --turtle: #2c6a3a;
  --turtle-ink: #235a30;
  --phosphor: #4dff7a;
  --phosphor-dim: #2fbf58;
  --crt: #0c160e;
  --stub: #c4561d;
  --stub-ink: #9c3f10;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --crt-font: "VT323", "IBM Plex Mono", monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --page-max: 1180px;
  --tap: 44px;
  --shadow: 0 1px 1px rgba(30, 25, 18, 0.08), 0 6px 18px -8px rgba(30, 25, 18, 0.35);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .15 0 0 0 0 .08 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--grain), radial-gradient(ellipse at 20% 0%, rgba(255, 250, 235, 0.7), transparent 60%);
  color: var(--ink);
  font: 400 18px/1.6 var(--serif);
  font-optical-sizing: auto;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
p, ul, ol, dl, figure { margin: 0; }
strong, b { font-weight: 650; }
a { color: inherit; }
:focus-visible { outline: 2px dashed var(--turtle); outline-offset: 3px; }
::selection { background: var(--phosphor); color: var(--crt); }

.page { min-height: 100vh; }
.main { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter) 40px; }

/* Typed bits */
.link { color: var(--turtle-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.link:hover { color: var(--stub-ink); }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 8px 16px;
  font: 500 14px/1.2 var(--mono); color: var(--ink); text-decoration: none;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 2px;
  box-shadow: 3px 3px 0 var(--ink); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); background: #fff; }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.pill {
  display: inline-block; padding: 1px 8px; font: 500 12px/1.6 var(--mono); letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 2px;
}
.fineprint { font: 400 13.5px/1.6 var(--mono); color: var(--ink-2); }
.prose { max-width: 68ch; display: grid; gap: 14px; }
.x-label { font: 500 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.x-src { font: 400 13px/1.5 var(--mono); color: var(--ink-2); }
.x-subhead { font: 600 clamp(22px, 2.6vw, 28px)/1.2 var(--serif); margin-top: 18px; }
.x-list { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.x-list li::marker { color: var(--turtle); }

/* Disclaimer strip */
.x-strip {
  background: var(--ink); color: #f6efd9;
  font: 400 13px/1.55 var(--mono);
  padding: 10px var(--gutter);
  border-bottom: 3px double var(--stub);
}
.x-strip p { max-width: var(--page-max); margin: 0 auto; }
.x-strip b { color: #ffb37a; font-weight: 600; }
.x-strip a { color: var(--phosphor); text-underline-offset: 3px; white-space: nowrap; }
.x-strip a:hover { color: #fff; }

/* Nav */
.x-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(242, 232, 207, 0.94);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom: 1.5px solid var(--ink);
}
.x-nav__in {
  max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 18px; min-height: 56px;
}
.x-nav__brand { font: 400 26px/1 var(--crt-font); color: var(--turtle-ink); text-decoration: none; white-space: nowrap; }
.x-nav__brand span { color: var(--stub-ink); }
.x-nav .seg { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; }
.x-nav .seg::-webkit-scrollbar { display: none; }
.x-nav .seg a, .x-nav__home {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 10px;
  font: 500 13px/1 var(--mono); color: var(--ink); text-decoration: none; white-space: nowrap; border-radius: 2px;
}
.x-nav .seg a { min-width: var(--tap); justify-content: center; }
.x-nav__brand { display: inline-flex; align-items: center; min-height: var(--tap); }
.x-strip a { display: inline-flex; align-items: center; min-height: var(--tap); }
@media (max-width: 760px) {
  .link { display: inline-flex; align-items: center; min-height: var(--tap); }
}
.x-nav .seg a:hover { background: var(--paper-2); }
.x-nav .seg a[aria-current] { color: var(--turtle-ink); text-decoration: underline; text-decoration-style: dashed; text-underline-offset: 6px; }
.x-nav__home { flex: none; border: 1.5px solid var(--ink); background: var(--card); }
.x-nav__home:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 720px) {
  .x-nav__in { flex-wrap: wrap; gap: 0 10px; padding-top: 6px; }
  .x-nav__brand { order: 1; }
  .x-nav__home { order: 2; margin-left: auto; min-height: var(--tap); font-size: 12px; }
  .x-nav .seg { order: 3; flex-basis: 100%; margin: 0 -10px; }
}

/* Turtle strip */
.x-turtle {
  position: relative; height: 110px; background: var(--crt);
  border-bottom: 1.5px solid var(--ink);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.x-turtle::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px);
}
.x-turtle canvas { display: block; width: 100%; height: 100%; }
.x-turtle__tag {
  position: absolute; left: var(--gutter); bottom: 6px; z-index: 1;
  font: 400 18px/1 var(--crt-font); color: var(--phosphor-dim); letter-spacing: 0.04em;
  text-shadow: 0 0 6px rgba(77, 255, 122, 0.5);
}
@media (max-width: 600px) { .x-turtle { height: 84px; } }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px);
  padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); align-items: start;
}
.hero__copy { display: grid; gap: 18px; min-width: 0; }
.hero__eyebrow { font: 500 12.5px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--stub-ink); }
.hero h1 {
  font: 700 clamp(56px, 10vw, 120px)/0.9 var(--serif); letter-spacing: -0.035em;
  font-variation-settings: "SOFT" 60, "WONK" 1;
}
.hero__sub { font: 500 clamp(14px, 1.6vw, 16px)/1.5 var(--mono); color: var(--ink-2); }
.x-bigquote {
  margin: 8px 0 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--turtle);
  font: italic 400 clamp(26px, 3.6vw, 40px)/1.18 var(--serif); letter-spacing: -0.01em; text-wrap: balance;
  font-variation-settings: "SOFT" 100;
}
.x-motto { font: 400 clamp(22px, 2.6vw, 28px)/1.2 var(--crt-font); color: var(--turtle-ink); letter-spacing: 0.02em; }
.x-roles { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.x-roles li {
  position: relative; padding: 5px 12px 5px 18px;
  font: 500 13px/1.3 var(--mono); color: var(--ink);
  background: #f7d9b8; border: 1px dashed var(--stub-ink); border-radius: 2px 10px 10px 2px;
}
.x-roles li::before { content: ""; position: absolute; left: 6px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1px var(--stub-ink); }
.x-intro { display: grid; gap: 12px; max-width: 64ch; font-size: 16.5px; color: var(--ink-2); }
.x-intro em { color: var(--ink); }
.x-hero__side { display: grid; gap: 28px; justify-items: center; min-width: 0; }
@media (max-width: 880px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .x-hero__side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
@media (max-width: 560px) { .x-hero__side { grid-template-columns: minmax(0, 1fr); } }

/* Taped polaroid with a specimen tag */
.x-polaroid {
  position: relative; width: min(100%, 320px); padding: 12px 12px 14px; background: #fffdf7;
  box-shadow: var(--shadow); transform: rotate(2deg);
}
.x-polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: sepia(0.12) contrast(1.03); }
.x-polaroid::before, .x-tape::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 96px; height: 26px; margin-left: -48px;
  background: rgba(236, 222, 170, 0.78); border-left: 1px dashed rgba(0, 0, 0, 0.08); border-right: 1px dashed rgba(0, 0, 0, 0.08);
  transform: rotate(-4deg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); z-index: 1;
}
.x-tag {
  display: inline-grid; gap: 1px; margin-top: 12px; padding: 6px 12px 6px 22px; position: relative;
  font: 400 12.5px/1.4 var(--mono); color: var(--ink); background: var(--paper-2);
  border: 1px solid var(--rule); border-radius: 2px 2px 2px 2px;
  transform: rotate(-1.5deg);
}
.x-tag::before { content: ""; position: absolute; left: 8px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #fffdf7; box-shadow: inset 0 0 0 1px var(--rule); }
.x-tag b { font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 12px; color: var(--stub-ink); }

/* Callout: a typed memo */
.callout {
  position: relative; display: grid; gap: 12px; width: 100%; max-width: 360px; padding: 22px 22px 22px;
  background: var(--card); border: 1.5px solid var(--ink); box-shadow: 5px 5px 0 var(--turtle);
}
.callout__head { font: 500 12px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--stub-ink); }
.callout__lead { font-size: 17px; line-height: 1.45; }
.callout .btn { justify-self: start; }

/* Sections and the dashed turtle-path divider */
.section { position: relative; display: grid; gap: 24px; padding: 64px 0 24px; }
.section::before {
  content: ""; position: absolute; top: 14px; left: 0; right: 28px; height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='22'%3E%3Cpath d='M0 15h46v-9h38v12h30v-8h44v9h36v-11h46' fill='none' stroke='%232c6a3a' stroke-width='1.6' stroke-dasharray='5 5' stroke-linejoin='round'/%3E%3C/svg%3E") repeat-x left center;
  opacity: 0.85;
}
.section::after {
  content: ""; position: absolute; top: 18px; right: 4px; width: 0; height: 0;
  border-left: 18px solid var(--turtle); border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
.head { display: grid; gap: 10px; max-width: 760px; }
.head__eyebrow { font: 500 12.5px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--stub-ink); }
.head h2 { font: 600 clamp(32px, 4.6vw, 52px)/1.04 var(--serif); letter-spacing: -0.025em; font-variation-settings: "SOFT" 40; }
.head__sub { font-size: 17px; color: var(--ink-2); max-width: 64ch; }

/* Aside: a dashed archive slip */
.aside {
  display: grid; gap: 10px; padding: 20px 22px; max-width: 860px;
  background: rgba(251, 246, 233, 0.6); border: 1.5px dashed var(--ink-2); border-radius: 2px;
}
.aside h3 { font: 500 12.5px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--stub-ink); }
.aside p { font-size: 16px; }
.aside .fineprint { font-size: 13.5px; }

/* Punched index cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 30px 26px; padding: 6px 4px; }
.x-concepts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 46px 30px; padding-top: 18px; }
.cards > div {
  position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0;
  padding: 26px 22px 34px 46px;
  background-color: var(--card);
  background-image:
    linear-gradient(90deg, transparent 31px, rgba(179, 53, 43, 0.75) 31px, rgba(179, 53, 43, 0.75) 32px, transparent 32px),
    repeating-linear-gradient(180deg, transparent 0 27px, var(--blue-rule) 27px 28px);
  background-position: 0 0, 0 14px;
  border: 1px solid rgba(30, 25, 18, 0.12); border-radius: 3px;
  box-shadow: var(--shadow);
  transform: rotate(-0.6deg);
  transition: transform 0.25s ease;
}
.cards > div:nth-child(even) { transform: rotate(0.6deg); }
.cards > div:hover { transform: rotate(0deg) translateY(-2px); }
.cards > div::after {
  content: ""; position: absolute; left: 50%; bottom: 10px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: var(--paper); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}
.cards h3 { font: 600 21px/1.2 var(--serif); }
.cards p, .cards li { font-size: 16.5px; line-height: 1.55; }
.cards ul { padding-left: 20px; display: grid; gap: 6px; }
.x-concepts > div > .x-label:first-child {
  position: absolute; top: -17px; left: 20px; max-width: calc(100% - 40px);
  padding: 4px 12px 3px; background: var(--paper-2); color: var(--ink);
  border: 1px solid rgba(30, 25, 18, 0.18); border-bottom: 0; border-radius: 6px 6px 0 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.quote {
  font: italic 400 19px/1.4 var(--serif); color: var(--ink);
  padding-left: 14px; border-left: 3px solid var(--turtle);
}
@media (max-width: 560px) {
  .cards > div { padding: 24px 16px 34px 38px; background-image: linear-gradient(90deg, transparent 25px, rgba(179, 53, 43, 0.75) 25px, rgba(179, 53, 43, 0.75) 26px, transparent 26px), repeating-linear-gradient(180deg, transparent 0 27px, var(--blue-rule) 27px 28px); }
}

/* Card-catalog drawers */
.x-more { margin-top: auto; }
.x-more > summary {
  list-style: none; cursor: pointer; position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 8px 52px 8px 14px;
  font: 500 13px/1.35 var(--mono); color: var(--ink);
  background: linear-gradient(180deg, #d9b98a, #c9a46f);
  border: 1.5px solid #6b4f2a; border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 0 #6b4f2a;
}
.x-more > summary::-webkit-details-marker { display: none; }
.x-more > summary > span, .x-more:not(.x-guide) > summary {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}
.x-more > summary::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 24px; height: 12px; margin-top: -6px;
  border-radius: 0 0 12px 12px; border: 3px solid #8a6a2c; border-top: 0;
  background: transparent; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.2s ease;
}
.x-more[open] > summary::after { transform: rotate(180deg); }
.x-more > summary:hover { background: linear-gradient(180deg, #e2c497, #d0ad78); }
.x-more__body {
  display: grid; gap: 8px; padding: 16px 14px 10px; margin: 0 6px;
  background: var(--card); border: 1px solid var(--rule); border-top: 0;
  box-shadow: inset 0 8px 10px -8px rgba(0, 0, 0, 0.3);
  font-size: 15.5px;
}
.x-more__body .x-label { margin-top: 10px; color: var(--stub-ink); }
.x-more__body .x-label:first-child { margin-top: 0; }
.x-more__body ul { padding-left: 18px; display: grid; gap: 6px; }
.cards .x-more__body p, .cards .x-more__body li { font-size: 15.5px; }

/* Practitioner guides: big drawers */
.x-guides { display: grid; gap: 22px; }
.x-guide > summary { min-height: 72px; padding: 12px 60px 12px 18px; font: 600 clamp(18px, 2.2vw, 22px)/1.25 var(--serif); }
.x-guide > summary span {
  display: block; padding: 6px 12px; background: #f6ecd2; border: 1px solid #8a6a2c; box-shadow: inset 0 0 0 2px #e8d6ae;
}
.x-guide > summary small { display: block; font: 400 12.5px/1.45 var(--mono); color: var(--ink-2); margin-top: 3px; }
.x-guide__body {
  display: grid; gap: 18px; padding: 22px clamp(12px, 3vw, 28px) 24px; margin: 0 8px;
  background: rgba(232, 218, 181, 0.45); border: 1px solid var(--rule); border-top: 0;
  box-shadow: inset 0 10px 12px -10px rgba(0, 0, 0, 0.35);
}
@media (max-width: 560px) { .x-guide__body { margin: 0 4px; } }
@media (max-width: 560px) { .x-guide > summary { padding: 10px 48px 10px 10px; } .x-guide > summary::after { right: 12px; } }

.x-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font: 400 13.5px/1.6 var(--mono); color: var(--ink-2); }
.x-legend .pill { margin-right: 4px; }

/* Typed ledger tables */
.table-wrap {
  overflow-x: auto; background: var(--card);
  border: 1.5px solid var(--ink); border-radius: 2px; box-shadow: 4px 4px 0 rgba(30, 25, 18, 0.18);
}
.table-wrap table { width: 100%; border-collapse: collapse; font: 400 14px/1.55 var(--mono); color: var(--ink); }
.table-wrap caption {
  caption-side: top; text-align: left; padding: 12px 16px; font: 400 13px/1.5 var(--mono); color: var(--ink-2);
  background: var(--paper-2); border-bottom: 1px solid var(--ink);
}
.table-wrap thead th {
  text-align: left; vertical-align: bottom; padding: 12px 14px 8px;
  font: 600 12px/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--turtle-ink);
  border-bottom: 3px double var(--ink);
}
.table-wrap td, .table-wrap tbody th { padding: 12px 14px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--blue-rule); }
.table-wrap tbody tr:nth-child(even) { background: rgba(232, 218, 181, 0.32); }
.table-wrap tbody th { font: 600 15px/1.35 var(--serif); min-width: 150px; }
.table-wrap tbody th small { display: block; margin-top: 3px; font: 400 12.5px/1.4 var(--mono); color: var(--ink-2); }
.table-wrap tr > :first-child { border-right: 3px double rgba(179, 53, 43, 0.7); }
.table-wrap td.muted { color: var(--ink-2); font-style: italic; }
.table-wrap td { min-width: 180px; }
@media (max-width: 760px) {
  .table-wrap { overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td, .table-wrap tbody th, .table-wrap caption { display: block; width: auto; }
  .table-wrap caption { border: 1.5px solid var(--ink); margin-bottom: 14px; }
  .table-wrap thead { display: none; }
  .table-wrap tbody tr { margin-bottom: 16px; background: var(--card) !important; border: 1.5px solid var(--ink); box-shadow: 3px 3px 0 rgba(30, 25, 18, 0.18); }
  .table-wrap tr > :first-child { border-right: 0; border-bottom: 3px double rgba(179, 53, 43, 0.7); background: var(--paper-2); }
  .table-wrap td { min-width: 0; }
  .table-wrap td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    font: 600 12px/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--turtle-ink);
  }
  .table-wrap tbody tr > :last-child { border-bottom: 0; }
}

/* Steps: typed worksheet rows */
.steps { display: grid; gap: 14px; }
.step {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 260px); gap: 18px; align-items: start;
  padding: 18px; background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--turtle);
}
.step__num { font: 400 40px/0.9 var(--crt-font); color: var(--turtle-ink); }
.step h3 { font: 600 19px/1.3 var(--serif); margin-bottom: 6px; }
.step p { font-size: 16px; }
.step__panel { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; padding-left: 16px; border-left: 1px dashed var(--rule); font: 400 13px/1.5 var(--mono); }
.step__panel dt { font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; color: var(--stub-ink); padding-top: 1px; }
.step__panel dd { margin: 0; color: var(--ink-2); }
@media (max-width: 760px) {
  .step { grid-template-columns: 44px minmax(0, 1fr); }
  .step__num { font-size: 32px; }
  .step__panel { grid-column: 1 / -1; padding: 10px 0 0; border-left: 0; border-top: 1px dashed var(--rule); }
}

/* Open questions: green-screen readout */
.x-questions {
  list-style: none; margin: 0; padding: clamp(14px, 3vw, 30px); counter-reset: q;
  background: var(--crt); border: 10px solid #2a2620; border-radius: 18px;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.85), 0 10px 24px -10px rgba(0, 0, 0, 0.5);
}
.x-questions li {
  counter-increment: q; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; align-items: baseline;
  padding: 18px 0; border-bottom: 1px dashed rgba(77, 255, 122, 0.25);
  font: 400 clamp(20px, 2.6vw, 28px)/1.3 var(--serif); color: #dfffe6; text-wrap: balance;
}
.x-questions li:last-child { border-bottom: 0; }
.x-questions li::before {
  content: counter(q, decimal-leading-zero) ">"; font: 400 34px/1 var(--crt-font); color: var(--phosphor);
  text-shadow: 0 0 8px rgba(77, 255, 122, 0.6);
}
@media (max-width: 600px) {
  .x-questions { border-width: 6px; border-radius: 12px; }
  .x-questions li { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; }
  .x-questions li::before { font-size: 26px; }
}

/* Why: a typed memo, wider */
.x-why { max-width: 760px; }
.x-why ul { margin: 0; padding: 0; list-style: none; display: grid; }
.x-why li { padding: 10px 0 10px 26px; position: relative; border-top: 1px dashed var(--rule); font-size: 16.5px; }
.x-why li::before { content: "▸"; position: absolute; left: 4px; top: 10px; color: var(--turtle); }

/* CRT frame */
.x-crt { max-width: 760px; margin: 8px auto 0; display: grid; gap: 12px; justify-items: center; }
.x-crt__set {
  width: 100%; padding: clamp(14px, 3vw, 28px); background: linear-gradient(160deg, #e3dac4, #c8bd9f);
  border-radius: 22px; border: 1.5px solid #7d7155; box-shadow: var(--shadow), inset 0 2px 0 rgba(255, 255, 255, 0.5);
}
.x-crt__screen { position: relative; border-radius: 26px / 20px; overflow: hidden; background: var(--crt); box-shadow: inset 0 0 0 6px #1a1712; }
.x-crt__screen img { width: 100%; height: auto; aspect-ratio: 2560 / 1927; object-fit: cover; }
.x-crt__screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55));
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.7);
}
.x-crt__base { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font: 400 18px/1 var(--crt-font); color: #5a5040; }
.x-crt__base i { width: 10px; height: 10px; border-radius: 50%; background: var(--phosphor); box-shadow: 0 0 6px var(--phosphor); }

/* Taped banner */
.x-banner { position: relative; padding: 12px 12px 0; background: #fffdf7; box-shadow: var(--shadow); transform: rotate(-0.5deg); margin: 14px 0 6px; }
.x-banner img { width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; filter: sepia(0.08); }
.x-banner figcaption { padding: 4px 4px 12px; }
.x-banner::before, .x-banner::after {
  content: ""; position: absolute; top: -12px; width: 110px; height: 26px;
  background: rgba(236, 222, 170, 0.78); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.x-banner::before { left: 8%; transform: rotate(-5deg); }
.x-banner::after { right: 8%; transform: rotate(4deg); }

/* Footer */
.foot {
  margin-top: 40px; padding: 36px var(--gutter) 48px; background: var(--ink); color: #efe6cc;
  border-top: 3px double var(--stub);
}
.foot__in { max-width: var(--page-max); margin: 0 auto; display: grid; gap: 16px; }
.foot__motto { font: italic 400 clamp(22px, 3vw, 30px)/1.25 var(--serif); color: #fff8e6; }
.foot p { font: 400 13.5px/1.6 var(--mono); }
.foot a { color: var(--phosphor); text-underline-offset: 3px; }
.foot a:hover { color: #fff; }
.foot__links { display: flex; flex-wrap: wrap; gap: 4px 6px; list-style: none; padding: 0; }
.foot__links a, .foot nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 10px; border: 1px dashed rgba(77, 255, 122, 0.45); font: 500 13px/1 var(--mono); text-decoration: none; border-radius: 2px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px; }
.foot nav a { border-color: rgba(239, 230, 204, 0.3); color: #efe6cc; }

/* ---------- Phase 2 ---------- */

/* Typed slip inside a card */
.x-typed {
  margin-top: 6px; padding: 10px 12px; font: 400 13.5px/1.55 var(--mono); color: var(--ink);
  background: var(--paper-2); border: 1px dashed var(--ink-2); border-radius: 2px;
}
.cards .x-typed { font-size: 13.5px; }

/* re:think: one index card beside a taped collage */
.x-rethink { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
.x-rethink .cards { grid-template-columns: minmax(0, 1fr); }
.x-rethink .cards ul { padding-left: 20px; gap: 14px; }
.x-rethink .cards li { font-size: 17.5px; line-height: 1.5; }
.x-rethink .cards li::marker { color: var(--turtle); }
.x-collage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 20px; padding: 14px 6px 0; }
.x-collage .x-polaroid { width: 100%; padding: 8px 8px 10px; }
.x-collage .x-polaroid img { aspect-ratio: 1 / 1; }
.x-collage .x-polaroid:nth-child(1) { transform: rotate(-3deg); }
.x-collage .x-polaroid:nth-child(2) { transform: rotate(2.5deg); margin-top: 22px; }
.x-collage .x-polaroid:nth-child(3) { transform: rotate(1.5deg); margin-top: -10px; }
.x-collage .x-polaroid:nth-child(4) { transform: rotate(-2deg); margin-top: 10px; }
.x-collage .x-tag { margin-top: 8px; font-size: 12px; max-width: 100%; }
@media (max-width: 880px) { .x-rethink { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .x-collage { gap: 24px 14px; } .x-collage .x-polaroid { padding: 6px 6px 8px; } }

/* Lineage: nodes joined by a dashed turtle path */
.x-lineage { list-style: none; margin: 0; padding: 6px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 0; }
.x-lineage li { display: flex; align-items: center; min-width: 0; max-width: 100%; }
.x-lineage li span { max-width: 100%; overflow-wrap: anywhere; }
.x-lineage li span {
  display: inline-block; padding: 8px 14px; font: 500 14px/1.35 var(--mono); color: var(--ink);
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 2px; box-shadow: 3px 3px 0 var(--turtle);
}
.x-lineage li:nth-child(odd) span { transform: rotate(-0.8deg); }
.x-lineage li:not(:last-child)::after {
  content: ""; flex: none; width: 46px; height: 22px; margin: 0 2px 0 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='22'%3E%3Cpath d='M1 15h12v-9h12v10h10' fill='none' stroke='%232c6a3a' stroke-width='1.8' stroke-dasharray='4 4' stroke-linejoin='round'/%3E%3Cpath d='M36 11l9 5-9 5z' fill='%232c6a3a'/%3E%3C/svg%3E") no-repeat center;
}
.x-lineage li:last-child span {
  font: 400 26px/1.1 var(--crt-font); color: var(--phosphor); background: var(--crt); border-color: var(--crt);
  text-shadow: 0 0 8px rgba(77, 255, 122, 0.55); box-shadow: 4px 4px 0 var(--stub);
}
@media (max-width: 600px) {
  .x-lineage { flex-direction: column; align-items: flex-start; gap: 0; }
  .x-lineage li { flex-direction: column; align-items: flex-start; }
  .x-lineage li:not(:last-child)::after {
    width: 22px; height: 30px; margin: 4px 0 4px 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='30'%3E%3Cpath d='M7 1v8h8v12' fill='none' stroke='%232c6a3a' stroke-width='1.8' stroke-dasharray='4 4' stroke-linejoin='round'/%3E%3Cpath d='M10 21h10l-5 8z' fill='%232c6a3a'/%3E%3C/svg%3E") no-repeat center;
  }
}

/* Card catalog of experiments */
.x-drawer {
  padding: clamp(16px, 3vw, 28px) clamp(10px, 2.5vw, 24px) clamp(20px, 3vw, 30px);
  background: linear-gradient(180deg, #d9b98a, #c9a46f); border: 1.5px solid #6b4f2a; border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 3px 0 #6b4f2a;
}
.x-drawer__label {
  justify-self: center; display: table; margin: 0 auto 22px; padding: 6px 16px;
  font: 500 13px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink);
  background: #f6ecd2; border: 1px solid #8a6a2c; box-shadow: inset 0 0 0 2px #e8d6ae;
}
.x-catalog { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 40px 22px; padding-top: 14px; }
.x-catalog > div { padding-top: 24px; gap: 10px; }
.x-catalog > div > .x-label:first-child {
  position: absolute; top: -15px; left: 18px; max-width: calc(100% - 36px);
  padding: 4px 12px 3px; background: var(--paper-2); color: var(--stub-ink);
  border: 1px solid rgba(30, 25, 18, 0.18); border-bottom: 0; border-radius: 6px 6px 0 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.x-catalog h3 { font-size: 19px; }
.x-catalog h3 small { display: block; margin-top: 4px; font: 400 13px/1.4 var(--mono); color: var(--ink-2); }
.x-catalog__photo { margin: 0 0 4px; padding: 6px; background: #fffdf7; box-shadow: var(--shadow); transform: rotate(1deg); }
.x-catalog__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: sepia(0.1); }
.x-catalog__photo--small { width: 128px; }
.x-catalog__photo--small img { aspect-ratio: 1 / 1; }
.x-catalog__photo--tall img { aspect-ratio: 3 / 4; }
.x-catalog__photo--slide img { aspect-ratio: 971 / 420; object-position: top; }

/* Workbench */
.x-banner--full img { aspect-ratio: 1200 / 630; }
.x-lede { font: 500 clamp(20px, 2.4vw, 26px)/1.35 var(--serif); max-width: 40ch; text-wrap: balance; }
.x-crt-panel {
  position: relative; overflow: hidden; padding: clamp(18px, 3.5vw, 34px);
  background: var(--crt); border: 10px solid #2a2620; border-radius: 18px;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.85), 0 10px 24px -10px rgba(0, 0, 0, 0.5);
}
.x-crt-panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0 1px, transparent 1px 3px);
}
.x-crt-panel__label { font: 400 18px/1.2 var(--crt-font); color: var(--phosphor-dim); letter-spacing: 0.06em; margin-bottom: 10px; }
.x-loop { font: 400 clamp(22px, 3.2vw, 34px)/1.35 var(--crt-font); color: var(--phosphor); text-shadow: 0 0 8px rgba(77, 255, 122, 0.55); letter-spacing: 0.03em; }
.x-loop span { white-space: nowrap; }
.x-loop i { font-style: normal; color: var(--phosphor-dim); }
@media (max-width: 600px) { .x-crt-panel { border-width: 6px; border-radius: 12px; } }
.x-stamps { list-style: none; margin: 0; padding: 8px 0; display: flex; flex-wrap: wrap; gap: 18px 16px; align-items: center; }
.x-stamps li {
  padding: 8px 14px; max-width: 100%;
  font: 600 14.5px/1.4 var(--mono); color: var(--red); letter-spacing: 0.02em;
  border: 2.5px solid var(--red); border-radius: 4px; box-shadow: inset 0 0 0 2px var(--card), inset 0 0 0 3.5px rgba(179, 53, 43, 0.7);
  background: rgba(251, 246, 233, 0.6); opacity: 0.92;
}
.x-stamps li:nth-child(3n + 1) { transform: rotate(-2deg); }
.x-stamps li:nth-child(3n + 2) { transform: rotate(1.5deg); color: var(--turtle-ink); border-color: var(--turtle-ink); box-shadow: inset 0 0 0 2px var(--card), inset 0 0 0 3.5px rgba(35, 90, 48, 0.7); }
.x-stamps li:nth-child(3n) { transform: rotate(-0.5deg); }

/* The shelf: book spines */
.x-shelf-fig { display: grid; gap: 18px; }
.x-shelf { list-style: none; margin: 0; padding: 0 0 4px; display: flex; flex-wrap: wrap; align-items: flex-end; row-gap: 22px; }
.x-shelf li { padding: 0 2px; border-bottom: 12px solid #7a5a30; box-shadow: 0 6px 0 -2px #5a4022; display: flex; align-items: flex-end; }
.x-shelf li span {
  writing-mode: vertical-rl; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 200px; padding: 14px 8px; width: 54px;
  font: 600 15px/1.2 var(--serif); color: #fbf6e9; background: var(--turtle); border-radius: 2px 2px 0 0;
  box-shadow: inset 0 14px 0 -10px rgba(255, 255, 255, 0.25), inset 0 -14px 0 -10px rgba(0, 0, 0, 0.25), inset 3px 0 0 rgba(255, 255, 255, 0.12), inset -3px 0 0 rgba(0, 0, 0, 0.2);
}
.x-shelf li span small { font: 400 12px/1.2 var(--mono); opacity: 0.9; }
.x-shelf li:nth-child(8n + 1) span { background: var(--turtle); min-height: 232px; }
.x-shelf li:nth-child(8n + 2) span { background: var(--red); min-height: 246px; width: 58px; }
.x-shelf li:nth-child(8n + 3) span { background: var(--ink); min-height: 214px; }
.x-shelf li:nth-child(8n + 4) span { background: #e8d29a; color: var(--ink); min-height: 226px; width: 50px; }
.x-shelf li:nth-child(8n + 5) span { background: #33507a; min-height: 252px; }
.x-shelf li:nth-child(8n + 6) span { background: var(--stub-ink); min-height: 208px; width: 50px; }
.x-shelf li:nth-child(8n + 7) span { background: var(--card); color: var(--ink); min-height: 238px; border: 1px solid var(--rule); border-bottom: 0; }
.x-shelf li:nth-child(8n) span { background: #5b3b5e; min-height: 220px; width: 58px; }
.x-shelf li:nth-child(5) span { transform: rotate(-4deg); transform-origin: bottom left; margin-left: 10px; }
.x-shelf-fig figcaption { justify-self: start; }
@media (max-width: 600px) { .x-shelf li span { width: 48px; font-size: 14px; min-height: 190px !important; } }

/* What the turtle noticed: dark notebook */
.x-notebook { display: grid; gap: 22px; color: #dfffe6; }
.x-notebook .x-crt-panel__label { color: #ffb37a; }
.x-notes { list-style: none; margin: 0; padding: 0; counter-reset: n; display: grid; }
.x-notes li {
  counter-increment: n; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; align-items: baseline;
  padding: 18px 0; border-bottom: 1px dashed rgba(77, 255, 122, 0.25);
}
.x-notes li::before { content: "N" counter(n) ">"; font: 400 28px/1 var(--crt-font); color: var(--phosphor); text-shadow: 0 0 8px rgba(77, 255, 122, 0.6); }
.x-notes h3 { font: 600 clamp(20px, 2.4vw, 26px)/1.25 var(--serif); color: #f2fff4; margin-bottom: 8px; }
.x-notes p { font-size: 16.5px; line-height: 1.6; color: #c9eed2; }
.x-edge { display: grid; gap: 10px; font: 400 15px/1.6 var(--mono); color: #c9eed2; }
.x-edge b { color: var(--phosphor); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; font-size: 13px; }
@media (max-width: 600px) { .x-notes li { grid-template-columns: minmax(0, 1fr); gap: 6px; } }

/* Typed bibliography */
.x-biblio {
  list-style: none; margin: 0; padding: clamp(18px, 3.5vw, 34px) clamp(16px, 4vw, 40px);
  background-color: var(--card);
  background-image: repeating-linear-gradient(180deg, transparent 0 29px, var(--blue-rule) 29px 30px);
  border: 1px solid rgba(30, 25, 18, 0.12); box-shadow: var(--shadow); max-width: 900px;
  display: grid; gap: 14px;
}
.x-biblio li { padding-left: 4.5em; text-indent: -4.5em; font: 400 15px/1.6 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.x-biblio li b { display: inline-block; width: 4.5em; text-indent: 0; color: var(--stub-ink); font-weight: 600; }
.x-biblio cite { font-style: italic; font-family: var(--serif); font-size: 16.5px; }
@media (max-width: 560px) {
  .x-biblio li { padding-left: 0; text-indent: 0; }
  .x-biblio li b { display: block; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
