/* ==========================================================================
   Stargazer's Atlas — Astronomy Tools & Reference
   Global stylesheet. Deep-space midnight blue, starlight gold, nebula purple.
   The site uses one navigation pattern: an L-shaped composite of a vertical
   icon rail (left) and a horizontal tool bar (top).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Midnight blue scale */
  --midnight-950: #05070F;
  --midnight-900: #0A0E1F;
  --midnight-800: #111834;
  --midnight-700: #1A2348;
  --midnight-600: #252F5C;
  --midnight-500: #354070;
  --midnight-400: #4A5688;

  /* Starlight gold scale */
  --star-900: #7A5A10;
  --star-800: #B88A20;
  --star-500: #F0C75E;
  --star-400: #F5D585;
  --star-300: #F8E2A8;
  --star-200: #FBEFCC;
  --star-100: #FDF8E8;

  /* Nebula purple scale */
  --nebula-900: #3A2A5C;
  --nebula-800: #5A4288;
  --nebula-500: #8B6FC7;
  --nebula-400: #A88FDB;
  --nebula-300: #C4B0E8;
  --nebula-200: #E0D4F4;
  --nebula-100: #F0E8FA;

  /* Accents */
  --cyan-700: #4AA8C8;
  --cyan-500: #6EC4E0;
  --cyan-300: #A0DCF0;
  --cyan-100: #D0EFF8;
  --orange-700: #E87A3C;
  --orange-500: #F09A5C;
  --orange-300: #F5B888;
  --orange-100: #FAD8C0;

  /* Neutrals */
  --ink: #E8EAF2;
  --ink-2: #A8AEC4;
  --ink-3: #7A8098;
  --line: #3A4060;
  --line-2: #252F5C;

  /* Semantic */
  --danger: #E85A4A;
  --ok: #5AB88A;
  --warn: #F0C75E;
  --info: #8B6FC7;

  /* Surfaces */
  --bg: var(--midnight-900);
  --bg-deep: var(--midnight-950);
  --surface: var(--midnight-800);
  --surface-2: var(--midnight-700);

  /* Typography */
  --font-display: "Orbitron", "Michroma", "Segoe UI", "Trebuchet MS", sans-serif;
  --font-body: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, Menlo, monospace;

  /* Shape */
  --r-sm: 6px;
  --r-card: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Elevation */
  --sh-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --sh-sm: 0 2px 8px rgba(0, 0, 0, .45);
  --sh-md: 0 8px 24px rgba(0, 0, 0, .5);
  --sh-lg: 0 20px 56px rgba(0, 0, 0, .6);
  --glow-star: 0 0 16px rgba(240, 199, 94, .35), 0 0 40px rgba(240, 199, 94, .15);
  --glow-nebula: 0 0 20px rgba(139, 111, 199, .3);

  /* Motion */
  --t-fast: .16s ease;
  --t-mid: .3s ease;
  --t-slow: .8s ease-out;

  /* Layout */
  --rail-w: 64px;
  --bar-h: 56px;
  --container: 1160px;
  --gutter: 24px;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-left: var(--rail-w);
  padding-top: var(--bar-h);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Starfield texture: a multi-point radial gradient wash over the content area.
   Kept at low opacity so it reads as texture rather than decoration. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, rgba(240, 199, 94, .5), transparent 60%),
    radial-gradient(1.2px 1.2px at 34% 62%, rgba(240, 199, 94, .38), transparent 60%),
    radial-gradient(1.6px 1.6px at 62% 12%, rgba(232, 234, 242, .45), transparent 60%),
    radial-gradient(1.1px 1.1px at 78% 74%, rgba(160, 220, 240, .4), transparent 60%),
    radial-gradient(1.3px 1.3px at 88% 32%, rgba(240, 199, 94, .32), transparent 60%),
    radial-gradient(1.2px 1.2px at 24% 88%, rgba(200, 176, 232, .35), transparent 60%),
    radial-gradient(1px 1px at 52% 44%, rgba(232, 234, 242, .3), transparent 60%),
    radial-gradient(1.1px 1.1px at 70% 92%, rgba(240, 199, 94, .28), transparent 60%);
  opacity: .5;
}

img { max-width: 100%; display: block; }

a { color: var(--nebula-400); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--star-400); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .01em;
  color: var(--ink);
  margin: 0 0 .6em;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3 { font-size: clamp(1.18rem, 2vw, 1.4rem); }
h4 { font-size: 1.08rem; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: .4em; }

hr { border: 0; border-top: 1px solid var(--line-2); margin: 32px 0; }

::selection { background: rgba(240, 199, 94, .28); color: var(--star-100); }

:focus-visible {
  outline: 2px solid var(--star-500);
  outline-offset: 2px;
  box-shadow: 0 0 12px rgba(240, 199, 94, .4);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 900;
  background: var(--star-500);
  color: var(--midnight-950);
  padding: 10px 18px;
  border-radius: 0 0 var(--r-sm) 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

.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;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 820px; }
.container-wide { max-width: 1360px; }

main { position: relative; z-index: 1; display: block; }

.section { padding: 60px 0; }
.section-sm { padding: 38px 0; }
.section-tight { padding: 44px 0 60px; }
.section-deep { background: var(--bg-deep); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.split-wide { display: grid; grid-template-columns: 380px 1fr; gap: 34px; align-items: start; }
.split-side { display: grid; grid-template-columns: 1fr 310px; gap: 40px; align-items: start; }

.eyebrow {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--star-500);
  margin: 0 0 12px;
  font-family: var(--font-body);
}
.eyebrow::before { content: "\2726"; margin-right: 8px; color: var(--star-500); }

.lede { font-size: 1.06rem; color: var(--ink-2); max-width: 68ch; }
.muted { color: var(--ink-2); }
.mono { font-family: var(--font-mono); }
.center { text-align: center; }

/* --------------------------------------------------------------------------
   4. L-shaped navigation — vertical icon rail
   -------------------------------------------------------------------------- */
.rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--rail-w);
  z-index: 250;
  background: var(--bg-deep);
  border-right: 1px solid var(--star-900);
  display: flex;
  flex-direction: column;
  transition: width var(--t-mid);
  overflow: hidden;
}
body.rail-open { --rail-w: 220px; }

