/* ============================================================
   TERAFABFX — Design Tokens & Core Styles
   "Cleanroom / Circuit" system
   ============================================================ */

:root {
  /* --- Color --- */
  --bg-void: #04070d;
  --bg-panel: #0b111c;
  --bg-elevated: #121a28;
  --bg-elevated-2: #17202f;

  --teal-500: #14e6c8;
  --teal-600: #10c2a8;
  --teal-700: #0b8f7c;
  --teal-glow: rgba(20, 230, 200, 0.16);

  --copper-300: #f0bd82;
  --copper-400: #e8a75d;
  --copper-600: #b9793a;

  --ice-100: #eaf3f5;
  --ice-300: #c3d1d6;
  --ice-400: #93a5ae;
  --ice-600: #5c6b73;

  --line-grid: #1b2634;
  --line-grid-bright: #263447;

  --success: #3ed598;
  --danger: #ff5c5c;
  --warn: #f0c04d;

  /* --- Type --- */
  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  /* --- Scale --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 140px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --max-width: 1280px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg-void);
  color: var(--ice-100);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 var(--space-4);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 var(--space-4);
  color: var(--ice-300);
}

button {
  font-family: inherit;
}

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

/* ============================================================
   Layout primitives
   ============================================================ */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.section {
  padding: var(--space-9) 0;
  position: relative;
}

.section-tight {
  padding: var(--space-7) 0;
}

.hairline {
  height: 1px;
  background: var(--line-grid);
  border: 0;
  margin: 0;
  position: relative;
}

/* the "ball-grid" node — small square at hairline intersections, echoes a chip package */
.hairline--node {
  overflow: visible;
}
.hairline--node::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--bg-void);
  border: 1px solid var(--line-grid-bright);
  transform: translate(-50%, -50%) rotate(45deg);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal-500);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--teal-500);
  box-shadow: 0 0 8px 2px var(--teal-glow);
  flex-shrink: 0;
}

.section-head {
  max-width: 680px;
  margin: 0 0 var(--space-7);
}

.section-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
}

.section-head p {
  font-size: 17px;
  max-width: 560px;
}

.mono {
  font-family: var(--font-mono);
}

.text-muted {
  color: var(--ice-400);
}

.text-copper {
  color: var(--copper-400);
}

.text-teal {
  color: var(--teal-500);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background 0.2s var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(120deg, var(--teal-500) 0%, var(--copper-400) 150%);
  color: #04140f;
}

.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(20, 230, 200, 0.4), 0 12px 32px -8px var(--teal-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-grid-bright);
  color: var(--ice-100);
}

.btn-ghost:hover {
  border-color: var(--teal-500);
  color: var(--teal-500);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 13px;
}

.btn-icon {
  width: 1em;
  height: 1em;
  transition: transform 0.2s var(--ease-out);
}
.btn:hover .btn-icon {
  transform: translateX(3px);
}

/* ============================================================
   Nav
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-4) 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.15s var(--ease-out), border-color 0.15s var(--ease-out), padding 0.15s var(--ease-out);
  transform: translateZ(0);
  will-change: background;
}

.site-nav.is-scrolled {
  background: rgba(4, 7, 13, 0.86);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line-grid);
  padding: var(--space-3) 0;
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 26px;
  height: 26px;
  color: var(--teal-500);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 14px;
  color: var(--ice-300);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--teal-500);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-grid-bright);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  color: var(--ice-100);
  align-items: center;
  justify-content: center;
}

@media (max-width: 880px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links--open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(4, 7, 13, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-grid);
    padding: var(--space-2) var(--space-5) var(--space-5);
  }

  .nav-links--open li {
    width: 100%;
  }

  .nav-links--open a {
    display: block;
    padding: var(--space-4) 0;
    font-size: 15px;
    border-bottom: 1px solid var(--line-grid);
  }

  .site-nav {
    position: fixed;
  }

  .nav-cta .btn-ghost {
    display: none;
  }
}

/* ============================================================
   Background texture — PCB trace grid (used behind hero / sections)
   ============================================================ */
