/* ================================================================
   ExergyNet Design System v3.1
   Single source of truth — Dark + Light mode, full component set
================================================================ */

@import url("https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400&family=Barlow+Condensed:wght@600;700;800;900&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap");

/* ================================================================
   DESIGN TOKENS — DARK (default)
================================================================ */

:root {
  --bg:          #03060d;
  --bg-surface:  #060c18;
  --bg-card:     #091525;
  --bg-card-2:   #0b1a2e;
  --text:        #ddeeff;
  --text-soft:   #7896b8;
  --text-faint:  #3a5070;
  --border:      rgba(60, 140, 220, 0.10);
  --border-mid:  rgba(60, 140, 220, 0.18);
  --border-hi:   rgba(0, 232, 135, 0.30);
  --accent:      #00e887;
  --accent-dim:  rgba(0, 232, 135, 0.12);
  --accent-dark: #00b868;
  --accent-glow: rgba(0, 232, 135, 0.25);
  --blue:        #4e9eff;
  --blue-dim:    rgba(78, 158, 255, 0.10);
  --blue-glow:   rgba(78, 158, 255, 0.20);
  --amber:       #ffb830;
  --amber-dim:   rgba(255, 184, 48, 0.10);
  --red:         #ff5a5a;
  --red-dim:     rgba(255, 90, 90, 0.10);
  --nav-bg:      rgba(3, 6, 13, 0.82);
  --mono:    "Space Mono", ui-monospace, monospace;
  --sans:    "Barlow", system-ui, sans-serif;
  --display: "Barlow Condensed", "Barlow", sans-serif;
  --radius:     8px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --nav-h:      58px;
  --max-w:      960px;
  --max-w-wide: 1120px;
}

/* ================================================================
   DESIGN TOKENS — LIGHT
================================================================ */

[data-theme="light"] {
  --bg:          #eef2f8;
  --bg-surface:  #e2e9f3;
  --bg-card:     #ffffff;
  --bg-card-2:   #f4f7fc;
  --text:        #0c1c30;
  --text-soft:   #3a5070;
  --text-faint:  #8aabcc;
  --border:      rgba(26, 90, 160, 0.10);
  --border-mid:  rgba(26, 90, 160, 0.18);
  --border-hi:   rgba(0, 160, 90, 0.28);
  --accent:      #007a42;
  --accent-dim:  rgba(0, 122, 66, 0.10);
  --accent-dark: #005c30;
  --accent-glow: rgba(0, 122, 66, 0.18);
  --blue:        #1558b0;
  --blue-dim:    rgba(21, 88, 176, 0.09);
  --blue-glow:   rgba(21, 88, 176, 0.16);
  --amber:       #955c00;
  --amber-dim:   rgba(149, 92, 0, 0.09);
  --red:         #b01c1c;
  --red-dim:     rgba(176, 28, 28, 0.09);
  --nav-bg:      rgba(238, 242, 248, 0.90);
}

/* ================================================================
   RESET
================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ================================================================
   BODY + BACKGROUND
================================================================ */

