/* aimx homepage styles. Extracted from index.html — keep all
   inline-style-only declarations here so the HTML stays lean. */

/* Slate dark by default — aimx is a dev-first tool. Cool blue-gray
   cohesive with terminal mockup. Light is opt-in via the toggle. */
:root,
:root[data-theme="dark"] {
  --paper: #0D1117;
  --paper-2: #161B22;
  --ink: #E6EDF3;
  --ink-soft: #C9D1D9;
  --ink-faded: #8B949E;
  --accent: #58A6FF;
  --accent-dark: #79C0FF;
  --rule: #21262D;
  --grain-blend: screen;
  --grain-opacity: 0.12;
  --icon-card-bg: rgba(201, 209, 217, 0.06);
}

:root[data-theme="light"] {
  --paper: #F4EEE3;
  --paper-2: #EBE3D4;
  --ink: #151310;
  --ink-soft: #2B2620;
  --ink-faded: #5C5549;
  --accent: #B9531C;
  --accent-dark: #8E3E14;
  --rule: #D8CFBE;
  --grain-blend: multiply;
  --grain-opacity: 0.35;
  --icon-card-bg: rgba(21, 19, 16, 0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { background: var(--paper); color: var(--ink); }

body {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 30px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(185, 83, 28, 0.07), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(185, 83, 28, 0.05), transparent 55%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  z-index: 1;
}

/* Outer container — Bootstrap-style responsive ladder, capped at xl
   (1140px). One container width drives every section below; nothing
   inside .wrap declares its own max-width so the rhythm stays uniform. */
.wrap {
  max-width: 100%;
  margin: 0 auto;
  padding: 32px 28px 40px;
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}
@media (min-width: 576px)  { .wrap { max-width: 540px;  } }
@media (min-width: 768px)  { .wrap { max-width: 720px;  } }
@media (min-width: 992px)  { .wrap { max-width: 960px;  } }
@media (min-width: 1200px) { .wrap { max-width: 1140px; } }

/* Header layout — CSS grid with two named areas so we can flip between
   a single desktop row (brand | nav | toggle) and a 2-row mobile stack
   (brand+toggle on row 1, nav full-width on row 2). Source order keeps
   brand → toggle → nav so the toggle sits next to the brand even when
   the page is rendered without CSS. */
header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand nav toggle";
  align-items: center;
  gap: 12px 22px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}

.header-left {
  grid-area: brand;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.theme-toggle { grid-area: toggle; }

@media (max-width: 719px) {
  header {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand toggle"
      "nav   nav";
    gap: 14px 16px;
  }
}

.brand {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 14;
  font-weight: 500;
  font-size: 1.17em;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}

.brand:hover { color: var(--accent); }
.brand .dot { color: var(--accent); margin: 0 0.05em 0 0.02em; }
.brand-sub {
  font-weight: 400;
  font-size: 0.72em;
  color: var(--ink-soft);
  letter-spacing: 0;
}

.topnav {
  grid-area: nav;
  display: flex;
  align-items: center;
  gap: 22px;
  justify-content: flex-end;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.43em;
  letter-spacing: 0.02em;
}

.topnav a {
  color: var(--ink-faded);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}

@media (max-width: 719px) {
  .topnav {
    justify-content: space-between;
    width: 100%;
    gap: 14px;
  }
  /* Make plain text links comfortably tappable on phone */
  .topnav a:not(.github-pill):not(.discord-pill) {
    padding: 6px 4px 4px;
  }
}

/* Below 480px the brand subtitle becomes a luxury and the pills lose
   their text labels so the entire nav still fits on a single row. */
@media (max-width: 480px) {
  .topnav .pill-label { display: none; }
  .topnav a.github-pill,
  .topnav a.discord-pill {
    padding: 0;
    width: 32px;
    height: 32px;
    justify-content: center;
    gap: 0;
  }
  .topnav a.github-pill svg,
  .topnav a.discord-pill svg {
    width: 16px;
    height: 16px;
  }
}

/* Hide the brand subtitle in the two viewport bands where the header
   doesn't have room: the narrowest phones (<381px) where brand+sub+toggle
   would stack to three rows, and the intermediate-desktop band 720–991px
   where the grid's auto column squeezes brand-left enough that the sub
   would wrap onto its own line. AIMX as a wordmark carries enough brand
   on both ends. */
@media (max-width: 380px),
       (min-width: 720px) and (max-width: 991px) {
  .header-left .brand-sub { display: none; }
}

.topnav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.topnav a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.topnav a.discord-pill,
.topnav a.github-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-weight: 500;
  color: #fff;
}

.topnav a.discord-pill {
  border: 1px solid #5865F2;
  background: #5865F2;
}

.topnav a.discord-pill:hover {
  background: #4752C4;
  border-color: #4752C4;
  color: #fff;
}

.topnav a.github-pill {
  border: 1px solid var(--ink);
  background: var(--ink);
}

.topnav a.github-pill:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

.topnav a.discord-pill svg,
.topnav a.github-pill svg {
  display: block;
  flex-shrink: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-faded);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--ink-faded);
  background: var(--paper-2);
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
}
/* Default (dark theme) — show sun ("switch to light") */
.theme-toggle .icon-moon { display: none; }
/* Light theme — show moon ("switch to dark") */
:root[data-theme="light"] .theme-toggle .icon-sun  { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

main {
  padding: 56px 0 40px;
  flex: 1;
  font-size: 1.5em;
}

.mascot {
  display: block;
  margin: 0 auto 32px;
  width: 260px;
  max-width: 68%;
  height: auto;
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.29em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 auto 24px;
  text-align: center;
}

h1 {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 144;
  font-weight: 400;
  font-size: 1.3em;
  line-height: 1.15;
  letter-spacing: -0.022em;
  margin: 0 auto 40px;
  max-width: 24ch;
  text-align: center;
  color: var(--ink);
}

h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-dark);
}

