:root {
  color-scheme: dark;
  --void: #040611;
  --night: #070b19;
  --night-2: #0b1025;
  --ink: #f3efe3;
  --muted: #8d97b4;
  --faint: rgba(215, 223, 247, .13);
  --line: rgba(198, 210, 244, .17);
  --gold: #e7bd61;
  --gold-soft: rgba(231, 189, 97, .13);
  --cyan: #76dfff;
  --panel: rgba(8, 12, 28, .86);
  --serif: "Songti SC", "STSongti-SC", STSong, "Noto Serif SC", serif;
  --sans: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  --header-h: 76px;
  --dock-h: 72px;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; background: var(--void); }
html { overflow: hidden; }
body { color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }

.skip-link {
  position: fixed; z-index: 200; left: 14px; top: -60px; padding: 10px 14px;
  color: #07101f; background: var(--gold); border-radius: 8px; transition: top .18s;
}
.skip-link:focus { top: 12px; }
.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;
}

.site-header {
  position: fixed; z-index: 40; inset: 0 0 auto; height: var(--header-h); display: flex;
  align-items: center; justify-content: space-between; padding: 0 clamp(18px, 3.8vw, 58px);
  pointer-events: none; background: linear-gradient(180deg, rgba(3,5,14,.88), transparent);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; pointer-events: auto; }
.brand-seal {
  display: grid; place-items: center; width: 43px; height: 43px; border-radius: 50%;
  color: #0b0c13; background: var(--gold); font: 700 16px var(--serif); box-shadow: 0 0 28px rgba(231,189,97,.18);
}
.brand b { display: block; font: 650 17px/1.1 var(--serif); letter-spacing: .05em; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; letter-spacing: .19em; text-transform: uppercase; }
.header-actions { display: flex; gap: 8px; pointer-events: auto; }
.icon-button, .workbench-close {
  display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line);
  border-radius: 50%; color: rgba(245,242,233,.85); background: rgba(7,10,23,.52); cursor: pointer;
  backdrop-filter: blur(12px); transition: border-color .18s, color .18s, background .18s, transform .18s;
}
.icon-button:hover, .icon-button:focus-visible, .workbench-close:hover { border-color: rgba(231,189,97,.65); color: var(--gold); transform: translateY(-1px); }
.icon-button[aria-pressed="true"] { color: #070a14; background: var(--gold); border-color: var(--gold); }

#app { width: 100%; height: 100svh; }
.cosmos-stage { position: relative; width: 100%; height: 100svh; min-height: 600px; overflow: hidden; isolation: isolate; background: #040611; }
.cosmos-stage::after {
  content: ""; position: absolute; z-index: 2; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3,5,14,.28), transparent 18%, transparent 79%, rgba(3,5,14,.24)),
    linear-gradient(180deg, rgba(3,5,14,.18), transparent 30%, transparent 68%, rgba(3,5,14,.74));
}
.cosmos-mount, .cosmos-mount canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cosmos-mount { z-index: 1; }
.cosmos-mount canvas { touch-action: none; cursor: grab; }
.cosmos-mount canvas.dragging { cursor: grabbing; }
.cosmos-mount canvas.pointing { cursor: pointer; }
.cosmos-loading {
  position: absolute; z-index: 30; inset: 0; display: grid; place-content: center; justify-items: center;
  gap: 18px; color: var(--muted); background: var(--void); transition: opacity .6s, visibility .6s;
}
.cosmos-loading.ready { opacity: 0; visibility: hidden; }
.cosmos-loading span { width: 54px; height: 54px; border: 1px solid rgba(231,189,97,.24); border-top-color: var(--gold); border-radius: 50%; animation: orbit 1.2s linear infinite; }
.cosmos-loading p { margin: 0; font: 12px var(--serif); letter-spacing: .18em; }
@keyframes orbit { to { transform: rotate(360deg); } }

