/* Official Intelligence — "Celestial Warriors" theme layer
   Loaded last on public, sign-in and command-plane pages.
   Pure presentation: no copy, routes, IDs or auth behaviour depend on this file. */

:root {
  --cw-void: #05060a;
  --cw-deep: #0a0b16;
  --cw-nebula-1: rgba(98, 72, 214, .22);
  --cw-nebula-2: rgba(46, 84, 196, .16);
  --cw-gold: #d4a84b;
  --cw-gold-bright: #f3d58a;
  --cw-gold-line: rgba(212, 168, 75, .34);
  --cw-gold-glow: rgba(212, 168, 75, .22);
  --cw-cyan: #6fe3ff;
  --cw-crimson: #ff4d6a;
  --cw-glass: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  --cw-glass-solid: rgba(10, 11, 22, .72);
  --cw-text: #ece9f6;
  --cw-muted: #a7a3bd;
}

/* ---------- Cosmic backdrop ---------- */
body.theme-celestial {
  background: var(--cw-void);
  color: var(--cw-text);
  position: relative;
  isolation: isolate;
}
body.theme-celestial::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 78% -10%, var(--cw-nebula-1), transparent 60%),
    radial-gradient(900px 600px at -10% 40%, var(--cw-nebula-2), transparent 60%),
    radial-gradient(700px 500px at 60% 110%, rgba(212,168,75,.08), transparent 60%),
    var(--cw-void);
}
body.theme-celestial::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 32% 72%, #cfd6ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 58% 34%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 76% 82%, #ffe7b0 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 6% 88%, #cfd6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 44% 8%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 58%, #fff 50%, transparent 51%);
  background-size: 420px 420px, 380px 380px, 520px 520px, 460px 460px, 340px 340px, 600px 600px, 300px 300px, 480px 480px;
  animation: cw-twinkle 9s ease-in-out infinite alternate;
}
@keyframes cw-twinkle { from { opacity: .35; } to { opacity: .7; } }

.theme-celestial ::selection { background: rgba(212,168,75,.32); }
.theme-celestial [hidden] { display: none !important; }

/* ---------- Typography accents ---------- */
.theme-celestial h1,
.theme-celestial h2,
.theme-celestial h3 { color: var(--cw-text); }
.theme-celestial h1 em,
.theme-celestial .hero-copy h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--cw-gold-bright), var(--cw-gold) 45%, #b98a2e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 24px rgba(212,168,75,.35));
}
.theme-celestial .eyebrow {
  color: var(--cw-gold);
  letter-spacing: .22em;
}
.theme-celestial .eyebrow::before {
  content: '✦ ';
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--cw-gold-bright);
}
.theme-celestial .terminal-label { color: #8f8ab0; }
.theme-celestial p,
.theme-celestial .portal-muted { color: var(--cw-muted); }

/* ---------- Brand emblem ---------- */
.theme-celestial .brand { display: inline-flex; align-items: center; gap: 12px; }
.theme-celestial .brand::before {
  content: 'OI';
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--cw-gold-line);
  background: radial-gradient(circle at 50% 35%, rgba(243,213,138,.35), rgba(212,168,75,.06) 62%, transparent 64%), #0b0b14;
  box-shadow: 0 0 0 4px rgba(212,168,75,.06), 0 0 26px rgba(212,168,75,.28);
  color: var(--cw-gold-bright);
  font: 800 13px/1 var(--font-display);
  letter-spacing: .08em;
}
.theme-celestial .ops-mark {
  border-color: var(--cw-gold-line);
  color: var(--cw-gold-bright);
  box-shadow: 0 0 26px rgba(212,168,75,.28);
}

