/* ==========================================================================
   Stoutenburger Almanac — Central Stylesheet
   Eo Ena visual identity + structured card body elements
   ========================================================================== */

/* OFFLINE FONTS — Lora (variable, bundled locally) */
@font-face {
  font-family: 'Lora';
  src: url('../fonts/Lora-Variable.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/Lora-Italic-Variable.ttf') format('truetype');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

/* OFFLINE FONTS — EB Garamond (headings, bundled locally) */
@font-face {
  font-family: 'EB Garamond';
  src: url('../fonts/EBGaramond-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  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: 'EB Garamond';
  src: url('../fonts/EBGaramond-latin-ext.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* ========= COLOR THEMES (per card type) ========= */

/* Theme 1: Product (Warm Gold) */
.page-product {
  --ink: #3b2e28;
  --heading: #5c4033;
  --muted: #6d5447;
  --accent: #c07a2d;
  --accent-dark: #8a5523;
  --accent-light: #faf0e0;
  --btn-bg: #fffaf4;
  --btn-hover: #fdf2e5;
  --handbook: #fdf9f3;
  --paper: #f9f5ef;
  --paper-top: #f7f0e2;
  --paper-mid: #fdf9f3;
  --paper-blend: color-mix(in srgb, var(--paper-top) 50%, var(--paper-mid) 50%);
  --paper-edge: rgba(0, 0, 0, .06);
  --rule-line: #e0d7c8;
}

/* Theme 2: Instruction (Steel Blue) */
.page-instruction {
  --ink: #366889;
  --heading: #214c6b;
  --muted: #3e5666;
  --accent: #2e5e84;
  --accent-dark: #1c3e57;
  --accent-light: #ebf1f5;
  --btn-bg: #f6f9fc;
  --btn-hover: #eef3f7;
  --handbook: #f7f4e2;
  --paper: #f2efeb;
  --paper-top: #f4eed8;
  --paper-mid: #f7f4e2;
  --paper-blend: color-mix(in srgb, var(--paper-top) 50%, var(--paper-mid) 50%);
  --paper-edge: rgba(0, 0, 0, .06);
  --rule-line: #c9d3da;
}

/* Theme 3: Knowledge (Sage Green) */
.page-knowledge {
  --ink: #487444;
  --heading: #1a4324;
  --muted: #4c5a6a;
  --accent: #4d6b50;
  --accent-dark: #2e5036;
  --accent-light: #e8ede8;
  --btn-bg: #fffdf5;
  --btn-hover: #f2eee6;
  --handbook: #f7f4e2;
  --paper: #f2efeb;
  --paper-top: #f4eed8;
  --paper-mid: #f7f4e2;
  --paper-blend: color-mix(in srgb, var(--paper-top) 50%, var(--paper-mid) 50%);
  --paper-edge: rgba(0, 0, 0, .06);
  --rule-line: #d0cfb8;
}

/* Theme 4: Maker (Workshop Orange) */
.page-maker {
  --ink: #3e342e;
  --heading: #8c451c;
  --muted: #7a6455;
  --accent: #b75e28;
  --accent-dark: #7a3d18;
  --accent-light: #f5e8da;
  --btn-bg: #fffdf5;
  --btn-hover: #f2eee6;
  --handbook: #f7f4e2;
  --paper: #f2efeb;
  --paper-top: #f4eed8;
  --paper-mid: #f7f4e2;
  --paper-blend: color-mix(in srgb, var(--paper-top) 50%, var(--paper-mid) 50%);
  --paper-edge: rgba(0, 0, 0, .06);
  --rule-line: #cc8e70;
}



/* Theme 5: Network (Deep Teal) */
.page-network {
  --ink: #2a4a4a;
  --heading: #1a3a3a;
  --muted: #4a6060;
  --accent: #2a6b6b;
  --accent-dark: #1a4a4a;
  --accent-light: #e0eaea;
  --btn-bg: #f5fafa;
  --btn-hover: #eaf2f2;
  --handbook: #f2f7f5;
  --paper: #eef3f1;
  --paper-top: #e8f0ec;
  --paper-mid: #f2f7f5;
  --paper-blend: color-mix(in srgb, var(--paper-top) 50%, var(--paper-mid) 50%);
  --paper-edge: rgba(0, 0, 0, .06);
  --rule-line: #b8ccc4;
}


/* ========= GENERAL VARIABLES & BASE ========= */
:root {
  /* Eo Ena header/footer layout */
  --brand-line: 6px;
  --brand-pad: 1.4rem;
  --badge-h: 34px;
  --eo-h: 130px;
  --badge-y: 6px;
  --stamp-lift: 10px;

  /* Shared body variables (defaults, work with all themes) */
  --teal: #2a6b6b;
  --bg-card: #faf7f0;
  --bg-paper: #fffdf8;
  --ink-light: #6b5e52;
  --ink-faint: #7b6e5e;
  --line: #d0c9b8;
  --line-light: #ddd5c8;
}

html, body {
  margin: 0;
  padding: 0;
}

html {
  background: var(--paper);
}

body {
  /* min-height (not height) so the body grows with content. With
     height:100% the body box stayed viewport-sized and the bg didn't
     show when scrolling past a long card. */
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  font: 18px/1.6 "Lora", Georgia, serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.container {
  max-width: 980px;
  margin: 3.5rem auto;
  padding: 0 1.2rem;
}


/* ========= CARD (paper texture) ========= */
.card {
  position: relative;
  background: var(--handbook);
  border-radius: 18px;
  padding: 1.4rem 1.6rem 1.6rem;
  overflow: hidden;
  border: 1px solid transparent;
  box-shadow:
    inset 0 1px 3px rgba(80, 60, 40, .08),
    inset 0 -1px 3px rgba(80, 60, 40, .05),
    0 14px 36px rgba(80, 60, 40, .18),
    0 5px 15px rgba(80, 60, 40, .10),
    0 1px 3px rgba(0, 0, 0, .05);
  background:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="2" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="0.04"/></svg>') repeat,
    radial-gradient(1200px 220px at 50% -20px, rgba(120, 80, 50, .05) 0%, rgba(120, 80, 50, .03) 40%, rgba(0, 0, 0, 0) 80%),
    radial-gradient(600px 160px at -80px -40px, rgba(120, 80, 50, .05), rgba(0, 0, 0, 0) 70%),
    radial-gradient(600px 160px at calc(100% + 80px) -40px, rgba(120, 80, 50, .05), rgba(0, 0, 0, 0) 70%),
    linear-gradient(to right, var(--paper-top) 0%, var(--paper-top) 10%, var(--paper-blend) 22%, var(--paper-mid) 38%, var(--paper-mid) 62%, var(--paper-blend) 78%, var(--paper-top) 90%, var(--paper-top) 100%),
    var(--paper);
  background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, scroll, scroll, scroll, scroll, scroll;
  transition: background-color .35s ease, box-shadow .35s ease, border-color .35s ease, background-image .35s ease;
}


/* ========= HEADER (Eo Ena brand band) ========= */
.masthead {
  margin: .2rem 0 1.4rem;
}

.brand-band {
  position: relative;
  border-top: var(--brand-line) double var(--heading);
  border-bottom: var(--brand-line) double var(--heading);
  /* Asymmetric padding (total stays 2.8rem, same as original 1.4+1.4):
     more on top so the brand text drops below the badge box, less on
     bottom so the band height remains unchanged. */
  padding-block: 1.95rem .85rem;
}

.brand-link {
  text-decoration: none;
  color: inherit;
}

.brand {
  font-family: "Lora", serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  word-spacing: .21em;
  color: var(--heading);
  font-size: clamp(1.6rem, 4.8vw, 2.2rem);
  line-height: 1.08;
  margin: 0;
  text-align: center;
  padding: 0 7.5rem;
}
.brand-short {
  display: none;
}

.eo-figure {
  position: absolute;
  left: .9rem;
  top: 50%;
  height: var(--eo-h);
  transform: translateY(-45%);
  z-index: 2;
}

.brand-program {
  text-align: center;
  font-family: 'EB Garamond', serif;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .25rem;
}

.badge-img {
  position: absolute;
  right: 1.2rem;
  height: var(--badge-h);
  z-index: 3;
  top: calc(-1 * ((var(--badge-h) / 2) + (var(--brand-line) / 2)) + var(--badge-y));
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .10));
  pointer-events: none;
}


/* ========= MASTHEAD META (program + codon) ========= */
.masthead-meta,
.card-body {
  position: relative;
  z-index: 5;
}
.card-intro {
  position: relative;
  z-index: 6;
}

.masthead-meta {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  padding: .6rem 0 0;
  font-size: .82rem;
}

/* ========= CARD INTRO (title + lede, below brand band) ========= */
.card-intro {
  padding: .8rem 0 .4rem;
}

.card-title {
  font-family: 'EB Garamond', 'Lora', serif;
  font-size: clamp(1.4rem, 4.2vw, 2rem);
  font-weight: 700;
  color: var(--heading);
  letter-spacing: .04em;
  margin: 0;
  line-height: 1.25;
}

.card-lede {
  margin: .3rem 0 0;
  font-size: .95rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.55;
}

.meta-program {
  font-family: 'EB Garamond', serif;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .04em;
}

.meta-codon {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: .75rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: .04em;
}


/* ========= TITLES & META ========= */
h1, h2 {
  font-family: "EB Garamond", "Lora", serif;
  letter-spacing: .04em;
  margin: .4rem 0;
}

h1 {
  color: var(--heading);
  font-size: clamp(1.4rem, 4.2vw, 2rem);
  font-weight: 700;
}

h2 {
  font-size: 1.05rem;
  color: var(--heading);
  font-weight: 600;
  margin: 1.25rem 0 .4rem;
  padding-bottom: .2rem;
  border-bottom: 1px solid var(--line-light);
}

h2 + .story,
h2 + p,
h2 + ul,
h2 + ol {
  margin-top: .25rem;
}

.lede {
  margin: .2rem 0 1rem;
  color: var(--muted);
  font-size: 1.2rem;
}


/* ========= CARD BODY ========= */
.card-body {
  padding: .5rem .2rem;
}

.card-body a {
  color: var(--teal);
}
.card-body a:hover {
  color: var(--accent);
}


/* ========= SECTION TITLES ========= */
.section-title {
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.25rem 0 .4rem;
  padding-bottom: .2rem;
  border-bottom: 1px solid var(--line-light);
}
.section-title:first-child { margin-top: 0; }


/* ========= BODY TEXT & STORY ========= */
.story {
  font-size: .88rem;
  line-height: 1.75;
  color: var(--ink);
}
.story p {
  margin: .4rem 0;
}
.story strong {
  color: var(--accent-dark, var(--ink));
}
.story h2 {
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.25rem 0 .4rem;
  padding-bottom: .2rem;
  border-bottom: 1px solid var(--line-light);
}
.story ul, .story ol {
  padding-left: 1.4rem;
  margin: .4rem 0;
}
.story li {
  margin: .25rem 0;
}


/* ========= STORY SECTIONS (framed knowledge boxes) ========= */
.story-section {
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  padding: 1rem 1.25rem;
  margin-bottom: .75rem;
}
.story-section h2 {
  margin-top: 0;
  padding-bottom: .15rem;
  border-bottom: none;
}
.story-section ul,
.story-section ol {
  padding-left: 1.4rem;
  margin: .4rem 0;
}
.story-section li {
  margin: .25rem 0;
}

/* The Essence — key takeaway */
.story-section--essence {
  border-left: 3px solid var(--accent);
  border-color: var(--line-light);
  border-left-color: var(--accent);
  background: var(--bg-paper);
}

/* Output / Goal — prominent callout */
.story-section--output {
  border-left: 3px solid var(--accent);
  border-color: var(--line-light);
  border-left-color: var(--accent);
  background: var(--accent-light);
}
.story-section--output h2 {
  color: var(--accent);
}

/* Why It Matters — standard section */
.story-section--context {
  background: var(--bg-paper);
  border: 1px solid var(--line-light);
}

/* Minimum Starting Conditions — prereq-style box */
.story-section--conditions {
  border: 1.5px solid var(--accent);
  background: var(--accent-light);
}
.story-section--conditions h2 {
  color: var(--accent);
}

/* The Process — clean section */
.story-section--process {
  background: var(--bg-paper);
}

/* How To Verify — accent border */
.story-section--verify {
  border-left: 3px solid var(--teal);
  border-color: var(--line-light);
  border-left-color: var(--teal);
}

/* Common Failures & Recovery — standard */
.story-section--recovery {
  background: var(--bg-paper);
}

/* Hazards — warning style */
.story-section--hazards {
  border: 1.5px solid #b54a3a;
  background: #fdf0ee;
}
.story-section--hazards h2 {
  color: #b54a3a;
}

/* Sources / Lineage — quiet */
.story-section--sources {
  background: var(--bg-paper);
  border: 1px solid var(--line);
}


/* ========= TOPIC BADGES ========= */
.topic-list {
  margin-bottom: .8rem;
}
.topic-badge {
  display: inline-block;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  padding: .15rem .55rem;
  margin: .15rem .2rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--ink-light);
  letter-spacing: .03em;
}


/* ========= SHARED BOX LABEL ========= */
.box-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: .4rem;
}
.box-text {
  margin: 0;
  font-size: .82rem;
  line-height: 1.7;
}
.box-text--upgrade {
  font-style: italic;
  color: var(--ink-light);
  margin-top: .3rem;
  font-size: .78rem;
}


/* ========= MATERIALS BOX (instruction cards) ========= */
.materials-box {
  border: 1.5px solid var(--accent);
  background: var(--accent-light);
  padding: .85rem 1rem;
  margin-bottom: .75rem;
}
.materials-box .box-label {
  color: var(--accent);
}
.materials-box--optional {
  border-style: dashed;
  border-color: var(--line);
  background: var(--bg-card);
}
.materials-box--optional .box-label {
  color: var(--ink-light);
}
.materials-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.materials-item {
  padding: .35rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, .07);
  font-size: .8rem;
  line-height: 1.65;
}
.materials-item:last-child {
  border-bottom: none;
}


