/* ON1 / demo — "blueprint engineering" aesthetic.
   Off-white paper, technical-pen ink, measurement annotations,
   drafting compass marks. Distinct from every other ON1 surface. */

:root {
  --paper: #f4efe3;          /* warm off-white drafting paper */
  --paper-shade: #ecdfc6;    /* slight tonal shift */
  --ink: #1d3a55;            /* drafting-pen blueprint blue */
  --ink-soft: #4a6480;       /* secondary line weight */
  --ink-faint: #5c7288;      /* grid lines, faint annotations (AA-bumped for body/caption use) */
  --rust: #b03020;           /* red detail (compass center, alerts) */
  --rust-soft: #c84a36;
  --amber: #b56f1a;          /* warm accent (figure callouts) */
  --moss: #4e6b3a;           /* green accent (idle/ok markers) */
  --bg: var(--paper);
  --fg: var(--ink);
  --bg-card: #fbf6ea;
  --bg-card-2: #efe5cd;
  --border: rgba(29, 58, 85, 0.22);
  --border-strong: rgba(29, 58, 85, 0.55);

  --display: "Chakra Petch", "IBM Plex Mono", monospace;
  --body: "Familjen Grotesk", system-ui, sans-serif;
  --mono: "IBM Plex Mono", monospace;

  --rad: 2px;
  --sheet-pad: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

/* no-JS fallback sheet — keeps the page meaningful + reassuring without scripts */
.noscript-sheet {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: clamp(24px, 5vw, 64px) auto;
  padding: var(--sheet-pad);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--rad);
  box-shadow: 0 1px 0 rgba(29, 58, 85, 0.08);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}
.noscript-sheet strong { color: var(--rust); }
.noscript-sheet a { color: var(--ink); text-decoration: underline; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

body {
  /* drafting grid background */
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--ink-faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-faint) 1px, transparent 1px);
  background-size: 32px 32px;
  background-attachment: fixed;
  background-blend-mode: multiply;
  /* tone down the grid */
  position: relative;
}

/* faint paper grain over the grid */
.paper-grain {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(176, 48, 32, 0.04), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(29, 58, 85, 0.05), transparent 50%);
  opacity: 0.85;
}

main { position: relative; z-index: 1; }

a { color: var(--ink); }
.inline-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rust);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.inline-link:hover { color: var(--rust); }

code, .mono { font-family: var(--mono); font-size: 0.92em; }

/* ============ TOPNAV ============ */
.topnav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(244, 239, 227, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-strong);
}
.logo {
  display: inline-flex; align-items: baseline; gap: 8px;
  text-decoration: none; color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.04em;
}
.logo-compass {
  display: inline-block;
  font-size: 22px;
  color: var(--rust);
  transform: translateY(2px);
}
.topnav-links {
  display: flex; gap: 18px; margin-left: 8px;
  font-family: var(--mono);
  font-size: 13px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
}
.topnav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 4px 2px;
  border-bottom: 1px dashed transparent;
}
.topnav-links a:hover {
  color: var(--ink);
  border-bottom-color: var(--rust);
}
.topnav-cta { margin-left: auto; }
.fixture-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  border: 1px dashed var(--rust);
  background: rgba(176, 48, 32, 0.06);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--rust);
  text-transform: uppercase;
}
.fixture-pill-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rust);
  animation: pulse-rust 2s infinite ease-in-out;
}
@keyframes pulse-rust {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

@media (max-width: 720px) {
  .topnav { flex-wrap: wrap; }
  .topnav-links { order: 3; width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .topnav-cta { margin-left: auto; }
}

/* ============ SHEET (section frame) ============ */
.sheet {
  position: relative;
  max-width: 1100px;
  margin: 56px auto;
  padding: var(--sheet-pad);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 1px 0 var(--paper),
    0 0 0 1px rgba(29, 58, 85, 0.06) inset,
    8px 8px 0 rgba(29, 58, 85, 0.05);
}
.sheet::before,
.sheet::after {
  /* drafting tick marks at the corners */
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid var(--ink);
  border-right: none; border-bottom: none;
  top: 8px; left: 8px;
  pointer-events: none;
}
.sheet::after {
  bottom: 8px; right: 8px;
  top: auto; left: auto;
  border: 1px solid var(--ink);
  border-left: none; border-top: none;
}
.sheet-corner {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  display: flex; gap: 6px;
  text-transform: uppercase;
}
.sheet-corner-tl { top: 14px; left: 30px; }
.sheet-corner-tr { top: 14px; right: 30px; }
.sheet-corner-br { bottom: 14px; right: 30px; }
.corner-label { color: var(--ink-faint); }
.corner-value { color: var(--ink); font-weight: 500; }

/* ============ HERO ============ */
.hero-sheet {
  position: relative;
  overflow: hidden;
  margin-top: 36px;
  padding-top: clamp(48px, 6vw, 80px);
}
.hero-sheet > :not(.demo-waver) {
  position: relative;
  z-index: 1;
}
.demo-waver {
  position: absolute;
  right: clamp(-180px, -10vw, -70px);
  top: clamp(24px, 7vw, 72px);
  width: min(560px, 58vw);
  aspect-ratio: 1;
  opacity: 0.42;
  pointer-events: none;
  z-index: 0;
  filter: saturate(1.2) contrast(1.04);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--rust);
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--rust);
  background: rgba(176, 48, 32, 0.04);
}
.eyebrow-tick { color: var(--rust); }

