:root {
  /* palette — warm near-black, neutral ink, surgical gold + red */
  --bg-0: #090705;
  --bg-1: #100c08;
  --ink: #efe7d6;
  --ink-dim: #a8a08e;
  --ink-faint: #9a9180;
  --gold: #e8c47a;
  --gold-deep: #c79a48;
  --red: #ff5d49;
  --red-deep: #d23f2c;

  --rule: rgba(239, 231, 214, 0.14);
  --rule-strong: rgba(239, 231, 214, 0.42); /* interactive-control borders (>=3:1) */
  --rule-soft: rgba(239, 231, 214, 0.07);
  --surface: rgba(239, 231, 214, 0.022);
  --surface-hov: rgba(239, 231, 214, 0.05);

  /* status */
  --st-pardoned: #7fd49d;
  --st-commuted: #92b9e8;
  --st-pending: #e8c47a;
  --st-awaiting: #a8a08e;
  --st-denied: #ff6d59;
  --st-exonerated: #5fd0c8;
  --st-charged: #e8a44a;
  --st-seized: #ff8a6f;

  --maxw: 1180px;

  --font-display: "Instrument Serif", "New York", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background-color: var(--bg-0); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-optical-sizing: auto;
  color: var(--ink);
  background: radial-gradient(135% 95% at 50% -12%, #1a130b 0%, var(--bg-1) 44%, var(--bg-0) 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; transition: opacity 0.45s ease-out; }

.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 75% at 50% 0%, transparent 52%, rgba(0, 0, 0, 0.6) 100%),
    linear-gradient(180deg, rgba(8, 6, 4, 0.25), transparent 16%);
}

main, .topbar, .footer { position: relative; z-index: 2; }

input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }

/* ---------- Masthead ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 22px 28px 16px;
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 20px; height: 22px;
  background: linear-gradient(160deg, var(--gold), var(--gold-deep));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  box-shadow: 0 0 16px rgba(232, 196, 122, 0.45);
}
.brand-name {
  font-family: var(--font-mono); font-size: 13px;
  letter-spacing: 0.44em; color: var(--ink); padding-left: 3px;
}
.ticker {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.12em; color: var(--gold);
  border: 1px solid var(--rule); padding: 3px 8px;
}
.topbar-stats { display: flex; align-items: center; }
.visitor-pill {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim);
}
.visitor-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--st-pardoned); box-shadow: 0 0 8px var(--st-pardoned);
  animation: pulse 2.4s ease-in-out infinite;
}
.visitor-pill #visitor-count { color: var(--ink); font-weight: 700; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------- Hero ---------- */
.hero { position: relative; max-width: 940px; margin: 0 auto; padding: 112px 28px 14px; text-align: center; }
/* soft scrim mutes the eagle directly behind the type so it stays readable */
.hero::before {
  content: ""; position: absolute; inset: -4% -12% 6%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 62% 58% at 50% 46%, rgba(9, 7, 5, 0.82) 0%, rgba(9, 7, 5, 0.55) 42%, transparent 72%);
}
.display {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(50px, 8vw, 100px);
  line-height: 1; letter-spacing: 0.005em;
  margin: 0 auto; max-width: 15ch;
}
.danger-line {
  color: rgba(239, 231, 214, 0.82);
  text-shadow: 0 0 20px rgba(255, 93, 73, 0.18), 0 2px 36px rgba(0, 0, 0, 0.45);
  animation: refresh 6s ease-in-out infinite;
}
@keyframes refresh { 0%, 100% { opacity: 0.86; } 50% { opacity: 0.98; } }
.gold {
  background: linear-gradient(180deg, #f7e6b3 0%, var(--gold) 48%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.display .gold { font-style: italic; }
.subhead {
  max-width: 52ch; margin: 22px auto 0;
  color: var(--ink-dim); font-size: clamp(14px, 1.5vw, 17px); line-height: 1.65;
}

/* ---------- Search (segmented command bar) ---------- */
.searchrow {
  display: flex; align-items: stretch;
  max-width: 660px; margin: 38px auto 0;
  border: 1px solid var(--rule-strong); background: var(--surface);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.searchrow:focus-within {
  border-color: var(--gold-deep);
  box-shadow: inset 0 0 0 1px rgba(199, 154, 72, 0.4);
}
.searchwrap { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.searchwrap input {
  width: 100%; background: transparent; border: none; outline: none;
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  padding: 15px 16px 15px 46px;
}
.searchwrap input::placeholder { color: var(--ink-faint); }
.search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--ink-faint); pointer-events: none;
  transition: color 0.25s;
}
.searchrow:focus-within .search-icon { color: var(--gold); }
.random-btn {
  flex: none; border: none; border-left: 1px solid var(--rule);
  background: transparent; cursor: pointer; padding: 0;
  transition: background 0.18s;
}
.random-btn:hover { background: var(--surface-hov); }
.random-btn .rb-inner {
  display: flex; align-items: center; gap: 9px; height: 100%; padding: 0 18px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-dim); transition: color 0.18s;
}
.random-btn:hover .rb-inner { color: var(--gold); }
.random-btn svg { width: 15px; height: 15px; }

/* ---------- Stats ledger (full search-bar width, compact) ---------- */
.statsband { max-width: 660px; margin: 0 auto; padding: 6px 0 0; }
.hero-stats { display: flex; margin: 0; padding-top: 6px; }
.metric { flex: 1; text-align: center; padding: 0 6px; }
.metric + .metric { border-left: 1px solid var(--rule-soft); }
.metric-num {
  display: block; margin: 0; font-family: var(--font-display); font-weight: 400;
  font-size: 19px; line-height: 1; color: var(--ink);
}
.metric-label {
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-faint); margin-top: 4px;
}