.pitch {
  font-size: 0.4em;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 auto;
  text-align: center;
}

/* Sub-caption beneath the install terminal — left-aligned, muted, sized to
   the terminal so it reads as a footnote on the command above it. */
.terminal-caption {
  max-width: 720px;
  margin: 0.9em auto 0;
  font-size: 0.36em;
  line-height: 1.6;
  color: var(--ink-faded);
  text-align: left;
}

/* Guided-setup checklist below the caption. Same 720px column as the
   terminal so install + caption + checklist read as one tight block. */
.quickstart-checklist {
  list-style: none;
  max-width: 720px;
  margin: 0.5em auto 0;
  padding: 0;
  font-size: 0.36em;
  line-height: 1.6;
  color: var(--ink-soft);
}
.quickstart-checklist li {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  padding: 0.18em 0;
}
.quickstart-checklist li::before {
  content: "";
  flex-shrink: 0;
  width: 0.95em;
  height: 0.95em;
  border: 1px solid var(--ink-faded);
  border-radius: 3px;
  background: transparent;
  transform: translateY(0.05em);
}

.pitch code,
.prose code,
.features code,
.faq-body code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.88em;
  background: var(--paper-2);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--ink);
  border: 1px solid var(--rule);
}

.block {
  margin: 56px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.section-label {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 60;
  font-size: 0.72em;
  line-height: 1.15;
  letter-spacing: -0.012em;
  text-transform: none;
  color: var(--ink);
  margin: 0 0 28px;
  font-weight: 500;
}

.prose {
  font-size: 0.4em;
  line-height: 1.75;
  color: var(--ink-soft);
}

.prose + .prose { margin-top: 0.85em; }

.prose em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent-dark);
  font-size: 1.04em;
}

.code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.34em;
  line-height: 1.7;
  color: var(--ink-soft);
  background: none;
  border-left: 2px solid var(--accent);
  padding: 0.1em 0 0.1em 1.1em;
  overflow-x: auto;
  white-space: pre;
  max-width: 60ch;
}

.features {
  font-size: 0.4em;
  line-height: 1.75;
  color: var(--ink-soft);
  list-style: none;
}

.features li {
  padding: 0.45em 0;
  border-bottom: 1px solid var(--rule);
}

.features li:last-child { border-bottom: none; }

.features li strong {
  font-weight: 500;
  color: var(--ink);
}

.no-list {
  font-size: 0.4em;
  line-height: 1.75;
  color: var(--ink-soft);
  list-style: none;
  margin: 0.4em 0 0;
  padding: 0;
}

.no-list li {
  display: flex;
  align-items: baseline;
  gap: 0.7em;
  padding: 0.15em 0;
}

.no-list li::before {
  content: "✕";
  flex-shrink: 0;
  color: var(--accent);
  font-size: 0.85em;
  line-height: 1;
  transform: translateY(0.05em);
}

.feature-icon {
  display: inline-block;
  width: 1.5em;
  font-size: 1.1em;
  line-height: 1;
  margin-right: 0.35em;
  vertical-align: -0.05em;
  text-align: center;
}