.grid-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.grid-field svg {
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

.grid-field .trace {
  stroke: var(--teal-500);
  stroke-width: 1;
  fill: none;
  stroke-dasharray: 6 10;
  opacity: 0.5;
  animation: trace-flow 14s linear infinite;
}

@keyframes trace-flow {
  to {
    stroke-dashoffset: -320;
  }
}

.fade-floor {
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to bottom, transparent, var(--bg-void));
  pointer-events: none;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: calc(var(--space-10) + 40px) 0 var(--space-9);
  overflow: hidden;
  border-bottom: 1px solid var(--line-grid);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero h1 {
  font-size: clamp(38px, 5.6vw, 68px);
  margin-bottom: var(--space-5);
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--teal-500), var(--copper-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 18px;
  color: var(--ice-300);
  max-width: 620px;
  margin-bottom: var(--space-6);
}

.hero-ctas {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-7);
}

.hero-funding-note {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ice-400);
}

.coin-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-grid-bright);
  border-radius: 999px;
  background: var(--bg-panel);
}

.coin-chip svg {
  width: 13px;
  height: 13px;
}

/* ============================================================
   Ticker
   ============================================================ */
.ticker {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line-grid);
  border-bottom: 1px solid var(--line-grid);
  background: var(--bg-panel);
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  animation: ticker-scroll 38s linear infinite;
  padding: 14px 0;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-item {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ice-300);
  padding: 0 var(--space-6);
  border-right: 1px solid var(--line-grid);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ticker-item .up {
  color: var(--success);
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ============================================================
   Trust bar
   ============================================================ */
.trust-bar {
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--line-grid);
}

.trust-bar-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ice-600);
  margin-bottom: var(--space-4);
  text-align: center;
}

.trust-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  flex-wrap: wrap;
  opacity: 0.55;
  filter: grayscale(1);
}

.trust-logos span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ice-400);
  margin: 4px var(--space-4); /* fallback spacing if flex `gap` isn't supported */
}

/* ============================================================
   Stat block
   ============================================================ */
.stat-block {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-8);
  align-items: center;
}

.stat-big {
  font-family: var(--font-mono);
  font-size: clamp(48px, 7vw, 84px);
  font-weight: 700;
  color: var(--teal-500);
  line-height: 1;
  white-space: nowrap;
}

.stat-block h3 {
  font-size: 24px;
  max-width: 460px;
}

@media (max-width: 720px) {
  .stat-block {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    text-align: left;
  }
}

/* ============================================================
   Product grid / cards
   ============================================================ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

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

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--line-grid);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  position: relative;
}

.card:hover {
  border-color: rgba(20, 230, 200, 0.3);
  box-shadow: 0 0 48px -12px var(--teal-glow);
  transform: translateY(-3px);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--line-grid-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-500);
  margin-bottom: var(--space-5);
}

.card-icon svg {
  width: 20px;
  height: 20px;
}

.card h3 {
  font-size: 19px;
  margin-bottom: var(--space-2);
}

.card p {
  font-size: 14.5px;
  margin-bottom: var(--space-4);
}

.card-return {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--copper-400);
  margin-bottom: var(--space-4);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--teal-500);
}

.card-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.card:hover .card-link svg {
  transform: translateX(3px);
}

/* ============================================================
   Security columns
   ============================================================ */
.security-band {
  background: var(--bg-panel);
  border-top: 1px solid var(--line-grid);
  border-bottom: 1px solid var(--line-grid);
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-7);
}

@media (max-width: 860px) {
  .security-grid {
    grid-template-columns: 1fr;
  }
}

.security-item .card-icon {
  margin-bottom: var(--space-4);
}

.security-item h4 {
  font-size: 17px;
  margin-bottom: var(--space-2);
}

.security-item p {
  font-size: 14.5px;
}

/* ============================================================
   How it works — steps
   ============================================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  position: relative;
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.steps--two-col {
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 560px) {
  .steps--two-col {
    grid-template-columns: 1fr;
  }
}

.step {
  padding: var(--space-5);
  border: 1px solid var(--line-grid);
  border-radius: var(--radius-md);
  position: relative;
}

.step-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--copper-400);
  margin-bottom: var(--space-4);
  display: block;
}

.step h4 {
  font-size: 16.5px;
  margin-bottom: var(--space-2);
}

.step p {
  font-size: 13.5px;
  margin-bottom: 0;
}

/* ============================================================
   Progress ring (wafer-disc motif)
   ============================================================ */
.ring-wrap {
  position: relative;
  width: 132px;
  height: 132px;
  flex-shrink: 0;
}

.ring-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: var(--line-grid);
  stroke-width: 6;
}

.ring-progress {
  fill: none;
  stroke: url(#ringGradient);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s var(--ease-out);
}

.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ring-label .pct {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--ice-100);
}

