/* =========================================================
   StarCDK · Mission Control HUD theme (2026-11-13)
   Loaded after styles.css on every public page (.theme-cosmic).
   Admin pages never carry .theme-cosmic, so they are untouched.
   Remove the <link> to hud.css in layout.tsx to roll back.
   ========================================================= */

.theme-cosmic {
  --hud-bg: #03060c;
  --hud-panel: rgba(8, 16, 26, 0.78);
  --hud-panel-solid: #08101a;
  --signal: #5ef2d6;
  --signal-dim: rgba(94, 242, 214, 0.55);
  --signal-faint: rgba(94, 242, 214, 0.14);
  --signal-ghost: rgba(94, 242, 214, 0.06);
  --amber: #ffb547;
  --hud-red: #ff6b5e;
  --hud-grid: rgba(94, 242, 214, 0.045);

  /* The one dark plane HUD components never paint: hero artwork sits on it.
     Declared here so the whole theme has a single token layer. */
  --cosmic-bg: #070b1c;
  color-scheme: dark;

  --bg: var(--hud-bg);
  --surface: var(--hud-panel-solid);
  --ink: #e4f4f1;
  --ink-strong: #ffffff;
  --ink-2: #b8d0cc;
  --muted: #8aa6a2;
  --line: rgba(94, 242, 214, 0.14);
  --line-strong: rgba(94, 242, 214, 0.3);
  --control-border: rgba(94, 242, 214, 0.4);
  --accent: var(--signal);
  --accent-ink: #02110e;
  --success: #6ff0a8;
  --warning: var(--amber);
  --danger: var(--hud-red);

  --radius-xs: 1px;
  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 4px;

  /* Corner brackets: drawn with backgrounds so no extra markup is needed. */
  --bracket: linear-gradient(var(--signal), var(--signal));
  --brackets:
    var(--bracket) top left / 12px 1px no-repeat,
    var(--bracket) top left / 1px 12px no-repeat,
    var(--bracket) top right / 12px 1px no-repeat,
    var(--bracket) top right / 1px 12px no-repeat,
    var(--bracket) bottom left / 12px 1px no-repeat,
    var(--bracket) bottom left / 1px 12px no-repeat,
    var(--bracket) bottom right / 12px 1px no-repeat,
    var(--bracket) bottom right / 1px 12px no-repeat;
}

/* ---------- Page canvas: graph-paper grid + faint vignette ---------- */
body.theme-cosmic {
  background-color: var(--hud-bg);
  background-image:
    radial-gradient(ellipse 120% 70% at 50% -10%, rgba(94, 242, 214, 0.07), transparent 60%),
    linear-gradient(var(--hud-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hud-grid) 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 32px 32px;
  background-attachment: fixed;
}

/* A fixed canvas repaints the whole grid on every scroll frame on touch
   hardware. There it scrolls with the page instead; the top glow is capped
   so it does not stretch down a long document. */
@media (pointer: coarse) {
  body.theme-cosmic {
    background-attachment: scroll;
    background-size: 100% 640px, 32px 32px, 32px 32px;
    background-repeat: no-repeat, repeat, repeat;
  }
}

/* Texture stays in styles.css (4% grain) and the body grid. A third
   full-page scanline pattern stacked on top read as generated-UI decoration,
   so the hero keeps grid + nebula only. */

.theme-cosmic ::selection {
  background: var(--signal);
  color: var(--accent-ink);
}

.theme-cosmic a {
  color: var(--ink);
  text-decoration-color: var(--signal-dim);
}

.theme-cosmic :where(a, button, summary, input, select, textarea):focus-visible {
  outline: 1px solid var(--signal);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px var(--signal-faint);
}

/* ---------- Type: telemetry labels in mono, headings in Space Grotesk ---------- */
.theme-cosmic h1,
.theme-cosmic h2 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.theme-cosmic .eyebrow,
.theme-cosmic .footer-title,
.theme-cosmic .field-label,
.theme-cosmic .tier-row-index,
.theme-cosmic .checkout-tag {
  font-family: var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.theme-cosmic .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--signal);
  font-size: var(--text-caption);
  font-weight: 500;
}

.theme-cosmic .eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--signal);
  box-shadow: 0 0 6px var(--signal);
}

.theme-cosmic .price {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ---------- Header: telemetry bar ---------- */
.theme-cosmic .site-header {
  background: rgba(3, 6, 12, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(94, 242, 214, 0.05), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.theme-cosmic .site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--signal) 50%, transparent);
  opacity: 0.45;
  pointer-events: none;
}

.theme-cosmic .header-inner {
  height: 60px;
}