/* ---------- Buttons ---------- */
.theme-celestial .btn-primary {
  background: linear-gradient(180deg, var(--cw-gold-bright), var(--cw-gold) 55%, #a87b25);
  color: #120d02;
  border: 1px solid rgba(243,213,138,.7);
  box-shadow: 0 0 0 1px rgba(212,168,75,.15), 0 10px 34px rgba(212,168,75,.28);
}
.theme-celestial .btn-primary:hover,
.theme-celestial .btn-primary:focus-visible {
  background: linear-gradient(180deg, #fbe6ad, var(--cw-gold-bright) 50%, var(--cw-gold));
  box-shadow: 0 0 0 1px rgba(243,213,138,.4), 0 14px 44px rgba(212,168,75,.42);
  color: #120d02;
}
.theme-celestial .btn-ghost {
  border: 1px solid var(--cw-gold-line);
  background: rgba(10,11,22,.45);
  color: var(--cw-text);
  backdrop-filter: blur(8px);
}
.theme-celestial .btn-ghost:hover,
.theme-celestial .btn-ghost:focus-visible {
  border-color: var(--cw-gold);
  background: rgba(212,168,75,.08);
  color: var(--cw-gold-bright);
}
.theme-celestial :focus-visible { outline: 2px solid var(--cw-gold-bright); outline-offset: 3px; }

/* ---------- Glass surfaces ---------- */
.theme-celestial .capability-card,
.theme-celestial .readiness-card,
.theme-celestial .trust-link-card,
.theme-celestial .hero-system,
.theme-celestial .portal-card,
.theme-celestial .tool-card,
.theme-celestial .policy-card,
.theme-celestial .metric,
.theme-celestial .auth-card {
  position: relative;
  border: 1px solid var(--cw-gold-line);
  background: var(--cw-glass), var(--cw-glass-solid);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 70px rgba(0,0,0,.45), inset 0 1px rgba(255,255,255,.06);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.theme-celestial .capability-card:hover,
.theme-celestial .readiness-card:hover,
.theme-celestial .trust-link-card:hover,
.theme-celestial .tool-card:hover,
.theme-celestial .portal-card:hover {
  border-color: rgba(243,213,138,.6);
  box-shadow: 0 28px 80px rgba(0,0,0,.5), 0 0 40px var(--cw-gold-glow), inset 0 1px rgba(255,255,255,.08);
  transform: translateY(-2px);
}
/* constellation corner mark */
.theme-celestial .capability-card::after,
.theme-celestial .readiness-card::after,
.theme-celestial .portal-card::after,
.theme-celestial .tool-card::after {
  content: '';
  position: absolute;
  top: 14px;
  right: 14px;
  bottom: auto;
  width: 54px;
  height: 34px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  pointer-events: none;
  opacity: .55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 34'%3E%3Cg stroke='%23d4a84b' stroke-width='.8' fill='none' opacity='.8'%3E%3Cpath d='M3 28 L17 12 L31 20 L45 5 L51 16'/%3E%3C/g%3E%3Cg fill='%23f3d58a'%3E%3Ccircle cx='3' cy='28' r='1.6'/%3E%3Ccircle cx='17' cy='12' r='2'/%3E%3Ccircle cx='31' cy='20' r='1.4'/%3E%3Ccircle cx='45' cy='5' r='2.2'/%3E%3Ccircle cx='51' cy='16' r='1.3'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
}
.theme-celestial .capability-card.featured {
  background:
    radial-gradient(400px 220px at 85% 0%, rgba(212,168,75,.16), transparent 70%),
    var(--cw-glass), var(--cw-glass-solid);
}
.theme-celestial .card-link { color: var(--cw-gold-bright); }

/* ---------- Header ---------- */
.theme-celestial .header {
  background: rgba(5,6,10,.62);
  border-bottom: 1px solid rgba(212,168,75,.14);
  backdrop-filter: blur(16px) saturate(1.2);
}
.theme-celestial .nav-links { gap: clamp(12px, 1.5vw, 22px); }
.theme-celestial .nav-links a { color: var(--cw-muted); white-space: nowrap; }
.theme-celestial .nav-links a:hover { color: var(--cw-gold-bright); }
.theme-celestial .nav-actions .btn { white-space: nowrap; }

/* ---------- Homepage hero ---------- */
.theme-celestial .hero--command {
  position: relative;
  background: var(--cw-void);
}
.theme-celestial .hero--command::before {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(5,6,10,.97) 0%, rgba(5,6,10,.86) 34%, rgba(5,6,10,.35) 62%, rgba(5,6,10,.15) 100%),
    linear-gradient(0deg, rgba(5,6,10,1) 0%, transparent 22%);
}
.theme-celestial .hero--command::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url('/assets/celestial-hero.webp') right center / cover no-repeat;
  animation: cw-drift 40s ease-in-out infinite alternate;
}
@keyframes cw-drift { from { transform: scale(1.02); } to { transform: scale(1.07) translateX(-1%); } }
.theme-celestial .hero-system {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.015)), rgba(7,8,16,.72);
}
.theme-celestial .system-status { color: var(--cw-gold-bright); border-color: var(--cw-gold-line); }