.ring-label .cap {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ice-400);
  margin-top: 2px;
}

/* ============================================================
   The Fab — spec sheet
   ============================================================ */
.fab-visual {
  border: 1px solid var(--line-grid);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(20, 230, 200, 0.08), transparent 60%),
    radial-gradient(ellipse at 90% 100%, rgba(232, 167, 93, 0.08), transparent 55%),
    var(--bg-panel);
  padding: var(--space-7);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}

@media (max-width: 900px) {
  .fab-visual {
    grid-template-columns: 1fr;
  }
}

.spec-list {
  display: grid;
  gap: var(--space-4);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: var(--space-3);
  border-bottom: 1px dashed var(--line-grid);
  gap: var(--space-4);
}

.spec-row .label {
  font-size: 13.5px;
  color: var(--ice-400);
}

.spec-row .value {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ice-100);
  text-align: right;
}

/* ============================================================
   Final CTA
   ============================================================ */
.final-cta {
  text-align: center;
  padding: var(--space-9) 0;
  position: relative;
  overflow: hidden;
}

.final-cta h2 {
  font-size: clamp(30px, 4vw, 46px);
  max-width: 640px;
  margin: 0 auto var(--space-4);
}

.final-cta p {
  max-width: 480px;
  margin: 0 auto var(--space-6);
  font-size: 16px;
}

.final-cta-ctas {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line-grid);
  padding: var(--space-8) 0 var(--space-6);
  background: var(--bg-panel);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--space-7);
  padding-bottom: var(--space-7);
}

@media (max-width: 820px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

.footer-brand p {
  font-size: 13.5px;
  max-width: 280px;
}

.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ice-600);
  margin-bottom: var(--space-4);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.footer-col a {
  font-size: 14px;
  color: var(--ice-300);
}

.footer-col a:hover {
  color: var(--teal-500);
}

.footer-legal {
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: 12.5px;
  color: var(--ice-600);
}

.footer-disclosure {
  font-size: 12px;
  color: var(--ice-600);
  max-width: 920px;
  margin-bottom: var(--space-6);
  line-height: 1.7;
}

.social-row {
  display: flex;
  gap: var(--space-4);
}

.social-row a {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-grid-bright);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ice-400);
}

.social-row a:hover {
  color: var(--teal-500);
  border-color: var(--teal-500);
}

.social-row svg {
  width: 15px;
  height: 15px;
}

/* ============================================================
   Reveal-on-scroll utility
   Fails safe: .reveal elements are visible by default. JS adds
   .reveal-pending (hiding them) only once it's confirmed running,
   then removes it via .is-visible when scrolled into view. If JS
   never runs, content simply stays visible — it never depends on
   JS to become visible, only to animate in.
   ============================================================ */
.reveal-pending {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal-pending.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Product detail pages
   ============================================================ */
.product-hero {
  padding: calc(var(--space-10) + 40px) 0 var(--space-7);
  border-bottom: 1px solid var(--line-grid);
  position: relative;
}

.product-hero-top {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.product-hero .card-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 0;
}

.product-hero .card-icon svg {
  width: 26px;
  height: 26px;
}

.product-hero h1 {
  font-size: clamp(30px, 4.4vw, 46px);
  margin-bottom: var(--space-3);
}

.product-hero-sub {
  max-width: 620px;
  font-size: 17px;
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ice-600);
  margin-bottom: var(--space-5);
}

.breadcrumb a {
  color: var(--ice-400);
}

.breadcrumb a:hover {
  color: var(--teal-500);
}

/* Risk badges */
.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid currentColor;
}

.risk-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.risk-low {
  color: var(--success);
}

.risk-medium {
  color: var(--copper-400);
}

.risk-higher {
  color: var(--danger);
}

/* Fact grid — key terms panel on each product page */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line-grid);
  border: 1px solid var(--line-grid);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: var(--space-7) 0;
}

.fact-cell {
  background: var(--bg-panel);
  padding: var(--space-5);
}

.fact-cell .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ice-600);
  margin-bottom: var(--space-2);
}

.fact-cell .value {
  font-family: var(--font-mono);
  font-size: 19px;
  color: var(--ice-100);
}

/* Prose block for product body copy */
.prose {
  max-width: 700px;
}

.prose h3 {
  font-size: 21px;
  margin-top: var(--space-7);
}

.prose ul {
  padding-left: 1.1em;
  color: var(--ice-300);
}

.prose li {
  margin-bottom: var(--space-2);
}