.search-orbit {
  position: absolute; z-index: 12; top: 92px; left: 50%; display: flex; align-items: center; width: min(420px, calc(100% - 460px));
  min-width: 260px; height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(7, 10, 25, .62); backdrop-filter: blur(16px); transform: translateX(-50%);
  box-shadow: 0 16px 50px rgba(0,0,0,.17);
}
.search-orbit > span { margin-right: 9px; color: var(--muted); font-size: 20px; }
.search-orbit input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-orbit input::placeholder { color: rgba(158,170,204,.65); }
.search-orbit button { width: 28px; height: 28px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 20px; }
.search-orbit:focus-within { border-color: rgba(118,223,255,.55); box-shadow: 0 0 0 3px rgba(118,223,255,.06); }

.mode-switch {
  position: absolute; z-index: 12; right: clamp(18px, 3.8vw, 58px); top: 92px; display: flex; padding: 3px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(7,10,25,.62); backdrop-filter: blur(16px);
}
.mode-switch button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; }
.mode-switch button.active { color: #090b13; background: var(--gold); }

.subject-orbit {
  position: absolute; z-index: 12; left: clamp(18px, 3.8vw, 58px); top: 92px; display: flex; flex-direction: column;
  align-items: flex-start; gap: 6px; max-height: calc(100svh - 300px); padding: 3px;
}
.subject-button, .subject-more {
  position: relative; display: flex; align-items: center; min-height: 30px; padding: 0 11px 0 9px;
  border: 1px solid transparent; border-radius: 999px; color: rgba(183,193,221,.76); background: transparent;
  cursor: pointer; font-size: 11px; letter-spacing: .04em; transition: color .18s, background .18s, border-color .18s, transform .18s;
}
.subject-button::before { content: ""; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--subject-color, #9fb5e7); box-shadow: 0 0 11px var(--subject-color, #9fb5e7); }
.subject-button:hover, .subject-button:focus-visible, .subject-button.active { color: var(--ink); border-color: rgba(255,255,255,.13); background: rgba(12,17,38,.68); transform: translateX(3px); }
.subject-button.active::after { content: ""; position: absolute; right: -7px; width: 2px; height: 15px; background: var(--subject-color); box-shadow: 0 0 12px var(--subject-color); }
.subject-more { padding-left: 23px; color: var(--gold); }
.subject-panel {
  position: absolute; z-index: 22; left: clamp(18px, 3.8vw, 58px); top: 90px; width: min(560px, calc(100% - 36px));
  max-height: calc(100svh - 200px); padding: 18px; border: 1px solid var(--line); border-radius: 18px;
  background: rgba(5,8,19,.96); backdrop-filter: blur(22px); box-shadow: 0 30px 90px rgba(0,0,0,.52); overflow: auto;
}
.subject-panel[hidden] { display: none; }
.subject-panel header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.subject-panel h2 { margin: 0; font: 600 20px var(--serif); }
.subject-panel header button { border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 22px; }
.subject-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
.subject-grid .subject-button { width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.era-rail {
  position: absolute; z-index: 12; left: 50%; bottom: calc(var(--dock-h) + 24px); width: min(760px, calc(100% - 420px));
  transform: translateX(-50%); pointer-events: none;
}
.era-buttons { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; pointer-events: auto; }
.era-buttons button {
  flex: 1; min-width: 0; padding: 4px 7px; border: 0; color: rgba(169,180,211,.58); background: transparent; cursor: pointer;
  font-size: 9px; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.era-buttons button:hover, .era-buttons button.active { color: var(--gold); }
.year-scrubber { display: grid; grid-template-columns: 38px 1fr 42px; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; pointer-events: auto; }
.year-scrubber strong { color: var(--ink); font: 600 13px var(--serif); text-align: right; }
.year-scrubber input { width: 100%; height: 2px; margin: 0; accent-color: var(--gold); cursor: ew-resize; }

.map-key {
  position: absolute; z-index: 11; left: clamp(18px, 3.8vw, 58px); bottom: calc(var(--dock-h) + 27px);
  display: flex; gap: 15px; color: rgba(154,166,201,.58); font-size: 9px; letter-spacing: .04em;
}
.map-key span { display: inline-flex; align-items: center; }
.map-key i { width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.map-key .key-evaluation { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.map-key .key-unverified { background: transparent; border: 1px dashed #acb4cd; box-shadow: none; }

.research-dock {
  position: absolute; z-index: 15; inset: auto 0 0; height: var(--dock-h); display: flex; align-items: center;
  justify-content: space-between; padding: 0 clamp(18px, 3.8vw, 58px) max(0px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(198,210,244,.12); background: rgba(4,7,17,.76); backdrop-filter: blur(20px);
}
.research-dock p { margin: 0; color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.research-dock > div { display: flex; height: 100%; }
.research-dock a { display: flex; flex-direction: column; justify-content: center; min-width: 185px; padding: 0 24px; border-left: 1px solid var(--faint); text-decoration: none; transition: background .18s; }
.research-dock a:hover, .research-dock a.active { background: rgba(231,189,97,.07); }
.research-dock b { font: 600 14px var(--serif); letter-spacing: .08em; }
.research-dock small { margin-top: 4px; color: var(--muted); font-size: 9px; }

.star-inspector {
  position: absolute; z-index: 18; right: clamp(18px, 3.8vw, 58px); top: 148px; width: min(350px, calc(100% - 36px));
  max-height: calc(100svh - 280px); padding: 22px 0 18px 22px; border-left: 1px solid rgba(231,189,97,.33);
  background: linear-gradient(90deg, rgba(5,8,18,.94), rgba(5,8,18,.72)); backdrop-filter: blur(16px); overflow: auto;
  animation: inspector-in .28s ease-out both;
}
.star-inspector[hidden] { display: none; }
@keyframes inspector-in { from { opacity: 0; transform: translateX(22px); } }
.inspector-close { float: right; width: 30px; height: 30px; margin: -8px 0 0 12px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 22px; }
.star-inspector time, .inspector-kicker { color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.star-inspector h2 { margin: 9px 0 12px; font: 600 24px/1.24 var(--serif); }
.star-inspector p { margin: 9px 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.inspector-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.inspector-meta span, .evidence-tag { padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; color: rgba(218,225,244,.8); font-size: 9px; }
.inspector-insights { margin: 18px 0 0; padding: 15px 0 0; border-top: 1px solid var(--faint); }
.inspector-insights h3 { margin: 0 0 10px; font: 600 13px var(--serif); }
.inspector-insights article { margin: 12px 0; }
.inspector-insights b { display: block; font: 600 12px/1.5 var(--serif); }
.inspector-insights small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.concept-evidence { padding: 12px 0; border-top: 1px solid var(--faint); }
.concept-evidence:first-of-type { border-top: 0; }
.concept-evidence a, .concept-evidence b { color: var(--ink); text-decoration: none; font: 600 12px/1.5 var(--serif); }
.concept-evidence a:hover { color: var(--gold); }
.concept-evidence p { margin: 7px 0 0; color: rgba(196,205,228,.72); font-size: 10px; line-height: 1.65; }
.concept-evidence.candidate { padding-left: 10px; border-left: 1px dashed rgba(231,189,97,.42); }
.inspector-actions { display: flex; gap: 8px; margin-top: 18px; }
.action-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 13px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--ink); background: rgba(255,255,255,.035); text-decoration: none; cursor: pointer; font-size: 11px;
}
.action-button.primary { color: #080a12; background: var(--gold); border-color: var(--gold); font-weight: 700; }
.action-button:hover { border-color: rgba(231,189,97,.62); }

.atlas-tooltip {
  position: fixed; z-index: 70; width: min(310px, calc(100vw - 28px)); padding: 13px 15px; border: 1px solid var(--line);
  border-radius: 12px; color: var(--ink); background: rgba(5,8,18,.94); pointer-events: none; backdrop-filter: blur(18px);
  box-shadow: 0 18px 56px rgba(0,0,0,.42);
}
.atlas-tooltip[hidden] { display: none; }
.atlas-tooltip b { display: block; font: 600 15px/1.35 var(--serif); }
.atlas-tooltip span { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.55; }

.scrim { position: fixed; z-index: 79; inset: 0; background: rgba(1,3,10,.58); backdrop-filter: blur(2px); }
.scrim[hidden] { display: none; }
.workbench {
  position: fixed; z-index: 80; left: 0; right: 0; bottom: 0; height: min(72svh, 780px); padding: 0 clamp(18px, 4vw, 64px) max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(231,189,97,.3); border-radius: 26px 26px 0 0; color: #182031; background: #f4f0e6;
  box-shadow: 0 -32px 90px rgba(0,0,0,.55); overflow: hidden; animation: workbench-in .34s cubic-bezier(.2,.8,.2,1) both;
}
.workbench[hidden] { display: none; }
@keyframes workbench-in { from { transform: translateY(100%); } }
.workbench-handle { width: 48px; height: 4px; margin: 10px auto 0; border-radius: 999px; background: rgba(22,30,46,.22); }
.workbench-header { height: 90px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(31,40,57,.14); }
.workbench-header p { margin: 0 0 5px; color: #936b18; font-size: 9px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.workbench-header h1 { margin: 0; font: 600 clamp(24px, 3vw, 34px)/1 var(--serif); }
.workbench-close { color: #263047; background: transparent; border-color: rgba(38,48,71,.22); backdrop-filter: none; font-size: 24px; }
.workbench-tabs { display: flex; gap: 26px; height: 48px; align-items: end; border-bottom: 1px solid rgba(31,40,57,.14); }
.workbench-tabs button { height: 48px; padding: 0 1px; border: 0; border-bottom: 2px solid transparent; color: #758096; background: transparent; cursor: pointer; font-size: 12px; }
.workbench-tabs button.active { color: #121827; border-bottom-color: #a47b28; font-weight: 700; }
.workbench-body { height: calc(100% - 152px); padding: 24px 0 36px; overflow: auto; overscroll-behavior: contain; }

.workspace-grid { display: grid; grid-template-columns: minmax(230px,.72fr) minmax(0,1.8fr); gap: clamp(28px,5vw,78px); }
.workspace-aside { position: sticky; top: 0; align-self: start; }
.workspace-aside h2, .workspace-main h2 { margin: 0 0 12px; font: 600 20px var(--serif); }
.workspace-aside p, .workspace-main p { color: #667086; line-height: 1.7; }
.work-form { display: grid; gap: 10px; }
.work-form label { color: #667086; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.work-form input, .work-form select, .work-form textarea {
  width: 100%; padding: 11px 13px; border: 1px solid rgba(38,48,71,.22); border-radius: 9px; outline: 0;
  color: #171e2e; background: rgba(255,255,255,.55);
}
.work-form input:focus, .work-form select:focus, .work-form textarea:focus { border-color: #a47b28; box-shadow: 0 0 0 3px rgba(164,123,40,.09); }
.work-form-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.work-button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; color: white; background: #161e30; cursor: pointer; font-weight: 700; }
.work-button.secondary { color: #182031; background: transparent; border: 1px solid rgba(38,48,71,.22); }
.work-button:disabled { opacity: .48; cursor: wait; }

.version-river { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px,1fr); overflow-x: auto; border-top: 1px solid rgba(38,48,71,.18); }
.version-entry { position: relative; min-height: 240px; padding: 25px 24px 24px 0; border-right: 1px solid rgba(38,48,71,.13); }
.version-entry + .version-entry { padding-left: 24px; }
.version-entry time { color: #a07420; font: 700 12px var(--serif); }
.version-entry h3 { margin: 11px 0 9px; font: 600 17px/1.4 var(--serif); }
.version-entry p { margin: 0; color: #69738a; font-size: 11px; }
.version-entry a { position: absolute; bottom: 20px; color: #255d73; font-size: 11px; font-weight: 700; }
.insight-line { margin: 22px 0 0; padding: 17px 0; border-top: 1px solid rgba(38,48,71,.14); }
.insight-line time { color: #a07420; font-size: 10px; font-weight: 700; }
.insight-line h3 { margin: 7px 0 6px; font: 600 16px var(--serif); }
.insight-line p { margin: 0; font-size: 12px; }

.result-list, .comment-list, .citation-list { display: grid; }
.result-row, .comment-row, .citation-row { padding: 17px 0; border-top: 1px solid rgba(38,48,71,.14); }
.result-row:first-child, .comment-row:first-child, .citation-row:first-child { border-top: 0; }
.result-row a, .comment-row h3 { color: #172033; text-decoration: none; font: 600 16px var(--serif); }
.result-row small, .comment-row header, .citation-row small { display: block; margin-top: 5px; color: #798399; font-size: 10px; }
.result-row p, .comment-row p, .citation-row p { margin: 8px 0 0; color: #5d687e; font-size: 12px; line-height: 1.7; }
.result-row mark { color: inherit; background: rgba(231,189,97,.42); }
.empty-state { padding: 38px 0; color: #7c869a; border-top: 1px solid rgba(38,48,71,.14); font-size: 12px; }

.reader-grid { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 50px; align-items: start; }
.reader-document h2 { margin: 0 0 7px; font: 600 clamp(24px,3vw,38px)/1.3 var(--serif); }
.reader-document > p { margin: 0 0 24px; color: #6d778c; }
.paragraph { position: relative; padding: 15px 0 15px 62px; border-top: 1px solid rgba(38,48,71,.13); font: 16px/1.95 var(--serif); }
.paragraph-number { position: absolute; left: 0; top: 19px; width: 48px; color: #9a7a3c; font: 9px/1.45 var(--sans); }
.paragraph.uncertain { border-left: 2px solid #ad682e; padding-left: 68px; }
.uncertainty-note { display: block; margin-top: 7px; color: #93491d; font: 10px/1.5 var(--sans); }
.reader-facts { position: sticky; top: 0; padding-left: 20px; border-left: 1px solid rgba(38,48,71,.18); }
.reader-facts h3 { margin: 0 0 12px; font: 600 16px var(--serif); }
.reader-facts p { color: #687289; font-size: 11px; line-height: 1.7; }
.verification-row { padding: 14px 0; border-top: 1px solid rgba(38,48,71,.14); }
.verification-row b { font: 600 13px var(--serif); }
.verification-row a { color: #255d73; }

.ai-grid { display: grid; grid-template-columns: minmax(280px,.8fr) minmax(0,1.2fr); gap: 42px; }
.ai-answer { min-height: 210px; white-space: pre-wrap; color: #303a50; font: 15px/1.8 var(--serif); }
.login-note { padding: 28px 0; border-top: 1px solid rgba(38,48,71,.15); }
.login-note h2 { font: 600 21px var(--serif); }
.login-note a { display: inline-flex; margin-top: 10px; }
.turnstile-slot { min-height: 70px; }

.toast { position: fixed; z-index: 150; left: 50%; bottom: 92px; max-width: min(460px, calc(100% - 28px)); padding: 11px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: rgba(6,9,21,.94); transform: translate(-50%,20px); opacity: 0; pointer-events: none; transition: .22s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

body.stable *, body.stable *::before, body.stable *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
body.stable .cosmos-mount { opacity: .88; }

@media (max-width: 980px) {
  :root { --header-h: 68px; --dock-h: 68px; }
  .search-orbit { left: 18px; top: 78px; width: min(360px, calc(100% - 156px)); min-width: 0; transform: none; }
  .mode-switch { top: 78px; right: 16px; }
  .mode-switch button { padding-inline: 10px; }
  .subject-orbit { top: 132px; left: 14px; max-height: calc(100svh - 318px); }
  .subject-button { min-height: 27px; padding-inline: 7px 9px; font-size: 10px; }
  .subject-button:nth-of-type(n+10):not(.subject-more) { display: none; }
  .era-rail { width: calc(100% - 80px); bottom: calc(var(--dock-h) + 17px); }
  .map-key { display: none; }
  .research-dock p { display: none; }
  .research-dock { justify-content: flex-end; }
  .research-dock a { min-width: 170px; }
  .star-inspector { top: 130px; right: 18px; max-height: calc(100svh - 288px); }
  .workspace-grid, .reader-grid, .ai-grid { grid-template-columns: 1fr; }
  .workspace-aside, .reader-facts { position: static; }
  .reader-facts { padding-left: 0; border-left: 0; border-top: 1px solid rgba(38,48,71,.16); padding-top: 20px; }
}

@media (max-width: 640px) {
  :root { --dock-h: 66px; }
  .cosmos-stage { min-height: 520px; }
  .site-header { padding-inline: 12px; }
  .brand-seal { width: 38px; height: 38px; }
  .brand b { font-size: 15px; }
  .brand small { font-size: 8px; }
  #reset-view { display: none; }
  .search-orbit { top: 70px; left: 12px; width: calc(100% - 126px); height: 38px; }
  .mode-switch { top: 70px; right: 10px; }
  .mode-switch button { min-height: 30px; padding-inline: 8px; font-size: 10px; }
  .subject-orbit { top: 116px; left: 7px; gap: 3px; }
  .subject-button { min-height: 24px; padding-inline: 6px 8px; font-size: 9px; background: rgba(6,9,21,.24); }
  .subject-button:nth-of-type(n+8):not(.subject-more) { display: none; }
  .subject-panel { left: 10px; top: 112px; width: calc(100% - 20px); max-height: calc(100svh - 210px); }
  .subject-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .era-rail { left: 14px; width: calc(100% - 28px); bottom: calc(var(--dock-h) + 12px); transform: none; }
  .era-buttons button { font-size: 8px; }
  .era-buttons button:nth-child(2), .era-buttons button:nth-child(4) { display: none; }
  .star-inspector { inset: auto 10px calc(var(--dock-h) + 62px); width: auto; max-height: 42svh; padding: 16px; border: 1px solid rgba(231,189,97,.28); border-radius: 15px; }
  .star-inspector h2 { font-size: 19px; }
  .inspector-insights { display: none; }
  .research-dock { padding: 0 8px max(0px,env(safe-area-inset-bottom)); }
  .research-dock > div { width: 100%; }
  .research-dock a { flex: 1; min-width: 0; padding: 0 12px; border-left: 0; }
  .research-dock a + a { border-left: 1px solid var(--faint); }
  .research-dock b { font-size: 12px; }
  .research-dock small { font-size: 8px; }
  .workbench { height: 82svh; padding-inline: 16px; border-radius: 20px 20px 0 0; }
  .workbench-header { height: 76px; }
  .workbench-header h1 { font-size: 23px; }
  .workbench-tabs { gap: 20px; }
  .workbench-body { height: calc(100% - 138px); padding-top: 18px; }
  .work-form-row { grid-template-columns: 1fr; }
  .reader-grid { gap: 30px; }
  .paragraph { padding-left: 44px; font-size: 15px; }
  .paragraph-number { width: 36px; }
  .ai-grid { gap: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

@media print {
  html, body { overflow: visible; color: #111; background: white; }
  .site-header, .cosmos-stage, .workbench-tabs, .workbench-close { display: none !important; }
  .workbench { position: static; display: block !important; height: auto; padding: 0; box-shadow: none; color: #111; background: white; }
  .workbench-body { height: auto; overflow: visible; }
}