/* Doctrine ticker (static principles, not live telemetry) */
.celestial-ticker {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-block: 1px solid rgba(212,168,75,.18);
  background: linear-gradient(90deg, rgba(5,6,10,.95), rgba(14,12,30,.85), rgba(5,6,10,.95));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.celestial-ticker-track {
  display: flex;
  width: max-content;
  gap: 48px;
  padding: 12px 0;
  animation: cw-ticker 48s linear infinite;
  font: 700 11px/1 var(--oi-mono, ui-monospace, monospace);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cw-muted);
  white-space: nowrap;
}
.celestial-ticker-track span::before { content: '✦'; margin-right: 14px; color: var(--cw-gold); }
.celestial-ticker-track span.threat::before { color: var(--cw-crimson); }
.celestial-ticker-track span.safe::before { color: var(--cw-cyan); }
.celestial-ticker:hover .celestial-ticker-track { animation-play-state: paused; }
@keyframes cw-ticker { to { transform: translateX(-50%); } }

.theme-celestial .proof-band {
  background: rgba(8,9,18,.6);
  border-color: rgba(212,168,75,.14);
}
.theme-celestial .proof-item .terminal-label { color: var(--cw-gold); }
.theme-celestial .readiness-section {
  background:
    radial-gradient(800px 400px at 50% 0%, rgba(98,72,214,.1), transparent 70%);
}
.theme-celestial .boundary-note {
  border: 1px solid rgba(255,77,106,.28);
  background: rgba(255,77,106,.06);
}
.theme-celestial .footer {
  background: rgba(5,6,10,.8);
  border-top: 1px solid rgba(212,168,75,.14);
}

