/* Sky Tonight. A night observatory of its own: deep sky, engraved brass hairlines, chart-plate frames.
   Dark by nature. Night vision turns everything red so eyes stay used to the dark.
   Copyright (C) 2026 B7 Collective LLC. All rights reserved. */
@font-face { font-family: "Literata"; src: url("/assets/fonts/literata-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/assets/fonts/literata-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/assets/fonts/literata-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --deep: #05070D; --night: #070A12; --plate: #0C1222; --plate-2: #111A2F; --well: #0A0F1D;
  --ink: #ECE6D8; --ink-2: #C9CAD0; --mute: #9EA6B6; --faint: #868FA1;
  --brass: #C9A867; --brass-2: #E3C88E; --rule: rgba(201, 168, 103, .28); --rule-2: rgba(201, 168, 103, .14);
  --amber: #F2B544; --amber-ink: #1A1206; --spot: #9FD8B8;
  --focus: #F7D58A;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bar: 64px; --gap: clamp(14px, 3vw, 28px);
  color-scheme: dark;
}
/* Night vision: red light only, dimmer, so pupils stay wide open outside */
[data-red] {
  --deep: #000; --night: #050000; --plate: #0E0202; --plate-2: #160404; --well: #090101;
  --ink: #FF2000; --ink-2: #FF1800; --mute: #F81200; --faint: #F81200;
  --brass: #F81200; --brass-2: #FF2000; --rule: rgba(255, 24, 0, .36); --rule-2: rgba(255, 24, 0, .18);
  --amber: #FF1800; --amber-ink: #050000; --spot: #FF2000; --focus: #FF3A20;
}
[data-red] img, [data-red] .glyph svg, [data-red] .mini svg, [data-red] .portrait svg, [data-red] .moonrow svg, [data-red] .events svg { filter: url(#red-lum); }

* { box-sizing: border-box; }
html { background: var(--deep); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 16px); }
body { margin: 0; min-height: 100dvh; background: var(--night); color: var(--ink); font: 400 17px/1.55 var(--sans); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 70% at 50% -10%, #101A33 0%, rgba(16, 26, 51, 0) 60%), var(--night); }
[data-red] body::before, body[data-red]::before { background: var(--night); }
a { color: var(--brass-2); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; margin: 0; letter-spacing: .005em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--amber); color: var(--amber-ink); padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
.noscript { max-width: 36rem; margin: 15vh auto; padding: 24px; }
.noscript h1 { font-size: 1.8rem; margin-bottom: .5rem; }

/* ------------------------------------------------------------ the top bar */
.bar { position: sticky; top: 0; z-index: 40; height: var(--bar); display: flex; align-items: center; gap: 12px;
  padding: 0 max(var(--gap), env(safe-area-inset-right)) 0 max(var(--gap), env(safe-area-inset-left));
  background: #06080F; border-bottom: 1px solid var(--rule-2); }
[data-red] .bar { background: #000; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; min-height: 44px; }
.brand b { display: block; font: 400 1.22rem/1.1 var(--serif); letter-spacing: .01em; white-space: nowrap; }
.brand small { display: block; font-size: .72rem; color: var(--mute); letter-spacing: .06em; white-space: nowrap; }
[data-red] .brand svg { filter: url(#red-lum); }
.bar-nav { display: flex; gap: 4px; margin-left: 18px; }
.bar-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); text-decoration: none; padding: 9px 13px; border-radius: 6px; font-size: .95rem; white-space: nowrap; }
.bar-nav a:hover { color: var(--ink); }
.bar-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 1px; text-underline-offset: 7px; }
.bar-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tool { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--rule); background: transparent; cursor: pointer; color: var(--ink-2); font-size: .9rem; }
.tool:hover { color: var(--ink); border-color: var(--brass); }
.red-toggle[aria-pressed="true"] { color: var(--ink); background: rgba(228, 64, 44, .16); border-color: var(--brass); }
.red-toggle svg { color: #FF1800; }
.tool span { white-space: nowrap; }
@media (min-width: 900px) and (max-width: 1239px) {
  .bar-tools .red-toggle { padding: 0; width: 44px; justify-content: center; }
  .bar-tools .red-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
.bar-base { display: flex; align-items: center; flex: none; }
.brand { flex: 1 1 auto; }
.nav-red { display: none; }
/* phones: the three places sit at the bottom, where thumbs are */
@media (max-width: 899px) {
  .bar { background: #06080F; }
  .bar-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; margin: 0; justify-content: space-around; gap: 0;
    padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)); background: #06080F; border-top: 1px solid var(--rule-2); }
  [data-red] .bar-nav { background: #000; }
  .bar-nav a { flex: 1; justify-content: center; text-align: center; padding: 10px 4px; font-size: .9rem; }
  .bar-nav { min-height: calc(64px + env(safe-area-inset-bottom)); align-items: center; }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  html { scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .bar-tools .red-toggle { display: none; }
  .nav-red { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; color: var(--ink-2); font-size: .78rem; padding: 4px; cursor: pointer; min-height: 44px; border-radius: 6px; }
  .nav-red svg { color: #FF1800; }
  .nav-red[aria-pressed="true"] { color: var(--ink); background: rgba(228, 64, 44, .16); }
}
@media (max-width: 420px) { .brand small { display: none; } .brand b { font-size: 1.1rem; } }

/* ------------------------------------------------------------ shared pieces */
.view { min-height: calc(100dvh - var(--bar)); }
.wrap { max-width: 1180px; margin: 0 auto; padding: var(--gap) max(var(--gap), env(safe-area-inset-right)) calc(var(--gap) * 2) max(var(--gap), env(safe-area-inset-left)); }
/* a margin note in an observer's almanac: italic serif, sentence case */
.kicker { font: italic 400 1.02rem/1.3 var(--serif); color: var(--brass-2); }
.lede { color: var(--ink-2); max-width: 40rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 20px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--rule); background: transparent; color: var(--ink); font-size: 1rem; text-decoration: none; }
.btn:hover { border-color: var(--brass); background: rgba(201, 168, 103, .07); }
.btn.amber { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); font-weight: 700; }
.btn.amber:hover { background: #F7C766; }
[data-red] .btn.amber:hover { background: #F25A44; }
.btn svg { flex: none; }
.btn.small { min-height: 44px; padding: 0 16px; font-size: .92rem; }
.textbtn { border: 0; background: none; padding: 10px 4px; color: var(--brass-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
.textbtn:hover { color: var(--ink); }
.btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* no boxes: sections sit on the page and are set apart by space and type */
.plate { position: relative; }
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; max-width: min(92vw, 30rem);
  display: flex; gap: 14px; align-items: center; padding: 10px 10px 10px 18px; border-radius: 6px; background: #141B2C; color: var(--ink); border: 1px solid var(--rule); }
[data-red] .toast { background: #1A0503; }
@media (min-width: 900px) { .toast { bottom: 28px; width: max-content; max-width: 30rem; } }
@media (max-width: 899px) { .toast { left: 12px; right: 12px; transform: none; max-width: none; bottom: calc(64px + 8px + env(safe-area-inset-bottom)); } }
@media (max-height: 520px) and (orientation: landscape) { .toast { bottom: 12px; } }
.toast span { flex: 1 1 auto; min-width: 0; }
.toast button { flex: none; }
.toast-x { width: 44px; height: 44px; border-radius: 6px; border: 1px solid var(--rule); background: transparent; color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
/* a first find: the observer's tick writes itself in, once (still with reduced motion) */
.spot-btn.celebrate svg path { stroke-dasharray: 22; animation: tick .9s ease-out 1 both; }
@keyframes tick { from { stroke-dashoffset: 22; } to { stroke-dashoffset: 0; } }
.dirline { color: var(--ink-2); font-size: .9rem; }

/* ------------------------------------------------------------ welcome and choosing a place */
.welcome-sky { position: fixed; inset: var(--bar) 0 0 0; z-index: 0; pointer-events: none; }
.welcome-sky canvas { width: 100%; height: 100%; display: block; }
.welcome-sky::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 7, 13, .82) 0%, rgba(5, 7, 13, .62) 55%, rgba(5, 7, 13, .1) 100%); }
@media (max-width: 719px) { .welcome-sky::after { background: rgba(5, 7, 13, .6); } }
.welcome { position: relative; z-index: 1; display: grid; place-items: center start; min-height: calc(100dvh - var(--bar) - 80px); padding: var(--gap); }
.welcome-in { width: min(100%, 40rem); padding: clamp(22px, 5vw, 44px); }
.welcome h1 { font-size: clamp(2rem, 6vw, 3rem); margin: 10px 0 12px; }
.welcome .lede { font-size: 1.05rem; margin-bottom: 22px; }
.welcome .btns { margin: 22px 0 10px; }
.welcome .note { color: var(--mute); font-size: .92rem; display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; }
.welcome .note svg { flex: none; margin-top: 3px; color: var(--brass); }
.welcome-in { width: min(100%, 52rem); padding-left: clamp(4px, 4vw, 48px); }
.choices { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 22px; }
@media (min-width: 720px) { .choices { grid-template-columns: 1.2fr 1fr; align-items: start; } .choices.one { grid-template-columns: 1fr; } }
.choice { min-width: 0; }
@media (min-width: 720px) { .choices { column-gap: 40px; } }
.cityform label, .choice-label { display: block; font-weight: 700; margin-bottom: 10px; font-size: 1.02rem; }
.btn.wide { width: 100%; min-height: 52px; }
.choice .note { margin-top: 12px; }
.where-bits { display: flex; flex-wrap: wrap; gap: 0 18px; align-items: center; }
.skyq { margin: 22px 0 6px; }
.skyq h2 { font-size: 1.25rem; }
.skyq > p { color: var(--ink-2); margin-top: 4px; }
.skyq-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.skyq-btn { min-height: 48px; padding: 8px 6px; border-radius: 6px; border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer; font: 400 1.05rem var(--serif); }
.skyq-btn:hover { border-color: var(--brass); }
.skyq-btn[aria-pressed="true"] { border-color: var(--amber); color: var(--amber); }
.adapt { font: italic 400 .92rem var(--serif); color: var(--ink-2); margin-top: 4px; text-shadow: 0 0 6px #000, 0 0 2px #000; }
.sky-top .left { display: flex; flex-direction: column; align-items: flex-start; }
.moonrow { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 4px; list-style: none; padding: 0; }
.moonrow li { text-align: center; width: 64px; font-size: .74rem; color: var(--ink-2); }
.moonrow .m { display: block; width: 52px; height: 52px; margin: 0 auto 4px; border-radius: 50%; overflow: hidden; border: 1px solid var(--rule-2); opacity: .32; }
.moonrow .got .m { opacity: 1; border-color: var(--spot); }
.moonrow svg { width: 100%; height: 100%; display: block; }
.field { width: 100%; min-height: 52px; padding: 0 16px; border-radius: 6px; border: 1px solid var(--rule); background: var(--well); color: var(--ink); font: 400 1.05rem var(--sans); }
.field::placeholder { color: var(--faint); }
.field:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.cities { list-style: none; margin: 10px 0 0; padding: 0; border-radius: 6px; overflow: hidden; border: 1px solid var(--rule-2); }
.cities:empty { display: none; }
.cities button { display: flex; width: 100%; justify-content: space-between; gap: 12px; align-items: baseline; text-align: left; min-height: 50px; padding: 10px 16px;
  border: 0; border-bottom: 1px solid var(--rule-2); background: rgba(17, 26, 47, .5); cursor: pointer; color: var(--ink); }
.cities li:last-child button { border-bottom: 0; }
.cities button:hover { background: rgba(201, 168, 103, .1); }
.cities small { color: var(--mute); font-size: .85rem; }
.msg { margin-top: 12px; color: var(--ink-2); }
.msg.err { color: #F3B9A6; }
[data-red] .msg.err { color: var(--ink); }

/* ------------------------------------------------------------ tonight: the sky and the list */
.tonight { display: grid; grid-template-columns: 1fr; }
.tonight.with-story .list { display: none; }
.sky { position: relative; height: clamp(300px, 50dvh, 520px); background: var(--deep); overflow: hidden; border-bottom: 1px solid var(--rule-2); touch-action: pan-y; }
.sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.sky canvas:active { cursor: grabbing; }
.sky canvas:focus-visible { outline: 3px solid var(--focus); outline-offset: -4px; border-radius: 0; }
.sky-top { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px max(14px, env(safe-area-inset-left)); pointer-events: none; }
.sky-top > * { pointer-events: auto; }
.facing { font: italic 400 1.1rem var(--serif); color: var(--brass-2); padding: 8px 0; text-shadow: 0 0 8px #000, 0 0 2px #000; }
.turns { display: flex; gap: 6px; }
.turn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule); background: rgba(5, 7, 13, .62); cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.turn:hover { border-color: var(--brass); }
.sky-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px max(14px, env(safe-area-inset-left)) 12px; display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center;
  background: linear-gradient(0deg, rgba(3, 4, 8, .86), rgba(3, 4, 8, 0)); }
.sky-foot label { font-size: .82rem; color: var(--ink-2); white-space: nowrap; }
.sky-foot output { font: 400 1.05rem var(--serif); min-width: 5.2em; text-align: right; color: var(--ink); }
.timebar { width: 100%; min-height: 44px; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; }
.timebar::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--rule); }
.timebar::-moz-range-track { height: 6px; border-radius: 3px; background: var(--rule); }
.timebar::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--amber); border: 2px solid var(--deep); }
.timebar::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--amber); border: 2px solid var(--deep); }
.timebar:focus-visible { outline-offset: 2px; }
.now-btn { min-height: 44px; padding: 0 14px; font-size: .9rem; background: #06080F; }
.now-btn[hidden] { display: inline-flex !important; visibility: hidden; }

.list { padding: var(--gap) max(var(--gap), env(safe-area-inset-right)) calc(var(--gap) * 2) max(var(--gap), env(safe-area-inset-left)); max-width: 46rem; width: 100%; margin: 0 auto; }
.night-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.night-head h1 { font-size: clamp(1.7rem, 4.6vw, 2.3rem); margin-top: 4px; }
.place-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--brass-2); padding: 8px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; font-size: .95rem; text-align: left; }
.place-btn:hover { color: var(--ink); }
.almanac { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 4px; color: var(--ink-2); font-size: .92rem; }
.almanac span b { color: var(--ink); font-weight: 400; font-family: var(--serif); }
.weather-note { margin-top: 8px; color: var(--mute); font-size: .9rem; }

/* The three picks: a numbered path through the night, joined by a brass hairline */
.picks { list-style: none; margin: 22px 0 0; padding: 0; position: relative; }
.pick { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 12px 0 18px; }
.pick + .pick { border-top: 1px solid var(--rule-2); }
.glyph { width: 56px; height: 56px; border-radius: 50%; background: var(--deep); border: 1px solid var(--rule); display: grid; place-items: center; position: relative; z-index: 1; overflow: hidden; }
.glyph svg { width: 100%; height: 100%; display: block; }
.glyph .num { position: absolute; right: -2px; top: -2px; }
.pick-num { position: absolute; left: 40px; top: 6px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; background: var(--amber); color: var(--amber-ink); font: 700 .78rem/22px var(--sans); text-align: center; }
.pick h2 { font-size: clamp(1.35rem, 3.6vw, 1.6rem); }
.pick h2 em { font-style: italic; }
.pick .kind { font: italic 400 .98rem var(--serif); color: var(--brass-2); margin-bottom: 2px; }
.where { font-size: 1.06rem; color: var(--ink); margin-top: 6px; }
.span { color: var(--ink-2); font-size: .95rem; margin-top: 2px; }
.tip { color: var(--ink-2); font-size: .95rem; margin-top: 8px; font-style: italic; font-family: var(--serif); }
.pick-acts { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 12px; align-items: center; }
.spot-btn[aria-pressed="true"] { border-color: var(--spot); color: var(--spot); }
.spot-btn[aria-pressed="true"]::after { content: ""; }
.spot-btn[aria-pressed="true"] svg { color: var(--spot); }
.spotted-note { font-size: .88rem; color: var(--spot); }
.pick.sel .glyph { box-shadow: 0 0 0 2px var(--amber); }
.one { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--rule-2); }
.one .pick { padding: 0; border: 0; }
.one .kicker { margin-bottom: 8px; display: block; }
.credit-line { font-size: .8rem; color: var(--mute); margin-top: 10px; }
.challenge { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--rule-2); }
.challenge .pick { padding: 0; border: 0; }
.challenge .kicker { margin-bottom: 8px; display: block; }
.section { margin-top: 32px; }
.section > h2 { font-size: 1.3rem; margin-bottom: 10px; }
.also { list-style: none; margin: 0; padding: 0; }
.also li + li { border-top: 1px solid var(--rule-2); }
.also button { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; border: 0; background: none; cursor: pointer; padding: 10px 2px; min-height: 52px; color: var(--ink); }
.also button:hover { background: rgba(201, 168, 103, .06); }
.also .mini { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; border: 1px solid var(--rule-2); background: var(--deep); }
.also .mini svg { width: 100%; height: 100%; display: block; }
.also b { font-weight: 400; font-family: var(--serif); font-size: 1.05rem; }
.also small { display: block; color: var(--ink-2); font-size: .88rem; }
.also .tick { color: var(--spot); font-size: .85rem; white-space: nowrap; }
.coming-mini { list-style: none; margin: 0; padding: 0; }
.coming-mini li { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule-2); }
.coming-mini time { color: var(--brass-2); font-family: var(--serif); }
.coming-mini span { color: var(--ink-2); }
.credits { margin-top: 36px; color: var(--mute); font-size: .84rem; }
.credits a { color: var(--ink-2); }