/* ========= PREREQUISITES / RECOMMENDED / UNLOCKS ========= */
.prereq-group {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: .75rem;
}
.prereq-box {
  flex: 1;
  min-width: 180px;
  border: 1px solid var(--accent);
  background: var(--accent-light);
  padding: .85rem 1rem;
}
.prereq-box .box-label {
  color: var(--accent);
}
.prereq-box--recommended {
  border-color: #c4913a;
  background: #faf0e0;
}
.prereq-box--recommended .box-label {
  color: #c4913a;
}
.prereq-box--unlocks {
  border-color: var(--teal);
  background: #e8f0ef;
}
.prereq-box--unlocks .box-label {
  color: var(--teal);
}
.prereq-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.prereq-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, .07);
  font-size: .8rem;
}
.prereq-item:last-child {
  border-bottom: none;
}
.prereq-title {
  color: var(--ink);
}


/* ========= STEP LIST ========= */
.step-list {
  list-style: none;
  counter-reset: steps;
  padding: 0;
}
.step-item {
  counter-increment: steps;
  display: flex;
  gap: .6rem;
  padding: .4rem 0;
  font-size: .82rem;
  line-height: 1.65;
}
.step-item::before {
  content: counter(steps);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: .1rem;
}

/* Rule step — visually distinct final step */
.step-item--rule {
  border: 1.5px solid #b54a3a;
  background: #fdf0ee;
  padding: .5rem .8rem;
  margin-top: .4rem;
}
.step-item--rule::before {
  background: #b54a3a;
  color: #fff;
}


/* ========= OUTPUT BOX ========= */
.output-box {
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
  padding: .85rem 1rem;
  margin-bottom: .75rem;
}
.output-box .box-label {
  color: var(--accent);
}