.hero-title {
  font-family: var(--display);
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.05;
  margin: 24px 0 16px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.title-mark {
  color: var(--rust);
  text-decoration: underline;
  text-decoration-style: double;
  text-decoration-color: var(--rust);
  text-underline-offset: 6px;
}
.title-sub {
  font-family: var(--body);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0;
  display: block;
  margin-top: 8px;
}
.hero-lede {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
}

/* architecture figure */
.arch-fig {
  margin: 32px 0 0;
  padding: 0;
}
.arch-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--paper);
  border: 1px solid var(--border-strong);
  overflow: hidden;
}
.arch-stage svg { width: 100%; height: 100%; display: block; }
.arch-loading,
.chat-loading,
.hex-loading,
.aedl-loading,
.bundle-loading,
.money-loading,
.tenders-loading,
.matrix-loading,
.usecases-loading,
.launch-loading,
.pillars-loading {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  padding: 18px;
  margin: 0;
  letter-spacing: 0.04em;
}
.arch-cap {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.cap-mark { color: var(--amber); margin-right: 6px; font-weight: 500; }
.arch-detail {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--bg-card-2);
  border-left: 3px solid var(--rust);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  min-height: 38px;
}

/* arch SVG node styles (set via JS via class) */
.arch-node-bg { fill: var(--paper); stroke: var(--ink); stroke-width: 1.2; cursor: pointer; transition: fill 0.15s; }
.arch-node-bg:hover { fill: var(--bg-card-2); }
.arch-node-bg.is-active { fill: rgba(176, 48, 32, 0.15); stroke: var(--rust); stroke-width: 1.8; }
.arch-node-label { font-family: var(--mono); font-size: 11px; fill: var(--ink); pointer-events: none; }
.arch-node-port { font-family: var(--mono); font-size: 9px; fill: var(--ink-soft); pointer-events: none; }
.arch-link { stroke: var(--ink-soft); stroke-width: 1; fill: none; stroke-dasharray: 3 3; }
.arch-axis { stroke: var(--ink-faint); stroke-width: 0.6; }
.arch-axis-label { font-family: var(--mono); font-size: 9px; fill: var(--ink-faint); }

/* ============ SECTION HEAD ============ */
.sec-head {
  display: flex; gap: 16px; align-items: flex-start;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 28px;
}
.sec-no {
  font-family: var(--display);
  font-size: 28px;
  color: var(--rust);
  line-height: 1;
  min-width: 56px;
}
.sec-title {
  margin: 0 0 6px;
  font-family: var(--body);
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: -0.005em;
  color: var(--ink);
}
.sec-blurb {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}
@media (max-width: 540px) {
  .sec-head { flex-direction: column; gap: 6px; }
  .sec-no { font-size: 22px; }
}