/* ---------- Section heads ---------- */
.section-head {
  max-width: var(--maxw); margin: 0 auto 24px; padding: 0 28px 16px;
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(32px, 4.4vw, 50px); margin: 0; line-height: 0.95;
}
.section-head p {
  margin: 0; color: var(--ink-faint);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
}

/* ---------- Leaderboard (ranked rows) ---------- */
.leaderboard { max-width: var(--maxw); margin: 92px auto 0; }
.podium { list-style: none; margin: 0 auto; padding: 0 28px; max-width: var(--maxw); }
.podium li {
  display: flex; align-items: center; gap: 16px;
  padding: 15px 6px; border-bottom: 1px solid var(--rule-soft);
  cursor: pointer; transition: background 0.16s, padding-left 0.16s;
}
.podium li:first-child { border-top: 1px solid var(--rule-soft); }
.podium li:hover { background: var(--surface-hov); padding-left: 14px; }
.podium .rank {
  font-family: var(--font-display); font-size: 30px; font-weight: 400;
  color: var(--gold); width: 38px; text-align: center; flex: none;
}
.podium .avatar { width: 40px; height: 40px; }
.podium .pl-name { font-size: 15px; color: var(--ink); }
.podium .pl-views { font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); margin-top: 2px; }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 7px; flex-wrap: wrap; }
.filter {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-faint);
  border: 1px solid var(--rule-strong); background: none; padding: 6px 11px; cursor: pointer;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}
.filter:hover { color: var(--ink); border-color: var(--gold-deep); }
.filter[aria-selected="true"] { color: var(--bg-0); background: var(--ink); border-color: var(--ink); }

/* ---------- Registry (record entries) ---------- */
.registry { max-width: var(--maxw); margin: 88px auto 0; }
.grid {
  max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
}
.card {
  position: relative;
  border: 1px solid var(--rule);
  background: rgba(16, 12, 8, 0.32);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: 20px 20px 17px; cursor: pointer;
  display: flex; flex-direction: column; gap: 12px;
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease, background 0.18s, border-color 0.18s;
}
.card.in { opacity: 1; transform: none; }
.card:hover { background: rgba(28, 21, 13, 0.5); border-color: var(--gold-deep); }