.rail-brand {
  height: 64px;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line-2);
  text-decoration: none;
  color: var(--ink);
}
.rail-mark {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--star-500);
  display: grid;
  place-items: center;
  background: rgba(240, 199, 94, .06);
  box-shadow: var(--glow-star);
}
.rail-mark svg { width: 22px; height: 22px; stroke: var(--star-500); }
.rail-brand-text { display: none; white-space: nowrap; }
body.rail-open .rail-brand-text { display: block; }
.rail-name {
  display: block;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}
.rail-tag {
  display: block;
  font-size: .52rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--nebula-400);
  margin-top: 3px;
}

.rail-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--midnight-600) transparent;
}
.rail-nav::-webkit-scrollbar { width: 6px; }
.rail-nav::-webkit-scrollbar-thumb { background: var(--midnight-600); border-radius: 3px; }

.rail-item {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 48px;
  padding: 0 8px;
  margin: 2px 6px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: .84rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
  position: relative;
}
.rail-item .ico { width: 20px; height: 20px; min-width: 20px; flex: none; }
.rail-item span { opacity: 0; transition: opacity var(--t-fast); }
body.rail-open .rail-item span { opacity: 1; }
.rail-item:hover { background: rgba(240, 199, 94, .1); color: var(--star-500); }
.rail-item.is-active {
  background: rgba(240, 199, 94, .14);
  color: var(--star-500);
  box-shadow: var(--glow-nebula);
}
.rail-item.is-active::before {
  content: "";
  position: absolute;
  left: -6px; top: 8px; bottom: 8px;
  width: 3px;
  background: var(--star-500);
  border-radius: 0 2px 2px 0;
}

.rail-divider { height: 1px; background: var(--star-900); margin: 10px 10px; opacity: .7; }

.rail-group { display: none; }
body.rail-open .rail-group { display: block; }
.rail-group-label {
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--star-500);
  padding: 8px 14px 6px;
}
.rail-cat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
  font-size: .78rem;
  color: var(--ink-2);
  border-radius: var(--r-sm);
  transition: background var(--t-fast), color var(--t-fast);
}
.rail-cat .ico { width: 16px; height: 16px; min-width: 16px; }
.rail-cat:hover { background: rgba(139, 111, 199, .12); color: var(--nebula-300); }
.rail-cat.is-active { color: var(--star-500); }
.rail-sub {
  display: block;
  padding: 4px 14px 4px 34px;
  font-size: .8rem;
  color: var(--ink-3);
  border-radius: var(--r-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rail-sub:hover { color: var(--star-400); background: rgba(240, 199, 94, .07); }

.rail-foot {
  min-height: 76px;
  border-top: 1px solid var(--line-2);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rail-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 34px;
  padding: 0 6px;
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  color: var(--ink-3);
  cursor: pointer;
  font-size: .78rem;
  font-family: var(--font-body);
}
.rail-toggle:hover { background: rgba(240, 199, 94, .1); color: var(--star-500); }
.rail-toggle .ico { width: 18px; height: 18px; min-width: 18px; transition: transform var(--t-mid); }
body.rail-open .rail-toggle .ico { transform: rotate(180deg); }
.rail-toggle span { opacity: 0; }
body.rail-open .rail-toggle span { opacity: 1; }
.rail-theme {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px;
}
.rail-theme button {
  flex: 1;
  background: rgba(37, 47, 92, .5);
  border: 1px solid var(--line-2);
  color: var(--ink-3);
  border-radius: var(--r-pill);
  font-size: .6rem;
  letter-spacing: .1em;
  padding: 4px 2px;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all var(--t-fast);
}
.rail-theme button.is-on { background: var(--star-500); color: var(--midnight-950); border-color: var(--star-500); font-weight: 700; }
.rail-version {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--ink-3);
  padding: 0 8px;
  opacity: 0;
}
body.rail-open .rail-version { opacity: 1; }

/* Deeper theme variant: pushes the surfaces further down and dims the gold. */
body.theme-deeper {
  --bg: #04060D;
  --bg-deep: #02030A;
  --surface: #0A0F26;
  --surface-2: #0E1430;
  --line: #2A3050;
  --line-2: #1A2140;
}
body.theme-deeper .card,
body.theme-deeper .notice-neutral { background: var(--surface); }

/* --------------------------------------------------------------------------
   5. L-shaped navigation — horizontal tool bar
   -------------------------------------------------------------------------- */
.toolbar {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  height: var(--bar-h);
  z-index: 200;
  background: rgba(10, 14, 31, .96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--star-900);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  transition: height var(--t-mid), left var(--t-mid);
}
body.scrolled .toolbar { height: 44px; }
body.scrolled .crumbs { display: none; }

.crumbs {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--star-500); }
.crumbs .sep { color: var(--star-500); margin: 0 7px; }
.crumbs .here { color: var(--star-500); }

.search-wrap { position: relative; flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; }
.search-form { position: relative; width: 200px; transition: width var(--t-mid); }
.search-form:focus-within { width: 280px; }
.search-form input {
  width: 100%;
  height: 34px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: rgba(17, 24, 52, .9);
  color: var(--ink);
  padding: 0 34px 0 34px;
  font-family: var(--font-body);
  font-size: .82rem;
  transition: all var(--t-fast);
}
.search-form input::placeholder { color: var(--ink-3); }
.search-form input:focus {
  outline: none;
  border-color: var(--star-500);
  box-shadow: 0 0 14px rgba(240, 199, 94, .3);
}
.search-form .s-ico {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--ink-3);
  pointer-events: none;
}
.search-clear {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  background: none; border: 0;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 4px;
  display: none;
}
.search-clear.show { display: block; }

.search-results {
  position: absolute;
  top: 42px;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 92vw);
  max-height: 62vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sh-lg);
  padding: 8px;
  display: none;
  z-index: 300;
}
.search-results.show { display: block; }
.sr-head {
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--star-500);
  padding: 8px 10px 6px;
  font-weight: 700;
}
.sr-item {
  display: block;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--ink);
  text-decoration: none;
}
.sr-item:hover, .sr-item.is-cursor { background: rgba(240, 199, 94, .12); }
.sr-title { font-size: .88rem; font-weight: 600; display: block; }
.sr-meta { font-size: .72rem; color: var(--ink-3); display: block; }
.sr-empty { padding: 16px 12px; color: var(--ink-3); font-size: .85rem; }

