/* =============================================================================
 * Otto the Watchdog — Subway theme
 * Vignelli/MTA wayfinding adapted to a citizen-press publication. Black tile,
 * route-bullet badges, big Helvetica, arrows. The site reads as a public
 * information system for citizen rights.
 * ============================================================================= */

:root {
  /* tile + paper */
  --tile:     #0d0d0d;
  --tile-2:   #1a1a1a;
  --paper:    #ffffff;
  --rail:     #404040;
  --hairline: #5a5a5a;
  --muted:    #8a8a8a;

  /* route colors */
  --r-red:    #EE352E;   /* tip line */
  --r-blue:   #0039A6;   /* subscribe */
  --r-green:  #00933C;   /* support */
  --r-yel:    #FCCC0A;   /* live / about */
  --r-orange: #FF6319;   /* filings / front */

  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "Roboto Mono", ui-monospace, monospace;

  --maxw: 1200px;

  color-scheme: dark;

  /* -----------------------------------------------------------------------
   * User-pickable theme tokens. These are overridden by stylesheets under
   * web/static/css/themes/<id>.css when <html data-theme="<id>"> is set.
   * Default values match the Subway look so the site renders identically
   * when no theme is selected. See internal/themes for the catalog.
   * --------------------------------------------------------------------- */
  --bg:           #0d0d0d;
  --fg:           #ffffff;
  --muted-fg:     #8a8a8a;
  --accent:       #FCCC0A;
  --accent-fg:    #0d0d0d;
  --border:       #5a5a5a;
  --shadow:       none;
  --radius:       0;
  --font-body:    "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-headline:"Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--tile);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--r-yel); color: var(--tile); }

a { color: var(--paper); text-decoration: underline; text-decoration-color: var(--rail); text-underline-offset: 3px; }
a:hover { color: var(--r-yel); text-decoration-color: var(--r-yel); }

img, video { max-width: 100%; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.4rem;
}

/* =============================================================================
 * platform top stripe — system status
 * ============================================================================= */
.platform {
  background: var(--tile);
  border-bottom: 6px solid var(--r-yel);
}
.platform-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.55rem 1.4rem;
  display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase;
}
.platform-inner .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--r-yel);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.platform-inner b { color: var(--r-yel); font-weight: 700; }
.platform-inner .spacer { flex: 1; }

/* =============================================================================
 * line-bullet primary nav
 * ============================================================================= */
.lines {
  background: var(--tile);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.lines-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem 1.4rem;
  display: flex; gap: 0.7rem; flex-wrap: wrap;
  font-weight: 700;
  font-size: 0.95rem; letter-spacing: 0.04em;
}
.lines-inner a {
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none; color: var(--paper);
  padding: 0.3rem 0.55rem;
}
.lines-inner a:hover { background: rgba(255,255,255,0.08); color: var(--paper); }
.lines-inner a[aria-current="page"] {
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 -3px 0 var(--r-yel);
}
.lines-inner .spacer { flex: 1; }
.lines-inner .stop {
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.18em;
  border: 1px solid var(--hairline);
  padding: 4px 10px;
  text-transform: uppercase;
  font-weight: 500;
  align-self: center;
}

/* route bullets — used in nav, on cards, on update items */
.bullet {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-grid; place-items: center;
  font-family: var(--sans); font-weight: 800;
  font-size: 0.95rem;
  color: var(--paper);
  flex-shrink: 0;
  letter-spacing: 0;
}
.bullet.big { width: 56px; height: 56px; font-size: 1.7rem; }
.b-orange { background: var(--r-orange); }
.b-red    { background: var(--r-red); }
.b-blue   { background: var(--r-blue); }
.b-green  { background: var(--r-green); }
.b-yel    { background: var(--r-yel); color: var(--tile); }

/* =============================================================================
 * brand strip — under the nav, sets context
 * ============================================================================= */