/* Trump — a beveled solid-gold card that stands above the rest */
.card[data-id="donald-trump"] {
  border: 0;
  padding: 22px 22px 19px;
  background:
    linear-gradient(180deg, rgba(54, 40, 16, 0.66), rgba(28, 20, 9, 0.62)) padding-box,
    linear-gradient(135deg, #fbeebc 0%, #e6c074 30%, #9a7330 55%, #e6c074 78%, #fff3cf 100%) border-box;
  border: 3px solid transparent;
  box-shadow:
    inset 0 2px 0 rgba(255, 246, 214, 0.5),
    inset 0 -3px 6px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(120, 86, 30, 0.5),
    0 0 26px rgba(230, 192, 116, 0.28),
    0 16px 44px rgba(0, 0, 0, 0.6);
}
.card[data-id="donald-trump"]:hover {
  background:
    linear-gradient(180deg, rgba(66, 49, 19, 0.7), rgba(34, 24, 11, 0.66)) padding-box,
    linear-gradient(135deg, #fff3cf 0%, #f0d68f 30%, #b08a3c 55%, #f0d68f 78%, #fff7da 100%) border-box;
  box-shadow:
    inset 0 2px 0 rgba(255, 248, 222, 0.6),
    inset 0 -3px 6px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(140, 100, 36, 0.55),
    0 0 34px rgba(230, 192, 116, 0.42),
    0 18px 50px rgba(0, 0, 0, 0.62);
}
.card[data-id="donald-trump"] .card-name { color: var(--gold); }

.card-top { display: flex; gap: 14px; align-items: center; }
.avatar {
  width: 50px; height: 50px; border-radius: 0; flex: none;
  object-fit: cover; object-position: center top; /* fill the box, keep aspect ratio, no stretch */
  border: 1px solid var(--rule);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.6);
}
.card-id { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); letter-spacing: 0.18em; }
.card-title { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--gold-deep); }
.card-name {
  font-family: var(--font-display); font-size: 26px; font-weight: 400;
  line-height: 1.02; margin: 2px 0 3px; color: var(--ink);
}
.card-role { font-size: 12.5px; color: var(--ink-dim); }
.card-summary {
  font-size: 13.5px; line-height: 1.55; color: var(--ink-dim); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--rule-soft); padding-top: 12px; margin-top: auto;
}
.views { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-dim); }
.views svg { width: 14px; height: 14px; color: var(--gold); }
.views b { color: var(--gold); font-weight: 700; }

/* Status badges — square status dot + mono label */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-dim);
}
.badge::before { content: ""; width: 7px; height: 7px; background: var(--bdg, var(--gold)); }
.badge.pardoned { --bdg: var(--st-pardoned); color: var(--st-pardoned); }
.badge.commuted { --bdg: var(--st-commuted); color: var(--st-commuted); }
.badge.pending  { --bdg: var(--st-pending);  color: var(--st-pending); }
.badge.awaiting { --bdg: var(--st-awaiting); color: var(--st-awaiting); }
.badge.denied   { --bdg: var(--st-denied);   color: var(--st-denied); }
.badge.exonerated { --bdg: var(--st-exonerated); color: var(--st-exonerated); }
.badge.charged  { --bdg: var(--st-charged);  color: var(--st-charged); }
.badge.seized   { --bdg: var(--st-seized);   color: var(--st-seized); }
.badges { display: inline-flex; flex-wrap: wrap; gap: 7px 14px; align-items: center; }

.empty {
  text-align: center; color: var(--ink-faint);
  font-family: var(--font-mono); padding: 48px 0; letter-spacing: 0.06em;
}

