/* ==========================================================================
   BEYOND COSMIC HORIZON — Light Editorial & Celestial Observatory Stylesheet
   Compliant with Modern Web Guidance (CWV, LCP, content-visibility, a11y)
   and Strict CSP (Zero inline style attributes required)
   ========================================================================== */

:root {
  /* Light Editorial & Celestial Atlas Surfaces */
  --bg-canvas-solid: #F8FAFC;
  --bg-glass-white: rgba(255, 255, 255, 0.86);
  --bg-glass-strong: rgba(255, 255, 255, 0.94);
  --bg-subtle: #F1F5F9;

  /* Brand & Astrophysical Accents */
  --accent-primary: #0284C7;
  --accent-primary-hover: #0369A1;
  --accent-sky-light: #E0F2FE;
  --accent-indigo: #4F46E5;
  --accent-indigo-light: #EEF2FF;
  --accent-amber: #EA580C;
  --accent-amber-light: #FFEDD5;

  /* Typography Colors */
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;

  /* Borders & Shadows */
  --border-subtle: rgba(203, 213, 225, 0.88);
  --border-sky: #BAE6FD;
  --shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.07);
  --shadow-hover: 0 16px 36px -10px rgba(2, 132, 199, 0.14);

  /* Typography Families */
  --font-display: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Spacing & Radii */
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-pill: 9999px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-canvas-solid);
  background-image:
    radial-gradient(circle at 12% 16%, rgba(56, 189, 248, 0.16) 0%, transparent 38%),
    radial-gradient(circle at 88% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 42%),
    radial-gradient(circle at 76% 84%, rgba(251, 146, 60, 0.12) 0%, transparent 40%),
    linear-gradient(180deg, #F0F7FF 0%, #F8FAFC 48%, #F1F5F9 100%);
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Interactive Celestial Star-Chart & Orbital Background Canvas */
#space-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.site-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 4rem;
}

/* Skip to Content Link for Accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent-primary);
  color: #FFFFFF;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus {
  top: 1rem;
}

/* Tabular Numerals for Science Stats & Telemetry */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Frosted White Editorial Surface */
.glass-card {
  background: var(--bg-glass-white);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.glass-card-interactive:hover {
  transform: translateY(-2px);
  border-color: #7DD3FC;
  box-shadow: var(--shadow-hover);
}

/* Science Fact of the Day Hero Gradient Card */
.fact-hero-card {
  background: linear-gradient(135deg, rgba(224, 242, 254, 0.92) 0%, rgba(219, 234, 254, 0.92) 55%, rgba(224, 231, 255, 0.95) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-sky);
  border-radius: var(--radius-xl);
  box-shadow: 0 14px 34px -8px rgba(2, 132, 199, 0.15);
}

/* Corner-Reticle Callout Box (Light Mode Observatory Accent) */
.reticle-box {
  position: relative;
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.92) 0%, rgba(238, 242, 255, 0.92) 100%);
  border: 1px solid var(--border-sky);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.reticle-box::before,
.reticle-box::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  pointer-events: none;
}
.reticle-box::before {
  top: -1px;
  left: -1px;
  border-top: 2.5px solid var(--accent-primary);
  border-left: 2.5px solid var(--accent-primary);
}
.reticle-box::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2.5px solid var(--accent-primary);
  border-right: 2.5px solid var(--accent-primary);
}

/* ==========================================================================
   TOP NAVIGATION BAR & SPACE BACKGROUND SWITCHER
   ========================================================================== */
.top-utility-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.bg-switcher-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.bg-mode-btn {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #FFFFFF;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.bg-mode-btn.is-active,
.bg-mode-btn:hover {
  background: var(--accent-sky-light);
  color: var(--accent-primary-hover);
  border-color: #7DD3FC;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  margin-bottom: 1.5rem;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--accent-sky-light);
  border: 1px solid var(--border-sky);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
}

.nav-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-link:hover,
.nav-link.is-active {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.search-input {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  padding: 0.5rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-primary);
  min-width: 210px;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.search-input:focus {
  background: #FFFFFF;
  border-color: var(--accent-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.55rem 1rem;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--accent-primary);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--accent-primary-hover);
}

.btn-outline {
  background: #FFFFFF;
  color: var(--text-primary);
  border-color: #CBD5E1;
}
.btn-outline:hover {
  background: var(--bg-subtle);
  border-color: #94A3B8;
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  line-height: 1.2;
}
.badge-sky {
  background: var(--accent-sky-light);
  color: var(--accent-primary-hover);
}
.badge-indigo {
  background: var(--accent-indigo-light);
  color: #4338CA;
}
.badge-amber {
  background: var(--accent-amber-light);
  color: #C2410C;
}

/* ==========================================================================
   HERO SPLIT SECTION (7 COLUMNS VIDEO + ARTICLE / 5 COLUMNS FACT OF THE DAY)
   ========================================================================== */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 7fr 5fr;
  }
}