.bar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.bar-clock {
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--star-500);
  letter-spacing: .04em;
  white-space: nowrap;
}
.bar-moon { display: flex; align-items: center; color: var(--nebula-300); }
.bar-moon svg { width: 20px; height: 20px; }
.bar-sep { width: 1px; height: 22px; background: var(--line-2); }

.burger {
  display: none;
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  place-items: center;
}
.burger svg { width: 18px; height: 18px; }

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(330px, 88vw);
  background: var(--bg-deep);
  border-left: 1px solid var(--star-900);
  z-index: 400;
  padding: 74px 0 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--t-mid);
}
.drawer.open { transform: translateX(0); }
.drawer-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.drawer-close svg { width: 18px; height: 18px; }
.drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(2, 3, 10, .7);
  z-index: 390;
  display: none;
}
.drawer-scrim.show { display: block; }
.dw-label {
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--star-500);
  font-weight: 700;
  padding: 16px 20px 8px;
}
.dw-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--ink-2);
  font-size: .88rem;
}
.dw-link .ico { width: 18px; height: 18px; }
.dw-link:hover, .dw-link.is-active { background: rgba(240, 199, 94, .1); color: var(--star-500); }

/* Mobile bottom tab bar */
.tabbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 56px;
  background: var(--bg-deep);
  border-top: 1px solid var(--star-900);
  z-index: 250;
}
.tabbar a {
  flex: 1;
  display: grid;
  place-items: center;
  gap: 2px;
  color: var(--ink-3);
  font-size: .58rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 0;
}
.tabbar a .ico { width: 20px; height: 20px; }
.tabbar a.is-active { color: var(--star-500); }

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  font-size: .9rem;
  font-weight: 700;
  font-family: var(--font-body);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--t-fast);
  line-height: 1.2;
}
.btn .ico { width: 17px; height: 17px; }
.btn-primary { background: var(--star-500); color: var(--midnight-950); }
.btn-primary:hover { background: var(--star-400); color: var(--midnight-950); box-shadow: var(--glow-star); }
.btn-nebula { background: var(--nebula-500); color: #fff; }
.btn-nebula:hover { background: var(--nebula-400); color: #fff; }
.btn-outline { background: transparent; border-color: var(--star-500); color: var(--star-500); }
.btn-outline:hover { background: rgba(240, 199, 94, .12); color: var(--star-400); box-shadow: var(--glow-star); }
.btn-ghost { background: var(--surface-2); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--midnight-600); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #F0725F; color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

.btn-star { position: relative; overflow: hidden; }
.btn-star::after {
  content: "\2726";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  animation: starPulse 2.6s var(--t-slow) infinite;
  opacity: .8;
}

@keyframes starPulse {
  0%, 100% { opacity: .35; transform: translateY(-50%) scale(.85); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.15); }
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--star-500);
  font-weight: 600;
  font-size: .88rem;
}
.link-arrow .ico { width: 16px; height: 16px; transition: transform var(--t-fast); }
.link-arrow:hover .ico { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   7. Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-card);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  transition: transform var(--t-mid), box-shadow var(--t-mid), border-color var(--t-fast);
  display: flex;
  flex-direction: column;
}
a.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-lg);
  border-color: var(--star-800);
  box-shadow: var(--sh-lg), var(--glow-star);
}
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-deep); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-mid); }
a.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 18px; flex: 1; }
.card-title { font-size: 1.04rem; font-weight: 600; font-family: var(--font-body); margin: 0 0 6px; line-height: 1.35; }
.card-text { font-size: .88rem; color: var(--ink-2); margin: 0; }
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--line-2);
  font-size: .78rem;
  color: var(--ink-3);
}
.card-media-16x9 { aspect-ratio: 16 / 9; }
.card-media-cover { aspect-ratio: 16 / 10; }

/* Category card — no image, circular icon block */
.cat-card { padding: 22px; }
.cat-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(240, 199, 94, .12);
  border: 1px solid var(--star-800);
  margin-bottom: 16px;
  box-shadow: var(--glow-star);
}
.cat-icon .ico { width: 22px; height: 22px; color: var(--star-500); }
.cat-count { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-3); }

/* Tool card */
.tool-card .card-media { background: var(--midnight-950); }
.tool-card .card-media img { object-fit: contain; padding: 8px; }

/* Studio card — deeper surface, glowing edge */
.studio-card { background: var(--bg-deep); border-color: var(--nebula-900); }
.studio-card:hover { border-color: var(--star-800); }
.studio-card .card-media { background: var(--midnight-950); }

/* Celestial card */
.celestial-card .cel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px 0;
}
.cel-orb {
  width: 44px; height: 44px;
  min-width: 44px;
  border-radius: 50%;
  border: 1px solid var(--star-800);
  background: radial-gradient(circle at 34% 32%, var(--star-300), var(--nebula-800) 62%, var(--midnight-800));
  box-shadow: var(--glow-star);
}
.cel-orb.is-nebula { background: radial-gradient(circle at 36% 34%, var(--cyan-300), var(--nebula-800) 60%, var(--midnight-800)); }
.cel-orb.is-cluster { background: radial-gradient(circle at 34% 32%, var(--star-100), var(--star-800) 58%, var(--midnight-800)); }
.cel-orb.is-galaxy { background: radial-gradient(circle at 34% 32%, var(--nebula-200), var(--nebula-800) 58%, var(--midnight-800)); }
.cel-orb.is-planet { background: radial-gradient(circle at 34% 32%, var(--cyan-100), var(--cyan-700) 60%, var(--midnight-800)); }
.cel-coords { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-3); }