/* ========= CONSEQUENCE CALLOUT ========= */
.consequence-box {
  text-align: center;
  font-weight: 600;
  color: #b54a3a;
  padding: .6rem 1rem;
  margin: .75rem 0;
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
  font-size: .85rem;
  font-style: italic;
}


/* ========= VERIFY / FAILURES / HAZARDS BOXES ========= */
.verify-box,
.failures-box,
.hazards-box {
  padding: .85rem 1rem;
  margin-bottom: .75rem;
  font-size: .82rem;
  line-height: 1.7;
}
.field-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.field-list li {
  padding: .3rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}
.field-list li:last-child {
  border-bottom: none;
}

.verify-box {
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-left: 3px solid var(--teal);
}
.verify-box .box-label {
  color: var(--teal);
}

.failures-box {
  background: var(--bg-card);
  border: 1px solid var(--line-light);
}
.failures-box .box-label {
  color: var(--ink-light);
}

.hazards-box {
  border: 1.5px solid #b54a3a;
  background: #fdf0ee;
}
.hazards-box .box-label {
  color: #b54a3a;
}


/* ========= SOURCES ========= */
.sources-box {
  background: var(--bg-paper);
  border: 1px solid var(--line);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: .82rem;
  line-height: 1.7;
}
.sources-box .section-label {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: .4rem;
}
.sources-box ul {
  padding-left: 1.2rem;
  margin: 0;
}
.sources-box li {
  margin: .25rem 0;
}


/* ========= MAKER META (maker cards) ========= */
.page-maker,
.page-knowledge,
.page-instruction,
.page-product,
.page-network {
  /* Line crosses the stamp 1/3 from the bottom: 26px below the line,
     52px above. Stamp is 78px tall → centre 13px above the line. */
  --stamp-lift: 13px;
}

.page-maker {
  background-color: #efe8df;
}

.page-knowledge {
  background-color: #ecede4;
}

.page-instruction {
  background-color: #e8eaee;
}

.page-product {
  background-color: #f1e9da;
}

.page-network {
  background-color: #e3eaea;
}

.page-maker .container, .page-knowledge .container, .page-instruction .container, .page-product .container, .page-network .container {
  max-width: 1040px;
  /* Top, l/r auto, bottom: generous space so the card always
     releases from the viewport bottom after scrolling. */
  margin: 1.2rem auto 6rem;
}

.page-maker .card, .page-knowledge .card, .page-instruction .card, .page-product .card, .page-network .card {
  padding: 1.45rem 1.65rem 1.25rem;
  border: 2px solid color-mix(in srgb, var(--accent-dark) 55%, transparent);
  border-radius: 18px;
  box-shadow:
    inset 0 0 0 5px rgba(255, 250, 239, .78),
    inset 0 0 0 7px color-mix(in srgb, var(--accent-dark) 22%, transparent),
    0 16px 38px rgba(85, 50, 25, .22),
    0 2px 6px rgba(85, 50, 25, .12);
  color: var(--ink);
}

.page-maker .card::before, .page-knowledge .card::before, .page-instruction .card::before, .page-product .card::before, .page-network .card::before {
  content: "";
  position: absolute;
  inset: 1.05rem;
  border: none;
  border-radius: 6px;
  pointer-events: none;
  z-index: 1;
}

.page-maker .card::after, .page-knowledge .card::after, .page-instruction .card::after, .page-product .card::after, .page-network .card::after {
  content: "";
  position: absolute;
  inset: 1.35rem;
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-dark) 45%, transparent) 0 1px, transparent 1px 26px) left top / 42px 42px no-repeat,
    linear-gradient(225deg, color-mix(in srgb, var(--accent-dark) 45%, transparent) 0 1px, transparent 1px 26px) right top / 42px 42px no-repeat,
    linear-gradient(45deg, color-mix(in srgb, var(--accent-dark) 45%, transparent) 0 1px, transparent 1px 26px) left bottom / 42px 42px no-repeat,
    linear-gradient(315deg, color-mix(in srgb, var(--accent-dark) 45%, transparent) 0 1px, transparent 1px 26px) right bottom / 42px 42px no-repeat;
}

.page-maker .card > *, .page-knowledge .card > *, .page-instruction .card > *, .page-product .card > *, .page-network .card > * {
  position: relative;
  z-index: 2;
}

.tarot-masthead {
  position: relative;
  margin: 0 0 1rem;
}

/* ── Banner ribbon (top-right corner of card) ─────────
   Wraps over the top horizontal rule of the brand-band with a
   chevron tail pointing left. */
.tarot-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  padding: .55rem 1.4rem .6rem 1.8rem;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff8ee;
  clip-path: polygon(15% 0, 100% 0, 100% 100%, 15% 100%, 0 50%);
  font-family: "EB Garamond", "Lora", serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(45, 20, 8, .35);
}

.tarot-type-seal {
  display: none;
}

/* ── Brand band: rules above + below, portrait · almanac ── */
.tarot-brand-band {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.6rem;
  padding: 1.4rem 1.5rem;
  background: transparent;
  border-top: 1px solid color-mix(in srgb, var(--accent-dark) 55%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent-dark) 55%, transparent);
  border-radius: 0;
  margin: 0;
}

.tarot-brand-portrait {
  display: block;
  width: auto;
  height: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
}
.tarot-brand-portrait img {
  width: auto;
  height: 130px;
  margin: 0;
  mix-blend-mode: multiply;
  opacity: .94;
  filter: sepia(.25) saturate(.82);
}

.tarot-brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  line-height: 1.2;
}
.tarot-brand-name {
  font-family: "EB Garamond", "Lora", serif;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent-dark);
  text-transform: uppercase;
  line-height: 1.1;
}
.tarot-brand-name .brand-short { display: none; }
.tarot-brand-edition {
  font-family: "EB Garamond", "Lora", serif;
  font-size: 1rem;
  font-style: italic;
  letter-spacing: .08em;
  color: var(--muted);
  margin-top: .35rem;
  text-transform: uppercase;
}

/* ── Meta strip below the brand-band, right-aligned ──── */
.tarot-brand-meta {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: .65rem;
  padding: .55rem 1.5rem 0;
  font-family: "Lora", Georgia, serif;
  font-size: .82rem;
  letter-spacing: .03em;
  color: var(--muted);
}
.tarot-brand-meta .meta-codon {
  color: var(--accent-dark);
  font-weight: 600;
}
.tarot-brand-meta .meta-codon .codon-sep {
  margin: 0 .15em;
  opacity: .6;
}
.tarot-brand-meta .meta-set-number {
  color: var(--accent-dark);
  font-weight: 700;
}
.tarot-brand-meta .tier-badge {
  font-size: .68rem;
  padding: .15em .55em;
  letter-spacing: .14em;
}

/* ── Card-specific intro (the tarot focus) ───────────── */
.tarot-card-intro {
  text-align: center;
  margin-top: 1.2rem;
}

.page-maker .card-title, .page-knowledge .card-title, .page-instruction .card-title, .page-product .card-title, .page-network .card-title {
  font-size: clamp(2rem, 6vw, 2.55rem);
  letter-spacing: .02em;
  color: var(--accent-dark);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
}

.page-maker .card-lede, .page-knowledge .card-lede, .page-instruction .card-lede, .page-product .card-lede, .page-network .card-lede {
  max-width: 34rem;
  margin: .15rem auto 0;
  font-size: 1rem;
  color: var(--muted);
}


.maker-card-body,
.page-maker .card-body,
.page-knowledge .card-body,
.page-instruction .card-body,
.page-product .card-body,
.page-network .card-body {
  /* Zero horizontal padding so body content aligns with the masthead
     title's left edge (both flush to the .card padding). */
  padding: .45rem 0 .1rem;
}

.maker-profile-grid {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(240px, 1fr);
  gap: 1.55rem;
  align-items: center;
  margin: .2rem 0 .95rem;
}

.maker-portrait {
  margin: 0;
}

