/* ==========================================================================
   GROUNDWORK — design tokens
   Palette: cool paper, ink navy, brass (verification/press accent), wire teal
   Type: Archivo Narrow (headlines, wire feel), Source Serif 4 (reading body),
         IBM Plex Mono (datelines, bylines, ticker, utility)
   ========================================================================== */

:root {
  --paper:        #EDEEE8;
  --paper-raised: #F7F7F2;
  --ink:          #1B2430;
  --ink-soft:     #4B5563;
  --ink-faint:    #8A93A0;
  --rule:         #C9CCC3;
  --brass:        #B8862E;
  --brass-dark:   #8F6A22;
  --teal:         #1F5F5B;
  --teal-dark:    #163F3C;
  --brick:        #A63A2E;

  --font-display: "Archivo Narrow", sans-serif;
  --font-body:    "Source Serif 4", Georgia, serif;
  --font-mono:    "IBM Plex Mono", monospace;

  --max-width: 1180px;
  --radius: 2px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
}
a:hover { color: var(--teal-dark); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  margin: 0 0 0.4em;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
}

/* ==========================================================================
   Wire ticker — signature element. A scrolling bulletin strip styled after
   AP/Reuters wire feeds: monospace, uppercase, timestamped, always moving.
   ========================================================================== */

.wire-ticker {
  display: flex;
  align-items: stretch;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
}

.wire-ticker__label {
  flex-shrink: 0;
  background: var(--brick);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 7px 14px;
  display: flex;
  align-items: center;
}

.wire-ticker__track {
  display: flex;
  align-items: center;
  animation: ticker-scroll 40s linear infinite;
  will-change: transform;
}

.wire-ticker:hover .wire-ticker__track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.wire-ticker__item {
  color: var(--paper);
  text-decoration: none;
  padding: 7px 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.wire-ticker__item:hover { color: var(--brass); text-decoration: underline; }

.wire-ticker__time {
  color: var(--brass);
  font-weight: 500;
}

.wire-ticker__sep {
  color: var(--ink-faint);
  margin: 0 16px;
}

/* ==========================================================================
   Masthead
   ========================================================================== */

.masthead {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px 0;
}

.masthead__row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--ink);
  position: relative;
}

.masthead__logo {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.masthead__logo-mark {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  background: var(--ink);
  color: var(--paper);
  padding: 3px 6px;
  letter-spacing: 0.05em;
}

.masthead__logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.01em;
}

.masthead__tagline {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0 0 0 auto;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  height: 2px;
  background: var(--ink);
  display: block;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 0;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.primary-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-decoration: none;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover,
.primary-nav a.is-active {
  border-bottom-color: var(--brass);
  color: var(--teal-dark);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
}

.btn--brass {
  background: var(--brass);
  color: #fff;
}
.btn--brass:hover { background: var(--brass-dark); color: #fff; }

.btn--outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn--outline:hover { background: var(--ink); color: var(--paper); }

.btn--block { display: block; width: 100%; text-align: center; }
.btn--nav { flex-shrink: 0; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ==========================================================================
   Main / content width
   ========================================================================== */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ==========================================================================
   Lead story
   ========================================================================== */

.lead-story {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 32px;
  margin-bottom: 32px;
}

.lead-story__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 8px;
}
.badge--developing {
  background: var(--brick);
  color: #fff;
}

.lead-story__category {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lead-story__headline {
  font-size: clamp(32px, 5vw, 54px);
  margin-bottom: 14px;
}
.lead-story__headline a {
  color: var(--ink);
  text-decoration: none;
}
.lead-story__headline a:hover { color: var(--teal-dark); }

.lead-story__dek {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 46em;
  margin-bottom: 14px;
}

.byline {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0;
}
.byline--small { font-size: 11.5px; }
.byline__dateline {
  color: var(--ink-faint);
  margin-left: 6px;
}

/* ==========================================================================
   Content grid: story list + sidebar
   ========================================================================== */

.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.content-grid--contact { grid-template-columns: 1.4fr 1fr; }

.story-list {
  display: grid;
  gap: 26px;
}

.story-list--full { margin-top: 8px; }

.story-card {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}
.story-card:last-child { border-bottom: none; }

.story-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.story-card__category {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal-dark);
  text-decoration: none;
}

.story-card__headline {
  font-size: 23px;
  margin-bottom: 8px;
}
.story-card__headline a {
  color: var(--ink);
  text-decoration: none;
}
.story-card__headline a:hover { color: var(--teal-dark); }

.story-card__dek {
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.story-card--compact .story-card__headline { font-size: 19px; }

/* Verification stamp — signature detail echoing a press credential stamp */
.stamp {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--brass-dark);
  border: 1.5px solid var(--brass-dark);
  padding: 2px 6px;
  transform: rotate(-3deg);
  white-space: nowrap;
}

.stamp--large {
  font-size: 11px;
  padding: 6px 10px;
  text-align: center;
  line-height: 1.4;
  margin-left: auto;
}
.stamp__sub { font-weight: 400; letter-spacing: 0.05em; }

/* ==========================================================================
   Sidebar: briefs + support modules
   ========================================================================== */

.sidebar {
  display: grid;
  gap: 24px;
}

.briefs {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  padding: 18px 20px;
}

.briefs__title {
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.briefs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.briefs__list a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14.5px;
  line-height: 1.4;
  display: block;
}
.briefs__list a:hover { color: var(--teal-dark); }

.briefs__time {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--brass-dark);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.support-module,
.tip-module {
  background: var(--ink);
  color: var(--paper);
  padding: 22px 20px;
}
.support-module h2,
.tip-module h2 {
  color: var(--paper);
  font-size: 19px;
}
.support-module p,
.tip-module p {
  color: #C7CBD1;
  font-size: 14.5px;
}
.tip-module {
  background: transparent;
  border: 2px solid var(--ink);
  color: var(--ink);
}
.tip-module h2 { color: var(--ink); }
.tip-module p { color: var(--ink-soft); }

.support-module__fine {
  font-size: 12px !important;
  margin-top: 10px;
}
.support-module__fine a { color: var(--brass); }

/* ==========================================================================
   Section blocks (e.g. Investigations)
   ========================================================================== */

.section-block {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 3px solid var(--ink);
}

.section-block__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-block__more {
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
}

.section-block__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.section-block--related { margin-top: 56px; }

/* ==========================================================================
   Article page
   ========================================================================== */

.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--brass);
  z-index: 50;
  transition: width 0.1s linear;
}

