/* THE ATTENTION MACHINE — Design System
   Editorial/refined minimalism. Warm, typographic, zero decoration.
   Reference: The Guardian, The Atlantic, quality Substack. */

/* ── Fonts ──────────────────────────────────────────── */

@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/playfair-display-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/playfair-display-latin-400-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/playfair-display-latin-700-normal.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4-latin-400-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4-latin-600-normal.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ── Tokens ─────────────────────────────────────────── */

:root {
  --c-bg:      #faf8f5;
  --c-ink:     #1a1410;
  --c-muted:   #6b6157;
  --c-subtle:  #756d65;
  --c-border:  #e2ddd8;
  --c-surface: #ffffff;
  --c-accent:  #4a3d8f;
  --c-warm:    #f5f0e8;
  /* Timeline track colours (also used by future interactive demos) */
  --c-machine: #4a3d8f;
  --c-symptom: #9a3b3b;
  --c-law:     #3b6b4a;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-mono:    'Courier New', monospace;

  --t-xs:   clamp(0.72rem, 0.68rem + 0.2vw,  0.78rem);
  --t-sm:   clamp(0.85rem, 0.80rem + 0.25vw, 0.92rem);
  --t-base: clamp(1.00rem, 0.95rem + 0.25vw, 1.08rem);
  --t-md:   clamp(1.15rem, 1.05rem + 0.5vw,  1.30rem);
  --t-lg:   clamp(1.35rem, 1.15rem + 1vw,    1.75rem);
  --t-xl:   clamp(1.80rem, 1.40rem + 2vw,    2.80rem);
  --t-2xl:  clamp(2.20rem, 1.50rem + 3.5vw,  4.00rem);

  --space-xs:  0.375rem;
  --space-sm:  0.75rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;

  --max-prose: 68ch;
  --max-wide:  1100px;

  /* Pico CSS overrides — lock colours, prevent dark mode */
  --pico-font-family-sans-serif: var(--font-body);
  --pico-font-family-monospace: var(--font-mono);
  --pico-primary:          var(--c-accent);
  --pico-primary-hover:    #3a2d7f;
  --pico-background-color: var(--c-bg);
  --pico-color:            var(--c-ink);
  --pico-muted-color:      var(--c-muted);
  --pico-border-color:     var(--c-border);
  --pico-h1-color: var(--c-ink);
  --pico-h2-color: var(--c-ink);
  --pico-h3-color: var(--c-ink);
  --pico-h4-color: var(--c-ink);
  --pico-h5-color: var(--c-ink);
  --pico-h6-color: var(--c-ink);
}

/* ── Base ───────────────────────────────────────────── */

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

html {
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}

body { margin: 0; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-ink);
  margin-top: 0;
  --pico-color: var(--c-ink);
}

h1 { font-size: var(--t-2xl); margin-bottom: var(--space-md); }
h2 { font-size: var(--t-xl);  margin-bottom: var(--space-md); }
h3 { font-size: var(--t-lg);  margin-bottom: var(--space-sm); }
h4 { font-size: var(--t-md);  margin-bottom: var(--space-sm); }

p { line-height: 1.78; margin-bottom: var(--space-md); }

/* ── Layout ─────────────────────────────────────────── */

.site-wrap {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 768px) {
  .site-wrap { padding: 0 var(--space-lg); }
}

/* ── Skip link ──────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--c-accent);
  color: white;
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  z-index: 100;
}
.skip-link:focus { top: 0; }

/* ── Visually hidden (screen-reader / indexer only) ──── */
/* Removed from the visual flow but still in the accessibility tree and
   indexable by Pagefind. Used for the Pagefind result-title meta. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Header ─────────────────────────────────────────── */

.site-header {
  padding: var(--space-lg) 0 var(--space-md);
  border-bottom: 2px solid var(--c-ink);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
}

.site-header-titles {
  min-width: 0;
}

.site-header .brand {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-accent);
  display: block;
  margin-bottom: 0.4rem;
  text-decoration: none;
}

.site-header h1 {
  font-size: clamp(1.4rem, 1rem + 1.5vw, 1.9rem);
  margin: 0;
}

.site-header h1 a {
  text-decoration: none;
  color: inherit;
}

/* ── Language switcher ───────────────────────────────── */
.lang-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  padding: 0.5rem 0;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--c-border);
}
.lang-switcher a { color: var(--c-accent); text-decoration: none; }
.lang-switcher a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lang-switcher .lang-current { color: var(--c-muted); font-weight: 600; }

/* ── Search (Pagefind Component UI) ─────────────────── */
/* The modal trigger sits at the top-right of the header.
   CSS loaded from /pagefind/pagefind-component-ui.css; we constrain
   the host element and override the Component UI's CSS custom properties
   to match the site palette.
   Component UI CSS vars: https://pagefind.app/docs/ui-usage/#css-variables */
.site-search {
  flex-shrink: 0;
  padding-top: 0.35rem; /* nudge the trigger to align with the brand eyebrow */
}
/* Hide the trigger strip gracefully in dev before build runs pagefind */
.site-search:not(:has(pagefind-modal-trigger)) {
  display: none;
}
/* Map site design tokens onto Component UI variables */
pagefind-modal-trigger,
pagefind-modal {
  --pagefind-primary: var(--c-accent);
  --pagefind-text: var(--c-ink);
  --pagefind-background: var(--c-surface);
  --pagefind-border: var(--c-border);
  --pagefind-font: var(--font-body);
  --pagefind-mono-font: var(--font-mono);
}

/* ── Nav ────────────────────────────────────────────── */

/* ── Main navigation ─────────────────────────────────── */
/* overflow must be visible on every ancestor of .dropdown
   or the absolutely-positioned panel will be clipped. */