/* ------------------------------------------------------------ a story */
.story { padding: var(--gap) max(var(--gap), env(safe-area-inset-right)) calc(var(--gap) * 2) max(var(--gap), env(safe-area-inset-left)); max-width: 44rem; margin: 0 auto; }
.story .back { margin-bottom: 8px; }
.story-head { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: end; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.story-head h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
.story-head .also-name { color: var(--ink-2); margin-top: 6px; font-size: .95rem; }
/* the view through an eyepiece: a dark round field */
.portrait { width: clamp(108px, 26vw, 150px); aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--rule); overflow: hidden; background: var(--deep); }
.portrait svg { width: 100%; height: 100%; display: block; }
.tonight-line { margin: 18px 0 0; }
.tonight-line p + p { margin-top: 4px; }
.tonight-line .where { margin: 0; }
.chapter { margin-top: 26px; }
.chapter h2 { font: italic 400 1.2rem var(--serif); color: var(--brass-2); margin-bottom: 6px; }
.chapter p { font: 400 1.08rem/1.7 var(--serif); color: var(--ink); max-width: 38rem; }
.chapter p + p { margin-top: 10px; }
.chapter .arabic { font-family: var(--serif); font-size: 1.25rem; direction: rtl; unicode-bidi: isolate; color: var(--brass-2); }
.sources { margin-top: 30px; font-size: .86rem; color: var(--mute); }
.sources { padding-top: 16px; border-top: 1px solid var(--rule-2); }
.sources h2 { font: italic 400 1.02rem var(--serif); color: var(--ink-2); margin-bottom: 4px; }
.sources ul { margin: 0; padding-left: 18px; }
.sources a { color: var(--ink-2); overflow-wrap: anywhere; }
.story-acts { margin-top: 20px; }
.journal-line { margin-top: 10px; color: var(--spot); font-size: .95rem; }

