/* ============================================================
   REVOLUTE SYSTEMS — MYTHOS OVERHAUL (Field Ledger edition)
   Loaded AFTER styles.css. Everything gated on html[data-mythos]
   so the original site is untouched.

   Two modes via data-myth-mode:
   - "light" (default) — paper ground, pine ink, lime accents.
     Warm, open, approachable. The orchard ledger in daylight.
   - "dark" — the night-soil engraved record.
   Components read tokens only; modes just swap token values.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

html[data-mythos] {
  /* Ground & ink — daylight */
  --paper: #FAFAF7;
  --paper-warm: #F4F3EA;
  --charcoal: #28301F;
  --charcoal-soft: #4A523C;
  --ink-rgb: 35, 43, 24;
  --line: rgba(35, 43, 24, 0.13);
  --line-strong: rgba(35, 43, 24, 0.25);
  --muted: rgba(35, 43, 24, 0.62);

  /* Mythos palette — olive rules, pine accents, lime fills */
  --myth-bronze: #837A4D;
  --myth-bronze-dim: rgba(131, 122, 77, 0.45);
  --myth-lumen: #1C4100;            /* accent INK (text, links, ems) */
  --myth-fill: #B8DC73;             /* accent FILL (buttons) */
  --myth-fill-ink: #1C4100;         /* text on the fill */
  --myth-panel: #F4F3EA;
  --myth-panel-raised: #EFEEE2;
  --surface-nav: rgba(250, 250, 247, 0.86);
  --surface-pop: rgba(253, 253, 250, 0.96);
  --surface-drawer: rgba(250, 250, 247, 0.97);
  --surface-card: #FFFFFF;

  --accent: var(--myth-fill);
  --accent-soft: rgba(131, 181, 53, 0.13);

  /* Display face — tweakable */
  --font-display: 'Cormorant Garamond', 'Instrument Serif', Georgia, serif;
}

html[data-mythos][data-myth-display="instrument"] {
  --font-display: 'Instrument Serif', Georgia, serif;
}

/* Accent variants — light */
html[data-mythos][data-myth-accent="verdant"] {
  --myth-lumen: #3C6B12;
  --myth-fill: #83B535;
  --myth-fill-ink: #16290A;
}
html[data-mythos][data-myth-accent="bronze"] {
  --myth-lumen: #6F622C;
  --myth-fill: #C9BC7E;
  --myth-fill-ink: #332B0E;
}

/* ---------- NIGHT MODE — token swap only ---------- */
html[data-mythos][data-myth-mode="dark"] {
  --paper: #0A0D08;
  --paper-warm: #10140C;
  --charcoal: #EAE5D6;
  --charcoal-soft: #C9C4B2;
  --ink-rgb: 234, 229, 214;
  --line: rgba(234, 229, 214, 0.12);
  --line-strong: rgba(234, 229, 214, 0.26);
  --muted: rgba(234, 229, 214, 0.58);

  --myth-bronze: #A89D6A;
  --myth-bronze-dim: rgba(168, 157, 106, 0.42);
  --myth-lumen: #B8DC73;
  --myth-fill: #B8DC73;
  --myth-fill-ink: #0E1208;
  --myth-panel: #10140C;
  --myth-panel-raised: #151A0F;
  --surface-nav: rgba(10, 13, 8, 0.82);
  --surface-pop: rgba(16, 20, 12, 0.95);
  --surface-drawer: rgba(10, 13, 8, 0.97);
  --surface-card: #10140C;

  --accent: var(--myth-lumen);
  --accent-soft: rgba(184, 220, 115, 0.14);
}
html[data-mythos][data-myth-mode="dark"][data-myth-accent="verdant"] {
  --myth-lumen: #8FBF49;
  --myth-fill: #83B535;
  --myth-fill-ink: #10180A;
}
html[data-mythos][data-myth-mode="dark"][data-myth-accent="bronze"] {
  --myth-lumen: #C9BC7E;
  --myth-fill: #C9BC7E;
  --myth-fill-ink: #2A230B;
}

html[data-mythos] body {
  background:
    radial-gradient(1100px 700px at 50% -10%, rgba(131, 181, 53, 0.07), transparent 60%),
    var(--paper);
}
html[data-mythos][data-myth-mode="dark"] body {
  background:
    radial-gradient(1200px 800px at 50% -10%, rgba(184, 220, 115, 0.05), transparent 60%),
    var(--paper);
}