.site-nav {
  border-bottom: 1px solid var(--c-border);
  padding: 0.7rem 0;
  overflow: visible;
  position: relative;
  z-index: 100;
  white-space: nowrap;
}

.site-nav > ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
}

/* position:relative lets the dropdown anchor to each item */
.site-nav > ul > li {
  display: inline-block;
  position: relative;
}

.site-nav > ul > li:not(:last-child)::after {
  content: '|';
  color: var(--c-accent);
  opacity: 0.4;
  padding: 0 0.85rem;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
}

.site-nav > ul > li > a {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--c-accent);
}

.site-nav > ul > li > a:hover {
  color: var(--c-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Dropdown — hidden until hover/focus */
.site-nav .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 12rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 3px;
  box-shadow: 0 4px 16px rgba(26, 20, 16, 0.08);
  padding: 0.3rem 0;
  z-index: 200;
  flex-direction: column;
}

.site-nav > ul > li:hover .dropdown,
.site-nav > ul > li:focus-within .dropdown {
  display: flex;
}

.site-nav .dropdown li {
  display: block;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav .dropdown li::before { content: none; }

.site-nav .dropdown a {
  display: block;
  margin: 0;
  padding: 0.3rem 0.85rem;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.03em;
  color: var(--c-accent);
  text-decoration: none;
  text-align: left;
}

.site-nav .dropdown a:hover {
  color: var(--c-ink);
  background: var(--c-warm);
}

/* Group label inside a dropdown (e.g. the For You audience pages nested
   under Educate). The label is itself a link to that group's landing. */
.site-nav .dropdown li.group {
  border-top: 1px solid var(--c-border);
  margin-top: 0.25rem;
  padding-top: 0.15rem;
}
.site-nav .dropdown li.group a {
  font-weight: 600;
  color: var(--c-ink);
}

/* Non-link group heading (e.g. "Demos" above Tracking & Gamification). */
.site-nav .dropdown li.group-label {
  border-top: 1px solid var(--c-border);
  margin-top: 0.25rem;
  padding-top: 0.15rem;
}
.site-nav .dropdown li.group-label span {
  display: block;
  padding: 0.4rem 1rem;
  font-weight: 600;
  color: var(--c-ink);
  cursor: default;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Page content — white card on warm background ──── */
/* Single class for ALL page types. .prose and .section-page
   are kept as identical aliases — both render the same way. */

.prose,
.section-page {
  background: var(--c-surface);
  border-radius: 4px;
  padding: var(--space-xl) var(--space-xl) var(--space-2xl);
  margin-top: var(--space-lg);
}

@media (max-width: 640px) {
  .prose, .section-page {
    padding: var(--space-lg) var(--space-md) var(--space-xl);
    border-radius: 0;
  }
  .site-nav .dropdown { display: none !important; }
}

.section-desc {
  font-size: var(--t-md);
  color: var(--c-muted);
  max-width: 52ch;
  line-height: 1.75;
  margin-bottom: var(--space-xl);
}

.prose h2, .prose h3, .prose h4,
.prose p, .prose li, .prose blockquote {
  max-width: var(--max-prose);
}

.prose h2 { letter-spacing: -0.015em; }
.prose h3 { margin-top: var(--space-xl); }
.prose h4 { margin-top: var(--space-lg); }

.prose a          { color: var(--c-accent); text-underline-offset: 3px; }
.prose strong     { font-weight: 600; color: var(--c-ink); }

.prose .back-link {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-accent);
  text-decoration: none;
  margin-bottom: var(--space-md);
}
.prose .back-link:hover { text-decoration: underline; }

.prose .lead {
  font-size: var(--t-md);
  color: var(--c-muted);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
  max-width: 52ch;
}

.prose .callout, .callout {
  background: var(--c-warm);
  border-left: 3px solid var(--c-accent);
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-lg) 0;
  max-width: var(--max-prose);
}

.prose .sources {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--c-border);
  font-size: var(--t-sm);
  color: var(--c-muted);
  line-height: 1.6;
  max-width: var(--max-prose);
  scroll-margin-top: var(--space-lg);
}
.prose .sources .sources-title {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--c-muted);
  margin: 0 0 var(--space-sm);
}
.prose .sources ul {
  list-style: disc;
  margin: 0;
  padding-left: 1.25rem;
}
.prose .sources li {
  margin-bottom: var(--space-xs);
  line-height: 1.5;
}
.prose .sources li:last-child { margin-bottom: 0; }
.prose .sources a { color: var(--c-accent); text-underline-offset: 3px; }

/* In-body reference link that jumps to the Sources list */
.prose a.ref {
  color: var(--c-accent);
  text-underline-offset: 3px;
  text-decoration-style: dotted;
}

.prose .related {
  margin-top: var(--space-lg);
  font-size: var(--t-sm);
  max-width: var(--max-prose);
}
.prose .related a {
  color: var(--c-accent);
  text-underline-offset: 3px;
}

/* ── Hero ───────────────────────────────────────────── */

.hero {
  padding: var(--space-xl) 0 0;
}

/* Homepage sections after the hero share one vertical rhythm: top padding
   only (var(--space-lg)), so two adjacent sections produce a single ~2.5rem
   gap rather than doubled top+bottom padding — which read as too much
   whitespace once the divider lines were removed. The hero keeps its own
   masthead bottom padding. */

.hero-dateline {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-subtle);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.hero-dateline::after {
  content: '';
  display: inline-block;
  flex: 1;
  height: 1px;
  background: var(--c-subtle);
}

.hero .hook {
  font-family: var(--font-display);
  font-size: var(--t-2xl);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-md);
  max-width: 100%;
}
@media (min-width: 640px) { .hero .hook { max-width: 24ch; } }

.hero .hook em  { color: var(--c-accent); font-style: italic; }