/* ---------- Footer ---------- */
.footer {
  max-width: var(--maxw); margin: 96px auto 0; padding: 30px 28px 64px;
  border-top: 1px solid var(--rule); text-align: center;
}
.disclaimer { color: var(--ink-faint); font-size: 12px; line-height: 1.65; max-width: 72ch; margin: 0 auto; }
.disclaimer strong { color: var(--gold); }
.tech {
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint);
  letter-spacing: 0.08em; margin-top: 14px; text-transform: uppercase;
}

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 3, 2, 0.78); backdrop-filter: blur(6px); animation: fade 0.25s ease; }
.modal-card {
  position: relative; z-index: 1; width: min(620px, 100%);
  border: 1px solid var(--rule); background: var(--bg-1);
  padding: 32px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  animation: rise 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--ink-faint); font-size: 24px; line-height: 1; cursor: pointer; }
.modal-close:hover { color: var(--gold); }
.modal-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.modal-head .avatar { width: 72px; height: 72px; border-radius: 0; }
.modal-title { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 4px; }
.modal-name { font-family: var(--font-display); font-size: 40px; font-weight: 400; line-height: 1; margin: 0 0 6px; }
.modal-meta { font-size: 13px; color: var(--ink-dim); }
.modal-badges { margin-top: 10px; }
.modal-badges-foot { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--rule-soft); }
.modal-actions { margin: 20px 0 4px; }
.case-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--bg-0); background: var(--gold); border: 1px solid var(--gold);
  padding: 11px 20px; text-decoration: none; transition: background 0.18s, border-color 0.18s;
}
.case-btn:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.modal-summary { color: var(--ink); line-height: 1.7; font-size: 15px; margin: 18px 0; }
.modal-stats { display: flex; gap: 12px; margin: 18px 0; }
.mstat { flex: 1; border: 1px solid var(--rule); background: var(--surface); padding: 13px 15px; }
.mstat-num { display: block; font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1; color: var(--gold); }
.mstat-label { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }
.modal-row {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim);
  border-top: 1px solid var(--rule-soft); padding-top: 16px;
}
.modal-row .big { color: var(--gold); font-size: 14px; }
.modal-row .card-id { letter-spacing: 0.16em; }
.sources a { color: var(--gold); }

/* ---------- Case submission ---------- */
.submit { max-width: 720px; margin: 96px auto 0; padding: 0 28px; }
.submit .section-head { padding: 0; margin: 0 auto 22px; max-width: none; }
.submit-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }
.field-row { display: flex; gap: 16px; }
.field-row > .field { flex: 1; min-width: 0; }
.submit-form input[type="text"], .submit-form input[type="number"], .submit-form select, .submit-form textarea {
  width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 0;
  padding: 12px 14px; outline: none;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.submit-form textarea { resize: vertical; line-height: 1.55; }
.submit-form input:focus, .submit-form select:focus, .submit-form textarea:focus {
  border-color: var(--gold-deep); box-shadow: inset 0 0 0 1px rgba(199, 154, 72, 0.35);
}
.submit-form ::placeholder { color: var(--ink-faint); }
.field .req { color: var(--ink-faint); font-weight: 400; }
.field-error { display: block; margin-top: 6px; font-size: 12.5px; color: var(--red); }
.field-error:empty { display: none; }
.field-check { flex-direction: row; align-items: center; gap: 9px; }
.field-check input { width: 16px; height: 16px; accent-color: var(--gold); flex: none; }
.field-check .field-label { text-transform: none; letter-spacing: 0.02em; font-size: 12px; color: var(--ink-dim); }
.submit-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.submit-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--bg-0); background: var(--gold); border: 1px solid var(--gold);
  padding: 12px 22px; cursor: pointer; text-decoration: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.submit-btn:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.submit-btn.ghost { color: var(--ink-dim); background: transparent; border-color: var(--rule); }
.submit-btn.ghost:hover { color: var(--gold); border-color: var(--gold-deep); }
.submit-output { margin-top: 22px; }
.submit-note { color: var(--ink-dim); font-size: 13px; line-height: 1.65; margin: 0 0 12px; }
.submit-json {
  width: 100%; font-family: var(--font-mono); font-size: 12px; line-height: 1.55;
  color: var(--gold); background: var(--bg-1); border: 1px solid var(--rule);
  padding: 14px; resize: vertical; outline: none; margin-bottom: 14px;
}

