:root {
  --bg:           #0a0c10;
  --surface:      #10141c;
  --surface2:     #161b26;
  --border:       #1e2535;
  --border-bright:#2a3550;
  --accent:       #00d4ff;
  --accent2:      #7b61ff;
  --accent3:      #00ff88;
  --text:         #e2e8f0;
  --text-dim:     #64748b;
  --text-mid:     #94a3b8;
  --warn:         #f59e0b;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'IBM Plex Sans', sans-serif;
  --max-w: 960px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Fixed grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.wrapper {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}


/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,12,16,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
}
.logo .logo-dim { color: var(--text-dim); }
.logo .logo-white { color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); }

.nav-pill {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent3);
  border: 1px solid rgba(0,255,136,0.25);
  background: rgba(0,255,136,0.04);
  padding: 3px 10px;
  border-radius: 2px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.nav-pill::before {
  content: '● ';
  animation: blink 2s infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

/* ── Nav Dropdown (v0.2) ────────────────────────────────────────── */

.nav-has-dropdown { position: relative; }
.nav-dropdown-trigger { display: flex; align-items: center; gap: 5px; }
.nav-arrow { font-size: 8px; opacity: 0.55; transition: transform 0.2s; }
.nav-has-dropdown:hover .nav-arrow { transform: rotate(180deg); }

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: -16px;
  min-width: 268px;
  background: #10141c;
  border: 1px solid #2a3550;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  z-index: 9999;
  padding: 4px 0;
}

/* Invisible hover buffer above dropdown to prevent collapse during mouse movement */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  pointer-events: auto;
}
.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown:focus-within .nav-dropdown { display: block; }

/* Keep dropdown visible when hovering over it directly */
.nav-dropdown:hover { display: block; }

.nav-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  text-decoration: none;
  border-bottom: 1px solid #1e2535;
  transition: background 0.1s;
}
.nav-dd-item:last-child { border-bottom: none; }
.nav-dd-item:hover { background: #161b26; }
.nav-dd-item.current { background: #161b26; }

.nav-dd-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: #64748b;
  width: 16px;
  flex-shrink: 0;
}
.nav-dd-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: #94a3b8;
  flex: 1;
  transition: color 0.1s;
}
.nav-dd-item:hover .nav-dd-label { color: #e2e8f0; }
.nav-dd-item.current .nav-dd-label { color: #00d4ff; }
.nav-dd-live {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  color: #00ff88;
  border: 1px solid rgba(0,255,136,0.3);
  padding: 2px 6px;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}


/* ============================================================
   SECTION HEADERS — shared pattern
   ============================================================ */
.section-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.section-rule h2,
.section-rule span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.section-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* Subtle glow behind headline */
.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse at center, rgba(0,212,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.5s 0.1s ease forwards;
}

.hero h1 {
  font-size: clamp(34px, 5.5vw, 58px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.5s 0.2s ease forwards;
}
.hero h1 .accent { color: var(--accent); font-weight: 600; }

.hero-subhead {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.75;
  max-width: 540px;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 0.5s 0.3s ease forwards;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.5s 0.4s ease forwards;
}

.btn-primary {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 28px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s, transform 0.15s;
  border-radius: 2px;
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 28px;
  background: transparent;
  color: var(--text-mid);
  border: 1px solid var(--border-bright);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: border-color 0.2s, color 0.2s;
  border-radius: 2px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.5s 0.5s ease forwards;
}
.hero-stat {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-stat::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--border-bright);
  border-radius: 50%;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
  from { opacity: 0; transform: translateY(10px); }
}

/* ============================================================
   TOOLS GRID
   ============================================================ */
.tools-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.tool-card {
  background: var(--surface);
  padding: 24px;
  position: relative;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.tool-card:hover { background: var(--surface2); }

/* Live card — accent top border */
.tool-card.live {
  border-top: 2px solid var(--accent3);
}
.tool-card.live .tool-badge {
  color: var(--accent3);
  border-color: rgba(0,255,136,0.3);
  background: rgba(0,255,136,0.05);
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border-bright);
  padding: 2px 8px;
  border-radius: 2px;
  width: fit-content;
}
.tool-badge .blink { animation: blink 2s infinite; }

.tool-num {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--border-bright);
}

.tool-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-top: 4px;
}

.tool-inputs {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.6;
}

.tool-cta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.05em;
  margin-top: auto;
  padding-top: 8px;
  transition: opacity 0.15s;
}
.tool-cta:hover { opacity: 0.7; }
.tool-cta.dim { color: var(--text-dim); cursor: default; }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.steps-row {
  display: grid;
  grid-template-columns: 1fr 24px 1fr 24px 1fr;
  gap: 0;
  align-items: start;
}