.callout {
  border: 1px solid var(--line-grid-bright);
  border-left: 3px solid var(--teal-500);
  background: var(--bg-panel);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-4) var(--space-5);
  font-size: 14px;
  color: var(--ice-300);
  margin: var(--space-6) 0;
}

.callout--warn {
  border-left-color: var(--copper-400);
}

/* Comparison table */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line-grid);
  border-radius: var(--radius-md);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.comparison-table th,
.comparison-table td {
  padding: var(--space-4) var(--space-5);
  text-align: left;
  border-bottom: 1px solid var(--line-grid);
  font-size: 14px;
  white-space: nowrap;
}

.comparison-table thead th {
  background: var(--bg-panel);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ice-100);
  position: sticky;
  top: 0;
}

.comparison-table tbody th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ice-600);
  font-weight: 500;
  white-space: normal;
}

.comparison-table td {
  font-family: var(--font-mono);
  color: var(--ice-300);
}

.comparison-table tr:last-child td,
.comparison-table tr:last-child th {
  border-bottom: none;
}

@media (max-width: 700px) {
  .table-scroll {
    overflow-x: visible;
    border: none;
  }

  .comparison-table {
    min-width: 0;
    width: 100%;
    display: block;
  }

  .comparison-table thead {
    display: none;
  }

  .comparison-table tbody {
    display: block;
  }

  .comparison-table tbody tr {
    display: block;
    margin-bottom: var(--space-5);
    border: 1px solid var(--line-grid);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    background: var(--bg-panel);
  }

  .comparison-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .comparison-table tbody tr th[scope="row"] {
    display: block;
    text-align: left;
    padding: 0 0 var(--space-3);
    margin-bottom: var(--space-3);
    border-bottom: 1px solid var(--line-grid);
  }

  .comparison-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    text-align: right;
    white-space: normal;
    padding: var(--space-2) 0;
  }

  .comparison-table td::before {
    content: attr(data-label);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 12.5px;
    color: var(--ice-400);
    text-align: left;
  }
}

.comparison-table tbody tr:hover td,
.comparison-table tbody tr:hover th {
  background: var(--bg-elevated);
}

/* ============================================================
   The Fab — full spec grid
   ============================================================ */
.spec-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--line-grid);
  border: 1px solid var(--line-grid);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-8);
}

.spec-grid-full .fact-cell .value {
  font-size: 17px;
}

/* ============================================================
   The Fab — interactive site map (pure CSS hover, no JS required)
   ============================================================ */
.site-map-wrap {
  border: 1px solid var(--line-grid);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
}

.site-map-wrap svg {
  width: 100%;
  height: auto;
}

.site-map-building {
  cursor: pointer;
}

.site-map-building rect,
.site-map-building polygon {
  fill: var(--bg-elevated);
  stroke: var(--line-grid-bright);
  stroke-width: 1.5;
  transition: fill 0.2s var(--ease-out), stroke 0.2s var(--ease-out);
}

.site-map-building text {
  fill: var(--ice-300);
  font-family: var(--font-mono);
  font-size: 11px;
  pointer-events: none;
  transition: fill 0.2s var(--ease-out);
}

.site-map-building .map-num {
  font-weight: 700;
  font-size: 13px;
}

.site-map-building:hover rect,
.site-map-building:hover polygon,
.site-map-building:focus rect,
.site-map-building:focus polygon {
  fill: rgba(20, 230, 200, 0.12);
  stroke: var(--teal-500);
}

.site-map-building:hover text,
.site-map-building:focus text {
  fill: var(--teal-500);
}

.site-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-grid);
}

.site-map-legend-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--ice-300);
}

.site-map-legend-item .num {
  font-family: var(--font-mono);
  color: var(--teal-500);
  font-weight: 600;
}

@media (max-width: 480px) {
  /* Full labels shrink illegibly at this width since they scale with
     the viewBox. Keep the number visible (matches the legend below);
     hide just the building name, and the native <title> tooltip still
     works on tap/hover for the full name either way. */
  .site-map-building .map-name {
    display: none;
  }
  .site-map-building .map-num {
    font-size: 16px;
  }
}

/* ============================================================
   The Fab — construction timeline
   (phase status set server-side in PHP, not JS — always correct
   even if JavaScript never runs)
   ============================================================ */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
  margin-bottom: var(--space-8);
}