.hero-spotlight-card {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.section-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

.hero-inner-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-inner-split {
    grid-template-columns: 12fr 13fr;
  }
}

.video-thumb-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #060913;
  display: block;
}

.video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-overlay-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  pointer-events: none;
}

.duration-pill {
  position: absolute;
  bottom: 0.55rem;
  right: 0.55rem;
  background: rgba(9, 13, 22, 0.86);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0.55rem 0;
}

.hero-summary {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.9rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Fact of the Day Card */
.fact-of-day-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.fact-stat-display {
  font-family: var(--font-mono);
  font-size: clamp(1.45rem, 2.3vw, 1.95rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  margin: 0.6rem 0 0.75rem;
}

.fact-explanation {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.fact-footer {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(186, 230, 253, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.text-link-btn {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-primary);
  cursor: pointer;
  text-decoration: underline;
}
.text-link-btn:hover {
  color: var(--accent-primary-hover);
}

/* ==========================================================================
   TOPIC FILTER BAR
   ========================================================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.topic-pills-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.topic-pill {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.42rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-glass-white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.topic-pill.is-active,
.topic-pill:hover {
  background: var(--accent-primary);
  color: #FFFFFF;
  border-color: var(--accent-primary);
}

/* ==========================================================================
   CORE WEB VITALS: DEFERRED OFF-SCREEN SECTIONS (modern-web-guidance)
   ========================================================================== */
.cwv-deferred-section {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 380px;
  margin-bottom: 2.25rem;
}

.section-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Daily Science Facts 4-Column Strip */
.facts-strip-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .facts-strip-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .facts-strip-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.fact-mini-card {
  padding: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.fact-mini-thumb {
  width: 58px;
  height: 66px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
  background: #090D16;
}

.fact-mini-title {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0.25rem 0 0.2rem;
}

.fact-mini-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Latest Video Companion Articles 3-Column Grid */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-card {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.article-card-top {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 0.85rem;
  align-items: center;
}

.article-card-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.28;
  color: var(--text-primary);
}

.article-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0.25rem 0;
}

.article-card-summary {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   INTERACTIVE COSMIC SCALE EXPLORER MODULE
   ========================================================================== */
.scale-explorer-card {
  padding: 1.5rem;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.scale-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 768px) {
  .scale-grid {
    grid-template-columns: 5fr 7fr;
  }
}

.scale-canvas-box {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  justify-content: center;
}

.scale-range-input {
  width: 100%;
  margin: 0.6rem 0;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.scale-ticks {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   AEO / GEO SCIENTIFIC TELEMETRY TABLE & FAQ ACCORDION
   ========================================================================== */
.telemetry-table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
}

.telemetry-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  text-align: left;
}

.telemetry-table th,
.telemetry-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.telemetry-table th {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(241, 245, 249, 0.75);
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  padding: 1rem 1.25rem;
}

.faq-question {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-answer {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   MODAL DIALOGS (CREATOR QUICK-PUBLISH STUDIO & ARTICLE READER)
   ========================================================================== */
.modal-dialog {
  margin: auto;
  width: min(94vw, 980px);
  max-height: 90dvh;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  background: #FFFFFF;
  color: var(--text-primary);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  padding: 0;
  overflow-y: auto;
}

.modal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}

.modal-body {
  padding: 1.5rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: var(--text-primary);
  outline: none;
}
.form-control:focus {
  border-color: var(--accent-primary);
}

.chapter-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0;
}

.chapter-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  cursor: pointer;
}
.chapter-btn.is-active,
.chapter-btn:hover {
  background: var(--accent-sky-light);
  color: var(--accent-primary-hover);
  border-color: #7DD3FC;
  font-weight: 700;
}

/* Toast Notification */
.toast-banner {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: #0F172A;
  color: #FFFFFF;
  padding: 0.75rem 1.15rem;
  border-radius: 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
  z-index: 90;
}
.is-hidden {
  display: none !important;
}

/* Utility Spacing & Admin CMS Classes (Strict CSP — No inline style attributes) */
.mt-md {
  margin-top: 1.25rem;
}
.mt-lg {
  margin-top: 1.75rem;
}
.mb-md {
  margin-bottom: 1.25rem;
}
.article-hero-figure {
  margin: 1.75rem 0;
}
figure.article-hero-figure {
  max-height: 480px;
}
.clickable-card {
  cursor: pointer;
}
.site-header {
  position: sticky;
  top: 0.65rem;
  z-index: 40;
}
.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .admin-grid-2 {
    grid-template-columns: 7fr 5fr;
  }
}
.btn-danger {
  background: #FEE2E2;
  color: #B91C1C;
  border-color: #FECACA;
}
.btn-danger:hover {
  background: #FECACA;
  color: #991B1B;
}
.badge-emerald {
  background: #DCFCE7;
  color: #15803D;
}
.chapter-builder-item {
  padding: 0.9rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  display: grid;
  gap: 0.65rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   SECRET ADMIN GATE & ADMIN STUDIO LAYOUT
   ========================================================================== */
.admin-lock-card {
  max-width: 540px;
  margin: 3.5rem auto;
  padding: 2rem;
}

.admin-gate-modal {
  width: min(92vw, 460px);
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 900px) {
  .admin-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.admin-kpi-card {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}
.admin-kpi-card strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
}

.admin-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .admin-layout-grid {
    grid-template-columns: 7fr 5fr;
  }
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .form-row-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.chapter-builder-list,
.seo-check-list,
.admin-list-table {
  display: grid;
  gap: 0.85rem;
}

.seo-check-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}

.admin-list-row {
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.data-table-wrapper {
  overflow-x: auto;
}

.cosmic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  text-align: left;
}
.cosmic-table th,
.cosmic-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
}
.cosmic-table th {
  font-family: var(--font-display);
  font-weight: 700;
  background: var(--bg-subtle);
}

/* ==========================================================================
   APP-LIKE MOBILE BOTTOM NAVIGATION DOCK & RESPONSIVE DESIGN
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 5.25rem;
  }

  .site-wrapper {
    padding: 0.65rem 0.75rem 2.5rem;
  }

  /* Compact, horizontally swipeable background selector bar on mobile */
  .top-utility-bar {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.65rem;
    border-radius: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }

  .top-utility-bar > span.tabular-nums {
    display: none;
  }

  .bg-switcher-group {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.1rem;
    gap: 0.4rem;
  }
  .bg-switcher-group::-webkit-scrollbar {
    display: none;
  }
  .bg-switcher-group strong {
    font-size: 0.7rem;
    white-space: nowrap;
  }
  .bg-mode-btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.7rem;
    padding: 0.35rem 0.65rem;
  }

  /* Sleek Mobile App Header */
  header.site-header {
    position: sticky;
    top: 0.4rem;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.9rem;
    border-radius: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .brand-group {
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
  }

  /* Hide desktop nav links on mobile because we have the fixed bottom app dock */
  header.site-header .primary-nav {
    display: none;
  }

  .header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
  }

  .search-input {
    width: 100%;
    min-height: 42px;
    font-size: 0.85rem;
  }
  .search-input:focus {
    width: 100%;
  }

  .header-actions .btn {
    min-height: 42px;
    padding: 0.5rem 0.85rem;
    white-space: nowrap;
  }

  /* Hero Card Mobile Polish */
  .hero-main-card,
  .fact-spotlight-card,
  .scale-explorer-card {
    padding: 1.1rem;
    border-radius: 16px;
  }

  .hero-headline {
    font-size: 1.35rem;
    line-height: 1.22;
  }

  .cta-row {
    width: 100%;
    gap: 0.55rem;
  }

  .hero-main-card .cta-row .btn {
    flex: 1 1 100%;
    min-height: 44px;
  }

  /* Horizontal Swipeable Topic Filter Pills on Mobile */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
  }

  .topic-pills-group {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.2rem;
    gap: 0.45rem;
  }
  .topic-pills-group::-webkit-scrollbar {
    display: none;
  }

  .topic-pill {
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 38px;
    padding: 0.45rem 0.95rem;
    font-size: 0.76rem;
  }

  /* Mobile Article Cards — Stack thumbnail above headline for clean readability */
  .article-card {
    padding: 1rem;
    border-radius: 16px;
  }

  .article-card-top {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .article-card-title {
    font-size: 1.02rem;
  }

  .article-card .cta-row .btn {
    flex: 1 1 calc(50% - 0.35rem);
    min-height: 42px;
    font-size: 0.76rem;
    padding: 0.5rem 0.65rem;
  }

  /* Bottom-Sheet Style Modals on Mobile */
  .modal-dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 92dvh;
    margin: auto 0 0 0;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
  }

  .modal-header {
    padding: 0.95rem 1.1rem;
    position: sticky;
    top: 0;
    z-index: 5;
  }

  .modal-body {
    padding: 1.1rem;
  }

  /* Toast Banner positioned above Mobile Bottom Nav */
  .toast-banner {
    left: 0.85rem;
    right: 0.85rem;
    bottom: 5.1rem;
    text-align: center;
  }

  /* Fixed Frosted-Glass Mobile Bottom Navigation Dock */
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(203, 213, 225, 0.95);
    box-shadow: 0 -8px 26px rgba(15, 23, 42, 0.08);
    padding: 0.35rem 0.35rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.35rem 0.2rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 700;
    min-height: 46px;
    transition: color 0.15s ease, background-color 0.15s ease;
  }

  .mobile-nav-icon {
    font-size: 1.05rem;
    line-height: 1;
  }

  .mobile-nav-item.is-active,
  .mobile-nav-item:active {
    color: var(--accent-primary);
    background: var(--accent-sky-light);
  }

  /* Keep Admin Panel tabs visible and scrollable on mobile screens */
  #admin-protected-workspace header.site-header .primary-nav {
    display: flex;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    gap: 0.4rem;
  }

  #admin-protected-workspace header.site-header .header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .admin-mode-switcher {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   USER-FRIENDLY ADMIN STUDIO ENHANCEMENTS
   ========================================================================== */
