/* ============================================
   amperebattery.app — site styles
   UI CSS is themed via its documented token
   overrides below; everything bespoke lives in
   amp-* classes. No ui-* style overrides.
   ============================================ */

/* ---------- UI CSS theme: "ampere" ---------- */
[data-ui-theme="ampere"] {
  --ui-primary: #28a745;
  --ui-primary-text: #ffffff;
  --ui-radius: 10px;
  --ui-radius-lg: 16px;
  --ui-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-ui-theme="ampere"][data-theme="dark"] {
  --ui-primary: #34c759;
  --ui-primary-hover: color-mix(in srgb, var(--ui-primary) 85%, #fff);
  --ui-primary-active: color-mix(in srgb, var(--ui-primary) 70%, #fff);
  --ui-primary-light: color-mix(in srgb, var(--ui-primary) 16%, #0a0d12);
  --ui-primary-text: #04170a;

  --ui-success: #34c759;
  --ui-bg: #0a0d12;
  --ui-bg-subtle: #0e1218;
  --ui-surface: #131820;
  --ui-border: #232b37;
  --ui-text: #eef1f6;
  --ui-text-muted: #98a2b3;
  --ui-overlay: rgba(0, 0, 0, 0.65);
}

/* ---------- site vars ---------- */
:root {
  --amp-green: #34c759;
  --amp-green-2: #7ae08b;
  --amp-teal: #4dd0a5;
  --amp-orange: #ff9500;
  --amp-max: 1120px;
  --amp-nav-h: 64px;
  --amp-hairline: rgba(255, 255, 255, 0.09);
  --amp-card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--ui-bg);
  color: var(--ui-text);
  font-family: var(--ui-font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ambient glows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 78% -80px, rgba(52, 199, 89, 0.13), transparent 65%),
    radial-gradient(700px 480px at -120px 42%, rgba(77, 208, 165, 0.07), transparent 65%),
    radial-gradient(800px 600px at 50% 108%, rgba(52, 199, 89, 0.07), transparent 60%);
}

::selection { background: rgba(52, 199, 89, 0.35); }

/* Keep the hidden attribute authoritative over component display rules. */
[hidden] { display: none !important; }

h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.022em; text-wrap: balance; }
p { margin: 0; }
a { color: var(--amp-green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

section[id], [id="pricing"], [id="faq"] { scroll-margin-top: calc(var(--amp-nav-h) + 16px); }

.amp-container {
  max-width: var(--amp-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Grid children default to min-width:auto, letting unbreakable content
   (code lines, the process diagram) blow past the viewport on phones.
   Cap them so pre/table wrappers scroll internally instead. */
.amp-hero-grid > *, .amp-zone-grid > *, .amp-tech > *,
.amp-grid-3 > *, .amp-grid-2 > *, .amp-steps > * { min-width: 0; }

.amp-skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  background: var(--ui-surface);
  color: var(--ui-text);
  padding: 10px 16px;
  border-radius: 10px;
}
.amp-skip:focus { left: 12px; }

.amp-grad {
  background: linear-gradient(100deg, var(--amp-green) 10%, var(--amp-green-2) 55%, var(--amp-teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- nav ---------- */
.amp-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--amp-nav-h);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  background: rgba(10, 13, 18, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.amp-nav.scrolled { border-bottom-color: var(--amp-hairline); background: rgba(10, 13, 18, 0.85); }

.amp-nav-inner {
  height: var(--amp-nav-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.amp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ui-text);
}
.amp-brand:hover { text-decoration: none; }
.amp-brand img { border-radius: 7px; }

.amp-nav-links {
  display: flex;
  gap: 24px;
  margin-right: auto;
}
.amp-nav-links a {
  color: var(--ui-text-muted);
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.amp-nav-links a:hover { color: var(--ui-text); text-decoration: none; }

.amp-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.amp-menu-btn { display: none; }

/* ---------- hero ---------- */
.amp-hero {
  padding: calc(var(--amp-nav-h) + 72px) 0 40px;
  position: relative;
}

.amp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}

.amp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--amp-green);
  background: rgba(52, 199, 89, 0.1);
  border: 1px solid rgba(52, 199, 89, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.amp-hero h1 {
  font-size: clamp(2.7rem, 6vw, 4.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.amp-lede {
  margin: 22px 0 32px;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--ui-text-muted);
  max-width: 34em;
  text-wrap: pretty;
}

.amp-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.amp-brew {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 26px;
  padding: 9px 10px 9px 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--amp-hairline);
  border-radius: 12px;
  max-width: 100%;
}
.amp-brew code {
  font-family: "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  color: var(--ui-text);
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.amp-brew code::before { content: "$ "; color: var(--amp-green); }

.amp-hero-meta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ui-text-muted);
}

/* hero visual */
.amp-hero-visual { position: relative; }

.amp-shot-wrap {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
}
.amp-shot-wrap::before {
  content: "";
  position: absolute;
  inset: 8% -6%;
  background: radial-gradient(closest-side, rgba(52, 199, 89, 0.28), transparent 72%);
  filter: blur(30px);
  z-index: 0;
}

.amp-shot {
  position: relative;
  z-index: 1;
  display: block;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 40px 90px -24px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(0, 0, 0, 0.4);
}

.amp-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ui-text);
  background: rgba(19, 24, 32, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 9px 15px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}
.amp-chip .ui-icon { color: var(--amp-green); }
.amp-chip-1 { top: 13%; left: -14%; animation: amp-float 7s ease-in-out infinite; }
.amp-chip-2 { bottom: 16%; right: -10%; animation: amp-float 8s ease-in-out 1.2s infinite; }

.amp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amp-green);
  box-shadow: 0 0 10px rgba(52, 199, 89, 0.9);
  animation: amp-pulse 2.4s ease-in-out infinite;
}

@keyframes amp-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@keyframes amp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ---------- sections ---------- */
.amp-section { padding: 108px 0 0; }

.amp-section-head {
  max-width: 640px;
  margin-bottom: 52px;
}
.amp-section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 750;
}
.amp-section-head p {
  margin-top: 16px;
  font-size: 1.08rem;
  color: var(--ui-text-muted);
}

.amp-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.amp-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

/* cards */
.amp-card {
  background: var(--amp-card-bg);
  border: 1px solid var(--amp-hairline);
  border-radius: 18px;
  padding: 26px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.amp-card:hover {
  transform: translateY(-3px);
  border-color: rgba(52, 199, 89, 0.35);
  box-shadow: 0 20px 50px -18px rgba(0, 0, 0, 0.6), 0 0 40px -18px rgba(52, 199, 89, 0.35);
}
.amp-card h3 {
  font-size: 1.06rem;
  font-weight: 650;
  margin: 16px 0 8px;
}
.amp-card p {
  font-size: 0.94rem;
  color: var(--ui-text-muted);
}

.amp-card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(52, 199, 89, 0.12);
  border: 1px solid rgba(52, 199, 89, 0.22);
  color: var(--amp-green);
  font-size: 20px;
}

.amp-row-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.amp-row-card .amp-card-icon { flex-shrink: 0; }
.amp-row-card h3 { margin-top: 2px; }

.amp-minis {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.amp-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 550;
  color: var(--ui-text-muted);
  border: 1px solid var(--amp-hairline);
  border-radius: 999px;
  padding: 8px 15px;
}
.amp-mini .ui-icon { color: var(--amp-green); }

/* ---------- healthy zone ---------- */
.amp-zone-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.amp-zone-grid h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 750; }
.amp-zone-lede {
  margin: 18px 0 30px;
  font-size: 1.08rem;
  color: var(--ui-text-muted);
}

.amp-zone-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}
.amp-zone-list li { display: flex; gap: 14px; }
.amp-zone-list .ui-icon {
  flex-shrink: 0;
  margin-top: 4px;
  color: var(--amp-green);
  font-size: 18px;
}
.amp-zone-list strong { display: block; font-weight: 650; letter-spacing: -0.01em; }
.amp-zone-list span { font-size: 0.93rem; color: var(--ui-text-muted); }

