/* ================================================================
   TOKENS CONSORTIUM // ORBITAL
   ================================================================ */

/* --- Design tokens: NIGHTSIDE (default) ------------------------------ */
:root,
[data-theme="nightside"] {
  --bg-0: #050816;
  --bg-1: #0a1124;
  --bg-2: #0d1428;
  --bg-3: #131c38;
  --bg-glow: rgba(110, 195, 255, 0.04);

  --ink-1: #e8eef5;
  --ink-2: #8a96b0;
  --ink-3: #5a6478;
  --ink-4: #3a4358;

  --acc-1: #6ec3ff;
  --acc-1-soft: rgba(110, 195, 255, 0.18);
  --acc-1-faint: rgba(110, 195, 255, 0.08);
  --acc-2: #4a9eff;
  --acc-amber: #f59e0b;
  --acc-green: #4ade80;
  --acc-red: #ef4444;

  --line: #1a2340;
  --line-strong: #2a3a60;
  --line-glow: rgba(110, 195, 255, 0.25);

  --glow-cyan: 0 0 6px rgba(110, 195, 255, 0.65), 0 0 14px rgba(110, 195, 255, 0.18);
  --glow-green: 0 0 6px rgba(74, 222, 128, 0.6), 0 0 12px rgba(74, 222, 128, 0.15);
  --glow-amber: 0 0 6px rgba(245, 158, 11, 0.6), 0 0 12px rgba(245, 158, 11, 0.15);
  --glow-red: 0 0 6px rgba(239, 68, 68, 0.6), 0 0 12px rgba(239, 68, 68, 0.15);

  --serif: 'Crimson Pro', 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono:  'JetBrains Mono', 'SF Mono', Consolas, 'Courier New', monospace;

  --col: 760px;
  --col-wide: 820px;
  --radius: 4px;
  --radius-lg: 6px;
  --tap: 44px;

  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 6px 18px rgba(0, 0, 0, 0.45);
  --shadow-lift: 0 2px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 28px rgba(0, 0, 0, 0.55);

  --star: rgba(232, 238, 245, 0.35);
}

/* --- Design tokens: DAYLIGHT (light mode) --------------------------- */
[data-theme="daylight"] {
  --bg-0: #e6edf6;
  --bg-1: #f0f4fa;
  --bg-2: #ffffff;
  --bg-3: #f5f8fc;
  --bg-glow: rgba(0, 102, 204, 0.04);

  --ink-1: #0a1428;
  --ink-2: #4a5772;
  --ink-3: #7a8699;
  --ink-4: #aab3c2;

  --acc-1: #0066cc;
  --acc-1-soft: rgba(0, 102, 204, 0.16);
  --acc-1-faint: rgba(0, 102, 204, 0.08);
  --acc-2: #1a4d99;
  --acc-amber: #b45309;
  --acc-green: #15803d;
  --acc-red: #b91c1c;

  --line: #d4dce8;
  --line-strong: #b8c4d6;
  --line-glow: rgba(0, 102, 204, 0.25);

  --glow-cyan: 0 0 0 rgba(0,0,0,0);
  --glow-green: 0 0 0 rgba(0,0,0,0);
  --glow-amber: 0 0 0 rgba(0,0,0,0);
  --glow-red: 0 0 0 rgba(0,0,0,0);

  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 1px 3px rgba(10, 20, 40, 0.06), 0 6px 18px rgba(10, 20, 40, 0.05);
  --shadow-lift: 0 2px 0 rgba(255, 255, 255, 0.7) inset, 0 2px 4px rgba(10, 20, 40, 0.08), 0 12px 28px rgba(10, 20, 40, 0.1);

  --star: rgba(10, 20, 40, 0.18);
}