.password-input-group {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.password-input-group .form-control {
  flex: 1 1 auto;
}

.password-toggle-btn {
  flex-shrink: 0;
  min-width: 88px;
  font-weight: 700;
}

.admin-mode-switcher {
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1.5px solid rgba(2, 132, 199, 0.28);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 255, 0.92));
}

.admin-success-banner {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1.5px solid rgba(5, 150, 105, 0.4);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.95), rgba(255, 255, 255, 0.96));
}

.admin-step-box {
  padding: 1.15rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.7);
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  min-height: 32px;
}

.mt-sm {
  margin-top: 0.35rem;
}

/* ==========================================================================
   YOUTUBE VIDEO EMBED, TABLE OF CONTENTS & FULL TRANSCRIPT (SEO BLOGS)
   ========================================================================== */
.admin-script-converter-box {
  border: 1.5px solid rgba(2, 132, 199, 0.35);
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.85), rgba(255, 255, 255, 0.96));
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.06);
}

.video-player-center-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 2.5rem 0;
}

/* ==========================================================================
   DEEP SPACE NEWS DISPATCH HERO IMAGE & FIGURE
   ========================================================================== */
.news-hero-figure {
  width: 100% !important;
  max-width: 100% !important;
  margin: 1.75rem 0 2rem 0 !important;
  display: block !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.news-image-container {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #060913 !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  border: 1.5px solid rgba(2, 132, 199, 0.4) !important;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  padding: 0.5rem !important;
  margin: 0 !important;
}

.news-hero-img {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 520px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  border-radius: 12px !important;
}

.news-hero-caption {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  text-align: center !important;
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
  color: #94a3b8 !important;
  margin-top: 0.75rem !important;
  padding: 0 0.5rem !important;
}

#video-player-section,
.video-embed-container {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin-left: auto !important;
  margin-right: auto !important;
  aspect-ratio: 16 / 9;
  min-height: 540px;
  max-height: none !important;
  border-radius: 20px;
  overflow: hidden;
  background: #060913;
  border: 2px solid rgba(2, 132, 199, 0.45);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: block;
}

@media (max-width: 1024px) {
  #video-player-section,
  .video-embed-container {
    min-height: 440px;
    border-radius: 18px;
  }
}

@media (max-width: 768px) {
  .video-player-center-wrapper {
    margin: 1.75rem 0;
  }
  #video-player-section,
  .video-embed-container {
    min-height: 280px;
    border-radius: 14px;
  }
}

@media (max-width: 480px) {
  #video-player-section,
  .video-embed-container {
    min-height: 210px;
    border-radius: 10px;
  }
}

.youtube-embed-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.blog-toc-box {
  padding: 1.15rem 1.35rem;
  border-left: 4px solid var(--accent-sky);
  background: rgba(248, 250, 252, 0.92);
}

.blog-toc-list {
  margin: 0.65rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.4rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

.blog-toc-list a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.blog-toc-list a:hover,
.blog-toc-list a:focus-visible {
  color: var(--accent-sky);
  text-decoration: underline;
}

.transcript-details {
  padding: 1.15rem 1.35rem;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(255, 255, 255, 0.94);
}

.transcript-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.transcript-summary::-webkit-details-marker {
  display: none;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

/* ==========================================================================
   4-HOUR DEEP SPACE NEWS & TELEMETRY HUB STYLES
   ========================================================================== */
.news-telemetry-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #94A3B8;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  backdrop-filter: blur(8px);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 2s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  display: inline-block;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.news-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.news-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 12px 28px -8px rgba(2, 132, 199, 0.25);
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.news-credit-text {
  font-size: 0.75rem;
  color: #94A3B8;
  line-height: 1.35;
  flex: 1;
}

.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #D97706;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.dark .badge-amber {
  color: #FBBF24;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* ==========================================================================
   OFFICIAL CONTACT & EDITORIAL COMMUNICATIONS DESK
   ========================================================================== */
.contact-section-wrap {
  margin-top: 2.25rem;
}

.contact-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

@media (min-width: 768px) {
  .contact-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-card {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-glass-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: #7DD3FC;
  box-shadow: var(--shadow-hover);
}

.contact-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: var(--accent-sky-light);
  border: 1px solid var(--border-sky);
  margin-bottom: 0.75rem;
}

.contact-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.contact-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 0.85rem;
}

.contact-detail-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-pill);
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: var(--accent-primary-hover);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  word-break: break-all;
  transition: all 0.2s ease;
}