.amp-band-card {
  background: var(--amp-card-bg);
  border: 1px solid var(--amp-hairline);
  border-radius: 22px;
  padding: 34px;
}
.amp-band-title {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ui-text-muted);
  margin-bottom: 40px;
}

.amp-band {
  position: relative;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  overflow: visible;
}
.amp-band-zone {
  position: absolute;
  inset: 0;
  left: 40%;
  width: 20%;
  background: rgba(52, 199, 89, 0.09);
  border-left: 1px dashed rgba(255, 149, 0, 0.6);
  border-right: 1px dashed rgba(52, 199, 89, 0.7);
}
.amp-band-fill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(58% - 8px);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(52, 199, 89, 0.55), var(--amp-green));
  box-shadow: 0 0 24px rgba(52, 199, 89, 0.35);
  animation: amp-band-charge 9s ease-in-out infinite;
}
@keyframes amp-band-charge {
  0%, 12% { width: calc(42% - 8px); }
  48%, 64% { width: calc(60% - 8px); }
  88%, 100% { width: calc(42% - 8px); }
}

.amp-band-mark {
  position: absolute;
  top: -32px;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 700;
}
.amp-band-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  border: 5px solid transparent;
}
.amp-band-lo { left: 40%; color: var(--amp-orange); }
.amp-band-lo::after { border-top-color: var(--amp-orange); }
.amp-band-hi { left: 60%; color: var(--amp-green); }
.amp-band-hi::after { border-top-color: var(--amp-green); }