body {
  font-family: var(--sans);
  background:
    radial-gradient(ellipse 60% 40% at 10% 0%,  rgba(0, 232, 135, 0.07) 0%, transparent 100%),
    radial-gradient(ellipse 60% 40% at 90% 5%,  rgba(78, 158, 255, 0.07) 0%, transparent 100%),
    var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

[data-theme="light"] body {
  background:
    radial-gradient(ellipse 60% 40% at 10% 0%,  rgba(0, 122, 66, 0.05) 0%, transparent 100%),
    radial-gradient(ellipse 60% 40% at 90% 5%,  rgba(21, 88, 176, 0.06) 0%, transparent 100%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ================================================================
   CIRCUIT CANVAS
================================================================ */

#circuit-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ================================================================
   STACKING & LAYOUT
================================================================ */

.site-wrap {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#site-header,
#main-nav      { position: relative; z-index: 100; }

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

#site-footer,
#main-footer   { position: relative; z-index: 1; margin-top: auto; }

.container      { max-width: var(--max-w);      margin: 0 auto; padding: 0 2rem; }
.container-wide { max-width: var(--max-w-wide); margin: 0 auto; padding: 0 2rem; }
.page           { padding-top: var(--nav-h); min-height: 100vh; }

/* ================================================================
   NAV
================================================================ */

#main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 0.75rem;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-logo {
  font-family: var(--display);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.nav-logo:hover { color: var(--accent); }

.nav-logo-mark {
  width: 26px; height: 26px;
  border: 2px solid var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: box-shadow 0.2s, border-color 0.3s;
}
.nav-logo:hover .nav-logo-mark { box-shadow: 0 0 14px var(--accent-glow); }

.nav-logo-mark::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse-dot 2.4s ease-in-out infinite;
  transition: background 0.3s, box-shadow 0.3s;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1;   transform: scale(1);    box-shadow: 0 0 10px var(--accent); }
  50%       { opacity: 0.4; transform: scale(0.58); box-shadow: 0 0 4px  var(--accent); }
}

.nav-links {
  display: flex;
  flex: 1;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links li { flex-shrink: 0; }

.nav-links a {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 0 12px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  position: relative;
  transition: color 0.15s;
  white-space: nowrap;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0; left: 12px; right: 12px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
  border-radius: 2px 2px 0 0;
}
.nav-links a:hover             { color: var(--text); }
.nav-links a:hover::after      { transform: scaleX(0.5); opacity: 0.5; }
.nav-links a.active            { color: var(--accent); }
.nav-links a.active::after     { transform: scaleX(1); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-social { display: flex; gap: 2px; margin-right: 4px; }

.nav-social-link {
  width: 30px; height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--text-faint);
  font-size: 14px;
  transition: color 0.15s, background 0.15s;
}
.nav-social-link:hover { color: var(--text-soft); background: rgba(128,128,128,0.08); }

.theme-toggle {
  width: 34px; height: 34px;
  background: none;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 16px;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.2s;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: rotate(22deg);
}

.hamburger {
  width: 34px; height: 34px;
  background: none;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 16px;
  transition: color 0.15s;
}
.hamburger:hover { color: var(--text); }

/* ================================================================
   FOOTER
================================================================ */

#main-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 3rem 2rem 2.25rem;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.footer-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr auto;
  gap: 3rem;
  align-items: start;
}

.footer-brand { display: flex; flex-direction: column; gap: 0.75rem; }

.footer-logo {
  font-family: var(--display);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  display: inline-block;
  flex-shrink: 0;
  animation: pulse-dot 2.4s ease-in-out infinite;
  transition: background 0.3s, box-shadow 0.3s;
}

.footer-tagline { font-size: 12px; color: var(--text-faint); line-height: 1.65; max-width: 200px; }

.footer-nav { display: flex; gap: 3rem; flex-wrap: wrap; }

.footer-col { display: flex; flex-direction: column; gap: 0.5rem; }

.footer-col-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.3rem;
}

.footer-col a { font-size: 13px; color: var(--text-soft); transition: color 0.15s; white-space: nowrap; }
.footer-col a:hover { color: var(--accent); }

.footer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.6rem; padding-top: 2px; }

.footer-status {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.05em;
  color: var(--accent);
}

.footer-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}

.footer-copy,
.footer-program { font-size: 11px; color: var(--text-faint); font-family: var(--mono); }

.footer-program code {
  font-family: var(--mono); font-size: 10px;
  color: var(--text-faint); background: none; padding: 0;
}

/* ================================================================
   TYPOGRAPHY
================================================================ */

h1 {
  font-family: var(--display);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1.5rem;
  transition: color 0.3s;
}

h1 .accent { color: var(--accent); }
h1 .blue   { color: var(--blue); }

h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: 0.75rem;
  transition: color 0.3s;
}

h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

h4 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.25rem;
  transition: color 0.3s;
}

p { color: var(--text-soft); font-weight: 300; line-height: 1.7; transition: color 0.3s; }
p:not(:last-child) { margin-bottom: 0.75rem; }

/* ================================================================
   CODE
================================================================ */

code {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.3s, background 0.3s;
}

pre {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  color: var(--text-soft);
  margin: 0.75rem 0;
  line-height: 1.7;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
pre code { background: none; padding: 0; font-size: inherit; color: inherit; }

.code-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 1rem 0 0.3rem;
  transition: color 0.3s;
}

/* ================================================================
   SECTIONS + LABELS
================================================================ */

section { padding: 4.5rem 0; }
section + section { border-top: 1px solid var(--border); }

.section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
  transition: color 0.3s;
}

/* ================================================================
   HERO
================================================================ */

