/* Public site theme: a night-time traffic control room.
   Self-contained (the CSP allows only same-origin styles, no web fonts). */
:root {
  --bg: #070b14;
  --bg-2: #0b1220;
  --surface: rgba(17, 25, 42, .72);
  --surface-solid: #111a2b;
  --surface-hi: #172238;
  --text: #e7ecf5;
  --muted: #8d9ab0;
  --line: rgba(148, 163, 184, .14);
  --line-hi: rgba(148, 163, 184, .28);
  --brand: #f5b324;
  --brand-2: #ff7a3d;
  --accent: #38bdf8;
  --online: #22c55e;
  --offline: #ef4444;
  --unknown: #94a3b8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .7);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; color: var(--text); line-height: 1.55; font-size: 16px; min-height: 100vh;
  display: flex; flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(245, 179, 36, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(56, 189, 248, .10), transparent 60%),
    linear-gradient(rgba(148, 163, 184, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .035) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(245, 179, 36, .35); }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: #ffd166; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; display: block; }
main { flex: 1; width: 100%; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }
.small { font-size: .875rem; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: #111; padding: .5rem .8rem; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; top: 8px; }
h1, h2, h3 { letter-spacing: -.015em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); line-height: 1.15; margin: 1.75rem 0 .75rem; font-weight: 800; }
h2 { font-size: 1.1rem; margin: 1.5rem 0 .6rem; font-weight: 700; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(7, 11, 20, .72);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 179, 36, .55), rgba(56, 189, 248, .45), transparent);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.brand { color: var(--text); text-decoration: none; font-weight: 800; display: flex; align-items: center; gap: .65rem; letter-spacing: -.01em; }
.brand:hover { color: #fff; }
.brand-dot {
  position: relative; width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 18px -6px rgba(245, 179, 36, .7);
}
.brand-dot::before { /* camera lens */
  content: ""; position: absolute; inset: 8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #4b5563, #0b1220 70%);
  box-shadow: 0 0 0 2px rgba(11, 18, 32, .85);
}
.brand-dot::after { /* recording light */
  content: ""; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--offline); border: 2px solid var(--bg); animation: blink 1.6s ease-in-out infinite;
}
.site-header nav { display: flex; gap: .25rem; padding: 4px; border-radius: 999px; background: rgba(148, 163, 184, .08); border: 1px solid var(--line); }
.site-header nav a { color: var(--muted); text-decoration: none; padding: .4rem .95rem; border-radius: 999px; font-weight: 600; font-size: .925rem; transition: color .2s, background .2s; }
.site-header nav a:hover { color: var(--text); background: rgba(148, 163, 184, .1); }
.site-header nav a[aria-current="page"] { color: #111827; background: linear-gradient(135deg, var(--brand), #ffcf5c); box-shadow: 0 4px 14px -6px rgba(245, 179, 36, .8); }

/* ---------------------------------------------------------------- footer */
.site-footer { margin-top: 4rem; padding: 1.75rem 0 2.25rem; color: var(--muted); border-top: 1px solid var(--line); background: rgba(7, 11, 20, .6); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; padding: 3rem 0 1.5rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #fecaca; background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .35); padding: .3rem .75rem; border-radius: 999px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--offline); box-shadow: 0 0 0 0 rgba(239, 68, 68, .7); animation: pulse 1.8s infinite; }
.hero h1 { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.6rem); margin: 1rem 0 .75rem; max-width: 18ch; line-height: 1.05; }
.hero h1 .grad { background: linear-gradient(90deg, var(--brand), var(--brand-2) 50%, #fb7185); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.1rem; color: var(--muted); max-width: 52ch; margin: 0 0 1.5rem; }
.stats { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.stats li { display: flex; align-items: baseline; gap: .45rem; padding: .55rem .9rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.stats strong { color: var(--text); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.road-lines { /* animated lane markings under the hero */
  height: 4px; margin: 0 0 1.75rem; border-radius: 4px; opacity: .55;
  background: repeating-linear-gradient(90deg, var(--brand) 0 36px, transparent 36px 64px);
  background-size: 64px 4px; animation: drive 1.2s linear infinite;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}

/* --------------------------------------------------------------- filters */
.filters {
  display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; padding: .6rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--shadow);
}
.filters select, .filters input, .copy input {
  font: inherit; color: var(--text); padding: .7rem .9rem; border: 1px solid var(--line-hi); border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, .55); min-width: 0; transition: border-color .2s, box-shadow .2s;
}
.filters select:hover, .filters input:hover { border-color: rgba(148, 163, 184, .45); }
.filters select:focus, .filters input:focus, .copy input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(245, 179, 36, .2); }
.filters select { flex: 1 1 200px; cursor: pointer; }
.filters select option { background: var(--surface-solid); color: var(--text); }
.filters input { flex: 2 1 240px; }
.filters input::placeholder { color: #64748b; }
button, .button {
  font: inherit; font-weight: 700; padding: .7rem 1.25rem; border-radius: var(--radius-sm); border: 0; cursor: pointer;
  color: #111827; background: linear-gradient(135deg, var(--brand), #ffcf5c); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  box-shadow: 0 6px 18px -8px rgba(245, 179, 36, .9); transition: transform .15s, box-shadow .2s, filter .2s;
}
button:hover, .button:hover { color: #111827; filter: brightness(1.06); box-shadow: 0 10px 24px -8px rgba(245, 179, 36, .9); transform: translateY(-1px); }
button:active, .button:active { transform: translateY(0); }
.reset { align-self: center; padding: 0 .6rem; color: var(--muted); font-weight: 600; text-decoration: none; }
.reset:hover { color: var(--text); }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1.25rem 0 .9rem; }
.results-bar p { margin: 0; }

/* ----------------------------------------------------------------- cards */
.grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.card { animation: rise .5s both; }
.card:nth-child(2) { animation-delay: .03s; } .card:nth-child(3) { animation-delay: .06s; } .card:nth-child(4) { animation-delay: .09s; }
.card:nth-child(5) { animation-delay: .12s; } .card:nth-child(6) { animation-delay: .15s; } .card:nth-child(7) { animation-delay: .18s; }
.card:nth-child(8) { animation-delay: .21s; } .card:nth-child(n+9) { animation-delay: .24s; }
.card a {
  position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; color: inherit; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s, box-shadow .25s;
}
.card a::after { /* glow ring on hover */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s;
  box-shadow: inset 0 0 0 1px rgba(245, 179, 36, .55);
}
.card a:hover, .card a:focus-visible { transform: translateY(-4px); border-color: transparent; box-shadow: 0 22px 40px -18px rgba(0, 0, 0, .9), 0 0 0 1px rgba(245, 179, 36, .25), 0 10px 40px -20px rgba(245, 179, 36, .6); }
.card a:hover::after, .card a:focus-visible::after { opacity: 1; }
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(110deg, #0f172a 30%, #1e293b 50%, #0f172a 70%) 0 0 / 200% 100%; animation: shimmer 1.6s linear infinite; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1), filter .4s; filter: saturate(.9) contrast(1.05); }
.card a:hover .thumb img { transform: scale(1.06); filter: saturate(1.1) contrast(1.05); }
.thumb::before { /* scan lines */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .25) 0 1px, transparent 1px 3px);
}
.thumb::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .45), transparent 30%, transparent 60%, rgba(0, 0, 0, .55)); }
.osd { /* on-screen-display style camera code */
  position: absolute; z-index: 2; right: 10px; bottom: 8px; font-family: var(--mono); font-size: .7rem; letter-spacing: .06em;
  color: rgba(255, 255, 255, .85); text-shadow: 0 1px 2px #000; text-transform: uppercase;
}
.play-hint {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%;
  background: rgba(7, 11, 20, .55); border: 1px solid rgba(255, 255, 255, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transform: scale(.8); transition: opacity .25s, transform .25s;
}
.play-hint::after { content: ""; position: absolute; left: 21px; top: 17px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fff; }
.card a:hover .play-hint, .card a:focus-visible .play-hint { opacity: 1; transform: scale(1); }
.card-body { padding: .85rem 1rem 1rem; }
.card-body h3 { font-size: 1.02rem; margin: 0 0 .2rem; font-weight: 700; }
.card-body p { margin: 0; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- status */
.status {
  position: absolute; z-index: 2; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: .4rem;
  font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .28rem .6rem; border-radius: 999px;
  color: #fff; background: rgba(15, 23, 42, .7); border: 1px solid rgba(255, 255, 255, .15);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--unknown); flex: none; }
.status.inline { position: static; vertical-align: middle; margin-left: .5rem; }
.status-online { background: rgba(21, 128, 61, .3); border-color: rgba(34, 197, 94, .5); color: #bbf7d0; }
.status-online::before { background: var(--online); animation: pulse-green 1.8s infinite; }
.status-offline { background: rgba(127, 29, 29, .4); border-color: rgba(239, 68, 68, .5); color: #fecaca; }
.status-offline::before { background: var(--offline); }
.status-unknown { color: #e2e8f0; }

/* ----------------------------------------------------------------- pager */
.pager { display: flex; justify-content: center; align-items: center; gap: .75rem; margin: 2.25rem 0 1rem; }
.pager a, .pager span { padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid var(--line-hi); text-decoration: none; font-weight: 600; font-size: .9rem; }
.pager a { color: var(--text); background: var(--surface); transition: border-color .2s, background .2s; }
.pager a:hover { border-color: var(--brand); background: rgba(245, 179, 36, .1); }
.pager span { color: var(--muted); border-color: transparent; }
.empty { padding: 3.5rem 1rem; text-align: center; background: var(--surface); border: 1px dashed var(--line-hi); border-radius: var(--radius); color: var(--muted); }
.empty strong { display: block; color: var(--text); font-size: 1.15rem; margin-bottom: .3rem; }

/* ---------------------------------------------------------------- detail */
.crumbs { margin-top: 1.5rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { opacity: .5; }
.detail { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .detail { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); } }
.detail-main h1 { margin: .5rem 0 .35rem; }
.detail-main .meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 1.25rem; }
.detail-main .meta .status.inline { margin-left: .25rem; }
.description { margin-top: 1.25rem; color: #cbd5e1; }

.player-frame { position: relative; padding: 10px; border-radius: calc(var(--radius) + 8px); background: linear-gradient(145deg, rgba(148, 163, 184, .14), rgba(148, 163, 184, .03)); border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), 0 0 80px -40px rgba(56, 189, 248, .45); }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.player .noscript-snap { width: 100%; height: 100%; object-fit: contain; }
.viewfinder { position: absolute; inset: 14px; pointer-events: none; z-index: 1; }
.viewfinder i { position: absolute; width: 22px; height: 22px; border: 2px solid rgba(255, 255, 255, .55); }
.viewfinder i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 4px; }
.viewfinder i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 4px; }
.viewfinder i:nth-child(3) { bottom: 44px; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 4px; }
.viewfinder i:nth-child(4) { bottom: 44px; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 4px; }
.rec {
  position: absolute; top: 18px; left: 22px; z-index: 2; pointer-events: none; display: none; align-items: center; gap: .45rem;
  font: 800 .72rem/1 var(--mono); letter-spacing: .14em; color: #fff; padding: .35rem .6rem; border-radius: 6px; background: rgba(0, 0, 0, .45); text-shadow: 0 1px 2px #000;
}
.rec::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--offline); animation: blink 1.2s steps(2, start) infinite; }
.player[data-state="playing"] .rec { display: inline-flex; }
.overlay {
  position: absolute; inset: 0; z-index: 3; display: none; align-items: center; justify-content: center; flex-direction: column; gap: .8rem;
  color: #fff; text-align: center; padding: 1rem; pointer-events: none; font-weight: 700; letter-spacing: .01em;
  background: radial-gradient(circle at center, rgba(15, 23, 42, .55), rgba(2, 6, 23, .85));
}
.overlay small { font-weight: 500; color: #cbd5e1; }
.overlay-offline { /* "no signal" static */
  background:
    radial-gradient(circle at center, rgba(2, 6, 23, .55), rgba(2, 6, 23, .9)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, #c0c0c0 0 14.28%, #c0c000 0 28.56%, #00c0c0 0 42.84%, #00c000 0 57.12%, #c000c0 0 71.4%, #c00000 0 85.68%, #0000c0 0);
}
.player[data-state="loading"] .overlay-loading { display: flex; }
.player[data-state="offline"] .overlay-offline { display: flex; }
.spinner { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--brand); border-right-color: var(--brand-2); animation: spin .9s linear infinite; }

.detail-side {
  align-self: start; padding: 1.35rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--shadow);
}
@media (min-width: 960px) { .detail-side { position: sticky; top: 88px; } }
.detail-side h2 { display: flex; align-items: center; gap: .5rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.detail-side h2:first-child { margin-top: 0; }
.detail-side h2::before { content: ""; width: 14px; height: 2px; border-radius: 2px; background: var(--brand); }
.copy { display: grid; gap: .5rem; }
.copy input { width: 100%; font-size: .8rem; font-family: var(--mono); padding: .65rem .75rem; color: #fde68a; }
.copy button { width: 100%; }
.copy-msg { min-height: 1.4em; color: var(--online); margin: .45rem 0; font-weight: 600; }
.related { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.related a { display: flex; gap: .75rem; align-items: center; color: inherit; text-decoration: none; padding: .45rem; margin: 0 -.45rem; border-radius: 12px; transition: background .2s; }
.related a:hover { background: rgba(148, 163, 184, .08); }
.related a:hover img { box-shadow: 0 0 0 2px var(--brand); }
.related img { width: 104px; height: 58px; object-fit: cover; border-radius: 8px; background: #1f2933; flex: none; transition: box-shadow .2s; }
.related span { font-weight: 600; font-size: .92rem; line-height: 1.35; }

/* ------------------------------------------------------------------- map */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: .75rem 1.5rem; margin: 1.75rem 0 1rem; }
.page-head h1 { margin: 0 0 .25rem; }
.page-head p { margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.legend li { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .75rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.legend li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--unknown); box-shadow: 0 0 0 3px rgba(148, 163, 184, .2); }
.legend .l-online::before { background: var(--online); box-shadow: 0 0 0 3px rgba(34, 197, 94, .25); }
.legend .l-offline::before { background: var(--offline); box-shadow: 0 0 0 3px rgba(239, 68, 68, .25); }
.map-frame { padding: 8px; border-radius: calc(var(--radius) + 6px); background: linear-gradient(145deg, rgba(148, 163, 184, .14), rgba(148, 163, 184, .03)); border: 1px solid var(--line); box-shadow: var(--shadow); }
.map { height: 72vh; min-height: 380px; border-radius: var(--radius); background: #0b1220; }
.map .leaflet-tile-pane { filter: invert(1) hue-rotate(195deg) brightness(.92) contrast(.88) saturate(.6); }
.map .leaflet-popup-content-wrapper, .map .leaflet-popup-tip { background: var(--surface-solid); color: var(--text); border: 1px solid var(--line-hi); box-shadow: var(--shadow); }
.map .leaflet-popup-content-wrapper { border-radius: 12px; }
.map.leaflet-container .leaflet-popup-content { margin: .8rem 1rem; font: inherit; font-size: .88rem; line-height: 1.45; }
.map.leaflet-container .leaflet-popup-content a { color: var(--brand); text-decoration: none; }
.map .leaflet-popup-close-button { color: var(--muted); }
.map .leaflet-bar a { background: var(--surface-solid); color: var(--text); border-color: var(--line-hi); }
.map .leaflet-bar a:hover { background: var(--surface-hi); }
.map.leaflet-container .leaflet-control-attribution { background: rgba(7, 11, 20, .75); color: var(--muted); }
.map.leaflet-container .leaflet-control-attribution a { color: #cbd5e1; }
.map-pop-status { display: inline-block; margin-top: .35rem; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.map-pop-status.online { color: var(--online); } .map-pop-status.offline { color: var(--offline); } .map-pop-status.unknown { color: var(--unknown); }

/* ----------------------------------------------------------------- prose */
.prose { max-width: 48rem; padding: .5rem 0; }
.prose h1 { margin-top: 2rem; }
.prose > p:first-of-type { font-size: 1.1rem; color: #cbd5e1; }
.prose h2 { font-size: 1.35rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.prose p, .prose li { color: #cbd5e1; }
.prose strong { color: var(--text); }
.prose ul { padding-left: 0; list-style: none; display: grid; gap: .55rem; }
.prose li { position: relative; padding: .7rem 1rem .7rem 2.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.prose li::before { content: ""; position: absolute; left: 1rem; top: 1.2rem; width: 8px; height: 8px; border-radius: 2px; background: var(--brand); transform: rotate(45deg); }
.prose pre { background: #050811; color: #fde68a; padding: 1rem 1.1rem; border-radius: 12px; overflow-x: auto; border: 1px solid var(--line-hi); font-family: var(--mono); font-size: .88rem; }

/* ----------------------------------------------------------------- error */
.error-page { display: grid; justify-items: center; text-align: center; padding: 3.5rem 0 2rem; }
.no-signal {
  position: relative; width: min(420px, 100%); aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem;
  border: 1px solid var(--line-hi); box-shadow: var(--shadow);
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .25) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, #c0c0c0 0 14.28%, #c0c000 0 28.56%, #00c0c0 0 42.84%, #00c000 0 57.12%, #c000c0 0 71.4%, #c00000 0 85.68%, #0000c0 0);
}
.no-signal span {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: .5rem 1rem; border-radius: 6px;
  font: 800 1rem/1 var(--mono); letter-spacing: .25em; color: #fff; background: rgba(0, 0, 0, .75); animation: blink 2s steps(2, start) infinite;
}
.error-page h1 { margin: .5rem 0; }
.error-page p { color: var(--muted); max-width: 46ch; }

/* ------------------------------------------------------------ animations */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .7); } 70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .7); } 70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes drive { to { background-position: 64px 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .spinner { animation: spin 2.5s linear infinite !important; }
}

/* ---------------------------------------------------------------- mobile */
@media (max-width: 560px) {
  .site-header .wrap { padding-block: .6rem; gap: .6rem; }
  .site-header nav { width: 100%; justify-content: space-between; }
  .site-header nav a { flex: 1; text-align: center; }
  .hero { padding-top: 1.75rem; }
  .filters button { flex: 1 1 100%; }
  .viewfinder { display: none; }
}