/* ============ CHAT FRAME (Nucolai) ============ */
.chat-frame {
  border: 1px solid var(--border-strong);
  background: var(--paper);
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.chat-frame-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.chat-dot { width: 8px; height: 8px; border-radius: 50%; }
.chat-dot-r { background: var(--rust); }
.chat-dot-y { background: var(--amber); }
.chat-dot-g { background: var(--moss); }
.chat-title { margin-left: 4px; flex: 1; }
.chat-meta { color: rgba(244,239,227,0.7); }

.chat-log {
  padding: 18px;
  min-height: 280px;
  max-height: 460px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
}

.chat-msg {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  font-size: 14px;
  line-height: 1.55;
}
.chat-msg .who {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 2px;
}
.chat-msg.user .who { color: var(--amber); }
.chat-msg.bot  .who { color: var(--rust); }
.chat-msg .bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 10px 14px;
}
.chat-msg.user .bubble {
  background: var(--paper-shade);
}
.chat-msg .body { margin: 0 0 8px; color: var(--ink); }
.chat-msg .cites {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
}
.chat-cite {
  display: inline-flex; gap: 4px;
  padding: 2px 8px;
  background: rgba(29, 58, 85, 0.08);
  border: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
}
.chat-cite .cite-tag { color: var(--rust); }

.chat-controls {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
.chat-btn {
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 14px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  letter-spacing: 0.04em;
}
.chat-btn:hover { background: var(--ink); color: var(--paper); }
.chat-btn.ghost {
  border-color: var(--border-strong);
  color: var(--ink-soft);
}
.chat-note {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============ HEX TREE PREVIEW ============ */
.hex-stage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  padding: 8px 0;
}
.hex-card {
  position: relative;
  padding: 18px 16px;
  background: var(--paper);
  border: 1px solid var(--border-strong);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform 0.18s, border-color 0.18s;
}
.hex-card:hover {
  border-color: var(--rust);
  transform: translateY(-2px);
}
.hex-card .hex-mark {
  font-family: var(--display);
  font-size: 26px;
  color: var(--rust);
  line-height: 1;
}
.hex-card .hex-title {
  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  margin-top: 4px;
}
.hex-card .hex-blurb {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.hex-card .hex-tag {
  position: absolute;
  top: 8px; right: 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

/* ============ AEDL ============ */
.aedl-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  background: var(--paper);
  border: 1px solid var(--border-strong);
  overflow: hidden;
}
.aedl-stage svg { width: 100%; height: 100%; display: block; }
.aedl-node { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; transition: fill 0.3s, stroke 0.3s; }
.aedl-node.is-active { fill: var(--rust); stroke: var(--rust); }
.aedl-node-label { font-family: var(--mono); font-size: 10px; fill: var(--ink); pointer-events: none; }
.aedl-edge { stroke: var(--ink-faint); stroke-width: 0.8; fill: none; }
.aedl-pulse { fill: var(--amber); stroke: var(--ink); stroke-width: 0.8; }
.aedl-legend {
  list-style: none; padding: 0; margin: 16px 0 0;
  display: flex; flex-wrap: wrap; gap: 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}
.legend-dot {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  border: 1px solid var(--ink);
}
.dot-idle   { background: var(--paper); }
.dot-active { background: var(--rust); border-color: var(--rust); }
.dot-flow   { background: var(--amber); }

/* ============ BUNDLES ============ */
.bundle-stage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.bundle-card {
  background: var(--paper);
  border: 1px solid var(--border-strong);
  padding: 22px 20px 18px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
}
.bundle-card.featured {
  border-color: var(--rust);
  background: var(--bg-card);
}
.bundle-card.featured::before {
  content: "RECOMMENDED";
  position: absolute;
  top: -10px; left: 16px;
  background: var(--rust);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 2px 8px;
}
.bundle-tier {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.bundle-name {
  font-family: var(--display);
  font-size: 22px;
  color: var(--ink);
  margin: 0;
}
.bundle-price {
  font-family: var(--mono);
  font-size: 22px;
  color: var(--rust);
  font-weight: 500;
}
.bundle-price .sats {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.bundle-list {
  list-style: none; padding: 0; margin: 6px 0 0;
  font-size: 13px;
  color: var(--ink);
  display: flex; flex-direction: column; gap: 6px;
}
.bundle-list li {
  padding-left: 16px;
  position: relative;
  line-height: 1.4;
}
.bundle-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--rust);
  font-size: 10px;
  top: 2px;
}
.bundle-foot {
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
}
.bundle-foot-mark { color: var(--rust); margin-right: 6px; }

/* ============ MONEY ============ */
.money-stage {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
}
@media (max-width: 840px) {
  .money-stage { grid-template-columns: 1fr; }
}

.money-surfaces {
  display: flex; flex-direction: column;
  gap: 10px;
}
.money-row {
  display: grid;
  grid-template-columns: 130px 1fr 96px 70px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--border);
}
.money-row .surface-name {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.money-bar {
  position: relative;
  height: 14px;
  background: var(--paper-shade);
  border: 1px solid var(--border);
}
.money-bar-fill {
  position: absolute;
  top: 0; bottom: 0;
  left: 0;
  background: var(--rust);
  transition: width 0.8s ease-out;
}
.money-amount {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  text-align: right;
  font-weight: 500;
}
.money-sats {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  text-align: right;
}
@media (max-width: 540px) {
  .money-row {
    grid-template-columns: 100px 1fr 80px;
    grid-template-areas: "name bar amt" "name bar sats";
    row-gap: 4px;
  }
  .money-row .surface-name { grid-area: name; }
  .money-bar { grid-area: bar; }
  .money-amount { grid-area: amt; }
  .money-sats { grid-area: sats; }
}

.money-events {
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.money-events h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 4px;
  color: var(--ink-soft);
}
.money-event {
  display: flex; flex-direction: column;
  gap: 2px;
  padding: 6px 0;
  border-top: 1px dashed var(--border);
  font-family: var(--mono);
  font-size: 12px;
}
.money-event:first-of-type { border-top: 0; padding-top: 2px; }
.money-event .ev-time { color: var(--ink-faint); font-size: 10px; }
.money-event .ev-kind { color: var(--rust); }
.money-event .ev-amt  { color: var(--ink); font-weight: 500; }

.money-summary {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--bg-card-2);
  border-left: 3px solid var(--moss);
  font-family: var(--mono);
  font-size: 12px;
}

/* ============ TENDERS ============ */
.tenders-stage {
  display: flex; flex-direction: column;
  gap: 14px;
}
.tender-row {
  display: grid;
  grid-template-columns: 90px 1fr 110px 90px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--border-strong);
}
.tender-score {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 64px; height: 64px;
  border: 2px solid var(--rust);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 20px;
  color: var(--rust);
}
.tender-body h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.tender-body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.tender-body .tender-meta {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tender-amount {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  text-align: right;
  font-weight: 500;
}
.tender-amount .tender-currency {
  display: block;
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
  margin-top: 2px;
}
.tender-deadline {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--rust-soft);
  text-align: right;
}
@media (max-width: 720px) {
  .tender-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .tender-amount, .tender-deadline { text-align: left; }
}