.hero { padding: 5rem 0 4.5rem; position: relative; overflow: hidden; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0, 232, 135, 0.20);
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 1.75rem;
  text-transform: uppercase;
  transition: color 0.3s, background 0.3s, border-color 0.3s;
}
[data-theme="light"] .hero-eyebrow { border-color: rgba(0, 122, 66, 0.25); }

.hero-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  display: inline-block;
  flex-shrink: 0;
  animation: pulse-dot 2s infinite;
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-soft);
  max-width: 600px;
  margin-bottom: 2.5rem;
  font-weight: 300;
  line-height: 1.75;
  transition: color 0.3s;
}

.glow-accent,
.glow-blue {
  position: absolute; border-radius: 50%;
  pointer-events: none; filter: blur(90px);
}
.glow-accent { background: radial-gradient(circle, rgba(0,232,135,0.12) 0%, transparent 70%); }
.glow-blue   { background: radial-gradient(circle, rgba(78,158,255,0.10) 0%, transparent 70%); }
[data-theme="light"] .glow-accent { background: radial-gradient(circle, rgba(0,122,66,0.07) 0%, transparent 70%); }
[data-theme="light"] .glow-blue   { background: radial-gradient(circle, rgba(21,88,176,0.07) 0%, transparent 70%); }

/* ================================================================
   BUTTONS
================================================================ */

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--display); font-size: 13px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 10px 22px; border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer; line-height: 1; white-space: nowrap;
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--accent); color: #021a0f; border-color: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); box-shadow: 0 0 32px var(--accent-glow); }
[data-theme="light"] .btn-primary { color: #fff; }

.btn-secondary { background: var(--bg-card); color: var(--text); border-color: var(--border-mid); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.btn-ghost { background: none; color: var(--text-soft); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--border-mid); }

.btn-blue { background: var(--blue-dim); color: var(--blue); border-color: var(--blue); box-shadow: 0 0 16px var(--blue-glow); }
.btn-blue:hover { background: var(--blue); color: #010d1a; box-shadow: 0 0 28px var(--blue-glow); }
[data-theme="light"] .btn-blue:hover { color: #fff; }

/* ================================================================
   CARDS
================================================================ */

/* Grid variant — seamless tile layout */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin: 2rem 0;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin: 2rem 0;
}

/* All cards get the base style */
.card {
  background: var(--bg-card);
  padding: 1.5rem;
  transition: background 0.2s;
}
.card:hover { background: var(--bg-card-2); }

/* Standalone card (outside grid) gets border + radius */
:not(.card-grid):not(.card-grid-2) > .card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

.card.accent-border { border-left: 3px solid var(--accent) !important; }
.card.blue-border   { border-left: 3px solid var(--blue)   !important; }

/* ================================================================
   STAT STRIP
================================================================ */

.stat-strip,
.trust-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 2.5rem 0;
}

.stat-item,
.trust-item { background: var(--bg-surface); padding: 1.1rem 1.25rem; transition: background 0.2s; }
.stat-item:hover,
.trust-item:hover { background: var(--bg-card); }

.stat-label,
.trust-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.10em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 0.4rem;
  transition: color 0.3s;
}

.stat-value,
.trust-value {
  font-family: var(--display); font-size: 1.1rem; font-weight: 800;
  color: var(--text); word-break: break-all; transition: color 0.3s;
}
.stat-value.green, .trust-value.green { color: var(--accent); }
.stat-value.blue,  .trust-value.blue  { color: var(--blue); }

/* ================================================================
   BADGES
================================================================ */

.badge {
  font-family: var(--mono); font-size: 9px;
  display: inline-block; padding: 3px 8px; border-radius: 4px;
  letter-spacing: 0.06em; font-weight: 700; text-transform: uppercase;
  transition: all 0.3s;
}
.badge-green { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(0,232,135,0.2); }
.badge-blue  { background: var(--blue-dim);   color: var(--blue);   border: 1px solid rgba(78,158,255,0.2); }
.badge-amber { background: var(--amber-dim);  color: var(--amber);  border: 1px solid rgba(255,184,48,0.2); }
.badge-red   { background: var(--red-dim);    color: var(--red);    border: 1px solid rgba(255,90,90,0.2); }
.badge-gray  { background: rgba(128,128,128,0.08); color: var(--text-faint); border: 1px solid var(--border); }

[data-theme="light"] .badge-green { border-color: rgba(0,122,66,0.25); }
[data-theme="light"] .badge-blue  { border-color: rgba(21,88,176,0.25); }

