/* Assembled — "The world, at this hour." Public publication styles. */
:root {
  --bg: #f3f1ec;
  --surface: #fbfaf7;
  --surface-2: #e9e6df;
  --ink: #121317;
  --ink-2: #555861;
  --ink-3: #8a8d95;
  --line: rgba(18, 19, 23, 0.11);
  --line-strong: rgba(18, 19, 23, 0.22);
  --accent: #ff4f2a;
  --glass: rgba(251, 250, 247, 0.78);
  --shadow: 0 1px 2px rgba(18, 19, 23, 0.04), 0 12px 32px -12px rgba(18, 19, 23, 0.18);
  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --read: "Newsreader", Georgia, serif;
  --ui: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --max: 1320px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 22px;
  --hue: #5b5bf0;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c0d10;
  --surface: #15171c;
  --surface-2: #1e2128;
  --ink: #eeebe5;
  --ink-2: #a9acb4;
  --ink-3: #72757e;
  --line: rgba(238, 235, 229, 0.1);
  --line-strong: rgba(238, 235, 229, 0.22);
  --accent: #ff6a48;
  --glass: rgba(21, 23, 28, 0.74);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0d10;
    --surface: #15171c;
    --surface-2: #1e2128;
    --ink: #eeebe5;
    --ink-2: #a9acb4;
    --ink-3: #72757e;
    --line: rgba(238, 235, 229, 0.1);
    --line-strong: rgba(238, 235, 229, 0.22);
    --accent: #ff6a48;
    --glass: rgba(21, 23, 28, 0.74);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}