.contact-detail-pill:hover {
  background: var(--accent-sky-light);
  border-color: var(--accent-primary);
  transform: translateX(2px);
}

.contact-meta-banner {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.85), rgba(248, 250, 252, 0.95));
  border: 1px dashed var(--border-sky);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   VIDEO BLOG IMAGE UPLOADER & IN-ARTICLE FIGURES
   ========================================================================== */
.admin-dropzone-wrap {
  width: 100%;
}

.admin-dropzone {
  position: relative;
  border: 2px dashed var(--border-sky);
  border-radius: var(--radius-lg);
  background: rgba(240, 249, 255, 0.4);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  cursor: pointer;
}

.admin-dropzone:hover,
.admin-dropzone.is-dragover {
  border-color: var(--accent-primary);
  background: rgba(240, 249, 255, 0.85);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -6px rgba(2, 132, 199, 0.15);
}

.admin-dropzone-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.admin-dropzone-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}

.admin-dropzone-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.admin-dropzone-text {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.admin-dropzone-browse {
  color: var(--accent-primary);
  font-weight: 700;
  text-decoration: underline;
}

.admin-dropzone-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.admin-dropzone-preview {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-card);
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  text-align: left;
  position: relative;
  z-index: 10;
}

.admin-dropzone-preview-img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: #000;
  flex-shrink: 0;
}

