/* leaked — design tokens
   Look: a confidential case file. Off-white paper, black typewriter ink, one red for
   rubber stamps, black redaction bars, a manila folder logo. Two inks only: black and red. */
:root {
  --paper: #f4f1e8;
  --card: #fbf9f3;
  --manila: #ddbd80;
  --ink: #161513;
  --ink-2: #4a463f;
  --muted: #7a7468;
  --line: #d9d3c4;
  --line-2: #bdb5a3;
  --red: #c8102e;
  --display: "Special Elite", "Courier Prime", "Courier New", monospace;
  --stamp: "Anton", Impact, "Arial Narrow", sans-serif;
  --type: "Courier Prime", "Courier New", Courier, monospace;
  --shadow: 0 1px 0 rgba(0,0,0,.04), 0 10px 30px rgba(40,30,10,.10);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--type); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; margin: 0; line-height: 1.05; }
.wrap {
  max-width: 1180px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.mono { font-family: var(--type); }
.eyebrow { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0; }
.blink { color: var(--red); animation: blink 1.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: rgba(244,241,232,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-2); }
.top-inner { display: flex; align-items: center; gap: 18px; min-height: 62px; padding-block: 8px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 1.6rem; letter-spacing: .02em; line-height: 1; }
.brand img { width: 40px; height: auto; display: block; }
.cats { display: flex; gap: 2px; flex: 1 1 320px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.cats::-webkit-scrollbar { display: none; }
.cats button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px 10px; color: var(--ink-2); white-space: nowrap; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.cats button:hover { color: var(--ink); }
.cats button[aria-current="true"] { color: var(--ink); border-bottom-color: var(--red); }
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line-2); padding: 0 12px; flex: 0 1 300px; min-width: 0; }
.search svg { flex: none; color: var(--muted); }
.search input { flex: 1; min-width: 0; background: none; border: 0; padding: 8px 0; outline: none; font-size: .9rem; }
.search input::placeholder { color: var(--muted); }
.search:focus-within { border-color: var(--ink); }

/* ticker: a black wire strip */
.ticker { background: var(--card); color: var(--ink-2); border-bottom: 1px solid var(--line-2); overflow: hidden; white-space: nowrap; font-size: .8rem; }
.ticker-track { display: inline-flex; gap: 44px; padding: 7px 0; animation: tick 70s linear infinite; }
.ticker-track b { color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-right: 8px; }
.ticker-track span::before { content: "— "; color: var(--line-2); }
@keyframes tick { to { transform: translateX(-50%); } }

/* hero */
.hero { padding-block: 54px 34px; display: grid; gap: 30px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: end; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.3rem, 5.4vw, 4.4rem); letter-spacing: -.01em; line-height: 1.1; max-width: 16ch; margin-top: 14px; }
.hero h1 em { font-style: normal; color: var(--red); }
.redact { position: relative; display: inline-block; color: transparent; animation: reveal 5s ease-in-out infinite; }
.redact::after { content: ""; position: absolute; inset: .16em -.06em .1em; background: var(--ink); animation: unredact 5s ease-in-out infinite; transform-origin: right; }
@keyframes unredact { 0%, 55% { transform: scaleX(1); } 65%, 90% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
@keyframes reveal { 0%, 58% { color: transparent; } 62%, 92% { color: var(--red); } 100% { color: transparent; } }
.lede { color: var(--ink-2); max-width: 56ch; margin: 18px 0 0; font-size: 1rem; }
.stats { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border: 1px solid var(--line-2); background: var(--card); }
.stats div { padding: 14px 16px; border-bottom: 1px dashed var(--line-2); }
.stats div:nth-child(odd) { border-right: 1px dashed var(--line-2); }
.stats div:nth-last-child(-n+2) { border-bottom: 0; }
.stats dt { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 6px 0 0; font-family: var(--display); font-size: 2.1rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stats dd small { font-family: var(--type); font-size: .8rem; color: var(--muted); margin-left: 8px; }
#stat-updated { font-family: var(--type); font-weight: 700; }

/* sections */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line-2); padding-bottom: 8px; }
.section-head h2 { font-family: var(--display); font-weight: 400; font-size: 1.5rem; }
.section-head .count { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; }
.hot { padding-block: 10px 34px; }
.hot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