html[data-mythos] ::selection { background: #B8DC73; color: #1C4100; }

/* ============================================================
   NAV
   ============================================================ */
.myth-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}
.myth-nav.scrolled {
  background: var(--surface-nav);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  border-bottom-color: var(--line);
}
.myth-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.myth-logo {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.myth-logo img { display: block; }
.myth-logo-words { display: flex; flex-direction: column; line-height: 1.1; }
.myth-logo-name {
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 0.02em;
  color: var(--charcoal);
}
.myth-logo-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--myth-bronze);
  margin-top: 3px;
}
.myth-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.myth-nav-link {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 9px 13px;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
  cursor: pointer;
  background: none;
  border: none;
}
.myth-nav-link:hover { color: var(--charcoal); background: rgba(var(--ink-rgb), 0.06); }
.myth-nav-link.active { color: var(--myth-lumen); }

.myth-dropdown { position: relative; }
.myth-dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: 320px;
  background: var(--surface-pop);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  box-shadow: 0 24px 64px rgba(20, 28, 10, 0.18);
}
html[data-mythos][data-myth-mode="dark"] .myth-dropdown-panel { box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55); }
.myth-dropdown.open .myth-dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.myth-dropdown-eyebrow {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--myth-bronze);
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.myth-dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.myth-dropdown-item:hover { background: rgba(var(--ink-rgb), 0.06); }
.myth-dropdown-item.active .myth-dropdown-item-label { color: var(--myth-lumen); }
.myth-dropdown-item-label {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--charcoal);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.myth-dropdown-item-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--myth-bronze);
  letter-spacing: 0.1em;
}
.myth-dropdown-item-sub { font-size: 12px; color: var(--muted); }

.myth-nav-actions { display: flex; align-items: center; gap: 10px; }

.myth-burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  background: none;
  border: none;
}
.myth-burger span {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--charcoal);
  position: relative;
  transition: background 0.2s;
}
.myth-burger span::before, .myth-burger span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 20px; height: 1.5px;
  background: var(--charcoal);
  transition: transform 0.25s ease, top 0.25s ease;
}
.myth-burger span::before { top: -6px; }
.myth-burger span::after { top: 6px; }
.myth-burger.open span { background: transparent; }
.myth-burger.open span::before { top: 0; transform: rotate(45deg); }
.myth-burger.open span::after { top: 0; transform: rotate(-45deg); }

.myth-drawer {
  position: fixed;
  inset: 0;
  top: 76px;
  background: var(--surface-drawer);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  z-index: 99;
  padding: 28px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.myth-drawer.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.myth-drawer-link {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--charcoal);
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 14px;
  cursor: pointer;
  background: none;
  border-left: none; border-right: none; border-top: none;
  text-align: left;
  width: 100%;
}
.myth-drawer-link .num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--myth-bronze);
}
.myth-drawer-link.active { color: var(--myth-lumen); }
.myth-drawer-foot {
  margin-top: auto;
  padding-top: 32px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.8;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ============================================================
   HERO — video/still variant. Always photo-on-dark-scrim, so
   its text colors are fixed (legible in both modes).
   ============================================================ */
.myth-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 140px 24px 110px;
}
.myth-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.myth-hero-media video,
.myth-hero-media .myth-hero-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) brightness(0.6);
}
.myth-hero-media .myth-hero-still {
  background-size: cover;
  background-position: center;
}
.myth-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 90% 70% at 50% 45%, rgba(16, 22, 10, 0.20) 0%, rgba(16, 22, 10, 0.66) 70%, rgba(16, 22, 10, 0.85) 100%),
    linear-gradient(180deg, rgba(16, 22, 10, 0.50) 0%, rgba(16, 22, 10, 0.16) 30%, rgba(16, 22, 10, 0.30) 70%, var(--paper) 100%);
}
.myth-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1060px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.myth-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--myth-bronze);
  display: flex;
  align-items: center;
  gap: 18px;
}
.myth-kicker::before, .myth-kicker::after {
  content: '';
  width: 44px;
  height: 1px;
  background: var(--myth-bronze-dim);
}
.myth-hero .myth-kicker { color: #CFC79A; }
.myth-hero .myth-kicker::before, .myth-hero .myth-kicker::after { background: rgba(207, 199, 154, 0.5); }
.myth-hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(52px, 8.4vw, 124px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: #F4F1E6;
  margin: 30px 0 0;
  text-wrap: balance;
}
.myth-hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: #B8DC73;
}
.myth-hero-sub {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.65;
  color: #D9D5C2;
  max-width: 620px;
  margin: 28px 0 0;
  text-wrap: pretty;
}
.myth-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
}