/* --- Reset & base --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg-1);
  color: var(--ink-1);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.75;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 350ms ease, color 350ms ease;
  background-image:
    radial-gradient(1px 1px at 23px 47px, var(--star), transparent 50%),
    radial-gradient(1px 1px at 89px 113px, var(--star), transparent 50%),
    radial-gradient(1px 1px at 167px 23px, var(--star), transparent 50%),
    radial-gradient(1px 1px at 41px 197px, var(--star), transparent 50%),
    radial-gradient(1px 1px at 211px 89px, var(--star), transparent 50%),
    radial-gradient(1px 1px at 263px 161px, var(--star), transparent 50%),
    radial-gradient(1px 1px at 311px 233px, var(--star), transparent 50%),
    radial-gradient(1px 1px at 137px 269px, var(--star), transparent 50%),
    radial-gradient(1px 1px at 17px 311px, var(--star), transparent 50%),
    radial-gradient(1px 1px at 197px 341px, var(--star), transparent 50%),
    radial-gradient(1px 1px at 271px 27px, var(--star), transparent 50%),
    radial-gradient(1px 1px at 67px 143px, var(--star), transparent 50%);
  background-size: 320px 380px;
  background-repeat: repeat;
  background-attachment: fixed;
}
[data-theme="daylight"] body { background-image: none; }

/* --- A11y helpers --------------------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
button, [role="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  font-family: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--acc-1);
  outline-offset: 2px;
}

/* --- Layout shell --------------------------------------------------- */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page {
  flex: 1;
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: 28px 22px 96px;
}
@media (min-width: 1025px) {
  .page { max-width: var(--col-wide); padding: 36px 28px 120px; }
}

/* --- Top bar -------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-0);
  border-bottom: 1px solid var(--line);
  transition: background-color 350ms ease, border-color 350ms ease;
}
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, var(--acc-1-faint), transparent 30%, transparent 70%, var(--acc-1-faint));
  pointer-events: none;
  opacity: 0.6;
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  position: relative;
}
@media (max-width: 720px) {
  .topbar-inner {
    grid-template-columns: 1fr;
    padding: 10px 14px 8px;
    gap: 8px;
  }
}
@media (min-width: 1025px) {
  .topbar-inner { padding: 14px 28px; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  width: 26px; height: 26px;
  position: relative;
  flex-shrink: 0;
}
.brand-mark::before,
.brand-mark::after,
.brand-mark > span {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--acc-1);
}
.brand-mark::before { content: ""; inset: 0; opacity: 0.6; }
.brand-mark::after  { content: ""; inset: 5px; opacity: 0.8; }
.brand-mark > span  { display: block; inset: 10px; background: var(--acc-1); box-shadow: var(--glow-cyan); }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-1);
}
.brand-name .acc { color: var(--acc-1); }
.brand-sub {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-top: 2px;
}
@media (max-width: 480px) {
  .brand-name { font-size: 11px; }
  .brand-sub  { display: none; }
}

/* ================================================================
   DAY NAV — IMPROVED (UX FIX #1)
   - Date format with weekday for context
   - Horizontal scroll with snap
   - Larger tap targets (>= 44px)
   - Active day auto-scrolled into view (via JS)
   - Visual fade at edges
   - Today pill
   - Day count display
   ================================================================ */
