:root {
  --charcoal: #1B1B1B;
  --charcoal-2: #2A2A2A;
  --sand: #D6C6A5;
  --cream: #F4EDE1;
  --rust: #D94F30;
  --muted: #6B6459;
  --kept: #5C8A66;
  --broken: #8A2E17;
  --partial: #B8860B;
  --mono: "Courier New", Courier, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Calibri, Arial, sans-serif;
  color: var(--charcoal);
  background: #FFFFFF;
  line-height: 1.5;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { color: var(--rust); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header { background: var(--charcoal); border-bottom: 3px solid var(--rust); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--rust);
}
.brand-mark-img { width: 20px; height: 20px; filter: brightness(0) invert(1); display: block; }
.brand-text { font-family: Georgia, "Times New Roman", serif; font-weight: bold; font-size: 20px; letter-spacing: 0.5px; }
.main-nav a { color: var(--sand); margin-left: 24px; font-size: 14px; font-weight: bold; letter-spacing: 0.5px; }
.main-nav a:hover { color: #fff; text-decoration: none; }

.topics-bar { background: var(--charcoal-2); border-top: 1px solid #3a3a3a; }
.topics-bar-inner { display: flex; gap: 22px; overflow-x: auto; padding: 9px 20px; }
.topics-bar a {
  color: var(--sand); font-size: 12px; font-weight: bold; text-transform: uppercase;
  letter-spacing: 0.6px; white-space: nowrap;
}
.topics-bar a:hover { color: #fff; text-decoration: none; }

.topic-tag {
  display: inline-block; font-size: 10.5px; font-weight: bold; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--rust); border-bottom: 2px solid var(--rust); padding-bottom: 1px;
}

/* Progress status chip on story cards — "how far along is this" at a glance */
.status-chip {
  display: block; font-size: 11.5px; font-weight: bold; color: var(--charcoal);
  margin: 8px 0 2px; line-height: 1.3;
}
.status-chip::before { content: "▸ "; color: var(--rust); }
.card.lead .status-chip { color: #fff; }
.card.lead .status-chip::before { color: var(--sand); }

/* Wire ticker */
.wire-ticker {
  background: #0F0F0F; border-bottom: 1px solid var(--charcoal-2);
  overflow: hidden; white-space: nowrap; position: relative;
}
.wire-ticker::before {
  content: "LIVE"; position: absolute; left: 0; top: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; padding: 0 14px; background: var(--rust); color: #fff;
  font-family: var(--mono); font-size: 10px; font-weight: bold; letter-spacing: 1.5px;
}
.wire-ticker::after {
  content: ""; position: absolute; left: 62px; top: 0; bottom: 0; width: 40px; z-index: 1;
  background: linear-gradient(to right, #0F0F0F, transparent);
}
.wire-ticker-viewport { padding-left: 62px; overflow: hidden; }
.wire-ticker-track {
  display: inline-flex; white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
}
.wire-ticker-track:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.wire-ticker-item {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 26px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.3px; color: var(--sand);
  border-right: 1px solid var(--charcoal-2);
}
.wire-ticker-item .tag {
  font-weight: bold; padding: 2px 7px; border-radius: 3px; font-size: 10px; letter-spacing: 0.5px;
}

/* Hero */
.hero { background: var(--charcoal); color: #fff; padding: 50px 0; }
.hero h1 { font-family: Georgia, serif; font-size: 34px; margin: 0 0 8px; }
.hero p { color: var(--sand); font-size: 16px; margin: 0; font-style: italic; }

/* Newsroom pulse stat bar */
.pulse-stats { display: flex; gap: 32px; margin-top: 28px; flex-wrap: wrap; border-top: 1px solid var(--charcoal-2); padding-top: 24px; }
.pulse-stat { min-width: 110px; }
.pulse-stat .num { font-family: Georgia, serif; font-size: 38px; font-weight: bold; display: block; line-height: 1; color: #fff; }
.pulse-stat .num.is-good { color: #8FC79A; }
.pulse-stat .num.is-bad { color: #E8836A; }
.pulse-stat .lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--sand); display: block; margin-top: 6px; }

/* Section headers */
.section { padding: 40px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { font-family: Georgia, serif; font-size: 22px; margin: 0; }
.section-head .see-all { font-size: 13px; font-weight: bold; }
.eyebrow { display: block; font-size: 12px; font-weight: bold; letter-spacing: 1.5px; color: var(--rust); margin-bottom: 4px; }

.section.tinted { background: var(--cream); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card {
  background: var(--cream); border-radius: 10px; padding: 20px;
  display: block; color: var(--charcoal);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 10px 24px rgba(27,27,27,0.12); }
.card h3 { margin: 6px 0 8px; font-family: Georgia, serif; font-size: 18px; }
.card p { margin: 0; font-size: 13.5px; color: var(--muted); }
.card-meta { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.card-thumb {
  display: block; width: calc(100% + 40px); height: 160px; object-fit: cover;
  margin: -20px -20px 14px; border-radius: 10px 10px 0 0;
}

/* Lead story treatment on homepage */
.lead-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-bottom: 18px; }
.card.lead { padding: 28px; background: var(--charcoal); color: #fff; }
.card.lead .card-meta { color: var(--sand); }
.card.lead h3 { font-size: 26px; margin: 10px 0 10px; line-height: 1.25; }
.card.lead p { color: var(--sand); font-size: 14.5px; }
.card.lead:hover { box-shadow: 0 10px 24px rgba(0,0,0,0.28); }
.card.lead .card-thumb { width: calc(100% + 56px); height: 260px; margin: -28px -28px 16px; }
.lead-side { display: flex; flex-direction: column; gap: 12px; }
.lead-side .card { padding: 14px 16px; }
.lead-side .card h3 { font-size: 15px; margin: 4px 0 4px; }
.lead-side .card p { display: none; }
.lead-side .card .card-thumb { width: calc(100% + 32px); height: 90px; margin: -14px -16px 10px; }

.ledger-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--charcoal-2); border-radius: 8px; padding: 14px 18px; margin-bottom: 10px;
  color: #fff; border: 1px solid transparent; transition: border-color 0.2s ease;
}
.ledger-row.on-light { background: #fff; border: 1px solid #eee; color: var(--charcoal); }
.ledger-row .lr-title { font-weight: bold; font-size: 14.5px; }
.ledger-row .lr-sub { font-size: 12px; color: var(--sand); margin-top: 3px; font-family: var(--mono); }
.ledger-row.on-light .lr-sub { color: var(--muted); }

.ledger-row.is-overdue { border-color: rgba(217,79,48,0.5); animation: overdue-pulse 2.6s ease-in-out infinite; }
.ledger-row.on-light.is-overdue { animation: overdue-pulse-light 2.6s ease-in-out infinite; }
@keyframes overdue-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217,79,48,0); }
  50% { box-shadow: 0 0 0 5px rgba(217,79,48,0.18); }
}
@keyframes overdue-pulse-light {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217,79,48,0); }
  50% { box-shadow: 0 0 0 4px rgba(217,79,48,0.14); }
}

.badge {
  display: inline-block; padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: bold; letter-spacing: 0.5px; text-transform: uppercase;
  white-space: nowrap;
}

/* Trending Now strip */
.trending-strip {
  display: flex; overflow-x: auto; border-top: 1px solid #eee; border-bottom: 1px solid #eee;
}
.trending-item {
  flex: 1 0 170px; min-width: 170px; display: flex; align-items: flex-start; gap: 10px;
  padding: 18px 16px; border-right: 1px solid #eee; color: var(--charcoal);
}
.trending-item:last-child { border-right: none; }
.trending-item:hover { background: var(--cream); text-decoration: none; }
.trending-rank {
  font-family: Georgia, serif; font-size: 32px; font-weight: bold; line-height: 0.9;
  color: var(--rust); opacity: 0.35; flex-shrink: 0;
}
.trending-item:nth-child(1) .trending-rank, .trending-item:nth-child(2) .trending-rank { opacity: 0.9; }
.trending-body h4 { margin: 2px 0 4px; font-family: Georgia, serif; font-size: 14px; line-height: 1.3; font-weight: bold; }
.trending-body .views { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* On the Record — anniversary/memory callout */
.otd-banner {
  background: #241A14; color: #fff; border-radius: 10px; padding: 22px 26px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.otd-banner .otd-mark {
  font-family: Georgia, serif; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--sand); border: 1px solid var(--sand); border-radius: 20px; padding: 6px 14px;
  flex-shrink: 0; white-space: nowrap;
}
.otd-banner .otd-text { font-size: 15px; line-height: 1.45; flex: 1; min-width: 220px; }
.otd-banner .otd-text a { color: #fff; font-weight: bold; text-decoration: underline; }
.otd-banner .otd-outcome { display: block; margin-top: 6px; font-size: 13px; color: var(--sand); }

/* Opinion & Analysis */
.opinion-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.opinion-card {
  background: #fff; border: 1px solid #eee; border-left: 5px solid var(--charcoal);
  padding: 20px 22px; display: block; color: var(--charcoal); transition: border-color 0.15s ease, transform 0.15s ease;
}
.opinion-card:hover { text-decoration: none; border-left-color: var(--rust); transform: translateY(-2px); }
.opinion-card .op-label {
  font-family: Georgia, serif; font-style: italic; font-size: 12px; color: var(--rust); letter-spacing: 0.3px;
}
.opinion-card h3 { font-family: Georgia, serif; font-style: italic; font-size: 19px; margin: 8px 0 10px; line-height: 1.3; }
.opinion-card p { font-size: 13.5px; color: var(--muted); margin: 0 0 16px; }
.opinion-byline { display: flex; align-items: center; gap: 10px; }
.opinion-byline .avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--charcoal); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold;
  font-family: Georgia, serif; flex-shrink: 0;
}
.opinion-byline .name { font-size: 13px; font-weight: bold; }
.opinion-byline .title { font-size: 11px; color: var(--muted); }

/* Byline on story page */
.byline-row { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.byline-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--charcoal); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: Georgia, serif;
  font-weight: bold; font-size: 13px; flex-shrink: 0;
}
.byline-name { font-size: 14px; font-weight: bold; }
.byline-title { font-size: 12px; color: var(--muted); }
.story-head.is-opinion h1 { font-style: italic; }

/* Track record leaderboard */
.leaderboard { background: #fff; border: 1px solid #eee; border-radius: 10px; padding: 6px 20px; }
.leaderboard-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid #eee; }
.leaderboard-row:last-child { border-bottom: none; }
.leaderboard-rank { font-family: Georgia, serif; font-size: 20px; font-weight: bold; color: var(--muted); width: 26px; flex-shrink: 0; }
.leaderboard-name { flex: 1; min-width: 0; }
.leaderboard-name a { color: var(--charcoal); font-weight: bold; font-size: 14.5px; }
.leaderboard-name .type { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.leaderboard-bar-wrap { flex: 1; height: 8px; background: var(--cream); border-radius: 6px; overflow: hidden; max-width: 160px; }
.leaderboard-bar { height: 100%; border-radius: 6px; background: var(--kept); }
.leaderboard-bar.is-bad { background: var(--broken); }
.leaderboard-pct { font-family: Georgia, serif; font-weight: bold; font-size: 16px; width: 48px; text-align: right; flex-shrink: 0; }

/* Story page */
.story-head { padding: 40px 0 20px; }
.story-head .cat { font-size: 12px; font-weight: bold; letter-spacing: 1px; color: var(--rust); text-transform: uppercase; }
.story-head h1 { font-family: Georgia, serif; font-size: 32px; margin: 8px 0 10px; }
.story-head .dek { font-size: 16px; color: var(--muted); margin: 0 0 14px; }
.story-body { font-size: 16px; }
.story-body p { margin: 0 0 16px; }

.story-hero-img {
  width: 100%; max-height: 440px; object-fit: cover; border-radius: 10px; display: block;
}

/* Progress tracking — current status line + optional stage stepper */
.progress-status {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--cream); border-radius: 8px; padding: 12px 18px; margin: 16px 0;
}
.progress-status-label {
  font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted);
}
.progress-status-value { font-size: 14.5px; font-weight: bold; color: var(--charcoal); }

.stage-stepper {
  display: flex; flex-wrap: wrap; align-items: flex-start; list-style: none; margin: 0 0 20px; padding: 0;
}
.stage-stepper li {
  display: flex; align-items: center; gap: 8px; padding: 8px 0; margin-right: 22px;
}
.stage-stepper li:not(:last-child)::after {
  content: ""; width: 22px; height: 1px; background: #ddd; margin-left: 14px;
}
.stage-dot { width: 10px; height: 10px; border-radius: 50%; background: #ddd; flex-shrink: 0; display: inline-block; }
.stage-stepper li.is-reached .stage-dot { background: var(--kept); }
.stage-stepper li.is-reached .stage-label { color: var(--charcoal); font-weight: bold; }
.stage-stepper .stage-label { font-size: 13px; color: var(--muted); }
.stage-stepper .stage-date { font-size: 10.5px; color: var(--muted); font-family: var(--mono); margin-left: 2px; }

.reply-clock {
  background: var(--cream); border-radius: 8px; padding: 16px 20px; margin: 20px 0;
  display: flex; align-items: center; gap: 12px; font-size: 14px;
}
.reply-clock .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot.waiting { background: var(--rust); }
.dot.responded { background: var(--kept); }

.timeline { margin: 30px 0; }
.timeline-item { border-left: 3px solid var(--sand); padding: 4px 0 4px 20px; margin-bottom: 18px; position: relative; }
.timeline-item::before {
  content: ""; position: absolute; left: -7px; top: 6px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--rust);
}
.timeline-item .ts { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.timeline-item .content { margin-top: 4px; font-size: 14.5px; }

.related-ledger { background: var(--charcoal); color: #fff; border-radius: 10px; padding: 20px; margin: 30px 0; }
.related-ledger h3 { margin: 0 0 14px; font-family: Georgia, serif; font-size: 16px; color: var(--sand); }

/* Institution page */
.inst-head { background: var(--charcoal); color: #fff; padding: 40px 0; }
.inst-head .type { font-size: 12px; color: var(--rust); font-weight: bold; letter-spacing: 1px; text-transform: uppercase; }
.inst-head h1 { font-family: Georgia, serif; font-size: 30px; margin: 8px 0; }
.inst-head p { color: var(--sand); max-width: 700px; margin: 0; }

.stat-row { display: flex; gap: 16px; margin: 24px 0; flex-wrap: wrap; }
.stat-box { background: var(--cream); border-radius: 10px; padding: 16px 20px; min-width: 130px; text-align: center; }
.stat-box .num { font-family: Georgia, serif; font-size: 30px; font-weight: bold; display: block; }
.stat-box .lbl { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Ledger page */
.filter-bar { margin-bottom: 20px; }
.filter-bar a {
  display: inline-block; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: bold;
  margin-right: 8px; background: var(--cream); color: var(--charcoal);
}
.filter-bar a.active { background: var(--rust); color: #fff; text-decoration: none; }

/* Subscribe box (story page) */
.subscribe-box { background: var(--cream); border-radius: 8px; padding: 16px 20px; margin: 20px 0; }
.subscribe-form label { display: block; font-size: 13px; font-weight: bold; margin-bottom: 8px; }
.subscribe-form input[type=email], .subscribe-form input[type=search] {
  padding: 9px 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; font-family: inherit; flex: 1; min-width: 200px;
}
.sub-flash { margin: 0; font-size: 14px; color: var(--charcoal); font-weight: bold; }

/* Bounty progress bar */
.bounty-progress { background: #E7DFCF; border-radius: 20px; height: 10px; overflow: hidden; margin: 10px 0; }
.bounty-progress-fill { background: var(--kept); height: 100%; border-radius: 20px; }

/* Search box in header */
.search-box { display: flex; align-items: center; }
.search-box input[type=search] {
  padding: 6px 10px; border: 1px solid var(--charcoal-2); border-radius: 6px 0 0 6px; font-size: 13px;
  background: var(--charcoal-2); color: #fff; width: 140px;
}
.search-box input[type=search]::placeholder { color: var(--sand); }
.search-box button {
  padding: 6px 10px; border: none; border-radius: 0 6px 6px 0; background: var(--rust); color: #fff; cursor: pointer; font-size: 13px;
}

/* Footer */
.site-footer { background: var(--charcoal); color: var(--sand); padding: 24px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; font-size: 13px; }
.footer-links a { color: var(--sand); font-weight: bold; }

/* Admin */
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 30px 20px; }
.admin-nav { background: var(--charcoal); padding: 14px 0; margin-bottom: 30px; }
.admin-nav .wrap { display: flex; gap: 20px; align-items: center; }
.admin-nav a { color: var(--sand); font-weight: bold; font-size: 14px; }
.admin-nav a:hover { color: #fff; }
.admin-nav-brand {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--rust); flex-shrink: 0;
}
.admin-nav-brand img { width: 17px; height: 17px; filter: brightness(0) invert(1); display: block; }
.admin-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.admin-brand img {
  width: 30px; height: 30px; padding: 7px; box-sizing: content-box; border-radius: 50%;
  background: var(--rust); filter: brightness(0) invert(1);
}
.admin-brand span { font-family: Georgia, serif; font-weight: bold; font-size: 18px; color: var(--charcoal); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: bold; font-size: 13px; margin-bottom: 5px; }
.form-group input[type=text], .form-group input[type=date], .form-group input[type=password],
.form-group input[type=url], .form-group input[type=email], .form-group input[type=number],
.form-group input[type=search], .form-group input[type=file],
.form-group select, .form-group textarea {
  width: 100%; padding: 9px 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; font-family: inherit;
}
.form-group textarea { min-height: 120px; }
.hero-uploader, .uploader { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.url-paste-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.url-paste-row .url-paste-or { font-size: 12px; color: var(--muted); white-space: nowrap; }
.url-paste-row input[type=url] { width: auto; flex: 1 1 260px; min-width: 180px; padding: 7px 10px; font-size: 13px; }

.stage-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.stage-row input[type=text] { width: auto; flex: 1 1 220px; min-width: 160px; }
.stage-reached-label { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: normal; white-space: nowrap; margin-bottom: 0; }
.stage-reached-label input[type=checkbox] { width: auto; }
.btn {
  display: inline-block; background: var(--rust); color: #fff; border: none; padding: 10px 20px;
  border-radius: 6px; font-weight: bold; font-size: 14px; cursor: pointer;
}
.btn:hover { opacity: 0.9; text-decoration: none; }
.btn.secondary { background: var(--charcoal); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-bottom: 30px;}
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eee; }
.admin-table th { background: var(--cream); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.flash { padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; background: #DDF2E1; color: #1a5c2e; font-size: 14px; }
.flash.error { background: #FBE1DC; color: #8A2E17; }
.admin-card { background: var(--cream); border-radius: 8px; padding: 20px; margin-bottom: 20px; }

@media (max-width: 700px) {
  .grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; height: auto; padding: 14px 0; gap: 10px; }
  .main-nav a { margin-left: 14px; }
  .lead-grid { grid-template-columns: 1fr; }
  .pulse-stats { gap: 20px; }
  .leaderboard-name a { font-size: 13.5px; }
  .leaderboard-bar-wrap { max-width: 80px; }
  .opinion-grid { grid-template-columns: 1fr; }
  .trending-item { min-width: 140px; padding: 14px 12px; }
  .otd-banner { padding: 18px; }
}