.step-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 14px;
}
.step-connector::after {
  content: '';
  width: 100%;
  height: 1px;
  border-top: 1px dashed var(--border-bright);
}

.step-item {
  padding: 0 4px;
}

.step-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  border: 1px solid rgba(0,212,255,0.3);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.step-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.step-text {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.7;
}

/* ============================================================
   HARDWARE CATALOG
   ============================================================ */
.hardware-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.hw-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.hw-card {
  background: var(--surface);
  padding: 20px 18px;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hw-card:hover { background: var(--surface2); }

.hw-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  min-height: 34px;
  display: flex;
  align-items: flex-start;
}

.hw-specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hw-spec {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.hw-spec-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hw-spec-val {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.hw-spec-val.tops { color: var(--accent3); }
.hw-spec-val.power { color: var(--warn); }

.hw-link {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  transition: opacity 0.15s;
}
.hw-link:hover { opacity: 0.7; }

/* ============================================================
   JSON CALLOUT
   ============================================================ */
.json-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.json-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.json-text h3 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  color: var(--text);
}

.json-text p {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 12px;
}

.json-text p:last-child { margin-bottom: 0; }

.json-block-wrap {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-left: 2px solid var(--accent2);
  overflow: hidden;
}

.json-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.json-block-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.json-schema-badge {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent2);
  letter-spacing: 0.06em;
}

pre.json-block {
  padding: 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-mid);
  line-height: 1.7;
  overflow-x: auto;
  background: var(--surface);
  border: none;
  border-radius: 0;
  margin: 0;
}

.jk { color: var(--accent); }
.js { color: var(--accent3); }
.jn { color: var(--warn); }

/* ============================================================
   USE CASES
   ============================================================ */
.usecases-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.usecase-card {
  background: var(--surface);
  padding: 22px 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.2s;
  position: relative;
}
.usecase-card:hover { background: var(--surface2); }
.usecase-card:hover .usecase-arrow { opacity: 1; }

.usecase-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.usecase-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.usecase-desc {
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.6;
  font-family: var(--mono);
}

.usecase-arrow {
  position: absolute;
  bottom: 18px;
  right: 18px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
}

/* ============================================================
   KNOWLEDGE CTA
   ============================================================ */
.knowledge-section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

.knowledge-inner {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-left: 2px solid var(--accent);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.knowledge-text h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.knowledge-text p {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 500px;
}

.knowledge-text a {
  color: var(--accent);
  text-decoration: none;
}
.knowledge-text a:hover { text-decoration: underline; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  display: block;
  margin-bottom: 10px;
  text-decoration: none;
}

.footer-tagline {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 14px;
  max-width: 280px;
}

.footer-version {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.footer-col h4 {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent); }

.footer-col .tag-dim {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 2px;
  margin-left: 4px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom-left,
.footer-bottom-right {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .hw-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps-row { grid-template-columns: 1fr; gap: 24px; }
  .step-connector { display: none; }
  .json-container { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .tools-grid { grid-template-columns: 1fr; }
  .hw-grid { grid-template-columns: repeat(2, 1fr); }
  .usecases-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .nav-links { display: none; }
  .hero { padding: 56px 0 44px; }
  .hero h1 { font-size: 30px; }
  .knowledge-inner { flex-direction: column; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}

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

.breadcrumb span {
  color: var(--border-bright);
  margin: 0 6px;
}

/* Optional: only needed if page uses .logo .d / .logo .w instead of .logo-dim / .logo-white */
.logo .d { color: var(--text-dim); }
.logo .w { color: var(--text); }

/* ============================================================
   HERO CONTENT HELPERS
   ============================================================ */
.hero h1 strong {
  font-weight: 600;
  color: var(--accent);
}

.hero p {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 580px;
}

/* ============================================================
   ENGINE / TOOL FORM LAYOUT
   ============================================================ */
.engine {
  padding: 48px 0;
}

.engine-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.engine-header h2 {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
}

.engine-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.step {
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.4s ease forwards;
}

.step:nth-child(1) { animation-delay: .1s; }
.step:nth-child(2) { animation-delay: .2s; }
.step:nth-child(3) { animation-delay: .3s; }
.step:nth-child(4) { animation-delay: .4s; }
.step:nth-child(5) { animation-delay: .5s; }
.step:nth-child(6) { animation-delay: .6s; }
.step:nth-child(7) { animation-delay: .7s; }

.step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.step-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.step-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin-left: 32px;
  margin-bottom: 12px;
  font-family: var(--mono);
}

.option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: 32px;
}

.opt {
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 14px;
  border: 1px solid var(--border-bright);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 2px;
  position: relative;
  user-select: none;
}

.opt:hover {
  border-color: rgba(0,212,255,0.4);
  color: var(--text);
  background: var(--surface2);
}

.opt.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,212,255,0.05);
}

