/* Delta Starlink Cost — mobile-first, dark aviation */
:root {
  --bg: #0b0d10;
  --bg-elevated: #15181d;
  --bg-card: #111418;
  --border: rgba(226, 232, 240, 0.16);
  --text: #f1f3f5;
  --text-muted: #a7adb7;
  --accent: #d7dce3;
  --accent-dim: rgba(215, 220, 227, 0.1);
  --warn: #f0a83a;
  --green: #52c878;
  --danger: #ff6b6b;
  --delta-red: #ff596b;
  --numeric: #ff596b;
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 14px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --max: 720px;
}

html[data-theme="light"] {
  --bg: #f4f5f7;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: rgba(15, 23, 42, 0.14);
  --text: #15181d;
  --text-muted: #5f6875;
  --accent: #20252d;
  --accent-dim: rgba(32, 37, 45, 0.08);
  --numeric: #c1122f;
  --delta-red: #c1122f;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255, 255, 255, 0.04), transparent 55%),
    radial-gradient(800px 400px at 100% 20%, rgba(255, 255, 255, 0.025), transparent 50%),
    var(--bg);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--text);
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Numeric figures are intentionally the only prominent color. */
.numeric-value {
  color: var(--numeric) !important;
  font-variant-numeric: tabular-nums;
}

/* Header */
.site-header {
  padding: 1rem 0 0.65rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, #252a31, #101216);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-mark svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-name {
  font-weight: 650;
  letter-spacing: 0.02em;
  font-size: 1rem;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.theme-toggle {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.42rem 0.68rem;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font: 600 0.72rem var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Counter-first hero */
.counter-hero {
  padding: 1.35rem 0 0.75rem;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(82, 200, 120, 0.1);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(82, 200, 120, 0.6);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(82, 200, 120, 0.55);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(82, 200, 120, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(82, 200, 120, 0);
  }
}

.counter-card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 1.25rem 1rem 1.1rem;
  position: relative;
  overflow: hidden;
}

.counter-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(215, 220, 227, 0.45), transparent);
}

.counter-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.counter-total {
  font-family: var(--font-mono);
  font-size: clamp(2.1rem, 9.2vw, 3.35rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--numeric);
  text-shadow:
    0 0 18px rgba(255, 42, 60, 0.55),
    0 0 40px rgba(255, 42, 60, 0.25);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
  scrollbar-width: none;
}

.counter-estimate-tag {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--warn);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.counter-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.counter-meta strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 550;
}

.rates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.rate-pill {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.55rem;
  text-align: center;
}

.rate-pill span {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.rate-pill strong {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 3.4vw, 1.05rem);
  font-weight: 550;
  color: var(--numeric);
}

/* Scenario picker (kept with assumptions, not in the counter) */
.scenario-picker {
  margin: 1rem 0 1.1rem;
  padding: 0.85rem 0.9rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.scenario-picker-label {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--text);
}

.scenario-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0.5rem 0 0;
  max-width: 22rem;
  padding: 3px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.scenario-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.55rem 0.4rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.scenario-btn:hover {
  color: var(--text);
}

.scenario-btn.is-active,
.scenario-btn[aria-checked="true"] {
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(215, 220, 227, 0.35);
}

.scenario-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.scenario-note {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Intro (below counter) */
.intro {
  padding-top: 0.5rem;
  text-align: center;
}

.intro h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.3rem, 4.4vw, 1.75rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.hero-lead {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-lead strong {
  color: var(--text);
  font-weight: 650;
}

/* Chips / sections */
.section {
  padding: 1.35rem 0;
}

.section-title {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
}

.section-lede {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: calc(50% - 0.25rem);
  flex: 1 1 auto;
}

.chip-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.chip-value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip-badge {
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.chip-badge--assumed {
  background: rgba(240, 180, 41, 0.15);
  color: var(--warn);
}

.chip-badge--known {
  background: rgba(82, 200, 120, 0.14);
  color: var(--green);
}

/* Accordion / cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.accordion-btn:hover {
  background: rgba(255, 255, 255, 0.02);
}

.accordion-btn .chevron {
  width: 1.1rem;
  height: 1.1rem;
  transition: transform 0.2s ease;
  color: var(--text-muted);
  flex-shrink: 0;
}

.accordion-btn[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.accordion-panel {
  padding: 0 1.1rem 1.15rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.accordion-panel[hidden] {
  display: none;
}

.formula {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--numeric);
  white-space: pre-wrap;
  word-break: break-word;
}

.calc-list {
  padding-left: 1.15rem;
  margin: 0.75rem 0;
}

.calc-list li {
  margin-bottom: 0.45rem;
}

.calc-list strong {
  color: var(--text);
}

.muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Narrative */
.narrative-card {
  padding: 1.15rem 1.1rem 1.25rem;
}

.narrative h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.narrative p {
  margin: 0 0 0.9rem;
  color: var(--text-muted);
}

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

.callout {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 0 10px 10px 0;
  font-size: 0.9rem;
  color: var(--text);
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.site-footer p {
  margin: 0.35rem 0;
}

.disclaimer {
  max-width: 34rem;
  margin-inline: auto;
  font-size: 0.75rem;
  line-height: 1.5;
  opacity: 0.9;
}

.footer-research {
  margin-top: 0.85rem;
  font-size: 0.75rem;
}

.footer-research summary {
  cursor: pointer;
  color: var(--text-muted);
  list-style-position: inside;
}

.footer-research summary:hover {
  color: var(--text);
}

.footer-research p {
  margin-top: 0.5rem;
}

/* Desktop tweaks */
@media (min-width: 640px) {
  .chip {
    min-width: auto;
  }

  .counter-card {
    padding: 1.65rem 1.75rem 1.35rem;
  }

  .rates {
    gap: 0.85rem;
  }

  .scenario-picker {
    padding-inline: 1rem;
  }

  .scenario-toggle {
    max-width: 24rem;
  }
}
