/* ============================================================
   Hylaean — explainer site
   Modern, accessible, responsive dark theme.
   ============================================================ */

:root {
  --bg:        #05060d;
  --bg-alt:    #090b18;
  --surface:   #0e1124;
  --surface-2: #141936;
  --line:      rgba(120, 150, 255, 0.14);
  --text:      #e8ecff;
  --text-soft: #aab2d8;
  --text-dim:  #7a83ad;

  --cyan:   #38e1ff;
  --blue:   #4f7bff;
  --violet: #9b6bff;
  --pink:   #ff6bd5;

  --grad: linear-gradient(100deg, var(--cyan), var(--blue) 45%, var(--violet) 80%, var(--pink));

  --maxw: 1120px;
  --radius: 18px;
  --shadow: 0 20px 60px -25px rgba(0, 0, 0, 0.8);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.12rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
code {
  font-family: "SF Mono", ui-monospace, "Cascadia Code", Menlo, monospace;
  font-size: 0.9em;
  background: rgba(120, 150, 255, 0.12);
  border: 1px solid var(--line);
  padding: 0.08em 0.4em;
  border-radius: 6px;
  color: #cfe0ff;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--surface-2); color: var(--text);
  padding: 0.8rem 1.2rem; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

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

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem clamp(1.1rem, 4vw, 3rem);
  backdrop-filter: blur(14px);
  background: rgba(5, 6, 13, 0.55);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav.is-scrolled {
  background: rgba(5, 6, 13, 0.82);
  border-bottom-color: var(--line);
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.nav__brand-accent { color: var(--cyan); }
.nav__logo {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 18px rgba(79, 123, 255, 0.7);
}
.nav__links { display: flex; gap: 1.6rem; font-size: 0.95rem; }
.nav__links a { color: var(--text-soft); transition: color 0.2s ease; }
.nav__links a:hover { color: var(--text); }

.nav__toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 6px;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.25s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 7rem clamp(1.1rem, 5vw, 4rem) 6rem;
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(120% 80% at 20% 0%, transparent 30%, rgba(5,6,13,0.55) 100%),
    linear-gradient(180deg, rgba(5,6,13,0.35) 0%, rgba(5,6,13,0.1) 40%, var(--bg) 100%);
  pointer-events: none;
}
.hero__content { position: relative; z-index: 2; max-width: 860px; margin: 0 auto; width: 100%; }
.hero__eyebrow {
  text-transform: uppercase; letter-spacing: 0.28em; font-size: 0.78rem;
  color: var(--cyan); margin: 0 0 1.1rem; font-weight: 600;
}
.hero__title {
  font-size: clamp(2.3rem, 1.4rem + 4.6vw, 4.6rem);
  margin: 0 0 1.4rem; font-weight: 700;
}
.hero__lead {
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.35rem);
  color: var(--text-soft); max-width: 660px; margin: 0 0 2rem;
}
.hero__lead strong { color: var(--text); font-weight: 600; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.6rem; }
.hero__directive {
  margin: 0; padding: 1rem 0 0 1.2rem;
  border-left: 2px solid var(--violet);
  color: var(--text-dim); font-style: italic; max-width: 560px;
}

.hero__update {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin-bottom: 2.2rem; padding: 0.55rem 1.1rem;
  border: 1px solid rgba(56,225,255,0.3); border-radius: 999px;
  background: rgba(56,225,255,0.07);
  color: var(--text-soft); font-size: 0.88rem; font-weight: 500;
  transition: border-color 0.2s ease, transform 0.2s ease;
  max-width: 100%;
}
.hero__update:hover { border-color: var(--cyan); transform: translateY(-2px); color: var(--text); }
.hero__update-dot {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 0 0 rgba(56,225,255,0.5);
  animation: updatepulse 2.2s infinite;
}
@keyframes updatepulse {
  0% { box-shadow: 0 0 0 0 rgba(56,225,255,0.5); }
  70% { box-shadow: 0 0 0 9px rgba(56,225,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(56,225,255,0); }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.7rem; border-radius: 999px;
  font-weight: 600; font-size: 0.98rem; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 1px solid transparent;
}
.btn--primary { background: var(--grad); color: #06070f; box-shadow: 0 10px 35px -12px rgba(79,123,255,0.8); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 45px -12px rgba(155,107,255,0.9); }
.btn--ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,0.02); }
.btn--ghost:hover { border-color: var(--cyan); transform: translateY(-2px); }

.btnrow { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
@media (max-width: 520px) { .btnrow { flex-direction: column; align-items: stretch; } }

.hero__scroll {
  position: absolute; bottom: 1.8rem; left: 50%; transform: translateX(-50%);
  z-index: 2; width: 26px; height: 42px; border: 2px solid var(--text-dim);
  border-radius: 14px; display: flex; justify-content: center; padding-top: 7px;
}
.hero__scroll-dot { width: 4px; height: 8px; border-radius: 2px; background: var(--cyan); animation: scrolldot 1.6s infinite; }
@keyframes scrolldot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: clamp(4rem, 7vw, 7.5rem) clamp(1.1rem, 5vw, 4rem); position: relative; scroll-margin-top: 76px; }
.section--alt { background: var(--bg-alt); }
.section--alt::before, .section--alt::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--line);
}
.section--alt::before { top: 0; }
.section--alt::after { bottom: 0; }
.section__inner { max-width: var(--maxw); margin: 0 auto; width: 100%; }
.section__inner.narrow { max-width: 760px; }