.opt.selected::after {
  content: '✓';
  position: absolute;
  top: -6px;
  right: -6px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  color: var(--bg);
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.slider-track {
  display: flex;
  gap: 6px;
  margin-left: 32px;
  margin-bottom: 8px;
}

.slider-opt {
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 12px;
  border: 1px solid var(--border-bright);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 2px;
  min-width: 48px;
  text-align: center;
  user-select: none;
}

.slider-opt:hover {
  border-color: rgba(0,212,255,0.4);
  color: var(--text);
}

.slider-opt.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,212,255,0.05);
}

.step-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-left: 32px;
  margin-top: 6px;
}

.run-section {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-run {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 32px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-run::before {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-run:hover::before {
  opacity: 0.1;
}

.btn-run:active {
  transform: scale(0.98);
}

.btn-run:disabled {
  background: var(--border-bright);
  color: var(--text-dim);
  cursor: not-allowed;
}

.run-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}

/* ============================================================
   PROCESSING
   ============================================================ */
.processing {
  display: none;
  padding: 40px 0;
  text-align: center;
}

.processing.visible {
  display: block;
}

.proc-label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.proc-bar {
  width: 240px;
  height: 2px;
  background: var(--border);
  margin: 0 auto;
  overflow: hidden;
}

.proc-fill {
  width: 40%;
  height: 100%;
  background: var(--accent);
  animation: slide 1s ease infinite;
}

@keyframes slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ============================================================
   RESULTS / BOM
   ============================================================ */
.results {
  display: none;
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.results.visible {
  display: block;
  animation: fadeUp 0.5s ease forwards;
}

.results-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.results-header h2 {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.results-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.bom-summary {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-top: 2px solid var(--accent);
  padding: 28px;
  margin-bottom: 24px;
}

.bom-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.bom-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.bom-sub {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 24px;
}

.bom-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  padding: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.total-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.total-value {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 600;
}

.total-value.green { color: var(--accent3); }
.total-value.amber { color: var(--warn); }
.total-value.cyan { color: var(--accent); }
.total-value.purple { color: var(--accent2); }

.bom-section {
  margin-bottom: 20px;
}

.bom-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}

.bom-section-header:hover {
  background: var(--border);
}

.bom-section-title {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-mid);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bom-section-total {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--warn);
}

.bom-section-toggle {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

.bom-section-body {
  border: 1px solid var(--border);
  border-top: none;
  background: var(--surface);
}

.bom-section-body.collapsed {
  display: none;
}

.bom-line {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.bom-line:last-child {
  border-bottom: none;
}

.bom-line-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.bom-line-spec {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}

.bom-line-qty {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-mid);
  text-align: right;
  white-space: nowrap;
}

.bom-line-cost {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--warn);
  text-align: right;
  white-space: nowrap;
}

.bom-line-flag {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 7px;
  border: 1px solid;
  border-radius: 2px;
  white-space: nowrap;
}

.flag-warn {
  color: var(--warn);
  border-color: rgba(245,158,11,0.3);
  background: rgba(245,158,11,0.05);
}

.flag-ok {
  color: var(--accent3);
  border-color: rgba(0,255,136,0.3);
  background: rgba(0,255,136,0.05);
}

.bom-rationale {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.75;
  border-left: 2px solid var(--accent);
  padding-left: 16px;
  margin: 20px 0;
}

.confidence-bar {
  margin-top: 16px;
}

.confidence-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.confidence-track {
  height: 4px;
  background: var(--border-bright);
  border-radius: 2px;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 2px;
  transition: width 1.2s ease;
}

.cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn-primary-sm {
  font-family: var(--mono);
  font-size: 12px;
  padding: 10px 20px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}

.btn-primary-sm:hover {
  opacity: 0.85;
}

.btn-ghost-sm {
  font-family: var(--mono);
  font-size: 12px;
  padding: 10px 20px;
  background: transparent;
  color: var(--text-mid);
  border: 1px solid var(--border-bright);
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}

.btn-ghost-sm:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.warnings-panel {
  margin-top: 24px;
}

.warn-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(245,158,11,0.2);
  background: rgba(245,158,11,0.03);
  margin-bottom: 8px;
}

.warn-icon {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--warn);
  flex-shrink: 0;
  padding-top: 1px;
}

.warn-text {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.6;
}

.json-block {
  margin-top: 32px;
  border: 1px solid var(--border);
}

.json-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.json-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.btn-copy {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  background: none;
  border: 1px solid rgba(0,212,255,0.3);
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy:hover {
  background: rgba(0,212,255,0.05);
}

pre.json-content {
  padding: 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-mid);
  overflow-x: auto;
  line-height: 1.6;
  background: var(--surface);
}