.admin-dropzone-preview-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.admin-dropzone-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Chapter Image Uploader Inside Sections */
.chapter-img-box {
  background: rgba(248, 250, 252, 0.85);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.chapter-img-preview-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.chapter-img-thumb {
  width: 80px;
  height: 55px;
  object-fit: cover;
  border-radius: 4px;
  background: #000;
  flex-shrink: 0;
}

/* Standalone & Editorial Article Figures */
.article-section-figure,
.ed-chapter-figure,
.article-hero-figure {
  width: 100%;
  margin: 1.5rem 0;
  display: block;
}

.article-image-container,
.ed-image-container {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #070B14;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid rgba(2, 132, 199, 0.35);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.article-section-img,
.ed-chapter-img,
.article-hero-img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 540px;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

.article-section-caption,
.ed-chapter-caption {
  font-family: var(--font-mono, monospace);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.65rem;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   MOTION & ACCESSIBILITY SAFETY (modern-web-guidance compliant)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}




/* ==========================================================================
   STARGAZING GEAR & AFFILIATE SHOWCASE STYLES
   ========================================================================== */
.top-announcement-bar {
  background: linear-gradient(90deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  border-bottom: 1px solid rgba(56, 189, 248, 0.25);
  color: #F8FAFC;
  padding: 0.55rem 1.25rem;
  font-size: 0.8125rem;
  position: relative;
  z-index: 100;
}
.top-announcement-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.announcement-badge {
  background: rgba(2, 132, 199, 0.25);
  border: 1px solid #38BDF8;
  color: #38BDF8;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.announcement-text {
  flex: 1 1 auto;
  color: #E2E8F0;
}
.announcement-text strong {
  color: #FFFFFF;
}
.announcement-btn {
  background: #FF9900;
  color: #111827 !important;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
  white-space: nowrap;
}
.announcement-btn:hover {
  background: #FFAC33;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.45);
}

/* Gear Showcase Grid */
.gear-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}
@media (max-width: 1024px) {
  .gear-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .gear-grid {
    grid-template-columns: 1fr;
  }
}

.gear-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}
.gear-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-primary);
}
.gear-card-tag {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  font-size: 0.6875rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.gear-tag-popular {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FCD34D;
}
.gear-tag-pro {
  background: #E0E7FF;
  color: #4338CA;
  border: 1px solid #A5B4FC;
}
.gear-tag-guide {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
}
.gear-tag-vintage {
  background: #FFEDD5;
  color: #C2410C;
  border: 1px solid #FDBA74;
}

.gear-thumb-wrap {
  width: 100%;
  height: 200px;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
a.gear-thumb-wrap:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.25);
  transform: translateY(-2px);
}
.gear-thumb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
a.gear-thumb-wrap:hover .gear-thumb-img,
.gear-card:hover .gear-thumb-img {
  transform: scale(1.06);
}