.hero .subhead {
  font-size: var(--t-md);
  color: var(--c-muted);
  max-width: 64ch;
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0 0;
}
.hero-cta-row > a[role="button"] {
  flex-shrink: 0;
}

.no-conspiracy {
  background: var(--c-warm);
  border-left: 3px solid var(--c-accent);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--t-base);
  color: var(--c-muted);
  font-style: italic;
  flex: 1 1 24ch;
}

/* ── The loop (homepage incentive cycle) ────────────── */

.loop-section {
  padding: var(--space-lg) 0 0;
}
.loop-intro {
  max-width: 64ch;
  color: var(--c-muted);
  margin-bottom: var(--space-md);
}
.loop-svg {
  display: block;
  width: 100%;
  max-width: 920px;
  height: auto;
  margin: 0 auto;
}
/* Loop nodes are real links (work with JS off). The lead node is accented;
   the rest are neutral cards. Text colours come from tokens. */
.loop-node rect {
  fill: var(--c-surface);
  stroke: var(--c-border);
  stroke-width: 1;
  transition: stroke 0.15s;
}
.loop-node-lead rect {
  stroke: var(--c-accent);
}
.loop-node:hover rect,
.loop-node:focus-visible rect {
  stroke: var(--c-accent);
  stroke-width: 1.5;
}
.loop-node .loop-t {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  fill: var(--c-ink);
}
.loop-node .loop-s {
  font-family: var(--font-body);
  font-size: 12.5px;
  fill: var(--c-muted);
}
.loop-arr {
  stroke: var(--c-muted);
  stroke-width: 1.2;
}
.loop-return {
  stroke: var(--c-accent);
  stroke-width: 1;
}
.loop-return-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--c-accent);
}
.loop-foot {
  font-family: var(--font-body);
  font-size: 13px;
  font-style: italic;
  fill: var(--c-muted);
}

/* ── Cards ──────────────────────────────────────────── */

.section-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.section-meta::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-border);
}

.label {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-accent);
  display: block;
  margin-bottom: var(--space-xs);
  white-space: nowrap;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
}

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: var(--space-md) var(--space-md) var(--space-sm);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 0.15s, transform 0.12s;
}
.card:hover {
  border-color: var(--c-accent);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}
.card .card-label {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-accent);
}
.card h3 { font-size: var(--t-md); margin: 0.25rem 0; }
.card p   { font-size: var(--t-sm); color: var(--c-muted); line-height: 1.6; margin: 0 0 0.75rem; max-width: none; }
.card .card-cta { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--c-accent); margin-top: auto; }

/* ── Pills ──────────────────────────────────────────── */

.audience-section {
  padding: var(--space-lg) 0 0;
}
.audience-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.pill {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 100px;
  padding: 0.45rem 1.1rem;
  font-size: var(--t-sm);
  text-decoration: none;
  color: var(--c-muted);
  transition: border-color 0.15s, color 0.15s;
}
.pill:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  text-decoration: none;
}

/* ── Subpages grid ──────────────────────────────────── */

.subpages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-sm);
  padding: var(--space-xl) 0;
}
.subpage-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: var(--space-md);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.12s;
}
.subpage-card:hover {
  border-color: var(--c-accent);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}
.subpage-card strong { font-size: var(--t-base); font-weight: 600; color: var(--c-ink); }
.subpage-card span   { font-size: var(--t-sm); color: var(--c-muted); line-height: 1.55; }

/* ── Button ─────────────────────────────────────────── */

a[role="button"] {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  background: var(--c-accent);
  color: white;
  text-decoration: none;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  transition: background 0.15s, transform 0.1s;
}
a[role="button"]:hover {
  background: #3a2d7f;
  transform: translateY(-1px);
  text-decoration: none;
  color: white;
}

/* ── Newsletter ─────────────────────────────────────── */

.newsletter-strip {
  padding: var(--space-lg) 0 0;
}
.newsletter-strip h2 { font-size: var(--t-lg); margin-bottom: 0.5rem; }
.newsletter-strip p  { color: var(--c-muted); }