/* --------------------------------------------------------------------------
   8. Tags, chips, badges
   -------------------------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  background: rgba(240, 199, 94, .14);
  color: var(--star-400);
  border: 1px solid transparent;
}
.tag-nebula { background: rgba(139, 111, 199, .16); color: var(--nebula-300); }
.tag-cyan { background: rgba(110, 196, 224, .16); color: var(--cyan-300); }
.tag-orange { background: rgba(240, 154, 92, .16); color: var(--orange-300); }
.tag-green { background: rgba(90, 184, 138, .16); color: var(--ok); }
.tag-red { background: rgba(232, 90, 74, .16); color: #F09082; }
.tag-outline { background: transparent; border-color: var(--line); color: var(--ink-2); }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  font-size: .82rem;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: var(--font-body);
}
.chip:hover { border-color: var(--star-800); color: var(--star-400); }
.chip.is-active { background: var(--star-500); color: var(--midnight-950); border-color: var(--star-500); font-weight: 700; }

.stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: rgba(139, 111, 199, .18);
  border: 1px solid var(--nebula-900);
  color: var(--nebula-300);
  font-size: .74rem;
  font-weight: 600;
}

.mag-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  border: 1px solid;
}

.badge-3d {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--star-500);
  color: var(--midnight-950);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
}
.badge-3d svg { width: 12px; height: 12px; }

.seeing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  font-weight: 700;
  border: 1px solid;
}

.light-pollution-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  border: 1px solid;
}

/* --------------------------------------------------------------------------
   9. Page hero & section headers
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  background: var(--bg-deep);
  border-bottom: 2px solid var(--star-800);
  padding: 44px 0 40px;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.3px 1.3px at 18% 30%, rgba(240, 199, 94, .55), transparent 60%),
    radial-gradient(1.1px 1.1px at 62% 22%, rgba(232, 234, 242, .45), transparent 60%),
    radial-gradient(1.4px 1.4px at 82% 62%, rgba(139, 111, 199, .5), transparent 60%),
    radial-gradient(1px 1px at 40% 74%, rgba(240, 199, 94, .35), transparent 60%);
  opacity: .6;
  pointer-events: none;
}
.page-hero > * { position: relative; }
.page-hero h1 { margin-bottom: .35em; }
.page-hero .lede { max-width: 74ch; }

.section-head { margin-bottom: 30px; }
.section-head h2 { margin-bottom: 10px; }
.section-head .lede { margin: 0; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   10. Home — hero carousel
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  height: 480px;
  overflow: hidden;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line-2);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
  pointer-events: none;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .55;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, #05070F 0%, rgba(10, 14, 31, .9) 46%, rgba(139, 111, 199, .2) 100%);
}
.hero-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  z-index: 3;
}
.hero-content { max-width: 620px; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--r-pill);
  background: rgba(240, 199, 94, .14);
  border: 1px solid var(--star-800);
  color: var(--star-500);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(1.95rem, 4.2vw, 2.9rem);
  margin-bottom: 14px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .7);
}
.hero p { font-size: 1.04rem; color: var(--ink-2); max-width: 56ch; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 4;
}
.hero-dot {
  width: 10px; height: 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--star-800);
  background: rgba(240, 199, 94, .2);
  padding: 0;
  cursor: pointer;
  transition: all var(--t-mid);
}
.hero-dot.is-active { width: 40px; background: var(--star-500); box-shadow: var(--glow-star); }

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--star-800);
  background: rgba(5, 7, 15, .8);
  color: var(--star-500);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 4;
  transition: all var(--t-fast);
}
.hero-arrow:hover { background: var(--star-500); color: var(--midnight-950); box-shadow: var(--glow-star); }
.hero-arrow svg { width: 16px; height: 16px; }
.hero-prev { left: 16px; }
.hero-next { right: 16px; }

/* Tonight's sky ticker */
.sky-ticker {
  background: var(--bg-deep);
  border-top: 1px solid var(--star-900);
  border-bottom: 1px solid var(--star-900);
  overflow: hidden;
  position: relative;
  height: 46px;
}
.sky-ticker-track {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
  width: max-content;
  animation: tickerScroll 52s linear infinite;
}
.sky-ticker:hover .sky-ticker-track { animation-play-state: paused; }
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.sky-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--ink-2);
  white-space: nowrap;
  border-right: 1px solid var(--line-2);
}
.sky-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--star-500); box-shadow: var(--glow-star); }
.sky-item .nm { color: var(--ink); font-weight: 600; }
.sky-item .tm { color: var(--star-500); }
.sky-item .dr { color: var(--nebula-400); }
.sky-item:hover { background: rgba(240, 199, 94, .06); }

/* Trust strip */
.trust-strip { background: var(--bg-deep); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.trust-item { display: flex; gap: 14px; align-items: flex-start; }
.trust-item .ico { width: 22px; height: 22px; color: var(--star-500); flex: none; margin-top: 3px; }
.trust-item h4 { font-family: var(--font-body); font-size: .92rem; margin: 0 0 4px; color: var(--ink); }
.trust-item p { font-size: .8rem; color: var(--nebula-300); margin: 0; }

/* Process steps */
ol.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: s; }
ol.steps li { margin: 0; }
.step-figure { position: relative; margin-bottom: 14px; }
.step-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--r-card);
  border: 1px solid var(--line-2);
  background: var(--bg-deep);
}
.step-num {
  position: absolute;
  top: 10px; left: 10px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--midnight-950);
  border: 1.5px solid var(--star-500);
  color: var(--star-500);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .86rem;
  box-shadow: var(--glow-star);
}
.step-label {
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--star-500);
  display: block;
  margin-bottom: 5px;
}
ol.steps h3 { font-size: 1.06rem; margin-bottom: 6px; }
ol.steps p { font-size: .85rem; color: var(--ink-2); margin: 0; }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--star-500) 0%, var(--star-400) 55%, var(--star-300) 100%);
  color: var(--midnight-950);
  border-radius: var(--r-lg);
  padding: 42px 40px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-md);
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 20% 30%, rgba(58, 42, 92, .35), transparent 60%),
    radial-gradient(1.4px 1.4px at 68% 70%, rgba(58, 42, 92, .3), transparent 60%),
    radial-gradient(1px 1px at 84% 24%, rgba(58, 42, 92, .3), transparent 60%);
  opacity: .8;
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { color: var(--midnight-950); margin-bottom: 10px; }
.cta-band p { color: rgba(10, 14, 31, .82); max-width: 62ch; margin-bottom: 22px; }
.cta-band .btn-primary { background: var(--midnight-950); color: var(--star-500); }
.cta-band .btn-primary:hover { background: var(--midnight-800); color: var(--star-400); }
.cta-band .btn-outline { border-color: var(--midnight-950); color: var(--midnight-950); }
.cta-band .btn-outline:hover { background: rgba(5, 7, 15, .12); color: var(--midnight-950); }

