:root {
  color-scheme: dark;
  --ink-950: #0a0d12;
  --ink-900: #111721;
  --ink-850: #18202b;
  --ink-700: #303b49;
  --paper-50: #fffaf0;
  --paper-100: #f3ead8;
  --paper-200: #dfd2bc;
  --copper-500: #c77b3c;
  --copper-300: #e8aa6d;
  --signal-400: #63d7d1;
  --signal-700: #167b7a;
  --danger-500: #dc665d;
  --success-500: #52b788;
  --warning-500: #dfaa4c;
  --line-dark: rgba(255, 250, 240, 0.16);
  --line-light: rgba(17, 23, 33, 0.17);
  --content: 1280px;
  --gutter: clamp(20px, 4vw, 68px);
  --serif: Georgia, "Noto Serif TC", "Times New Roman", serif;
  --sans: Inter, "Noto Sans TC", "Segoe UI", system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ink-950);
  color: var(--paper-50);
  font-family: var(--sans);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  content: "";
  opacity: 0.16;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 250, 240, 0.08) 4px),
    repeating-linear-gradient(90deg, transparent 0 5px, rgba(255, 250, 240, 0.05) 6px);
  mix-blend-mode: overlay;
}

.top-anchor {
  position: absolute;
  top: 0;
  width: 1px;
  height: 1px;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--signal-400);
  outline-offset: 4px;
}

::selection {
  color: var(--ink-950);
  background: var(--signal-400);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--ink-950);
  background: var(--signal-400);
  font-weight: 800;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line-dark);
  background: rgba(10, 13, 18, 0.9);
  backdrop-filter: blur(18px);
}

.site-header[data-scrolled] {
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--copper-500);
  transform: rotate(45deg);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark i {
  position: absolute;
  display: block;
  content: "";
}

.brand-mark::before {
  inset: 6px;
  border: 1px solid var(--signal-400);
}

.brand-mark::after {
  width: 4px;
  height: 4px;
  background: var(--paper-50);
}

.brand-mark i:nth-child(1) {
  width: 1px;
  height: 46px;
  background: var(--line-dark);
}

.brand-mark i:nth-child(2) {
  width: 46px;
  height: 1px;
  background: var(--line-dark);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy b {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.01em;
}

.brand-copy b span {
  margin-left: 4px;
  color: var(--copper-300);
  font-family: var(--sans);
  font-size: 13px;
}

.brand-copy small {
  margin-top: 4px;
  color: rgba(255, 250, 240, 0.56);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 34px);
}

.site-nav a {
  color: rgba(255, 250, 240, 0.72);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--paper-50);
}