.brand {
  background: var(--tile);
  border-bottom: 1px solid var(--hairline);
}
.brand-inner { padding: 1.4rem 1.4rem 1.6rem; }
.brand-link { display: block; text-decoration: none; color: var(--paper); }
.brand-link:hover { color: var(--paper); }
.brand-uptown {
  display: block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--r-yel);
  margin-bottom: 0.4rem;
}
.brand-name {
  display: block;
  font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand-name .dim { color: var(--rail); padding: 0 0.15em; }

/* =============================================================================
 * shared page chrome
 * ============================================================================= */
main.container { padding-top: 2.4rem; padding-bottom: 3rem; }

.page-head { margin-bottom: 1.6rem; }
.page-head .kicker {
  font-family: var(--mono);
  font-size: 0.75rem; letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--r-yel);
  margin-bottom: 0.4rem;
}
.page-head h1 {
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 0 0 0.8rem;
}
.page-head .lede {
  font-weight: 500;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  margin: 0;
  max-width: 36em;
  color: rgba(255,255,255,0.82);
}
.page-head .lede a { color: var(--r-yel); text-decoration-color: rgba(252,204,10,0.4); }

/* =============================================================================
 * home page
 * ============================================================================= */
.hero {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 2rem;
  margin-bottom: 1.6rem;
  position: relative;
  padding: 1.4rem 0 1.8rem;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(255,255,255,0.04) 50%, transparent 50%),
    linear-gradient(90deg, rgba(255,255,255,0.05) 50%, transparent 50%);
  background-size: 80px 40px, 40px 40px;
  opacity: 0.10;
  pointer-events: none;
}
.hero > * { position: relative; }
@media (max-width: 880px) { .hero { grid-template-columns: 1fr; gap: 1.2rem; } }

.hero-kicker {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--r-yel);
  margin: 0 0 0.5rem;
}
.hero h1 {
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin: 0 0 0.8rem;
}
.hero h1 .dim { color: var(--rail); }
.hero-lede {
  font-weight: 500;
  font-size: clamp(1.05rem, 1.9vw, 1.35rem);
  margin: 0;
  max-width: 32em;
  color: rgba(255,255,255,0.88);
}
.hero-lede b { color: var(--paper); font-weight: 700; }

.hero-aside {
  border: 1px solid var(--hairline);
  padding: 1.1rem 1.2rem 1.2rem;
  background: var(--tile-2);
}
.hero-aside h3 {
  font-family: var(--mono);
  font-size: 0.74rem; letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--r-yel);
  margin: 0 0 0.7rem;
  font-weight: 500;
}
.hero-aside ul { list-style: none; padding: 0; margin: 0; }
.hero-aside li { margin: 0; border-top: 1px solid rgba(255,255,255,0.08); }
.hero-aside li:first-child { border-top: 0; }
.hero-aside li a {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.55rem 0;
  text-decoration: none;
  color: var(--paper);
  font-weight: 500;
  font-size: 0.95rem;
}
.hero-aside li a:hover { color: var(--r-yel); }
.hero-aside .bullet { width: 22px; height: 22px; font-size: 0.78rem; }

/* "next train" board */
.board {
  margin: 1.6rem 0;
  background: var(--tile);
  border: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  text-decoration: none;
  color: var(--paper);
  transition: border-color 0.14s, background 0.12s;
}
.board:hover { border-color: var(--r-yel); background: rgba(255,255,255,0.04); color: var(--paper); }
.board > * { padding: 0.95rem 1.2rem; }
.board > * + * { border-left: 1px solid var(--hairline); }
.board-label {
  font-family: var(--mono);
  font-size: 0.74rem; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--r-yel);
  margin: 0 0 0.2rem;
}
.board-next h2 {
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.01em;
  margin: 0;
}
.board-next h2 small {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  background: var(--r-yel); color: var(--tile);
  padding: 2px 7px;
  margin-left: 0.5rem;
  vertical-align: middle;
}
.board-eta {
  text-align: right;
  font-family: var(--mono);
  font-size: 1.1rem; font-weight: 700;
  letter-spacing: 0.12em;
}
.board-eta b { display: block; font-size: 2.4rem; line-height: 0.95; color: var(--r-yel); }
@media (max-width: 700px) {
  .board { grid-template-columns: 1fr; }
  .board > * + * { border-left: 0; border-top: 1px solid var(--hairline); }
  .board-eta { text-align: left; }
}