/* ------------------------------------------------------------ the journal and coming up */
.page-head h1 { font-size: clamp(2rem, 5.6vw, 2.7rem); margin: 6px 0 8px; }
.tally { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 18px 0 8px; }
.tally div { min-width: 7rem; }
.tally b { display: block; font: 400 2rem/1.1 var(--serif); color: var(--ink); }
.tally span { color: var(--ink-2); font-size: .9rem; }
.jgrid { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 24px; }
@media (min-width: 900px) { .jgrid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; } }
.entries { list-style: none; margin: 0; padding: 0; }
.entries > li { display: grid; grid-template-columns: 1fr; gap: 2px 18px; padding: 10px 0 12px; border-bottom: 1px solid var(--rule-2); }
@media (min-width: 560px) { .entries > li { grid-template-columns: 11rem 1fr; } }
.entries time { color: var(--brass-2); font: italic 400 1.05rem/1.35 var(--serif); padding-top: 11px; }
.entries ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 18px; }
.chipbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; color: var(--ink); cursor: pointer; text-decoration: none; font: 400 1.05rem var(--serif); }
.chipbtn:hover { color: var(--brass-2); text-decoration: underline; text-underline-offset: 4px; }
.chipbtn .mini { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: var(--deep); flex: none; }
.chipbtn .mini svg { width: 100%; height: 100%; display: block; }
.empty { padding: 20px 0 8px; }
.empty h2 { font-size: 1.4rem; margin-bottom: 6px; }
.empty p { color: var(--ink-2); }
.empty .btns { margin-top: 16px; }
.shelf { margin-top: 4px; }
.shelf h3 { font: italic 400 1.15rem var(--serif); color: var(--brass-2); margin: 22px 0 2px; padding-bottom: 4px; border-bottom: 1px solid var(--rule-2); }
.shelf ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 16px; }
.shelf .chipbtn { color: var(--ink-2); }
/* an observer's tick beside anything already found */
.chipbtn.got { color: var(--ink); }
.chipbtn.got::after { content: "\2713"; color: var(--spot); font: 700 1rem var(--sans); }
.events { list-style: none; margin: 18px 0 0; padding: 0; }
.events > li { display: grid; grid-template-columns: minmax(92px, 130px) 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--rule-2); }
.events time { font-family: var(--serif); color: var(--brass-2); font-size: 1.05rem; line-height: 1.35; }
.events time small { display: block; font-family: var(--sans); color: var(--mute); font-size: .82rem; }
.events h2 { font-size: 1.2rem; }
.events h2 a { display: inline-block; padding: 8px 0; min-height: 44px; }
.more-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; }
.sources li { padding: 4px 0; }
.sources > p { margin-bottom: 6px; }
.events p { color: var(--ink-2); margin-top: 4px; }
.events .warn { color: var(--ink); margin-top: 6px; font: italic 400 1rem/1.5 var(--serif); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.filters button[aria-pressed="true"] { border-color: var(--amber); color: var(--amber); }
.about { max-width: 44rem; }
.about h2 { font-size: 1.3rem; margin: 26px 0 8px; }
.about p, .about li { color: var(--ink-2); }
.about p + p { margin-top: 10px; }

/* ------------------------------------------------------------ bigger screens: dedicated layouts, never one stretched */
/* Tablets held upright: a taller sky, and the list in two balanced columns underneath */
@media (min-width: 700px) and (max-width: 1099px) and (orientation: portrait) {
  .sky { height: min(46dvh, 620px); }
  .list { max-width: 52rem; }
}
/* Landscape tablets, foldables opened wide, laptops and desktops: the sky stays in view beside the list */
@media (min-width: 760px) and (orientation: landscape) and (min-height: 521px), (min-width: 1100px) {
  .tonight { grid-template-columns: minmax(0, 1fr) minmax(360px, 30rem); min-height: calc(100dvh - var(--bar)); }
  .sky { position: sticky; top: var(--bar); height: calc(100dvh - var(--bar)); border-bottom: 0; border-right: 1px solid var(--rule-2); }
  .list { max-width: none; margin: 0; }
  .tonight.with-story { grid-template-columns: minmax(0, 1fr) minmax(360px, 30rem); }
  .tonight.with-story .list { display: none; }
  .tonight .story { max-width: none; margin: 0; }
}
/* Wide desktops and Googlebooks: sky, list and story side by side */
@media (min-width: 1600px) {
  .tonight.with-story { grid-template-columns: minmax(0, 1fr) minmax(340px, 26rem) minmax(380px, 32rem); }
  .tonight.with-story .list { display: block; border-right: 1px solid var(--rule-2); }
}
/* Phones held sideways: sky on the left, list on the right, both scroll on their own */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --bar: 54px; }
  .bar-nav { position: static; background: none; border: 0; padding: 0; margin-left: 10px; }
  .bar-nav a { flex: none; padding: 8px 10px; }
  body { padding-bottom: 0; }
  .brand small { display: none; }
  .tonight { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .sky { position: sticky; top: var(--bar); height: calc(100dvh - var(--bar)); border-right: 1px solid var(--rule-2); border-bottom: 0; }
  .list, .story { padding-top: 14px; }
  .tonight.with-story .list { display: none; }
  .toast { bottom: 16px; }
}
@media (max-height: 520px) and (orientation: landscape) and (max-width: 899px) {
  .bar-nav a { font-size: .85rem; }
}