.theme-cosmic .brand {
  gap: 10px;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.theme-cosmic .brand-mark,
.theme-cosmic .site-header .brand-mark,
.theme-cosmic .site-footer .brand-mark {
  width: 18px;
  height: 18px;
  border: 1px solid var(--signal);
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 10px var(--signal-faint), inset 0 0 6px var(--signal-faint);
}

.theme-cosmic .brand-mark::after,
.theme-cosmic .site-header .brand-mark::after,
.theme-cosmic .site-footer .brand-mark::after {
  inset: 5px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 8px var(--signal);
}

.theme-cosmic .nav-link,
.theme-cosmic .site-header .nav-link {
  position: relative;
  height: 60px;
  padding: 0 14px;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--text-label);
  letter-spacing: 0.06em;
}

.theme-cosmic .nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  background: var(--signal);
  box-shadow: 0 0 8px var(--signal);
  transform: scaleX(0);
  transition: transform 180ms ease-out;
}

.theme-cosmic .nav-link:hover,
.theme-cosmic .nav-link.is-active,
.theme-cosmic .site-header .nav-link:hover,
.theme-cosmic .site-header .nav-link.is-active {
  background: transparent;
  color: var(--ink-strong);
  opacity: 1;
}

.theme-cosmic .nav-link.is-active::after,
.theme-cosmic .nav-link:hover::after {
  transform: scaleX(1);
}

.theme-cosmic .checkout-tag {
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--signal-ghost);
  color: var(--signal);
  font-size: var(--text-caption);
}
/* ---------- Buttons: signal-lit, squared off ---------- */
.theme-cosmic .btn {
  border-radius: var(--radius-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.theme-cosmic .btn-primary,
.theme-cosmic .btn-hero,
.theme-cosmic .site-header .btn {
  border: 1px solid var(--signal);
  background: var(--signal);
  color: var(--accent-ink);
  box-shadow: 0 0 0 1px rgba(94, 242, 214, 0.15), 0 0 22px rgba(94, 242, 214, 0.28);
  text-shadow: none;
}

@media (hover: hover) {
  .theme-cosmic .btn-primary:hover,
  .theme-cosmic .btn-hero:hover,
  .theme-cosmic .site-header .btn:hover {
    border-color: #9ff8e8;
    background: #9ff8e8;
    color: var(--accent-ink);
    box-shadow: 0 0 0 1px rgba(94, 242, 214, 0.3), 0 0 32px rgba(94, 242, 214, 0.45);
    opacity: 1;
  }
}

.theme-cosmic .btn-secondary {
  border-color: var(--control-border);
  background: var(--signal-ghost);
  color: var(--ink-strong);
}

@media (hover: hover) {
  .theme-cosmic .btn-secondary:hover {
    border-color: var(--signal);
    background: var(--signal-faint);
    color: var(--ink-strong);
  }
}

.theme-cosmic .btn-ghost {
  color: var(--muted);
}

@media (hover: hover) {
  .theme-cosmic .btn-ghost:hover {
    background: var(--signal-ghost);
    color: var(--signal);
  }
}

.theme-cosmic .btn:disabled {
  box-shadow: none;
}

/* ---------- Hero: copy left, orbit tracker right ---------- */
.theme-cosmic .launch-hero {
  min-height: 600px;
  border-bottom: 1px solid var(--line);
}

.theme-cosmic .launch-hero::before {
  opacity: 0.38;
  filter: hue-rotate(-40deg) saturate(0.8);
}

.theme-cosmic .launch-hero::after {
  background:
    linear-gradient(180deg, rgba(3, 6, 12, 0.3) 0%, transparent 36%, rgba(3, 6, 12, 0.96) 100%),
    linear-gradient(var(--hud-grid) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--hud-grid) 1px, transparent 1px) 0 0 / 32px 32px;
}

.theme-cosmic .launch-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 340px);
  align-items: center;
  gap: 56px;
}

.theme-cosmic .launch-hero h1 {
  max-width: 11ch;
  color: var(--ink-strong);
}

.theme-cosmic .launch-hero .lead {
  color: var(--ink-2);
}

.theme-cosmic .hero-facts {
  display: inline-block;
  padding-left: 12px;
  border-left: 1px solid var(--signal-dim);
  color: var(--muted);
  font-size: var(--text-label);
}

.theme-cosmic .btn-hero {
  min-height: 50px;
  padding: 0 28px;
  margin-top: var(--space-2);
}

.theme-cosmic .range-status {
  border-radius: var(--radius-sm);
  border-color: var(--line-strong);
  background: rgba(3, 6, 12, 0.7);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.06em;
}

.theme-cosmic .range-title {
  color: var(--signal);
  font-size: var(--text-caption);
}

.theme-cosmic .range-led {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: hud-blink 2.4s steps(1, end) infinite;
}

.theme-cosmic .range-state {
  color: var(--success);
}

.theme-cosmic .range-caveat {
  color: var(--muted);
  font-size: var(--text-caption);
}