.myth-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 15px 26px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, filter 0.2s ease;
  border: 1px solid transparent;
}
.myth-btn:hover { transform: translateY(-1px); }
.myth-btn-primary {
  background: var(--myth-fill);
  color: var(--myth-fill-ink);
  font-weight: 500;
}
.myth-btn-primary:hover { filter: brightness(1.05) saturate(1.05); }
.myth-btn-ghost {
  background: transparent;
  color: var(--charcoal);
  border-color: var(--line-strong);
}
.myth-btn-ghost:hover { border-color: var(--myth-bronze); }
.myth-hero .myth-btn-ghost {
  color: #F2EFE4;
  border-color: rgba(242, 239, 228, 0.42);
}
.myth-hero .myth-btn-ghost:hover { border-color: #CFC79A; }

/* ============================================================
   CHAPTER INDEX — table of contents strip
   ============================================================ */
.myth-toc {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--myth-panel);
}
.myth-toc-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.myth-toc-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 22px 18px;
  border-left: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: left;
  background: none;
  border-top: none; border-bottom: none; border-right: none;
}
.myth-toc-item:last-child { border-right: 1px solid var(--line); }
.myth-toc-item:hover { background: rgba(var(--ink-rgb), 0.04); }
.myth-toc-num {
  font-family: var(--font-display);
  font-size: 19px;
  font-style: italic;
  color: var(--myth-bronze);
  line-height: 1;
}
.myth-toc-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
}

/* ============================================================
   SECTIONS — shared scaffolding
   ============================================================ */
.myth-section {
  padding: var(--space-7) 0;
  position: relative;
}
.myth-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
.myth-section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-6);
}
.myth-section-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(38px, 4.6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  margin: 22px 0 0;
  text-wrap: balance;
}
.myth-section-head h2 em { font-style: italic; font-weight: 400; color: var(--myth-lumen); }
.myth-section-head p {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--muted);
  margin: 20px auto 0;
  max-width: 600px;
  text-wrap: pretty;
}

/* ============================================================
   CHAPTERS — numbered, alternating, with framed plates
   ============================================================ */
.myth-chapter {
  display: grid;
  grid-template-columns: 110px 1fr 1.15fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  padding: var(--space-6) 0;
  border-top: 1px solid var(--line);
}
.myth-chapter.flip { grid-template-columns: 110px 1.15fr 1fr; }
.myth-chapter.flip .myth-chapter-text { order: 3; }
.myth-chapter.flip .myth-plate { order: 2; }

.myth-chapter-numeral {
  font-family: var(--font-display);
  font-size: clamp(72px, 8vw, 128px);
  font-weight: 400;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px var(--myth-bronze-dim);
  user-select: none;
  align-self: start;
  margin-top: 6px;
}
.myth-chapter-phase {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--myth-bronze);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.myth-chapter-phase::after {
  content: '';
  flex: 0 0 36px;
  height: 1px;
  background: var(--myth-bronze-dim);
}
.myth-chapter-text h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  margin: 0 0 18px;
  text-wrap: balance;
}
.myth-chapter-text h3 em { font-style: italic; font-weight: 400; color: var(--myth-lumen); }
.myth-chapter-text p {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
  max-width: 480px;
  text-wrap: pretty;
}
.myth-chapter-foot {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.myth-chapter-link {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--myth-lumen);
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.myth-chapter-link:hover { border-bottom-color: var(--myth-lumen); }

/* Framed plate — engraved corner ticks + mono caption */
.myth-plate { position: relative; }
.myth-plate-frame {
  position: relative;
  border: 1px solid var(--line-strong);
  padding: 10px;
  background: var(--surface-card);
  box-shadow: 0 2px 16px rgba(35, 43, 24, 0.06);
}
html[data-mythos][data-myth-mode="dark"] .myth-plate-frame { box-shadow: none; }
.myth-plate-frame::before, .myth-plate-frame::after,
.myth-plate-img::before, .myth-plate-img::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--myth-bronze);
  border-style: solid;
  z-index: 2;
}
.myth-plate-frame::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.myth-plate-frame::after { top: -1px; right: -1px; border-width: 1px 1px 0 0; }
.myth-plate-img::before { bottom: -1px; left: -1px; border-width: 0 0 1px 1px; }
.myth-plate-img::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.myth-plate-img {
  position: static;
}
.myth-plate-visual {
  width: 100%;
  background-size: cover;
  background-position: center;
  display: block;
}
.myth-plate-caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 2px 2px;
}
.myth-plate-caption strong {
  color: var(--myth-bronze);
  font-weight: 500;
}
.myth-ramp {
  height: 6px;
  margin-top: 18px;
  border: 1px solid var(--line);
}