.site-nav .nav-cta {
  padding: 9px 15px;
  border: 1px solid var(--copper-500);
  color: var(--paper-50);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  border: 0;
  color: var(--paper-50);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.nav-toggle i,
.nav-toggle i::before,
.nav-toggle i::after {
  display: block;
  width: 18px;
  height: 1px;
  background: currentColor;
  content: "";
}

.nav-toggle i {
  position: relative;
}

.nav-toggle i::before {
  position: absolute;
  top: -5px;
}

.nav-toggle i::after {
  position: absolute;
  top: 5px;
}

.hero {
  position: relative;
  min-height: calc(100svh - 72px);
  overflow: hidden;
  background:
    radial-gradient(circle at 77% 34%, rgba(99, 215, 209, 0.09), transparent 26%),
    linear-gradient(115deg, var(--ink-950), var(--ink-900));
}

.hero::before,
.hero::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.hero::before {
  inset: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.hero::after {
  top: 0;
  right: 9vw;
  width: 1px;
  height: 100%;
  background: linear-gradient(transparent, var(--copper-500), transparent);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, var(--content));
  min-height: calc(100svh - 168px);
  margin: 0 auto;
  padding: clamp(64px, 10vh, 118px) var(--gutter) 54px;
  align-items: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: clamp(40px, 7vw, 110px);
}

.eyebrow,
.section-index,
.card-kicker,
.control-index,
.lab-panel-label,
.evidence-grid article > span,
.version-line article > span {
  font-family: var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  color: rgba(255, 250, 240, 0.68);
  font-size: 11px;
}

.eyebrow span {
  margin-right: 16px;
  color: var(--signal-400);
}

.hero h1 {
  max-width: 800px;
  margin: 24px 0 28px;
  font-family: var(--serif);
  font-size: clamp(50px, 5.3vw, 82px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero h1 em {
  display: block;
  color: var(--copper-300);
  font-style: italic;
}

.hero-lead {
  max-width: 680px;
  color: rgba(255, 250, 240, 0.73);
  font-size: clamp(16px, 1.6vw, 20px);
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary,
.button-copper {
  color: var(--ink-950);
  background: var(--copper-300);
}

.button-ghost {
  border-color: var(--line-dark);
  color: var(--paper-50);
  background: transparent;
}

.button-ghost:hover,
.button-outline:hover {
  border-color: var(--signal-400);
}

.button-signal {
  color: var(--ink-950);
  background: var(--signal-400);
}

.button-dark {
  border-color: var(--ink-700);
  color: var(--paper-50);
  background: var(--ink-900);
}

.button-outline {
  border-color: var(--line-light);
  color: var(--ink-900);
  background: transparent;
}

.hero-boundary {
  max-width: 660px;
  margin-top: 36px;
  padding-top: 14px;
  border-top: 1px solid var(--line-dark);
  color: rgba(255, 250, 240, 0.54);
  font-size: 12px;
}

.hero-boundary b {
  color: var(--signal-400);
}

.hero-figure {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 1;
  justify-self: center;
}

.construct {
  position: absolute;
  inset: 12%;
  animation: float 8s ease-in-out infinite;
}

.construct-ring,
.construct-axis,
.construct-seed,
.construct-node {
  position: absolute;
  display: block;
}

.construct-ring {
  border: 1px solid;
  transform: rotate(45deg);
}

.ring-a {
  inset: 1%;
  border-color: rgba(232, 170, 109, 0.56);
}

.ring-b {
  inset: 18%;
  border-color: rgba(99, 215, 209, 0.55);
  transform: rotate(22.5deg);
}

.ring-c {
  inset: 34%;
  border-color: rgba(255, 250, 240, 0.52);
}

.construct-axis {
  top: 50%;
  left: 50%;
  background: var(--line-dark);
}

.axis-x {
  width: 118%;
  height: 1px;
  transform: translate(-50%, -50%);
}

.axis-y {
  width: 1px;
  height: 118%;
  transform: translate(-50%, -50%);
}

.construct-seed {
  inset: 42%;
  border: 5px double var(--paper-50);
  background: var(--ink-950);
  box-shadow: 0 0 60px rgba(99, 215, 209, 0.23);
  transform: rotate(45deg);
}

.construct-node {
  width: 9px;
  height: 9px;
  border: 2px solid var(--signal-400);
  background: var(--ink-900);
  transform: rotate(45deg);
}

.node-a { top: 3%; left: 49%; }
.node-b { top: 49%; right: 3%; border-color: var(--copper-300); }
.node-c { bottom: 3%; left: 49%; }
.node-d { top: 49%; left: 3%; border-color: var(--copper-300); }

.construct-label {
  position: absolute;
  color: rgba(255, 250, 240, 0.5);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.label-a { top: 7%; left: 2%; }
.label-b { top: 30%; right: -1%; writing-mode: vertical-rl; }
.label-c { bottom: 10%; left: 7%; }

.hero-index {
  position: absolute;
  right: 1%;
  bottom: 1%;
  left: 1%;
  display: flex;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--line-dark);
  color: rgba(255, 250, 240, 0.4);
  font-family: var(--mono);
  font-size: 8px;
}

.hero-ledger {
  position: relative;
  z-index: 2;
  display: grid;
  border-top: 1px solid var(--line-dark);
  grid-template-columns: repeat(4, 1fr);
}

.hero-ledger span {
  min-height: 96px;
  padding: 24px var(--gutter);
  border-right: 1px solid var(--line-dark);
  color: rgba(255, 250, 240, 0.52);
  font-size: 11px;
}

.hero-ledger span:last-child {
  border-right: 0;
}

.hero-ledger b {
  display: block;
  color: var(--paper-50);
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 500;
  line-height: 1;
}

.section {
  position: relative;
  padding: clamp(80px, 10vw, 150px) var(--gutter);
}

.section > * {
  width: min(100%, var(--content));
  margin-right: auto;
  margin-left: auto;
}

.section-light {
  color: var(--ink-900);
  background: var(--paper-50);
}

.section-dark {
  color: var(--paper-50);
  background: var(--ink-900);
}

.section-heading {
  display: grid;
  margin-bottom: clamp(44px, 7vw, 88px);
  grid-template-columns: minmax(140px, 0.42fr) minmax(0, 1.58fr);
  gap: 32px;
}

.section-index {
  margin: 8px 0 0;
  color: var(--copper-500);
  font-size: 10px;
}

.section-dark .section-index,
.lab-section .section-index {
  color: var(--signal-400);
}

.section-heading h2 {
  max-width: 900px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(38px, 5.5vw, 74px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.03;
}

.section-heading div > p {
  max-width: 700px;
  margin: 22px 0 0;
  color: currentColor;
  font-size: 16px;
  opacity: 0.67;
}

.concept-grid {
  display: grid;
  border-top: 1px solid var(--line-light);
  border-left: 1px solid var(--line-light);
  grid-template-columns: repeat(4, 1fr);
}

.concept-card {
  position: relative;
  min-height: 330px;
  padding: 26px;
  border-right: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}

.concept-card > span {
  display: block;
  margin-bottom: 80px;
  color: var(--copper-500);
  font-family: var(--mono);
  font-size: 11px;
}

.card-kicker {
  margin: 0 0 8px;
  color: var(--signal-700);
  font-size: 9px;
}

.concept-card h3,
.evidence-grid h3,
.method-split h3,
.registry-heading h3,
.version-line h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.15;
}

.concept-card > p:last-child,
.evidence-grid p,
.version-line p {
  color: rgba(17, 23, 33, 0.65);
  font-size: 13px;
}

.definition-strip {
  display: grid;
  margin-top: 70px;
  padding: 26px 0;
  border-top: 1px solid var(--ink-900);
  border-bottom: 1px solid var(--ink-900);
  align-items: center;
  grid-template-columns: 0.42fr 1.58fr;
  gap: 32px;
}

.definition-strip > p {
  color: var(--copper-500);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.definition-strip blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(24px, 3.3vw, 44px);
  font-weight: 500;
  line-height: 1.2;
}

.slot-composition {
  display: grid;
  align-items: stretch;
  grid-template-columns: minmax(420px, 1.2fr) minmax(300px, 0.8fr);
  gap: clamp(36px, 7vw, 100px);
}

.slot-diagram {
  display: grid;
  min-height: 560px;
  padding: 1px;
  border: 1px solid var(--line-dark);
  background: linear-gradient(135deg, rgba(99, 215, 209, 0.07), rgba(199, 123, 60, 0.07));
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1px;
}

.slot {
  position: relative;
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  background: var(--ink-900);
  transition: background 180ms ease;
}

.slot:hover {
  background: var(--ink-850);
}

.slot b {
  position: absolute;
  top: 18px;
  left: 20px;
  color: var(--signal-400);
  font-family: var(--mono);
  font-size: 11px;
}

.slot span {
  font-family: var(--serif);
  font-size: 24px;
}

.slot small {
  color: rgba(255, 250, 240, 0.36);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.slot-seed,
.slot-op {
  background: rgba(199, 123, 60, 0.09);
}

.slot-phon,
.slot-acoustic {
  background: rgba(99, 215, 209, 0.07);
}

.system-notes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.system-notes li {
  display: grid;
  padding: 23px 0;
  border-bottom: 1px solid var(--line-dark);
  grid-template-columns: 82px 1fr;
  gap: 16px;
}

.system-notes li:first-child {
  border-top: 1px solid var(--line-dark);
}

.system-notes span {
  color: var(--copper-300);
  font-family: var(--serif);
  font-size: 18px;
}

.system-notes p {
  margin: 0;
  color: rgba(255, 250, 240, 0.6);
  font-size: 13px;
}

.lab-section {
  color: var(--ink-900);
  background:
    linear-gradient(rgba(17, 23, 33, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 23, 33, 0.045) 1px, transparent 1px),
    var(--paper-100);
  background-size: 54px 54px;
}

.lab-heading .section-index {
  color: var(--signal-700);
}

.lab-workspace {
  display: grid;
  border: 1px solid var(--ink-900);
  background: var(--paper-50);
  box-shadow: 18px 18px 0 rgba(17, 23, 33, 0.11);
  grid-template-columns: minmax(340px, 0.82fr) minmax(520px, 1.18fr);
}

.lab-preview {
  position: sticky;
  top: 94px;
  height: fit-content;
  padding: clamp(20px, 3vw, 38px);
  border-right: 1px solid var(--ink-900);
}

.lab-panel-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  color: rgba(17, 23, 33, 0.52);
  font-size: 8px;
}

.glyph-stage {
  display: grid;
  min-height: 410px;
  overflow: hidden;
  border: 1px solid var(--line-light);
  background: var(--paper-100);
  place-items: center;
}

.glyph-stage svg {
  width: min(100%, 460px);
  height: auto;
}

.variant-meta {
  margin-top: 14px;
  color: var(--copper-500);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 8px;
  color: rgba(17, 23, 33, 0.6);
  font-size: 11px;
}

.validation-status {
  margin: 20px 0 0;
  padding: 12px 14px;
  border-left: 4px solid currentColor;
  background: rgba(17, 23, 33, 0.045);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.validation-status.ok {
  color: #1d754d;
}

.validation-status.bad {
  color: #ac362f;
}

.activity-status {
  min-height: 25px;
  margin: 8px 0 0;
  color: var(--ink-700);
  font-size: 11px;
}

.activity-status[data-tone="success"] {
  color: #1d754d;
}

.activity-status[data-tone="error"] {
  color: #ac362f;
}

.issues {
  display: grid;
  margin-top: 14px;
  gap: 8px;
}

.issue,
.empty {
  padding: 11px 12px;
  border: 1px solid var(--line-light);
  background: #fffdf7;
  font-size: 11px;
}

.issue {
  border-left-width: 4px;
}

.issue.error { border-left-color: var(--danger-500); }
.issue.warning { border-left-color: var(--warning-500); }
.issue b,
.issue span,
.issue small { display: block; }
.issue span,
.issue small { margin-top: 3px; color: rgba(17, 23, 33, 0.56); }
.empty { color: #1d754d; }

.lab-controls {
  min-width: 0;
}

.controls-group {
  padding: clamp(22px, 3vw, 38px);
  border-bottom: 1px solid var(--line-light);
}

.control-index {
  margin: 0 0 20px;
  color: var(--copper-500);
  font-size: 9px;
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.controls-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.field.wide {
  grid-column: 1 / -1;
}

.field label {
  color: rgba(17, 23, 33, 0.59);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line-light);
  border-radius: 0;
  color: var(--ink-900);
  background: #fffdf8;
  font-size: 12px;
}

.field input:hover,
.field select:hover {
  border-color: var(--copper-500);
}

.field input[type="range"] {
  padding: 0;
  accent-color: var(--signal-700);
}

.field.check {
  flex-direction: row;
  align-items: center;
}

.field.check input {
  width: 18px;
  min-height: 18px;
}

.actions {
  padding: clamp(22px, 3vw, 38px);
}

.recipe-details {
  margin: 0 clamp(22px, 3vw, 38px) clamp(22px, 3vw, 38px);
  border-top: 1px solid var(--line-light);
}

.recipe-details summary,
.rule-catalog summary,
.faq-list summary {
  cursor: pointer;
  font-weight: 800;
}

.recipe-details summary {
  padding: 18px 0;
  color: var(--ink-700);
  font-size: 12px;
}

pre {
  max-height: 480px;
  margin: 0;
  overflow: auto;
  padding: 18px;
  color: #e8f1ed;
  background: var(--ink-900);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.noscript-note {
  padding: 14px;
  border: 1px solid var(--danger-500);
  background: #fff5ee;
}

.stats {
  display: grid;
  margin-bottom: 28px;
  border-top: 1px solid var(--line-light);
  border-left: 1px solid var(--line-light);
  grid-template-columns: repeat(5, 1fr);
}

.stat {
  min-height: 150px;
  padding: 22px;
  border-right: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}

.stat b {
  display: block;
  color: var(--ink-900);
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 500;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 14px;
  color: rgba(17, 23, 33, 0.56);
  font-size: 11px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--ink-900);
}

.evidence-grid article {
  min-height: 260px;
  padding: 28px;
  background: var(--paper-50);
}

.evidence-grid article > span {
  display: block;
  margin-bottom: 80px;
  color: var(--signal-700);
  font-size: 9px;
}

.evidence-callout {
  display: grid;
  margin-top: 26px;
  padding: 28px;
  border: 1px solid var(--ink-900);
  align-items: center;
  grid-template-columns: 0.5fr 0.7fr 1fr;
  gap: 28px;
}

.evidence-callout p,
.evidence-callout span {
  margin: 0;
  color: rgba(17, 23, 33, 0.62);
  font-size: 12px;
}

.evidence-callout code {
  color: var(--signal-700);
  font-family: var(--mono);
  font-size: clamp(18px, 2.5vw, 28px);
}

.method-split {
  display: grid;
  align-items: stretch;
  grid-template-columns: 1fr 64px 1fr 64px 1fr;
}

.method-split article {
  min-height: 300px;
  padding: 28px;
  border: 1px solid var(--line-dark);
}

.method-split .card-kicker {
  color: var(--signal-400);
}

.method-split ul {
  margin: 74px 0 0;
  padding: 0;
  color: rgba(255, 250, 240, 0.6);
  font-size: 12px;
  list-style: none;
}

.method-split li {
  padding: 7px 0;
  border-top: 1px solid var(--line-dark);
}

.method-operator {
  display: grid;
  color: var(--copper-300);
  font-family: var(--serif);
  font-size: 28px;
  place-items: center;
}

.method-split .method-result {
  border-color: var(--signal-400);
  background: rgba(99, 215, 209, 0.05);
}

.registry-block {
  margin-top: 100px;
}

.registry-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 24px;
}

.registry-heading .section-index {
  margin: 0 0 8px;
}

.registry-heading > p {
  max-width: 460px;
  margin: 0;
  color: rgba(255, 250, 240, 0.53);
  font-size: 12px;
}

.atom-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-dark);
}

.atom-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 0;
  color: var(--paper-50);
  background: var(--ink-850);
  text-align: center;
  cursor: pointer;
}

.atom-card:hover,
.atom-card[aria-pressed="true"] {
  border-color: var(--signal-400);
  background: rgba(99, 215, 209, 0.1);
}

.atom-svg {
  display: grid;
  height: 92px;
  place-items: center;
}

.atom-svg svg {
  width: 82px;
  height: 82px;
}

.atom-card b,
.atom-card span {
  display: block;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.atom-card span {
  margin-top: 4px;
  color: rgba(255, 250, 240, 0.45);
}

.rule-catalog {
  margin-top: 24px;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.rule-catalog summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-size: 13px;
}

.rule-catalog summary b {
  color: var(--copper-300);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.rule-grid {
  display: grid;
  padding-bottom: 28px;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-dark);
}

.rule {
  min-height: 220px;
  padding: 20px;
  background: var(--ink-850);
}

.rule header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--signal-400);
  font-family: var(--mono);
  font-size: 8px;
}

.rule h3 {
  margin: 52px 0 8px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}

.rule p,
.rule em {
  color: rgba(255, 250, 240, 0.52);
  font-size: 10px;
}

.rule em {
  display: block;
  margin-top: 16px;
  color: var(--copper-300);
  font-family: var(--mono);
  font-style: normal;
}

.version-line {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--ink-900);
}