.amp-band-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--ui-text-muted);
}
.amp-band-caption {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 26px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ui-text);
}

/* ---------- steps ---------- */
.amp-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.amp-step {
  background: var(--amp-card-bg);
  border: 1px solid var(--amp-hairline);
  border-radius: 18px;
  padding: 28px 26px;
}
.amp-step-num {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 750;
  font-size: 15px;
  color: #04170a;
  background: linear-gradient(135deg, var(--amp-green), var(--amp-green-2));
  box-shadow: 0 6px 18px -6px rgba(52, 199, 89, 0.6);
  margin-bottom: 18px;
}
.amp-step h3 { font-size: 1.05rem; margin-bottom: 10px; }
.amp-step p { font-size: 0.93rem; color: var(--ui-text-muted); }
.amp-brew-block { margin: 6px 0 12px; width: 100%; box-sizing: border-box; }

/* ---------- pricing ---------- */
.amp-pricing-section .amp-section-head { margin-left: auto; margin-right: auto; text-align: center; }

.amp-price-card {
  position: relative;
  max-width: 440px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(52, 199, 89, 0.07), rgba(255, 255, 255, 0.02) 38%);
  border: 1px solid rgba(52, 199, 89, 0.3);
  border-radius: 24px;
  padding: 34px 34px 28px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7), 0 0 70px -30px rgba(52, 199, 89, 0.4);
  overflow: hidden;
}
.amp-price-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122, 224, 139, 0.9), transparent);
}

.amp-price-name {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amp-green);
}
.amp-price-amount {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 10px 0 20px;
}
.amp-price-amount > span:first-child {
  font-size: 54px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.amp-price-per { color: var(--ui-text-muted); font-size: 15px; }

.amp-price-list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 11px;
}
.amp-price-list li {
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ui-text);
}
.amp-price-list .ui-icon {
  flex-shrink: 0;
  margin-top: 4px;
  color: var(--amp-green);
}

.amp-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--amp-hairline);
  margin-bottom: 16px;
}
.amp-qty-label { font-size: 14.5px; font-weight: 600; }
.amp-qty { display: flex; align-items: center; gap: 12px; }
.amp-qty-num {
  min-width: 2ch;
  text-align: center;
  font-weight: 700;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.amp-buy-stack {
  display: grid;
  gap: 10px;
}

.amp-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ui-text-muted);
}
#buyError { margin-top: 12px; }

/* ---------- faq ---------- */
.amp-faq { max-width: 760px; }
.amp-faq .amp-section-head { margin-bottom: 36px; }

/* ---------- final cta ---------- */
.amp-final {
  margin-top: 118px;
  padding: 110px 0 120px;
  text-align: center;
  position: relative;
  border-top: 1px solid var(--amp-hairline);
  background: radial-gradient(640px 320px at 50% 8%, rgba(52, 199, 89, 0.14), transparent 70%);
}
.amp-final h2 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
  margin-bottom: 34px;
}
.amp-final .amp-cta-row { justify-content: center; }

/* ---------- footer ---------- */
.amp-footer {
  border-top: 1px solid var(--amp-hairline);
  padding: 56px 0 34px;
  background: var(--ui-bg-subtle);
}
.amp-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}
.amp-footer-brand p {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ui-text-muted);
  max-width: 26em;
}
.amp-footer h4 {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ui-text-muted);
  margin-bottom: 16px;
}
.amp-footer-grid a {
  display: block;
  color: var(--ui-text);
  font-size: 14px;
  padding: 5px 0;
}
.amp-footer-grid a:hover { color: var(--amp-green); text-decoration: none; }
.amp-footer-grid .amp-brand { display: inline-flex; padding: 0; }

.amp-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--amp-hairline);
  font-size: 13px;
  color: var(--ui-text-muted);
}
.amp-footer-bottom a { color: var(--ui-text-muted); text-decoration: underline; text-decoration-color: rgba(255,255,255,0.25); }