/* --------------------------------------------------------------------------
   11. Tool detail pages
   -------------------------------------------------------------------------- */
.exhibit {
  background: var(--bg-deep);
  border: 1px solid var(--line-2);
  border-radius: var(--r-card);
  padding: 16px;
  position: relative;
}
.exhibit-main {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background-image:
    linear-gradient(rgba(240, 199, 94, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 199, 94, .04) 1px, transparent 1px);
  background-size: 26px 26px;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--line-2);
}
.exhibit-main img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.thumb {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--midnight-950);
  cursor: pointer;
  padding: 0;
  transition: border-color var(--t-fast);
}
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.thumb:hover, .thumb.is-active { border-color: var(--star-500); }

.spec-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: .78rem; margin-top: 16px; }
.spec-table th, .spec-table td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.spec-table th { color: var(--ink-3); font-weight: 500; width: 46%; font-family: var(--font-body); font-size: .8rem; }
.spec-table td { color: var(--ink); }
.spec-caption {
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--star-500);
  font-weight: 700;
  margin: 22px 0 0;
}

.obs-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.obs-table th, .obs-table td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.obs-table th { font-family: var(--font-body); font-weight: 600; color: var(--ink-2); width: 42%; }
.obs-table td { font-family: var(--font-mono); color: var(--ink); font-size: .8rem; }

.stage-list { display: flex; flex-wrap: wrap; gap: 8px; }

.accessory-list { list-style: none; padding: 0; margin: 0; }
.accessory-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: .88rem;
}
.accessory-list li:last-child { border-bottom: 0; }
.accessory-list .ico { width: 15px; height: 15px; color: var(--star-500); flex: none; }
.accessory-list a { color: var(--ink); }
.accessory-list a:hover { color: var(--star-400); }

.tip-list { list-style: none; padding: 0; margin: 0; }
.tip-list li {
  position: relative;
  padding: 8px 0 8px 26px;
  border-bottom: 1px solid var(--line-2);
  font-size: .9rem;
  color: var(--ink-2);
}
.tip-list li:last-child { border-bottom: 0; }
.tip-list li::before {
  content: "\2726";
  position: absolute;
  left: 0; top: 8px;
  color: var(--star-500);
}

/* --------------------------------------------------------------------------
   12. Filter bar, pagination, empty state
   -------------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-card);
  margin-bottom: 24px;
}
.filter-bar input[type="search"], .filter-bar select {
  height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg-deep);
  color: var(--ink);
  padding: 0 12px;
  font-family: var(--font-body);
  font-size: .85rem;
}
.filter-bar input[type="search"] { flex: 1 1 200px; min-width: 160px; }
.filter-bar select { min-width: 152px; }
.filter-bar input:focus, .filter-bar select:focus { outline: none; border-color: var(--star-500); box-shadow: 0 0 12px rgba(240, 199, 94, .28); }
.filter-count { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-3); margin-left: auto; }

.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.pagination button {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: .84rem;
  cursor: pointer;
  transition: all var(--t-fast);
}
.pagination button:hover:not(:disabled) { border-color: var(--star-800); color: var(--star-500); }
.pagination button.is-active { background: var(--star-500); color: var(--midnight-950); border-color: var(--star-500); font-weight: 700; }
.pagination button:disabled { opacity: .35; cursor: not-allowed; }

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--r-card);
  padding: 46px 24px;
  text-align: center;
  color: var(--ink-3);
  background: rgba(17, 24, 52, .4);
}
.empty-state .ico { width: 30px; height: 30px; color: var(--ink-3); margin-bottom: 12px; }

/* --------------------------------------------------------------------------
   13. Notices & safety
   -------------------------------------------------------------------------- */