.article {
  max-width: 720px;
  margin: 0 auto;
}

.article__meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.article__meta .story-card__category {
  font-size: 12.5px;
}

.article__headline {
  font-size: clamp(30px, 4.5vw, 46px);
  margin-bottom: 12px;
}

.article__dek {
  font-size: 20px;
  color: var(--ink-soft);
  font-family: var(--font-body);
  margin-bottom: 18px;
}

.article__byline-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 30px;
}

.article__read-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}

.article__body {
  font-size: 19px;
  line-height: 1.7;
}
.article__body p { margin: 0 0 1.3em; }

.author-card {
  margin-top: 34px;
  padding: 16px 18px;
  background: var(--paper-raised);
  border-left: 3px solid var(--brass);
  font-size: 14.5px;
  color: var(--ink-soft);
}

.article__actions {
  margin-top: 30px;
}

/* ==========================================================================
   Section header (category pages)
   ========================================================================== */

.section-header {
  border-bottom: 3px solid var(--ink);
  padding-bottom: 16px;
  margin-bottom: 28px;
}
.section-header h1 { font-size: 38px; }
.section-header p { color: var(--ink-soft); margin: 0; }

/* ==========================================================================
   Prose pages (About)
   ========================================================================== */

.prose-section {
  max-width: 720px;
}
.prose-section h2 {
  margin-top: 2em;
  font-size: 24px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px;
}
.prose-section p { margin: 0 0 1em; }

.funding-table {
  border: 1px solid var(--rule);
  margin: 16px 0;
}
.funding-table__row {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  border-bottom: 1px solid var(--rule);
}
.funding-table__row:last-child { border-bottom: none; }

.masthead-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
}

/* ==========================================================================
   Contact / tip form
   ========================================================================== */

.tip-form-section h2,
.support-section h2 { font-size: 24px; }

.tip-form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.field { display: grid; gap: 6px; }
.field label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.field__optional { text-transform: none; letter-spacing: 0; color: var(--ink-faint); }
.field__note {
  font-size: 13px;
  color: var(--ink-faint);
  margin-top: 6px;
}

input[type="text"],
input[type="email"],
textarea {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 10px 12px;
  border: 1.5px solid var(--rule);
  background: var(--paper-raised);
  color: var(--ink);
  border-radius: var(--radius);
}
input:focus, textarea:focus {
  border-color: var(--teal);
  outline: none;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-notice {
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 14.5px;
}
.form-notice--success {
  background: #E4EEE9;
  border-left: 3px solid var(--teal);
}
.form-notice--error {
  background: #F5E6E3;
  border-left: 3px solid var(--brick);
}
.form-notice--error ul { margin: 0; padding-left: 18px; }

.support-section {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  padding: 22px;
  align-self: start;
}

.membership-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.membership-tier {
  text-align: center;
  padding: 14px 8px;
  border: 1.5px solid var(--rule);
}
.membership-tier h3 {
  font-size: 20px;
  margin-bottom: 2px;
}
.membership-tier p {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-soft);
  margin: 0;
}
.membership-tier--featured {
  border-color: var(--brass);
  background: #FBF3E6;
}

/* ==========================================================================
   Not found
   ========================================================================== */

.not-found {
  padding: 60px 0;
  text-align: center;
}
.not-found h1 { font-size: 32px; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: #C7CBD1;
  margin-top: 60px;
}

.site-footer__grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 44px 24px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.3fr;
  gap: 32px;
}

.site-footer__logo {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--paper);
  font-size: 14px;
}

.site-footer__block h3 {
  color: var(--paper);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.site-footer__block ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
}
.site-footer__block a { color: #C7CBD1; }
.site-footer__block a:hover { color: var(--brass); }

.site-footer__funding {
  font-size: 13px;
  color: #9AA1AC;
  margin-top: 12px;
}
.site-footer__funding a { color: var(--brass); }

.site-footer__small { font-size: 13px; }

.site-footer__bottom {
  border-top: 1px solid #2E3A4A;
  padding: 16px 24px;
  text-align: center;
  font-size: 12.5px;
  color: #7F8794;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 920px) {
  .content-grid,
  .content-grid--contact {
    grid-template-columns: 1fr;
  }
  .section-block__grid {
    grid-template-columns: 1fr 1fr;
  }
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav ul { flex-direction: column; gap: 4px; width: 100%; }
  .primary-nav .btn--nav { margin-top: 10px; }
  .masthead__tagline { display: none; }
  .section-block__grid { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .membership-tiers { grid-template-columns: 1fr; }
  .article__byline-row { flex-direction: column; align-items: flex-start; }
  .stamp--large { margin-left: 0; }
}