/* ============ MATRIX ============ */
.matrix-stage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.matrix-cell {
  position: relative;
  display: flex; gap: 12px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--border);
  align-items: flex-start;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.matrix-cell:hover {
  border-color: var(--rust);
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 rgba(176, 48, 32, 0.08);
}
.matrix-cell:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 2px;
  border-color: var(--rust);
}
.matrix-cell.is-active {
  border-color: var(--rust);
  background: rgba(176, 48, 32, 0.06);
  box-shadow: 3px 3px 0 rgba(176, 48, 32, 0.10);
}
.matrix-cell.is-active .matrix-chevron {
  transform: rotate(90deg);
  color: var(--rust);
}
.matrix-chevron {
  position: absolute;
  top: 12px; right: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  transition: transform 0.18s, color 0.18s;
}
.matrix-icon {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: 20px;
  color: var(--rust);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  flex-shrink: 0;
}
.matrix-text strong {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}
.matrix-text span {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.matrix-text .matrix-port {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  margin-top: 4px;
  letter-spacing: 0.06em;
}

.matrix-detail {
  margin-top: 18px;
  background: var(--paper);
  border: 1px solid var(--rust);
  padding: 18px 20px;
  position: relative;
  animation: matrix-detail-in 0.2s ease-out;
}
@keyframes matrix-detail-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.matrix-detail-head {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 12px;
}
.matrix-detail-icon {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: 22px;
  color: var(--rust);
  border: 1px solid var(--rust);
  background: var(--bg-card);
  flex-shrink: 0;
}
.matrix-detail-name {
  display: flex; flex-direction: column; gap: 2px; flex: 1;
}
.matrix-detail-name strong {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--ink);
}
.matrix-detail-port {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}
.matrix-detail-close {
  width: 28px; height: 28px;
  border: 1px solid var(--ink-soft);
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.matrix-detail-close:hover { background: var(--ink); color: var(--paper); }
.matrix-detail-close:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 2px;
}
.matrix-detail-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 14px;
}
.matrix-detail-example-head {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--amber);
  margin-bottom: 4px;
}
.matrix-detail-example {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--paper-shade);
  border-left: 3px solid var(--amber);
  padding: 10px 14px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
  margin: 0;
  line-height: 1.5;
}