.notice {
  border-radius: var(--r-card);
  padding: 16px 18px;
  margin: 0 0 22px;
  border: 1px solid;
  font-size: .88rem;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.notice .ico { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.notice p { margin: 0; }
.notice-safety { background: #2E1410; border-color: #8A3A2E; color: #E8A08C; }
.notice-safety .ico { color: #E88378; }
.notice-info { background: #1E1830; border-color: var(--nebula-900); color: var(--nebula-300); }
.notice-info .ico { color: var(--nebula-400); }
.notice-warn { background: #2E2410; border-color: #8A6A00; color: var(--star-500); }
.notice-warn .ico { color: var(--star-500); }
.notice-neutral { background: var(--surface); border-color: var(--line-2); color: var(--ink-2); }

.tip-box {
  border-left: 4px solid var(--star-500);
  background: rgba(240, 199, 94, .07);
  border-radius: 0 var(--r-card) var(--r-card) 0;
  padding: 16px 18px;
  margin: 0 0 22px;
  font-size: .9rem;
}
.tip-box p { margin: 0; }
.tip-box .tb-label {
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--star-500);
  display: block;
  margin-bottom: 6px;
}
.tip-box-warn { border-left-color: var(--danger); background: rgba(232, 90, 74, .08); }
.tip-box-warn .tb-label { color: #F09082; }
.tip-box-note { border-left-color: var(--nebula-500); background: rgba(139, 111, 199, .08); }
.tip-box-note .tb-label { color: var(--nebula-400); }
.tip-box-ok { border-left-color: var(--ok); background: rgba(90, 184, 138, .08); }
.tip-box-ok .tb-label { color: var(--ok); }

.legal-note {
  background: var(--bg-deep);
  border-left: 4px solid var(--star-500);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--ink-2);
  line-height: 1.6;
  margin: 26px 0 0;
}

.safety-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #2E1410;
  border: 1px solid #8A3A2E;
  border-radius: var(--r-card);
  padding: 12px 18px;
  color: #E8A08C;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .06em;
  margin-bottom: 24px;
}
.safety-strip .ico { width: 20px; height: 20px; color: #E88378; flex: none; }

.seeing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  font-weight: 700;
  border: 1px solid;
}

/* --------------------------------------------------------------------------
   14. Calculators
   -------------------------------------------------------------------------- */
.calc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.calc-form { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-card); padding: 24px; }
.calc-field { margin-bottom: 18px; }
.calc-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 7px;
}
.calc-field .frow { display: flex; align-items: center; gap: 10px; }
.calc-field input[type="range"] { flex: 1; accent-color: var(--star-500); }
.calc-field input[type="number"], .calc-field select {
  width: 100%;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .88rem;
  padding: 0 12px;
}
.calc-field input[type="number"]:focus, .calc-field select:focus { outline: none; border-color: var(--star-500); }
.calc-field .fval { font-family: var(--font-mono); font-size: .84rem; color: var(--star-500); min-width: 74px; text-align: right; }
.calc-field .unit { font-family: var(--font-mono); font-size: .76rem; color: var(--ink-3); min-width: 26px; }

.result-card {
  background: var(--bg-deep);
  border: 1px solid var(--star-900);
  border-radius: var(--r-card);
  padding: 26px;
  box-shadow: var(--sh-md);
}
.result-hero { text-align: center; padding-bottom: 18px; border-bottom: 1px solid var(--line-2); margin-bottom: 18px; }
.result-hero .rh-label {
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--star-500);
  font-weight: 800;
  display: block;
  margin-bottom: 6px;
}
.result-hero .rh-value {
  font-family: var(--font-mono);
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  font-weight: 700;
  color: var(--star-500);
  line-height: 1.05;
  text-shadow: 0 0 28px rgba(240, 199, 94, .35);
  word-break: break-word;
}
.result-hero .rh-note { font-size: .78rem; color: var(--ink-3); margin-top: 6px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result-cell {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 12px 14px;
}
.result-cell .rc-label { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 4px; }
.result-cell .rc-value { font-family: var(--font-mono); font-size: 1.02rem; color: var(--ink); font-weight: 600; }
.gauge { margin-top: 18px; }
.gauge-label { display: flex; justify-content: space-between; font-size: .72rem; color: var(--ink-3); font-family: var(--font-mono); margin-bottom: 6px; }
.gauge-track { height: 8px; border-radius: var(--r-pill); background: var(--midnight-700); overflow: hidden; }
.gauge-fill { height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--nebula-500), var(--star-500)); transition: width var(--t-mid); }
.formula-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--ink-3);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   15. 3D studio layout
   -------------------------------------------------------------------------- */
.studio-notice { margin-bottom: 22px; }
.studio-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 22px;
  align-items: start;
}
.studio-canvas-wrap {
  position: relative;
  background: var(--bg-deep);
  border: 1px solid var(--line-2);
  border-radius: var(--r-card);
  overflow: hidden;
  min-height: 460px;
}
.studio-canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.sc-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: rgba(5, 7, 15, .8);
  border-bottom: 1px solid var(--line-2);
  position: relative;
  z-index: 3;
}
.sc-toolbar .sc-title {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--star-500);
  margin-right: auto;
}
.sc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  font-size: .76rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--t-fast);
}
.sc-btn svg { width: 14px; height: 14px; }
.sc-btn:hover { border-color: var(--star-800); color: var(--star-400); }
.sc-btn.is-on { background: var(--star-500); color: var(--midnight-950); border-color: var(--star-500); font-weight: 700; }
.sc-stage { position: relative; }
.sc-overlay {
  position: absolute;
  left: 14px; bottom: 14px;
  z-index: 3;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--ink-3);
  background: rgba(5, 7, 15, .72);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 7px 11px;
  line-height: 1.6;
}
.sc-legend {
  position: absolute;
  right: 14px; top: 14px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--star-500);
  background: rgba(5, 7, 15, .72);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 7px 11px;
}

.studio-panel { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-card); padding: 20px; position: sticky; top: calc(var(--bar-h) + 16px); }
.studio-panel h3 { font-size: 1rem; margin-bottom: 4px; }
.studio-panel .sp-sub { font-size: .78rem; color: var(--ink-3); margin-bottom: 16px; }
.sp-section { margin-bottom: 20px; }
.sp-section:last-child { margin-bottom: 0; }
.sp-label {
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--star-500);
  font-weight: 700;
  margin-bottom: 9px;
  display: block;
}
.sp-control { margin-bottom: 14px; }
.sp-control label { display: block; font-size: .78rem; color: var(--ink-2); margin-bottom: 6px; }
.sp-control input[type="range"] { width: 100%; accent-color: var(--star-500); }
.sp-control select, .sp-control input[type="number"], .sp-control input[type="date"], .sp-control input[type="time"] {
  width: 100%;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .82rem;
  padding: 0 10px;
}
.sp-readout { font-family: var(--font-mono); font-size: .78rem; color: var(--star-500); }
.sp-data { width: 100%; border-collapse: collapse; font-size: .8rem; }
.sp-data th, .sp-data td { padding: 7px 0; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.sp-data th { color: var(--ink-3); font-weight: 500; width: 46%; font-family: var(--font-body); font-size: .78rem; }
.sp-data td { font-family: var(--font-mono); color: var(--ink); font-size: .76rem; }

.studio-fallback { display: none; padding: 24px; }
.studio-fallback.show { display: block; }
.studio-fallback img { width: 100%; border-radius: var(--r-sm); border: 1px solid var(--line-2); margin-bottom: 14px; }
.studio-fallback p { font-size: .88rem; color: var(--ink-2); }
.switch-3d { margin-top: 12px; }

.studio-hint {
  margin-top: 18px;
  font-size: .8rem;
  color: var(--ink-3);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.studio-hint .ico { width: 16px; height: 16px; color: var(--star-500); flex: none; margin-top: 3px; }

.frame-strip { margin-top: 18px; }
.frame-list { display: flex; gap: 8px; flex-wrap: wrap; }
.frame-chip {
  padding: 6px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: .74rem;
  cursor: pointer;
  transition: all var(--t-fast);
}
.frame-chip.is-on { border-color: var(--star-500); color: var(--star-500); background: rgba(240, 199, 94, .12); }

/* --------------------------------------------------------------------------
   16. Blog
   -------------------------------------------------------------------------- */
.blog-card .card-media { aspect-ratio: 16 / 9; }
.blog-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .74rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
}
.blog-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }

