/* Honk Radar TV view (templates/radar_tv.html): flat, large type, dark unless the visitor chose light on Radar.
   From 900 px wide it fills the screen exactly (no scrolling at 1280x720 or 1920x1080); narrower, it is a plain page. */
:root {
  color-scheme: dark;
  --bg: #0e0f11;
  --text: #f2f3f5;
  --muted: #a3a8b0;
  --line: #2a2d33;
  --major: #ff6b63;
  --minor: #f3a536;
  --stale-bg: #3a2a10;
  --stale-text: #ffd28a;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --text: #15171a;
  --muted: #5b6168;
  --line: #dfe2e6;
  --major: #c4281c;
  --minor: #a65a00;
  --stale-bg: #fff1d6;
  --stale-text: #6b3d00;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body.tv {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}
.tv a { color: inherit; text-decoration: none; }
.tv h1, .tv h2, .tv p, .tv ul, .tv ol { margin: 0; padding: 0; }
.tv ul, .tv ol { list-style: none; }

.tv-page { display: flex; flex-direction: column; gap: 1rem; padding: 1rem 16px; min-height: 100vh; }
.tv-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1.5rem;
  border-bottom: 1px solid var(--line); padding-bottom: .6rem; }
.tv-head h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
.tv-where { color: var(--muted); font-weight: 600; margin-left: .4em; }
.tv-clock { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; font-size: 1rem;
  font-variant-numeric: tabular-nums; }
.tv-clock b { font-weight: 600; }
.tv-stale { background: var(--stale-bg); color: var(--stale-text); padding: .15rem .5rem; border-radius: 4px;
  font-weight: 600; }
.tv-stale[hidden] { display: none; }

.tv-main { display: flex; flex-direction: column; gap: 1.5rem; }
.tv h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.tv-count { color: var(--muted); font-weight: 600; margin-left: .3em; font-variant-numeric: tabular-nums; }

.tv-list { display: flex; flex-direction: column; }
.tv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; padding: .55rem 0 .55rem .75rem;
  border-top: 1px solid var(--line); border-left: 4px solid var(--minor); }
.tv-row.tv-major { border-left-color: var(--major); }
.tv-row[hidden] { display: none; }
.tv-name { font-size: 1.25rem; font-weight: 700; overflow-wrap: anywhere; }
.tv-what { font-size: 1rem; font-weight: 600; color: var(--minor); text-align: right; align-self: baseline; }
.tv-major .tv-what { color: var(--major); }
.tv-src { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-since { color: var(--muted); font-size: .85rem; text-align: right; font-variant-numeric: tabular-nums; }
.tv-more, .tv-none { color: var(--muted); font-size: 1rem; padding-top: .5rem; }
.tv-more[hidden], .tv-none[hidden], .tv-glance[hidden] { display: none; }

.tv-side { display: flex; flex-direction: column; gap: 1.5rem; }
.tv-glance li { display: flex; flex-direction: column; gap: .1rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.tv-glance b { font-size: 1.15rem; font-weight: 700; }
.tv-glance span { color: var(--muted); font-size: .85rem; }
.tv-foot { color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line); padding-top: .5rem; }

@media (max-width: 899px) {
  .tv-row { grid-template-columns: minmax(0, 1fr); }
  .tv-what, .tv-since { text-align: left; }
  .tv-src { white-space: normal; }
  .tv-clock { align-items: flex-start; }
}

/* A screen: everything sized from the viewport, one fixed frame, nothing scrolls. 1920x1080 gives about 28 px type,
   1280x720 about 19 px. */
@media (min-width: 900px) {
  html { font-size: clamp(14px, min(1.45vw, 2.6vh), 48px); }
  body.tv { overflow: hidden; }
  .tv-page { height: 100vh; min-height: 0; padding: 1.2rem 1.6rem 1rem; gap: 1rem; }
  .tv-head h1 { font-size: 1.6rem; }
  .tv-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 2.2rem; }
  .tv-down { display: flex; flex-direction: column; min-height: 0; }
  .tv-list { flex: 0 1 auto; min-height: 0; overflow: hidden; }
  .tv-side { min-height: 0; overflow: hidden; gap: 1.2rem; }
  .tv-foot { font-size: .7rem; }
}