@media (max-width: 780px) {
  .timeline {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

.timeline-phase {
  position: relative;
  padding: var(--space-5) var(--space-4) var(--space-5) 0;
  border-top: 3px solid var(--line-grid);
}

@media (max-width: 780px) {
  .timeline-phase {
    border-top: none;
    border-left: 3px solid var(--line-grid);
    padding: var(--space-2) 0 var(--space-2) var(--space-5);
  }
}

.timeline-phase::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 14px;
  height: 3px;
  background: var(--bg-void);
}

.timeline-phase.is-done {
  border-top-color: var(--teal-500);
}
.timeline-phase.is-active {
  border-top-color: var(--copper-400);
}

@media (max-width: 780px) {
  .timeline-phase.is-done {
    border-top-color: var(--line-grid);
    border-left-color: var(--teal-500);
  }
  .timeline-phase.is-active {
    border-top-color: var(--line-grid);
    border-left-color: var(--copper-400);
  }
}

.timeline-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.timeline-status.done {
  color: var(--teal-500);
}
.timeline-status.active {
  color: var(--copper-400);
}
.timeline-status.upcoming {
  color: var(--ice-600);
}

.timeline-phase h4 {
  font-size: 16px;
  margin-bottom: var(--space-2);
}

.timeline-phase p {
  font-size: 13.5px;
  margin-bottom: 0;
}

.timeline-date {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ice-600);
  margin-top: var(--space-3);
}

/* ============================================================
   Accordion (FAQ)
   Fails safe: panels are fully visible/expanded by default (a
   plain readable list). JS adds .js-accordion-ready to <html>
   only once it's confirmed running, and that class is what
   actually enables the collapse behavior — so no-JS/slow-JS
   users always get a complete, readable FAQ, never a hidden one.
   ============================================================ */
.accordion-group {
  border-top: 1px solid var(--line-grid);
}

.accordion-item {
  border-bottom: 1px solid var(--line-grid);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background: none;
  border: none;
  color: var(--ice-100);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  text-align: left;
  padding: var(--space-5) 0;
  cursor: pointer;
}

.accordion-chevron {
  width: 18px;
  height: 18px;
  color: var(--ice-400);
  transition: transform 0.3s var(--ease-out), color 0.3s var(--ease-out);
  flex-shrink: 0;
}

.accordion-item.is-open .accordion-chevron {
  transform: rotate(180deg);
  color: var(--teal-500);
}

.accordion-panel-inner {
  padding-bottom: var(--space-5);
  max-width: 680px;
}

.accordion-panel-inner p {
  font-size: 14.5px;
  color: var(--ice-300);
  margin: 0;
}

/* The collapse behavior only exists under this JS-confirmed class */
html.js-accordion-ready [data-accordion-panel] {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease-out);
}

/* ============================================================
   Calculator
   ============================================================ */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: start;
}

@media (max-width: 860px) {
  .calc-layout {
    grid-template-columns: 1fr;
  }
}

.field-group {
  margin-bottom: var(--space-5);
}

.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ice-600);
  margin-bottom: var(--space-2);
}

.field-input,
.field-select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--line-grid-bright);
  color: var(--ice-100);
  font-family: var(--font-mono);
  font-size: 16px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
  appearance: none;
}

.field-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393a5ae' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
  font-family: var(--font-body);
  cursor: pointer;
}

.field-input:focus,
.field-select:focus {
  outline: none;
  border-color: var(--teal-500);
}

.field-hint {
  font-size: 12.5px;
  color: var(--ice-600);
  margin-top: var(--space-2);
}

.calc-result-card {
  background: var(--bg-panel);
  border: 1px solid var(--line-grid);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  position: sticky;
  top: 100px;
}

.calc-result-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ice-600);
  margin-bottom: var(--space-2);
}

.calc-result-value {
  font-family: var(--font-mono);
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 700;
  color: var(--teal-500);
  line-height: 1.1;
  margin-bottom: var(--space-6);
  word-break: break-word;
}

.calc-result-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px dashed var(--line-grid);
  font-size: 14px;
}

.calc-result-row:last-of-type {
  border-bottom: none;
}

.calc-result-row .value {
  font-family: var(--font-mono);
  color: var(--ice-100);
}

.calc-disclaimer {
  font-size: 12px;
  color: var(--ice-600);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-grid);
  line-height: 1.6;
}

.calc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ice-600);
  margin-bottom: var(--space-4);
  opacity: 0;
  transition: opacity 0.2s;
}

.calc-status.is-visible {
  opacity: 1;
}