/* Use-cases — 3x2 grid of self-contained cards. Each card heads with a
   line icon, the title, and a prominent .mailbox chip so the visitor sees
   "this is the address AIMX gives you for that workflow" at a glance.
   Layout: 3 columns at lg+, 2 at md, 1 below. */
.usecase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (min-width: 768px)  { .usecase-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px)  { .usecase-grid { grid-template-columns: repeat(3, 1fr); } }

.usecase-card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 0.85em;
  transition: border-color 0.15s, transform 0.15s;
}
.usecase-card:hover {
  border-color: var(--ink-faded);
  transform: translateY(-1px);
}

.usecase-card-head {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.6em;
  row-gap: 0.35em;
  align-items: baseline;
}
.usecase-card-icon {
  grid-row: 1 / span 2;
  align-self: center;
  width: 0.9em;
  height: 0.9em;
  color: var(--ink-faded);
  transition: color 0.15s;
}
.usecase-card-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.usecase-card:hover .usecase-card-icon {
  color: var(--ink-soft);
}
.usecase-card-head h3 {
  grid-column: 2;
  grid-row: 1;
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 30;
  font-weight: 500;
  font-size: 0.5em;
  line-height: 1.2;
  color: var(--ink);
  margin: 0;
}
.usecase-card-head .mailbox {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  /* Keep the chip on a single line at every viewport — the placeholder
     `<YOUR_DOMAIN>` is the bit that gets truncated when the card grid
     goes to 2 cols around 768–880px. */
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The mailbox chip — the user-facing AIMX address. Bold, accent-tinted,
   monospaced; visually the "diff" each card argues for. */
.mailbox {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.34em;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--accent-dark);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.usecase-lede {
  font-size: 0.36em;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}
.usecase-card ul {
  list-style: none;
  padding: 0;
  margin: 0.2em 0 0;
  font-size: 0.34em;
  line-height: 1.6;
  color: var(--ink-soft);
}
.usecase-card li {
  padding-left: 1.1em;
  position: relative;
  padding-bottom: 0.2em;
}
.usecase-card li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.usecase-card code:not(.mailbox) {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.92em;
  background: var(--paper);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--ink);
  border: 1px solid var(--rule);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
  margin: 40px auto 0;
  justify-content: center;
}

.btn {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.4em;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.7em 1.3em;
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.btn-icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: -0.12em;
}