.day-nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 24px, black calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, black 24px, black calc(100% - 24px), transparent 100%);
}
@media (min-width: 721px) {
  .day-nav {
    padding: 0 8px;
  }
}
.day-nav-track {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 24px;
  padding: 4px 24px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.day-nav-track::-webkit-scrollbar { display: none; }

.day-chip {
  flex-shrink: 0;
  min-height: 48px;
  min-width: 78px;
  padding: 6px 10px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: var(--mono);
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  scroll-snap-align: center;
  transition: color 200ms ease, background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  text-decoration: none;
  position: relative;
}
.day-chip:hover {
  color: var(--ink-1);
  border-color: var(--acc-1);
  background: var(--acc-1-faint);
}
.day-chip:focus-visible {
  outline: 2px solid var(--acc-1);
  outline-offset: 2px;
}
.day-chip .chip-day {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1;
}
.day-chip .chip-date {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.1;
}
.day-chip .chip-weekday {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
  line-height: 1.1;
}
.day-chip .chip-today {
  position: absolute;
  top: -8px;
  right: -6px;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--bg-0);
  background: var(--acc-1);
  padding: 2px 5px 1px;
  border-radius: 2px;
  line-height: 1;
  box-shadow: var(--glow-cyan);
}
[data-theme="daylight"] .day-chip .chip-today { color: #fff; }

.day-chip.active {
  color: var(--bg-0);
  background: var(--acc-1);
  border-color: var(--acc-1);
  box-shadow: var(--glow-cyan);
}
[data-theme="daylight"] .day-chip.active { color: #fff; }
.day-chip.active .chip-day,
.day-chip.active .chip-date,
.day-chip.active .chip-weekday { color: inherit; opacity: 1; }
.day-chip.active .chip-weekday { opacity: 0.85; }
.day-chip.is-today:not(.active) {
  border-color: var(--acc-1);
  color: var(--ink-1);
}
@media (max-width: 480px) {
  .day-chip { min-width: 70px; min-height: 50px; padding: 6px 8px; }
  .day-chip .chip-day { font-size: 11px; }
  .day-chip .chip-date { font-size: 10px; }
}

.day-nav-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.day-count { color: var(--ink-3); }
.archive-link {
  color: var(--acc-1);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px dashed transparent;
  transition: border-color 200ms ease;
}
.archive-link:hover { border-bottom-color: var(--acc-1); }
@media (max-width: 720px) {
  .day-nav-meta { padding: 0 16px; }
}

/* --- Top controls (theme + listen) --- */
.top-ctrls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  justify-self: end;
}
@media (max-width: 720px) {
  .top-ctrls { justify-self: end; padding-right: 4px; }
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  white-space: nowrap;
}
.icon-btn:hover {
  color: var(--ink-1);
  border-color: var(--acc-1);
  background: var(--acc-1-faint);
}
.icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.icon-btn .icon { font-size: 12px; line-height: 1; }
.icon-btn.listen-all.active {
  color: var(--bg-0);
  background: var(--acc-1);
  border-color: var(--acc-1);
  box-shadow: var(--glow-cyan);
}
[data-theme="daylight"] .icon-btn.listen-all.active { color: #fff; }
@media (max-width: 640px) {
  .icon-btn .lbl { display: none; }
  .icon-btn { min-width: 44px; padding: 0 10px; }
}

/* --- Section: header / kicker --- */
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--acc-1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kicker-meta { color: var(--ink-3); font-weight: 400; }
.kicker .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--acc-1);
  box-shadow: var(--glow-cyan);
}
.kicker .bar {
  display: inline-block;
  width: 18px; height: 1px;
  background: var(--acc-1);
  opacity: 0.5;
}

.h-display {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink-1);
}
.h-day { font-size: 38px; margin-top: 6px; }
@media (min-width: 1025px) { .h-day { font-size: 44px; } }
.h-event { font-size: 22px; font-weight: 600; line-height: 1.25; color: var(--ink-1); margin: 0; }

.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.date {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.callsign {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--acc-1);
  margin-top: 22px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.label::before {
  content: "";
  width: 12px; height: 1px;
  background: var(--acc-1);
  opacity: 0.6;
}

/* --- Mission briefing (intro) --- */
.briefing {
  margin-top: 24px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: background-color 350ms ease, border-color 350ms ease;
}
.briefing .stripe {
  height: 3px;
  background: linear-gradient(to right, var(--acc-1), var(--acc-2));
  box-shadow: 0 0 12px var(--acc-1-soft);
}
.briefing .inner { padding: 26px 22px 22px; }
@media (min-width: 1025px) { .briefing .inner { padding: 32px 28px 26px; } }

.briefing .recap {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-2);
  border-left: 2px solid var(--line-strong);
  padding-left: 14px;
}
@media (min-width: 1025px) { .briefing .recap { font-size: 19px; } }

.briefing .overview {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.75;
  color: var(--ink-1);
}
@media (min-width: 1025px) { .briefing .overview { font-size: 21px; } }
.briefing .overview p { margin-bottom: 14px; }
.briefing .overview p:last-child { margin-bottom: 0; }