/* ================================================================
   FLOW DIAGRAM
================================================================ */

.flow {
  display: flex; align-items: center; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; margin: 1.5rem 0; gap: 0;
}
.flow-step {
  background: var(--bg-card); border: 1px solid var(--border-mid);
  padding: 8px 14px; border-radius: 6px; color: var(--text-soft);
  white-space: nowrap; transition: all 0.3s;
}
.flow-step.active { background: var(--accent-dim); border-color: rgba(0,232,135,0.35); color: var(--accent); }
.flow-step.blue   { background: var(--blue-dim);   border-color: rgba(78,158,255,0.3); color: var(--blue); }
[data-theme="light"] .flow-step.blue { border-color: rgba(21,88,176,0.3); }
.flow-arrow { color: var(--text-faint); padding: 0 8px; transition: color 0.3s; }

/* ================================================================
   TELEMETRY PANEL
================================================================ */

.telemetry-panel {
  background: var(--bg-card); border: 1px solid var(--border-mid);
  border-radius: var(--radius-xl); padding: 1.5rem;
  transition: background 0.3s, border-color 0.3s;
}
.telemetry-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--border);
  transition: border-color 0.3s;
}
.telemetry-row:first-child { padding-top: 0; }
.telemetry-row:last-child  { border-bottom: none; padding-bottom: 0; }
.tele-label { font-family: var(--mono); font-size: 11px; color: var(--text-soft); transition: color 0.3s; }
.tele-value { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--accent); text-align: right; transition: color 0.3s; }

/* ================================================================
   SPEC LIST
================================================================ */

.spec-list { list-style: none; }
.spec-list li {
  display: flex; gap: 1rem; padding: 0.65rem 0;
  border-bottom: 1px solid var(--border); font-size: 14px;
  transition: border-color 0.3s;
}
.spec-list li:last-child { border-bottom: none; }
.spec-key {
  font-family: var(--mono); font-size: 11px; color: var(--text-faint);
  min-width: 110px; padding-top: 1px; flex-shrink: 0; transition: color 0.3s;
}
.spec-val { color: var(--text-soft); transition: color 0.3s; word-break: break-word; }

/* ================================================================
   TABLES
================================================================ */

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  font-family: var(--mono); font-size: 10px; color: var(--text-faint);
  letter-spacing: 0.09em; text-transform: uppercase;
  padding: 0 1rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border-mid);
}
td {
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
  color: var(--text-soft); vertical-align: top;
}
td:first-child { color: var(--text); font-family: var(--mono); font-size: 12px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(128,128,128,0.04); }

/* ================================================================
   ADDRESS
================================================================ */

.address {
  font-family: var(--mono); font-size: 12px; color: var(--accent);
  word-break: break-all; background: var(--accent-dim);
  border: 1px solid rgba(0,232,135,0.25);
  padding: 10px 14px; border-radius: var(--radius); display: block; margin: 0.75rem 0;
  transition: all 0.3s;
}

/* ================================================================
   PAGE HEADER
================================================================ */

.page-header { padding: 4rem 0 2.5rem; border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: 0.75rem; }
.page-header p  { font-size: 1.05rem; max-width: 620px; }

/* ================================================================
   ROADMAP PHASES
================================================================ */

.phase {
  border-left: 2px solid var(--border-mid); padding-left: 1.5rem;
  margin-bottom: 2.25rem; position: relative; transition: border-color 0.3s;
}
.phase::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg-card); border: 2px solid var(--border-mid);
  position: absolute; left: -6px; top: 4px; transition: all 0.3s;
}
.phase.done::before   { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.phase.active::before { background: var(--amber);  border-color: var(--amber);  animation: pulse-dot 2s infinite; }

.phase-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 0.75rem; transition: color 0.3s; }
.phase-label.done    { color: var(--accent); }
.phase-label.active  { color: var(--amber); }
.phase-label.planned { color: var(--text-faint); }

.phase-items { list-style: none; }
.phase-items li {
  font-size: 14px; color: var(--text-soft); padding: 4px 0;
  display: flex; align-items: flex-start; gap: 8px; transition: color 0.3s;
}
.phase-items li::before { content: "–"; color: var(--text-faint); font-family: var(--mono); flex-shrink: 0; margin-top: 1px; }

/* ================================================================
   CTA SECTION
================================================================ */