/* ============ PILLARS ============ */
.pillars-stage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
.pillar-card {
  position: relative;
  padding: 22px 18px 18px;
  background: var(--paper);
  border: 1px solid var(--border-strong);
}
.pillar-icon {
  font-family: var(--display);
  font-size: 26px;
  color: var(--rust);
  line-height: 1;
}
.pillar-name {
  margin: 14px 0 6px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-transform: uppercase;
}
.pillar-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.pillar-card .pillar-num {
  position: absolute;
  top: 8px; right: 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}

/* ============ FOOTER ============ */
.foot {
  max-width: 1100px;
  margin: 80px auto 64px;
  padding: 28px var(--sheet-pad);
  border-top: 2px solid var(--ink);
  position: relative;
}
.foot::before {
  content: "";
  position: absolute;
  top: -6px; left: 0;
  width: 80px; height: 10px;
  background: var(--rust);
}
.foot-band {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.foot-left, .foot-right {
  display: inline-flex; align-items: center; gap: 8px;
}
.foot-right { margin-left: auto; }
.muted { color: var(--ink-faint); }
.sep { color: var(--ink-faint); }
.foot-contact {
  margin: 18px 0 4px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}
.foot-mail {
  font-family: var(--mono);
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  padding: 2px 8px;
  color: var(--ink);
}
.foot-tiny {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  margin: 4px 0 0;
  letter-spacing: 0.02em;
}

/* ============ VARIOUS ============ */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============ MONEY CONTROLS + TOOLTIP ============ */
.money-controls {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.money-controls .chat-btn { padding: 4px 12px; font-size: 11px; }

.money-event {
  cursor: default;
  transition: background 0.15s;
  padding: 8px 10px !important;
  margin: 0 -10px;
  border-radius: var(--rad);
}
.money-event:hover,
.money-event:focus-visible {
  background: var(--paper-shade);
  outline: none;
}
.money-event:focus-visible { box-shadow: inset 2px 0 0 var(--rust); }

.money-sheet { position: relative; }

.money-tooltip {
  position: absolute;
  z-index: 5;
  max-width: 360px;
  min-width: 220px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(29, 58, 85, 0.18);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  pointer-events: none;
  animation: mtt-in 0.16s ease-out;
}
@keyframes mtt-in {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}
.money-tooltip[hidden] { display: none; }
.money-tooltip .mtt-head {
  display: flex; justify-content: space-between; gap: 12px;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px dashed rgba(244, 239, 227, 0.3);
}
.money-tooltip .mtt-kind { color: var(--rust-soft); letter-spacing: 0.06em; }
.money-tooltip .mtt-ts   { color: rgba(244, 239, 227, 0.55); font-size: 10px; }
.money-tooltip .mtt-body { display: flex; flex-direction: column; gap: 4px; }
.money-tooltip .mtt-row  { display: flex; gap: 10px; }
.money-tooltip .mtt-key  {
  flex-shrink: 0;
  width: 60px;
  color: rgba(244, 239, 227, 0.55);
  text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 9px; padding-top: 2px;
}
.money-tooltip .mtt-val { color: var(--paper); }

/* ============ AEDL PROVIDER MESH ============ */
.aedl-providers {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px dashed var(--border);
}
.aedl-providers-head {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.aedl-providers-head .cap-mark { color: var(--amber); margin-right: 4px; }
.aedl-providers-stage {
  width: 100%;
  aspect-ratio: 16 / 8;
  max-height: 280px;
  background: var(--paper);
  border: 1px solid var(--border);
  overflow: hidden;
}
.aedl-providers-stage svg { width: 100%; height: 100%; display: block; }
.aedl-providers-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
}

.aedl-dispatch { fill: var(--rust); stroke: var(--ink); stroke-width: 1.4; }
.aedl-dispatch-label {
  font-family: var(--display);
  font-size: 11px;
  fill: var(--paper);
}
.aedl-prov-edge {
  stroke: var(--ink-soft);
  stroke-width: 1.1;
  stroke-dasharray: 4 5;
  fill: none;
  animation: aedl-dash 2.6s linear infinite;
}
@keyframes aedl-dash {
  to { stroke-dashoffset: -90; }
}
.aedl-prov-circle {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.4;
  transition: fill 0.2s, stroke 0.2s;
}
.aedl-prov-node:hover .aedl-prov-circle {
  fill: var(--bg-card);
  stroke: var(--rust);
}
.aedl-prov-sigil {
  font-family: var(--display);
  font-size: 14px;
  fill: var(--ink);
  pointer-events: none;
}
.aedl-prov-label {
  font-family: var(--mono);
  font-size: 10px;
  fill: var(--ink-soft);
  letter-spacing: 0.04em;
  pointer-events: none;
}

/* ============ LAUNCHPAD (real surfaces) ============ */
.launch-stage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 14px;
}
.launch-card {
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 16px 16px 18px;
  background: var(--paper);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--ink-soft);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.launch-card:hover {
  transform: translateY(-2px);
  border-color: var(--rust);
  border-left-color: var(--rust);
  box-shadow: 4px 4px 0 rgba(176, 48, 32, 0.08);
}
.launch-card:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 2px;
  border-color: var(--rust);
}
.launch-card-top {
  display: flex; align-items: center; gap: 10px;
}
.launch-glyph {
  font-family: var(--display);
  font-size: 20px;
  color: var(--rust);
  line-height: 1;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  flex-shrink: 0;
}
.launch-name {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
  font-weight: 500;
  flex: 1;
}
.launch-badge {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid currentColor;
  flex-shrink: 0;
}
.launch-badge.open  { color: var(--moss); }
.launch-badge.gated { color: #90560f; }   /* AA-clearing amber on paper */
.launch-blurb {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.launch-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 2px;
}
.launch-href {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.launch-arrow {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-faint);
  transition: transform 0.18s, color 0.18s;
}
.launch-card:hover .launch-arrow {
  transform: translateX(3px);
  color: var(--rust);
}
.launch-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  margin: 20px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}
.launch-foot-mark { color: var(--rust); }
.launch-key {
  display: inline-flex; align-items: center; gap: 7px;
}
.launch-foot .launch-badge { color: var(--moss); }
.launch-foot .launch-badge.gated { color: var(--amber); }
@media (max-width: 540px) {
  .launch-stage { grid-template-columns: 1fr; }
}