.kicker {
  text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.76rem;
  color: var(--cyan); font-weight: 600; margin: 0 0 0.9rem;
}
.section__title { font-size: clamp(1.7rem, 1.2rem + 2.4vw, 3rem); margin: 0 0 1.2rem; }
.section__lead { font-size: clamp(1.05rem, 1rem + 0.45vw, 1.28rem); color: var(--text-soft); max-width: 720px; margin: 0 0 2rem; }
.section p strong { color: var(--text); font-weight: 600; }
.section p { color: var(--text-soft); max-width: 720px; }

/* split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split--reverse .split__text { order: 2; }
.split__media img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); display: block; }
.split__media figcaption, .canvas-card figcaption {
  margin-top: 0.9rem; font-size: 0.9rem; color: var(--text-dim); text-align: center;
}

/* ============================================================
   COMPARE
   ============================================================ */
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.2rem; align-items: stretch; margin-top: 2.5rem; }
.compare__col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; }
.compare__col h3 { margin: 0 0 1.2rem; font-size: 1.2rem; }
.compare__col h3 span { color: var(--text-dim); font-weight: 400; font-size: 0.9rem; }
.compare__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.85rem; }
.compare__col li { color: var(--text-soft); padding-left: 1.4rem; position: relative; }
.compare__col li::before { content: "·"; position: absolute; left: 0.3rem; color: var(--text-dim); font-weight: 700; }
.compare__col--new { background: linear-gradient(180deg, rgba(79,123,255,0.1), rgba(155,107,255,0.05)); border-color: rgba(120,150,255,0.3); }
.compare__col--new li strong { color: var(--cyan); }
.compare__vs { align-self: center; font-family: var(--font-display); color: var(--text-dim); font-size: 1rem; }
.tag { display: inline-block; background: rgba(255,255,255,0.06); border: 1px solid var(--line); border-radius: 6px; padding: 0 0.45rem; font-size: 0.82rem; }
.tag--accent { background: rgba(56,225,255,0.12); border-color: rgba(56,225,255,0.4); color: var(--cyan); }

/* ============================================================
   CARDS
   ============================================================ */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-top: 2.4rem; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; transition: transform 0.25s ease, border-color 0.25s ease; }
.card:hover { transform: translateY(-4px); border-color: rgba(120,150,255,0.32); }
.card h3 { margin: 0 0 0.7rem; font-size: 1.2rem; }
.card p { margin: 0; color: var(--text-soft); }
.card--op { text-align: center; }
.card__sym {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; margin-bottom: 1rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.7rem;
  border-radius: 16px; background: var(--grad); color: #06070f;
  box-shadow: 0 10px 30px -12px rgba(79,123,255,0.9);
}

/* ============================================================
   CANVAS CARDS
   ============================================================ */
