/* RAKKHUN interface standard: bone, carbon, silver, restrained brass.
   Shared by the host page and the isolated Observatory instrument. */
:root {
  color-scheme: dark;
  --rk-bg: #111111;
  --rk-surface: #171717;
  --rk-raised: #202020;
  --rk-recess: #151515;
  --rk-ink: #f3f1eb;
  --rk-body: #c6c3bc;
  --rk-muted: #aaa8a1;
  --rk-line: #383837;
  --rk-line-strong: #75746e;
  --rk-grid: #303030;
  --rk-gold: #c6a66b;
  --rk-signal: #d4bd87;
  --rk-signal-2: #afc1c6;
  --rk-signal-soft: #d4bd8710;
  --rk-button: #f3f1eb;
  --rk-button-ink: #111111;
  --rk-hover: #ffffff08;
  --band-0: #6d77cf; --band-1: #5e8ac4; --band-2: #59a5a2; --band-3: #85a882;
  --band-4: #b3ab70; --band-5: #c6a66b; --band-6: #cf9a75; --band-7: #ce806d;
}
:root[data-theme="light"] {
  color-scheme: light;
  --rk-bg: #f3f1eb;
  --rk-surface: #f3f1eb;
  --rk-raised: #eae8e2;
  --rk-recess: #eeece6;
  --rk-ink: #171717;
  --rk-body: #4c4c48;
  --rk-muted: #64645e;
  --rk-line: #d1cfc8;
  --rk-line-strong: #85847d;
  --rk-grid: #d9d7d0;
  --rk-gold: #80663f;
  --rk-signal: #63502d;
  --rk-signal-2: #3d626b;
  --rk-signal-soft: #63502d0a;
  --rk-button: #171717;
  --rk-button-ink: #f3f1eb;
  --rk-hover: #00000005;
  --band-0: #35458b; --band-1: #35689b; --band-2: #326f70; --band-3: #537451;
  --band-4: #756b35; --band-5: #80663f; --band-6: #955d36; --band-7: #9e493a;
}

/* Global appearance control. All icons use the same 24px / 1.4px line grammar. */
html .site-header {
  background: var(--rk-bg)!important;
  color: var(--rk-ink)!important;
  border-color: var(--rk-line)!important;
}
html .header-inner {
  display: flex!important;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
html .header-inner .brand { flex: none; }
html[data-theme="dark"] .site-header .brand img { filter: invert(1); }
html[data-theme="light"] .site-header .brand img { filter: none; }
html .primary-nav { gap: clamp(14px, 1.25vw, 24px)!important; }
html .primary-nav a { color: var(--rk-body)!important; font-size: 13px!important; white-space: nowrap; }
html .primary-nav a:hover, html .primary-nav a.active { color: var(--rk-ink)!important; }
html .primary-nav a:after { background: var(--rk-ink)!important; }
html .header-actions { align-items: center; gap: 14px; flex: none; }
html .header-cta { border: 0!important; color: var(--rk-ink)!important; padding: 0; white-space: nowrap; font-size: 13px!important; }
html .header-cta:hover { background: transparent!important; color: var(--rk-gold)!important; }
html .site-header .theme-control { display: block!important; position: relative; order: 2; }
html .site-header .menu-button { order: 3; color: var(--rk-ink)!important; }
html .site-header .theme-trigger {
  display: grid; place-items: center; width: 44px; height: 44px;
  color: var(--rk-ink); border: 1px solid transparent; border-radius: 50%;
  background: transparent; cursor: pointer;
}
html .site-header .theme-trigger:hover, html .site-header .theme-trigger[aria-expanded="true"] {
  color: var(--rk-gold); background: var(--rk-hover); border-color: var(--rk-line);
}
html .theme-trigger svg, html .theme-option svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}
.theme-trigger .theme-icon { display: none; }
html[data-theme="light"] .theme-trigger .theme-icon--sun,
html[data-theme="dark"] .theme-trigger .theme-icon--moon { display: block; }
html .site-header .theme-menu {
  display: none; position: absolute; inset: 54px 0 auto auto; z-index: 220;
  width: 196px; padding: 8px; background: var(--rk-bg); color: var(--rk-ink);
  border: 1px solid var(--rk-line); border-radius: 4px;
  box-shadow: 0 12px 32px #00000012;
}
html .site-header .theme-menu.open { display: grid; }
html .site-header .theme-option {
  display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 0 12px;
  border: 0; border-radius: 2px; background: transparent; color: var(--rk-body);
  font: 400 13px/1.5 var(--font-system, system-ui); letter-spacing: .02em;
}
html .site-header .theme-option:hover, html .site-header .theme-option[aria-checked="true"] {
  background: var(--rk-hover); color: var(--rk-ink);
}
html .theme-option .theme-check { margin-left: auto; color: var(--rk-gold); font-size: 14px; }
html .site-header :focus-visible { outline: 1px solid var(--rk-gold)!important; outline-offset: 3px; }
html .mobile-panel { background: var(--rk-bg)!important; color: var(--rk-ink)!important; border-color: var(--rk-line)!important; }
html .mobile-panel a { color: var(--rk-ink)!important; border-color: var(--rk-line)!important; }
@media(max-width:1240px) {
  html .primary-nav { display: none!important; }
  html .menu-button { display: grid!important; width: 44px; height: 44px; }
  html .mobile-panel { display: block; position: fixed; inset: 72px 0 auto; z-index: 199; padding: 12px var(--r-gutter, 24px) 24px; transform: translateY(-130%); visibility: hidden; opacity: 0; }
  html .mobile-panel.open { transform: none; visibility: visible; opacity: 1; }
  html .mobile-panel a { display: block; padding: 14px 0; }
}
@media(max-width:600px) {
  html .header-inner { gap: 12px; }
  html .header-actions { gap: 2px; }
  html .header-cta { display: none; }
  html .site-header .theme-menu { position: absolute; inset: 54px -44px auto auto; }
}
@media(forced-colors:active) {
  html .theme-trigger, html .theme-menu { border: 1px solid ButtonText; }
  html .theme-option[aria-checked="true"] { outline: 1px solid Highlight; }
}