.maker-portrait img {
  width: min(100%, 215px);
  margin: 0 auto;
  mix-blend-mode: multiply;
  opacity: .94;
  filter: sepia(.25) saturate(.82) contrast(.98);
}

.maker-meta-box {
  background: rgba(255, 250, 239, .46);
  border: 1.5px solid color-mix(in srgb, var(--accent-dark) 42%, transparent);
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38);
  padding: .95rem 1.2rem;
  font-size: .83rem;
  color: var(--ink);
}
.meta-line {
  padding: .23rem 0;
}
.meta-line strong {
  color: var(--accent-dark);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.meta-line a {
  color: var(--accent);
  font-weight: 700;
}
.maker-ref {
  margin: 1rem 0;
  font-size: .85rem;
}

.maker-story {
  max-width: none;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--ink);
}

.maker-story p {
  margin: .85rem 0;
}

.page-maker .card-actions a, .page-knowledge .card-actions a, .page-instruction .card-actions a, .page-product .card-actions a, .page-network .card-actions a,
.page-maker .ai-dropdown summary, .page-knowledge .ai-dropdown summary, .page-instruction .ai-dropdown summary, .page-product .ai-dropdown summary, .page-network .ai-dropdown summary {
  border-color: color-mix(in srgb, var(--accent-dark) 62%, transparent);
  color: var(--accent-dark);
  background: rgba(255, 250, 239, .42);
}

.page-maker .footer-stamp, .page-knowledge .footer-stamp, .page-instruction .footer-stamp, .page-product .footer-stamp, .page-network .footer-stamp {
  margin-top: 1.2rem;
  /* Top padding accommodates the upper 2/3 of the stamp (52px) above
     the rule line. Bottom padding for spacing before the DNA strip. */
  padding: 4rem 0 .8rem;
}

/* Two short rule segments flanking the stamp, leaving it free in the
   middle. Each segment fades on both ends. */
.page-maker .footer-line, .page-knowledge .footer-line, .page-instruction .footer-line, .page-product .footer-line, .page-network .footer-line {
  position: relative;
  max-width: 100%;
  height: 2px;
  background: none;
}
.page-maker .footer-line::before, .page-knowledge .footer-line::before, .page-instruction .footer-line::before, .page-product .footer-line::before, .page-network .footer-line::before,
.page-maker .footer-line::after,  .page-knowledge .footer-line::after,  .page-instruction .footer-line::after,  .page-product .footer-line::after,  .page-network .footer-line::after {
  content: "";
  position: absolute;
  top: 0;
  height: 2px;
  pointer-events: none;
}
/* Left segment: solid at the inner (right) end, fades to transparent on the far left. */
.page-maker .footer-line::before, .page-knowledge .footer-line::before, .page-instruction .footer-line::before, .page-product .footer-line::before, .page-network .footer-line::before {
  left: 0;
  right: calc(50% + 70px);
  background: linear-gradient(to right,
    transparent 0%,
    color-mix(in srgb, var(--accent-dark) 28%, transparent) 100%);
}
/* Right segment: solid at the inner (left) end, fades to transparent on the far right. */
.page-maker .footer-line::after,  .page-knowledge .footer-line::after,  .page-instruction .footer-line::after,  .page-product .footer-line::after,  .page-network .footer-line::after {
  left: calc(50% + 70px);
  right: 0;
  background: linear-gradient(to right,
    color-mix(in srgb, var(--accent-dark) 28%, transparent) 0%,
    transparent 100%);
}

.page-maker .footer-stamp-img, .page-knowledge .footer-stamp-img, .page-instruction .footer-stamp-img, .page-product .footer-stamp-img, .page-network .footer-stamp-img {
  height: 78px;
  filter: sepia(.25) saturate(.85);
}

.page-maker .footer-info, .page-knowledge .footer-info, .page-instruction .footer-info, .page-product .footer-info, .page-network .footer-info,
.page-maker .footer-tier, .page-knowledge .footer-tier, .page-instruction .footer-tier, .page-product .footer-tier, .page-network .footer-tier {
  display: none;
}

/* ── DNA strip: codon · full DNA · set-number ─────────── */
.page-maker .dna-wrap, .page-knowledge .dna-wrap, .page-instruction .dna-wrap, .page-product .dna-wrap, .page-network .dna-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .25rem 1rem;
  /* Margin clears the lower 1/3 (26px) of the stamp that hangs below
     the rule line. */
  margin-top: 2.2rem;
  padding: 0 .55rem;
  text-align: left;
  font-size: .72rem;
  opacity: 1;
}

.page-maker .dna-label, .page-knowledge .dna-label, .page-instruction .dna-label, .page-product .dna-label, .page-network .dna-label {
  order: 1;
  color: var(--accent-dark);
  font-family: "Lora", Georgia, serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.page-maker .dna-code, .page-knowledge .dna-code, .page-instruction .dna-code, .page-product .dna-code, .page-network .dna-code {
  order: 2;
  display: block;
  font-family: "Lora", Georgia, monospace;
  font-size: .68rem;
  letter-spacing: .04em;
  color: var(--muted);
  text-align: center;
  word-break: break-all;
  line-height: 1.45;
}
.page-maker .dna-code::before, .page-knowledge .dna-code::before, .page-instruction .dna-code::before, .page-product .dna-code::before, .page-network .dna-code::before {
  content: "sba: ";
  color: var(--accent-dark);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: lowercase;
  margin-right: .15em;
}

.page-maker .dna-set-number, .page-knowledge .dna-set-number, .page-instruction .dna-set-number, .page-product .dna-set-number, .page-network .dna-set-number {
  order: 3;
  color: var(--accent-dark);
  font-family: "Lora", Georgia, serif;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}


/* ========= CARD HERO IMAGE =========
   Illustration integrated into the paper — no frame, no shadow.
   mix-blend-mode: multiply makes white pixels take on the paper tone,
   so line-art engravings feel printed on, not pasted on. */
.card-hero {
  margin: .25rem 0 1.5rem 0;
  padding: 0;
  text-align: center;
}
.card-hero-img {
  display: block;
  max-width: 92%;
  max-height: 420px;
  width: auto;
  height: auto;
  margin: 0 auto;
  mix-blend-mode: multiply;
}
.card-hero-caption {
  display: block;
  margin: .35rem auto 0 auto;
  font-size: .75rem;
  color: var(--ink-light);
  text-align: center;
  font-style: italic;
  letter-spacing: .02em;
  max-width: 34em;
}


/* ========= STEPS — DIY-MANUAL STYLE =========
   Ochre banner + 2-column grid of numbered step cards.
   Inspired by vintage handyman manuals (Reader's Digest era). */
.step-banner {
  background: #c4a25c;
  color: #fffdf8;
  padding: .5rem 1rem;
  margin: 1.75rem 0 1rem 0;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .78rem;
}
.step-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 0 0 1.25rem 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (max-width: 640px) {
  .step-grid { grid-template-columns: 1fr; }
}
.step-card {
  background: #fbf4e2;
  border: 1px solid #e8dcb8;
  padding: .9rem 1.05rem 1rem 1.05rem;
  position: relative;
  display: flex;
  flex-direction: column;
}
.step-card-num {
  display: block;
  font-family: 'Lora', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #c4a25c;
  line-height: 1;
  margin: 0 0 .25rem 0;
}
.step-card-img {
  display: block;
  max-width: 100%;
  max-height: 180px;
  margin: .35rem auto .55rem auto;
  mix-blend-mode: multiply;
}
.step-card-title {
  display: block;
  font-weight: 700;
  margin: 0 0 .3rem 0;
  font-size: .98rem;
  color: var(--ink);
}
.step-card-text {
  font-size: .88rem;
  line-height: 1.55;
  color: var(--ink);
}


/* ========= INSTRUCTION BUILD-MANUAL LAYOUT =========
   Hero · stats strip · materials/tools · phase grid · safety
   Used by body-howto.njk. Replaces the older step-card grid above. */

.howto-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent-dark);
}