.canvas-card { margin: 2.4rem 0 0; }
.canvas-card canvas {
  width: 100%; height: 340px; display: block;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: radial-gradient(120% 120% at 50% 0%, #0c1024, #05060d);
  box-shadow: var(--shadow);
}
.canvas-card--tall canvas { height: 400px; }
.split .canvas-card { margin-top: 0; }
.split .canvas-card canvas { height: 360px; }

/* ============================================================
   FLOW / LADDER / PIPELINE / CHIPS
   ============================================================ */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; margin: 0 0 1rem; }
.flow__step { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0.55rem 1.2rem; font-weight: 500; color: var(--text-soft); }
.flow__step--final { background: var(--grad); color: #06070f; font-weight: 600; border-color: transparent; }
.flow__arrow { color: var(--violet); font-weight: 700; }

.ladder { counter-reset: step; list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem 1.4rem; }
.ladder li { counter-increment: step; position: relative; padding: 0.9rem 1.1rem 0.9rem 3.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--text-soft); }
.ladder li::before {
  content: counter(step); position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(79,123,255,0.16); color: var(--cyan); font-weight: 700; font-size: 0.85rem;
  font-family: var(--font-display);
}
.ladder li span { color: var(--text); font-weight: 600; }

.pipeline { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.pipeline li {
  display: grid; grid-template-columns: 44px 130px 1fr; align-items: center; gap: 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0.9rem 1.2rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.pipeline li:hover { border-color: rgba(120,150,255,0.32); transform: translateX(4px); }
.pipeline__n { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #06070f; font-weight: 700; display: grid; place-items: center; font-family: var(--font-display); }
.pipeline li strong { font-family: var(--font-display); color: var(--text); }
.pipeline li em { color: var(--text-soft); font-style: normal; }

.chips { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.5rem 0 1.8rem; }
.chip { background: linear-gradient(180deg, rgba(79,123,255,0.12), rgba(155,107,255,0.06)); border: 1px solid rgba(120,150,255,0.28); border-radius: 999px; padding: 0.55rem 1.2rem; color: var(--text); font-weight: 500; }

/* ============================================================
   CALLOUT
   ============================================================ */
.callout { margin-top: 2rem; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--cyan); border-radius: 14px; padding: 1.6rem 1.8rem; }
.callout p { margin: 0 0 0.8rem; }
.callout p:last-child { margin-bottom: 0; }
.callout__quote { font-family: var(--font-display); font-size: clamp(1.1rem, 1rem + 0.7vw, 1.5rem); color: var(--text); font-style: italic; }
.callout--strong { border-left-color: var(--violet); background: linear-gradient(180deg, rgba(155,107,255,0.08), rgba(14,17,36,0.6)); }

/* ============================================================
   LAWS
   ============================================================ */
.laws { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.4rem; }
.law { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; position: relative; overflow: hidden; transition: transform 0.25s ease, border-color 0.25s ease; }
.law:hover { transform: translateY(-4px); border-color: rgba(120,150,255,0.32); }
.law__id { font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; color: var(--cyan); letter-spacing: 0.05em; }
.law h3 { margin: 0.5rem 0 0.5rem; font-size: 1.05rem; }
.law p { margin: 0; font-size: 0.92rem; color: var(--text-soft); }

/* ============================================================
   DAG (operator graph / chained skills)
   ============================================================ */
.dag { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; }
.dag__chain { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.dag__node {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 0.6rem 1.1rem; font-family: var(--font-display); font-weight: 600; color: var(--text-soft);
}
.dag__node--op { color: var(--cyan); border-color: rgba(56,225,255,0.34); background: rgba(56,225,255,0.06); }
.dag__node--composite { color: #06070f; background: var(--grad); border-color: transparent; }
.dag__arrow { color: var(--violet); font-weight: 700; font-size: 1.1rem; }
.dag__plus { color: var(--text-dim); font-size: 0.85rem; letter-spacing: 0.04em; padding-left: 0.2rem; }

/* ============================================================
   WALL CARDS (ARC)
   ============================================================ */
.card--wall { position: relative; padding-top: 2.6rem; }
.card__wn {
  position: absolute; top: 1.2rem; right: 1.2rem;
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
  color: var(--pink); background: rgba(255,107,213,0.12); border: 1px solid rgba(255,107,213,0.3);
}

/* ============================================================
   STATS (honest numbers)
   ============================================================ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.4rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.3rem; }
.stat__num { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); line-height: 1; }
.stat:nth-child(1) .stat__num { color: var(--cyan); }
.stat:nth-child(2) .stat__num,
.stat:nth-child(3) .stat__num { color: var(--text); }
.stat:nth-child(4) .stat__num { color: var(--violet); }
.stat__unit { font-size: 0.55em; color: var(--text-dim); font-weight: 600; }
.stat__label { display: block; margin-top: 0.7rem; font-size: 0.86rem; color: var(--text-soft); line-height: 1.4; }

/* ============================================================
   RESEARCH LOG — tally, findings, timeline, sites
   ============================================================ */
.tally {
  margin-top: 2.4rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem 1.7rem;
}
.tally__head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem;
  font-size: 0.9rem; color: var(--text-soft); margin-bottom: 1rem;
}
.tally__total { font-family: var(--font-display); color: var(--text); }
.tally__total b { font-size: 1.15rem; color: var(--cyan); }
.tally__bar {
  display: flex; height: 18px; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--line); background: rgba(120,150,255,0.06);
}
.tally__seg { width: var(--w); transition: width 1.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.tally__seg--ok   { background: linear-gradient(90deg, rgba(56,225,255,0.55), var(--cyan)); }
.tally__seg--neg  { background: linear-gradient(90deg, rgba(255,107,213,0.4), rgba(255,107,213,0.72)); }
.tally__seg--plan { background: rgba(120,150,255,0.35); }
.tally__legend {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; margin-top: 1rem;
  font-size: 0.86rem; color: var(--text-soft);
}
.tally__legend b { color: var(--text); font-family: var(--font-display); }
.tally__dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 3px;
  margin-right: 0.45rem; vertical-align: baseline;
}
.tally__dot--ok { background: var(--cyan); }
.tally__dot--neg { background: rgba(255,107,213,0.72); }
.tally__dot--plan { background: rgba(120,150,255,0.5); }

.card--find { position: relative; padding-top: 2.6rem; }
.card__fn {
  position: absolute; top: 1.2rem; right: 1.2rem;
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
  color: var(--cyan); background: rgba(56,225,255,0.1); border: 1px solid rgba(56,225,255,0.3);
}

/* timeline */
.tline {
  list-style: none; margin: 1.6rem 0 0; padding: 0 0 0 1.1rem;
  position: relative; display: flex; flex-direction: column; gap: 1.1rem;
}
.tline::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(180deg, var(--blue), var(--violet), var(--pink));
  opacity: 0.5; border-radius: 2px;
}
.tline__item {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 1.1rem 1.4rem; margin-left: 1rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.tline__item:hover { border-color: rgba(120,150,255,0.32); transform: translateX(4px); }
.tline__item::before {
  content: ""; position: absolute; left: -2.35rem; top: 1.35rem;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 12px rgba(79,123,255,0.8);
}
.tline__item--hot { border-color: rgba(56,225,255,0.4); background: linear-gradient(180deg, rgba(56,225,255,0.06), var(--surface)); }
.tline__item--hot::before { background: var(--cyan); box-shadow: 0 0 14px rgba(56,225,255,0.9); }
.tline__date {
  display: inline-block; font-family: var(--font-display); font-weight: 700;
  font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 0.35rem;
}
.tline__text { margin: 0; font-size: 0.96rem; color: var(--text-soft); max-width: none; }

/* construction sites */
.sites { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.site {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.9rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 0.95rem 1.2rem; color: var(--text-soft); font-size: 0.96rem;
}
.site__status {
  flex: none; font-family: var(--font-display); font-weight: 600; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.2rem 0.65rem; border-radius: 999px; border: 1px solid transparent;
}
.site__status--doing { color: var(--cyan); background: rgba(56,225,255,0.1); border-color: rgba(56,225,255,0.32); }
.site__status--next  { color: #ffcf6b; background: rgba(255,207,107,0.1); border-color: rgba(255,207,107,0.32); }
.site__status--wall  { color: var(--pink); background: rgba(255,107,213,0.1); border-color: rgba(255,107,213,0.32); }

.chip--closed {
  background: rgba(255,107,213,0.06); border-color: rgba(255,107,213,0.28);
  color: var(--text-dim); text-decoration: line-through;
  text-decoration-color: rgba(255,107,213,0.6); text-decoration-thickness: 1.5px;
}

/* ============================================================
   SCIENCE PAGE — header, badges, law list, bars, table
   ============================================================ */
.pagehero {
  position: relative; padding: 9rem clamp(1.1rem, 5vw, 4rem) 4rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(90% 120% at 80% -10%, rgba(155,107,255,0.16), transparent 60%),
    radial-gradient(80% 100% at 0% 0%, rgba(56,225,255,0.12), transparent 55%),
    var(--bg-alt);
}
.pagehero__inner { max-width: var(--maxw); margin: 0 auto; }
.pagehero__title { font-size: clamp(2rem, 1.3rem + 3.4vw, 3.6rem); margin: 0.4rem 0 1.2rem; }
.pagehero__lead { font-size: clamp(1.05rem, 1rem + 0.5vw, 1.3rem); color: var(--text-soft); max-width: 760px; margin: 0; }
.crumbs { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-dim); font-size: 0.9rem; margin: 0 0 0.6rem; }
.crumbs a { color: var(--cyan); }
.crumbs a:hover { text-decoration: underline; }

/* status badges */
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap;
  font-family: var(--font-display); font-weight: 600; font-size: 0.74rem;
  padding: 0.2rem 0.6rem; border-radius: 999px; border: 1px solid transparent;
  letter-spacing: 0.02em;
}
.badge--ok   { color: var(--cyan);   background: rgba(56,225,255,0.12);  border-color: rgba(56,225,255,0.34); }
.badge--warn { color: #ffcf6b;       background: rgba(255,207,107,0.12); border-color: rgba(255,207,107,0.34); }
.badge--open { color: var(--pink);   background: rgba(255,107,213,0.12); border-color: rgba(255,107,213,0.34); }

/* law list (G1–G8) */
.lawlist { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 2.4rem; }
.lawrow {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 1.1rem; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.4rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.lawrow:hover { border-color: rgba(120,150,255,0.32); transform: translateX(3px); }
.lawrow__id {
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: #06070f;
  background: var(--grad); border-radius: 11px; width: 48px; height: 48px;
  display: grid; place-items: center;
}
.lawrow__name { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; margin: 0 0 0.25rem; color: var(--text); }
.lawrow__claim { margin: 0; font-size: 0.95rem; color: var(--text-soft); }
.lawrow__status { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; max-width: 230px; text-align: right; }
.lawrow__note { font-size: 0.8rem; color: var(--text-dim); }

/* grounding bar chart */
.bars { margin-top: 1.4rem; display: flex; flex-direction: column; gap: 0.9rem; }
.bars__legend { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-bottom: 0.4rem; font-size: 0.82rem; color: var(--text-dim); }
.bars__legend b { color: #ffcf6b; font-weight: 600; }
.bar { display: grid; grid-template-columns: 150px 1fr; gap: 1rem; align-items: center; }
.bar__label { font-size: 0.9rem; color: var(--text-soft); }
.bar__label b { color: var(--text); font-weight: 600; }
.bar__track { position: relative; height: 26px; background: rgba(120,150,255,0.1); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.bar__fill { position: absolute; inset: 0 auto 0 0; border-radius: 8px 0 0 8px; display: flex; align-items: center; justify-content: flex-end; padding-right: 0.5rem; font-size: 0.78rem; font-weight: 600; color: #06070f; }
.bar__fill--ok   { background: linear-gradient(90deg, rgba(56,225,255,0.5), var(--cyan)); }
.bar__fill--warn { background: linear-gradient(90deg, rgba(255,207,107,0.5), #ffcf6b); }
.bar__fill--open { background: linear-gradient(90deg, rgba(255,107,213,0.4), var(--pink)); color: var(--text); }
.bar__thr { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 2px dashed rgba(255,255,255,0.55); }
.bar__thr span { position: absolute; top: -18px; left: 4px; font-size: 0.7rem; color: var(--text-dim); white-space: nowrap; }

/* generic compact table (took / not took) */
.gtable { width: 100%; border-collapse: collapse; margin-top: 2.2rem; font-size: 0.95rem; }
.gtable th, .gtable td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.gtable thead th { color: var(--cyan); font-family: var(--font-display); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; }
.gtable td { color: var(--text-soft); }
.gtable td:first-child { color: var(--text); font-weight: 500; }
.gtable tbody tr:hover { background: rgba(120,150,255,0.04); }
.gtable code { font-size: 0.85em; }

/* ============================================================
   STATUS
   ============================================================ */
.status { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1rem; }
.status__col { border-radius: var(--radius); padding: 1.7rem; border: 1px solid var(--line); background: var(--surface); }
.status__col h3 { margin: 0 0 1rem; font-size: 1.15rem; display: flex; align-items: center; gap: 0.5rem; }
.status__col ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.65rem; color: var(--text-soft); }
.status__col--yes { border-color: rgba(56,225,255,0.3); }
.status__col--yes h3::before { content: "✓"; color: var(--cyan); }
.status__col--open { border-color: rgba(255,107,213,0.28); }
.status__col--open h3::before { content: "○"; color: var(--pink); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { padding: clamp(3.5rem, 6vw, 6rem) clamp(1.1rem, 5vw, 4rem); border-top: 1px solid var(--line); background: var(--bg-alt); }
.footer__inner { max-width: 760px; margin: 0 auto; text-align: center; }
.footer__directive { font-family: var(--font-display); font-size: clamp(1.3rem, 1rem + 1.4vw, 2rem); font-weight: 700; margin: 0 0 1.2rem; }
.footer__note { color: var(--text-soft); margin: 0 0 1.5rem; }
.footer__links {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0.5rem 0.8rem; margin: 0 0 1rem; font-size: 0.95rem; color: var(--text-dim);
}
.footer__links a { color: var(--text-soft); border-bottom: 1px solid rgba(120,150,255,0.3); padding-bottom: 1px; transition: color 0.2s ease, border-color 0.2s ease; }
.footer__links a:hover { color: var(--cyan); border-color: var(--cyan); }
.footer__contact { color: var(--text-soft); font-size: 0.95rem; margin: 0 0 1.5rem; }
.footer__contact a { color: var(--cyan); }
.footer__contact a:hover { text-decoration: underline; }
.footer__meta { color: var(--text-dim); font-size: 0.9rem; margin: 0; letter-spacing: 0.05em; }

/* ============================================================
   TO-TOP
   ============================================================ */
.totop {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  font-size: 1.2rem; display: grid; place-items: center;
  opacity: 0; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.2s ease;
}
.totop.is-visible { opacity: 1; transform: translateY(0); }
.totop:hover { border-color: var(--cyan); }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .nav__links {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(7, 9, 20, 0.97); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height 0.35s ease;
  }
  .nav__links.is-open { max-height: 60vh; }
  .nav__links a { padding: 1rem clamp(1.1rem, 4vw, 3rem); border-top: 1px solid var(--line); }
  .nav__toggle { display: flex; }

  .split, .compare, .cards, .cards--3, .laws, .status, .ladder { grid-template-columns: 1fr; }
  .split--reverse .split__text { order: 0; }
  .compare__vs { justify-self: center; }
  .laws { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .lawrow { grid-template-columns: 44px 1fr; }
  .lawrow__id { width: 40px; height: 40px; font-size: 1rem; }
  .lawrow__status { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; max-width: none; text-align: left; margin-top: 0.4rem; }
  .bar { grid-template-columns: 1fr; gap: 0.3rem; }
  .bar__label { font-size: 0.85rem; }
  .pipeline li { grid-template-columns: 36px 1fr; }
  .pipeline li strong { grid-column: 2; }
  .pipeline li em { grid-column: 2; }
}

@media (max-width: 520px) {
  .laws { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .canvas-card canvas, .canvas-card--tall canvas, .split .canvas-card canvas { height: 280px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .dag__chain { gap: 0.4rem; }
  .dag__node { padding: 0.5rem 0.8rem; font-size: 0.9rem; }
}