.orbit-tracker {
  position: relative;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--brackets), rgba(3, 8, 14, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.orbit-tracker-head {
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.orbit-tracker-live {
  color: var(--hud-red);
  animation: hud-blink 1.6s steps(1, end) infinite;
}

.orbit-scope {
  display: block;
  width: 100%;
  height: auto;
  margin: 12px 0;
}

.scope-ring {
  fill: none;
  stroke: var(--signal);
  stroke-opacity: 0.22;
}

.scope-axis {
  stroke: var(--signal);
  stroke-opacity: 0.12;
  stroke-dasharray: 2 4;
}

.scope-orbit {
  fill: none;
  stroke: var(--amber);
  stroke-opacity: 0.6;
  stroke-dasharray: 3 3;
}

.scope-planet {
  fill: var(--signal-faint);
  stroke: var(--signal);
}

.scope-sweep {
  transform-origin: 120px 120px;
  animation: hud-spin 6s linear infinite;
}

.scope-sweep path {
  fill: var(--signal);
  fill-opacity: 0.1;
}

.scope-sat {
  transform-origin: 120px 120px;
  animation: hud-orbit 14s linear infinite;
}

.scope-sat circle {
  fill: var(--amber);
  filter: drop-shadow(0 0 4px var(--amber));
}

.orbit-tracker-data {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.orbit-tracker-data dt {
  font-size: 10px;
  opacity: 0.8;
}

.orbit-tracker-data dd {
  margin: 2px 0 0;
  color: var(--signal);
  font-size: 13px;
  letter-spacing: 0.06em;
}

@keyframes hud-spin {
  to { transform: rotate(360deg); }
}

@keyframes hud-orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

@keyframes hud-blink {
  0%, 70% { opacity: 1; }
  71%, 100% { opacity: 0.25; }
}
/* ---------- Sections & page headers ---------- */
.theme-cosmic .rocket-select,
.theme-cosmic .section-alt {
  background: transparent;
}

.theme-cosmic .section-head h2,
.theme-cosmic .rocket-select-head h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-strong);
}

.theme-cosmic .section-head h2::before {
  content: "//";
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.6em;
  font-weight: 400;
  letter-spacing: 0;
}

.theme-cosmic .page-header {
  position: relative;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--signal-ghost), transparent 70%);
}

.theme-cosmic .page-header h1 {
  color: var(--ink-strong);
}

.theme-cosmic .page-header .wrap::before {
  content: "STARCDK // MISSION CONTROL";
  display: block;
  margin-bottom: var(--space-4);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  opacity: 0.7;
}

/* ---------- Trust chips: status tags ---------- */
.theme-cosmic .trust-chip {
  border-radius: var(--radius-sm);
  border-color: var(--line-strong);
  background: var(--signal-ghost);
  color: var(--ink-2);
  font-size: var(--text-caption);
  letter-spacing: 0.04em;
  text-decoration: none;
}

.theme-cosmic .trust-chip::before {
  content: "■";
  margin-right: 6px;
  color: var(--signal);
  font-size: 7px;
}

/* ---------- Tier rows: launch manifest ---------- */
.theme-cosmic .tier-list {
  display: grid;
  gap: 12px;
}

.theme-cosmic .tier-row {
  padding: 22px 24px 22px 28px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--brackets), var(--hud-panel);
  transition: border-color 160ms ease-out, background-color 160ms ease-out, box-shadow 160ms ease-out;
}

.theme-cosmic .tier-row::before {
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0;
  background: var(--tier);
  box-shadow: 0 0 12px var(--tier);
  opacity: 0.9;
}

@media (hover: hover) {
  .theme-cosmic .tier-row:hover {
    border-color: color-mix(in srgb, var(--tier) 55%, transparent);
    background: var(--brackets), color-mix(in srgb, var(--tier) 6%, var(--hud-panel));
    box-shadow: 0 0 32px color-mix(in srgb, var(--tier) 12%, transparent);
  }
}

.theme-cosmic .tier-row-index {
  color: var(--tier);
  font-size: var(--text-caption);
}

.theme-cosmic .tier-row h2 {
  color: var(--ink-strong);
}

.theme-cosmic .tier-row-rocket {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.08em;
  color: var(--tier);
}

.theme-cosmic .tier-row-meta {
  color: var(--muted);
  font-size: var(--text-label);
}

.theme-cosmic .tier-row-stock {
  color: var(--success);
}

.theme-cosmic .tier-row-stock-low {
  color: var(--amber);
}

.theme-cosmic .tier-row-price .price {
  color: var(--ink-strong);
}

.theme-cosmic .tier-row .btn-primary {
  border: 1px solid var(--tier);
  background: color-mix(in srgb, var(--tier) 10%, transparent);
  color: var(--ink-strong);
  box-shadow: none;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
}

.theme-cosmic .tier-row .btn-primary::before {
  content: "▸ ";
  color: var(--tier);
}