/* ============ USE CASES ============ */
.usecases-stage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.usecase-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 20px 18px;
  background: var(--paper);
  border: 1px solid var(--border-strong);
  position: relative;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.usecase-card:hover {
  transform: translateY(-2px);
  border-color: var(--rust);
  box-shadow: 4px 4px 0 rgba(176, 48, 32, 0.08);
}
.usecase-card::before {
  /* drafting tick on top-left */
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 14px; height: 14px;
  border-top: 2px solid var(--rust);
  border-left: 2px solid var(--rust);
}
.usecase-head {
  display: flex; align-items: center; justify-content: space-between;
}
.usecase-sigil {
  font-family: var(--display);
  font-size: 28px;
  color: var(--rust);
  line-height: 1;
}
.usecase-tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}
.usecase-who {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 4px;
}
.usecase-title {
  margin: 4px 0 6px;
  font-family: var(--body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.usecase-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
}

/* ============ REVEAL ON SCROLL (CSS-only, no observer) ============ */
/* Default: a brief one-shot fade-in on page load — keeps content visible
   for visitors without scroll-driven-animation support, AND ensures
   headless-screenshot tooling captures the chrome. */
.reveal {
  animation: reveal-up 0.6s ease-out 0.05s both;
}
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Modern engines: replace with a per-section view-timeline trigger
   so sections actually slide in as you scroll. */
@supports (animation-timeline: view()) {
  .reveal {
    animation: reveal-up linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }
}

/* ============ KBD STYLE ============ */
kbd {
  font-family: var(--mono);
  font-size: 0.85em;
  padding: 1px 6px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 3px;
  color: var(--ink);
}

/* ============ FOCUS POLISH ============ */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 2px;
  border-radius: 2px;
}