.cta-section { text-align: center; padding: 6rem 0; position: relative; overflow: hidden; }
.cta-section h2 { font-size: clamp(2rem, 4vw, 3.5rem); max-width: 700px; margin: 0 auto 1rem; }
.cta-section p  { max-width: 500px; margin: 0 auto 2rem; }

/* ================================================================
   AGENT PAGE SPECIFICS
================================================================ */

.json-block {
  font-family: var(--mono); font-size: 13px; line-height: 1.9;
  background: var(--bg-surface); border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg); padding: 1.5rem; overflow-x: auto;
  transition: background 0.3s, border-color 0.3s;
}
.json-key { color: var(--blue); }
.json-str { color: var(--accent); }
.json-arr { color: var(--text-soft); }

.checklist { list-style: none; display: grid; gap: 0.75rem; }
.checklist li {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 0.9rem 1.25rem; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  font-size: 14px; color: var(--text-soft);
  transition: border-color 0.2s, background 0.2s;
}
.checklist li:hover { border-color: var(--border-mid); background: var(--bg-card-2); }
.check-num { font-family: var(--mono); font-size: 11px; color: var(--accent); min-width: 24px; padding-top: 1px; flex-shrink: 0; }

/* ================================================================
   WHITEPAPER
================================================================ */

.wp-section { margin-bottom: 2.5rem; }
.wp-section p + p { margin-top: 0.5rem; }

/* ================================================================
   UTILITIES
================================================================ */

.accent { color: var(--accent); }
.blue   { color: var(--blue); }
.amber  { color: var(--amber); }

/* ================================================================
   RESPONSIVE — 900px (tablet)
================================================================ */

@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    row-gap: 2.5rem;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-meta  { align-items: flex-start; }
}

/* ================================================================
   RESPONSIVE — 768px (mobile)
================================================================ */

@media (max-width: 768px) {
  #main-nav { padding: 0 1rem; }

  /* Mobile menu */
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    background: rgba(3, 6, 13, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    z-index: 199;
    overflow-y: auto;
    max-height: calc(100dvh - var(--nav-h));
  }
  [data-theme="light"] .nav-links { background: rgba(238, 242, 248, 0.97); }
  .nav-links.open { display: flex; }

  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a { height: 48px; padding: 0 1.5rem; font-size: 13px; }
  .nav-links a::after { display: none; }
  .nav-links a.active { padding-left: calc(1.5rem - 3px); border-left: 3px solid var(--accent); color: var(--accent); }

  .hamburger  { display: flex; }
  .nav-social { display: none; }

  .container,
  .container-wide { padding: 0 1rem; }

  .card-grid,
  .card-grid-2 { grid-template-columns: 1fr; }

  .stat-strip,
  .trust-strip { grid-template-columns: 1fr 1fr; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-nav   { flex-direction: column; gap: 1.5rem; }
  .footer-meta  { align-items: flex-start; }

  section { padding: 3rem 0; }
  .hero { padding: 3.5rem 0 3rem; }
  .page-header { padding: 2.5rem 0 1.75rem; }
  .cta-section { padding: 4rem 0; }

  /* Hero two-column → single column */
  .hero > .container-wide > div[style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
  }

  /* Flow → vertical */
  .flow { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .flow-arrow { padding: 0; transform: rotate(90deg); width: 32px; text-align: center; }

  h1 { letter-spacing: -0.02em; }
}

/* ================================================================
   RESPONSIVE — 480px (small phones)
================================================================ */

@media (max-width: 480px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.5rem; }

  .stat-strip,
  .trust-strip { grid-template-columns: 1fr; }

  .btn { width: 100%; justify-content: center; }
  .btn-row { flex-direction: column; align-items: stretch; }

  pre { font-size: 11px; padding: 0.9rem 1rem; }
  .spec-key { min-width: 80px; }
  .footer-inner { padding: 0 0.5rem; }
}

/* ================================================================
   SCROLLBAR
================================================================ */

::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: var(--bg); }
::-webkit-scrollbar-thumb  { background: var(--border-mid); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dark); }

/* ================================================================
   MULTI-CHAIN TELEMETRY -- v2
================================================================ */

.chain-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}
.chain-status-row:last-of-type { border-bottom: none; }