.btn::after {
  content: "→";
  color: var(--accent);
  font-weight: 500;
  margin-left: 0.05em;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn.primary::after { color: var(--accent); }

.btn.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

.btn.primary:hover::after { color: var(--paper); }

.btn.discord {
  background: #5865F2;
  border-color: #5865F2;
  color: #fff;
}

.btn.discord::after { color: #fff; }

.btn.discord:hover {
  background: #4752C4;
  border-color: #4752C4;
  color: #fff;
}

.btn.discord:hover::after { color: #fff; }

/* Terminal mockup — used for the hero "demo" and Quick start. Dark slate
   on cream paper produces a deliberate moment of contrast that reads
   instantly as "this is a terminal". The traffic-light dots and label
   borrow macOS's window chrome; mint $ prompts make commands scannable. */
.terminal {
  background: #0F1525;
  border-radius: 12px;
  font-family: 'IBM Plex Mono', monospace;
  max-width: 720px;
  margin: 0 auto;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.18),
    0 14px 36px rgba(0, 0, 0, 0.22);
}

.block .terminal {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.terminal + .terminal {
  margin-top: 18px;
}

.terminal-header {
  display: flex;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(237, 228, 211, 0.07);
}

.terminal-dots {
  display: inline-flex;
  gap: 8px;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.terminal-dot.red    { background: #FF5F56; }
.terminal-dot.yellow { background: #FFBD2E; }
.terminal-dot.green  { background: #27C93F; }

.terminal-label {
  margin-left: 16px;
  color: rgba(237, 228, 211, 0.42);
  font-size: 0.32em;
  letter-spacing: 0.04em;
  font-weight: 400;
}

.terminal-copy {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(237, 228, 211, 0.06);
  color: rgba(237, 228, 211, 0.6);
  border: 1px solid rgba(237, 228, 211, 0.12);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.3em;
  letter-spacing: 0.04em;
  line-height: 1;
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.terminal-copy:hover {
  color: #EDE4D3;
  background: rgba(237, 228, 211, 0.1);
  border-color: rgba(237, 228, 211, 0.22);
}

.terminal-copy:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.terminal-copy.is-copied {
  color: #4ADE80;
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.1);
}

.terminal-body {
  padding: 22px 24px 20px;
  font-size: 0.36em;
  line-height: 1.95;
  color: #EDE4D3;
  overflow-x: auto;
  white-space: pre;
}

.terminal-line {
  display: block;
}

.terminal-line + .terminal-line { margin-top: 0; }

.terminal-prompt {
  color: #4ADE80;
  margin-right: 12px;
  user-select: none;
}

.terminal-out {
  color: rgba(237, 228, 211, 0.6);
  padding-left: 22px;
}

.terminal-comment {
  color: rgba(237, 228, 211, 0.4);
  font-style: italic;
  user-select: none;
}

/* Harness grid — logo + name only. 4 across at md+, 2 below md.
   Lead tagline (with aimx agents setup) sits above the grid; closing tagline sits below. */
.harness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;       /* every row matches the tallest row's height */
  gap: 16px;
  margin: 12px 0 0;
}
/* 3 cols starting at 576px (where .wrap becomes 540 max-width) — keeps
   8 tiles to a tidy 3×3 with one empty cell. */
@media (min-width: 576px) {
  .harness-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .harness-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.harness-tile {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 22px 20px 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  color: var(--ink);
  background: var(--paper-2);
  transition: border-color 0.15s, color 0.15s, transform 0.15s, background-color 0.15s;
}
.harness-tile:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.harness-tile-icon {
  width: 56px;
  height: 56px;
  padding: 8px;
  background: var(--icon-card-bg);
  border-radius: 10px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}
.harness-tile-name {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 24;
  font-weight: 500;
  font-size: 0.5em;
  display: block;
  line-height: 1.2;
}

.harness-tagline {
  margin: 22px 0 0;
  font-size: 0.36em;
  line-height: 1.6;
  color: var(--ink-faded);
  text-align: left;
}
.harness-tagline code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95em;
  background: var(--paper-2);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--ink);
  border: 1px solid var(--rule);
}

.compare-wrap {
  margin: 14px 0 0;
  overflow-x: auto;
}
.compare {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 0.36em;
  width: 100%;
  border-collapse: collapse;
}
.compare th, .compare td {
  padding: 0.7em 0.6em;
  vertical-align: middle;
  color: var(--ink-soft);
  border: none;
}
.compare th {
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95em;
  text-align: center;
  line-height: 1.25;
}
.compare th:first-child { text-align: left; }
.compare td { text-align: center; }
.compare td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.compare .compare-sub {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78em;
  color: var(--ink-faded);
  font-weight: 400;
  letter-spacing: 0;
  margin-top: 2px;
}
.compare th.aimx-col,
.compare td.aimx-col {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--ink);
  font-weight: 500;
}
.compare th.aimx-col { color: var(--accent); }
.compare th.aimx-col:first-of-type,
.compare tbody tr:first-child td.aimx-col {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.compare tbody tr:last-child td.aimx-col {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}
.compare .cell-yes,
.compare .cell-no,
.compare .cell-meh {
  font-size: 1.1em;
  line-height: 1;
}
.compare .compare-note {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78em;
  color: var(--ink-faded);
  font-weight: 400;
  letter-spacing: 0;
  margin-top: 2px;
}
.compare td.aimx-col.cell-yes { font-size: 1.2em; }
.compare tr + tr td { border-top: 1px solid var(--rule); }

/* Mobile-only stacked-card rendering of the comparison data. The desktop
   <table> stays in the DOM for assistive tech and print; below 640px we
   swap it out for a column of cards (AIMX first, accent-tinted) so the
   punchline column never lives behind a horizontal scroll. */
.compare-cards { display: none; }
@media (max-width: 640px) {
  .compare-wrap { display: none; }
  .compare-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
  }
}
.compare-card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px 18px 12px;
}
.compare-card.aimx {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--rule));
  background: color-mix(in srgb, var(--accent) 8%, var(--paper-2));
}
.compare-card-title {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 30;
  font-weight: 500;
  font-size: 0.5em;
  line-height: 1.2;
  color: var(--ink);
  display: block;
  margin-bottom: 0.45em;
}
.compare-card.aimx .compare-card-title { color: var(--accent); }
.compare-card-title .compare-card-sub {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62em;
  color: var(--ink-faded);
  font-weight: 400;
  letter-spacing: 0;
  margin-top: 2px;
}
.compare-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.4em;
  line-height: 1.5;
}
.compare-card li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 0.45em 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
}
.compare-card li:last-child { border-bottom: none; }
.compare-card li > span:last-child {
  flex-shrink: 0;
  text-align: right;
}
.compare-card .compare-note {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78em;
  color: var(--ink-faded);
  font-weight: 400;
  letter-spacing: 0;
  margin-top: 2px;
}

