@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,400..900&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --paper: #FFFFFF;
  --band: #F4F6F8;
  --navy: #0B2545;
  --ink: #10161C;
  --royal: #1B4DB1;
  --signal: #C8102E;
  --hairline: #DCE1E6;
  --muted: #5A6672;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: 'Source Serif 4', serif;
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .archivo {
  font-family: 'Archivo', sans-serif;
  color: var(--ink);
}

.mono {
  font-family: 'IBM Plex Mono', monospace;
}

.masthead-lockup {
  font-family: 'Archivo', sans-serif;
  font-size: clamp(26px, 5vw, 40px);
  font-variation-settings: "wdth" 88;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  text-decoration: none;
}

.lead-headline {
  font-size: clamp(30px, 5.4vw, 46px);
  font-variation-settings: "wdth" 76;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.secondary-headline {
  font-size: 21px;
  font-variation-settings: "wdth" 84;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.article-h1 {
  font-size: clamp(30px, 5.6vw, 44px);
  font-variation-settings: "wdth" 76;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.section-label {
  font-family: 'Archivo', sans-serif;
  font-size: 14px;
  font-variation-settings: "wdth" 92;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 1rem;
  display: inline-block;
}

.section-rule {
  border-top: 2px solid var(--navy);
  padding-top: 4px;
  margin-bottom: 1.5rem;
  margin-top: 3rem;
}
.section-rule-first {
  margin-top: 1rem;
}

.dek {
  font-family: 'Source Serif 4', serif;
  font-size: 21px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
  max-width: 68ch;
}

.category-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--royal);
}

.timestamp, .byline {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

/* Global Elements */
a {
  color: var(--royal);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

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

.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--royal);
  color: white;
  padding: 8px;
  z-index: 1000;
}
.skip-to-content:focus {
  top: 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 2rem 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
}

.header-row-1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5vw;
  border-bottom: 1px solid var(--hairline);
}

.masthead-col {
  display: flex;
  flex-direction: column;
}

.tagline {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-latest {
  font-family: 'Archivo', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--royal);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 2px;
  text-decoration: none;
}
.btn-latest:hover {
  background: var(--navy);
  text-decoration: none;
}