.version-line article {
  min-height: 360px;
  padding: clamp(28px, 4vw, 52px);
  background: var(--paper-50);
}

.version-line article > span {
  display: block;
  margin-bottom: 100px;
  color: var(--copper-500);
  font-size: 9px;
}

.version-line h3 {
  font-size: clamp(30px, 4vw, 48px);
}

.version-line article > b {
  display: inline-block;
  margin-top: 18px;
  color: var(--signal-700);
  font-size: 11px;
}

.version-line .version-now {
  color: var(--paper-50);
  background: var(--ink-900);
}

.version-line .version-now p {
  color: rgba(255, 250, 240, 0.58);
}

.faq-section {
  color: var(--paper-50);
  background: #0d1118;
}

.faq-list {
  border-top: 1px solid var(--line-dark);
}

.faq-list details {
  border-bottom: 1px solid var(--line-dark);
}

.faq-list summary {
  padding: 24px 48px 24px 0;
  font-family: var(--serif);
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 500;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  float: right;
  color: var(--signal-400);
  content: "+";
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  max-width: 760px;
  margin: 0 0 28px;
  color: rgba(255, 250, 240, 0.6);
}

.site-footer {
  display: grid;
  padding: 58px var(--gutter) 28px;
  border-top: 1px solid var(--line-dark);
  background: var(--ink-950);
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
}