/* tri-line "ride" callouts */
.ride {
  margin-bottom: 2.2rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: 1px solid var(--hairline);
}
@media (max-width: 760px) { .ride { grid-template-columns: 1fr; } }
.ride a {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 1.05rem 1.2rem;
  text-decoration: none; color: var(--paper);
  font-weight: 700;
  letter-spacing: 0.04em;
  border-right: 1px solid var(--hairline);
  background: var(--tile);
}
.ride a:last-child { border-right: 0; }
@media (max-width: 760px) {
  .ride a { border-right: 0; border-bottom: 1px solid var(--hairline); }
  .ride a:last-child { border-bottom: 0; }
}
.ride a:hover { background: rgba(255,255,255,0.05); }
.ride small {
  display: block; font-weight: 500;
  font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
}

/* =============================================================================
 * updates — service notices
 * ============================================================================= */
.updates-section { margin-top: 2.4rem; border-top: 6px solid var(--r-yel); padding-top: 1.4rem; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap;
  margin-bottom: 1rem; gap: 0.8rem;
}
.section-head h2 {
  font-weight: 800;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  letter-spacing: -0.01em;
  margin: 0;
}
.section-more {
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--r-yel);
  text-decoration: none;
}
.section-more:hover { color: var(--paper); }

.updates-list {
  display: grid; gap: 0;
  border: 1px solid var(--hairline);
}
.update {
  display: grid;
  grid-template-columns: 64px 1fr 130px;
  gap: 0;
  border-bottom: 1px solid var(--hairline);
  background: var(--tile);
}
.update:last-child { border-bottom: 0; }
.update > * { padding: 0.95rem 1rem; }
.update > * + * { border-left: 1px solid var(--hairline); }
.update-pill { display: flex; align-items: center; justify-content: center; }
.update-pill .bullet { width: 32px; height: 32px; font-size: 0.95rem; }
.update-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.2rem;
  letter-spacing: -0.005em;
}
.update-title a { color: var(--paper); text-decoration: none; }
.update-title a:hover { color: var(--r-yel); }
.update-body { color: rgba(255,255,255,0.78); font-size: 0.94rem; margin-top: 0.3rem; }
.update-body p { margin: 0.3rem 0; }
.update-body a { color: var(--r-yel); }
.update-when {
  text-align: right;
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.update-when .kind {
  display: inline-block;
  margin-bottom: 0.25rem;
  color: var(--r-yel);
  font-weight: 500;
}
.update-when .kind-youtube { color: var(--r-red); }
.update-when .kind-facebook { color: var(--r-blue); }
.update-when .kind-manual { color: var(--r-orange); }
.update-when time { display: block; }
@media (max-width: 700px) {
  .update { grid-template-columns: 1fr; }
  .update > * + * { border-left: 0; border-top: 1px solid var(--hairline); }
  .update-when { text-align: left; }
}

/* =============================================================================
 * forms / intake (subscribe, tip)
 * ============================================================================= */
.intake {
  border: 1px solid var(--hairline);
  background: var(--tile);
  padding: 1.4rem 1.4rem 1.6rem;
  position: relative;
  margin: 1.4rem 0 2rem;
}
.intake::before {
  content: attr(data-stamp);
  position: absolute; top: -10px; left: 16px;
  background: var(--r-yel); color: var(--tile);
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 3px 10px;
  font-weight: 700;
}
.intake h2 {
  font-weight: 800;
  font-size: 1.3rem; letter-spacing: -0.01em;
  margin: 0 0 0.9rem;
}

.form { display: block; }
.form label {
  display: block;
  font-family: var(--mono);
  font-size: 0.74rem; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--r-yel);
  font-weight: 500;
  margin-top: 1rem; margin-bottom: 0.35rem;
}
.form input[type="text"],
.form input[type="email"],
.form input[type="url"],
.form textarea,
.form select {
  width: 100%;
  background: var(--tile-2);
  color: var(--paper);
  border: 1px solid var(--hairline);
  padding: 0.65rem 0.8rem;
  font: inherit;
  border-radius: 0;
}
.form input[type="file"] {
  width: 100%;
  background: var(--tile-2);
  color: var(--paper);
  border: 1px solid var(--hairline);
  padding: 0.55rem 0.6rem;
  font: inherit;
}
.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: 2px solid var(--r-yel);
  outline-offset: 0;
  border-color: var(--r-yel);
}
.form textarea { resize: vertical; min-height: 7em; }
.form-aside {
  margin-top: 1rem;
  border-top: 1px solid var(--hairline);
  padding-top: 0.6rem;
}
.form-aside summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--r-yel);
  padding: 0.3rem 0;
  list-style: none;
}
.form-aside summary::-webkit-details-marker { display: none; }
.form-aside summary::before { content: "▸ "; color: var(--r-yel); }
.form-aside[open] summary::before { content: "▾ "; }