/* Submit-a-case call to action (links to the dedicated page) */
.submit-cta { text-align: center; max-width: var(--maxw); margin: 96px auto 0; padding: 0 28px; }
.submit-cta p { color: var(--ink-dim); font-size: 15px; margin: 0 0 18px; }

/* Newsletter sign-up */
.newsletter { max-width: 540px; margin: 110px auto 0; padding: 0 28px; text-align: center; }
.newsletter h2 {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.04; margin: 0; color: var(--ink);
}
.newsletter-form {
  display: flex; align-items: stretch; max-width: 472px; margin: 26px auto 0;
  background: rgba(20, 15, 9, 0.55); border: 1px solid var(--rule-strong);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.newsletter-form:focus-within {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 1px var(--gold-deep), 0 10px 34px rgba(0, 0, 0, 0.45);
}
.newsletter-form input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  padding: 16px 18px; font: inherit; font-size: 15px; color: var(--ink);
}
.newsletter-form input::placeholder { color: var(--ink-faint); }
.newsletter-form button {
  border: 0; cursor: pointer; flex: none; white-space: nowrap;
  background: var(--gold); color: #15100a;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0 26px; transition: background 0.18s;
}
.newsletter-form button:hover { background: var(--gold-deep); }
.newsletter-note { color: var(--ink-faint); font-size: 12px; line-height: 1.65; margin: 16px 0 0; }
.newsletter-note a { color: var(--ink-dim); }
.newsletter-note.ok { color: var(--gold); }
.newsletter-note.err { color: var(--st-charged); }
@media (max-width: 480px) {
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { padding: 13px; }
}

/* Footer legal links */
.footer-links { margin: 14px 0 0; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-links a { color: var(--ink-dim); text-decoration: none; transition: color 0.18s; }
.footer-links a:hover { color: var(--gold); }

/* ---------- Accessibility ---------- */
/* Skip-to-content link: off-screen until focused by keyboard */
.skip-link {
  position: absolute; left: 12px; top: -64px; z-index: 100;
  background: var(--gold); color: #15100a; padding: 10px 16px;
  font-family: var(--font-mono); font-size: 13px; text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }
/* Clear, consistent keyboard focus indicator (WCAG 2.4.7 Focus Visible) */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.card:focus-visible { outline-offset: -2px; }

/* High contrast — applied automatically when the OS/browser asks for it
   (macOS "Increase Contrast", Windows, etc.). No on-page widget required;
   users control it from their own device settings. */
@media (prefers-contrast: more) {
  html {
    --ink: #ffffff; --ink-dim: #ffffff; --ink-faint: #e6e6e6;
    --gold: #ffe14d; --gold-deep: #ffe14d;
    --rule: #ffffff; --rule-strong: #ffffff; --rule-soft: rgba(255, 255, 255, 0.55);
    --surface: #000; --surface-hov: #111;
    --st-pardoned: #5cff9d; --st-commuted: #9ec9ff; --st-pending: #ffe14d; --st-awaiting: #ffffff;
    --st-denied: #ff9a86; --st-exonerated: #5ff2e8; --st-charged: #ffcf66; --st-seized: #ff9a86;
  }
  body { background: #000 !important; }
  #bg, .vignette { display: none !important; }
  .card, .modal-card, .searchrow, input, textarea, select, .newsletter-form {
    background: #000 !important; border-color: #fff !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  }
}

/* Legal pages (privacy, terms) */
.legal { max-width: 760px; margin: 60px auto 0; padding: 0 28px; }
.legal h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 5vw, 54px); line-height: 1.05; margin: 0 0 6px; color: var(--ink); }
.legal .updated { color: var(--ink-faint); font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 32px; }
.legal h2 { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; color: var(--gold-deep); margin: 34px 0 10px; }
.legal p, .legal li { color: var(--ink-dim); font-size: 15px; line-height: 1.78; }
.legal a { color: var(--gold); word-break: break-word; }
.legal ul { padding-left: 20px; margin: 0 0 14px; }
.legal li { margin: 6px 0; }
.back-link {
  display: inline-block; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim);
  text-decoration: none; margin-bottom: 24px; transition: color 0.18s;
}
.back-link:hover { color: var(--gold); }
a.brand { text-decoration: none; color: inherit; }