.theme-cosmic .tier-row .btn-primary::after {
  content: "";
  margin: 0;
}

@media (hover: hover) {
  .theme-cosmic .tier-row .btn-primary:hover {
    border-color: var(--tier);
    background: var(--tier);
    color: var(--accent-ink);
    box-shadow: 0 0 22px color-mix(in srgb, var(--tier) 45%, transparent);
  }

  .theme-cosmic .tier-row .btn-primary:hover::before {
    color: var(--accent-ink);
  }
}

.theme-cosmic .promo-banner {
  border-radius: var(--radius-sm);
  border-color: rgba(255, 181, 71, 0.4);
  background: rgba(255, 181, 71, 0.08);
  color: var(--amber);
}
/* ---------- Forms: terminal inputs ---------- */
.theme-cosmic .field-label {
  color: var(--signal);
  font-size: var(--text-caption);
  font-weight: 500;
}

.theme-cosmic .input,
.theme-cosmic .textarea {
  border-color: var(--control-border);
  border-radius: var(--radius-sm);
  background: rgba(2, 6, 10, 0.75);
  color: var(--ink-strong);
  caret-color: var(--signal);
}

.theme-cosmic .input:focus,
.theme-cosmic .textarea:focus {
  border-color: var(--signal);
  outline: none;
  box-shadow: 0 0 0 3px var(--signal-faint), 0 0 18px rgba(94, 242, 214, 0.12);
}

.theme-cosmic .field-hint {
  color: var(--muted);
}

.theme-cosmic .field-details summary {
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.1em;
}

/* ---------- Notices & status pills ---------- */
.theme-cosmic .notice {
  position: relative;
  padding-left: 20px;
  border-radius: 0;
  border-color: var(--line);
  background: var(--hud-panel);
}

.theme-cosmic .notice::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--signal);
}

.theme-cosmic .notice-title {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.06em;
  color: var(--signal);
}

.theme-cosmic .notice-success {
  border-color: rgba(111, 240, 168, 0.28);
  background: rgba(111, 240, 168, 0.06);
}

.theme-cosmic .notice-success::before {
  background: var(--success);
}

.theme-cosmic .notice-success .notice-title {
  color: var(--success);
}

.theme-cosmic .notice-warning {
  border-color: rgba(255, 181, 71, 0.3);
  background: rgba(255, 181, 71, 0.06);
}

.theme-cosmic .notice-warning::before {
  background: var(--amber);
}

.theme-cosmic .notice-warning .notice-title {
  color: var(--amber);
}

.theme-cosmic .notice-error {
  border-color: rgba(255, 107, 94, 0.35);
  background: rgba(255, 107, 94, 0.07);
}

.theme-cosmic .notice-error::before {
  background: var(--hud-red);
}

.theme-cosmic .notice-error .notice-title {
  color: var(--hud-red);
}

/* Session-guide tip. The base stylesheet draws the stock "left accent bar +
   rounded corners" callout; rework it into the bracketed panel used elsewhere
   so it stops reading as a second design system. Higher specificity than the
   base rule, so the 2px left border and asymmetric radius are fully replaced. */
.theme-cosmic .session-guide-tip {
  margin: 12px 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--brackets), color-mix(in srgb, var(--amber) 5%, var(--hud-panel));
  color: var(--ink-2);
  font-size: var(--text-label);
  line-height: 1.65;
}

.theme-cosmic .session-guide-tip strong {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--amber);
}

.theme-cosmic .status {
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.08em;
  background: var(--signal-ghost);
}

.theme-cosmic .status-dot {
  box-shadow: 0 0 6px currentColor;
}

.theme-cosmic .status-success {
  color: var(--success);
  border-color: rgba(111, 240, 168, 0.35);
  background: rgba(111, 240, 168, 0.07);
}

.theme-cosmic .status-warning,
.theme-cosmic .status-pending {
  color: var(--amber);
  border-color: rgba(255, 181, 71, 0.35);
  background: rgba(255, 181, 71, 0.07);
}

.theme-cosmic .status-danger {
  color: var(--hud-red);
  border-color: rgba(255, 107, 94, 0.35);
  background: rgba(255, 107, 94, 0.07);
}

/* ---------- Steps: numbered checklist ---------- */
.theme-cosmic .step {
  border-top: 1px solid var(--line-strong);
}

.theme-cosmic .step-num {
  border-radius: var(--radius-sm);
  border-color: var(--signal-dim);
  background: var(--signal-ghost);
  color: var(--signal);
  font-family: var(--font-mono);
}

.theme-cosmic .step-title {
  color: var(--ink-strong);
}

/* ---------- FAQ: expandable log entries ---------- */
.theme-cosmic .faq,
.theme-cosmic .faq-item {
  border-color: var(--line);
}