progress {
  appearance: none;
  width: 100%;
  height: 8px;
  margin-top: 0.8rem;
  background: var(--tile-2);
  border: 1px solid var(--hairline);
  border-radius: 0;
}
progress::-webkit-progress-bar { background: var(--tile-2); }
progress::-webkit-progress-value { background: var(--r-yel); }
progress::-moz-progress-bar { background: var(--r-yel); }

/* notices */
.notice {
  padding: 0.8rem 1rem;
  border: 1px solid var(--hairline);
  border-left-width: 6px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.notice-success { border-left-color: var(--r-green); background: rgba(0,147,60,0.08); }
.notice-error   { border-left-color: var(--r-red);   background: rgba(238,53,46,0.08); }

/* alt channel block (push subscribe on subscribe.html) */
.alt-channel {
  margin-top: 2.2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--hairline);
}
.alt-channel h2 {
  font-weight: 800;
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
  letter-spacing: -0.005em;
}

/* =============================================================================
 * buttons
 * ============================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--paper);
  color: var(--tile);
  border: 1px solid var(--paper);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--r-yel); color: var(--tile); border-color: var(--r-yel); }
.btn-primary {
  background: var(--r-yel); color: var(--tile); border-color: var(--r-yel);
}
.btn-primary:hover { background: var(--paper); color: var(--tile); border-color: var(--paper); }
.btn-ghost {
  background: transparent; color: var(--paper); border-color: var(--hairline);
}
.btn-ghost:hover { background: var(--paper); color: var(--tile); border-color: var(--paper); }
.btn[disabled], .btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* =============================================================================
 * YouTube grid (latest videos / latest livestreams on home)
 * ============================================================================= */