.header-row-2 {
  background: var(--navy);
  padding: 0 5vw;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-family: 'Archivo', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
  display: block;
  padding: 0.75rem 0;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.nav-link:hover {
  text-decoration: none;
  opacity: 0.8;
}

.nav-link[aria-current="page"] {
  border-bottom: 3px solid var(--royal);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-family: 'Archivo', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  padding: 0.75rem 0;
  align-items: center;
  gap: 0.5rem;
}

.nav-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.nav-toggle-icon span {
  display: block;
  height: 2px;
  background: white;
  border-radius: 0;
  transition: none;
}

@media (max-width: 599px) {
  .nav-toggle {
    display: flex;
  }
  .nav-menu {
    display: none;
    flex-direction: column;
    gap: 0;
    padding-bottom: 0.5rem;
  }
  .nav-menu.is-open {
    display: flex;
  }
  .nav-link {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-link[aria-current="page"] {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: var(--royal);
  }
  .header-row-2 {
    padding-top: 0;
  }
}

/* Ticker */
.ticker-wrap {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  display: flex;
  position: relative;
  align-items: center;
}

.ticker-label {
  background: var(--navy);
  color: var(--signal);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  padding: 0.25rem 1rem 0.25rem 5vw;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.ticker-scroll {
  display: flex;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}

.ticker-wrap:hover .ticker-scroll {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .ticker-scroll {
    animation: none;
  }
}

.ticker-item {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: white;
  padding: 0.25rem 2rem;
  font-variant-numeric: tabular-nums;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 5vw;
}

.homepage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1040px) {
  .homepage-grid {
    grid-template-columns: 60% 1fr;
    gap: 4rem;
  }
}

.cover-card {
  margin-bottom: 1rem;
  border: 1px solid var(--hairline);
  background: var(--navy);
}

.lead-story {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.lead-story .dek {
  margin-top: 0.5rem;
}
.lead-story a {
  color: inherit;
}
.lead-story a:hover .lead-headline {
  text-decoration: underline;
  text-decoration-color: var(--royal);
}

.latest-list {
  display: flex;
  flex-direction: column;
}

.latest-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.latest-item:first-child {
  padding-top: 0;
}
.latest-item:last-child {
  border-bottom: none;
}

.latest-item a {
  color: inherit;
}
.latest-item a:hover .secondary-headline {
  text-decoration: underline;
  text-decoration-color: var(--royal);
}

/* Accessibility utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  margin-bottom: 2rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: left;
}
th, td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--hairline);
}
th {
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  background: var(--band);
  white-space: nowrap;
  cursor: pointer;
}
th:hover {
  background: #E8ECEF;
}
tr.past td {
  color: var(--muted);
}
tr.upcoming {
  color: var(--ink);
}
tr.upcoming td:first-child {
  border-left: 3px solid var(--royal);
}
td a {
  color: var(--royal);
}

/* Article Template */
.article-container {
  max-width: 68ch;
  margin: 0 auto;
  padding: 2rem 5vw;
}

.article-header {
  margin-bottom: 2rem;
}

.article-dek {
  font-style: italic;
  margin-bottom: 1.5rem;
}

.article-byline-strip {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 0.75rem 0;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.article-cover {
  margin-bottom: 2rem;
  border: 1px solid var(--hairline);
}

.show-facts {
  border: 1px solid var(--hairline);
  padding: 1.5rem;
  margin-bottom: 2rem;
  background: var(--band);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
}
.show-facts dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
@media (min-width: 600px) {
  .show-facts dl {
    grid-template-columns: 140px 1fr;
  }
}
.show-facts dt {
  font-weight: 600;
  color: var(--muted);
}
.show-facts dd {
  margin: 0;
  color: var(--ink);
}

.article-body h2 {
  font-size: 21px;
  font-variation-settings: "wdth" 84;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.pull-quote {
  border-left: 4px solid var(--royal);
  padding-left: 1.5rem;
  margin: 2.5rem 0;
  font-size: 24px;
  font-style: italic;
  color: var(--navy);
  line-height: 1.4;
}

.sourcing-read {
  border: 2px solid var(--navy);
  padding: 2rem;
  margin: 3rem 0;
}
.sourcing-read h2 {
  margin-top: 0;
}
.sourcing-read ul {
  padding-left: 1.5rem;
}
.sourcing-read li {
  margin-bottom: 0.75rem;
}

.author-block {
  margin: 4rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.author-name {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 0.25rem;
}
.author-role {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 1rem;
}
.author-bio {
  font-size: 16px;
  color: var(--muted);
}

.share-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}
.share-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 1px solid var(--hairline);
  color: var(--navy);
}
.share-btn:hover {
  background: var(--band);
  text-decoration: none;
}

.corrections-line {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
  margin-top: 3rem;
}

/* Articles Index */
.articles-index-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--hairline);
}
@media (min-width: 720px) {
  .articles-index-item {
    grid-template-columns: 320px 1fr;
  }
}

/* Generic text pages */
.text-page {
  max-width: 68ch;
  margin: 0 auto;
  padding: 2rem 5vw 4rem;
}
.text-page h1 {
  margin-bottom: 2rem;
}
.text-page h2 {
  font-size: 21px;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.text-page p {
  margin-bottom: 1.5rem;
}
.text-page ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}
.text-page li {
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: white;
  padding: 4rem 5vw 2rem;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

.world-map-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  opacity: 0.5;
  pointer-events: none;
}
.world-map-bg img {
  width: 100%;
  height: auto;
  filter: invert(1) brightness(2);
}

.footer-content {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo {
  font-family: 'Archivo', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.footer-tagline {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
@media (min-width: 600px) {
  .footer-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

.footer-nav-col h3 {
  font-family: 'Archivo', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
}

.footer-nav-col ul {
  list-style: none;
}
.footer-nav-col li {
  margin-bottom: 0.5rem;
}
.footer-nav-col a {
  color: white;
  font-size: 14px;
  text-decoration: none;
}
.footer-nav-col a:hover {
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