/* ---------- Sign-in ---------- */
.theme-celestial.auth-shell { background: transparent; }
.theme-celestial .auth-layout {
  border-color: var(--cw-gold-line);
  background: rgba(7,8,16,.5);
  box-shadow: 0 40px 140px rgba(0,0,0,.6), 0 0 80px rgba(98,72,214,.12);
}
.theme-celestial .auth-intro {
  position: relative;
  background:
    linear-gradient(180deg, rgba(5,6,10,.55) 0%, rgba(5,6,10,.25) 40%, rgba(5,6,10,.92) 100%),
    url('/assets/celestial-guardian.webp') center 20% / cover no-repeat,
    var(--cw-deep);
}
.theme-celestial .auth-intro > * { position: relative; z-index: 1; }
.theme-celestial .auth-intro-copy {
  background: rgba(5, 6, 12, 0.48);
  border: 1px solid rgba(212, 168, 75, 0.22);
  border-radius: 22px;
  padding: clamp(22px, 3vw, 32px);
  backdrop-filter: blur(6px);
}
.auth-visual-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.auth-visual-plate {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(212, 168, 75, 0.22);
  background: rgba(5, 6, 12, 0.72);
}
.auth-visual-plate img {
  width: 100%;
  height: 68px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--cw-gold-line);
  display: block;
}
.auth-visual-plate strong {
  font-size: 11px;
  color: var(--cw-text);
  line-height: 1.25;
}
.auth-visual-plate span {
  font: 700 10px/1.2 var(--oi-mono, ui-monospace, monospace);
  color: var(--cw-gold);
  letter-spacing: .04em;
}
.theme-celestial .auth-rail {
  background: rgba(5,6,10,.62);
  border: 1px solid rgba(212,168,75,.18);
  border-radius: 14px;
  backdrop-filter: blur(10px);
}
.theme-celestial .auth-rail > span { color: var(--cw-gold-bright); }
.celestial-caption {
  margin: 18px 0 0;
  font: 700 clamp(1.1rem, 2vw, 1.5rem)/1.2 var(--font-display);
  letter-spacing: .04em;
  color: var(--cw-gold-bright) !important;
  text-shadow: 0 0 28px rgba(212,168,75,.45);
}
.celestial-caption::before { content: '✦ '; }
.theme-celestial .auth-form-pane {
  background:
    radial-gradient(500px 300px at 50% 0%, rgba(212,168,75,.08), transparent 70%),
    rgba(7,8,16,.82);
}
.theme-celestial .auth-card { border-radius: 24px; }
.theme-celestial .auth-card input,
.theme-celestial .admin-form input,
.theme-celestial .admin-form select {
  background: rgba(5,6,10,.7);
  border: 1px solid rgba(212,168,75,.22);
  color: var(--cw-text);
}
.theme-celestial .auth-card input:focus,
.theme-celestial .admin-form input:focus,
.theme-celestial .admin-form select:focus {
  border-color: var(--cw-gold);
  box-shadow: 0 0 0 3px rgba(212,168,75,.18);
}
.theme-celestial .otp-slots span { border-color: rgba(212,168,75,.3); background: rgba(5,6,10,.7); }
.theme-celestial .demo-boundary-note { border-color: rgba(111,227,255,.2); background: rgba(111,227,255,.04); }
.theme-celestial .demo-boundary-note a { color: var(--cw-cyan); }

/* ---------- Command Deck (admin) ---------- */
.theme-celestial.portal-shell { background: transparent; }
.theme-celestial .portal-topbar--command {
  border: 1px solid rgba(212,168,75,.18);
  border-radius: 20px;
  background: rgba(7,8,16,.7);
  backdrop-filter: blur(14px);
  padding: 16px 20px;
}
.theme-celestial .command-ribbon-item {
  border-color: rgba(212,168,75,.18);
  background: rgba(7,8,16,.6);
}
.theme-celestial .command-ribbon-item strong { color: var(--cw-gold-bright); }
.theme-celestial .admin-warning {
  border: 1px solid rgba(255,77,106,.3);
  background: linear-gradient(90deg, rgba(255,77,106,.1), rgba(255,77,106,.02));
  color: #f3c6cf;
}
.theme-celestial .metric strong { color: var(--cw-gold-bright); text-shadow: 0 0 18px rgba(212,168,75,.35); }

.theme-celestial .admin-tabs {
  border: 1px solid rgba(212,168,75,.18);
  border-radius: 18px;
  background: rgba(7,8,16,.72);
  backdrop-filter: blur(14px);
  padding: 8px;
}
.theme-celestial .admin-tabs button {
  border-radius: 12px;
  color: var(--cw-muted);
  border: 1px solid transparent;
  text-align: left;
}
.theme-celestial .admin-tabs button:hover { color: var(--cw-gold-bright); background: rgba(212,168,75,.06); }
.theme-celestial .admin-tabs button.is-active {
  color: #120d02;
  background: linear-gradient(180deg, var(--cw-gold-bright), var(--cw-gold));
  box-shadow: 0 6px 24px rgba(212,168,75,.3);
}

@media (min-width: 1180px) {
  .theme-celestial .portal-main--command {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    column-gap: 22px;
    align-items: start;
  }
  .theme-celestial .portal-main--command > * { grid-column: 2; }
  .theme-celestial .portal-main--command > .admin-tabs {
    grid-column: 1;
    grid-row: 1 / span 12;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
  }
  .theme-celestial .portal-main--command > .admin-tabs::before {
    content: 'Command Deck';
    display: block;
    padding: 10px 12px 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(212,168,75,.16);
    font: 700 10px/1.2 var(--oi-mono, ui-monospace, monospace);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--cw-gold);
  }
  .theme-celestial .admin-tabs button { width: 100%; padding: 12px 14px; }
}