.yt-section {
  margin-top: 2.4rem;
  border-top: 6px solid var(--r-yel);
  padding-top: 1.4rem;
}
.yt-section .section-head h2 {
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.yt-section .section-head h2 .bullet {
  width: 26px; height: 26px; font-size: 0.85rem;
}
.yt-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.yt-card {
  display: block; text-decoration: none; color: var(--paper);
  background: var(--tile);
  border: 1px solid var(--hairline);
  transition: border-color 0.14s, transform 0.08s;
}
.yt-card:hover { border-color: var(--r-yel); transform: translateY(-1px); color: var(--paper); }
.yt-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--tile-2);
  overflow: hidden;
}
.yt-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.yt-flag {
  position: absolute; top: 8px; left: 8px;
  background: var(--paper); color: var(--tile);
  font-family: var(--mono);
  font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 3px 7px;
}
.yt-flag-live {
  background: var(--r-red); color: var(--paper);
}
.yt-meta { padding: 0.85rem 1rem 1rem; }
.yt-meta h3 {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0 0 0.4rem;
  /* clamp to two lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.yt-when {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.74rem; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

/* =============================================================================
 * about / prose
 * ============================================================================= */
.prose {
  max-width: 36em;
  font-size: 1.05rem;
  line-height: 1.65;
}
.prose h2 {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.005em;
  margin: 1.6rem 0 0.5rem;
}
.prose p { margin: 0 0 1rem; color: rgba(255,255,255,0.86); }
.prose ul { margin: 0 0 1rem; padding-left: 1.4rem; }
.prose ul li { margin-bottom: 0.4rem; }
.prose a { color: var(--r-yel); }

/* =============================================================================
 * donate cards
 * ============================================================================= */
.donate-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 1rem;
}
.donate-card {
  display: block;
  padding: 1.3rem 1.3rem 1.4rem;
  background: var(--tile);
  border: 1px solid var(--hairline);
  text-decoration: none;
  color: var(--paper);
  position: relative;
  transition: border-color 0.14s, transform 0.08s;
}
.donate-card::before {
  content: attr(data-tier);
  position: absolute; top: 10px; right: 10px;
  background: var(--r-yel); color: var(--tile);
  font-family: var(--mono);
  font-size: 0.66rem; letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 2px 7px;
  font-weight: 700;
}
.donate-card:hover { border-color: var(--r-yel); transform: translateY(-1px); }
.donate-card h3 {
  font-weight: 800;
  font-size: 1.4rem; letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
}
.donate-card p { margin: 0; color: rgba(255,255,255,0.78); font-size: 0.93rem; }

/* =============================================================================
 * tip-done stamp
 * ============================================================================= */
.tip-done-stamp { margin: 1.5rem 0 1.2rem; }
.stamp {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.85rem; letter-spacing: 0.22em;
  text-transform: uppercase;
  background: var(--r-green);
  color: var(--paper);
  padding: 6px 12px;
  font-weight: 700;
}

/* =============================================================================
 * footer — bottom platform stripe
 * ============================================================================= */
.site-footer {
  margin-top: 3.2rem;
  background: var(--tile);
  border-top: 6px solid var(--r-yel);
  padding: 1.2rem 0 1.6rem;
}
.foot-inner {
  display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.18em;
  text-transform: uppercase;
}
.foot-inner a { color: var(--paper); text-decoration: none; }
.foot-inner a:hover { color: var(--r-yel); }
.foot-inner .dot-sep { color: var(--rail); }

.theme-switcher {
  max-width: var(--maxw);
  margin: 0.9rem auto 0;
  padding: 0 1.4rem;
  display: flex; gap: 0.5rem; align-items: center;
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.theme-switcher select {
  background: var(--tile-2);
  color: var(--paper);
  border: 1px solid var(--rail);
  padding: 0.25rem 0.4rem;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

/* =============================================================================
 * misc
 * ============================================================================= */
.muted { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.empty {
  padding: 2rem 1rem; text-align: center;
  color: rgba(255,255,255,0.55);
  font-family: var(--mono);
  font-size: 0.85rem; letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px dashed var(--hairline);
}
code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--tile-2);
  padding: 1px 6px;
  border: 1px solid var(--hairline);
}

/* ───────────────────────── ADA / WCAG 2.2 AA ─────────────────────────
   Shared accessibility primitives. Each themed CSS layers its own
   focus colour overrides on top of these defaults.
*/

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10000;
}
.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  background: #ffd400;
  color: #0d0d0d;
  font-weight: 700;
  text-decoration: none;
  outline: 3px solid #0d0d0d;
  outline-offset: 2px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}

/* Visible focus indicator for keyboard users on every interactive
   element. The default browser ring is suppressed by themed CSS in
   places; this restores a high-contrast ring everywhere. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #ffd400;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Don't show the focus ring when programmatically focusing the main
   landmark from the skip link. */
main:focus-visible,
[role="main"]:focus-visible {
  outline: none;
}

/* Honour the OS reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Screen-reader-only utility (visible only to AT). */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