.theme-cosmic .faq-item summary {
  color: var(--ink);
  transition: color 150ms ease-out;
}

.theme-cosmic .faq-item summary::after {
  color: var(--signal-dim);
  font-family: var(--font-mono);
}

.theme-cosmic .faq-item[open] summary,
.theme-cosmic .faq-item summary:hover {
  color: var(--ink-strong);
}

.theme-cosmic .faq-answer {
  padding-left: 0;
  color: var(--ink-2);
}
/* ---------- Panels: every card-like surface gets the HUD frame ---------- */
.theme-cosmic :is(
  .code-card,
  .mock-card,
  .pending-panel,
  .pay-box,
  .promo-offer-card,
  .promo-panel,
  .session-guide,
  .support-box,
  .precheck-status-card,
  .auto-status-card,
  .help-status-grid > div,
  .captcha-panel
) {
  border-color: var(--line);
  border-radius: 0;
  background: var(--brackets), var(--hud-panel);
}

.theme-cosmic .pay-methods {
  border-radius: var(--radius-sm);
  border-color: var(--line);
  background: rgba(2, 6, 10, 0.7);
}

.theme-cosmic .pay-method {
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.06em;
}

.theme-cosmic .pay-method.is-active {
  background: var(--signal-faint);
  color: var(--signal);
  box-shadow: inset 0 0 0 1px var(--signal-dim);
}

.theme-cosmic .pay-timer {
  border-radius: var(--radius-sm);
  border-color: var(--line-strong);
  background: rgba(2, 6, 10, 0.7);
  font-family: var(--font-mono);
}

.theme-cosmic .pay-timer strong {
  color: var(--signal);
  text-shadow: 0 0 12px var(--signal-faint);
  font-variant-numeric: tabular-nums;
}

.theme-cosmic .pay-timer strong.is-expiring {
  color: var(--amber);
}

.theme-cosmic .pay-timer strong.is-expired {
  color: var(--hud-red);
}

.theme-cosmic .pay-amount-line h1 {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px var(--signal-faint);
}

.theme-cosmic .pay-copy,
.theme-cosmic .copy-inline {
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.06em;
}

.theme-cosmic .pay-qr-frame {
  border-radius: 0;
  box-shadow: 0 0 0 1px var(--signal-dim), 0 0 28px var(--signal-faint);
}

.theme-cosmic .code-box,
.theme-cosmic .code-mask {
  border-radius: var(--radius-sm);
  border-color: var(--line-strong);
  background: rgba(2, 6, 10, 0.8);
  color: var(--signal);
}

.theme-cosmic .info-table > div {
  border-color: var(--line);
}

.theme-cosmic .info-table span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.08em;
}

/* ---------- Mission rail: progress telemetry ---------- */
.theme-cosmic .mission-step-dot {
  border-radius: var(--radius-sm);
  background: var(--hud-panel-solid);
}

.theme-cosmic .mission-step:not(:last-child)::after {
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 8px);
}

.theme-cosmic .mission-step.is-done .mission-step-dot {
  border-color: var(--success);
  background: rgba(111, 240, 168, 0.12);
  color: var(--success);
}

