/* Board Pro signage — 1920×1080 logical viewport, gen1-safe styling:
   animations restricted to transform/opacity, no filters or shadows on
   anything that moves, system font stack. */

:root {
  --bg: #0d1117;
  --bg-card: #161c26;
  --bg-card-2: #1b2230;
  --ink: #e8edf4;
  --ink-dim: #93a0b4;
  --ink-faint: #74849a;
  --accent: #58a6ff;
  --good: #3fb950;
  --bad: #f85149;
  --warn: #d29922;
  --radius: 18px;
  --gap: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* The hidden attribute must always win, even over rules that set display. */
[hidden] { display: none !important; }

/* RoomOS overlays a small system bar along the bottom edge in interactive
   signage mode; keep all content and controls above it (tunable). */
:root { --safe-bottom: 84px; }

html, body {
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app { position: relative; width: 100%; height: 100%; padding: 32px 40px; padding-bottom: var(--safe-bottom); display: flex; flex-direction: column; }

/* ---------- top bar ---------- */
.topbar { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 24px; }
.topbar__greeting { font-size: 40px; font-weight: 600; letter-spacing: -0.01em; }
.topbar__clock { display: flex; align-items: baseline; gap: 18px; }
.topbar__time { font-size: 54px; font-weight: 700; font-variant-numeric: tabular-nums; }
.topbar__date { font-size: 26px; color: var(--ink-dim); }

/* ---------- dashboard grid ---------- */
.grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  min-height: 0;
}
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 22px 26px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.card__title { font-size: 20px; font-weight: 600; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.card__body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.card__stamp { position: absolute; top: 24px; right: 26px; font-size: 20px; color: var(--warn); }
.card.is-stale { opacity: 0.75; }

.empty { color: var(--ink-faint); font-size: 22px; }

/* ---------- world clock ---------- */
.wc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; min-height: 44px; flex-wrap: nowrap; }
.wc-row__city { font-size: 21px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wc-row__time { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.wc-row__day { font-size: 15px; color: var(--warn); font-weight: 600; margin-left: 4px; vertical-align: 2px; }

/* ---------- weather ---------- */
.alert { display: flex; gap: 10px; align-items: center; background: rgba(210, 153, 34, 0.15); color: var(--warn); border-radius: 10px; padding: 8px 14px; font-size: 20px; font-weight: 600; }
.wx-now { display: flex; align-items: center; gap: 24px; }
.wx-now__icon { width: 96px; height: 96px; color: var(--accent); }
.wx-now__temp { font-size: 88px; font-weight: 700; line-height: 1; }
.wx-now__main { display: flex; flex-direction: column; gap: 4px; }
.wx-now__label { font-size: 26px; color: var(--ink-dim); }
.wx-now__feels { font-size: 20px; color: var(--ink-faint); }
.wx-hours { display: flex; justify-content: space-between; margin-top: 8px; }
.wx-hour { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 21px; color: var(--ink-dim); }
.wx-hour__temp { color: var(--ink); font-weight: 600; }
.wx-days { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.wx-day { display: grid; grid-template-columns: 70px 34px 1fr auto; align-items: center; gap: 12px; font-size: 20px; }
.wx-day__name { color: var(--ink-dim); }
.wx-day__hi { font-weight: 600; text-align: right; }
.wx-day__lo { color: var(--ink-faint); margin-left: 10px; }

.icon { width: 28px; height: 28px; }
.icon--sm { width: 24px; height: 24px; }
.icon--xl { width: 96px; height: 96px; }

/* ---------- transit ---------- */
.stop-group { display: flex; flex-direction: column; gap: 8px; }
.stop-group__head { display: flex; justify-content: space-between; align-items: baseline; }
.stop-group__name { font-size: 22px; font-weight: 600; }
.stop-group__dir { font-size: 20px; color: var(--ink-faint); }
.stop-group__arrivals { display: flex; flex-direction: column; gap: 6px; }
.arrival { display: flex; align-items: center; gap: 12px; font-size: 24px; }
.arrival__min { font-weight: 700; font-variant-numeric: tabular-nums; }
.arrival__unit { color: var(--ink-faint); font-size: 21px; }

.bullet {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px; color: #fff; background: #808183;
  flex: none;
}
/* MTA line colors */
.bullet--1, .bullet--2, .bullet--3 { background: #ee352e; }
.bullet--4, .bullet--5, .bullet--6 { background: #00933c; }
.bullet--7 { background: #b933ad; }
.bullet--A, .bullet--C, .bullet--E { background: #0039a6; }
.bullet--B, .bullet--D, .bullet--F, .bullet--M { background: #ff6319; }
.bullet--G { background: #6cbe45; }
.bullet--J, .bullet--Z { background: #996633; }
.bullet--L { background: #a7a9ac; }
.bullet--N, .bullet--Q, .bullet--R, .bullet--W { background: #fccc0a; color: #111; }
.bullet--S, .bullet--GS { background: #808183; }
.bullet--SI { background: #0f3d92; }

.train { display: flex; align-items: center; gap: 16px; font-size: 22px; }
.train__min { display: flex; align-items: baseline; gap: 4px; min-width: 76px; }
.train__min span { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.train__min small { color: var(--ink-faint); font-size: 20px; }
.train__info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.train__dest { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.train__line { font-size: 20px; color: var(--ink-dim); }
.train__track { background: var(--bg-card-2); border-radius: 8px; padding: 6px 10px; font-size: 20px; color: var(--accent); white-space: nowrap; }

/* ---------- art card ---------- */
.artwork { display: flex; flex-direction: column; height: 100%; gap: 10px; }
.artwork__img { flex: 1; min-height: 0; width: 100%; object-fit: cover; border-radius: 10px; background: var(--bg-card-2); }
.artwork__caption { display: flex; flex-direction: column; gap: 2px; }
.artwork__title { font-size: 22px; font-weight: 600; }
.artwork__artist { font-size: 20px; color: var(--ink-dim); }

/* ---------- history / quote / sky / markets ---------- */
.history { display: flex; flex-direction: column; gap: 10px; }
.history__item { display: grid; grid-template-columns: 76px 1fr; gap: 14px; font-size: 22px; align-items: baseline; }
.history__year { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.history__text { color: var(--ink-dim); }

.quote { display: flex; flex-direction: column; justify-content: center; height: 100%; gap: 12px; }
.quote__text { font-size: 24px; line-height: 1.4; font-style: italic; }
.quote__author { font-size: 21px; color: var(--ink-dim); text-align: right; }

.sky { display: flex; flex-direction: column; gap: 12px; }
.sky__aqi { display: flex; align-items: baseline; gap: 12px; }
.sky__aqi-value { font-size: 54px; font-weight: 700; }
.sky__aqi--good .sky__aqi-value { color: var(--good); }
.sky__aqi--moderate .sky__aqi-value { color: var(--warn); }
.sky__aqi--bad .sky__aqi-value { color: var(--bad); }
.sky__aqi-label { font-size: 22px; color: var(--ink-dim); }
.sky__row { display: flex; align-items: center; gap: 10px; font-size: 20px; color: var(--ink-dim); }

.index { display: grid; grid-template-columns: 1fr 90px auto; align-items: center; gap: 14px; }
.index__info { display: flex; flex-direction: column; }
.index__name { font-size: 21px; color: var(--ink-dim); }
.index__price { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.spark { width: 90px; height: 28px; }
.spark--up { color: var(--good); }
.spark--down { color: var(--bad); }
.delta { font-size: 21px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta--up { color: var(--good); }
.delta--down { color: var(--bad); }

/* ---------- ambient mode ---------- */
.ambient { position: absolute; inset: 0; }
.slideshow { position: absolute; inset: 0; background: #000; }
.slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transition: opacity 2.5s ease-in-out;
}
.slide[data-active] { opacity: 1; }
.slide-caption {
  /* Clear the info strip (~70px tall at bottom: var(--safe-bottom)) plus a gap. */
  position: absolute; left: 48px; bottom: calc(var(--safe-bottom) + 96px);
  display: flex; flex-direction: column; gap: 4px;
  background: rgba(0, 0, 0, 0.55);
  padding: 14px 22px; border-radius: 12px;
}
.slide-caption__title { font-size: 24px; font-weight: 600; }
.slide-caption__meta { font-size: 21px; color: var(--ink-dim); }
.strip {
  position: absolute; left: 0; right: 0; bottom: var(--safe-bottom);
  display: flex; align-items: center; gap: 36px;
  padding: 18px 48px;
  background: rgba(0, 0, 0, 0.65);
  font-size: 24px;
}
.strip__time { font-weight: 700; font-size: 28px; font-variant-numeric: tabular-nums; }
.strip__temp { color: var(--accent); font-weight: 600; }
.strip__transit { color: var(--ink-dim); }
.strip__transit b { color: var(--ink); font-variant-numeric: tabular-nums; }
body.mode-ambient .topbar, body.mode-ambient #grid { visibility: hidden; }

/* ---------- welcome ---------- */
.welcome { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.welcome__inner {
  max-width: 760px; text-align: center; display: flex; flex-direction: column; gap: 22px;
  background: var(--bg-card); border-radius: var(--radius); padding: 48px 56px;
}
.welcome__inner h1 { font-size: 48px; }
.welcome__inner p { font-size: 24px; color: var(--ink-dim); }
.welcome__actions { display: flex; gap: 18px; justify-content: center; }
.welcome__hint { font-size: 21px !important; color: var(--ink-faint) !important; }

.btn {
  font-size: 24px; padding: 16px 34px; border-radius: 14px;
  border: 1px solid var(--ink-faint); background: var(--bg-card);
  color: var(--ink); cursor: pointer;
}
.btn--primary { background: var(--accent); border-color: var(--accent); color: #06131f; font-weight: 700; }

/* ---------- gear ---------- */
.gear {
  /* Vertically centered in the ambient strip's band (strip ≈ 70px tall,
     button 56px → 7px inset above the strip's bottom edge). */
  position: absolute; right: 28px; bottom: calc(var(--safe-bottom) + 7px);
  width: 56px; height: 56px; border-radius: 50%;
  font-size: 26px; border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.08); color: var(--ink-dim);
}

/* ---------- settings overlay ---------- */
.settings {
  position: absolute; inset: 0; z-index: 40;
  display: grid; grid-template-columns: 380px 1fr;
  background: var(--bg);
}
.settings__rail {
  background: var(--bg-card); padding: 40px 28px;
  display: flex; flex-direction: column; gap: 28px;
}
.settings__brand { font-size: 34px; font-weight: 700; }
.settings__nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.settings__navitem {
  text-align: left; font-size: 24px; padding: 16px 18px; min-height: 60px;
  border: none; border-radius: 12px; background: none; color: var(--ink-dim); cursor: pointer;
}
.settings__navitem.is-active { background: var(--bg-card-2); color: var(--ink); font-weight: 600; }
.settings__railfoot { display: flex; flex-direction: column; gap: 12px; }
.settings__pane { padding: 44px 56px; overflow-y: auto; }
.pane__title { font-size: 34px; font-weight: 700; margin-bottom: 10px; }
.pane__hint { font-size: 21px; color: var(--ink-dim); margin: 14px 0; }
.pane__empty { font-size: 21px; color: var(--ink-faint); }
.pane__rule { border: none; border-top: 1px solid var(--bg-card-2); margin: 28px 0; }

.rows { display: flex; flex-direction: column; gap: 8px; max-width: 860px; }
.row {
  display: flex; align-items: center; gap: 18px;
  min-height: 64px; padding: 8px 18px;
  background: var(--bg-card); border-radius: 12px;
}
.row__label { font-size: 24px; flex: 1; }
.row__actions { display: flex; gap: 10px; }
.row--tap { border: none; color: var(--ink); font-size: 23px; text-align: left; cursor: pointer; }
.row--tap.is-selected { outline: 2px solid var(--accent); }

.toggle {
  width: 76px; height: 44px; border-radius: 22px; border: none; cursor: pointer;
  background: var(--bg-card-2); position: relative; flex: none;
  transition: background 0.2s;
}
.toggle__knob {
  position: absolute; top: 4px; left: 4px; width: 36px; height: 36px;
  border-radius: 50%; background: var(--ink-faint);
  transition: transform 0.2s ease-out, background 0.2s;
}
.toggle.is-on { background: rgba(88, 166, 255, 0.35); }
.toggle.is-on .toggle__knob { transform: translateX(32px); background: var(--accent); }

.iconbtn {
  width: 56px; height: 56px; border-radius: 12px; border: none; cursor: pointer;
  background: var(--bg-card-2); color: var(--ink); font-size: 26px;
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 20px; }
.chip {
  font-size: 22px; padding: 14px 20px; min-height: 56px;
  border: none; border-radius: 28px; cursor: pointer;
  background: var(--bg-card-2); color: var(--ink);
}
.kv { display: flex; align-items: center; gap: 16px; min-height: 60px; font-size: 23px; }
.kv span { color: var(--ink-dim); min-width: 260px; }
.kv__small { font-size: 20px; font-weight: 400; color: var(--ink-dim); }

.drill { margin-top: 22px; max-width: 860px; }
.drill__head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.drill__head h3 { font-size: 26px; }
.drill__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; max-height: 640px; overflow-y: auto; }
.drill__item {
  min-height: 64px; font-size: 23px; padding: 10px 16px;
  border: none; border-radius: 12px; cursor: pointer;
  background: var(--bg-card); color: var(--ink);
  display: flex; align-items: center; gap: 12px;
}
.drill__letter { color: var(--accent); }

.code__display, .zip__display {
  display: block; font-size: 52px; letter-spacing: 0.35em;
  font-variant-numeric: tabular-nums; margin: 16px 0; min-height: 64px;
}
.keypad { display: grid; gap: 10px; max-width: 640px; }
.keypad--zip { grid-template-columns: repeat(3, 1fr); max-width: 320px; }
.keypad--code { grid-template-columns: repeat(8, 1fr); }
.key {
  min-height: 64px; font-size: 26px; font-weight: 600;
  border: none; border-radius: 12px; cursor: pointer;
  background: var(--bg-card); color: var(--ink);
}
.key:active { background: var(--bg-card-2); }
.key--wide { grid-column: span 2; }
.code__status, .zip__status { font-size: 22px; color: var(--warn); margin-top: 14px; min-height: 30px; }
.qr { margin-top: 20px; }
.qr svg { background: #fff; border-radius: 12px; }

/* ---------- line chips (subway settings) ---------- */
.linechips { display: flex; flex-wrap: wrap; gap: 12px; max-width: 720px; margin-bottom: 16px; }
.linechip { width: 56px; height: 56px; font-size: 24px; border: none; cursor: pointer; }
.linechip--off { opacity: 0.25; }

/* ---------- edit mode ---------- */
.gear--edit { right: 96px; }
.editor { position: absolute; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; padding: 32px 40px; padding-bottom: var(--safe-bottom); }
.editor__stage { position: relative; flex: 1; min-height: 0; }
.editor__cells, .editor__blocks {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}
.editor__cell { border: 1px dashed rgba(147, 160, 180, 0.25); border-radius: 10px; }
.edit-block {
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--ink-faint);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  cursor: grab; touch-action: none; user-select: none;
}
.edit-block.is-dragging { opacity: 0.85; z-index: 5; cursor: grabbing; }
.edit-block.is-invalid { border-color: var(--bad); }
.edit-block__title { font-size: 26px; font-weight: 600; color: var(--ink-dim); pointer-events: none; }
.edit-remove {
  position: absolute; top: 10px; right: 10px;
  width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(248, 81, 73, 0.2); color: var(--bad); font-size: 22px;
}
.edit-handle {
  position: absolute; bottom: 6px; right: 6px;
  width: 56px; height: 56px; cursor: nwse-resize; touch-action: none;
  border-right: 4px solid var(--accent); border-bottom: 4px solid var(--accent);
  border-bottom-right-radius: 12px;
}
.editor__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 24px; }
.edit-tray { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.edit-tray__label { font-size: 22px; color: var(--ink-dim); }
.edit-tray__chip {
  font-size: 22px; padding: 14px 22px; min-height: 56px;
  border: none; border-radius: 28px; cursor: pointer;
  background: var(--bg-card); color: var(--ink);
}
.edit-tray__chip:disabled { opacity: 0.4; cursor: default; }
.editor__actions { display: flex; gap: 14px; }
@media (prefers-reduced-motion: reduce) {
  .slide { transition: none; }
}

/* ---------- full-screen art viewer (tap art card to open, tap to close) ---------- */
.art-viewer {
  position: absolute; inset: 0; z-index: 45;
  background: #000; cursor: pointer;
}
.art-viewer__img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- per-size compact variants (gen1 Chromium lacks container queries;
   cards carry data-w/data-h set from the layout) ---------- */
/* Weather at 2-wide: 6 hourly slots instead of 8 */
.card[data-w="2"] .wx-hour:nth-child(n+7) { display: none; }
/* Quote at 1-high: clamp long quotes */
.card--quote[data-h="1"] .quote__text {
  font-size: 22px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Markets at 1-high: tighter rows */
.card--markets[data-h="1"] .index__price { font-size: 22px; }
.card--markets[data-h="1"] .index__name { font-size: 18px; }
.card--markets[data-h="1"] .delta { font-size: 16px; }
.card--markets[data-h="1"] .spark { height: 20px; }
/* Air & Sky at 1-high: smaller dial, drop the moon row */
.card--aqi[data-h="1"] .sky__aqi-value { font-size: 36px; }
.card--aqi[data-h="1"] .sky__row { font-size: 18px; }
.card--aqi[data-h="1"] .sky__row:nth-of-type(3) { display: none; }
/* Art at 1x1: caption reduces to the title */
.card--art[data-h="1"][data-w="1"] .artwork__artist { display: none; }
/* Transit rows tighten when narrow */
.card[data-w="2"] .train__track { padding: 4px 8px; font-size: 17px; }

/* Measured-fit variants (from the overflow audit — see README testing notes) */
/* Weather at 2-high: compact current block, 6 hourly slots, 3 daily rows */
.card--weather[data-h="2"] .card__body { gap: 8px; }
.card--weather[data-h="2"] .wx-now__temp { font-size: 64px; }
.card--weather[data-h="2"] .wx-now__icon { width: 64px; height: 64px; }
.card--weather[data-h="2"] .alert { padding: 5px 12px; font-size: 18px; }
.card--weather[data-h="2"] .wx-hour:nth-child(n+7) { display: none; }
.card--weather[data-h="2"] .wx-hours { margin-top: 2px; }
.card--weather[data-h="2"] .wx-days { margin-top: 2px; }
.card--weather[data-h="2"] .wx-day:nth-child(n+3) { display: none; }
/* Subway at 2-high: three arrivals per stop */
.card--subway[data-h="2"] .arrival:nth-child(n+4) { display: none; }

/* ---------- transit service alerts ---------- */
.talert {
  display: flex; align-items: center; gap: 8px;
  background: rgba(210, 153, 34, 0.14); border-radius: 8px;
  padding: 6px 10px; flex: none;
}
.talert__icon { color: var(--warn); font-size: 18px; flex: none; }
.talert__text {
  color: var(--warn); font-size: 20px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bullet--sm { width: 26px; height: 26px; font-size: 15px; }
.trains { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: hidden; }

/* ---------- subway line-status board ---------- */
.linestatus { display: flex; align-items: center; gap: 14px; min-height: 50px; }
.linestatus__text { font-size: 22px; color: var(--ink-dim); }
.linestatus--alert .linestatus__text {
  color: var(--warn); font-size: 20px; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.linestatus__icon { color: var(--warn); font-size: 18px; margin-left: auto; flex: none; }

/* ---------- bus ---------- */
.buspill {
  display: inline-block; background: #0039a6; color: #fff;
  border-radius: 8px; padding: 2px 10px; font-size: 19px; margin-right: 6px;
}
.train__dist { color: var(--ink-dim); font-size: 18px; line-height: 1.1; display: inline-block; max-width: 76px; }

/* Markets at 1-high: single-line rows, sparkline yields to fit */
.card--markets[data-h="1"] .index { grid-template-columns: 1fr auto; gap: 10px; min-height: 0; }
.card--markets[data-h="1"] .index__info { flex-direction: row; align-items: baseline; gap: 10px; }
.card--markets[data-h="1"] .spark { display: none; }

/* ---------- edit-mode gesture preview ---------- */
.edit-placeholder {
  border: 3px dashed var(--good);
  border-radius: var(--radius);
  background: rgba(63, 185, 80, 0.08);
  pointer-events: none;
}
.edit-placeholder--invalid {
  border-color: var(--bad);
  background: rgba(248, 81, 73, 0.10);
}
.edit-block__size {
  position: absolute; left: 0; right: 0; bottom: 14px;
  text-align: center; font-size: 18px; color: var(--ink-faint);
  pointer-events: none;
}
.edit-block { flex-direction: column; gap: 4px; }
.edit-tray__chip small { color: var(--ink-dim); font-size: 17px; }

.more-hint { font-size: 18px; color: var(--ink-faint); padding-top: 2px; }

.icon--btn { width: 28px; height: 28px; display: block; margin: 0 auto; }
.gear { display: flex; align-items: center; justify-content: center; color: var(--ink-dim); }
.card__title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card__asof { font-size: 17px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-faint); white-space: nowrap; }
.card.is-stale .card__asof { visibility: hidden; } /* the amber stale stamp takes over */

/* ---------- my teams ---------- */
.team { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.team__abbr { width: 64px; font-size: 24px; font-weight: 800; letter-spacing: 0.02em; flex: none; }
.team__info { display: flex; flex-direction: column; min-width: 0; }
.team__name { font-size: 21px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team__name small { color: var(--ink-faint); font-weight: 400; font-size: 18px; }
.team__line { font-size: 20px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team--live .team__line { color: var(--ink); font-weight: 600; }
.team__livedot { color: var(--bad); font-size: 14px; }

/* ---------- world cup ---------- */
.wc-section { display: flex; flex-direction: column; gap: 6px; }
.wc-section__label { font-size: 17px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.wc-match { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; min-height: 40px; }
.wc-match__teams { font-size: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wc-match__teams b { font-size: 24px; }
.wc-match__meta { font-size: 19px; color: var(--ink-dim); white-space: nowrap; flex: none; }
.wc-match--live .wc-match__meta { color: var(--ink); font-weight: 600; }
.wc-match__note { font-size: 17px; color: var(--ink-faint); margin-top: -4px; }

/* ---------- headlines ---------- */
.headline { display: flex; align-items: baseline; gap: 12px; min-height: 52px; }
.headline__src { font-size: 15px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; flex: none; width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.headline__title { font-size: 21px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-width: 0; }
.headline__age { font-size: 17px; color: var(--ink-faint); flex: none; }
