/* ==========================================================================
   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;
  --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;
  --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(--page-bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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: 500;
  letter-spacing: -0.03em;
  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: 500;
  letter-spacing: -0.02em;
  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;
  transform: none;
  clip-path: inset(0 0 0 0 round 0 14px 14px 0);
}

.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: 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.08em;
  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: 500;
}

.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-dot {
  transition: transform 0.2s ease, fill 0.2s ease;
}

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

.nav-toggle:hover .menu-dot:last-child,
.site-header.is-open .nav-toggle .menu-dot:last-child {
  transform: translateX(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(3, 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.035em;
}

.footer-column h2 {
  margin: 0 0 12px;
  color: var(--text-dim);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  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
   -------------------------------------------------------------------------- */

.content-body {
  background: var(--page-bg);
}

.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.16em;
  text-transform: uppercase;
}

.page-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(38px, 6.4vw, 62px);
  font-weight: 420;
  letter-spacing: -0.055em;
  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.03em;
}

.prose {
  max-width: 760px;
}

.prose h2 {
  margin: 38px 0 12px;
  color: var(--text);
  font-size: 18px;
  font-weight: 520;
  letter-spacing: -0.02em;
  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: 560;
}

.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.12em;
  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: 520;
  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.12em;
  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.08em;
  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: 520;
}

.planet-card span {
  display: block;
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 9px;
  letter-spacing: 0.08em;
  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.08em;
}

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

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

.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-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: 460;
  letter-spacing: -0.03em;
}

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

.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.1em;
  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.12em;
  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: 520;
  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"] .universe {
  background:
    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);
}

[data-theme="light"] .universe::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 {
    transform: none;
  }

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

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

@media (max-width: 760px) {
  .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 {
    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);
  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.1em;
  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 .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.13em;
  text-transform: uppercase;
}

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

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