/* ============================================================
   CHAPTER V — the Prescription (full-bleed panel)
   ============================================================ */
.myth-prescription {
  background: var(--myth-panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--space-7) 0;
}
.myth-prescription-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.myth-stat-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  margin-top: 32px;
  background: var(--paper);
}
html[data-mythos][data-myth-mode="dark"] .myth-stat-pair { background: transparent; }
.myth-stat {
  padding: 22px 24px;
  border-left: 1px solid var(--line);
}
.myth-stat:first-child { border-left: none; }
.myth-stat-num {
  font-family: var(--font-display);
  font-size: clamp(34px, 3vw, 46px);
  line-height: 1;
  color: var(--myth-lumen);
}
.myth-stat-lab {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
  display: block;
}

/* ============================================================
   THE INSTRUMENTS — tool index
   ============================================================ */
.myth-instruments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.myth-instrument {
  border: none;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 34px 30px 30px;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 240px;
  cursor: pointer;
  background: none;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: background 0.25s ease;
}
.myth-instrument:hover { background: rgba(var(--ink-rgb), 0.035); }
.myth-instrument-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--myth-bronze);
  margin-bottom: 22px;
}
.myth-instrument h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.05;
  color: var(--charcoal);
  margin: 0 0 10px;
}
.myth-instrument h3 em { font-style: italic; font-weight: 400; color: var(--myth-lumen); }
.myth-instrument-role {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.myth-instrument p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
  text-wrap: pretty;
}
.myth-instrument-go {
  margin-top: auto;
  padding-top: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--myth-lumen);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.myth-instrument:hover .myth-instrument-go,
.myth-instrument:focus-visible .myth-instrument-go { opacity: 1; transform: translateX(0); }

/* ============================================================
   THE LEDGER — case study band
   ============================================================ */
.myth-ledger {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(900px 500px at 50% 110%, rgba(28, 65, 0, 0.05), transparent 70%),
    var(--myth-panel);
  padding: var(--space-7) 0;
}
html[data-mythos][data-myth-mode="dark"] .myth-ledger {
  background:
    radial-gradient(900px 500px at 50% 110%, rgba(184, 220, 115, 0.06), transparent 70%),
    var(--myth-panel);
}
.myth-ledger-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  margin-top: var(--space-5);
  background: var(--paper);
}
html[data-mythos][data-myth-mode="dark"] .myth-ledger-grid { background: transparent; }
.myth-ledger-cell {
  padding: 34px 28px 30px;
  border-left: 1px solid var(--line);
}
.myth-ledger-cell:first-child { border-left: none; }
.myth-ledger-num {
  font-family: var(--font-display);
  font-size: clamp(40px, 4vw, 60px);
  line-height: 1;
  color: var(--charcoal);
  font-variant-numeric: tabular-nums;
}
.myth-ledger-num em { font-style: italic; color: var(--myth-lumen); }
.myth-ledger-lab {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 12px;
  display: block;
  line-height: 1.7;
}

/* ============================================================
   EPILOGUE — CTA
   ============================================================ */
.myth-epilogue {
  text-align: center;
  padding: calc(var(--space-7) + 20px) 24px;
  position: relative;
  overflow: hidden;
}
.myth-epilogue h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(42px, 5.6vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  max-width: 820px;
  margin: 26px auto 0;
  text-wrap: balance;
}
.myth-epilogue h2 em { font-style: italic; font-weight: 400; color: var(--myth-lumen); }
.myth-epilogue p {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 560px;
  margin: 22px auto 0;
  text-wrap: pretty;
}
.myth-epilogue .myth-btn-ghost { color: var(--charcoal); border-color: var(--line-strong); }
.myth-epilogue .myth-btn-ghost:hover { border-color: var(--myth-bronze); }

/* ============================================================
   FOOTER — always deep pine; the brand anchor in both modes
   ============================================================ */