/* cards: case files */
.card {
  background: var(--card); border: 1px solid var(--line-2); border-radius: 2px;
  padding: 30px 18px 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  text-align: left; width: 100%; position: relative;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover { border-color: var(--ink); box-shadow: var(--shadow); transform: translateY(-1px); }
.file { position: absolute; top: 9px; left: 18px; font-size: .68rem; letter-spacing: .16em; color: var(--muted); }
.card.hot-card { background: var(--card); border: 1px solid var(--ink-2); }
.card.hot-card::before { content: ""; position: absolute; top: -1px; right: 18px; width: 54px; height: 7px; background: var(--manila); border-radius: 0 0 3px 3px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cat { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
/* status as a rubber stamp: red when settled, black ink while unconfirmed */
.pill { font-family: var(--stamp); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; padding: 0 7px; border: 2px solid; border-radius: 3px; white-space: nowrap; transform: rotate(-5deg); line-height: 1.5; }
.pill[data-s="confirmed"]  { color: var(--red); }
.pill[data-s="debunked"]   { color: var(--red); text-decoration: line-through; text-decoration-thickness: 2px; }
.pill[data-s="developing"], .pill[data-s="rumor"] { color: var(--ink-2); }
.card h3 { font-family: var(--type); font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.hot-card h3 { font-family: var(--display); font-weight: 400; font-size: 1.45rem; line-height: 1.2; }
.card p { margin: 0; color: var(--ink-2); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.src { font-size: .72rem; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src b { color: var(--ink); font-weight: 700; }
.src b::before { content: "src: "; color: var(--muted); font-weight: 400; }
/* credibility as signal bars */
.cred { display: inline-flex; gap: 2px; align-items: flex-end; flex: none; height: 14px; }
.cred i { width: 4px; background: var(--line); display: block; }
.cred i:nth-child(1) { height: 4px; } .cred i:nth-child(2) { height: 6px; } .cred i:nth-child(3) { height: 9px; }
.cred i:nth-child(4) { height: 11px; } .cred i:nth-child(5) { height: 14px; }
.cred i.on { background: var(--ink-2); }
.cred span { font-size: .68rem; color: var(--muted); margin-left: 6px; align-self: center; }

/* feed */
.feed { padding-block: 10px 44px; }
.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: var(--card); padding: 5px 11px; font-size: .78rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--paper); color: var(--red); border-color: var(--red); }
.chip.topic { text-transform: none; letter-spacing: 0; }
.sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.sort select { background: var(--card); border: 1px solid var(--line-2); padding: 5px 8px; font-size: .8rem; }
.topics { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.topics .chip .mono { color: var(--muted); margin-left: 4px; }
.topics .chip[aria-pressed="true"] .mono { color: var(--red); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; border: 1px dashed var(--line-2); }

/* tip box */
.tip { padding-block: 10px 56px; }
.tip-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; background: var(--card); border: 1px dashed var(--line-2); padding: 28px; }
.tip-box h2 { font-family: var(--display); font-weight: 400; font-size: 2.2rem; margin-top: 6px; }
.tip-box p { color: var(--ink-2); margin: 10px 0 0; max-width: 46ch; }
.tip-stamp { justify-self: center; font-family: var(--stamp); font-size: 2rem; letter-spacing: .06em; text-transform: uppercase; color: var(--red); border: 4px solid var(--red); border-radius: 6px; padding: 6px 18px; transform: rotate(-8deg); text-align: center; line-height: 1.1; }
.tip-stamp small { display: block; font-family: var(--type); font-size: .75rem; letter-spacing: .14em; }

footer { border-top: 1px solid var(--line-2); padding-block: 26px 44px; color: var(--muted); font-size: .8rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer p { margin: 0; max-width: 70ch; }
footer strong { color: var(--ink); }

/* detail dialog: the opened file */
dialog { background: var(--card); color: var(--ink); border: 1px solid var(--line-2); border-radius: 2px; padding: 0; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 30px 80px rgba(20,15,5,.35); }
dialog::backdrop { background: rgba(22,21,19,.55); }
.detail { padding: 28px; display: grid; gap: 16px; }
.detail .card-top { align-items: flex-start; padding-right: 44px; }
.detail .pill { font-size: 1.2rem; transform: rotate(-7deg); border-width: 3px; }
.detail h2 { font-family: var(--display); font-weight: 400; font-size: 2rem; line-height: 1.15; }
.detail .summary { font-size: 1rem; margin: 0; }
.detail h4 { margin: 8px 0 6px; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.detail ul { margin: 0; padding-left: 18px; font-size: .92rem; }
.detail li { margin: 4px 0; }
.timeline { list-style: none; margin: 0; display: grid; gap: 6px; border-left: 1px solid var(--line-2); padding-left: 14px; }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; font-size: .9rem; }
.timeline time { font-size: .78rem; color: var(--muted); padding-top: 2px; }
.sources { display: flex; flex-wrap: wrap; gap: 6px; }
.sources span, .tags span { font-size: .75rem; border: 1px solid var(--line-2); padding: 3px 9px; background: var(--paper); }
.tags span::before { content: "#"; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.close { position: absolute; top: 12px; right: 12px; background: var(--paper); border: 1px solid var(--line-2); width: 34px; height: 34px; display: grid; place-items: center; z-index: 1; }
.close:hover { border-color: var(--ink); }
.detail-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px dashed var(--line-2); padding-top: 12px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hot-grid, .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tip-box { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  /* phones: header scrolls away so the feed gets the whole screen */
  .top { position: relative; }
  .top-inner { gap: 6px 10px; min-height: 0; padding-block: 10px 0; }
  .brand img { width: 34px; }
  .search { flex-basis: 100%; order: 3; margin-bottom: 10px; }
  .search input { font-size: 16px; padding: 10px 0; }
  .cats { order: 2; flex-basis: 100%; margin: 0 -16px; padding: 0 10px; }
  .cats button { padding: 10px 10px; }
  .hero { padding-block: 26px 22px; gap: 22px; }
  .hero h1 { font-size: 2.35rem; }
  .lede { font-size: .95rem; }
  .stats div { padding: 10px 12px; }
  .section-head h2 { font-size: 1.3rem; }
  /* filter rows scroll sideways instead of stacking */
  .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .chips, .topics { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .chips::-webkit-scrollbar, .topics::-webkit-scrollbar { display: none; }
  .chip { min-height: 40px; padding: 8px 13px; white-space: nowrap; flex: none; }
  .sort { justify-content: space-between; }
  .sort select { min-height: 40px; font-size: 16px; padding: 6px 10px; }
  .card { padding: 30px 16px 14px; }
  .card p { -webkit-line-clamp: 2; }
  /* detail opens as a near full-screen sheet */
  dialog { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-width: 1px 0 0; }
  .close { position: sticky; top: 10px; float: right; margin: 10px 10px 0 0; width: 40px; height: 40px; }
  .tip-stamp { font-size: 1.6rem; }
  .hot-grid, .cards { grid-template-columns: 1fr; }
  .stats dd { font-size: 1.9rem; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .detail { padding: 24px 18px; }
  .detail h2 { font-size: 1.6rem; }
  .tip-box { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .redact { color: var(--red); }
  .redact::after { display: none; }
}
.chip.more { border-style: dashed; color: var(--muted); }

/* CA banner */
.ca-bar { background: var(--card); border-bottom: 1px dashed var(--line-2); font-size: .82rem; }
.ca-inner { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; padding-block: 6px; }
.ca-label { font-family: var(--stamp); color: var(--red); border: 2px solid var(--red); border-radius: 3px; padding: 0 6px; letter-spacing: .08em; transform: rotate(-4deg); line-height: 1.4; }
.ca-addr { font-family: var(--type); color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-copy { border: 1px solid var(--ink-2); background: var(--paper); padding: 4px 12px; min-height: 32px; text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; flex: none; }
.ca-copy:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.ca-copy:disabled { opacity: .45; cursor: default; }
@media (max-width: 600px) {
  .ca-inner { justify-content: space-between; }
  .ca-copy { min-height: 38px; }
}