/* -- Hero row: image + yield circle -- */
.howto-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  margin: 0 0 1.5rem 0;
}
.howto-hero-image {
  margin: 0;
  text-align: center;
}
.howto-hero-image img {
  display: block;
  max-width: 100%;
  max-height: 240px;
  margin: 0 auto;
  mix-blend-mode: multiply;
}
.howto-hero-image figcaption {
  margin-top: .35rem;
  font-size: .72rem;
  font-style: italic;
  color: var(--muted);
}
.howto-hero-yield {
  text-align: center;
  min-width: 120px;
}
.yield-circle {
  width: 86px;
  height: 86px;
  margin: 0 auto;
  border: 1.5px solid var(--accent-dark);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-light);
}
.yield-qty {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent-dark);
  line-height: 1;
}
.yield-label {
  margin-top: .35rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
}
.yield-sub {
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* -- Stats strip -- */
.howto-stats {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--rule-line);
  border-radius: 4px;
  background: rgba(255, 255, 255, .35);
  margin: 0 0 1.4rem 0;
  overflow: hidden;
}
.howto-stat {
  padding: .7rem .9rem .8rem .9rem;
  border-right: 1px dashed var(--rule-line);
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.howto-stat:last-child { border-right: 0; }
.howto-stat-head {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.howto-stat-body {
  font-size: .82rem;
  line-height: 1.4;
  color: var(--ink);
}
.howto-stat-primary {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: .01em;
}
.howto-stat-secondary {
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.howto-stat-primary.tier-tag {
  font-size: .85rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}

/* -- Materials/Tools 2-col -- */
.howto-mt {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 1.1rem;
  margin: 0 0 1.4rem 0;
}
.howto-materials,
.howto-tools,
.howto-risks {
  background: rgba(255, 255, 255, .42);
  border: 1px solid var(--rule-line);
  border-radius: 4px;
  padding: .85rem 1rem;
}
.howto-tools-risks {
  display: grid;
  gap: 1.1rem;
}

/* Materials table */
.materials-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: .35rem;
  font-size: .87rem;
}
.materials-table tr + tr td {
  border-top: 1px dashed var(--line-light, rgba(0,0,0,.08));
}
.materials-table td {
  padding: .28rem .4rem;
  vertical-align: top;
}
.materials-table-letter {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 700;
  color: var(--accent-dark);
  width: 1.6em;
  letter-spacing: .02em;
}
.materials-table-name {
  color: var(--ink);
}
.materials-table-qty {
  color: var(--muted);
  font-size: .82rem;
  margin-left: .25em;
}
.materials-table-dim {
  color: var(--muted);
  font-family: 'Lora', Georgia, serif;
  font-size: .82rem;
  text-align: right;
  white-space: nowrap;
}
.materials-optional {
  margin-top: .55rem;
  padding-top: .45rem;
  border-top: 1px dashed var(--line-light, rgba(0,0,0,.08));
}
.materials-optional-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .25rem;
}
.materials-list--inline {
  font-size: .82rem;
  color: var(--ink);
}
.materials-note {
  margin: .5rem 0 0 0;
  font-size: .82rem;
  color: var(--muted);
  font-style: italic;
}

/* Tools row */
.howto-tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem 1.1rem;
  margin-top: .5rem;
}
.howto-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  min-width: 56px;
}
.howto-icon--tool {
  width: 38px;
  height: 38px;
  color: var(--accent-dark);
}
.howto-tool-label {
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: center;
}

/* Risks box */
.howto-risks {
  border-color: #d4a93a;
  background: #fdf6e0;
  border-left: 4px solid #c69820;
}
.howto-risks-head {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7a5a16;
  margin-bottom: .4rem;
}
.howto-risks-icon {
  font-size: 1.05rem;
  color: #b07918;
}
.howto-risks-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem .9rem;
  font-size: .82rem;
  color: var(--ink);
}
.howto-risks-list li {
  position: relative;
  padding-left: .9rem;
}
.howto-risks-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #b07918;
}

/* -- Build process — phase grid -- */
.howto-phases { margin: 0 0 1.4rem 0; }
.howto-phases-head {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: .55rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--rule-line);
}
.howto-phases-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .85rem;
}
.howto-phases-grid--1 { grid-template-columns: 1fr; }
.howto-phases-grid--2 { grid-template-columns: repeat(2, 1fr); }
.howto-phases-grid--3 { grid-template-columns: repeat(3, 1fr); }
.howto-phases-grid--4 { grid-template-columns: repeat(4, 1fr); }
.howto-phases-grid--5,
.howto-phases-grid--6,
.howto-phases-grid--7,
.howto-phases-grid--8 { grid-template-columns: repeat(4, 1fr); }
.howto-phase {
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--rule-line);
  border-radius: 4px;
  padding: .7rem .8rem .8rem .8rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.howto-phase-head {
  display: flex;
  align-items: center;
  gap: .55rem;
}
.howto-phase-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-dark);
  color: #fff;
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 700;
  font-size: .98rem;
  flex-shrink: 0;
}
.howto-phase-name {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-dark);
  line-height: 1.25;
}
.howto-phase-img {
  display: block;
  width: 100%;
  max-height: 110px;
  object-fit: contain;
  margin: .15rem 0;
  mix-blend-mode: multiply;
}
.howto-phase-text {
  margin: 0;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--ink);
}
.howto-phase-substeps {
  list-style: none;
  padding: 0;
  margin: .25rem 0 0 0;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--ink);
}
.howto-phase-substeps li {
  position: relative;
  padding-left: 1rem;
  margin: 0 0 .2rem 0;
}
.howto-phase-substeps li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--accent-dark);
  font-weight: 700;
}
.howto-phase-tip {
  margin-top: auto;
  padding: .4rem .55rem;
  background: #fdf6e0;
  border-left: 3px solid #c69820;
  font-size: .76rem;
  line-height: 1.4;
  color: #7a5a16;
  border-radius: 2px;
}
.howto-phase-tip-icon {
  color: #b07918;
  font-weight: 700;
  margin-right: .15em;
}

/* -- Safety strip -- */
.howto-safety {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 1rem;
  margin: 0 0 1.4rem 0;
}
.howto-safety-pictograms {
  background: rgba(255, 255, 255, .42);
  border: 1px solid var(--rule-line);
  border-radius: 4px;
  padding: .8rem 1rem;
}
.howto-safety-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.4rem;
  margin-top: .5rem;
}
.howto-safety-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  min-width: 64px;
}
.howto-icon--safety {
  width: 36px;
  height: 36px;
  color: var(--accent-dark);
}
.howto-safety-label {
  font-size: .68rem;
  letter-spacing: .04em;
  color: var(--ink);
  text-align: center;
  text-transform: capitalize;
}
.howto-safety-vignette {
  display: flex;
  align-items: center;
  gap: .8rem;
  background: rgba(255, 255, 255, .5);
  border: 1px dashed var(--rule-line);
  border-radius: 4px;
  padding: .65rem .85rem;
  font-style: italic;
  color: var(--ink);
}
.howto-safety-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-dark);
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}
.howto-safety-motto {
  margin: 0;
  font-size: .82rem;
  line-height: 1.4;
}

/* -- Responsive -- */
@media (max-width: 720px) {
  .howto-hero { grid-template-columns: 1fr; gap: .8rem; }
  .howto-stats { grid-template-columns: repeat(2, 1fr); }
  .howto-stat { border-right: 0; border-bottom: 1px dashed var(--rule-line); }
  .howto-mt { grid-template-columns: 1fr; }
  .howto-phases-grid--2,
  .howto-phases-grid--3,
  .howto-phases-grid--4,
  .howto-phases-grid--5,
  .howto-phases-grid--6 { grid-template-columns: 1fr; }
  .howto-safety { grid-template-columns: 1fr; }
  .howto-risks-list { grid-template-columns: 1fr; }
}