/* --- Paper cards (UX FIX #4: 1, 2, or 3 papers) --- */
.papers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 720px) {
  .papers-2 { grid-template-columns: 1fr 1fr; }
  .papers-3 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1025px) {
  .papers-3 { grid-template-columns: 1fr 1fr 1fr; }
}
.paper-card {
  border: 1px solid var(--line);
  background: var(--bg-3);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  transition: background-color 200ms ease, border-color 200ms ease, transform 200ms ease;
  display: flex;
  flex-direction: column;
}
.paper-card:hover {
  border-color: var(--acc-1);
  transform: translateY(-1px);
}
.paper-id {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--acc-1);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.paper-id-tag {
  background: var(--acc-1-faint);
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 9.5px;
  letter-spacing: 0.18em;
}
.paper-id-num { font-variant-numeric: tabular-nums; }
.paper-title {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-1);
  line-height: 1.4;
  margin-top: 2px;
}
.paper-byline {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.4;
}
.paper-authors { font-weight: 500; }
.paper-venue { opacity: 0.75; }
.paper-why {
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-1);
  margin-top: 10px;
  flex: 1;
}
.paper-link {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acc-1);
  text-decoration: none;
  margin-top: 10px;
  display: inline-block;
  align-self: flex-start;
  border-bottom: 1px dashed var(--acc-1);
  padding-bottom: 1px;
}
.paper-link:hover { border-bottom-style: solid; }

.listen-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.listen-row .hint {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* --- Transmissions (events) --- */
.section-head {
  margin-top: 56px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-head .line { flex: 1; height: 1px; background: var(--line); }
.section-head .label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--acc-1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  margin: 0;
}
.section-head .label::before { display: none; }
.section-head .label .beacon {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--acc-1);
  box-shadow: var(--glow-cyan);
  position: relative;
}
.section-head .label .beacon::after {
  content: "";
  position: absolute; inset: -2px;
  border-radius: 50%;
  border: 1px solid var(--acc-1);
  opacity: 0.4;
  animation: ring 2.4s ease-out infinite;
}
@keyframes ring {
  0%   { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(2);   opacity: 0; }
}

.events-list { display: flex; flex-direction: column; }