.theme-cosmic .mission-step.is-done:not(:last-child)::after {
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.theme-cosmic .mission-step.is-current .mission-step-dot {
  border-color: var(--signal);
  background: var(--signal-faint);
  color: var(--signal);
  box-shadow: 0 0 12px var(--signal-faint);
}

.theme-cosmic .mission-step.is-current .mission-step-label {
  color: var(--ink-strong);
}

.theme-cosmic .mission-step.is-failed .mission-step-dot {
  border-color: var(--hud-red);
  background: rgba(255, 107, 94, 0.12);
  color: var(--hud-red);
}

.theme-cosmic .spinner {
  border-color: var(--line-strong);
  border-top-color: var(--signal);
}

/* ---------- Legal / long-form ---------- */
.theme-cosmic .legal h2 {
  padding-top: var(--space-3);
  border-top: 1px dashed var(--line);
  color: var(--ink-strong);
}

.theme-cosmic .legal a {
  color: var(--signal);
}

/* ---------- Footer: system log ---------- */
.theme-cosmic .site-footer,
.theme-cosmic .focus-footer {
  position: relative;
  border-top: 1px solid var(--line);
  background: rgba(2, 4, 8, 0.92);
}

.theme-cosmic .site-footer::before {
  content: "END OF TRANSMISSION";
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 12px;
  background: var(--hud-bg);
  color: var(--signal-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  white-space: nowrap;
}

.theme-cosmic .footer-title {
  color: var(--signal);
  font-size: 11px;
}

.theme-cosmic .site-footer a {
  color: var(--muted);
}

@media (hover: hover) {
  .theme-cosmic .site-footer a:hover {
    color: var(--signal);
    opacity: 1;
  }
}

.theme-cosmic .footer-bottom {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.04em;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .theme-cosmic .launch-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .orbit-tracker {
    max-width: 360px;
  }
}

@media (max-width: 640px) {
  .orbit-tracker {
    display: none;
  }
  .theme-cosmic .launch-hero {
    min-height: 0;
  }

  .theme-cosmic .tier-row {
    padding: 18px 16px 18px 20px;
  }

  .theme-cosmic .nav-link,
  .theme-cosmic .site-header .nav-link {
    padding: 0 8px;
  }

  .theme-cosmic .nav-link::after {
    left: 8px;
    right: 8px;
  }

  .theme-cosmic .page-header .wrap::before {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-cosmic .range-led,
  .orbit-tracker-live,
  .scope-sweep,
  .scope-sat {
    animation: none;
  }
}

/* =========================================================
   Detail pass (2026-11-13 · round 2)
   ========================================================= */

/* ---------- Legacy palette leftovers ---------- */
.theme-cosmic .launch-hero {
  background-color: var(--hud-bg);
}

.theme-cosmic .tier-scout { --tier: var(--signal); }
.theme-cosmic .tier-voyager { --tier: #a58bff; }
.theme-cosmic .tier-flagship { --tier: var(--amber); }

.theme-cosmic .precheck-status-dot,
.theme-cosmic .payment-live-led {
  background: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-faint), 0 0 8px var(--signal-dim);
}

.theme-cosmic .precheck-status-card[data-state="waiting"] .precheck-status-dot,
.theme-cosmic .payment-live-led[data-state="review"],
.theme-cosmic .payment-live-led[data-state="waiting"] {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(255, 181, 71, 0.14), 0 0 8px rgba(255, 181, 71, 0.5);
}

.theme-cosmic .payment-live-led[data-state="paid"] {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(111, 240, 168, 0.14), 0 0 8px rgba(111, 240, 168, 0.5);
}

.theme-cosmic .precheck-status-card[data-state="error"] .precheck-status-dot,
.theme-cosmic .payment-live-led[data-state="expired"] {
  background: var(--hud-red);
  box-shadow: 0 0 0 3px rgba(255, 107, 94, 0.14), 0 0 8px rgba(255, 107, 94, 0.5);
}

/* The precheck card's border follows its state, so status reads at a glance. */
.theme-cosmic .precheck-status-card {
  transition: border-color 200ms ease-out, background-color 200ms ease-out;
}

.theme-cosmic .precheck-status-card[data-state="error"] {
  border-color: rgba(255, 107, 94, 0.4);
}

.theme-cosmic .precheck-status-card[data-state="waiting"] {
  border-color: rgba(255, 181, 71, 0.35);
}

.theme-cosmic .pay-dialog {
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--brackets), var(--hud-panel-solid);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(94, 242, 214, 0.06), 0 24px 60px rgba(0, 0, 0, 0.6);
}

.theme-cosmic .pay-dialog[open] {
  animation: hud-dialog-in 180ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

.theme-cosmic .pay-dialog::backdrop {
  background: rgba(1, 3, 6, 0.78);
}

.theme-cosmic .pay-dialog-title {
  color: var(--ink-strong);
  font-family: var(--font-display);
}

.theme-cosmic .pay-dialog-body {
  color: var(--ink-2);
  font-size: var(--text-label);
}

.theme-cosmic .pay-dialog-actions button {
  min-height: 44px;
  border-radius: var(--radius-sm);
  font-size: var(--text-label);
}

.theme-cosmic .pay-dialog-cancel {
  border-color: var(--line-strong);
  color: var(--ink);
}

.theme-cosmic .pay-dialog-confirm {
  border-color: rgba(255, 181, 71, 0.55);
  background: rgba(255, 181, 71, 0.12);
  color: var(--amber);
}

@media (hover: hover) {
  .theme-cosmic .pay-dialog-cancel:hover {
    background: var(--signal-ghost);
  }

  .theme-cosmic .pay-dialog-confirm:hover {
    background: rgba(255, 181, 71, 0.22);
  }
}

@keyframes hud-dialog-in {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.theme-cosmic .nav-progress {
  height: 2px;
  background: linear-gradient(90deg, var(--signal-dim), var(--signal));
  box-shadow: 0 0 10px var(--signal);
}
/* ---------- Tap targets: 44px on touch, without changing desktop density ---------- */
@media (pointer: coarse) {
  .theme-cosmic .site-footer a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
  }

  .theme-cosmic .trust-chip {
    min-height: 44px;
  }

  .theme-cosmic .brand {
    min-height: 44px;
  }

  .theme-cosmic .field-details summary,
  .theme-cosmic .session-guide summary {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  .theme-cosmic .copy-inline {
    min-height: 36px;
    padding: 0 6px;
  }

  .theme-cosmic .focus-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* ---------- Press feedback ---------- */
.theme-cosmic .btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.theme-cosmic .btn:active {
  transform: translateY(1px) scale(0.985);
}

.theme-cosmic .btn-primary:active,
.theme-cosmic .btn-hero:active {
  box-shadow: 0 0 0 1px rgba(94, 242, 214, 0.4), 0 0 10px rgba(94, 242, 214, 0.35);
}

.theme-cosmic .trust-chip:is(a) {
  transition: border-color 150ms ease-out, color 150ms ease-out, background-color 150ms ease-out;
}

@media (hover: hover) {
  .theme-cosmic .trust-chip:is(a):hover {
    border-color: var(--signal);
    color: var(--ink-strong);
    opacity: 1;
  }

  /* The global a:hover dims links to 0.72; HUD surfaces use colour instead. */
  .theme-cosmic :is(.btn, .nav-link, .brand, .trust-chip, .tier-row a):hover {
    opacity: 1;
  }
}

/* The whole tier row is clickable: the CTA's hit area stretches over it. */
.theme-cosmic .tier-row {
  cursor: pointer;
}

.theme-cosmic .tier-row .tier-row-action .btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.theme-cosmic .tier-row:has(.btn-primary:focus-visible) {
  border-color: var(--tier);
  box-shadow: 0 0 0 1px var(--tier), 0 0 28px color-mix(in srgb, var(--tier) 18%, transparent);
}

.theme-cosmic .tier-row .tier-row-action .btn-primary:focus-visible {
  outline: none;
  box-shadow: none;
}

/* No transform on the CTA itself: a transform would make it the containing
   block of the stretched ::after, shrinking the hit area mid-click. */
.theme-cosmic .tier-row .tier-row-action .btn-primary:active {
  transform: none;
}

/* Press feedback on the row is colour-only: a transform here would open a new
   stacking context mid-click and the mouseup would miss the stretched link. */
.theme-cosmic .tier-row:active {
  background: var(--brackets), color-mix(in srgb, var(--tier) 10%, var(--hud-panel));
}

/* ---------- Busy submit: spinner instead of a bare opacity drop ---------- */
.theme-cosmic form[aria-busy="true"] button[type="submit"] {
  position: relative;
  opacity: 0.9;
  padding-left: 40px;
}

.theme-cosmic form[aria-busy="true"] button[type="submit"]::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: hud-spin 700ms linear infinite;
}

/* ---------- Copy feedback ---------- */
.theme-cosmic [data-copy].is-copied {
  border-color: var(--success);
  color: var(--success);
}

.theme-cosmic [data-copy].is-copied::before {
  content: "✓ ";
}

/* ---------- Forms: invalid + autofill + checkbox ---------- */
.theme-cosmic .input:user-invalid,
.theme-cosmic .textarea:user-invalid {
  border-color: var(--hud-red);
  box-shadow: 0 0 0 3px rgba(255, 107, 94, 0.12);
}

.theme-cosmic .input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink-strong);
  caret-color: var(--signal);
  -webkit-box-shadow: 0 0 0 100px #061016 inset;
  transition: background-color 9999s ease-out 0s;
}

.theme-cosmic .check-field {
  color: var(--ink-2);
}

.theme-cosmic input[type="checkbox"],
.theme-cosmic input[type="radio"] {
  accent-color: var(--signal);
}

.theme-cosmic .textarea {
  line-height: 1.6;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

/* ---------- Scroll, selection, skip link ---------- */
.theme-cosmic {
  scrollbar-color: rgba(94, 242, 214, 0.28) var(--hud-bg);
}

.theme-cosmic :target,
.theme-cosmic #buy,
.theme-cosmic [id] {
  scroll-margin-top: 84px;
}

.theme-cosmic .skip-link {
  border: 1px solid var(--signal);
  background: var(--hud-panel-solid);
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: var(--text-label);
}

/* FAQ answers ease in instead of popping. */
.theme-cosmic .faq-item[open] .faq-answer {
  animation: hud-reveal 200ms ease-out;
}

@keyframes hud-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Typography micro-details ---------- */
.theme-cosmic .price,
.theme-cosmic .pay-timer,
.theme-cosmic .range-label b,
.theme-cosmic .orbit-tracker-data dd,
.theme-cosmic .info-table strong {
  font-variant-numeric: tabular-nums;
}

.theme-cosmic .tier-row-price .price-period {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
}

.theme-cosmic .tier-row-price .price-was {
  color: var(--muted);
  text-decoration-color: var(--hud-red);
}

.theme-cosmic .tier-row-price .price-promo {
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
}

.theme-cosmic .fineprint {
  color: var(--muted);
}

.theme-cosmic .lead {
  text-wrap: pretty;
}

/* Low stock earns a pulse; healthy stock stays still. */
.theme-cosmic .tier-row-stock-low::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--amber);
  vertical-align: 1px;
  animation: hud-blink 1.2s steps(1, end) infinite;
}

/* ---------- Entrance: hero and tier rows assemble once on load ---------- */
@media (prefers-reduced-motion: no-preference) {
  .theme-cosmic .hero-copy > *,
  .theme-cosmic .orbit-tracker,
  .theme-cosmic .tier-row {
    animation: hud-boot 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .theme-cosmic .hero-copy > :nth-child(2) { animation-delay: 60ms; }
  .theme-cosmic .hero-copy > :nth-child(3) { animation-delay: 120ms; }
  .theme-cosmic .hero-copy > :nth-child(4) { animation-delay: 160ms; }
  .theme-cosmic .hero-copy > :nth-child(n + 5) { animation-delay: 200ms; }
  .theme-cosmic .orbit-tracker { animation-delay: 140ms; }
  .theme-cosmic .tier-row:nth-child(2) { animation-delay: 70ms; }
  .theme-cosmic .tier-row:nth-child(3) { animation-delay: 140ms; }
}

@keyframes hud-boot {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-cosmic .tier-row-stock-low::before,
  .theme-cosmic form[aria-busy="true"] button[type="submit"]::before,
  .theme-cosmic .faq-item[open] .faq-answer,
  .theme-cosmic .pay-dialog[open] {
    animation: none;
  }

  .theme-cosmic .btn:active {
    transform: none;
  }
}

/* ---------- Header depth only after scrolling ---------- */
.theme-cosmic .site-header {
  box-shadow: none;
  transition: background-color 200ms ease-out, box-shadow 200ms ease-out;
}

.theme-cosmic .site-header::after {
  opacity: 0.18;
  transition: opacity 200ms ease-out;
}

.theme-cosmic .site-header.is-scrolled {
  background: rgba(3, 6, 12, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.theme-cosmic .site-header.is-scrolled::after {
  opacity: 0.5;
}

/* ---------- Session paste box mirrors what the parser found ---------- */
.theme-cosmic .textarea[data-structure="complete"] {
  border-color: rgba(111, 240, 168, 0.6);
  box-shadow: 0 0 0 3px rgba(111, 240, 168, 0.1);
}

.theme-cosmic .textarea[data-structure="partial"] {
  border-color: rgba(255, 181, 71, 0.55);
}

.theme-cosmic .textarea[data-structure="complete"] ~ .field-hint,
.theme-cosmic [data-session-structure] {
  transition: color 200ms ease-out;
}

.theme-cosmic .form:has(.textarea[data-structure="complete"]) [data-session-structure] {
  color: var(--success);
}

.theme-cosmic .form:has(.textarea[data-structure="partial"]) [data-session-structure] {
  color: var(--amber);
}

/* ---------- Site favorite: one tap, shared counter ---------- */
.theme-cosmic .favorite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.theme-cosmic .favorite-hero {
  margin-top: var(--space-3);
}

.theme-cosmic .page-header .favorite {
  margin-top: var(--space-4);
}

.theme-cosmic .btn-favorite {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  background: rgba(3, 6, 12, 0.5);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.08em;
  transition: border-color 160ms ease-out, background-color 160ms ease-out, color 160ms ease-out;
}

@media (hover: hover) {
  .theme-cosmic .btn-favorite:hover {
    border-color: var(--signal-dim);
    background: var(--signal-ghost);
    color: var(--ink-strong);
  }
}

.theme-cosmic .btn-favorite[aria-pressed="true"] {
  border-color: var(--amber);
  background: rgba(255, 181, 71, 0.1);
  color: var(--amber);
}

.theme-cosmic .favorite-star {
  font-size: 15px;
  line-height: 1;
}

.theme-cosmic .favorite.is-on .favorite-star {
  animation: favorite-pop 320ms ease-out;
}

@keyframes favorite-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.4) rotate(-8deg);
  }
  100% {
    transform: scale(1);
  }
}

.theme-cosmic .favorite-meta {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.theme-cosmic .favorite-meta strong {
  color: var(--signal);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.theme-cosmic .favorite.is-pending {
  opacity: 0.65;
}

.theme-cosmic .favorite.is-pending .btn-favorite {
  cursor: progress;
}

.theme-cosmic .favorite.is-error .favorite-meta {
  color: var(--hud-red);
}

@media (prefers-reduced-motion: reduce) {
  .theme-cosmic .favorite.is-on .favorite-star {
    animation: none;
  }
}

.theme-cosmic .favorite-hint {
  flex-basis: 100%;
  margin: -2px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0.86;
}

.theme-cosmic .favorite-meta [hidden] {
  display: none;
}

/* A ⌘D / Ctrl+D hint is noise on a touch screen. */
@media (pointer: coarse) {
  .theme-cosmic .favorite-hint {
    display: none;
  }
}