.featured-post {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-card);
  overflow: hidden;
  margin-bottom: 30px;
}
.featured-post:hover { border-color: var(--star-800); box-shadow: var(--sh-md); }
.featured-post .fp-media { background: var(--bg-deep); }
.featured-post .fp-media img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.featured-post .fp-body { padding: 30px; display: flex; flex-direction: column; justify-content: center; }
.featured-post h2 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin-bottom: 10px; }
.featured-post h2 a { color: var(--ink); }
.featured-post h2 a:hover { color: var(--star-400); }

.post-hero { padding-bottom: 0; }
.post-head { max-width: 780px; }
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.post-meta .pm-author { color: var(--nebula-400); }

.read-progress {
  position: fixed;
  top: var(--bar-h);
  left: var(--rail-w);
  right: 0;
  height: 2px;
  z-index: 210;
  background: transparent;
  transition: top var(--t-mid), left var(--t-mid);
}
body.scrolled .read-progress { top: 44px; }
.read-progress-fill { height: 100%; width: 0; background: var(--star-500); box-shadow: 0 0 10px rgba(240, 199, 94, .6); }

.prose { max-width: 780px; font-size: 1.02rem; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { margin-bottom: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose a { text-decoration: underline; text-decoration-color: var(--nebula-900); text-underline-offset: 3px; }

.step-block {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-2);
}
.step-block:last-of-type { border-bottom: 0; }
.step-block .sb-num {
  width: 52px; height: 52px;
  min-width: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-deep);
  border: 1.5px solid var(--star-500);
  color: var(--star-500);
  font-family: var(--font-display);
  font-weight: 700;
  flex: none;
}
.step-block .sb-body { flex: 1; }
.step-block .sb-body > :last-child { margin-bottom: 0; }

.figure-block { margin: 26px 0; }
.figure-block img {
  width: 100%;
  border-radius: var(--r-card);
  border: 1px solid var(--line-2);
  background: var(--bg-deep);
}
.figure-block figcaption {
  font-size: .78rem;
  color: var(--ink-3);
  margin-top: 8px;
  font-family: var(--font-mono);
}

.data-table { width: 100%; border-collapse: collapse; font-size: .86rem; margin: 22px 0; display: table; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); text-align: left; }
.data-table th {
  background: var(--surface);
  color: var(--star-500);
  font-family: var(--font-body);
  font-size: .8rem;
  letter-spacing: .04em;
}
.data-table td { color: var(--ink-2); }
.data-table tr:hover td { background: rgba(240, 199, 94, .04); }
.table-scroll { overflow-x: auto; margin: 22px 0; }
.table-scroll .data-table { margin: 0; min-width: 520px; }

blockquote {
  margin: 22px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--nebula-500);
  color: var(--nebula-200);
  font-style: italic;
}

.toc { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-card); padding: 18px; position: sticky; top: calc(var(--bar-h) + 16px); }
.toc h4 { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--star-500); font-family: var(--font-body); margin-bottom: 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; font-size: .82rem; counter-reset: t; }
.toc li { margin: 0; }
.toc a { display: block; padding: 5px 0; color: var(--ink-2); border-left: 2px solid transparent; padding-left: 10px; }
.toc a:hover, .toc a.is-active { color: var(--star-500); border-left-color: var(--star-500); }

.side-card { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-card); padding: 18px; margin-bottom: 20px; }
.side-card h4 { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--star-500); font-family: var(--font-body); margin-bottom: 12px; }
.side-list { list-style: none; padding: 0; margin: 0; font-size: .84rem; }
.side-list li { padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.side-list li:last-child { border-bottom: 0; }

.author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-card);
  padding: 20px;
  margin: 34px 0 0;
}
.author-avatar {
  width: 52px; height: 52px;
  min-width: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-deep);
  border: 1px solid var(--star-800);
  color: var(--star-500);
  font-family: var(--font-display);
  font-weight: 700;
}
.author-box h4 { font-size: .96rem; margin-bottom: 4px; }
.author-box p { font-size: .82rem; color: var(--ink-2); margin: 0; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 34px; }
.post-nav a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-card);
  background: var(--surface);
  transition: all var(--t-fast);
}
.post-nav a:hover { border-color: var(--star-800); transform: translateY(-2px); }
.post-nav .pn-dir { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--star-500); display: block; margin-bottom: 5px; }
.post-nav .pn-title { font-size: .92rem; font-weight: 600; color: var(--ink); }
.post-nav .pn-next { text-align: right; }

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--star-800);
  background: var(--surface);
  color: var(--star-500);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 180;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-mid), background var(--t-fast);
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--star-500); color: var(--midnight-950); box-shadow: var(--glow-star); }