/* Event card */
.event {
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
  overflow: hidden;
  transition: background-color 350ms ease, border-color 350ms ease, transform 200ms ease, box-shadow 200ms ease;
  box-shadow: var(--shadow-card);
}
.event:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.event-head {
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
@media (min-width: 1025px) {
  .event-head { padding: 18px 22px 16px; }
}
.event.open .event-head { border-bottom-color: var(--line); }
.event-row1 {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.event-time {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--acc-1);
  text-shadow: 0 0 12px var(--acc-1-soft);
  line-height: 1;
}
@media (min-width: 1025px) { .event-time { font-size: 26px; } }
.event-loc {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--line-strong);
  padding: 3px 8px;
  border-radius: 2px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.event-title { flex: 1; min-width: 0; }

.event-row2 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.participants {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--bg-0);
  background: var(--char-color, var(--ink-3));
  position: relative;
  box-shadow: 0 0 0 1px var(--bg-2) inset, 0 0 0 1px var(--line-strong);
  flex-shrink: 0;
}
[data-theme="daylight"] .avatar { color: #fff; }

.event-summary {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  flex: 1;
  min-width: 200px;
}
@media (min-width: 1025px) { .event-summary { font-size: 18px; } }

.event-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.event-toggle {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  padding: 8px 12px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.event-toggle:hover {
  color: var(--ink-1);
  border-color: var(--acc-1);
  background: var(--acc-1-faint);
}
.event-toggle .chev { transition: transform 250ms ease; display: inline-block; }
.event.open .event-toggle .chev { transform: rotate(180deg); }

/* Transcript (collapsible) */
.event-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 320ms ease;
}
.event.open .event-body { max-height: 20000px; }
.transcript { padding: 8px 18px 20px; }
@media (min-width: 1025px) { .transcript { padding: 8px 22px 24px; } }

.line {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  position: relative;
  transition: background-color 250ms ease;
  border-radius: 3px;
}
.line:last-child { border-bottom: 0; }
.line.reading {
  background: var(--acc-1-faint);
  box-shadow: inset 3px 0 0 0 var(--acc-1);
  padding-left: 9px;
  padding-right: 9px;
}
@media (max-width: 640px) {
  .line { grid-template-columns: 30px 1fr; gap: 10px; }
}
.line-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--bg-0);
  background: var(--char-color, var(--ink-3));
  box-shadow: 0 0 0 1px var(--bg-2) inset, 0 0 0 1px var(--line-strong);
  margin-top: 2px;
}
[data-theme="daylight"] .line-avatar { color: #fff; }

.line-body { min-width: 0; }
.line-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.line-name {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--char-color, var(--ink-1));
}
.line-cs {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.line-type {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: auto;
}
.line-type::before { content: "→ "; opacity: 0.7; }
.line-text {
  font-family: var(--serif);
  font-size: 18.5px;
  line-height: 1.7;
  color: var(--ink-1);
}
@media (min-width: 1025px) { .line-text { font-size: 19px; } }
.line-text em {
  font-style: italic;
  color: var(--char-color, var(--acc-1));
  font-weight: 500;
}

.event-listen {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  padding: 8px 12px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.event-listen:hover {
  color: var(--ink-1);
  border-color: var(--acc-1);
  background: var(--acc-1-faint);
}
.event-listen.active {
  color: var(--bg-0);
  background: var(--acc-1);
  border-color: var(--acc-1);
  box-shadow: var(--glow-cyan);
}
[data-theme="daylight"] .event-listen.active { color: #fff; }
.event-listen-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  margin-top: 4px;
}

/* --- End-of-mission report (summary) --- */
.summary {
  margin-top: 56px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: background-color 350ms ease, border-color 350ms ease;
}
.summary .stripe {
  height: 3px;
  background: linear-gradient(to right, var(--acc-2), var(--acc-1));
  box-shadow: 0 0 12px var(--acc-1-soft);
}
.summary .inner { padding: 26px 22px 22px; }
@media (min-width: 1025px) { .summary .inner { padding: 32px 28px 26px; } }
.summary h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 6px;
  color: var(--ink-1);
}
@media (min-width: 1025px) { .summary h2 { font-size: 32px; } }
.summary ul { list-style: none; padding: 0; }
.summary li {
  font-family: var(--serif);
  font-size: 18.5px;
  line-height: 1.7;
  color: var(--ink-1);
  padding: 8px 0 8px 18px;
  position: relative;
  border-bottom: 1px dashed var(--line);
}
.summary li:last-child { border-bottom: 0; }
.summary li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 10px;
  font-size: 8px;
  color: var(--acc-1);
}
.summary .open-q li::before {
  content: "?";
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  top: 8px;
}
.summary .tease {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-2);
  border-left: 2px solid var(--line-strong);
  padding-left: 14px;
}

/* --- Archive page --- */
.archive-page {
  margin-top: 24px;
}
.archive-head {
  margin-bottom: 36px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-card);
}
.archive-blurb {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-2);
  margin-top: 14px;
  max-width: 60ch;
}
.archive-by-year {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.archive-year-h {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--acc-1);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.archive-year-count {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.18em;
  font-weight: 400;
}
.archive-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.archive-row {
  display: grid;
  grid-template-columns: auto auto auto 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 14px 8px;
  border-bottom: 1px dashed var(--line);
  text-decoration: none;
  color: inherit;
  transition: background-color 200ms ease, color 200ms ease;
  border-radius: 3px;
}
.archive-row:hover {
  background: var(--acc-1-faint);
  color: var(--acc-1);
}
.archive-day-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--acc-1);
}
.archive-date {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--ink-2);
}
.archive-weekday {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.archive-title {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink-1);
}
@media (max-width: 640px) {
  .archive-row { grid-template-columns: 1fr; gap: 4px; }
  .archive-day-num, .archive-date, .archive-weekday { display: inline; margin-right: 8px; }
}

