:root {
  --bg: #03050b;
  --panel: rgba(10, 15, 27, 0.78);
  --panel-solid: #0a0f1b;
  --line: rgba(140, 160, 200, 0.18);
  --ink: #e6e9ef;
  --muted: #9aa3b2;
  --accent: #f2c66d;
  --teal: #5fd3c8;
  --link: #8cc8ff;
  --quote: #c9d3e3;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
button { font: inherit; color: inherit; }

/* The sky fills the page; the story sits beside it on a wide screen and under it on a narrow one. */
.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(360px, 31vw, 480px);
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100vh;
  height: 100dvh;
}
.sky { grid-area: 1 / 1 / 2 / 2; position: relative; overflow: hidden; background: #02030a; }
.timeline { grid-area: 2 / 1 / 3 / 2; }
.story { grid-area: 1 / 2 / 3 / 3; overflow-y: auto; border-left: 1px solid var(--line); background: linear-gradient(180deg, #070b16, #04060d 60%); }

/* On a narrow screen the sky and the timeline stay at the top while the story scrolls under them,
   so the sky can be watched while the card is read. */
@media (max-width: 860px) {
  .app { display: block; height: auto; }
  .sky { position: sticky; top: 0; z-index: 5; height: 52vh; height: 52svh; min-height: 300px; }
  .timeline { position: sticky; top: max(52vh, 300px); top: max(52svh, 300px); z-index: 5; }
  .story { border-left: 0; }
  /* a control or link in the story that takes focus lands below the pinned sky and timeline; the pinned
     controls themselves get no margin, so touching them never scrolls the story */
  .story :is(a, button, input, select, summary, canvas) { scroll-margin-top: calc(max(52vh, 300px) + 64px); scroll-margin-top: calc(max(52svh, 300px) + 64px); }
}
/* a phone on its side has no height to pin anything: the sky and the story simply scroll (H2) */
@media (max-width: 860px) and (max-height: 520px) {
  .sky { position: relative; height: 92vh; height: 92svh; min-height: 0; }
  .timeline { position: static; }
  .story :is(a, button, input, select, summary, canvas) { scroll-margin-top: 0; }
}

#sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#sky:active { cursor: grabbing; }
#sky.over-star { cursor: pointer; }
.no-webgl { position: absolute; inset: auto 16px 50% 16px; text-align: center; color: var(--muted); }

/* Overlays on the sky */
.title { position: absolute; top: 14px; left: 16px; right: 64px; pointer-events: none; text-shadow: 0 1px 8px #000; }
.brand { margin: 0; font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.title h1 { margin: 2px 0 0; font-size: clamp(20px, 2.6vw, 30px); font-weight: 650; letter-spacing: 0.01em; }
.story-btn {
  pointer-events: auto; font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  text-shadow: inherit; display: inline-block; text-align: left;
}
.story-btn .chev { display: inline-block; margin-left: 8px; font-size: 0.55em; color: var(--muted); vertical-align: 0.15em; transition: transform 0.3s; }
.story-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.story-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
/* The way to the other stories, named in words beside the brand */
.stories-chip {
  position: relative; pointer-events: auto; margin-left: 8px; padding: 3px 8px 3px 10px; font: inherit; letter-spacing: 0.2em;
  color: var(--accent); background: rgba(10, 15, 27, 0.6); border: 1px solid rgba(242, 198, 109, 0.5); border-radius: 999px;
  cursor: pointer; text-shadow: none; vertical-align: 1px;
}
.stories-chip::after { content: ""; position: absolute; inset: -10px -6px; }   /* a finger-sized target around a small chip */
.stories-chip:hover, .stories-chip[aria-expanded="true"] { background: rgba(242, 198, 109, 0.16); }
.stories-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stories {
  position: absolute; top: 74px; left: 12px; width: min(380px, calc(100% - 24px)); max-height: calc(100% - 160px); overflow-y: auto; z-index: 4;
  padding: 8px; border-radius: 14px; background: rgba(10, 15, 27, 0.94); border: 1px solid rgba(242, 198, 109, 0.35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: rise 0.25s ease;
}
.stories a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.stories a:hover, .stories a:focus-visible { background: rgba(242, 198, 109, 0.08); outline: none; }
.stories a[aria-current="page"] { background: rgba(242, 198, 109, 0.12); }
.stories .t { display: block; font-weight: 650; font-size: 16px; }
.stories .s { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.card .more-stories a { display: block; margin: 8px 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.card .more-stories a:hover, .card .more-stories a:focus-visible { border-color: rgba(242, 198, 109, 0.6); background: rgba(242, 198, 109, 0.08); outline: none; }
.more-stories .t { display: block; font-weight: 650; font-size: 16px; }
.more-stories .s { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

.hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; transition: opacity 1.2s ease; }
.hint.faded { opacity: 0; }

.hud {
  position: absolute; left: 12px; bottom: 12px; width: min(560px, calc(100% - 24px));
  padding: 10px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 14px; color: var(--muted);
}
.clock-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.clock-row input { width: 100%; accent-color: var(--accent); }
.clock-row output { color: var(--ink); font-variant-numeric: tabular-nums; min-width: 6.5em; text-align: right; }
.hud-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.hud-row button {
  padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04);
  font-size: 13px; cursor: pointer;
}
.hud-row button[aria-pressed="true"] { border-color: var(--teal); color: var(--teal); box-shadow: 0 0 12px rgba(95, 211, 200, 0.25); }
/* two lines, always: a status that grows or shrinks would move the clear area, and with it the whole sky */
.lit-count {
  margin: 0; flex: 1 1 200px; line-height: 1.35; height: 2.7em; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.mark { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity 0.35s; will-change: transform; }
.mark .ring {
  position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%;
  border: 1.5px solid var(--accent); box-shadow: 0 0 12px rgba(242, 198, 109, 0.3), inset 0 0 8px rgba(242, 198, 109, 0.15);
  animation: breathe 3.4s ease-in-out infinite;
}
.mark .name {
  position: absolute; left: 19px; top: -10px; white-space: nowrap; font-size: 13px; font-weight: 600;
  color: var(--accent); text-shadow: 0 0 3px #000, 0 0 8px #000, 0 0 14px #000;
}
.mark.cardinal .ring { display: none; }
.mark.cardinal .name { left: 0; top: 0; transform: translateX(-50%); color: var(--muted); letter-spacing: 0.14em; font-size: 12px; font-weight: 500; }
.mark.picked .ring { border-color: var(--teal); box-shadow: 0 0 12px rgba(95, 211, 200, 0.35); animation: none; }
.mark.picked .name { color: var(--teal); }
.mark.hover .ring { width: 18px; height: 18px; margin: -9px 0 0 -9px; border-color: rgba(230, 233, 239, 0.55); box-shadow: none; animation: none; }
.mark.hover .name { left: 13px; top: -10px; color: var(--ink); font-weight: 500; }
.mark.flip .name { left: auto; right: 19px; }
.mark.hover.flip .name { right: 13px; }
@keyframes breathe { 0%, 100% { opacity: 0.6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }

.star-panel {
  position: absolute; top: 60px; right: 12px; width: min(300px, calc(100% - 24px)); max-height: calc(100% - 200px); overflow-y: auto;
  padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid rgba(95, 211, 200, 0.35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 14px; animation: rise 0.3s ease;
}
.star-panel h2 { margin: 0 24px 0 0; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.star-panel .swatch { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 10px currentColor; flex: none; }
.star-panel .designation { margin: 2px 0 8px; color: var(--muted); }
.star-panel dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; }
.star-panel dt { color: var(--muted); }
.star-panel dd { margin: 0; }
.star-panel h3 { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; }
.star-panel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.star-panel ul button, .star-panel .look {
  width: 100%; text-align: left; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(242, 198, 109, 0.06); color: var(--accent); cursor: pointer;
}
.star-panel .look { margin-top: 10px; background: rgba(95, 211, 200, 0.08); color: var(--teal); text-align: center; }
.star-panel .none { margin: 0; color: var(--muted); }
.star-panel .src { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.star-panel .close, .settings .close {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; cursor: pointer; line-height: 1;
}

/* The cog and the settings */
.cog {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted); cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.cog svg { transition: transform 0.4s ease; }
.cog:hover, .cog[aria-expanded="true"] { color: var(--accent); border-color: rgba(242, 198, 109, 0.6); }
.cog[aria-expanded="true"] svg { transform: rotate(60deg); }
.settings {
  position: absolute; top: 60px; right: 12px; width: min(320px, calc(100% - 24px)); max-height: calc(100% - 72px); overflow-y: auto;
  padding: 14px 16px; border-radius: 14px; background: rgba(10, 15, 27, 0.92); border: 1px solid rgba(242, 198, 109, 0.35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 14px; animation: rise 0.3s ease; z-index: 3;
}
.settings h2 { margin: 0 30px 12px 0; font-size: 18px; }
.settings .field { display: grid; gap: 4px; margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.settings select, .settings input {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--panel-solid);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; color-scheme: dark;
}
.settings .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.settings .wide {
  width: 100%; margin: 0 0 10px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(95, 211, 200, 0.08); color: var(--teal); cursor: pointer;
}
.settings .muted { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.settings .muted:empty { display: none; }
.settings .small { font-size: 12px; margin: 4px 0 0; }
.cog:focus-visible, .settings button:focus-visible, .settings select:focus-visible, .settings input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* The timeline */
.timeline { display: flex; gap: 12px; align-items: center; padding: 10px 16px 12px; border-top: 1px solid var(--line); background: #04060d; }
.controls { display: flex; gap: 6px; flex: none; }
.controls button {
  position: relative; overflow: hidden; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 14px; cursor: pointer;
}
#play { min-width: 5.5em; }
#play.on { border-color: var(--accent); color: var(--accent); }
.progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); }
@keyframes fill { from { width: 0; } to { width: 100%; } }
.controls button:focus-visible, .beats button:focus-visible, .hud button:focus-visible, .star-panel button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.beats { list-style: none; margin: 0; padding: 0; display: flex; overflow-x: auto; flex: 1; scrollbar-width: thin; }
.beats li { flex: 1 0 56px; position: relative; }
.beats li::before { content: ""; position: absolute; top: 12px; left: 0; right: 0; height: 1px; background: var(--line); }
.beats li:first-child::before { left: 50%; }
.beats li:last-child::before { right: 50%; }
.beats button {
  position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: 0; padding: 6px 2px 2px; cursor: pointer; color: var(--muted);
  font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.beats .dot { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--muted); background: #04060d; transition: all 0.4s; }
.beats button.seen .dot { background: rgba(242, 198, 109, 0.45); border-color: rgba(242, 198, 109, 0.6); }
.beats button[aria-current="step"] { color: var(--accent); font-weight: 650; }
.beats button[aria-current="step"] .dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px var(--accent); transform: scale(1.25); }
.beats button:hover .dot { border-color: var(--accent); }

@media (max-width: 560px) {
  .title { top: 10px; left: 12px; }
  .brand { font-size: 11px; }
  .hint { font-size: 12px; margin-top: 2px; }
  .cog { top: 10px; right: 10px; }
  .timeline { gap: 8px; padding: 8px 10px; }
  .controls { gap: 4px; }
  .controls button { padding: 6px 10px; }
  #play { min-width: 4.4em; }
  .beats li { flex: 1 0 50px; }
  .hud { left: 8px; bottom: 8px; width: calc(100% - 16px); padding: 7px 10px; font-size: 13px; }
  .clock-row label { display: none; }
  .clock-row { grid-template-columns: 1fr auto; }
  .clock-row output { min-width: 0; }
  .hud-row { flex-wrap: nowrap; gap: 6px; margin-top: 6px; }
  .hud-row button { flex: none; font-size: 12px; padding: 2px 10px; }
  .lit-count { flex: 1 1 0; min-width: 0; font-size: 12px; line-height: 1.3; height: 2.6em; }
  .star-panel { top: 58px; max-height: calc(100% - 150px); }
  /* the settings rise from the bottom of the screen, over everything */
  .settings {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 82vh; max-height: 82svh; z-index: 20;
    border-radius: 16px 16px 0 0; border-width: 1px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  }
  .story { padding: 14px 16px 8px; }
  .card .year { font-size: 38px; }
  .settings-open .sky { z-index: 30; }
}

/* The story */
.story { padding: 18px 20px 8px; }
.intro { color: var(--ink); opacity: 0.8; font-size: 13px; }
.card.arrive { animation: arrive 0.6s ease; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); } }
.card .year { font-size: 44px; line-height: 1.05; font-weight: 750; color: var(--accent); margin: 0; font-variant-numeric: tabular-nums; text-shadow: 0 0 24px rgba(242, 198, 109, 0.25); }
.card .year-detail { margin: 2px 0 0; color: var(--accent); font-size: 14px; opacity: 0.85; }
.card .person { margin: 6px 0 10px; color: var(--muted); font-size: 15px; letter-spacing: 0.02em; }
.card h2 { font-size: 23px; margin: 6px 0 4px; line-height: 1.25; }
.card .finding { margin: 12px 0; }
.card .implication { margin: 12px 0; padding: 8px 0 8px 14px; border-left: 3px solid var(--accent); background: linear-gradient(90deg, rgba(242, 198, 109, 0.07), transparent 70%); }
.card .note { margin: 10px 0; color: var(--muted); font-size: 14px; }
.card .sky-note { margin: 10px 0; color: var(--teal); font-size: 15px; }
.card .moment-note { margin: 10px 0; font-size: 13px; color: var(--muted); border-left: 2px solid rgba(95, 211, 200, 0.4); padding-left: 10px; }
.card .layer-note { margin: 8px 0; font-size: 13px; color: var(--quote); }
.card .layer-box { margin: 12px 0; }
.card .olbers-btn {
  padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(242, 198, 109, 0.5); background: rgba(242, 198, 109, 0.08);
  color: var(--accent); cursor: pointer; font-size: 14px;
}
.card .olbers-btn[aria-pressed="true"] { background: rgba(242, 198, 109, 0.2); }
.card .olbers-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mark.body .ring { border-color: rgba(230, 233, 239, 0.65); box-shadow: none; animation: none; width: 22px; height: 22px; margin: -11px 0 0 -11px; }
.mark.body .name { color: var(--ink); font-weight: 500; }
.mark.ring-label .ring { display: none; }
.in-space .hud .clock-row, .in-space .hud #night, .in-space .hud #trails { display: none; }
.mark.ring-label .name { left: 4px; top: 2px; color: var(--teal); font-size: 11px; font-weight: 500; opacity: 0.8; }
.mark.sky-mark .ring { border-color: var(--teal); animation: none; }
.mark.sky-mark .name { color: var(--teal); }
.mark.sky-mark.prediction .ring, .mark.sky-mark.computed .ring { border-style: dashed; border-color: var(--accent); }
.mark.sky-mark.prediction .name, .mark.sky-mark.computed .name { color: var(--accent); top: 6px; }
.card h3 { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 20px 0 6px; }
.card blockquote { margin: 10px 0; padding: 2px 0 2px 14px; border-left: 2px solid var(--line); color: var(--quote); font-style: italic; }
.card .cite { display: block; font-style: normal; font-size: 13px; color: var(--muted); margin-top: 4px; }
/* The measuring tools: grid labels and the hand ruler on the sky, the tools box and the eyepiece in the card */
.grid-label { position: absolute; left: 0; top: 0; margin: 3px 0 0 4px; font-size: 11px; white-space: nowrap; color: rgba(140, 170, 255, 0.9); text-shadow: 0 1px 4px #000; }
.grid-label.ra { color: rgba(250, 200, 120, 0.95); }
.grid-label.alt { color: rgba(120, 214, 152, 0.95); }
.grid-label.dec { translate: calc(-100% - 8px) 0; }   /* left of its meridian, clear of the hour labels */
.ruler { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ruler line { stroke: rgba(242, 198, 109, 0.95); stroke-width: 2; }
.ruler text { fill: rgba(242, 198, 109, 0.98); font-size: 12px; font-family: inherit; paint-order: stroke; stroke: rgba(5, 7, 13, 0.85); stroke-width: 3px; }
.card .tools-box { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.tools-title { margin: 0 0 8px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.tools-box .chips.sub { margin-top: 8px; }
.limit-row { margin-top: 10px; }
.limit-row input[type="range"] { width: 100%; accent-color: var(--accent); }
.limit-marks { position: relative; height: 16px; margin: 0 8px; font-size: 11px; color: var(--muted); }
.limit-marks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.limit-legend { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.limit-row output { display: block; margin-top: 4px; font-size: 13px; }
.card .eyepiece { margin: 12px 0; }
.eyepiece canvas { display: block; margin: 0 auto 6px; border-radius: 50%; }
.credits { margin-top: 10px; }
.credits summary { cursor: pointer; color: var(--muted); }
.credits ul { margin: 8px 0 0; padding-left: 18px; }
.credits li { margin: 4px 0; }
.card .translation { display: block; font-style: normal; color: var(--ink); margin-top: 6px; }
.card .tr-label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.card .tr-by { font-size: 13px; color: var(--muted); }
.card a { color: var(--link); }
.card a.ocr { margin-left: 8px; font-size: 11px; color: var(--muted); }
.badge { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 8px; border: 1px solid var(--line); margin-left: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.foot { padding: 18px 0 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 18px; }
.foot p { margin: 0 0 8px; }

@media (prefers-reduced-motion: reduce) {
  .mark .ring, .card.arrive, .star-panel, .settings, .stories { animation: none; }
  .mark, .beats .dot, .hint, .cog svg { transition: none; }
}

/* The spectroscope */
.scope { margin: 16px 0 6px; padding: 12px 0 0; border-top: 1px solid var(--line); }
.scope h3 { margin-top: 0; }
.scope-caption { margin: 0 0 10px; font-size: 14px; color: var(--quote); }
.scope-canvas { display: block; width: 100%; border-radius: 8px; background: #05070d; touch-action: pan-y; cursor: grab; }
.scope-canvas:active { cursor: grabbing; }
.scope-tip { margin: 6px 0 0; font-size: 12px; color: var(--muted); min-height: 1.4em; }
.scope-controls { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.scope-slider { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.scope-slider input { width: 100%; accent-color: var(--accent); }
.scope-slider output { color: var(--ink); font-variant-numeric: tabular-nums; min-width: 10.5em; text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04);
  font-size: 13px; cursor: pointer; color: var(--muted);
}
.chips button[aria-pressed="true"] { color: var(--teal); border-color: var(--teal); background: rgba(95, 211, 200, 0.08); }
.chips.elements button[aria-pressed="true"] { color: var(--el); border-color: var(--el); background: transparent; }
.chips button:focus-visible, .scope-slider input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.scope-sources { margin-top: 10px; font-size: 12px; color: var(--muted); }
.scope-sources summary { cursor: pointer; }
.scope-notes { margin: 6px 0 0; font-size: 11px; line-height: 1.45; color: var(--muted); }
@media (max-width: 560px) {
  .scope-slider { grid-template-columns: 1fr auto; }
  .scope-slider input { grid-column: 1 / -1; grid-row: 2; }
  .scope-slider output { min-width: 0; }
}