.gear-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.gear-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 0.4rem;
}
.gear-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}
.gear-card-title a:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}
.gear-card-specs {
  font-size: 0.75rem;
  color: var(--accent-primary-hover);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.gear-card-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1 1 auto;
}
.gear-rating-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.gear-stars {
  color: #F59E0B;
  letter-spacing: 0.05em;
}

.btn-amazon {
  background: #FF9900;
  color: #111827 !important;
  font-weight: 700;
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(255, 153, 0, 0.25);
  border: 1px solid #D97706;
}
.btn-amazon:hover {
  background: #FFAC33;
  box-shadow: 0 4px 14px rgba(255, 153, 0, 0.4);
  transform: translateY(-1px);
}

.affiliate-disclosure-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 1rem;
  font-style: italic;
}

/* In-Article Stargazing Gear Recommendation Box */
.ed-gear-banner {
  margin: 2.5rem 0;
  padding: 1.5rem;
  border-radius: 14px;
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
[data-theme="light"] .ed-gear-banner,
html[data-theme="light"] .ed-gear-banner {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(2, 132, 199, 0.3);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}
.ed-gear-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
[data-theme="light"] .ed-gear-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
.ed-gear-header-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #38BDF8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
[data-theme="light"] .ed-gear-header-title {
  color: #0284C7;
}
.ed-gear-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.ed-gear-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
[data-theme="light"] .ed-gear-item {
  background: #F8FAFC;
  border-color: #E2E8F0;
}
.ed-gear-item:hover {
  transform: translateY(-2px);
  border-color: #38BDF8;
}
.ed-gear-thumb-wrap {
  width: 100%;
  height: 140px;
  background: #FFFFFF;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  margin-bottom: 0.75rem;
}
.ed-gear-thumb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.ed-gear-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.35rem;
  color: #F8FAFC;
}
[data-theme="light"] .ed-gear-item-title {
  color: #0F172A;
}
.ed-gear-item-desc {
  font-size: 0.78rem;
  color: #94A3B8;
  line-height: 1.45;
  margin-bottom: 0.75rem;
  flex: 1 1 auto;
}
[data-theme="light"] .ed-gear-item-desc {
  color: #475569;
}
.btn-amazon-sm {
  background: #FF9900;
  color: #111827 !important;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid #D97706;
  transition: all 0.15s ease;
}
.btn-amazon-sm:hover {
  background: #FFAC33;
  transform: translateY(-1px);
}
.ed-gear-disclosure {
  font-size: 0.72rem;
  color: #64748B;
  margin-top: 1rem;
  text-align: center;
  font-style: italic;
}