/* ---------- thanks page ---------- */
.amp-thanks {
  min-height: calc(100vh - var(--amp-nav-h));
  display: grid;
  place-items: center;
  padding: calc(var(--amp-nav-h) + 40px) 0 60px;
}
.amp-thanks-card {
  max-width: 560px;
  width: 100%;
  background: var(--amp-card-bg);
  border: 1px solid var(--amp-hairline);
  border-radius: 24px;
  padding: 40px;
  text-align: center;
}
.amp-thanks-card > .ui-icon.hero {
  font-size: 54px;
  color: var(--amp-green);
  filter: drop-shadow(0 0 18px rgba(52, 199, 89, 0.5));
}
.amp-thanks-card h1 { font-size: 1.9rem; margin: 18px 0 10px; }
.amp-thanks-sub { color: var(--ui-text-muted); font-size: 0.98rem; }

.amp-keys {
  display: grid;
  gap: 10px;
  margin: 26px 0 6px;
  text-align: left;
}
.amp-key {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(52, 199, 89, 0.07);
  border: 1px solid rgba(52, 199, 89, 0.3);
  border-radius: 12px;
  padding: 12px 10px 12px 16px;
}
.amp-key code {
  font-family: "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ui-text);
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.amp-activate {
  text-align: left;
  margin: 26px 0 8px;
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--amp-hairline);
  border-radius: 14px;
}
.amp-activate h2 { font-size: 1.02rem; margin-bottom: 12px; }
.amp-activate ol { margin: 0; padding-left: 20px; color: var(--ui-text-muted); font-size: 14px; display: grid; gap: 7px; }
.amp-activate strong { color: var(--ui-text); font-weight: 600; }

.amp-thanks-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.amp-thanks-note { margin-top: 20px; font-size: 12.5px; color: var(--ui-text-muted); }

/* ---------- legal page ---------- */
.amp-legal {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--amp-nav-h) + 60px) 24px 90px;
}
.amp-legal h1 { font-size: 2.2rem; margin-bottom: 8px; }
.amp-legal .amp-updated { color: var(--ui-text-muted); font-size: 14px; }
.amp-legal h2 { font-size: 1.35rem; margin: 44px 0 14px; }
.amp-legal p, .amp-legal li { color: var(--ui-text-muted); font-size: 15px; }
.amp-legal ul { padding-left: 22px; display: grid; gap: 8px; margin: 12px 0; }
.amp-legal strong { color: var(--ui-text); }

/* ---------- tech page ---------- */
.amp-nav-links a.active { color: var(--amp-green); }

.amp-tech-head {
  padding: calc(var(--amp-nav-h) + 64px) 0 24px;
}
.amp-tech-head h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 22px;
}
.amp-tech-head .amp-lede { margin-bottom: 0; }

.amp-tech {
  display: grid;
  grid-template-columns: 220px minmax(0, 720px);
  gap: 56px;
  padding-top: 40px;
}

.amp-toc {
  position: sticky;
  top: calc(var(--amp-nav-h) + 28px);
  align-self: start;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--amp-hairline);
}
.amp-toc-title {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ui-text-muted);
  padding: 2px 0 10px 16px;
}
.amp-toc a {
  font-size: 13.5px;
  color: var(--ui-text-muted);
  padding: 6px 0 6px 15px;
  border-left: 1px solid transparent;
  margin-left: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.amp-toc a:hover { color: var(--ui-text); text-decoration: none; }
.amp-toc a.active { color: var(--amp-green); border-left-color: var(--amp-green); }

.amp-prose section { scroll-margin-top: calc(var(--amp-nav-h) + 20px); }
.amp-prose h2 {
  font-size: 1.6rem;
  font-weight: 720;
  margin: 58px 0 16px;
}
.amp-prose section:first-of-type h2 { margin-top: 34px; }
.amp-prose h3 {
  font-size: 1.08rem;
  font-weight: 650;
  margin: 28px 0 10px;
}
.amp-prose p, .amp-prose li {
  font-size: 15.5px;
  line-height: 1.7;
  color: #b8c0cd;
}
.amp-prose p { margin: 0 0 14px; }
.amp-prose strong { color: var(--ui-text); font-weight: 620; }
.amp-prose em { color: var(--ui-text); }
.amp-prose ul, .amp-prose ol { margin: 0 0 14px; padding-left: 22px; }
.amp-prose li { margin-bottom: 7px; }
.amp-prose code {
  font-family: "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  background: rgba(52, 199, 89, 0.09);
  border: 1px solid rgba(52, 199, 89, 0.16);
  border-radius: 6px;
  padding: 0.1em 0.42em;
  color: #d9efdf;
  white-space: nowrap;
}

.amp-code {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--amp-hairline);
  border-radius: 14px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0 0 16px;
}
.amp-code code {
  background: none;
  border: none;
  padding: 0;
  white-space: pre;
  color: #c7cedb;
  font-size: 12.8px;
  line-height: 1.55;
}