.demo-block { text-align: center; }
.demo-caption {
  max-width: 56ch;
  margin: 0 auto 1.4em;
}
.demo-figure {
  margin: 0 auto;
  max-width: 800px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper-2);
  padding: 8px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.18),
    0 14px 36px rgba(0, 0, 0, 0.18);
}
.demo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
:root[data-theme="light"] .demo-figure {
  box-shadow:
    0 1px 2px rgba(21, 19, 16, 0.08),
    0 12px 28px rgba(21, 19, 16, 0.10);
}

.faq details {
  border-bottom: 1px solid var(--rule);
  padding: 0.85em 0;
}
.faq details:first-of-type { padding-top: 0.4em; }
.faq summary {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 24;
  font-weight: 400;
  font-size: 0.5em;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
  line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--accent);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85em;
  flex-shrink: 0;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--accent); }
.faq-body {
  font-size: 0.4em;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-top: 0.7em;
}
/* Inline links inside content blocks — unified treatment */
.prose a,
.features a,
.faq-body a,
.caution a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  transition: color 0.15s, border-color 0.15s;
}
.prose a:hover,
.features a:hover,
.faq-body a:hover,
.caution a:hover {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
}
.prose a code,
.features a code,
.faq-body a code,
.caution a code {
  color: inherit;
}

.caution {
  margin: 28px auto 0;
  padding: 0.75em 1em;
  border: 1px solid var(--accent);
  border-left-width: 4px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  font-size: 0.4em;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

.small {
  font-size: 0.72em;
  color: var(--ink-faded);
}

.caution .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}

.caution strong { color: var(--ink); font-weight: 500; }

/* Bottom call-to-action — sits above the footer on every page. Same
   centered, narrow column that hero uses, so the page closes the way
   it opened. The button on the homepage scrolls back to #top; on book
   pages it routes to the homepage hero (set per-page or via theme). */
.page-cta {
  text-align: center;
}
.page-cta .cta-heading {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 60;
  font-weight: 500;
  font-size: 0.85em;
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0 0 0.4em;
}
.page-cta .cta-sub {
  font-size: 0.4em;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 auto 1.6em;
  max-width: 60ch;
}
.page-cta .cta-btn {
  margin: 0 auto;
}

footer {
  padding: 24px 0 8px;
  border-top: 1px solid var(--rule);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.4em;
  color: var(--ink-faded);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  letter-spacing: 0.02em;
}

footer a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

footer a:hover {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
}

/* Phablet / small-tablet tier — tighten the cramped 561–767px band that
   previously inherited desktop sizing inside a 540px container. */
@media (max-width: 767px) {
  .mascot { width: 220px; margin-bottom: 28px; }
  h1 { font-size: 1.15em; }
  .pitch { font-size: 0.39em; }
  .section-label { font-size: 0.66em; }
  footer { gap: 16px; }
}

@media (max-width: 560px) {
  .wrap { padding: 24px 20px 28px; }
  main { padding: 40px 0 32px; }
  h1 { font-size: 1em; }
  .mascot { width: 200px; margin-bottom: 24px; }
  .pitch, .prose, .features, .faq-body { font-size: 0.38em; }
  .block { margin-top: 40px; padding-top: 24px; }
  .demo-figure { padding: 4px; border-radius: 8px; }
  .detail { margin-top: 40px; }
  .theme-toggle { font-size: 0.3em; }
}

/* ===== Grid system =========================================================
   12-col CSS Grid + span helpers. Zero dependency, ~30 lines.
   Use:
       <div class="grid">
         <div class="col-6">left half</div>
         <div class="col-6">right half</div>
       </div>
   Below 640px, every cell collapses to full width.
   Override --grid-gap on a specific .grid for a different gap.
   ========================================================================= */
:root { --grid-gap: 16px; }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--grid-gap);
}

.col-1  { grid-column: span 1;  }
.col-2  { grid-column: span 2;  }
.col-3  { grid-column: span 3;  }
.col-4  { grid-column: span 4;  }
.col-5  { grid-column: span 5;  }
.col-6  { grid-column: span 6;  }
.col-7  { grid-column: span 7;  }
.col-8  { grid-column: span 8;  }
.col-9  { grid-column: span 9;  }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }

@media (max-width: 640px) {
  [class*="col-"] { grid-column: span 12; }
}