.chain-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 12px;
}
.chain-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chain-dot-sol  { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); animation: pulse-dot 2.4s ease-in-out infinite; }
.chain-dot-base { background: var(--blue);   box-shadow: 0 0 8px var(--blue-glow);   animation: pulse-dot 2.8s ease-in-out infinite; }
.chain-name { color: var(--text); font-weight: 700; }
.chain-tag  { color: var(--text-faint); font-size: 10px; }
.chain-status-val { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; }

.telemetry-divider {
  height: 1px;
  background: var(--border-mid);
  margin: 0.75rem 0;
}

/* ================================================================
   MANIFESTO SECTION
================================================================ */

.manifesto-section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.manifesto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.manifesto-headline {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.manifesto-body {
  font-size: 1rem;
  color: var(--text-soft);
  line-height: 1.8;
}
.manifesto-body em { color: var(--text); font-style: italic; }

.manifesto-pull {
  margin-top: 1.5rem;
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
  background: var(--accent-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Terminal */
.manifesto-terminal {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-mid);
  background: var(--bg-surface);
  box-shadow: 0 0 40px rgba(0,0,0,0.4);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card-2);
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}
.t-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.t-red   { background: #ff5f57; }
.t-amber { background: #febc2e; }
.t-green { background: #28c840; }
.t-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-left: 6px;
  flex: 1;
  text-align: center;
}
.terminal-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.85;
}
.t-line { display: block; }
.t-prompt { color: var(--accent); margin-right: 0.4rem; }
.t-cmd    { color: var(--text); }
.t-faint  { color: var(--text-faint); }
.t-green  { color: var(--accent); }
.t-blue   { color: var(--blue); }
.t-accent { color: var(--accent); }
.t-cursor-wrap { margin-top: 0.25rem; }
.t-cursor-blink {
  color: var(--accent);
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ================================================================
   THREE PILLARS SECTION
================================================================ */

.pillars-section { padding: 5rem 0; }

.pillar-card {
  display: flex;
  flex-direction: column;
}
.pillar-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.6rem;
}
.pillar-stat {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.pillar-stat-val {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
}
.pillar-stat-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ================================================================
   M2M CODE TERMINAL SECTION
================================================================ */

.machine-layer {
  padding: 5rem 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg-surface) 30%, var(--bg-surface) 70%, transparent 100%);
}

.code-terminal-block {
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}
.code-terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card-2);
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.code-dots { display: flex; gap: 6px; }
.code-terminal-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  flex: 1;
  text-align: center;
}
.code-lang-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--blue);
  border: 1px solid var(--blue-dim);
  border-radius: 4px;
  padding: 1px 6px;
}
.code-terminal-body {
  padding: 1.5rem 1.75rem;
  margin: 0;
  background: transparent;
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
}
.code-terminal-body code { font-family: var(--mono); }
/* Syntax token classes */
.ck { color: #c678dd; }
.cs { color: #98c379; }
.cm { color: var(--text-faint); }

.runtime-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
.runtime-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-soft);
  background: var(--bg-card);
  transition: border-color 0.2s, background 0.2s;
}
.runtime-badge:hover { border-color: var(--border-mid); background: var(--bg-card-2); }
.runtime-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.runtime-dot.green  { background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }
.runtime-dot.blue   { background: var(--blue);   box-shadow: 0 0 6px var(--blue-glow); }
.runtime-dot.accent { background: var(--amber);  box-shadow: 0 0 6px var(--amber-dim); }

/* ================================================================
   CTA COMMUNITY LINKS
================================================================ */

.cta-community {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.community-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  transition: color 0.15s;
}
.community-link:hover { color: var(--accent); }
.community-icon { font-size: 14px; }

/* ================================================================
   FOOTER CHAIN BADGES
================================================================ */

.footer-chain-badges {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.footer-chain-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}
.footer-chain-badge.sol  {
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0,232,135,0.2);
}
.footer-chain-badge.base {
  color: var(--blue);
  background: var(--blue-dim);
  border: 1px solid rgba(78,158,255,0.2);
}

/* ================================================================
   MANIFESTO RESPONSIVE
================================================================ */

@media (max-width: 900px) {
  .manifesto-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .runtime-grid   { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .manifesto-section { padding: 3rem 0; }
  .pillars-section   { padding: 3rem 0; }
  .machine-layer     { padding: 3rem 0; }
  .manifesto-terminal { display: none; }
  .runtime-grid { grid-template-columns: 1fr 1fr; }
  .cta-community { gap: 1.25rem; }
}