/* LLM battlefield visual (decorative) */
.celestial-battlefield {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 28px;
  align-items: center;
  margin: 0 0 26px;
  padding: 22px;
  border: 1px solid var(--cw-gold-line);
  border-radius: 24px;
  background:
    radial-gradient(420px 260px at 22% 50%, rgba(98,72,214,.18), transparent 70%),
    var(--cw-glass), var(--cw-glass-solid);
  overflow: hidden;
}
.celestial-battlefield svg { width: 100%; height: auto; display: block; }
.celestial-battlefield .cw-orbit { transform-origin: 160px 160px; animation: cw-rotate 30s linear infinite; }
.celestial-battlefield .cw-orbit.rev { animation-duration: 44s; animation-direction: reverse; }
.celestial-battlefield .cw-core { animation: cw-pulse 4s ease-in-out infinite; transform-origin: 160px 160px; }
.celestial-battlefield .cw-vector { stroke-dasharray: 6 10; animation: cw-dash 2.4s linear infinite; }
@keyframes cw-rotate { to { transform: rotate(360deg); } }
@keyframes cw-pulse { 50% { transform: scale(1.06); opacity: .85; } }
@keyframes cw-dash { to { stroke-dashoffset: -32; } }
.celestial-battlefield h2 { margin: 6px 0 10px; }
.celestial-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding: 0; list-style: none; }
.celestial-legend li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03);
  font: 700 10px/1.2 var(--oi-mono, ui-monospace, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--cw-muted);
}
.celestial-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.celestial-legend .gold { background: var(--cw-gold); box-shadow: 0 0 10px var(--cw-gold); }
.celestial-legend .cyan { background: var(--cw-cyan); box-shadow: 0 0 10px var(--cw-cyan); }
.celestial-legend .crimson { background: var(--cw-crimson); box-shadow: 0 0 10px var(--cw-crimson); }

/* ---------- Media-enhanced product cards ---------- */
.theme-celestial .capability-card--media {
  display: flex;
  flex-direction: column;
}
.theme-celestial .capability-card--media .card-media {
  margin: -26px -26px 18px;
  height: 168px;
  overflow: hidden;
  border-bottom: 1px solid rgba(212, 168, 75, 0.22);
  position: relative;
  background: #070812;
}
.theme-celestial .capability-card--media .card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 11, 22, 0.72) 100%);
}
.theme-celestial .capability-card--media .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
}
.theme-celestial .capability-card--media:hover .card-media img {
  transform: scale(1.05);
}
.theme-celestial .capability-card--media::after {
  top: 156px;
}
.theme-celestial .tool-card { overflow: hidden; }
.theme-celestial .tool-card--media::after { top: 134px; }

/* ---------- GitHub Arsenal Grid ---------- */
.arsenal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 32px;
}
.arsenal-card {
  position: relative;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--cw-gold-line);
  background: var(--cw-glass), var(--cw-glass-solid);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45), inset 0 1px rgba(255, 255, 255, .06);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.arsenal-card:hover {
  border-color: rgba(243, 213, 138, .6);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .5), 0 0 40px var(--cw-gold-glow), inset 0 1px rgba(255, 255, 255, .08);
  transform: translateY(-2px);
}
.arsenal-media {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(212, 168, 75, 0.28);
  min-height: 190px;
  background: #070812;
}
.arsenal-media::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 52%, rgba(5, 6, 12, 0.85) 100%);
}
.arsenal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
}
.arsenal-card:hover .arsenal-media img {
  transform: scale(1.05);
}
.arsenal-repo-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(5, 6, 12, 0.86);
  border: 1px solid rgba(212, 168, 75, 0.4);
  font: 700 10px/1.2 var(--oi-mono, ui-monospace, monospace);
  color: var(--cw-gold-bright);
  letter-spacing: .04em;
}
.arsenal-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.arsenal-body h3 {
  margin: 6px 0 8px;
  font-size: 1.22rem;
  line-height: 1.22;
}
.arsenal-body p {
  margin: 0 0 12px;
  font-size: 0.94rem;
  line-height: 1.55;
}
.arsenal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.arsenal-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(212, 168, 75, 0.26);
  background: rgba(255, 255, 255, 0.03);
  color: var(--cw-text);
  font: 600 11px/1.2 var(--oi-mono, ui-monospace, monospace);
  letter-spacing: .03em;
}
.arsenal-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(212, 168, 75, 0.16);
}
.arsenal-price-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(212, 168, 75, 0.12);
  border: 1px solid rgba(243, 213, 138, 0.35);
  color: var(--cw-gold-bright);
  font: 700 11px/1.2 var(--oi-mono, ui-monospace, monospace);
}