.newsletter-form {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  max-width: 460px;
}
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--c-border);
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: var(--t-base);
  background: var(--c-surface);
  color: var(--c-ink);
}
.newsletter-form input[type="email"]:focus {
  outline: 2px solid var(--c-accent);
  outline-offset: 1px;
  border-color: var(--c-accent);
}
.newsletter-form button {
  padding: 0.65rem 1.4rem;
  background: var(--c-accent);
  color: white;
  border: none;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.15s;
}
.newsletter-form button:hover { background: #3a2d7f; }

/* ── Footer ─────────────────────────────────────────── */

.site-footer {
  margin-top: var(--space-xl);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--c-border);
}
.footer-links { width: 100%; margin-bottom: var(--space-md); }
.footer-links a {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-accent);
  text-decoration: none;
}
.footer-links a:hover { color: var(--c-ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-links a + a::before {
  content: '|';
  color: var(--c-accent);
  opacity: 0.4;
  padding: 0 0.85rem;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
}
.footer-meta {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--c-subtle);
  margin: 0.5rem 0 0;
  max-width: none;
  line-height: 1.8;
}
.footer-meta a       { color: var(--c-accent); text-decoration: underline; text-underline-offset: 2px; }
.footer-meta a:hover { text-decoration-style: solid; }

/* ── FAQ ────────────────────────────────────────────── */
/* Scoped to .faq-list so the global <details> element can be used
   elsewhere (e.g. .deeper Tier 3 blocks) without inheriting these styles. */

.faq-list { margin-top: var(--space-lg); }

.faq-list details { border-bottom: 1px solid var(--c-border); }
.faq-list details summary {
  padding: var(--space-md) 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: var(--space-md);
  font-size: var(--t-base);
}
.faq-list details summary::-webkit-details-marker { display: none; }
.faq-list details summary .q-num    { font-family: var(--font-mono); color: var(--c-accent); font-size: var(--t-sm); flex-shrink: 0; margin-top: 0.2rem; }
.faq-list details summary .q-toggle { color: var(--c-accent); font-size: 1.3rem; line-height: 1; flex-shrink: 0; margin-left: auto; }
.faq-list details[open] summary .q-toggle { transform: rotate(45deg); }
.faq-list details .answer {
  padding: 0 0 var(--space-md) calc(2ch + var(--space-sm));
  color: var(--c-muted);
  font-size: var(--t-sm);
  max-width: var(--max-prose);
  line-height: 1.7;
}

/* ── Reading guide (top-of-page orientation for three-tier pages) ─ */
/* A subtle note explaining how to use the term pop-outs and depth
   blocks. Small, low-contrast, between the lead and first heading.
   Placed where a reader naturally pauses before diving in. */

.prose .reading-guide {
  font-size: var(--t-sm);
  color: var(--c-muted);
  line-height: 1.6;
  background: var(--c-warm);
  padding: var(--space-sm) var(--space-md);
  border-radius: 4px;
  margin: var(--space-md) 0 var(--space-xl);
  max-width: var(--max-prose);
}
.prose .reading-guide strong {
  color: var(--c-ink);
  font-weight: 600;
}
.prose .reading-guide .rg-term-example {
  /* mirror the .term visual signal so readers see the cue */
  text-decoration: underline;
  text-decoration-style: dashed;
  text-decoration-color: var(--c-accent);
  text-underline-offset: 3px;
  color: var(--c-ink);
}

/* ── Tier 2: Term definitions (Term + TermDef components) ─ */
/* Tappable word inline in prose (Term) that reveals a small definition
   card (TermDef) right below the paragraph. The card is hidden by
   default and shown when the URL fragment matches its id, using CSS
   :target — a universally supported primitive that works in every
   browser since ~2011. No JavaScript. No new browser APIs.

   Visual signal on the Term: dashed underline (distinct from solid
   links and the dotted underline of .ref source jumps). */

.prose .term {
  /* The <a> styled to look like inline prose, not a navigational link */
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dashed;
  text-decoration-color: var(--c-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: help;
  padding: 0 0.15em;
  border-radius: 2px;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.prose .term:hover {
  color: var(--c-accent);
  text-decoration-style: solid;
}
.prose .term:focus-visible {
  /* High-contrast focus: outline + warm-tinted background + solid
     underline. The dashed underline alone uses accent colour, so an
     outline ring of the same colour would blend with the resting
     state — the background highlight is the load-bearing cue. */
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  background: var(--c-warm);
  color: var(--c-ink);
  text-decoration-style: solid;
}

/* The definition card. Hidden until its id matches the URL fragment. */
.prose .term-def {
  display: none;
}
.prose .term-def:target {
  display: block;
  position: relative;
  margin: var(--space-md) 0 var(--space-lg);
  max-width: var(--max-prose);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-accent);
  border-radius: 0 4px 4px 0;
  padding: var(--space-md) var(--space-lg) var(--space-md) var(--space-md);
  /* Buffer when the browser scrolls the card into view on reveal */
  scroll-margin-top: var(--space-lg);
}
.prose .term-def-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-md);
  color: var(--c-ink);
  margin: 0 0 var(--space-sm);
  padding-right: var(--space-lg);
  line-height: 1.25;
}
.prose .term-def-body {
  font-size: var(--t-sm);
  line-height: 1.65;
  color: var(--c-ink);
}
.prose .term-def-body p {
  margin: 0 0 var(--space-sm);
}
.prose .term-def-body p:last-child { margin-bottom: 0; }
.prose .term-def-body a {
  color: var(--c-accent);
  text-underline-offset: 3px;
}

/* Sources block inside a term-def — mirrors the page-level .sources
   block at the foot of every content page, so the reader sees the
   same visual pattern wherever sources appear. */
.prose .term-def-body .sources {
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--c-border);
  font-size: var(--t-xs);
  color: var(--c-muted);
  line-height: 1.55;
}
.prose .term-def-body .sources-title {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--c-muted);
  margin: 0 0 var(--space-xs);
  padding-right: 0;
}
.prose .term-def-body .sources ul {
  list-style: disc;
  margin: 0;
  padding-left: 1.1rem;
}
.prose .term-def-body .sources li {
  margin-bottom: var(--space-xs);
}
.prose .term-def-body .sources li:last-child { margin-bottom: 0; }
.prose .term-def-body .sources a { color: var(--c-accent); }

/* Close link: navigates to #close (an id that does not exist on any
   page), which causes :target to no longer match and the card to hide.
   No JavaScript needed. */
.prose .term-def-close {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--c-muted);
  text-decoration: none;
  border-radius: 4px;
}
.prose .term-def-close:hover,
.prose .term-def-close:focus-visible {
  color: var(--c-ink);
  background: var(--c-warm);
  outline: none;
}


/* ── Tier 3: Deeper blocks (Deeper component) ──────── */
/* Collapsible block at the end of a section with depth, methodology,
   contested parts, evidence. The reader can ignore it without losing
   the main argument. Uses native <details>/<summary> — no JS. */