.amp-table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
  border: 1px solid var(--amp-hairline);
  border-radius: 14px;
}
.amp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.amp-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ui-text-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--amp-hairline);
  background: rgba(255, 255, 255, 0.025);
  white-space: nowrap;
}
.amp-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #b8c0cd;
  vertical-align: top;
  min-width: 120px;
}
.amp-table tbody tr:last-child td { border-bottom: none; }
.amp-table td strong { color: var(--ui-text); }

.amp-note {
  background: rgba(52, 199, 89, 0.06);
  border: 1px solid rgba(52, 199, 89, 0.22);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 0 0 16px;
  font-size: 14.5px;
}
.amp-note > strong { display: block; color: var(--ui-text); margin-bottom: 6px; }
.amp-note ul { margin-bottom: 0; }
.amp-note-summary { margin-top: 34px; }
.amp-note-summary li { margin-bottom: 6px; }
.amp-note-summary li:last-child { margin-bottom: 0; }

.amp-fineprint {
  font-size: 13px !important;
  color: var(--ui-text-muted) !important;
}

.amp-final-compact { margin-top: 72px; padding: 84px 0 92px; }

@media (max-width: 900px) {
  .amp-tech { grid-template-columns: 1fr; gap: 8px; }
  /* long inline code (file paths) must wrap on narrow screens */
  .amp-prose code { white-space: normal; overflow-wrap: break-word; }
  .amp-toc {
    position: static;
    border-left: none;
    border: 1px solid var(--amp-hairline);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 22px;
  }
  .amp-toc a { border-left: none; margin-left: 0; padding-left: 0; }
  .amp-toc a.active { border-left: none; }
}

/* ---------- reveal animations ---------- */
.amp-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.amp-reveal.in { opacity: 1; transform: none; }

.amp-grid-3 .amp-reveal:nth-child(2), .amp-grid-2 .amp-reveal:nth-child(2), .amp-steps .amp-reveal:nth-child(2) { transition-delay: 0.08s; }
.amp-grid-3 .amp-reveal:nth-child(3), .amp-steps .amp-reveal:nth-child(3) { transition-delay: 0.16s; }
.amp-grid-3 .amp-reveal:nth-child(4) { transition-delay: 0.04s; }
.amp-grid-3 .amp-reveal:nth-child(5) { transition-delay: 0.12s; }
.amp-grid-3 .amp-reveal:nth-child(6) { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .amp-reveal { opacity: 1; transform: none; transition: none; }
  .amp-chip-1, .amp-chip-2, .amp-band-fill, .amp-dot { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .amp-hero-grid { grid-template-columns: 1fr; gap: 64px; }
  .amp-hero-copy { text-align: center; }
  .amp-lede { margin-left: auto; margin-right: auto; }
  .amp-cta-row { justify-content: center; }
  .amp-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .amp-zone-grid { grid-template-columns: 1fr; gap: 48px; }
  .amp-chip-1 { left: -2%; }
  .amp-chip-2 { right: -2%; }
}

@media (max-width: 720px) {
  .amp-nav-links {
    position: fixed;
    top: var(--amp-nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10, 13, 18, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--amp-hairline);
    padding: 8px 24px 16px;
    display: none;
  }
  .amp-nav-links a { padding: 13px 0; font-size: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
  .amp-nav.open .amp-nav-links { display: flex; }
  .amp-menu-btn { display: inline-flex; }
  .amp-nav-actions > a.outline, .amp-nav-actions > a.ghost { display: none; }

  .amp-section { padding-top: 84px; }
  .amp-grid-3, .amp-grid-2, .amp-steps { grid-template-columns: 1fr; }
  .amp-hero { padding-top: calc(var(--amp-nav-h) + 48px); }
  .amp-chip-1 { top: 6%; left: 0; }
  .amp-chip-2 { bottom: 8%; right: 0; }
  .amp-band-card { padding: 26px 20px; }
  .amp-price-card { padding: 28px 22px 24px; }
  .amp-footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .amp-final { padding: 80px 0 90px; }
}