.myth-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #1C4100 0%, #143003 100%);
  padding: var(--space-6) 0 var(--space-4);
}
html[data-mythos][data-myth-mode="dark"] .myth-footer { background: #080A06; }
.myth-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.myth-footer h5 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #B8DC73;
  margin: 0 0 18px;
}
.myth-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.myth-footer ul a {
  font-size: 13.5px;
  color: rgba(250, 250, 247, 0.78);
  cursor: pointer;
  transition: color 0.2s ease;
}
.myth-footer ul a:hover { color: #FFFFFF; }
.myth-footer-blurb {
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(250, 250, 247, 0.62);
  max-width: 320px;
  margin-top: 16px;
}
.myth-footer-address {
  margin-top: 24px;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(250, 250, 247, 0.62);
}
.myth-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: var(--space-6);
  padding-top: 24px;
  border-top: 1px solid rgba(250, 250, 247, 0.16);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(250, 250, 247, 0.55);
}

/* ============================================================
   BLOCK 110 HERO — Mythos NIGHT skin only. In daylight mode the
   hero keeps its original light styling, untouched.
   ============================================================ */
html[data-mythos][data-myth-mode="dark"] .b110-hero {
  background: linear-gradient(180deg, #0C100A 0%, #11160C 45%, #161D10 80%, #0A0D08 100%);
  --b-ink: #EAE5D6;
  --b-muted: rgba(234, 229, 214, 0.62);
  --b-accent: #EAE5D6;
  --b-accent2: #B8DC73;
}
html[data-mythos][data-myth-mode="dark"] .b110-bg { filter: saturate(0.6) brightness(0.6); }
html[data-mythos][data-myth-mode="dark"] .b110-bg-scrim {
  background: linear-gradient(180deg, rgba(10, 13, 8, 0.84) 0%, rgba(13, 17, 10, 0.68) 46%, rgba(10, 13, 8, 0.88) 100%);
}
html[data-mythos] .b110-logo { display: none; } /* fixed Mythos nav already carries the brand */
html[data-mythos] .b110-title-block { font-family: var(--font-display); font-weight: 500; }
html[data-mythos] .b110-title-sub { font-family: var(--font-display); }
html[data-mythos] .b110-layer-name { font-family: var(--font-display); }
html[data-mythos][data-myth-mode="dark"] .b110-title-block { color: var(--charcoal); }
html[data-mythos][data-myth-mode="dark"] .b110-title-sub { color: var(--myth-lumen); }
html[data-mythos][data-myth-mode="dark"] .b110-title-meta { color: var(--myth-bronze); }
html[data-mythos][data-myth-mode="dark"] .b110-layer-name { color: var(--myth-lumen); text-shadow: none; }
html[data-mythos][data-myth-mode="dark"] .b110-phase-name { color: var(--myth-bronze); }
html[data-mythos][data-myth-mode="dark"] .b110-ramp { border-color: rgba(234, 229, 214, 0.26); }
html[data-mythos][data-myth-mode="dark"] .b110-readout { border-top-color: rgba(234, 229, 214, 0.18); }
html[data-mythos][data-myth-mode="dark"] .b110-readout-val { color: var(--myth-lumen); }
html[data-mythos][data-myth-mode="dark"] .b110-phases span.active { color: var(--myth-lumen); }
html[data-mythos][data-myth-mode="dark"] .b110-demtag { color: rgba(234, 229, 214, 0.5); }
html[data-mythos][data-myth-mode="dark"] .b110-hint { color: var(--charcoal-soft); }
html[data-mythos][data-myth-mode="dark"] .b110-progress { background: rgba(234, 229, 214, 0.10); }
html[data-mythos] .b110-panel { top: clamp(160px, 21vh, 220px); }
/* v3 "Living Block" additions — depth gauge, date scrub, outro */
html[data-mythos][data-myth-mode="dark"] .b110-gauge-tick.active { color: var(--myth-lumen); }
html[data-mythos][data-myth-mode="dark"] .b110-gauge-dot { background: var(--myth-lumen); border-color: #0A0D08; }
html[data-mythos][data-myth-mode="dark"] .b110-scrub-track { background: rgba(234, 229, 214, 0.16); }
html[data-mythos][data-myth-mode="dark"] .b110-scrub-tick { background: rgba(234, 229, 214, 0.24); }
html[data-mythos][data-myth-mode="dark"] .b110-scrub-tick.active { background: #83B535; }
html[data-mythos] .b110-outro-big { font-family: var(--font-display); font-weight: 500; }
html[data-mythos] .b110-outro-sub { font-family: var(--font-display); }
html[data-mythos][data-myth-mode="dark"] .b110-outro-big { color: var(--charcoal); }
html[data-mythos][data-myth-mode="dark"] .b110-outro-sub { color: var(--myth-lumen); }
html[data-mythos][data-myth-mode="dark"] .b110-outro-hint { color: var(--myth-bronze); }

/* ============================================================
   ENGRAVED GLYPHS & DIVIDERS — self-drawing SVG strokes.
   Drawables carry pathLength="1" + class .md; they draw in
   when an ancestor [data-reveal] gains .is-revealed.
   ============================================================ */
.myth-draw { display: block; color: var(--myth-bronze); overflow: visible; }
.myth-draw .md {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.myth-draw .md.lumen { stroke: var(--myth-lumen); }
.myth-draw .dash {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 3 3;
  opacity: 0;
  transition: opacity 0.5s ease 1.4s;
}
.myth-draw .dash.lumen { stroke: var(--myth-lumen); }
@keyframes mythDraw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: no-preference) {
  [data-reveal].is-revealed .myth-draw .md {
    animation: mythDraw 1.1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: calc(0.15s + var(--i, 0) * 0.18s);
  }
  [data-reveal].is-revealed .myth-draw .dash { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .myth-draw .md { stroke-dashoffset: 0; }
  .myth-draw .dash { opacity: 1; transition: none; }
}

.myth-chapter-glyph { margin-bottom: 18px; }
.myth-divider { margin: 0 auto 20px; }
.myth-instrument .myth-glyph { margin-bottom: 18px; transition: color 0.25s ease; }
.myth-instrument:hover .myth-glyph { color: var(--myth-lumen); }

/* ============================================================
   NIGHT-ONLY corrections for inner pages.
   styles.css uses var(--charcoal) as a *dark background* with
   white text in several components. Under the night mode,
   charcoal is bone-light ink — retarget those panels to true
   dark surfaces. Daylight mode needs none of this.
   ============================================================ */
html[data-mythos][data-myth-mode="dark"] .hero,
html[data-mythos][data-myth-mode="dark"] .section.dark,
html[data-mythos][data-myth-mode="dark"] .footer,
html[data-mythos][data-myth-mode="dark"] .page-head.hero-bg,
html[data-mythos][data-myth-mode="dark"] .cta-banner {
  background: var(--myth-panel-raised);
  color: #F2EFE4;
}
html[data-mythos][data-myth-mode="dark"] .cta-banner { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
html[data-mythos][data-myth-mode="dark"] .pcalc-summary {
  background: var(--myth-panel-raised);
  color: #F2EFE4;
  border: 1px solid var(--line-strong);
}
html[data-mythos][data-myth-mode="dark"] .cs-zone-table thead,
html[data-mythos][data-myth-mode="dark"] .cs-farm-table thead,
html[data-mythos][data-myth-mode="dark"] .cs-compare-table thead,
html[data-mythos][data-myth-mode="dark"] .emi-roi-mini-table thead {
  background: #1B2212;
  color: var(--myth-lumen);
}
html[data-mythos][data-myth-mode="dark"] .cs-block-pull {
  background: rgba(234, 229, 214, 0.06);
  color: var(--charcoal);
}
html[data-mythos][data-myth-mode="dark"] .btn-primary { color: #0E1208; }
html[data-mythos][data-myth-mode="dark"] .btn-light { background: rgba(234, 229, 214, 0.1); color: var(--charcoal); }

/* ============================================================
   INNER PAGES under Mythos — top padding for fixed nav
   ============================================================ */
html[data-mythos] .shell > *:not(.myth-nav):not(.myth-footer) { scroll-margin-top: 90px; }
html[data-mythos] .page-pad { padding-top: 76px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .myth-instruments { grid-template-columns: repeat(2, 1fr); }
  .myth-ledger-grid { grid-template-columns: repeat(2, 1fr); }
  .myth-ledger-cell:nth-child(3) { border-left: none; }
  .myth-ledger-cell { border-top: 1px solid var(--line); }
  .myth-ledger-cell:nth-child(-n+2) { border-top: none; }
}

@media (max-width: 960px) {
  .myth-nav-links { display: none; }
  .myth-nav .myth-nav-actions .myth-btn { display: none; }
  .myth-burger { display: flex; }
  .myth-toc-inner { grid-template-columns: 1fr; padding: 0 20px; }
  .myth-toc-item { flex-direction: row; align-items: baseline; gap: 14px; padding: 15px 8px; border-left: none; border-top: 1px solid var(--line); }
  .myth-toc-item:first-child { border-top: none; }
  .myth-toc-item:last-child { border-right: none; }
  .myth-chapter, .myth-chapter.flip { grid-template-columns: 1fr; gap: 26px; }
  .myth-chapter.flip .myth-chapter-text { order: 0; }
  .myth-chapter.flip .myth-plate { order: 0; }
  .myth-chapter-numeral { font-size: 64px; margin-top: 0; }
  .myth-prescription-grid { grid-template-columns: 1fr; }
  .myth-footer-grid { grid-template-columns: 1fr 1fr; }
  .myth-nav-inner { padding: 0 20px; height: 64px; }
  .myth-drawer { top: 64px; }
  .myth-container { padding: 0 20px; }
}

@media (max-width: 600px) {
  .myth-instruments { grid-template-columns: 1fr; }
  .myth-ledger-grid { grid-template-columns: 1fr; }
  .myth-ledger-cell { border-left: none; }
  .myth-ledger-cell:nth-child(-n+2) { border-top: 1px solid var(--line); }
  .myth-ledger-cell:first-child { border-top: none; }
  .myth-stat-pair { grid-template-columns: 1fr; }
  .myth-stat { border-left: none; border-top: 1px solid var(--line); }
  .myth-stat:first-child { border-top: none; }
  .myth-footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .myth-nav, .myth-dropdown-panel, .myth-drawer,
  .myth-btn, .myth-instrument-go { transition: none; }
}

/* ============================================================
   SCROLL MOTION — site-wide reveal upgrade + motion levels.
   html[data-myth-motion]: off | subtle | full (Tweaks → Motion).
   The JS engine (mythos-scroll.jsx) adds sibling stagger
   (--mr-delay), stat count-ups, and — on "full" — parallax.
   ============================================================ */

/* Stately reveal — longer ease, used at subtle + full */
html[data-mythos]:not([data-myth-motion="off"]) [data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.95s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.95s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.95s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--mr-delay, 0s);
}
html[data-mythos]:not([data-myth-motion="off"]) [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* Full — a whisper of focus-pull on top of the rise */
html[data-mythos][data-myth-motion="full"] [data-reveal] { filter: blur(4px); }
html[data-mythos][data-myth-mode="dark"][data-myth-motion="full"] [data-reveal] { filter: blur(3px); }
html[data-mythos][data-myth-motion="full"] [data-reveal].is-revealed { filter: none; }

/* Full — engraved plates print themselves: top-down wipe on the
   framed figure, after the chapter text has begun to settle */
html[data-mythos][data-myth-motion="full"] [data-reveal] .myth-plate-img {
  clip-path: inset(0 0 94% 0);
  transition: clip-path 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.25s;
}
html[data-mythos][data-myth-motion="full"] [data-reveal].is-revealed .myth-plate-img {
  clip-path: inset(0 0 0 0);
}

/* Full — inner-page figures (every div[data-img-file]) wipe in
   left→right, instrument-style, inside their reveal group */
html[data-mythos][data-myth-motion="full"] [data-reveal] div[data-img-file]:not(.myth-plate-visual) {
  clip-path: inset(0 96% 0 0);
  transition: clip-path 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}
html[data-mythos][data-myth-motion="full"] [data-reveal].is-revealed div[data-img-file]:not(.myth-plate-visual) {
  clip-path: inset(0 0 0 0);
}

/* Off — everything visible immediately, glyphs pre-drawn */
html[data-mythos][data-myth-motion="off"] [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
}
html[data-mythos][data-myth-motion="off"] .myth-draw .md {
  animation: none !important;
  stroke-dashoffset: 0 !important;
}
html[data-mythos][data-myth-motion="off"] .myth-draw .dash { opacity: 1 !important; }

/* Reduced motion always wins, regardless of the tweak */
@media (prefers-reduced-motion: reduce) {
  html[data-mythos] [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  html[data-mythos] [data-reveal] .myth-plate-img,
  html[data-mythos] [data-reveal] div[data-img-file] { clip-path: none !important; transition: none !important; }
}