/* ---------- Stripe Store & Billing Page ---------- */
.billing-main { width: min(1240px, calc(100% - 32px)); }
.checkout-banner {
  margin: 0 0 24px;
  padding: 18px 22px;
  border-radius: 18px;
  border: 1px solid var(--cw-gold-line);
  background: rgba(212, 168, 75, 0.09);
  color: var(--cw-text);
  line-height: 1.55;
}
.checkout-banner[data-tone="safe"] {
  border-color: rgba(111, 227, 255, 0.45);
  background: rgba(111, 227, 255, 0.08);
}
.checkout-banner a { color: var(--cw-gold-bright); }

.billing-restricted-banner {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
  margin: 0 0 28px;
  border-radius: 24px;
  border: 1px solid rgba(243, 213, 138, 0.45);
  background:
    radial-gradient(500px 240px at 85% 0%, rgba(212, 168, 75, 0.16), transparent 70%),
    var(--cw-glass), var(--cw-glass-solid);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .5), 0 0 36px var(--cw-gold-glow);
}
.billing-restricted-banner h2 { margin: 6px 0 10px; font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.billing-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 24px;
  padding: 18px 22px;
  border-radius: 20px;
  border: 1px solid rgba(212, 168, 75, 0.24);
  background: rgba(10, 11, 22, 0.72);
}
.billing-interval-toggle { display: flex; flex-wrap: wrap; gap: 10px; }
.billing-email-field { display: flex; flex-direction: column; gap: 6px; min-width: min(320px, 100%); }
.billing-email-field span {
  font: 700 10px/1.2 var(--oi-mono, ui-monospace, monospace);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--cw-muted);
}
.billing-email-field input {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(5, 6, 10, .75);
  border: 1px solid rgba(212, 168, 75, .28);
  color: var(--cw-text);
}
.billing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.billing-card {
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--cw-gold-line);
  background: var(--cw-glass), var(--cw-glass-solid);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45), inset 0 1px rgba(255, 255, 255, .06);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.billing-card:hover {
  border-color: rgba(243, 213, 138, .62);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .52), 0 0 40px var(--cw-gold-glow);
  transform: translateY(-2px);
}
.billing-card-media {
  position: relative;
  height: 176px;
  overflow: hidden;
  border-bottom: 1px solid rgba(212, 168, 75, 0.22);
  background: #070812;
}
.billing-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.billing-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 20px;
}
.billing-card-body h3 { margin: 6px 0 8px; font-size: 1.15rem; line-height: 1.25; }
.billing-card-body p { margin: 0 0 14px; font-size: 0.9rem; line-height: 1.5; }
.billing-price-row {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(212, 168, 75, 0.16);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.billing-price { font-size: 1.55rem; color: var(--cw-gold-bright); font-family: var(--font-display); }
.billing-price small { font-size: 0.85rem; color: var(--cw-muted); font-weight: 500; }
.billing-subprice { font-size: 12px; color: var(--cw-muted); }
.billing-seat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.billing-seat-row span {
  font: 700 10px/1.2 var(--oi-mono, ui-monospace, monospace);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--cw-muted);
}
.billing-seat-row input {
  width: 84px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(5, 6, 10, .75);
  border: 1px solid rgba(212, 168, 75, .28);
  color: var(--cw-text);
  font-size: 0.9rem;
}