.site-footer > div,
.site-footer > p {
  width: min(100%, calc(var(--content) / 2));
}

.site-footer > div:first-child > p {
  max-width: 480px;
  color: rgba(255, 250, 240, 0.48);
  font-size: 12px;
}

.brand-footer {
  margin-bottom: 18px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.footer-links a {
  color: rgba(255, 250, 240, 0.65);
  font-size: 12px;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--signal-400);
}

.footer-note {
  max-width: var(--content);
  margin: 34px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-dark);
  color: rgba(255, 250, 240, 0.32);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  grid-column: 1 / -1;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.js [data-reveal][data-visible] {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0.001deg); }
  50% { transform: translateY(-12px) rotate(1.4deg); }
}

@media (max-width: 1120px) {
  .hero-grid {
    grid-template-columns: 1fr 0.78fr;
  }

  .concept-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lab-workspace {
    grid-template-columns: 1fr;
  }

  .lab-preview {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--ink-900);
  }

  .stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .atom-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 820px) {
  .site-header {
    min-height: 64px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    padding: 12px var(--gutter) 22px;
    border-bottom: 1px solid var(--line-dark);
    background: var(--ink-950);
    align-items: stretch;
    flex-direction: column;
  }

  .site-nav[data-open] {
    display: flex;
  }

  .site-nav a {
    padding: 9px 0;
  }

  .site-nav .nav-cta {
    padding: 11px;
    text-align: center;
  }

  .hero-grid {
    min-height: auto;
    padding-top: 80px;
    grid-template-columns: 1fr;
  }

  .hero-figure {
    width: min(90vw, 480px);
  }

  .hero-ledger {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-ledger span:nth-child(2) {
    border-right: 0;
  }

  .hero-ledger span:nth-child(-n+2) {
    border-bottom: 1px solid var(--line-dark);
  }

  .section-heading,
  .definition-strip {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 18px;
  }

  .slot-composition {
    grid-template-columns: 1fr;
  }

  .slot-diagram {
    min-height: 440px;
  }

  .method-split {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .method-operator {
    min-height: 40px;
  }

  .evidence-grid,
  .rule-grid {
    grid-template-columns: 1fr;
  }

  .evidence-callout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .brand-copy b {
    font-size: 16px;
  }

  .hero h1 {
    font-size: clamp(44px, 14vw, 66px);
  }

  .hero-actions .button,
  .actions .button {
    width: 100%;
  }

  .hero-ledger span {
    min-height: 84px;
    padding: 18px 20px;
  }

  .concept-grid,
  .version-line,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .concept-card {
    min-height: 280px;
  }

  .slot-diagram {
    min-height: auto;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }

  .slot {
    min-height: 170px;
    padding: 16px;
  }

  .controls,
  .controls-three {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat {
    min-height: 120px;
  }

  .registry-heading {
    align-items: start;
    flex-direction: column;
  }

  .atom-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rule-catalog summary {
    align-items: start;
    flex-direction: column;
  }

  .site-footer {
    padding-top: 46px;
  }

  .footer-note {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