@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media (prefers-contrast: more) { :root { --rule: rgba(227, 200, 142, .6); --rule-2: rgba(227, 200, 142, .35); --ink-2: #E2E3E8; --mute: #C3C9D4; } }
@media (forced-colors: active) { .plate::before, .plate::after { display: none; } .btn, .tool, .chipbtn { border: 1px solid ButtonText; } }
@media print { .bar, .sky, .toast, .pick-acts, .bar-nav { display: none !important; } body { background: #fff; color: #000; } }
@media (max-width: 400px) { .bar-nav a { font-size: .84rem; padding: 10px 2px; } .nav-red { font-size: .72rem; } }
/* Pixel Fold-style inner screens: two panes, with the three places still at the bottom, so the sky stops above them */
@media (min-width: 760px) and (max-width: 899px) and (orientation: landscape) and (min-height: 521px) {
  .sky { height: calc(100dvh - var(--bar) - 64px - env(safe-area-inset-bottom)); }
}

/* ------------------------------------------------------------ fold postures last, so no size rule above can override them */
/* Foldable in tabletop posture: the sky on the top half, the list on the bottom half */
@media (vertical-viewport-segments: 2) {
  .bar { position: sticky; }
  .tonight { display: block; }
  .sky { position: sticky; top: var(--bar); height: calc(env(viewport-segment-bottom 0 0, 50dvh) - var(--bar)); border-right: 0; }
  .tonight .list, .tonight .story { margin-top: calc(env(viewport-segment-top 0 1, 50dvh) - env(viewport-segment-bottom 0 0, 50dvh)); }
  .tonight.with-story .list { display: none; }
}
/* Foldable in book posture: sky on the left page, list on the right page */
@media (horizontal-viewport-segments: 2) {
  .tonight { grid-template-columns: env(viewport-segment-width 0 0, 50vw) 1fr; column-gap: calc(env(viewport-segment-left 1 0, 50vw) - env(viewport-segment-right 0 0, 50vw)); }
  .sky { position: sticky; top: var(--bar); height: calc(100dvh - var(--bar)); }
}