.hex-card { cursor: default; }
.hex-card:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 2px;
}

/* arch nodes — keyboard focus */
.arch-node:focus-visible .arch-node-bg {
  fill: var(--bg-card-2);
  stroke: var(--rust);
  stroke-width: 2;
}

/* ============ MOBILE BREAKPOINTS ============ */
@media (max-width: 720px) {
  .sheet { margin: 32px 12px; }
  .matrix-detail { padding: 14px 16px; }
  .matrix-detail-head { gap: 10px; }
  .matrix-detail-example { font-size: 11px; padding: 8px 10px; }
  .money-controls { flex-wrap: wrap; }
}
@media (max-width: 540px) {
  .sheet {
    margin: 24px 8px;
    padding: clamp(16px, 5vw, 28px);
  }
  .topnav { padding: 10px 12px; gap: 10px; }
  .logo { font-size: 16px; }
  .topnav-links { gap: 14px; font-size: 12px; }
  .fixture-pill { font-size: 10px; padding: 4px 9px; }
  .hero-title { line-height: 1.1; }
  .matrix-stage { grid-template-columns: 1fr; }
  .matrix-detail-example { font-size: 10px; line-height: 1.45; }
  .usecases-stage { grid-template-columns: 1fr; }
  .bundle-stage { grid-template-columns: 1fr; }
  .pillars-stage { grid-template-columns: 1fr; }
  .hex-stage { grid-template-columns: 1fr; }
  .money-tooltip { max-width: calc(100vw - 80px); font-size: 10px; }
}

/* ============ PRINT STYLESHEET ============ */
@media print {
  @page { margin: 14mm; }
  html, body {
    background: #fff !important;
    color: #000 !important;
  }
  body { background-image: none !important; }
  .paper-grain,
  .topnav,
  .chat-controls,
  .money-controls,
  .matrix-chevron,
  .fixture-pill-dot {
    display: none !important;
  }
  .topnav-cta { display: block; }
  .fixture-pill {
    border-color: #000 !important;
    color: #000 !important;
    background: transparent !important;
  }
  .sheet {
    page-break-inside: avoid;
    break-inside: avoid;
    margin: 16mm 0;
    box-shadow: none !important;
    border: 1px solid #000 !important;
    background: #fff !important;
  }
  .sheet::before, .sheet::after {
    border-color: #000 !important;
  }
  .hero-title, .sec-title { color: #000 !important; }
  .title-mark, .sec-no, .hero-eyebrow, .pillar-icon, .hex-mark,
  .usecase-sigil, .matrix-icon, .tender-score {
    color: #000 !important;
  }
  .hero-eyebrow { border-color: #000 !important; }
  .arch-node-bg, .aedl-node, .aedl-prov-circle {
    fill: #fff !important;
    stroke: #000 !important;
  }
  .arch-link, .aedl-edge, .aedl-prov-edge {
    stroke: #555 !important;
    animation: none !important;
  }
  .arch-axis { stroke: #ddd !important; }
  .arch-node-label, .arch-node-port, .aedl-node-label,
  .aedl-prov-sigil, .aedl-prov-label {
    fill: #000 !important;
  }
  .aedl-dispatch { fill: #000 !important; }
  .aedl-dispatch-label { fill: #fff !important; }
  /* reveal sections always visible in print */
  .reveal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  /* matrix detail panel: hide if collapsed, show if open */
  .matrix-detail[hidden] { display: none !important; }
  .matrix-cell { border-color: #000 !important; background: #fff !important; }
  .reveal * { animation: none !important; transition: none !important; }
  /* break before each major section */
  #aedl, #bundle, #money, #tenders, #matrix, #usecases, #launch, #pillars {
    page-break-before: auto;
  }
  a {
    color: #000 !important;
    text-decoration: underline;
  }
  /* don't print loading placeholders if they linger */
  .arch-loading, .chat-loading, .hex-loading, .aedl-loading,
  .bundle-loading, .money-loading, .tenders-loading,
  .matrix-loading, .usecases-loading, .launch-loading,
  .pillars-loading { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .demo-waver { opacity: 0.2; }
  .aedl-prov-edge { stroke-dasharray: 4 5; }
}

@media (max-width: 720px) {
  .demo-waver {
    width: 360px;
    right: -170px;
    top: 38px;
    opacity: 0.24;
  }
}