pre.json-content .key { color: var(--accent); }
pre.json-content .str { color: var(--accent3); }
pre.json-content .num { color: var(--warn); }

.share-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.share-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.share-url {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mid);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 10px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-share {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--bg);
  background: var(--accent2);
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 600;
}

.btn-reset {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--border);
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 32px;
}

.btn-reset:hover {
  border-color: var(--border-bright);
  color: var(--text);
}

/* ============================================================
   RESPONSIVE ADDITIONS FOR TOOL / BOM PAGES
   ============================================================ */
@media (max-width: 640px) {
  .option-grid,
  .slider-track,
  .step-note {
    margin-left: 0;
  }

  .bom-line {
    grid-template-columns: 1fr auto;
  }

  .bom-line-qty {
    display: none;
  }
}


/* ============================================================
   POWER / TOOL CARD EXTENSIONS
   ============================================================ */

.primary-card {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-top: 2px solid var(--accent);
  padding: 28px;
  margin-bottom: 16px;
}

.card-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.card-device {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.card-tagline {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 20px;
}

.card-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
  padding: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.metric-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.metric-value {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.metric-value.accent { color: var(--accent3); }
.metric-value.warn { color: var(--warn); }
.metric-value.purple { color: var(--accent2); }

.card-reason {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.7;
  border-left: 2px solid var(--accent);
  padding-left: 16px;
  margin-bottom: 20px;
}

.btn-purchase {
  font-family: var(--mono);
  font-size: 12px;
  padding: 10px 20px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  border-radius: 2px;
}

.btn-purchase:hover {
  opacity: 0.85;
}

.btn-docs {
  font-family: var(--mono);
  font-size: 12px;
  padding: 10px 20px;
  background: transparent;
  color: var(--text-mid);
  border: 1px solid var(--border-bright);
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  border-radius: 2px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-docs:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   POWER-SPECIFIC BOM TABLE
   ============================================================ */

.bom-table {
  margin-top: 24px;
  border: 1px solid var(--border);
}

.bom-header {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  padding: 10px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.bom-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.bom-row:last-child {
  border-bottom: none;
}

.bom-row.header-row {
  background: var(--surface2);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bom-item {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-mid);
}

.bom-item.name {
  color: var(--text);
}

.bom-item.val {
  color: var(--accent3);
}

.bom-item.total {
  color: var(--warn);
  font-weight: 600;
}

.bom-row.total-row {
  background: rgba(0, 212, 255, 0.03);
  border-top: 1px solid var(--border-bright);
}

.bom-row.total-row .bom-item {
  color: var(--text);
  font-weight: 600;
}

.bom-row.total-row .bom-item.total {
  color: var(--warn);
  font-size: 14px;
}

/* ============================================================
   ALTERNATIVE / RECOMMENDATION CARDS
   ============================================================ */

.alt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.alt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px;
  transition: border-color 0.2s;
}

.alt-card:hover {
  border-color: var(--border-bright);
}

.alt-badge {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.alt-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.alt-reason {
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 12px;
  font-family: var(--mono);
}

.alt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 8px;
  border: 1px solid var(--border-bright);
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ============================================================
   STREAM-STYLE SELECTOR ALIASES
   ============================================================ */

.stream-slider {
  margin-left: 32px;
}

.stream-opt {
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 12px;
  border: 1px solid var(--border-bright);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 2px;
  min-width: 52px;
  text-align: center;
  user-select: none;
}

.stream-opt:hover {
  border-color: rgba(0,212,255,0.4);
  color: var(--text);
}

.stream-opt.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,212,255,0.05);
}

.stream-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ============================================================
   RESPONSIVE ADDITIONS
   ============================================================ */

@media (max-width: 640px) {
  .stream-slider {
    margin-left: 0;
  }

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

  .run-section {
    flex-direction: column;
    align-items: flex-start;
  }

  .bom-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   STORAGE / LIFESPAN PAGE DELTA
   ============================================================ */

.metric-value.red {
  color: #ef4444;
}

/* Lifespan bar */
.lifespan-section {
  margin-top: 24px;
}

.lifespan-header {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.lifespan-bar-wrap {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 20px;
}

.lifespan-years {
  display: flex;
  gap: 2px;
  margin-bottom: 8px;
}

.year-block {
  height: 28px;
  flex: 1;
  background: var(--border);
  border-radius: 1px;
  position: relative;
  transition: background 0.3s;
}

.year-block.alive {
  background: var(--accent3);
}

.year-block.warning {
  background: var(--warn);
}

.year-block.dead {
  background: #ef4444;
}

.year-block .yr-label {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-dim);
}

.lifespan-legend {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 1px;
}