.prose .deeper {
  margin: var(--space-lg) 0;
  max-width: var(--max-prose);
  background: var(--c-warm);
  border-left: 3px solid var(--c-accent);
  border-radius: 0 4px 4px 0;
}
.prose .deeper summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--c-ink);
}
.prose .deeper summary::-webkit-details-marker { display: none; }
.prose .deeper summary::marker { content: ""; }
.prose .deeper summary:hover .deeper-label,
.prose .deeper summary:focus-visible .deeper-label {
  color: var(--c-accent);
}
.prose .deeper summary:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: -2px;
  border-radius: 0 4px 4px 0;
}
.prose .deeper-label {
  font-family: var(--font-body);
}
.prose .deeper-toggle {
  color: var(--c-accent);
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 400;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.prose .deeper[open] .deeper-toggle {
  transform: rotate(45deg);
}
.prose .deeper-body {
  padding: 0 var(--space-md) var(--space-md);
  font-size: var(--t-sm);
  line-height: 1.7;
  color: var(--c-muted);
}
.prose .deeper-body p,
.prose .deeper-body ul,
.prose .deeper-body ol {
  margin: 0 0 var(--space-sm);
  max-width: 100%;
}
.prose .deeper-body p:last-child,
.prose .deeper-body ul:last-child,
.prose .deeper-body ol:last-child {
  margin-bottom: 0;
}
.prose .deeper-body strong { color: var(--c-ink); }
.prose .deeper-body a {
  color: var(--c-accent);
  text-underline-offset: 3px;
}
.prose .deeper-body em { color: var(--c-ink); }

/* ── Blog ───────────────────────────────────────────── */
/* Index list of posts + per-post metadata. Post body itself is
   rendered Markdown inside .prose, so it inherits prose styling. */

.prose .blog-list {
  list-style: none;
  margin: var(--space-lg) 0 0;
  padding: 0;
  max-width: var(--max-prose);
}
.prose .blog-list > li {
  padding: var(--space-md) 0;
  border-top: 1px solid var(--c-border);
}
.prose .blog-list > li:last-child {
  border-bottom: 1px solid var(--c-border);
}
.prose .blog-list > li > a {
  font-family: var(--font-display);
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--c-ink);
  text-decoration: none;
  line-height: 1.3;
}
.prose .blog-list > li > a:hover {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose .blog-list-meta,
.prose .blog-post-meta {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--c-muted);
  margin: 0.35rem 0 0;
}
.prose .blog-list-desc {
  color: var(--c-muted);
  font-size: var(--t-sm);
  margin: 0.4rem 0 0;
  line-height: 1.6;
}
.prose .blog-post-meta {
  margin: -0.5rem 0 var(--space-lg);
}

/* ── Utility classes ────────────────────────────────── */

.no-margin        { margin: 0; }
.muted-caption     { color: var(--c-muted); font-size: 0.9rem; }
.muted-sm          { color: var(--c-muted); font-size: 0.85rem; }
.muted-italic      { color: var(--c-muted); font-size: 0.95rem; font-style: italic; margin: 0; }
.footer-rule       { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--c-border); font-size: 0.85rem; color: var(--c-muted); }
.page-404          { text-align: center; padding-top: var(--space-2xl); }

/* ── Homepage: Under the Hood callout ──────────────── */

.uth-callout {
  padding: var(--space-lg) 0 0;
}
.uth-callout h2 {
  font-size: var(--t-lg);
  max-width: 32ch;
  margin-bottom: var(--space-md);
}
.uth-callout-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-xl);
}
.uth-callout-row p {
  flex: 1 1 28ch;
  max-width: 52ch;
  color: var(--c-muted);
  margin: 0;
}
.uth-callout-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* ── Ko-fi donate button ───────────────────────────── */

.kofi-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #794bc4;
  color: #fff !important;
  font-weight: 600;
  font-size: var(--t-md);
  border-radius: 6px;
  text-decoration: none !important;
  transition: background 0.15s;
  margin: var(--space-md) 0;
}
.kofi-btn:hover,
.kofi-btn:active,
.kofi-btn:focus {
  background: #6339a8;
  color: #fff !important;
  text-decoration: none !important;
}

/* ── Contact page ──────────────────────────────────── */

.contact-list dt {
  font-weight: 600;
  margin-top: var(--space-md);
}
.contact-list dd {
  margin-left: 0;
}
.contact-dd-spaced {
  margin-left: 0;
  margin-bottom: var(--space-lg);
}

/* ── Responsive ─────────────────────────────────────── */

@media (max-width: 640px) {
  .hero .subhead, .hero .hook { max-width: none; }
  .cards-grid, .subpages-grid { grid-template-columns: 1fr; }
}

/* ── Focus / Print ──────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

@media print {
  .site-nav, .site-footer, .newsletter-strip { display: none; }
  body { background: white; color: black; }
  a { color: black; }
}

/* ── Under the Hood interactive islands ────────────── */

.uth-island {
  margin: var(--space-md) 0 var(--space-lg);
}

.uth-panel {
  background: var(--c-warm);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: var(--space-md);
  font-family: var(--font-body);
}

.uth-panel-warn { background: #fff8ec; border-color: #f0d090; }
.uth-panel-error { background: #fef3f3; border-color: #f8c0c0; color: #8a1010; }

.uth-panel-label {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.uth-scanning {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  color: var(--c-accent);
  padding: 0.5rem 0;
}
.uth-scanning-sm { font-size: var(--t-xs); padding-top: 0.5rem; }

.uth-pulse {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-accent);
  animation: uth-pulse 1s ease infinite;
}
.uth-pulse-sm { width: 6px; height: 6px; }

@keyframes uth-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.3; transform: scale(0.6); }
}

@keyframes uth-fade-up {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* Row display (Phase 1) */
.uth-row-wrap {
  animation: uth-fade-up 0.3s ease both;
}
.uth-section-rule {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 1rem 0 0.5rem;
}
.uth-section-rule:first-child { margin-top: 0; }
.uth-section-rule span {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-subtle);
  white-space: nowrap;
}
.uth-section-rule div {
  flex: 1; height: 1px; background: var(--c-border);
}

.uth-row {
  border-bottom: 1px solid var(--c-border);
  padding: 0.55rem 0;
  display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap;
}
.uth-row-key {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--c-subtle);
  min-width: 130px;
  flex-shrink: 0;
}
.uth-row-val {
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  color: var(--c-ink);
  font-weight: 500;
}
.uth-row-note {
  padding-left: 146px;
  padding-bottom: 0.5rem;
  font-size: var(--t-sm);
  color: var(--c-muted);
  line-height: 1.55;
}
@media (max-width: 600px) {
  .uth-row-note { padding-left: 0; }
}