/* Section colors */
.hue-world { --hue: #5b5bf0; }
.hue-guyana { --hue: #16a06c; }
.hue-united-states { --hue: #2f6bff; }
.hue-united-kingdom { --hue: #d6336c; }
.hue-china { --hue: #ef4a26; }
.hue-technology { --hue: #8b5cf6; }
.hue-business { --hue: #d99a06; }
.hue-science { --hue: #0ea5a4; }

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 110px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* Paper grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
}
button,
input {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
}
p {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 999px;
}
.skip:focus {
  top: 12px;
}
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
svg .fill {
  fill: currentColor;
  stroke: none;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hue);
  flex-shrink: 0;
}
.kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 16px 10px 18px;
  font-weight: 500;
  font-size: 14px;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.pill-link:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.pill-link.solid {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.pill-link.solid:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pill-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}
.pill-link:hover svg {
  transform: translateX(3px);
}

/* ---------- Floating header ---------- */
.bar {
  position: sticky;
  top: 12px;
  z-index: 50;
  max-width: var(--max);
  margin: 12px auto 0;
  padding: 0 var(--gutter);
}
.bar-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 8px 8px 22px;
  box-shadow: var(--shadow);
}
.bar.bare {
  display: flex;
  justify-content: center;
  padding-top: 24px;
  position: static;
}
.mark {
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.02em;
  padding-bottom: 3px;
}
.mark span,
.foot-mark span {
  color: var(--accent);
}
.sections {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 24px), transparent);
  padding: 2px 12px;
}
.sections::-webkit-scrollbar {
  display: none;
}
.sections a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.sections a:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.sections a[aria-current] {
  background: var(--ink);
  color: var(--bg);
}
.tools {
  display: flex;
  align-items: center;
  gap: 6px;
}
.find {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 0;
  transition: box-shadow 0.2s;
}
.find:focus-within {
  box-shadow: 0 0 0 2px var(--accent);
}
/* Search stays an icon until used. */
.find input {
  border: 0;
  background: transparent;
  width: 0;
  padding: 10px 0;
  font-size: 14px;
  outline: none;
  transition: width 0.25s, padding 0.25s;
}
.find:focus-within input,
.page-search .find input {
  width: 190px;
  padding-left: 16px;
}
.find input::placeholder {
  color: var(--ink-3);
}
.find button,
.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  color: var(--ink);
}
.icon-button {
  background: var(--surface-2);
}
.find button:hover,
.icon-button:hover {
  background: var(--ink);
  color: var(--bg);
}
html:not(.js) [data-theme-toggle] {
  display: none;
}

/* ---------- Front page: the world at this hour ---------- */
.hour {
  padding: clamp(40px, 7vw, 88px) 0 clamp(36px, 5vw, 64px);
}
.hour-head {
  display: grid;
  gap: 16px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.hour-head h1 {
  font-family: var(--display);
  font-size: clamp(54px, 10.5vw, 156px);
  line-height: 0.9;
  letter-spacing: -0.035em;
}
.hour-head h1 em {
  color: var(--ink-2);
}
.hour-dek {
  font-family: var(--read);
  font-size: clamp(18px, 1.7vw, 22px);
  color: var(--ink-2);
  max-width: 34ch;
}
.live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.windows {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.window {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 380px;
  border-radius: 26px;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.window:hover {
  transform: translateY(-4px);
}
.sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  transition: background 1.2s;
}
.sky .ground {
  position: absolute;
  inset: auto 0 0;
  height: 70%;
  background: linear-gradient(180deg, transparent, rgba(6, 8, 18, 0.72));
}
.sky .stars {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 32% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 58% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 76% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 88% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 38%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 46% 44%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 67% 36%, #fff 50%, transparent 51%);
}
.sky .orb {
  position: absolute;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  transition: left 1.2s, top 1.2s, background 1.2s, box-shadow 1.2s;
  animation: drift 9s ease-in-out infinite alternate;
}
@keyframes drift {
  to { translate: 0 -6px; }
}
.phase-night .sky { background: linear-gradient(180deg, #070a1f 0%, #151c46 55%, #2b2f63 100%); }
.phase-night .stars { opacity: 0.9; }
.phase-night .orb { left: 68%; top: 12%; background: #eef0fa; box-shadow: inset -14px -6px 0 0 #c9cde3, 0 0 40px rgba(220, 226, 255, 0.35); }
.phase-dawn .sky { background: linear-gradient(180deg, #2a2d6b 0%, #9a5a9b 45%, #f59e7a 78%, #ffd29a 100%); }
.phase-dawn .stars { opacity: 0.25; }
.phase-dawn .orb { left: 10%; top: 54%; background: #ffd9a0; box-shadow: 0 0 60px 18px rgba(255, 180, 120, 0.55); }
.phase-morning .sky { background: linear-gradient(180deg, #4d9df5 0%, #8cc6ff 55%, #fbe7c2 100%); }
.phase-morning .orb { left: 22%; top: 22%; background: #fff3c9; box-shadow: 0 0 70px 22px rgba(255, 236, 170, 0.7); }
.phase-midday .sky { background: linear-gradient(180deg, #1f7ff0 0%, #5fb0ff 60%, #cfe9ff 100%); }
.phase-midday .orb { left: calc(50% - 31px); top: 9%; background: #fffbe8; box-shadow: 0 0 80px 26px rgba(255, 250, 215, 0.8); }
.phase-afternoon .sky { background: linear-gradient(180deg, #3f8ee6 0%, #9dbfe3 45%, #f4c98c 85%, #ffd9a6 100%); }
.phase-afternoon .orb { left: 70%; top: 26%; background: #ffe7ab; box-shadow: 0 0 70px 22px rgba(255, 205, 130, 0.65); }
.phase-dusk .sky { background: linear-gradient(180deg, #181a47 0%, #6d3a78 40%, #d8566a 72%, #ff9a55 100%); }
.phase-dusk .stars { opacity: 0.4; }
.phase-dusk .orb { left: 76%; top: 58%; background: #ffb070; box-shadow: 0 0 60px 20px rgba(255, 130, 80, 0.55); }
.window-text {
  padding: 22px;
  display: grid;
  gap: 4px;
}
.window-place {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.window-place .country {
  opacity: 0.7;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
}
.clock {
  font-family: var(--display);
  font-size: 58px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.phase-label {
  font-size: 12px;
  text-transform: capitalize;
  opacity: 0.75;
}
.window-story {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.window-story .go {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.window:hover .go {
  background: #fff;
  color: #111;
}
.window-story .go svg {
  width: 15px;
  height: 15px;
}

/* ---------- Visuals and cards ---------- */
.visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 16 / 10;
}
.visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.visual.ink {
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--hue) 55%, #fff) 0%, transparent 55%),
    repeating-radial-gradient(circle at 0% 100%, transparent 0 26px, rgba(255, 255, 255, 0.07) 26px 27px),
    linear-gradient(160deg, var(--hue), color-mix(in srgb, var(--hue) 45%, #05060a));
  display: flex;
  align-items: flex-end;
  padding: 18px 20px;
  color: #fff;
}
.visual.ink span {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1;
  letter-spacing: -0.02em;
  opacity: 0.92;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 13px;
  color: var(--ink-3);
}
.cat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--ink);
}
.card-link {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}
.card-text {
  display: grid;
  gap: 8px;
}
.card h3 {
  font-family: var(--display);
  font-size: clamp(24px, 2vw, 29px);
  line-height: 1.05;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.card p {
  font-family: var(--read);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card:hover .visual img {
  transform: scale(1.04);
}
.card:hover h3 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

/* ---------- Lead story ---------- */
.lead {
  margin-bottom: clamp(48px, 7vw, 96px);
}
.lead-link {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.lead .visual {
  aspect-ratio: 4 / 3;
  border-radius: 30px;
}
.lead .visual.ink span {
  font-size: clamp(56px, 7vw, 110px);
}
.lead-text {
  display: grid;
  gap: 18px;
  justify-items: start;
}
.lead h2 {
  font-family: var(--display);
  font-size: clamp(42px, 5.2vw, 80px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.lead-dek {
  font-family: var(--read);
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.55;
  color: var(--ink-2);
}
.lead-link:hover .visual img {
  transform: scale(1.03);
}
.lead-link:hover .pill-link.solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- Stream (Read) and index (Scan) ---------- */
.modebar,
.rail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line-strong);
}
.modebar h2,
.rail-head h2 {
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 14px;
}
.rail-head h2 .dot {
  width: 12px;
  height: 12px;
}
.mode-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
}
.mode-switch button {
  border: 0;
  background: transparent;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-2);
}
.mode-switch button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
html:not(.js) .mode-switch {
  display: none;
}
.stream {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 40px) clamp(18px, 2vw, 28px);
  grid-auto-flow: dense;
}
.stream .card {
  grid-column: span 2;
}
.stream .card:nth-child(6n + 1) {
  grid-column: span 4;
  grid-row: span 2;
}
.stream .card:nth-child(6n + 1) .visual {
  aspect-ratio: auto;
  flex: 1;
  min-height: 300px;
}
.stream .card:nth-child(6n + 1) h3 {
  font-size: clamp(32px, 3.4vw, 50px);
}
.stream .card:nth-child(6n + 1) p {
  font-size: 18px;
  -webkit-line-clamp: 2;
}
/* Fill the final row whatever the story count: a lone last card goes wide. */
.stream .card:nth-child(6n + 2):last-child {
  grid-row: span 2;
}
.stream .card:nth-child(6n + 2):last-child .visual {
  aspect-ratio: auto;
  flex: 1;
}
.stream .card:nth-child(6n + 1):last-child,
.stream .card:nth-child(6n + 4):last-child {
  grid-column: 1 / -1;
  grid-row: auto;
}
.stream .card:nth-child(6n + 5):last-child {
  grid-column: span 4;
}
.stream .card:nth-child(6n + 1):last-child .card-link,
.stream .card:nth-child(6n + 4):last-child .card-link,
.stream .card:nth-child(6n + 5):last-child .card-link {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.stream .card:nth-child(6n + 1):last-child .visual,
.stream .card:nth-child(6n + 4):last-child .visual,
.stream .card:nth-child(6n + 5):last-child .visual {
  aspect-ratio: 16 / 10;
  min-height: 0;
}
.views .scan-list {
  display: none;
}
[data-view="scan"] .views .scan-list {
  display: block;
}
[data-view="scan"] .views .stream {
  display: none;
}
.scan-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: scan;
}
.scan-list li a {
  display: grid;
  grid-template-columns: 90px 170px minmax(0, 1fr) 64px;
  gap: 18px;
  align-items: baseline;
  padding: 18px 12px;
  border-bottom: 1px solid var(--line);
  border-radius: 12px;
  transition: background 0.15s;
}
.scan-list li a:hover {
  background: var(--surface);
}
.scan-time,
.scan-read {
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.scan-read {
  text-align: right;
}
.scan-list .cat {
  font-size: 13px;
}
.scan-title {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.scan-title small {
  display: block;
  margin-top: 6px;
  font-family: var(--read);
  font-size: 16px;
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: 0;
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 56px 0 0;
  font-weight: 500;
}
.pager a {
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
}
.pager a:hover {
  background: var(--ink);
  color: var(--bg);
}
.pager-num {
  color: var(--ink-3);
  font-size: 14px;
}

/* ---------- Topic rails ---------- */
.rail {
  margin-top: clamp(64px, 8vw, 110px);
}
.rail-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, calc((100% - 3 * 24px) / 4));
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.rail-track .card {
  scroll-snap-align: start;
}
.rail-track .visual {
  aspect-ratio: 4 / 3;
}
.rail-track .card h3 {
  font-size: 24px;
}

/* ---------- Section and page headers ---------- */
.section-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  padding: clamp(40px, 7vw, 96px) 0 clamp(36px, 5vw, 64px);
}
.section-hero h1,
.page-head h1 {
  font-family: var(--display);
  font-size: clamp(60px, 11vw, 170px);
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin-top: 12px;
}
.section-hero .kicker .dot,
.section-hero-text .kicker::before {
  background: var(--hue);
}
.section-hero-text .kicker::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.window.big {
  width: min(360px, 100%);
  min-height: 250px;
}
.page-head {
  padding: clamp(40px, 7vw, 96px) 0 clamp(28px, 4vw, 48px);
}
.page-search .page-head h1 {
  font-size: clamp(48px, 8vw, 120px);
  word-break: break-word;
}

/* ---------- Story ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 60;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--hue, var(--accent));
  transform-origin: left;
  transform: scaleX(var(--progress, 0));
}
.page-story .progress {
  --hue: var(--accent);
}
.story-head {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 110px) 0 clamp(28px, 4vw, 48px);
  display: grid;
  gap: 22px;
  justify-items: center;
  text-align: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 600;
}
.chip:hover {
  background: var(--ink);
  color: var(--bg);
}
.story-head h1 {
  font-family: var(--display);
  font-size: clamp(44px, 6.6vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.dek {
  font-family: var(--read);
  font-size: clamp(19px, 1.9vw, 24px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 44ch;
  text-wrap: pretty;
}
.story-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  font-size: 14px;
  color: var(--ink-2);
}
.local {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.mini-orb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffcf6b;
  box-shadow: 0 0 8px #ffcf6b;
}
.local.phase-night .mini-orb { background: #dfe3f7; box-shadow: inset -3px -1px 0 #aeb4d4; }
.local.phase-dusk .mini-orb,
.local.phase-dawn .mini-orb { background: #ff9a5c; box-shadow: 0 0 8px #ff9a5c; }
.story-figure {
  margin: 0 auto clamp(40px, 6vw, 72px);
  max-width: 1180px;
}
.story-figure img {
  width: 100%;
  border-radius: 30px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface-2);
}
.story-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 680px) 170px;
  justify-content: center;
  gap: 40px;
}
.reader {
  position: sticky;
  top: 110px;
  align-self: start;
  display: grid;
  gap: 8px;
  justify-items: start;
}
html:not(.js) .reader {
  display: none;
}
.reader > button,
.size button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 9px 15px 9px 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.reader > button:hover,
.size button:hover {
  border-color: var(--ink);
}
.reader > button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.size {
  display: flex;
  gap: 6px;
}
.size button {
  padding: 9px 13px;
}
.story-body {
  font-family: var(--read);
  font-size: var(--read-size, 21px);
  line-height: 1.72;
  font-optical-sizing: auto;
}
html[data-size="s"] { --read-size: 18px; }
html[data-size="l"] { --read-size: 23.5px; }
html[data-size="xl"] { --read-size: 26px; }
.story-body p {
  margin: 0 0 1.15em;
  transition: opacity 0.35s, background 0.35s;
  border-radius: 8px;
  text-wrap: pretty;
}
.story-body p:first-child::first-letter {
  font-family: var(--display);
  float: left;
  font-size: 5.4em;
  line-height: 0.8;
  padding: 0.07em 0.1em 0 0;
  color: var(--accent);
}
.focus-mode .story-body p {
  opacity: 0.2;
}
.focus-mode .story-body p.in-focus,
.is-listening .story-body p.speaking {
  opacity: 1;
}
.story-body p.speaking {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 12%, transparent);
}
.source-note {
  max-width: 680px;
  margin: 40px auto 0;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  gap: 12px;
  justify-items: start;
}
.next {
  margin-top: clamp(72px, 9vw, 120px);
}
.next-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

/* ---------- Info, error, empty, login ---------- */
.info {
  max-width: 760px;
  padding: clamp(48px, 8vw, 110px) 0 0;
}
.info h1 {
  font-family: var(--display);
  font-size: clamp(64px, 11vw, 150px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 12px 0 36px;
}
.info-body {
  display: grid;
  gap: 1em;
  justify-items: start;
  font-family: var(--read);
  font-size: 21px;
  line-height: 1.65;
  color: var(--ink-2);
}
.info-body .pill-link {
  font-family: var(--ui);
  margin-top: 12px;
  color: var(--ink);
}
.error-page,
.empty-state {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 18px;
  padding: clamp(72px, 12vw, 160px) 0;
}
.error-code {
  font-family: var(--display);
  font-size: clamp(120px, 26vw, 320px);
  line-height: 0.8;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, #181a47, #d8566a 60%, #ff9a55);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.error-page p,
.empty-state p {
  font-family: var(--read);
  font-size: 20px;
  color: var(--ink-2);
  max-width: 36ch;
}
.empty-state h2 {
  font-family: var(--display);
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1;
}
.empty-orb {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3c9, #ffb46b 60%, #ff7a4a);
  box-shadow: 0 0 70px 10px rgba(255, 150, 90, 0.35);
  animation: drift 6s ease-in-out infinite alternate;
}
.login {
  max-width: 420px;
  margin: clamp(40px, 10vh, 110px) auto;
  padding: 36px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}
.login h1 {
  font-family: var(--display);
  font-size: 54px;
  line-height: 1;
}
.login form {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}
.login label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.login input {
  border: 1px solid var(--line-strong);
  background: var(--bg);
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 16px;
}
.login input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.login .pill-link {
  justify-content: center;
  padding: 14px;
  font-size: 15px;
}
.form-error {
  color: #d23b3b;
  font-size: 14px;
}

/* ---------- Footer ---------- */
.foot {
  max-width: var(--max);
  margin: clamp(90px, 12vw, 160px) auto 0;
  padding: 0 var(--gutter) 36px;
  border-top: 1px solid var(--line-strong);
}
.foot-mark {
  font-family: var(--display);
  font-size: clamp(76px, 17vw, 250px);
  line-height: 0.8;
  letter-spacing: -0.055em;
  padding: 40px 0 12px;
}
.foot-line {
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 36px);
  color: var(--ink-2);
  margin-bottom: 36px;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 14px;
  font-weight: 500;
}
.foot nav a:hover {
  color: var(--accent);
}
.foot-legal {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
}
.foot-legal span {
  margin-left: auto;
}

/* ---------- Motion ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.hour-head,
.window,
.lead,
.stream .card,
.story-head,
.story-figure {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.window:nth-child(2) { animation-delay: 0.08s; }
.window:nth-child(3) { animation-delay: 0.16s; }
.window:nth-child(4) { animation-delay: 0.24s; }
.lead { animation-delay: 0.3s; }
.story-figure { animation-delay: 0.12s; }
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .windows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .window {
    min-height: 300px;
  }
  .story-layout {
    grid-template-columns: minmax(0, 680px);
  }
  /* Reading tools become a floating dock. */
  .reader {
    position: fixed;
    top: auto;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 55;
    display: flex;
    gap: 4px;
    padding: 6px;
    border-radius: 999px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .reader > button,
  .size button {
    border-color: transparent;
    background: transparent;
  }
  .page-story .foot {
    padding-bottom: 96px;
  }
}
@media (max-width: 900px) {
  .bar-inner {
    grid-template-columns: auto 1fr;
    border-radius: 24px;
    padding: 8px 8px 6px 18px;
    row-gap: 4px;
  }
  .bar-inner .tools {
    justify-self: end;
  }
  .sections {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0 -8px 0 -18px;
    padding: 2px 12px 4px;
  }
  .lead-link {
    grid-template-columns: 1fr;
  }
  .stream {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stream .card,
  .stream .card:nth-child(6n + 1) {
    grid-column: span 1;
    grid-row: auto;
  }
  .stream .card:nth-child(6n + 1) {
    grid-column: 1 / -1;
  }
  .stream .card:nth-child(6n + 1) .visual {
    aspect-ratio: 16 / 10;
    min-height: 0;
  }
  /* Two columns: full-width cards at 1 and 6 of every six keep rows even. */
  .stream .card:nth-child(n):last-child {
    grid-column: span 1;
    grid-row: auto;
  }
  .stream .card:nth-child(6n),
  .stream .card:nth-child(6n + 1),
  .stream .card:nth-child(6n + 2):nth-child(n):last-child,
  .stream .card:nth-child(6n + 4):nth-child(n):last-child {
    grid-column: 1 / -1;
  }
  .stream .card:nth-child(n):last-child .card-link {
    display: flex;
    gap: 14px;
  }
  .stream .card:nth-child(n):last-child .visual {
    aspect-ratio: 16 / 10;
    flex: none;
  }
  .next-grid {
    grid-template-columns: 1fr;
  }
  .section-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .scan-list li a {
    grid-template-columns: auto 1fr auto;
    gap: 6px 14px;
  }
  .scan-list .scan-time {
    grid-row: 1;
  }
  .scan-list .cat {
    grid-row: 1;
  }
  .scan-list .scan-read {
    grid-row: 1;
  }
  .scan-title {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 18px;
  }
}
@media (max-width: 640px) {
  .windows {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 14px;
    scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .windows::-webkit-scrollbar {
    display: none;
  }
  .window {
    flex: 0 0 78%;
    scroll-snap-align: start;
    min-height: 330px;
  }
  .stream {
    grid-template-columns: 1fr;
  }
  .find:focus-within input,
  .page-search .find input {
    width: 130px;
  }
  .mark {
    font-size: 27px;
  }
  .modebar {
    align-items: flex-end;
  }
  .rail-track {
    grid-auto-columns: 76%;
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 12px;
    scroll-padding: 0 var(--gutter);
  }
  .reader span:not([data-listen-label]) {
    display: none;
  }
  .reader > button {
    padding: 10px 12px;
  }
  .foot-legal span {
    margin-left: 0;
    flex-basis: 100%;
  }
}
