/* Trending Views — public site styles. Desktop first; phones follow at the bottom. */

:root {
  --paper: #F8F6F1;
  --surface: #FFFFFF;
  --ink: #16191F;
  --ink-2: #3A3F48;
  --muted: #6B7280;
  --line: #E4E0D7;
  --line-2: #D4CFC3;
  --red: #C4202B;
  --red-ink: #A3161F;
  --on-red: #FFFFFF;
  --navy: #15325B;
  --gold: #B8891C;
  --badge-breaking-bg: #C4202B; --badge-breaking-fg: #fff;
  --badge-rising-bg: #FBE9C5;   --badge-rising-fg: #7A5300;
  --badge-new-bg: #E3ECF8;      --badge-new-fg: #15325B;
  --shadow: 0 1px 2px rgba(20,20,30,.05), 0 6px 20px rgba(20,20,30,.05);
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1217; --surface: #171B22; --ink: #ECE9E2; --ink-2: #C9C6BE; --muted: #9AA1AC;
    --line: #262C36; --line-2: #343B47; --red: #FF5A63; --red-ink: #FF7A81; --on-red: #16100F; --navy: #9DBDEA; --gold: #E1B44A;
    --badge-breaking-bg: #E0323C; --badge-breaking-fg: #fff;
    --badge-rising-bg: #3C2F12; --badge-rising-fg: #F2CB6B;
    --badge-new-bg: #1C2A40; --badge-new-fg: #AECBF5;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F1217; --surface: #171B22; --ink: #ECE9E2; --ink-2: #C9C6BE; --muted: #9AA1AC;
  --line: #262C36; --line-2: #343B47; --red: #FF5A63; --red-ink: #FF7A81; --on-red: #16100F; --navy: #9DBDEA; --gold: #E1B44A;
  --badge-breaking-bg: #E0323C; --badge-breaking-fg: #fff;
  --badge-rising-bg: #3C2F12; --badge-rising-fg: #F2CB6B;
  --badge-new-bg: #1C2A40; --badge-new-fg: #AECBF5;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 18px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; }
.site-header::after { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--red) 0 62%, var(--navy) 62% 88%, var(--gold) 88%); }
.header-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 22px 24px 16px; }
.masthead { display: flex; flex-direction: column; gap: 2px; }
.masthead:hover { text-decoration: none; }
.masthead-name { font-family: var(--serif); font-weight: 700; font-size: 44px; line-height: 1; letter-spacing: -.01em; color: var(--ink); }
.masthead-tag { font-size: 15px; color: var(--muted); letter-spacing: .01em; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav > a { font-weight: 600; font-size: 17px; padding: 8px 14px; border-radius: 8px; color: var(--ink-2); }
.site-nav > a:hover { background: var(--paper); text-decoration: none; }
.site-nav > a.on { color: var(--red); box-shadow: inset 0 -3px 0 var(--red); border-radius: 8px 8px 0 0; }
.theme { display: inline-flex; margin-left: 14px; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; background: var(--paper); }
.theme button { appearance: none; border: 0; background: transparent; color: var(--muted); width: 36px; height: 30px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; }
.theme button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.theme button:hover { color: var(--ink); }

/* ---------- page heads ---------- */
.page-head { padding: 34px 0 10px; }
.page-head h1 { font-family: var(--serif); font-weight: 700; font-size: 40px; line-height: 1.05; margin: 0 0 8px; letter-spacing: -.01em; }
.page-sub { margin: 0; color: var(--muted); font-size: 17px; }
.updated { color: var(--gold); font-weight: 600; }
.updated::before { content: "•"; margin: 0 6px 0 2px; color: var(--line-2); }
.filter { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.filter label { font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.filter select { font: inherit; font-size: 16px; padding: 8px 36px 8px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); max-width: 320px; }
.filter .clear { font-size: 15px; color: var(--navy); }
.empty { padding: 48px 0; color: var(--muted); font-size: 18px; }

/* ---------- columns ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; padding: 8px 0 60px; align-items: start; }
.main { min-width: 0; }

/* ---------- shared bits ---------- */
.hl { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: -.005em; }
.hl a:hover { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.meta { margin: 6px 0 0; font-size: 14.5px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: baseline; }
.meta .dot { margin: 0 7px; color: var(--line-2); }
.meta .outlet { font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .05em; font-size: 13px; }
.meta .comments { color: var(--muted); }
.meta .comments:hover { color: var(--red); }
.coverage { color: var(--gold); font-weight: 600; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; padding: 3px 9px; border-radius: 4px; margin-bottom: 8px; }
.badge-breaking { background: var(--badge-breaking-bg); color: var(--badge-breaking-fg); }
.badge-rising { background: var(--badge-rising-bg); color: var(--badge-rising-fg); }
.badge-new { background: var(--badge-new-bg); color: var(--badge-new-fg); }
.excerpt { margin: 8px 0 0; color: var(--ink-2); font-size: 17px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- trending list ---------- */
.trend-list { list-style: none; margin: 0; padding: 0; }
.trend { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.trend:first-child { border-top: 0; }
.rank { font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: 1; color: var(--gold); padding-top: 4px; text-align: right; padding-right: 6px; font-variant-numeric: tabular-nums; }
.trend .hl { font-size: 24px; line-height: 1.22; }
.trend.lead { grid-template-columns: 56px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px 28px 24px 18px; margin: 6px 0 10px; box-shadow: var(--shadow); }
.trend.lead .rank { color: var(--red); font-size: 36px; }
.trend.lead .hl { font-size: 34px; line-height: 1.12; }
.trend.lead .excerpt { -webkit-line-clamp: 3; font-size: 18px; margin-top: 12px; }

/* ---------- latest list ---------- */
.latest-list { list-style: none; margin: 0; padding: 0; }
.latest-list .day { font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 26px 0 8px; border-bottom: 2px solid var(--ink); margin-bottom: 4px; }
.latest-list .day:first-child { padding-top: 10px; }
.latest-list .item { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.when { font-size: 14px; color: var(--muted); padding-top: 5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.latest-list .hl { font-size: 21px; line-height: 1.28; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 26px 0 0; font-weight: 600; }
.pager a { color: var(--navy); }
.pager-n { color: var(--muted); font-weight: 400; font-size: 15px; }

/* ---------- sidebar ---------- */
.side { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px 18px; position: sticky; top: 20px; }
.side-h { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin: 0 0 10px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.side-list { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.side-list li { padding: 11px 0; border-bottom: 1px solid var(--line); display: grid; gap: 3px; }
.side-list li:last-child { border-bottom: 0; }
.side-list a { font-family: var(--serif); font-weight: 600; font-size: 18px; line-height: 1.28; }
.side-list.ranked li { grid-template-columns: 26px minmax(0, 1fr); grid-template-areas: "n t" "n m"; column-gap: 8px; }
.side-list.ranked li::before { counter-increment: s; content: counter(s); grid-area: n; font-family: var(--serif); font-weight: 700; color: var(--gold); font-size: 20px; line-height: 1.15; }
.side-list.ranked a { grid-area: t; }
.side-list.ranked .side-meta { grid-area: m; }
.side-meta { font-size: 13.5px; color: var(--muted); }
.side-more { display: inline-block; margin-top: 12px; font-weight: 600; font-size: 15px; color: var(--navy); }

/* ---------- story page ---------- */
.story-cols { padding-top: 34px; }
.story { min-width: 0; max-width: 780px; }
.kicker { margin: 0 0 14px; font-size: 15px; color: var(--muted); }
.kicker .outlet { font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .06em; font-size: 14px; }
.kicker .dot { margin: 0 8px; color: var(--line-2); }
.story-h { font-family: var(--serif); font-weight: 700; font-size: 44px; line-height: 1.1; letter-spacing: -.012em; margin: 0 0 20px; }
.story-excerpt { font-family: var(--serif); font-size: 23px; line-height: 1.5; color: var(--ink-2); margin: 0 0 26px; }
.cta { margin: 0 0 6px; }
.btn-read { display: inline-block; background: var(--red); color: var(--on-red); font-weight: 700; font-size: 19px; padding: 15px 26px; border-radius: 10px; box-shadow: 0 2px 0 var(--red-ink); }
.btn-read:hover { text-decoration: none; filter: brightness(1.06); transform: translateY(-1px); }
.source-note { margin: 0 0 32px; font-size: 14px; color: var(--muted); }
.also { border-top: 2px solid var(--ink); padding-top: 14px; margin-bottom: 36px; }
.also h2, .comments-box h2 { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin: 0 0 8px; }
.also ul { list-style: none; margin: 0; padding: 0; }
.also li { padding: 11px 0; border-bottom: 1px solid var(--line); display: grid; gap: 3px; }
.also li a { font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 1.3; }
.comments-box { border-top: 2px solid var(--ink); padding-top: 14px; }
.comments-box h2 { margin-bottom: 14px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 20px; }
.footer-row { display: flex; justify-content: space-between; gap: 32px; padding: 28px 24px 34px; font-size: 14.5px; color: var(--muted); }
.footer-name { display: block; font-family: var(--serif); font-weight: 700; font-size: 22px; color: var(--ink); margin-bottom: 4px; }
.footer-tag { display: block; max-width: 520px; }
.footer-links { display: flex; gap: 18px; align-items: center; white-space: nowrap; }
.footer-links a { font-weight: 600; color: var(--ink-2); }

/* ---------- tablet and phone ---------- */
@media (max-width: 980px) {
  .cols { grid-template-columns: 1fr; gap: 28px; }
  .side { position: static; }
  .story-h { font-size: 36px; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .header-row { flex-direction: column; align-items: stretch; gap: 10px; padding: 16px 16px 10px; }
  .masthead-name { font-size: 34px; }
  .site-nav { justify-content: space-between; }
  .site-nav > a { padding: 8px 10px; }
  .theme { margin-left: auto; }
  .page-head { padding-top: 22px; }
  .page-head h1 { font-size: 32px; }
  .trend { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 18px 0; }
  .rank { font-size: 24px; padding-right: 0; }
  .trend .hl { font-size: 21px; }
  .trend.lead { padding: 20px 18px 18px 12px; }
  .trend.lead .hl { font-size: 26px; }
  .trend.lead .rank { font-size: 28px; }
  .latest-list .item { grid-template-columns: 1fr; gap: 2px; }
  .when { padding-top: 0; }
  .latest-list .hl { font-size: 19px; }
  .story-cols { padding-top: 20px; }
  .story-h { font-size: 29px; }
  .story-excerpt { font-size: 20px; }
  .btn-read { display: block; text-align: center; font-size: 18px; }
  .footer-row { flex-direction: column; gap: 14px; }
  .footer-links { white-space: normal; flex-wrap: wrap; }
}

/* ---------- share bar (story page) ---------- */
.share { margin: 0 0 34px; }
.share-label { display: block; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 16px 8px 12px; cursor: pointer; line-height: 1; }
.share-btn:hover { text-decoration: none; border-color: var(--ink); }
.share-btn svg { flex: none; }
.share-facebook svg { color: #1877F2; }
.share-x svg { color: var(--ink); }
.share-reddit svg { color: #FF4500; }
.share-whatsapp svg { color: #25D366; }
.share-truth svg { color: #5448EE; }
.share-copy.done { border-color: var(--gold); color: var(--gold); }
@media (max-width: 640px) {
  .share-btn span { display: none; }
  .share-btn { padding: 10px 12px; }
  .share-btn svg { width: 22px; height: 22px; }
}

/* ---------- "Also at" line on Latest ---------- */
.also-at { margin: 6px 0 0; font-size: 14.5px; color: var(--muted); }
.also-at a { color: var(--navy); font-weight: 600; }

/* ---------- second sidebar box ---------- */
.side-col { display: grid; gap: 20px; position: sticky; top: 20px; align-self: start; }
.side-col .side { position: static; }
@media (max-width: 980px) { .side-col { position: static; } }

/* ---------- ad slots ---------- */
.ad { margin: 18px 0; min-height: 90px; }
.ad-row { list-style: none; padding: 6px 0; border-bottom: 1px solid var(--line); }
.side-col .ad { margin: 0; }