/* -- Print: keep layout, drop colour -- */
@media print {
  .howto-stats,
  .howto-materials,
  .howto-tools,
  .howto-risks,
  .howto-phase,
  .howto-safety-pictograms,
  .howto-safety-vignette {
    background: #fff !important;
    border-color: #ccc !important;
  }
  .howto-risks { border-left-color: #888 !important; background: #f7f4e8 !important; }
  .howto-phase-tip { background: #f7f4e8 !important; border-left-color: #888 !important; color: #444 !important; }
  .howto-phases-grid--3,
  .howto-phases-grid--4,
  .howto-phases-grid--5,
  .howto-phases-grid--6 { grid-template-columns: repeat(2, 1fr); }
  .howto-phase { break-inside: avoid; }
  .howto-icon { color: #444 !important; }
  .howto-phase-num,
  .howto-safety-mark { background: #444 !important; }
  .yield-circle { background: #f7f4e8 !important; border-color: #444 !important; }
  .howto-stat-primary { color: #333 !important; }
  .howto-phase-img,
  .howto-hero-image img { filter: grayscale(1); }
}


/* ========= CARD SEPARATOR ========= */
.card-sep {
  margin: 0;
  border: none;
  border-top: 1px solid var(--line-light);
}


/* ========= SEE ALSO ========= */
.seealso-box {
  padding: .85rem 0;
}
.seealso-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: .5rem;
}
.seealso-items {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.seealso-tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  padding: .3rem .65rem;
  font-size: .75rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .2s ease;
}
a.seealso-tag:hover {
  border-color: var(--accent);
}
.seealso-title {
  color: var(--ink-light);
  font-size: .7rem;
}


/* ========= TYPE BADGES (inline) ========= */
.type-badge {
  display: inline-block;
  font-size: .55rem;
  font-weight: 700;
  color: #fff;
  padding: .1rem .35rem;
  letter-spacing: .08em;
  flex-shrink: 0;
  line-height: 1;
  vertical-align: middle;
}
.type-badge--k { background: #6b8f71; }
.type-badge--i { background: #4a7c9b; }
.type-badge--p { background: #c4913a; }
.type-badge--m { background: #c47a3a; }


/* ========= CARD ACTIONS (Print / Network) ========= */
.card-actions {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 2rem;
  position: relative;
  z-index: 4;
}

.card-actions a {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: 999px;
  padding: .35rem .7rem;
  font-weight: 700;
  font-size: .85rem;
  text-decoration: none;
  cursor: pointer;
}
.card-actions a:hover {
  background: var(--btn-hover, rgba(0,0,0,.03));
}

/* ========= AI DROPDOWN (Read with…) ========= */
.ai-dropdown {
  position: relative;
  display: inline-block;
  margin-top: .9rem;
}
.ai-dropdown summary {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: 999px;
  padding: .45rem 1rem .45rem .8rem;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .02em;
  cursor: pointer;
  list-style: none;
  -webkit-appearance: none;
  user-select: none;
  transition: background .15s, color .15s, box-shadow .15s;
}
.ai-dropdown summary:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
}
.ai-dropdown summary::-webkit-details-marker { display: none; }
.ai-dropdown[open] summary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
}
.ai-icon {
  font-size: 1em;
  line-height: 1;
}
.ai-dropdown-menu {
  position: absolute;
  top: calc(100% + .35rem);
  left: 0;
  background: var(--paper, #fff);
  border: 2px solid var(--accent);
  border-radius: 10px;
  padding: .35rem 0;
  min-width: 13rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  z-index: 10;
  display: flex;
  flex-direction: column;
}
.ai-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 1.2rem;
  width: 12px;
  height: 12px;
  background: var(--paper, #fff);
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  transform: rotate(45deg);
}
.ai-dropdown-menu a,
.ai-dropdown-menu button {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .6rem 1rem;
  font-weight: 600;
  font-size: .88rem;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
  box-sizing: border-box;
  transition: background .1s;
}
.ai-dropdown-menu a:first-child { border-radius: 8px 8px 0 0; }
.ai-dropdown-menu a:last-child,
.ai-dropdown-menu button:last-child { border-radius: 0 0 8px 8px; }
.ai-dropdown-menu a:hover,
.ai-dropdown-menu button:hover {
  background: var(--accent);
  color: #fff;
}
.ai-provider-icon {
  font-size: 1rem;
  width: 1.2rem;
  text-align: center;
  flex-shrink: 0;
  opacity: .7;
}
.ai-dropdown-menu a:hover .ai-provider-icon,
.ai-dropdown-menu button:hover .ai-provider-icon {
  opacity: 1;
}
@media print {
  .ai-dropdown { display: none !important; }
}

/* ========= SET NAVIGATION (Prev / Next) ========= */
.set-nav {
  display: flex;
  gap: .6rem;
  margin: 1.5rem 0 1rem;
}
.set-nav-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .9rem;
  border: none;
  background: transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: .85rem;
  text-decoration: none;
  color: var(--accent);
  cursor: pointer;
  transition: background .15s;
}
.set-nav-link:hover {
  background: var(--btn-hover, rgba(0,0,0,.03));
}
.set-nav-prev { margin-right: auto; }
.set-nav-next { margin-left: auto; }
.set-nav-arrow {
  font-size: 1.05rem;
  line-height: 1;
}
.set-nav-set {
  font-family: 'EB Garamond', 'Lora', serif;
  letter-spacing: .04em;
}
.set-nav-placeholder { display: none; }
.set-nav-dir {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .2rem;
}
.set-nav-meta {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 700;
}
.set-nav-next .set-nav-meta {
  justify-content: flex-end;
}
.set-nav-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 1.4em;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 700;
  color: #fff;
}
.set-nav-type.type-K { background: #4d6b50; }
.set-nav-type.type-I { background: #2e5e84; }
.set-nav-type.type-P { background: #c07a2d; }
.set-nav-type.type-M { background: #b75e28; }
.set-nav-type.type-N { background: #006a71; }


/* ========= FOOTER (Eo Ena stamp) ========= */
.footer-stamp {
  margin-top: 2.4rem;
  padding: 2.4rem 0 1.2rem;
  text-align: center;
}

.footer-line {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  height: 3px;
  background: var(--rule-line);
}

.footer-stamp-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% - var(--stamp-lift)));
  height: 90px;
  padding: 0 .8rem;
}


/* ========= FOOTER INFO (maker + edition) ========= */
.footer-info {
  margin-top: 1.2rem;
  font-size: .78rem;
  color: var(--muted);
  text-align: center;
}

.footer-maker {
  margin-bottom: .15rem;
}
.footer-maker strong {
  color: var(--heading);
}

.footer-edition {
  font-size: .72rem;
  color: var(--muted);
  opacity: .8;
  letter-spacing: .03em;
}


/* ========= DNA CODE (below stamp) ========= */
.dna-wrap {
  max-width: 100%;
  width: 100%;
  margin: 0.2rem auto 0;
  padding: 0.4rem 1.6rem;
  box-sizing: border-box;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.65rem;
  color: var(--muted);
  opacity: 0.85;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
  display: block;
}

.dna-label {
  font-weight: 700;
  margin-right: 0.5rem;
  letter-spacing: 0.05em;
  color: var(--heading);
  font-size: inherit;
  opacity: 1;
  display: inline;
}

.dna-code {
  letter-spacing: 0.04em;
  font-size: inherit;
  opacity: 0.9;
  font-variant-numeric: tabular-nums;
  display: inline;
  color: var(--muted);
}

.codon-sep {
  opacity: .4;
  margin: 0 .15rem;
}


/* ========= PRINT ========= */
@media print {
  @page {
    size: A4;
    margin: 18mm;
  }

  html, body {
    margin: 0;
    padding: 0;
    background: #fff;
    color: #111;
    font-size: 12pt;
    line-height: 1.5;
    orphans: 2;
    widows: 2;
  }

  .container {
    margin: 0;
    padding: 0;
    max-width: 100%;
  }

  .card {
    margin: 0;
    padding: 0;
    background: #fff;
    background-image: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
  }

  /* Hide decorative/interactive/navigation elements */
  .eo-figure,
  .badge-img,
  .card-actions,
  .set-nav,
  .footer-stamp-img,
  .site-nav,
  .site-cta {
    display: none !important;
  }

  /* Simplify header for print */
  .brand-band {
    border-top: 2px solid #111;
    border-bottom: 2px solid #111;
    padding-block: 0.6rem;
  }

  .brand {
    padding: 0;
    font-size: 14pt;
    color: #111;
  }

  .brand-program { color: #555; }
  .masthead-meta { color: #555; }
  .meta-codon { color: #333; }

  /* Content — toner-friendly B&W */
  h1 { font-size: 20pt; color: #111; }
  h2 { font-size: 14pt; color: #111; border-bottom-color: #ccc; }
  .section-title { color: #111; border-bottom-color: #ccc; }
  .card-title { color: #111; }
  .card-lede { color: #444; }
  .lede { color: #444; }
  .story { color: #111; font-size: 10pt; }
  .story strong { color: #111; }
  .card-body a { color: #111; }

  a { color: #111; text-decoration: underline; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #666; }
  a[href^="#"]::after,
  a[href^="javascript"]::after,
  .masthead a[href]::after,
  .footer-stamp a[href]::after,
  .card-index a[href]::after,
  .seealso-tag[href]::after,
  .network-link[href]::after { content: ""; }

  /* Boxes — toner-friendly: white backgrounds, grey borders */
  .materials-box,
  .prereq-box,
  .output-box,
  .verify-box,
  .failures-box,
  .story-section,
  .story-section--essence,
  .story-section--output,
  .story-section--conditions,
  .story-section--context,
  .story-section--process,
  .story-section--verify,
  .story-section--recovery,
  .story-section--sources,
  .sources-box,
  .maker-meta-box {
    background: #fff;
    border-color: #ccc;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .story-section--essence,
  .story-section--output,
  .story-section--verify {
    border-left-color: #555;
  }

  .story-section--conditions {
    border-color: #999;
  }

  .story-section h2,
  .story-section--output h2,
  .story-section--conditions h2 {
    color: #333;
  }

  /* Hazards — keep red border (safety!) */
  .hazards-box,
  .story-section--hazards {
    background: #fff;
    border-color: #b54a3a;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .hazards-box .box-label,
  .story-section--hazards h2 { color: #b54a3a; }

  .step-item--rule {
    background: #fff;
    border-color: #b54a3a;
  }

  /* Box labels & text — greyscale */
  .box-label { color: #333; }
  .materials-box .box-label { color: #333; }
  .prereq-box .box-label { color: #333; }
  .output-box .box-label { color: #333; }
  .verify-box .box-label { color: #333; }
  .failures-box .box-label { color: #555; }
  .sources-box .section-label { color: #333; }

  .prereq-box { border-color: #ccc; background: #fff; }
  .prereq-box--recommended { border-color: #ccc; background: #fff; }
  .prereq-box--recommended .box-label { color: #555; }
  .prereq-box--unlocks { border-color: #ccc; background: #fff; }
  .prereq-box--unlocks .box-label { color: #555; }

  .output-box { border-left-color: #555; background: #fff; }

  /* Step numbers — greyscale */
  .step-item::before {
    background: #eee;
    color: #333;
  }

  /* Topic badges — greyscale */
  .topic-badge {
    background: #fff;
    border-color: #ccc;
    color: #333;
  }

  /* See-also — greyscale */
  .seealso-tag {
    background: #fff;
    border-color: #ccc;
    color: #333;
  }

  /* Type badges — KEEP color (small, crucial for identification) */
  .type-badge,
  .type-badge--k,
  .type-badge--i,
  .type-badge--p,
  .type-badge--m {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Card index type letters — KEEP color */
  .card-index .idx-type {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .consequence-box { color: #333; }

  /* Network items — greyscale */
  .network-item { border-bottom-color: #ccc; }
  .network-item-type { background: #eee; color: #333; }
  .network-item-role { color: #555; }

  /* Footer & DNA: always visible on print */
  .footer-stamp { margin-top: 1.5rem; padding-top: 1rem; }
  .footer-line { background: #111; height: 2px; }
  .footer-info { color: #333; }
  .footer-maker strong { color: #111; }
  .footer-edition { color: #555; }

  .dna-wrap {
    color: #111;
    opacity: 1;
    font-size: 8pt;
    white-space: normal;
    word-break: break-all;
  }
  .dna-label { color: #111; }
  .dna-code { color: #333; opacity: 1; }

  /* Tier badge + set number in print */
  .tier-badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .meta-set-number, .dna-set-number { color: #333; }

  /* ---- Page break control ---- */
  h1, h2, h3 { break-after: avoid; }

  .step-item,
  .story-section,
  .network-item,
  .materials-box,
  .prereq-box,
  .output-box,
  .verify-box,
  .failures-box,
  .hazards-box,
  .sources-box,
  .maker-meta-box { break-inside: avoid; }

  /* Safety net for long card bodies */
  .card-body > * { break-inside: avoid; }

  /* Card hero image: smaller on paper, grayscale-safe */
  .card-hero { margin-bottom: 1rem; break-inside: avoid; }
  .card-hero-img {
    max-height: 260px;
    filter: grayscale(1);
    mix-blend-mode: multiply;
  }

  /* Step cards: keep each on one page, banner stays in color band */
  .step-banner {
    background: #666 !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .step-card {
    break-inside: avoid;
    background: #fafafa !important;
    border-color: #ccc !important;
  }
  .step-card-num { color: #888 !important; }
  .step-card-img { filter: grayscale(1); }

  /* Card index: repeat table header per page, avoid row breaks */
  .card-index thead { display: table-header-group; }
  .card-index tbody tr { break-inside: avoid; }

  /* Card index: hide DNA remainder in print (too long) */
  .card-index .idx-dna-rest { display: none; }
}


/* ========= TIER BADGE ========= */
.tier-badge {
  display: inline-block;
  font-family: 'EB Garamond', serif;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .15em .6em;
  border-radius: 3px;
  line-height: 1.4;
}
.tier-basic {
  background: #e8f5e9;
  color: #2e7d32;
}
.tier-skilled {
  background: #e3f2fd;
  color: #1565c0;
}
.tier-master {
  background: #fff3e0;
  color: #e65100;
}

/* ========= SET NUMBER ========= */
.meta-set-number,
.dna-set-number {
  font-family: 'EB Garamond', serif;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--accent, #666);
  margin-left: .5em;
}
.dna-set-number {
  margin-right: .5em;
  margin-left: 0;
}
.masthead-meta .tier-badge {
  margin-left: .5em;
}

/* ========= NETWORK BODY ========= */
.network-body h2 {
  font-family: 'EB Garamond', serif;
  font-size: 1.2rem;
  color: var(--heading, #333);
  margin-top: 1.5rem;
}
.network-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.network-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--rule-line, #ddd);
}
.network-item:last-child { border-bottom: none; }
.network-item-type {
  font-family: 'EB Garamond', serif;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .15em .5em;
  border-radius: 2px;
  background: var(--accent-light, #eee);
  color: var(--accent-dark, #555);
}
.network-item-title { font-family: 'Lora', serif; }
.network-link { text-decoration: none; color: var(--ink, #333); display: flex; align-items: center; gap: .6rem; }
.network-link:hover .network-item-title { text-decoration: underline; }
.network-item-role {
  margin-left: auto;
  font-size: .75rem;
  color: var(--muted, #888);
  font-style: italic;
}
.network-item--missing { opacity: .5; }

/* ========= RESPONSIVE ========= */
@media (max-width: 640px) {
  :root {
    --eo-h: 104px;
    --badge-h: 0px;
    --badge-y: 0px;
    --brand-pad: 1rem;
    --brand-line: 4px;
  }

  .badge-img {
    --badge-h: 22px;
    height: 22px;
    right: .3rem;
  }

  .brand-full {
    display: none;
  }
  .brand-short {
    display: inline;
  }

  .masthead .brand {
    text-align: right;
    padding: 0 0 0 7rem;
    margin-right: 0;
  }

  .brand-program {
    text-align: right;
    padding: 0 0 0 7rem;
    font-size: .65rem;
    letter-spacing: .08em;
    margin-right: -.08em;
  }

  .card-body {
    padding: .5rem 0;
  }

  .page-maker .container, .page-knowledge .container, .page-instruction .container, .page-product .container, .page-network .container {
    margin: .7rem auto;
    padding: 0 .65rem;
  }

  .page-maker .card, .page-knowledge .card, .page-instruction .card, .page-product .card, .page-network .card {
    padding: 1.15rem 1rem 1rem;
  }

  .page-maker .card::before, .page-knowledge .card::before, .page-instruction .card::before, .page-product .card::before, .page-network .card::before {
    inset: .7rem;
  }

  .page-maker .card::after, .page-knowledge .card::after, .page-instruction .card::after, .page-product .card::after, .page-network .card::after {
    inset: .95rem;
  }

  .tarot-ribbon {
    padding: .42rem 1rem .47rem 1.4rem;
    font-size: .9rem;
    letter-spacing: .12em;
  }

  .tarot-brand-band {
    grid-template-columns: auto 1fr;
    gap: .9rem;
    padding: .9rem 1rem;
  }
  .tarot-brand-portrait img {
    height: 80px;
  }
  .tarot-brand-text {
    align-items: center;
    text-align: center;
  }
  .tarot-brand-name {
    font-size: 1.15rem;
    letter-spacing: .1em;
  }
  .tarot-brand-name .brand-full { display: none; }
  .tarot-brand-name .brand-short { display: inline; }
  .tarot-brand-edition {
    font-size: .8rem;
    margin-top: .2rem;
  }
  .tarot-brand-meta {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .35rem .6rem;
    padding: .45rem 1rem 0;
    font-size: .75rem;
  }
  .tarot-card-intro {
    margin-top: 1rem;
  }

  .maker-card-body {
    padding: .35rem .35rem .1rem;
  }

  .maker-profile-grid {
    grid-template-columns: 1fr;
    gap: .75rem;
    margin-top: .25rem;
  }

  .maker-portrait img {
    width: min(70%, 190px);
  }

  .maker-story {
    max-width: none;
    font-size: .92rem;
  }

  .page-maker .dna-wrap, .page-knowledge .dna-wrap, .page-instruction .dna-wrap, .page-product .dna-wrap, .page-network .dna-wrap {
    grid-template-columns: 1fr;
    gap: .35rem;
    text-align: center;
    padding: 0 .35rem;
  }

  .page-maker .dna-label, .page-knowledge .dna-label, .page-instruction .dna-label, .page-product .dna-label, .page-network .dna-label,
  .page-maker .dna-set-number, .page-knowledge .dna-set-number, .page-instruction .dna-set-number, .page-product .dna-set-number, .page-network .dna-set-number {
    text-align: center;
    white-space: normal;
  }

  .page-maker .dna-code, .page-knowledge .dna-code, .page-instruction .dna-code, .page-product .dna-code, .page-network .dna-code {
    font-size: .6rem;
    line-height: 1.45;
    padding: 0 .25rem;
  }
}

@media (max-width: 520px) {
  :root {
    --eo-h: 104px;
  }

  .brand {
    font-size: clamp(1rem, 4.8vw, 1.3rem);
    padding: 0 0 0 5.5rem;
  }

  .brand-program {
    padding: 0 0 0 5.5rem;
    font-size: .58rem;
  }

  .eo-figure {
    left: .5rem;
  }
}

/* ==========================================================================
   Card Index — auto-generated table of all cards
   ========================================================================== */

.card-index {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1.5rem 0;
}

.card-index thead th {
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--accent, #5a7a6a);
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-index tbody tr {
  border-bottom: 1px solid #e0ddd8;
}
.card-index tbody tr:hover {
  background: rgba(0,0,0,.03);
}

.card-index td {
  padding: 0.5rem 0.6rem;
  vertical-align: top;
}

.card-index .idx-type {
  font-weight: 700;
  width: 1.5em;
  text-align: center;
}

.card-index .idx-type.type-K { color: #5a7a6a; }
.card-index .idx-type.type-I { color: #4a6a8a; }
.card-index .idx-type.type-P { color: #8a7040; }
.card-index .idx-type.type-M { color: #b06030; }
.card-index .idx-type.type-N { color: #2a6a6a; }

.card-index .idx-codon {
  font-family: 'Lora', serif;
  white-space: nowrap;
}

.card-index td a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.card-index .idx-title a {
  border-bottom: 1px solid transparent;
}
.card-index .idx-title a:hover {
  border-bottom-color: var(--accent, #5a7a6a);
}

.card-index .idx-set {
  font-family: monospace;
  font-size: 0.85em;
  white-space: nowrap;
  color: #666;
}

.card-index .idx-dna-rest {
  font-family: monospace;
  font-size: 0.7em;
  color: #999;
  word-break: break-all;
}

@media (max-width: 640px) {
  .card-index .idx-dna-rest {
    display: none;
  }
}

/* CTA below card-index table */
.index-cta {
  text-align: center;
  font-size: .9rem;
  margin: 1.2rem 0 0;
  color: var(--muted);
}
.index-cta a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.index-cta a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Site Pages — Landing & Docs
   ========================================================================== */

/* Quote on landing page */
.site-quote {
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  margin: 1rem auto;
  padding: .4rem 0 .4rem 1.2rem;
  max-width: 600px;
}

/* Hero section */
.site-hero {
  text-align: center;
  padding: 1.5rem 0 1rem;
}
.site-hero .card-title {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
}
.site-hero .card-lede {
  font-size: 1.05rem;
  max-width: 600px;
  margin: .5rem auto 0;
}
.site-hero .card-lede--statement {
  font-family: 'EB Garamond', serif;
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  line-height: 1.5;
  max-width: 500px;
}

/* Site navigation links */
.site-nav {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin: 1.5rem 0 .5rem;
}
.site-nav a {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: 999px;
  padding: .35rem .7rem;
  font-weight: 700;
  font-size: .85rem;
  text-decoration: none;
  cursor: pointer;
}
.site-nav a:hover {
  background: var(--btn-hover, rgba(0,0,0,.03));
}

/* Card type grid on landing page */
.type-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
  margin: 1rem 0;
}
.type-card-item {
  border: 1.5px solid var(--rule-line);
  background: var(--bg-paper, #fffdf8);
  padding: .8rem 1rem;
  text-align: center;
}
.type-card-item strong {
  display: block;
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  margin-bottom: .25rem;
}
.type-card-item .type-letter {
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: .7rem;
  margin-bottom: .3rem;
}
.type-card-item p {
  margin: 0;
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Docs sections */
.docs-section {
  margin: 1.5rem 0;
}
.docs-section h2 {
  margin-top: 0;
}
.docs-section p,
.docs-section ul,
.docs-section ol {
  font-size: .88rem;
  line-height: 1.75;
}
.docs-section ul,
.docs-section ol {
  padding-left: 1.4rem;
}
.docs-section li {
  margin: .25rem 0;
}
.docs-section code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82em;
  background: var(--accent-light, #eee);
  padding: .1em .35em;
  border-radius: 3px;
}
.docs-section .dna-example {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .8rem;
  background: var(--accent-light);
  border: 1px solid var(--rule-line);
  padding: .8rem 1rem;
  margin: .6rem 0;
  word-break: break-all;
  line-height: 1.7;
}

/* Try-offline hint on landing */
.try-offline-hint {
  text-align: center;
  font-size: .82rem;
  color: var(--muted);
  font-style: italic;
  margin: .3rem 0 0;
}

/* CTA buttons on landing */
.site-cta {
  display: flex;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}
.site-cta a {
  display: inline-block;
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: 999px;
  padding: .5rem 1.2rem;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
}
.site-cta a:hover {
  background: var(--btn-hover, rgba(0,0,0,.03));
}
.site-cta a.cta-primary {
  background: var(--accent);
  color: #fff;
}
.site-cta a.cta-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}