/* --------------------------------------------------------------------------
   17. Content pages, forms, database
   -------------------------------------------------------------------------- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.info-item { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-card); padding: 20px; }
.info-item .ico { width: 22px; height: 22px; color: var(--star-500); margin-bottom: 12px; }
.info-item h3 { font-size: 1rem; margin-bottom: 6px; }
.info-item p { font-size: .85rem; color: var(--ink-2); margin: 0; }

.prose-block { max-width: 780px; }
.prose-block h2 { margin-top: 1.5em; }
.prose-block ul { color: var(--ink-2); }

.form-card { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-card); padding: 26px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  width: 100%;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .9rem;
  padding: 10px 12px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--star-500); box-shadow: 0 0 12px rgba(240, 199, 94, .25); }
.field-error { color: #F09082; font-size: .76rem; margin-top: 5px; display: none; }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field.has-error .field-error { display: block; }
.form-note { font-size: .78rem; color: var(--ink-3); margin-top: 14px; }
.form-ok {
  background: rgba(90, 184, 138, .12);
  border: 1px solid rgba(90, 184, 138, .4);
  color: var(--ok);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: .86rem;
  margin-top: 14px;
  display: none;
}
.form-ok.show { display: block; }

.db-table-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: var(--r-card); background: var(--surface); }
.db-table { width: 100%; border-collapse: collapse; font-size: .84rem; min-width: 760px; }
.db-table th, .db-table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); text-align: left; }
.db-table th {
  background: var(--bg-deep);
  color: var(--star-500);
  font-family: var(--font-body);
  font-size: .76rem;
  letter-spacing: .06em;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.db-table th:hover { color: var(--star-400); }
.db-table th .sort-ind { opacity: .5; font-size: .7rem; margin-left: 4px; }
.db-table td.mono { font-family: var(--font-mono); font-size: .78rem; }
.db-table tbody tr { cursor: pointer; transition: background var(--t-fast); }
.db-table tbody tr:hover { background: rgba(240, 199, 94, .05); }
.db-table tbody tr.is-open { background: rgba(240, 199, 94, .08); }
.db-detail td { background: var(--bg-deep); padding: 0; }
.db-detail-inner { padding: 18px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.db-detail-inner p { font-size: .86rem; color: var(--ink-2); margin: 0; }
.db-detail-inner .dbk { font-family: var(--font-mono); font-size: .72rem; color: var(--star-500); display: block; margin-bottom: 3px; }

.compare-tray {
  position: sticky;
  bottom: 0;
  background: var(--bg-deep);
  border: 1px solid var(--star-900);
  border-radius: var(--r-card);
  padding: 14px 18px;
  margin-top: 22px;
  display: none;
  z-index: 60;
}
.compare-tray.show { display: block; }
.compare-tray-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.compare-tray-head h4 { font-size: .9rem; margin: 0; font-family: var(--font-body); }
.compare-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.compare-cell { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 12px; font-size: .8rem; }
.compare-cell .cc-name { font-weight: 700; color: var(--star-500); display: block; margin-bottom: 6px; }
.compare-cell dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: .76rem; }
.compare-cell dt { color: var(--ink-3); }
.compare-cell dd { margin: 0; font-family: var(--font-mono); color: var(--ink); }

.subscribe-row { display: flex; gap: 8px; margin-top: 12px; }
.subscribe-row input {
  flex: 1;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg-deep);
  color: var(--ink);
  padding: 0 12px;
  font-size: .85rem;
  font-family: var(--font-body);
}
.subscribe-row input:focus { outline: none; border-color: var(--star-500); }

/* --------------------------------------------------------------------------
   18. Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--bg-deep); border-top: 1px solid var(--star-900); margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 34px; padding: 50px 0 34px; }
.footer-brand .fb-name { font-family: var(--font-display); font-size: 1.06rem; font-weight: 700; color: var(--ink); display: block; margin-bottom: 10px; }
.footer-brand p { font-size: .82rem; color: var(--ink-2); max-width: 40ch; }
.footer-social { display: flex; gap: 10px; margin: 16px 0 12px; }
.footer-social a {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  transition: all var(--t-fast);
}
.footer-social a:hover { border-color: var(--star-800); color: var(--star-500); box-shadow: var(--glow-star); }
.footer-social svg { width: 16px; height: 16px; }
.fb-version { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-3); }
.footer-col h4 {
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--star-500);
  font-family: var(--font-body);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; font-size: .84rem; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--ink-2); }
.footer-col a:hover { color: var(--star-400); }

.disclaimer {
  border-top: 1px solid var(--line-2);
  padding: 26px 0;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
}
.disclaimer-box {
  border: 1px solid var(--star-800);
  border-radius: var(--r-card);
  padding: 16px 18px;
  background: rgba(240, 199, 94, .05);
}
.disclaimer-box h4 {
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--star-500);
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.disclaimer-box .ico { width: 16px; height: 16px; }
.disclaimer-box ul { list-style: none; padding: 0; margin: 0; font-size: .78rem; color: var(--ink-2); }
.disclaimer-box li { margin-bottom: 6px; padding-left: 14px; position: relative; }
.disclaimer-box li::before { content: "\2726"; position: absolute; left: 0; color: var(--star-500); font-size: .7rem; }
.disclaimer-text { font-size: .78rem; color: var(--ink-3); line-height: 1.7; }
.disclaimer-text p { margin-bottom: 10px; }

.footer-bottom {
  border-top: 1px solid var(--line-2);
  padding: 18px 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .78rem;
  color: var(--ink-3);
}
.footer-bottom nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-bottom a { color: var(--ink-3); }
.footer-bottom a:hover { color: var(--star-400); }
.dark-sky-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--nebula-900);
  background: rgba(139, 111, 199, .12);
  color: var(--nebula-300);
  font-size: .7rem;
  letter-spacing: .1em;
  font-weight: 700;
}
.dark-sky-badge svg { width: 13px; height: 13px; }

/* --------------------------------------------------------------------------
   19. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  body.rail-open { --rail-w: 200px; }
  .studio-wrap { grid-template-columns: 1fr 300px; }
}

@media (max-width: 1080px) {
  :root { --rail-w: 0px; }
  body { padding-left: 0; padding-bottom: 56px; }
  .rail { display: none; }
  .toolbar { left: 0; }
  .read-progress { left: 0; }
  .burger { display: grid; }
  .tabbar { display: flex; }
  .split-wide { grid-template-columns: 1fr; }
  .split-side { grid-template-columns: 1fr; }
  .calc-layout { grid-template-columns: 1fr; }
  .studio-wrap { grid-template-columns: 1fr; }
  .studio-panel { position: static; }
  .toc { position: static; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  ol.steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .disclaimer { grid-template-columns: 1fr; }
  .featured-post { grid-template-columns: 1fr; }
  .bar-clock { display: none; }
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero { height: 440px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  ol.steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .pn-next { text-align: left; }
  .result-grid { grid-template-columns: 1fr; }
  .db-detail-inner { grid-template-columns: 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
  .hero { height: 440px; }
  .hero h1 { font-size: 1.95rem; }
  .search-form { width: 150px; }
  .search-form:focus-within { width: 190px; }
  .crumbs { display: none; }
  .cta-band { padding: 30px 22px; }
  .section { padding: 44px 0; }
  .filter-count { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .sky-ticker-track { animation: none; transform: none; }
  .btn-star::after { display: none; }
}