/* ---------- HUD Gallery Strip (Home + Admin) ---------- */
.hud-gallery-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 42px 0 16px;
  flex-wrap: wrap;
}
.hud-gallery-head h3 {
  margin: 4px 0 0;
}
.hud-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.hud-plate {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--cw-gold-line);
  background: var(--cw-glass), var(--cw-glass-solid);
  text-decoration: none;
  color: inherit;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.hud-plate:hover {
  border-color: rgba(243, 213, 138, .65);
  box-shadow: 0 20px 55px rgba(0, 0, 0, .5), 0 0 32px var(--cw-gold-glow);
  transform: translateY(-2px);
}
.hud-plate img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid rgba(212, 168, 75, 0.2);
}
.hud-plate-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hud-plate-body strong {
  font-size: 0.96rem;
  color: var(--cw-text);
}
.hud-plate-body span {
  font-size: 0.82rem;
  color: var(--cw-muted);
  line-height: 1.4;
}

/* ---------- Lab card media banner ---------- */
.lab-card-media {
  margin: -24px -24px 16px;
  height: 146px;
  overflow: hidden;
  border-bottom: 1px solid rgba(212, 168, 75, 0.22);
  background: #070812;
}
.lab-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Secondary / Trust / Customer Shell Celestial Overrides ---------- */
.theme-celestial.demo-shell,
.theme-celestial.trust-page {
  background: transparent;
}
.theme-celestial .demo-topbar,
.theme-celestial .trust-page-header {
  border-color: rgba(212, 168, 75, 0.18);
  background: rgba(7, 8, 16, 0.72);
  backdrop-filter: blur(14px);
}
.theme-celestial .demo-card,
.theme-celestial .demo-module,
.theme-celestial .demo-posture,
.theme-celestial .trust-card {
  border: 1px solid var(--cw-gold-line);
  background: var(--cw-glass), var(--cw-glass-solid);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .05);
}
.theme-celestial .demo-card input,
.theme-celestial .demo-card select,
.theme-celestial .demo-card textarea,
.theme-celestial .tool-input,
.theme-celestial .tool-field {
  background: rgba(5, 6, 10, .72);
  border: 1px solid rgba(212, 168, 75, .24);
  color: var(--cw-text);
}
.theme-celestial .trust-callout {
  border-color: rgba(243, 213, 138, 0.45);
  background: radial-gradient(420px 220px at 90% 0%, rgba(212, 168, 75, 0.12), transparent 70%), var(--cw-glass), var(--cw-glass-solid);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .arsenal-grid { grid-template-columns: 1fr; }
  .billing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .billing-restricted-banner { grid-template-columns: 1fr; }
  .hud-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .theme-celestial .hero--command::after { background-position: 70% center; opacity: .55; }
  .theme-celestial .hero--command::before {
    background: linear-gradient(180deg, rgba(5,6,10,.7), rgba(5,6,10,.92));
  }
  .celestial-battlefield { grid-template-columns: 1fr; }
  .celestial-battlefield svg { max-width: 320px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .arsenal-card { grid-template-columns: 1fr; }
  .arsenal-media { min-height: 170px; }
  .billing-grid { grid-template-columns: 1fr; }
  .hud-gallery-grid { grid-template-columns: 1fr; }
  .auth-visual-strip { grid-template-columns: 1fr; }
}

/* ---------- Motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
  body.theme-celestial::after,
  .theme-celestial .hero--command::after,
  .celestial-ticker-track,
  .celestial-battlefield .cw-orbit,
  .celestial-battlefield .cw-core,
  .celestial-battlefield .cw-vector { animation: none !important; }
  .theme-celestial .capability-card:hover,
  .theme-celestial .readiness-card:hover,
  .theme-celestial .trust-link-card:hover,
  .theme-celestial .tool-card:hover,
  .theme-celestial .portal-card:hover,
  .arsenal-card:hover,
  .hud-plate:hover { transform: none; }
  .theme-celestial .capability-card--media:hover .card-media img,
  .arsenal-card:hover .arsenal-media img { transform: none; }
}