/* Buttons */
.uth-btn {
  border: none;
  border-radius: 3px;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.uth-btn-accent { background: var(--c-accent); color: #fff; }
.uth-btn-accent:hover { background: #3a2d7f; }
.uth-btn-danger { background: #8a2020; color: #fff; }
.uth-btn-danger:hover { background: #6a1010; }
.uth-btn-ghost {
  background: var(--c-warm);
  color: var(--c-ink);
  border: 1px solid var(--c-border);
}

/* Auction stages (Phase 2) */
.uth-stage {
  animation: uth-fade-up 0.3s ease both;
  margin-bottom: 1rem;
}
.uth-stage:last-child { margin-bottom: 0; }

.uth-stage-label {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-accent);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.uth-stage-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem;
}
.uth-stage-cell {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 3px;
  padding: 0.5rem 0.75rem;
}
.uth-stage-key {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--c-subtle);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 2px;
}
.uth-stage-val {
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  color: var(--c-ink);
}

.uth-warn {
  background: #fff8ec;
  border: 1px solid #f0d090;
  border-radius: 3px;
  padding: 0.4rem 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: #7a5010;
  margin-bottom: 0.5rem;
}

.uth-tags {
  display: flex; flex-wrap: wrap; gap: 0.3rem;
}
.uth-tag {
  display: inline-block;
  border-radius: 20px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
}
.uth-tag-warm { background: #fff3ec; border: 1px solid #f0c8a8; color: #8a3010; }
.uth-tag-cool { background: #ecf0ff; border: 1px solid #c0c8f8; color: #2a2870; }

.uth-code {
  background: #14110c;
  color: #b8d8b8;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.75rem;
  border-radius: 3px;
  overflow-x: auto;
  line-height: 1.55;
  margin: 0;
  max-height: 200px;
}

/* Bidder rows */
.uth-bidders {
  display: flex; flex-direction: column; gap: 0.35rem;
}
.uth-bidder {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--c-warm);
  border: 1px solid var(--c-border);
  border-radius: 3px;
  padding: 0.55rem 0.75rem;
  opacity: 0.35;
  transition: all 0.3s;
}
.uth-bidder-on { background: var(--c-surface); opacity: 1; }
.uth-bidder-won { background: #f0f7f0; border-color: #88c888; }
.uth-bidder-name { flex: 1; }
.uth-bidder-name strong {
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  font-weight: 600;
  margin-right: 0.4rem;
}
.uth-bidder-meta {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--c-subtle);
}
.uth-bidder-bid {
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--c-muted);
}
.uth-bidder-won .uth-bidder-bid { color: #2a7a2a; }
.uth-badge {
  background: #2a7a2a; color: #fff;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: 10px;
  vertical-align: middle;
}

.uth-result {
  background: var(--c-ink);
  color: #c0b8b0;
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}
.uth-result-label {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9a8f82;
  margin-bottom: 0.5rem;
}
.uth-result p { color: #c0b8b0; margin-bottom: 0.5rem; }
.uth-result-note { color: #7a7068; font-style: italic; font-size: var(--t-sm); margin: 0 !important; }

/* Phase 3 — manipulation */
.uth-vuln-label, .uth-tech-label {
  margin: 0.25rem 0 0.75rem;
  font-size: var(--t-md);
  color: var(--c-ink);
}
.uth-vuln-label { color: #c0392b; }

.uth-tech-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
  margin-top: 0.75rem;
}
.uth-tech-cell {
  border-radius: 3px;
  padding: 0.6rem 0.75rem;
}
.uth-tech-key {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 3px;
}
.uth-tech-emotion {
  background: #fef3f3; border: 1px solid #f8c0c0;
}
.uth-tech-emotion .uth-tech-key { color: #8a1010; }
.uth-tech-outcome {
  background: #f3f0ff; border: 1px solid #c8b8f8;
}
.uth-tech-outcome .uth-tech-key { color: #3a1a8a; }

@media (max-width: 600px) {
  .uth-stage-grid, .uth-tech-grid { grid-template-columns: 1fr; }
}

/* Fake post */
.uth-post {
  border: 1px solid var(--c-border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--c-surface);
}
.uth-post-header {
  background: var(--c-warm);
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--c-border);
  display: flex; gap: 0.6rem; align-items: center;
}
.uth-post-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--c-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.uth-post-source {
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--c-ink);
}
.uth-post-warn {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: #c0392b;
}
.uth-post-body { padding: 1rem 1.1rem; }
.uth-post-headline {
  font-weight: 700;
  font-size: var(--t-md);
  line-height: 1.4;
  color: var(--c-ink);
  margin-bottom: 0.75rem;
}
.uth-post-text {
  font-size: var(--t-sm);
  color: var(--c-muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.uth-post-hook {
  background: var(--c-warm);
  border-left: 3px solid var(--c-border);
  padding: 0.5rem 0.75rem;
  font-size: var(--t-sm);
  color: var(--c-muted);
  font-style: italic;
}

.uth-hl {
  background: #fff3c0;
  border-bottom: 2px solid #e0a000;
  color: inherit;
  cursor: help;
  padding: 0 1px;
}

.uth-annot-list {
  margin-top: 1rem;
  background: var(--c-warm);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: 0.75rem 1rem;
}
.uth-annot-item {
  margin-bottom: 0.65rem;
}
.uth-annot-item:last-child { margin-bottom: 0; }
.uth-annot-phrase {
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  font-weight: 600;
  background: #fff3c0;
  display: inline-block;
  padding: 1px 5px;
  border-radius: 2px;
  margin-bottom: 3px;
}
.uth-annot-note {
  font-size: var(--t-sm);
  color: var(--c-muted);
  line-height: 1.55;
  padding-left: 0.5rem;
  border-left: 2px solid #f0d090;
}

.uth-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}
.uth-compare-card {
  border: 1px solid var(--c-border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--c-surface);
}
.uth-compare-meta {
  background: var(--c-warm);
  border-bottom: 1px solid var(--c-border);
  padding: 0.5rem 0.8rem;
}
.uth-compare-key {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--c-subtle);
}
.uth-compare-tech {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--c-accent);
  font-weight: 600;
  margin-top: 2px;
}
.uth-compare-headline {
  font-weight: 700;
  font-size: var(--t-sm);
  line-height: 1.4;
  color: var(--c-ink);
  margin: 0.6rem 0.8rem 0.4rem;
}
.uth-compare-body {
  font-size: var(--t-xs);
  color: var(--c-muted);
  line-height: 1.6;
  padding: 0 0.8rem 0.75rem;
}

/* ── Under the Hood — live tracker test ─────────────── */

.uth-trackers {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.uth-tracker {
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: 0.7rem 0.85rem;
  animation: uth-fade-up 0.3s ease both;
}
.uth-tracker-loaded {
  background: #fdf3f0;
  border-color: #e8b8a8;
}
.uth-tracker-blocked {
  background: #f0f7f0;
  border-color: #a8d0a8;
}

.uth-tracker-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}
.uth-tracker-layer {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-subtle);
}
.uth-tracker-status {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 700;
}
.uth-tracker-loaded .uth-tracker-status { color: #b0431a; }
.uth-tracker-blocked .uth-tracker-status { color: #2a7a2a; }

.uth-tracker-name {
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--c-ink);
  margin-bottom: 0.3rem;
}
.uth-tracker-learned {
  font-size: var(--t-sm);
  color: var(--c-muted);
  line-height: 1.55;
}

.uth-tracker-foot {
  font-size: var(--t-sm);
  color: var(--c-muted);
  line-height: 1.6;
  padding: 0.75rem 0.85rem;
  background: var(--c-warm);
  border-radius: 4px;
  margin-top: 0.2rem;
}

/* ── Timeline page (/en/timeline/) ───────────────────────────────────
   Parallel-track ("swim-lane") timeline. Tracks marked by shape AND
   colour (accessible without colour). Static — no JS required. The
   68ch prose measure does not apply to .tl-grid, so it uses the full
   card width on desktop; on mobile it collapses to a box-free column. */
.tl-legend {
  display: flex; flex-wrap: wrap; gap: 1.2rem;
  margin: 1.4rem 0 0.5rem; padding: 0.85rem 0;
  border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border);
}
.tl-legend .item { display: flex; align-items: center; gap: 0.5rem; font-size: var(--t-sm); }
.tl-legend .k { font-weight: 600; }
.tl-legend .s { color: var(--c-subtle); }
.tl-m { color: var(--c-machine); } .tl-s { color: var(--c-symptom); } .tl-l { color: var(--c-law); }

.tl-lag {
  background: var(--c-warm); border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-accent); padding: 1rem 1.2rem;
  margin: 1.4rem 0 0.5rem; max-width: 64ch;
}

.tl-head {
  display: grid; grid-template-columns: 64px 1fr 1fr 1fr; gap: 0.5rem;
  position: sticky; top: 0; background: var(--c-surface);
  padding: 0.8rem 0 0.5rem; border-bottom: 2px solid var(--c-ink); z-index: 3;
}
.tl-head .h { font-weight: 600; }
.tl-head .sub { display: block; font-weight: 400; font-size: var(--t-xs); color: var(--c-subtle); }

.tl-grid { margin-top: 0.25rem; max-width: var(--max-wide); }
.tl-row {
  display: grid; grid-template-columns: 64px 1fr 1fr 1fr; gap: 0.5rem;
  align-items: stretch; border-top: 1px solid var(--c-border); min-height: 54px;
}
.tl-year { font-family: var(--font-mono); font-weight: 700; color: var(--c-muted); padding-top: 0.5rem; font-size: var(--t-sm); }
.tl-cell { padding: 0.35rem 0; }
.tl-cell.empty { border-left: 1px dashed #efeae3; }
.tl-event {
  display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.5rem 0.7rem;
  border-radius: 8px; background: var(--c-surface); border: 1px solid var(--c-border);
  margin: 0.15rem 0; font-size: 0.92rem; line-height: 1.5;
}
.tl-event .dot { flex: none; line-height: 1.4; }
.tl-event.machine { border-left: 3px solid var(--c-machine); } .tl-event.machine .dot { color: var(--c-machine); }
.tl-event.symptom { border-left: 3px solid var(--c-symptom); } .tl-event.symptom .dot { color: var(--c-symptom); }
.tl-event.law     { border-left: 3px solid var(--c-law); }     .tl-event.law .dot     { color: var(--c-law); }
.tl-event.protective {
  background: repeating-linear-gradient(45deg, var(--c-surface), var(--c-surface) 6px, #f3f0ea 6px, #f3f0ea 12px);
  border-left-style: dashed;
}
.tl-event a { color: var(--c-accent); white-space: nowrap; font-size: var(--t-xs); text-underline-offset: 3px; }
.tl-tag { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tl-row.first { background: linear-gradient(to right, rgba(74, 61, 143, 0.06), transparent); }
.tl-firstnote { grid-column: 2 / 5; font-size: var(--t-xs); color: var(--c-accent); padding: 0.1rem 0 0.4rem; }

/* Simplified, box-free mobile: a single linear column with a left axis */
@media (max-width: 760px) {
  .tl-head { display: none; }
  .tl-grid { border-left: 2px solid var(--c-border); margin-left: 0.35rem; padding-left: 1rem; }
  .tl-row { display: block; border-top: none; min-height: 0; padding: 0.1rem 0 1rem; position: relative; }
  .tl-row::before { content: ""; position: absolute; left: -1.5rem; top: 0.5rem; width: 9px; height: 9px; border-radius: 50%; background: var(--c-muted); }
  .tl-year { padding: 0; margin: 0.1rem 0 0.35rem; font-family: inherit; font-weight: 700; font-size: var(--t-md); color: var(--c-ink); }
  .tl-cell { padding: 0; } .tl-cell.empty { display: none; }
  .tl-event { display: block; background: none; border: none; border-left: none; border-radius: 0; padding: 0.2rem 0; margin: 0; font-size: var(--t-base); }
  .tl-event.machine, .tl-event.symptom, .tl-event.law { border: none; }
  .tl-event.protective { background: none; }
  .tl-event .dot { display: none; }
  .tl-tag { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.72rem; }
  .tl-event.machine .tl-tag { color: var(--c-machine); }
  .tl-event.symptom .tl-tag { color: var(--c-symptom); }
  .tl-event.law .tl-tag { color: var(--c-law); }
  .tl-event a { white-space: normal; }
  .tl-row.first { background: none; }
  .tl-firstnote { grid-column: auto; display: block; }
}

/* ── Gamification demo (/en/attention-machine/gamification-demo/) ─────
   Two mock apps running the SAME mechanics (Act 1 helpful, Act 2 pointed
   at time-on-device). Server-rendered static markup + a bundled
   enhancement script; the surrounding prose carries the argument with JS
   off. Guardrails: no real hook, exit always visible, Act 2 content blank. */
.gd-app { border: 1px solid var(--c-border); border-radius: 14px; background: var(--c-surface);
  overflow: hidden; box-shadow: 0 6px 22px rgba(26, 20, 16, 0.06); max-width: 420px; margin: 0.5rem 0 0.4rem; }
.gd-bar-top { display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 1rem; background: var(--gd-accent, #efe9ff); border-bottom: 1px solid var(--c-border); }
.gd-name { font-weight: 700; font-family: var(--display); }
.gd-streak { font-family: var(--font-mono); font-size: 0.85rem; }
.gd-body { padding: 1.1rem 1rem 1.3rem; }
.gd-stat-row { display: flex; gap: 0.6rem; margin-bottom: 0.7rem; }
.gd-stat { flex: 1; text-align: center; border: 1px solid var(--c-border); border-radius: 9px; padding: 0.5rem 0.3rem; }
.gd-stat .v { font-family: var(--font-mono); font-weight: 700; font-size: 1.15rem; display: block; }
.gd-stat .k { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--c-subtle); }
.gd-progress { height: 12px; border-radius: 99px; background: #eee6da; overflow: hidden; margin: 0.2rem 0 0.1rem; }
.gd-progress > i { display: block; height: 100%; width: 0; background: var(--c-accent); border-radius: 99px; transition: width 0.45s ease; }
.gd-prog-label { font-size: 0.72rem; color: var(--c-subtle); display: flex; justify-content: space-between; }
.gd-feed { min-height: 88px; border: 1px dashed var(--c-border); border-radius: 9px; margin: 0.4rem 0 0.8rem;
  padding: 0.6rem; display: flex; flex-direction: column; gap: 0.4rem; justify-content: flex-end; }
.gd-feed-item { border-radius: 7px; padding: 0.45rem 0.6rem; font-size: 0.85rem; display: flex; align-items: center;
  gap: 0.5rem; background: #f3f0ea; color: var(--c-muted); }
.gd-feed-item .gd-meter { flex: none; width: 46px; height: 7px; border-radius: 99px; background: #e0d8cc; overflow: hidden; }
.gd-feed-item .gd-meter > i { display: block; height: 100%; background: var(--c-symptom); }
.gd-reward { text-align: center; font-size: 0.85rem; min-height: 1.2rem; color: var(--c-law); font-weight: 600; }
.gd-btn { display: inline-block; border: none; border-radius: 10px; padding: 0.7rem 1rem; font-family: var(--serif);
  font-size: 1rem; font-weight: 600; cursor: pointer; width: 100%; }
.gd-btn-primary { background: var(--c-accent); color: #fff; }
.gd-btn-primary:hover { filter: brightness(1.08); }
.gd-btn-ghost { background: none; border: 1px solid var(--c-border); color: var(--c-ink); font-weight: 400;
  font-size: 0.85rem; width: auto; padding: 0.45rem 0.8rem; }
.gd-leave-row { margin-top: 0.7rem; text-align: center; }
.gd-nudge { margin-top: 0.6rem; background: #fff6f1; border: 1px solid #f0d9cc; border-radius: 9px; padding: 0.6rem 0.8rem; font-size: 0.85rem; }
.gd-nudge .gd-nudge-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.gd-nudge .gd-nudge-actions button { flex: 1; }
.gd-annot { display: none; font-size: 0.72rem; color: var(--c-symptom); margin-top: 0.25rem; line-height: 1.3; font-style: italic; }
.gd-show-machine .gd-annot { display: block; }
.gd-reveal { margin: 0.8rem 0 0; }
.gd-transition { margin: 2rem 0 0; padding: 1rem 1.2rem; border-left: 4px solid var(--c-accent); background: var(--c-warm); border-radius: 0 8px 8px 0; max-width: var(--max-prose); }
.gd-reset-bar { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin: 1.5rem 0 0.5rem; }
.gd-reset-bar .gd-hint { font-size: 0.8rem; color: var(--c-subtle); }
@media (prefers-reduced-motion: reduce) { .gd-progress > i { transition: none; } }
@media (max-width: 520px) { .gd-app { max-width: 100%; } }
