/* ==========================================================================
   deepinthe.space , shared shell and content pages
   Loaded after site.css. Defines the global header/footer, themes, legal
   pages, search, contact form, and cookie consent.
   ========================================================================== */

:root {
  color-scheme: dark;
  --page-bg: #080a12;
  --page-bg-soft: #0d111a;
  --universe-bg: radial-gradient(ellipse at 50% 43%, rgba(48, 61, 94, 0.48), transparent 43%), radial-gradient(ellipse at 77% 18%, rgba(66, 44, 87, 0.22), transparent 34%), linear-gradient(145deg, #10131e, #080a12 62%, #0d0d17);
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: #111624;
  --text: #f0eee8;
  --text-soft: rgba(240, 238, 232, 0.7);
  --text-dim: rgba(240, 238, 232, 0.46);
  --line: rgba(205, 216, 248, 0.1);
  --accent: #a9c8f0;
  --accent-strong: #d7e6ff;
  --accent-warm: #e2b48a;
  --success: #9fd6ae;
  --danger: #e8a3a3;
  --header-bg: rgba(8, 10, 18, 0.78);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.22);
  --radius: 14px;
  --radius-sm: 10px;
  --max-width: 1200px;
  --header-height: 64px;
}

[data-theme="light"] {
  color-scheme: light;
  --page-bg: #e8edf3;
  --page-bg-soft: #dde5ee;
  --universe-bg: radial-gradient(ellipse at 50% 43%, rgba(201, 214, 231, 0.9), transparent 52%), radial-gradient(ellipse at 77% 18%, rgba(202, 195, 222, 0.46), transparent 36%), linear-gradient(145deg, #eef2f7, #d9e2ec 62%, #e4eaf1);
  --surface: rgba(255, 255, 255, 0.64);
  --surface-strong: #f7f9fc;
  --text: #182130;
  --text-soft: rgba(24, 33, 48, 0.72);
  --text-dim: rgba(24, 33, 48, 0.5);
  --line: rgba(24, 33, 48, 0.14);
  --accent: #2f5f96;
  --accent-strong: #1f4a7a;
  --accent-warm: #a05f2e;
  --success: #2f7a4a;
  --danger: #a33d3d;
  --header-bg: rgba(247, 249, 252, 0.9);
  --shadow: 0 18px 50px rgba(30, 45, 70, 0.14);
  --shadow-soft: 0 8px 24px rgba(30, 45, 70, 0.1);

  /* Keep the original solar-system styles readable in the light theme. */
  --white: #182130;
  --soft: rgba(24, 33, 48, 0.72);
  --dim: rgba(24, 33, 48, 0.5);
  --line: rgba(24, 33, 48, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--universe-bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.78;
  pointer-events: none;
  background-image: radial-gradient(1px 1px at 4% 14%, rgba(255, 255, 255, 0.82) 98%, transparent), radial-gradient(1px 1px at 8% 63%, rgba(188, 207, 255, 0.72) 98%, transparent), radial-gradient(1.5px 1.5px at 12% 29%, rgba(255, 255, 255, 0.86) 98%, transparent), radial-gradient(1px 1px at 17% 82%, rgba(255, 255, 255, 0.68) 98%, transparent), radial-gradient(1px 1px at 22% 20%, rgba(209, 220, 255, 0.8) 98%, transparent), radial-gradient(1px 1px at 27% 54%, rgba(255, 255, 255, 0.64) 98%, transparent), radial-gradient(1.5px 1.5px at 32% 9%, rgba(255, 255, 255, 0.9) 98%, transparent), radial-gradient(1px 1px at 37% 76%, rgba(182, 201, 255, 0.7) 98%, transparent), radial-gradient(1px 1px at 42% 39%, rgba(255, 255, 255, 0.74) 98%, transparent), radial-gradient(1px 1px at 47% 91%, rgba(255, 255, 255, 0.7) 98%, transparent), radial-gradient(1.5px 1.5px at 52% 16%, rgba(255, 255, 255, 0.84) 98%, transparent), radial-gradient(1px 1px at 57% 62%, rgba(206, 218, 255, 0.72) 98%, transparent), radial-gradient(1px 1px at 62% 31%, rgba(255, 255, 255, 0.65) 98%, transparent), radial-gradient(1px 1px at 67% 85%, rgba(255, 255, 255, 0.8) 98%, transparent), radial-gradient(1.5px 1.5px at 72% 12%, rgba(255, 255, 255, 0.9) 98%, transparent), radial-gradient(1px 1px at 77% 48%, rgba(183, 203, 255, 0.72) 98%, transparent), radial-gradient(1px 1px at 82% 74%, rgba(255, 255, 255, 0.76) 98%, transparent), radial-gradient(1px 1px at 87% 23%, rgba(255, 255, 255, 0.7) 98%, transparent), radial-gradient(1.5px 1.5px at 92% 58%, rgba(228, 232, 255, 0.9) 98%, transparent), radial-gradient(1px 1px at 97% 91%, rgba(255, 255, 255, 0.75) 98%, transparent), radial-gradient(2px 2px at 19% 43%, rgba(255, 255, 255, 0.62) 98%, transparent), radial-gradient(2px 2px at 74% 67%, rgba(255, 255, 255, 0.62) 98%, transparent);
  background-size: 100% 100%;
  animation: starfield-drift 420s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes starfield-drift {
  from { transform: translate3d(0, 0, 0) scale(1.02); }
  to { transform: translate3d(-1.6%, 1.2%, 0) scale(1.02); }
}

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

img,
svg {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 72%, transparent);
  outline-offset: 3px;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 400;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #08111f;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

[data-theme="light"] .skip-link {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Global header
   -------------------------------------------------------------------------- */

site-header,
site-footer {
  display: block;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  background: transparent;
  border: 0;
}

.site-header-inner {
  position: relative;
  width: max-content;
  max-width: calc(100vw - 28px);
  margin: 14px 0 0 14px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
  transition: border-radius 0.26s ease;
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

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

.brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.brand-name {
  font-size: 15px;
}

.brand-tld {
  color: var(--text-dim);
  font-weight: 400;
}

.brand-tip {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 140;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.2s ease, visibility 0.18s ease;
  pointer-events: none;
}

.brand:hover .brand-tip,
.brand:focus-visible .brand-tip {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.site-nav {
  position: absolute;
  left: calc(100% - 1px);
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
  border: 0;
  border-radius: 0 14px 14px 0;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-10px);
  clip-path: inset(0 100% 0 0 round 0 14px 14px 0);
  transition: opacity 0.22s ease, transform 0.26s ease, visibility 0.22s ease,
    clip-path 0.3s ease;
}

.site-header.is-open .site-nav {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  overflow: visible;
  transform: none;
  clip-path: none;
}

.site-header.is-open .site-header-inner {
  border-radius: 14px 0 0 14px;
}

/* The fixed dock replaces the legacy per-page top bars on immersive pages. */
site-header + .universe .gallery-top {
  display: none;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding-left: 8px;
  border-left: 0;
}

.site-nav .icon-button {
  width: 32px;
  height: 32px;
}

.site-nav .icon-button svg {
  width: 16px;
  height: 16px;
}

.site-nav a {
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 12px;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.site-nav a:hover {
  background: var(--surface);
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  color: var(--text);
}

.site-nav-links {
  align-items: stretch;
}

.nav-entry {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 32px;
}

.nav-entry::after {
  content: "";
  position: absolute;
  top: 100%;
  left: -10px;
  right: -10px;
  height: 14px;
}

.site-nav .nav-section {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

.nav-entry.is-open > .nav-section {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--text);
}

.site-nav-links:has(.nav-entry.is-open)
  .nav-entry:not(.is-open)
  > .nav-section[aria-current="page"] {
  background: transparent;
  color: var(--text-soft);
}

.nav-dropdown {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: -6px;
  width: 304px;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: 15px;
  background:
    radial-gradient(130% 90% at 100% 0, color-mix(in srgb, var(--accent) 8%, transparent), transparent 58%),
    color-mix(in srgb, var(--surface-strong) 97%, transparent);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.38), 0 2px 8px rgba(0, 0, 0, 0.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-7px) scale(0.985);
  transform-origin: 24px 0;
  transition: opacity 0.16s ease, transform 0.2s ease, visibility 0.16s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

[data-theme="light"] .nav-dropdown {
  box-shadow: 0 22px 56px rgba(30, 45, 70, 0.16), 0 2px 8px rgba(30, 45, 70, 0.08);
}

.nav-entry.is-open > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.nav-entry[data-align="right"] > .nav-dropdown {
  left: auto;
  right: -6px;
  transform-origin: calc(100% - 24px) 0;
}

.site-nav .nav-dropdown-links {
  display: grid;
  padding: 1px 0;
}

.site-nav .nav-dropdown-group + .nav-dropdown-group {
  margin-top: 3px;
  padding-top: 3px;
  border-top: 1px solid var(--line);
}

.site-nav .nav-dropdown-group-label {
  margin: 0;
  padding: 6px 9px 2px;
  color: var(--text-dim);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  line-height: 1.4;
  text-transform: uppercase;
}

.site-nav .nav-dropdown-links a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 31px;
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
}

.site-nav .nav-dropdown-links a:hover,
.site-nav .nav-dropdown-links a:focus-visible {
  background: var(--surface);
  color: var(--text);
}

.soon-tag {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 8px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.site-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-search {
  position: relative;
  margin: 0;
}

.global-search input {
  width: 190px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  transition: width 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.global-search input::placeholder {
  color: var(--text-dim);
}

.global-search input:focus {
  width: 240px;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: var(--surface-strong);
}

.search-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 130;
  width: min(380px, calc(100vw - 28px));
  padding: 8px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.search-popover .global-search input,
.search-popover .global-search input:focus {
  width: 100%;
}

.search-popover .search-results {
  left: 0;
  right: auto;
  width: 100%;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  width: min(360px, calc(100vw - 32px));
  max-height: 420px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.search-result {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.search-result:hover,
.search-result.is-active {
  background: var(--surface);
}

.search-result strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.search-result span {
  display: block;
  margin-top: 2px;
  color: var(--text-dim);
  font-size: 10.5px;
  line-height: 1.45;
}

.search-empty {
  padding: 10px;
  color: var(--text-dim);
  font-size: 11px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.icon-button:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: var(--surface-strong);
  color: var(--text);
}

.site-header .icon-button {
  border-color: transparent;
  background: transparent;
}

.site-header .icon-button:hover {
  border-color: transparent;
  background: var(--surface);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

.nav-toggle {
  display: inline-flex;
  width: 40px;
  height: 38px;
  border-radius: 10px;
}

.nav-toggle svg {
  width: 22px;
  height: 18px;
}

.nav-toggle .menu-line {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle:hover .menu-line:first-child,
.site-header.is-open .nav-toggle .menu-line:first-child {
  transform: translateY(-1px);
}

.nav-toggle:hover .menu-line:last-child,
.site-header.is-open .nav-toggle .menu-line:last-child {
  transform: translateY(1px);
}

.site-header .nav-toggle[aria-pressed="true"],
.site-header .nav-toggle[aria-pressed="true"]:hover {
  background: var(--accent);
  color: #08111f;
}

[data-theme="light"] .site-header .nav-toggle[aria-pressed="true"],
[data-theme="light"] .site-header .nav-toggle[aria-pressed="true"]:hover {
  color: #ffffff;
}

.search-toggle {
  border-radius: 50%;
}

.mobile-nav {
  display: none;
  padding: 8px 16px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-strong);
}

.mobile-nav a {
  display: block;
  padding: 11px 12px;
  border-radius: 9px;
  color: var(--text-soft);
  font-size: 13px;
  text-decoration: none;
}

.mobile-nav a:hover,
.mobile-nav a[aria-current="page"] {
  background: var(--surface);
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Global footer
   -------------------------------------------------------------------------- */

footer.site-footer {
  position: static;
  left: auto;
  bottom: auto;
  width: 100%;
  transform: none;
  display: block;
  padding: 0;
  margin-top: 0;
  border-top: 1px solid var(--line);
  background: var(--page-bg-soft);
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0;
  text-align: left;
}

.site-footer-inner {
  width: min(100%, calc(var(--max-width) + 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr));
  gap: 32px;
  padding: 48px 24px 30px;
}

.footer-brand p {
  max-width: 260px;
  margin: 14px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.7;
}

.footer-brand .brand-name {
  font-size: 19px;
  letter-spacing: -0.015em;
}

.footer-column h2 {
  margin: 0 0 12px;
  color: var(--text-dim);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.footer-column a {
  display: block;
  padding: 4px 0;
  color: var(--text-soft);
  font-size: 12px;
  text-decoration: none;
}

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

.footer-bottom {
  width: min(100%, calc(var(--max-width) + 48px));
  margin: 0 auto;
  padding: 16px 24px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  color: var(--text-dim);
  font-size: 11px;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-dim);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom button:hover {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Content pages
   -------------------------------------------------------------------------- */

.page-shell {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.page-hero {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.page-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(38px, 6.4vw, 62px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.02;
}

.lede {
  max-width: 700px;
  margin: 16px 0 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.75;
}

.page-meta {
  margin: 14px 0 0;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0;
}

.catalog-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 22px;
}

.catalog-context a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.catalog-context a:hover,
.catalog-context a:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: var(--surface-strong);
}

.catalog-context a[aria-current="page"] {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.catalog-context strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.catalog-context span {
  color: var(--text-dim);
  font-size: 10.5px;
  line-height: 1.45;
}

.prose {
  max-width: 760px;
}

.prose h2 {
  margin: 38px 0 12px;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  scroll-margin-top: 90px;
}

.prose h3 {
  margin: 26px 0 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.prose p,
.prose li {
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.82;
}

.prose p {
  margin: 0 0 13px;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 20px;
}

.prose li {
  margin: 6px 0;
}

.prose li::marker {
  color: var(--text-dim);
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose a {
  color: var(--accent);
}

.prose hr {
  margin: 30px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.table-wrap {
  margin: 18px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.prose th,
.prose td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--text-dim);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.notice {
  margin: 22px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.7;
}

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

.notice-warning {
  border-color: color-mix(in srgb, var(--accent-warm) 42%, var(--line));
  background: color-mix(in srgb, var(--accent-warm) 9%, transparent);
}

.todo {
  padding: 1px 5px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent-warm) 18%, transparent);
  color: var(--text);
  border-bottom: 1px dashed var(--accent-warm);
  font-size: 0.95em;
}

.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 28px;
}

.legal-toc a {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 10px;
  text-decoration: none;
}

.legal-toc a:hover {
  background: var(--surface);
  color: var(--text);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card h2,
.card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.7;
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.card-link:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--surface-strong);
  transform: translateY(-2px);
}

.card-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--text-dim);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--surface-strong);
}

.btn-primary {
  border-color: transparent;
  background: var(--accent);
  color: #08111f;
  font-weight: 600;
}

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

[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-primary:hover {
  color: #ffffff;
}

/* Keep button labels readable when a button sits inside .prose, whose link
   rule has higher specificity than a plain .btn-primary selector. */
.prose .btn,
.prose .btn:hover {
  color: var(--text);
}

.prose .btn-primary,
.prose .btn-primary:hover {
  color: #08111f;
}

[data-theme="light"] .prose .btn-primary,
[data-theme="light"] .prose .btn-primary:hover {
  color: #ffffff;
}

.btn-ghost {
  background: transparent;
}

.btn-small {
  padding: 7px 11px;
  font-size: 10.5px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Planet / system directories
   -------------------------------------------------------------------------- */

.planet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.planet-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.planet-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--surface-strong);
  transform: translateY(-2px);
}

.planet-card strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.planet-card span {
  display: block;
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.planet-card > span:last-child {
  text-transform: none;
  letter-spacing: 0;
}

.planet-card > span:last-child > span {
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.planet-card small {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 10.5px;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0;
}

/* Games directory icon */
.game-card-icon {
  width: 54px;
  height: 54px;
}

.gk-bg {
  fill: var(--surface);
  stroke: var(--line);
}

.gk-orbits circle {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.gk-sun {
  fill: var(--accent-warm);
}

.gk-earth {
  fill: #69a9e8;
}

.gk-target {
  fill: #d17a60;
}

.gk-rocket {
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-dasharray: 3 2;
  fill: none;
}

.gk-tip {
  fill: var(--text);
}

.planet-card.is-coming-soon {
  cursor: default;
  opacity: 0.7;
}

.planet-card.is-coming-soon:hover {
  border-color: var(--line);
  background: var(--surface);
  transform: none;
}

.planet-swatch {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background-color: var(--planet-color, #8f8c96);
  background-image: radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.24), transparent 48%), var(--planet-map);
  background-size: 100% 100%, 200% 100%;
  background-position: center, center;
  background-repeat: no-repeat;
  box-shadow: inset -8px -8px 14px rgba(0, 0, 0, 0.42), 0 4px 14px rgba(0, 0, 0, 0.24);
}

.object-icon {
  display: block;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  overflow: visible;
}

.object-icon-slot {
  display: block;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
}

.object-icon-slot .object-icon {
  width: 100%;
  height: 100%;
}

.object-icon .o-tile {
  fill: #060810;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}

.object-icon .o-glow {
  filter: blur(4px);
}

.card-icon {
  display: block;
  width: 54px;
  height: 54px;
  overflow: visible;
  flex: 0 0 auto;
}

.galaxy-card-icon {
  width: 54px;
  height: 54px;
  overflow: visible;
  flex: 0 0 auto;
}

.galaxy-card-icon .g-bg {
  fill: rgba(5, 7, 13, 0.92);
  stroke: rgba(255, 255, 255, 0.13);
  stroke-width: 1;
}

.galaxy-card-icon .g-halo {
  fill: var(--g-halo);
  opacity: 0.6;
}

.galaxy-card-icon .g-disc {
  fill: var(--g-disc);
  opacity: 0.55;
}

.galaxy-card-icon .g-arm {
  fill: none;
  stroke: var(--g-arm);
  stroke-width: 3.2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 2px var(--g-arm));
}

.galaxy-card-icon .g-arm-b {
  stroke-width: 2.6;
  opacity: 0.72;
}

.galaxy-card-icon .g-bar {
  fill: var(--g-bar);
  opacity: 0.75;
}

.galaxy-card-icon .g-core {
  fill: var(--g-core);
  filter: drop-shadow(0 0 4px var(--g-core));
}

.galaxy-card-icon .g-star {
  fill: #ffffff;
  opacity: 0.8;
}

.galaxy-card-icon .g-companion {
  fill: var(--g-companion, rgba(215, 228, 255, 0.86));
  opacity: 0.9;
}

.galaxy-card-icon .g-dust {
  fill: var(--g-dust, rgba(16, 13, 10, 0.88));
}

.galaxy-card-icon--milky-way {
  --g-halo: rgba(160, 140, 210, 0.38);
  --g-disc: rgba(120, 105, 160, 0.32);
  --g-arm: #c9a8e8;
  --g-core: #ffe6b0;
  --g-bar: #f0cf97;
}

.galaxy-card-icon--andromeda {
  --g-halo: rgba(130, 160, 220, 0.38);
  --g-disc: rgba(85, 110, 165, 0.32);
  --g-arm: #9fc3f0;
  --g-core: #ffe7bd;
  --g-bar: transparent;
}

.galaxy-card-icon--andromeda .g-bar {
  display: none;
}

.galaxy-card-icon--triangulum {
  --g-halo: rgba(125, 190, 230, 0.38);
  --g-disc: rgba(75, 135, 185, 0.32);
  --g-arm: #8fd0f5;
  --g-core: #eef7ff;
  --g-bar: transparent;
}

.galaxy-card-icon--triangulum .g-bar {
  display: none;
}

.galaxy-card-icon--whirlpool {
  --g-halo: rgba(180, 150, 230, 0.38);
  --g-disc: rgba(105, 80, 170, 0.32);
  --g-arm: #c9a8f0;
  --g-core: #ffe9bd;
  --g-bar: transparent;
  --g-companion: rgba(235, 222, 255, 0.88);
}

.galaxy-card-icon--whirlpool .g-bar {
  display: none;
}

.galaxy-card-icon--sombrero {
  --g-halo: rgba(230, 210, 160, 0.35);
  --g-disc: rgba(190, 160, 110, 0.36);
  --g-arm: transparent;
  --g-core: #fff3cf;
  --g-bar: #e6d3a6;
  --g-dust: rgba(18, 14, 10, 0.9);
}

.galaxy-card-icon--sombrero .g-arm {
  display: none;
}

.galaxy-card-icon--lmc {
  --g-halo: rgba(150, 200, 230, 0.36);
  --g-disc: rgba(90, 150, 200, 0.3);
  --g-arm: #a9d4f2;
  --g-core: #f6f0dc;
  --g-bar: #d8e8f2;
}

.planet-swatch.mercury {
  background-position: center, 4% 50%;
}

.planet-swatch.sun-star {
  border-color: rgba(255, 220, 160, 0.28);
  background-image: radial-gradient(circle at 35% 30%, #fff7d6 0%, #ffe3a3 16%, #f2b45f 38%, #c46a32 66%, #6b2a24 100%);
  background-size: 100% 100%;
  box-shadow: inset -10px -12px 24px rgba(91, 31, 12, 0.45), 0 0 32px rgba(255, 182, 92, 0.34), 0 12px 34px rgba(0, 0, 0, 0.4);
}

.planet-swatch.proxima-star {
  border-color: rgba(244, 177, 145, 0.28);
  background-image: radial-gradient(circle at 36% 32%, #ffe0bd 0%, #f09a72 18%, #c25455 48%, #7a2c3e 76%, #2a1524 100%);
  background-size: 100% 100%;
  box-shadow: inset -10px -12px 26px rgba(45, 8, 25, 0.5), 0 0 28px rgba(230, 110, 90, 0.3), 0 12px 34px rgba(0, 0, 0, 0.4);
}

.planet-swatch.trappist-1-star {
  border-color: rgba(231, 137, 116, 0.25);
  background-image: radial-gradient(circle at 36% 32%, #df8e6b 0%, #ad484c 20%, #6f2238 56%, #391628 82%, #1d0e19 100%);
  background-size: 100% 100%;
  box-shadow: inset -10px -12px 26px rgba(29, 7, 19, 0.6), 0 0 20px rgba(182, 78, 70, 0.22), 0 12px 34px rgba(0, 0, 0, 0.4);
}

.planet-swatch.toi-700-star {
  border-color: rgba(249, 190, 122, 0.28);
  background-image: radial-gradient(circle at 36% 32%, #ffe4b2 0%, #f0a660 20%, #c05d38 52%, #6b2d21 80%, #2e1713 100%);
  background-size: 100% 100%;
  box-shadow: inset -10px -12px 26px rgba(47, 17, 10, 0.5), 0 0 28px rgba(236, 148, 74, 0.3), 0 12px 34px rgba(0, 0, 0, 0.4);
}

.planet-swatch.teegarden-star {
  border-color: rgba(244, 166, 134, 0.28);
  background-image: radial-gradient(circle at 36% 32%, #f0a677 0%, #c25351 20%, #7d2b40 56%, #3a1527 82%, #20101b 100%);
  background-size: 100% 100%;
  box-shadow: inset -10px -12px 26px rgba(38, 8, 24, 0.55), 0 0 24px rgba(220, 96, 82, 0.28), 0 12px 34px rgba(0, 0, 0, 0.4);
}

.planet-visual {
  position: relative;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  isolation: isolate;
}

.planet-visual > .planet-swatch {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.planet-visual .saturn-rings {
  --ring-width: 150%;
  --ring-height: 48%;
}

.px-swatch {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow: inset -8px -8px 14px rgba(0, 0, 0, 0.42), 0 4px 14px rgba(0, 0, 0, 0.24);
}

.px-swatch-b {
  background: radial-gradient(circle at 32% 27%, #e1efff, #74a1c5 45%, #283953 100%);
}

.px-swatch-c {
  background: radial-gradient(circle at 32% 27%, #efe1fa, #a78abc 45%, #423b61 100%);
}

.px-swatch-d {
  background: radial-gradient(circle at 32% 29%, #ffe3c9, #d98870 42%, #603b51 100%);
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.system-card {
  display: block;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.system-card:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: var(--surface-strong);
  transform: translateY(-2px);
}

.system-card h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.system-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.7;
}

.system-logo {
  display: block;
  width: 76px;
  height: 76px;
  margin-bottom: 20px;
}

.system-mark {
  position: relative;
  width: 74px;
  height: 74px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, rgba(255, 224, 180, 0.9), rgba(191, 104, 83, 0.35) 42%, transparent 68%);
}

.system-mark::before,
.system-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(205, 216, 248, 0.22);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
}

.system-mark::before {
  width: 62px;
  height: 32px;
}

.system-mark::after {
  width: 74px;
  height: 44px;
}

.system-mark span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #a9c8f0;
  box-shadow: 0 0 10px rgba(169, 200, 240, 0.4);
  transform: translate(-50%, -50%);
}

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(250px, 0.7fr);
  gap: 34px;
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 15px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--text-dim);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-dim);
}

.field input:focus,
.field textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  background: var(--surface-strong);
  outline: none;
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.field.has-error input,
.field.has-error textarea {
  border-color: var(--danger);
}

.field-error {
  min-height: 1em;
  margin: 0;
  color: var(--danger);
  font-size: 10.5px;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.turnstile-slot {
  padding: 13px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 10.5px;
  line-height: 1.5;
}

.form-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--text-soft);
  font-size: 11.5px;
  line-height: 1.6;
}

.form-status.is-success {
  color: var(--success);
}

.form-status.is-error {
  color: var(--danger);
}

.form-status a {
  color: inherit;
  font-weight: 600;
}

.form-footnote {
  margin: 0;
  color: var(--text-dim);
  font-size: 10.5px;
  line-height: 1.6;
}

.contact-aside {
  display: grid;
  gap: 12px;
}

.contact-aside .card p + p {
  margin-top: 8px;
}

.contact-aside a {
  text-decoration: none;
}

.contact-aside a:hover {
  text-decoration: underline;
}

.inbox-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}

.inbox-toolbar .field {
  flex: 1 1 260px;
  max-width: 380px;
}

.inbox-toolbar .btn {
  margin-bottom: 1px;
}

.inbox-summary {
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.inbox-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.inbox-item {
  padding: 18px;
}

.inbox-item-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.inbox-item-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.inbox-item-heading time {
  color: var(--text-dim);
  font-size: 10px;
}

.inbox-sender {
  margin: 6px 0 0;
  font-size: 11.5px;
}

.inbox-sender a {
  color: var(--accent);
  text-decoration: none;
}

.inbox-sender a:hover {
  text-decoration: underline;
}

.inbox-message {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.inbox-empty {
  margin: 0;
  color: var(--text-soft);
  font-size: 12.5px;
}

/* --------------------------------------------------------------------------
   Cookie consent
   -------------------------------------------------------------------------- */

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 300;
  width: min(760px, calc(100vw - 24px));
  transform: translateX(-50%);
  display: grid;
  gap: 12px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  color: var(--text);
}

/* Reserve room so the fixed banner never sits on top of the submit button. */
body.has-consent-banner {
  padding-bottom: 170px;
}

.cookie-banner p {
  margin: 0;
  color: var(--text-soft);
  font-size: 11.5px;
  line-height: 1.65;
}

.cookie-banner p a {
  color: var(--accent);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cookie-settings {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.cookie-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text-soft);
  font-size: 11.5px;
}

.cookie-toggle span {
  display: block;
}

.cookie-toggle small {
  display: block;
  margin-top: 2px;
  color: var(--text-dim);
  font-size: 10px;
}

.cookie-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

/* --------------------------------------------------------------------------
   Light theme adjustments for the existing solar-system page
   -------------------------------------------------------------------------- */

[data-theme="light"] body::before {
  opacity: 0.16;
  filter: invert(1) brightness(0.45);
}

[data-theme="light"] .twinkle {
  background: #42536b;
  box-shadow: none;
  opacity: 0.16;
}

[data-theme="light"] .proxima-portal-name {
  color: rgba(24, 33, 48, 0.55);
}

[data-theme="light"] .shooting-star {
  opacity: 0;
}

[data-theme="light"] .orbit {
  opacity: 0.92;
  border-color: color-mix(in srgb, var(--orbit-color) 58%, #2b3a4e);
}

[data-theme="light"] .orbit.is-highlighted {
  opacity: 1;
  border-color: color-mix(in srgb, var(--orbit-color) 72%, #2b3a4e);
}

[data-theme="light"] .orbit.is-selected,
[data-theme="light"] .orbit.is-selected.is-highlighted {
  border-color: color-mix(in srgb, var(--orbit-color) 62%, #223247);
  box-shadow: 0 0 14px color-mix(in srgb, var(--orbit-color) 24%, transparent);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1020px) {
  .site-nav {
    gap: 0;
  }

  .site-nav a {
    padding: 6px 7px;
    font-size: 11.5px;
  }

  .soon-tag {
    margin-left: 3px;
  }
}

@media (max-width: 880px) {
  .site-nav {
    left: 0;
    top: calc(100% + 8px);
    height: auto;
    width: min(320px, calc(100vw - 28px));
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    gap: 2px;
    border-radius: 14px;
    white-space: normal;
    clip-path: none;
    transform: translateY(-6px);
  }

  .site-header.is-open .site-nav {
    max-height: calc(100dvh - 88px);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: none;
  }

  .site-header.is-open .site-header-inner {
    border-radius: 14px;
  }

  .site-nav-links {
    display: grid;
    gap: 2px;
  }

  .nav-entry {
    display: block;
  }

  .nav-entry::after {
    display: none;
  }

  .site-nav .nav-section {
    display: flex;
    width: 100%;
  }

  .nav-dropdown,
  .nav-entry[data-align="right"] > .nav-dropdown {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    width: 100%;
    margin: 2px 0 5px;
    border-radius: 11px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    display: none;
    box-shadow: none;
  }

  .nav-entry.is-open > .nav-dropdown {
    display: block;
  }

  .site-nav .nav-dropdown-links a {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 12px;
  }

  .site-nav a {
    display: block;
    padding: 10px;
    border-radius: 8px;
  }

  .site-nav-tools {
    margin-left: 0;
    margin-top: 6px;
    padding-left: 0;
    padding-top: 8px;
    border-left: 0;
    border-top: 0;
    justify-content: flex-end;
  }
}

@media (max-width: 760px) {
  .catalog-context {
    grid-template-columns: 1fr;
  }

  .site-header-inner {
    margin: 10px 0 0 12px;
    padding: 5px;
    gap: 3px;
  }

  .brand-mark {
    width: 26px;
    height: 26px;
  }

  .site-nav {
    left: 0;
    top: calc(100% + 8px);
    height: auto;
    width: min(320px, calc(100vw - 28px));
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    gap: 2px;
    white-space: normal;
    clip-path: none;
    transform: translateY(-6px);
  }

  .site-header.is-open .site-nav {
    transform: none;
  }

  .site-nav-links {
    display: grid;
    gap: 2px;
  }

  .site-nav a {
    display: block;
    padding: 10px;
    border-radius: 8px;
  }

  .site-nav-tools {
    margin-left: 0;
    margin-top: 6px;
    padding-left: 0;
    padding-top: 8px;
    border-left: 0;
    border-top: 0;
    justify-content: flex-end;
  }

  .search-popover {
    width: calc(100vw - 28px);
  }

  .page-shell {
    width: calc(100% - 32px);
    padding: 64px 0 72px;
  }

  .page-hero {
    padding-bottom: 24px;
  }

  .lede {
    font-size: 14px;
  }

  .site-footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 20px;
    padding: 36px 18px 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    padding: 14px 18px 24px;
  }

  .contact-layout,
  .system-grid {
    grid-template-columns: 1fr;
  }

  .cookie-banner {
    bottom: 8px;
    padding: 13px 14px;
  }

  body.has-consent-banner {
    padding-bottom: 240px;
  }
}

@media (max-width: 520px) {
  .brand-tld {
    display: none;
  }

  .global-search input {
    width: 132px;
  }

  .site-tools {
    gap: 6px;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

  .page-hero h1 {
    font-size: clamp(32px, 10vw, 46px);
  }

  .planet-card {
    grid-template-columns: 46px minmax(0, 1fr);
    padding: 13px;
  }

  .planet-swatch,
  .px-swatch,
  .object-icon,
  .object-icon-slot,
  .galaxy-card-icon {
    width: 46px;
    height: 46px;
  }

  .planet-visual {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 760px) {
  .global-search.mobile-search input,
  .global-search.mobile-search input:focus {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --------------------------------------------------------------------------
   Shared planet article additions: breadcrumb, hero medallion, media module
   -------------------------------------------------------------------------- */

.planet-page {
  width: min(100%, 1000px);
  min-width: 0;
  padding: 48px 24px 96px;
}

.planet-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 26px;
  color: var(--text-dim);
  font-size: 9.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.planet-breadcrumb a {
  color: var(--text-soft);
  text-decoration: none;
}

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

.planet-hero.has-visual {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 34px;
}

.planet-hero-copy {
  display: grid;
  gap: 14px;
}

.planet-hero-visual {
  display: grid;
  place-items: center;
}

.planet-medallion {
  position: relative;
  display: block;
  width: 160px;
  height: 160px;
  flex: 0 0 auto;
  isolation: isolate;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.34));
}

.planet-medallion > .planet-swatch,
.planet-medallion > .px-swatch {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.planet-medallion > .object-hero-slot {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.planet-medallion > .planet-visual {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.planet-medallion > .bh-glyph {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.object-hero-slot .object-icon {
  width: 100%;
  height: 100%;
}

.planet-medallion > .galaxy-card-icon {
  width: 100%;
  height: 100%;
}

.planet-medallion > .medallion-icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.planet-medallion .saturn-rings {
  --ring-width: 150%;
  --ring-height: 48%;
}

.media-module {
  margin: 28px 0 8px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.media-module-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.media-module-head h2 {
  margin: 0;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.media-module-head span {
  color: var(--text-dim);
  font-size: 9px;
  letter-spacing: 0.07em;
}

.media-module-body {
  padding: 18px;
}

.planet-photo {
  margin: 0;
}

.planet-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #080a12;
}

.planet-photo figcaption {
  margin-top: 9px;
  color: var(--text-dim);
  font-size: 10px;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .planet-page {
    padding: 72px 20px 76px;
  }

  .planet-hero.has-visual {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .planet-hero-visual {
    order: -1;
    justify-items: start;
  }

  .planet-medallion {
    width: 110px;
    height: 110px;
  }

  .media-module-body {
    padding: 12px;
  }
}

/* --------------------------------------------------------------------------
   Unified object-page extras: realistic hero image, interesting facts,
   and collapsible pop-science video recommendations
   -------------------------------------------------------------------------- */

.planet-hero-photo {
  margin: 0;
  width: min(250px, 34vw);
  flex: 0 0 auto;
}

.planet-hero-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #080a12;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

.planet-hero-photo figcaption {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0;
}

.fun-facts {
  margin-top: 34px;
}

.fun-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fun-facts-grid li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.fun-facts-grid .fun-mark {
  color: var(--accent);
  font-size: 13px;
  line-height: 1.5;
}

.fun-facts-grid p {
  margin: 0;
  color: var(--soft);
  font-size: 12.5px;
  line-height: 1.65;
}

.media-recommendations {
  margin-top: 34px;
}

.video-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.video-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.video-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
}

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

.video-item summary:hover,
.video-item summary:focus-visible {
  background: rgba(255, 255, 255, 0.04);
}

.video-item summary:focus-visible {
  outline: 2px solid rgba(190, 210, 245, 0.55);
  outline-offset: -2px;
}

.video-play {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent-strong, #d7e6ff);
  font-size: 11px;
}

.video-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.video-title {
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-channel {
  color: var(--text-dim);
  font-size: 9.5px;
  letter-spacing: 0;
}

.video-chev {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 12px;
  transition: transform 0.2s ease;
}

.video-item[open] .video-chev {
  transform: rotate(90deg);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-top: 1px solid var(--line);
}

.video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.video-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-facade {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #000;
  color: #fff;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.video-facade img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: opacity 0.2s ease;
}

.video-facade:hover img,
.video-facade:focus-visible img {
  opacity: 1;
}

.video-facade-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  pointer-events: none;
}

.video-facade-note {
  position: absolute;
  right: 10px;
  bottom: 8px;
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  border-radius: 4px;
  pointer-events: none;
}

.media-recommendations .planet-note {
  margin-top: 14px;
}

/* --------------------------------------------------------------------------
   Ambient background starfield (site-wide, subtle)
   -------------------------------------------------------------------------- */

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.universe .ambient-bg {
  position: absolute;
  z-index: 0;
}

/* The universe pages also have a few hand-placed stars that used to twinkle.
   Keep them, but calm them to a single fixed dimness so overall brightness is
   the same on every page. */
.twinkle {
  animation: none;
  opacity: 0.2;
}

.ambient-star {
  position: absolute;
  left: var(--ax, 50%);
  top: var(--ay, 50%);
  width: var(--as, 2px);
  height: var(--as, 2px);
  border-radius: 50%;
  background: #edf3ff;
  box-shadow: 0 0 4px 1px rgba(201, 218, 255, 0.28);
  opacity: var(--ao, 0.2);
}

.ambient-shooting-star {
  position: absolute;
  left: var(--ax, 10vw);
  top: var(--ay, 15vh);
  width: var(--ml, 150px);
  height: 1px;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0, rgba(194, 213, 255, 0.1) 48%, rgba(232, 240, 255, var(--mb, 0.8)) 100%);
  filter: drop-shadow(0 0 4px rgba(188, 214, 255, 0.45));
  transform-origin: right center;
}

.ambient-shooting-star.is-visible {
  animation: ambient-meteor var(--md, 1.25s) ease-out forwards;
}

@keyframes ambient-meteor {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(30deg) scaleX(0.3); }
  12% { opacity: var(--mb, 0.8); transform: translate3d(0, 0, 0) rotate(30deg) scaleX(1); }
  100% { opacity: 0; transform: translate3d(190px, 130px, 0) rotate(30deg) scaleX(0.3); }
}

[data-theme="light"] .ambient-star {
  background: #42536b;
  box-shadow: none;
}

[data-theme="light"] .ambient-shooting-star {
  background: linear-gradient(90deg, transparent 0, rgba(47, 95, 150, 0.08) 48%, rgba(47, 95, 150, var(--mb, 0.5)) 100%);
  filter: drop-shadow(0 0 4px rgba(47, 95, 150, 0.3));
}

@media (prefers-reduced-motion: reduce) {
  .ambient-shooting-star {
    display: none;
  }
}