/* --- Empty state --- */
.day-empty .inner { padding: 60px 22px; text-align: center; }
.day-empty .recap { border-left: 0; padding-left: 0; text-align: center; max-width: 50ch; margin: 0 auto; }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-0);
  padding: 28px 22px;
  margin-top: 60px;
}
.footer-inner {
  max-width: var(--col-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}
.footer-cell { display: flex; flex-direction: column; gap: 4px; }
.footer-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--acc-1);
}
.footer-val {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}
.footer-note { color: var(--ink-3); font-size: 14px; line-height: 1.55; }

/* ================================================================
   READ-ALOUD PAUSE/RESUME DIALOG (UX FIX #2)
   - Inline banner, not a heavy modal
   - Two buttons: Resume, Start Over
   - Positioned below the top bar
   - Smooth slide-in
   ================================================================ */
.pause-dialog {
  position: fixed;
  top: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  z-index: 70;
  background: var(--bg-2);
  border: 1px solid var(--acc-1);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 0 4px var(--acc-1-faint);
  padding: 14px 18px;
  max-width: calc(100vw - 32px);
  width: 480px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}
@media (max-width: 720px) {
  .pause-dialog { top: 156px; width: calc(100vw - 24px); }
}
.pause-dialog.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.pause-dialog-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.pause-dialog-icon {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--acc-1);
  color: var(--bg-0);
  border-radius: 50%;
  font-size: 12px;
  box-shadow: var(--glow-cyan);
  flex-shrink: 0;
}
[data-theme="daylight"] .pause-dialog-icon { color: #fff; }
.pause-dialog-text {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--serif);
  color: var(--ink-1);
}
.pause-dialog-text strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.pause-dialog-text span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pause-dialog-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.pause-btn {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  min-height: 44px;
  transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.pause-btn.resume {
  color: var(--bg-0);
  background: var(--acc-1);
  border-color: var(--acc-1);
  box-shadow: var(--glow-cyan);
}
[data-theme="daylight"] .pause-btn.resume { color: #fff; }
.pause-btn.resume:hover { filter: brightness(1.1); }
.pause-btn.restart:hover {
  color: var(--ink-1);
  border-color: var(--acc-1);
  background: var(--acc-1-faint);
}

/* --- Floating read banner --- */
.read-banner {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-2);
  border: 1px solid var(--acc-1);
  color: var(--ink-1);
  padding: 10px 16px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease, transform 250ms ease;
  z-index: 60;
}
.read-banner.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.read-banner .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--acc-1);
  box-shadow: var(--glow-cyan);
  animation: pulse 1.4s ease-in-out infinite;
}
.read-banner button {
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--acc-1);
  border-left: 1px solid var(--line);
  padding-left: 10px;
  margin-left: 4px;
  cursor: pointer;
}
.read-banner button:hover { color: var(--ink-1); }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.85); }
}

/* --- Scrollbars & selection --- */
.day-nav-track::-webkit-scrollbar { height: 0; }
::selection { background: var(--acc-1-soft); color: var(--ink-1); }

/* --- Reduce motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .section-head .label .beacon::after { animation: none; }
}

/* --- Small mobile tweaks --- */
@media (max-width: 480px) {
  body { font-size: 18px; }
  .page { padding: 20px 16px 80px; }
  .topbar-inner { padding: 10px 14px 8px; gap: 8px; }
  .h-day { font-size: 32px; }
  .h-event { font-size: 20px; }
  .briefing .inner { padding: 22px 16px 18px; }
  .summary .inner { padding: 22px 16px 18px; }
  .event-head { padding: 14px 14px 12px; }
  .transcript { padding: 4px 14px 18px; }
  .line { grid-template-columns: 28px 1fr; gap: 10px; }
  .line-avatar { width: 28px; height: 28px; font-size: 10px; }
  .line-text { font-size: 17px; }
  .event-time { font-size: 19px; }
  .briefing .overview { font-size: 18px; }
  .paper-card { padding: 12px 12px 10px; }
  .paper-why { font-size: 15px; }
  .event-listen, .event-toggle { padding: 8px 10px; }
  .archive-head { padding: 22px 16px; }
}