/* ---------- Dedicated case page ---------- */
.case { max-width: 780px; margin: 36px auto 0; padding: 0 28px; }
.case-head { display: flex; gap: 22px; align-items: center; margin: 22px 0 26px; }
.case-photo {
  width: 112px; height: 112px; flex: none; object-fit: cover;
  border: 1px solid rgba(230, 192, 116, 0.3);
  box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.6), 0 6px 20px rgba(0, 0, 0, 0.45);
}
.case-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); }
.case-name { font-family: var(--font-display); font-weight: 400; font-size: clamp(40px, 6.5vw, 72px); line-height: 1; margin: 4px 0 8px; }
.case-meta { color: var(--ink-dim); font-size: 14px; }
.case-badges { margin-top: 14px; }
.case-badges-foot { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--rule-soft); }
.case-stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 28px; }
.case-summary { font-size: 18px; line-height: 1.6; color: var(--ink); margin: 0 0 26px; }
.case-detail { color: var(--ink-dim); font-size: 15.5px; line-height: 1.78; }
.case-detail p { margin: 0 0 16px; }
.case-note { color: var(--ink-faint); font-style: italic; font-size: 14px; line-height: 1.7; border-left: 2px solid var(--rule); padding-left: 16px; }
.case-sources { margin: 30px 0 0; padding-top: 18px; border-top: 1px solid var(--rule-soft); font-family: var(--font-mono); font-size: 12px; color: var(--ink-dim); }
.case-sources a { color: var(--gold); word-break: break-all; }
.case-sources li { margin: 6px 0; }

/* smooth staggered reveal of the case content */
@keyframes caseUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.case-reveal > * { opacity: 0; animation: caseUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.case-reveal > *:nth-child(1) { animation-delay: 0.03s; }
.case-reveal > *:nth-child(2) { animation-delay: 0.10s; }
.case-reveal > *:nth-child(3) { animation-delay: 0.17s; }
.case-reveal > *:nth-child(4) { animation-delay: 0.24s; }
.case-reveal > *:nth-child(5) { animation-delay: 0.31s; }
.case-reveal > *:nth-child(6) { animation-delay: 0.38s; }
.case-reveal > *:nth-child(n + 7) { animation-delay: 0.45s; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .topbar { padding: 16px 18px 14px; }
  .brand-name { letter-spacing: 0.3em; font-size: 12px; }
  .ticker { display: none; }
  .hero { padding: 84px 20px 12px; }
  .grid, .podium { padding: 0 18px; }
  .random-btn .rb-inner > span { display: none; }
  .random-btn .rb-inner { padding: 0 14px; }
  .footer { padding: 26px 18px 48px; }

  /* stats ledger: keep all four metrics on a single row */
  .hero-stats { flex-wrap: nowrap; gap: 0; }
  .metric { flex: 1 1 0; min-width: 0; padding: 0 3px; }
  .metric + .metric { border-left: none; }
  .metric-num { font-size: 18px; }
  .metric-label { font-size: 8px; letter-spacing: 0.06em; }

  /* section heads stack; registry filters collapse into a horizontal scroll strip */
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; padding: 0 18px 14px; }
  .filters {
    width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: 0 0 auto; white-space: nowrap; }

  /* submission form: stack paired fields, tighten padding */
  .submit { padding: 0 18px; margin-top: 64px; }
  .field-row { flex-direction: column; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
  .card { opacity: 1; transform: none; }
}
