:root {
  --primary: #2c3e50;
  --accent: #3498db;
  --accent-dark: #2980b9;
  --text: #2c3e50;
  --muted: #6b7c8a;
  --bg: #f4f6f8;
  --paper: #ffffff;
  --line: #e4eaef;
  --success: #27ae60;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: min(1140px, 92vw);
  --shadow: 0 8px 28px rgba(44, 62, 80, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
}

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

.wrap {
  width: var(--wrap);
  margin: 0 auto;
}

.muted {
  color: var(--muted);
}

.brand-accent {
  color: var(--accent);
}

/* Ad strip */
.ad-strip {
  font-size: 0.72rem;
  text-align: center;
  padding: 0.45rem 1rem;
  background: #eef4f9;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.03em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.site-nav a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

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

.btn-ghost {
  background: transparent;
  color: var(--primary);
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

/* Home hero */
.home-hero {
  padding: 2rem 0 1.5rem;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.25rem;
  align-items: stretch;
}

.home-intro {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.75rem 1.85rem;
  box-shadow: var(--shadow);
}

.home-intro .eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.home-intro h1 {
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
  line-height: 1.2;
  color: var(--primary);
  margin-bottom: 0.85rem;
}

.home-intro .lead {
  color: var(--muted);
  max-width: 42ch;
  margin-bottom: 1.25rem;
}

.search-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.search-bar input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  background: var(--bg);
}

.search-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Featured card */
.featured-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--primary);
  color: #fff;
  border: 1px solid #243442;
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow);
  min-height: 100%;
}

.featured-card:hover {
  color: #fff;
}

.featured-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  opacity: 0.92;
}

.featured-card-body {
  padding: 1.25rem 1.35rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.featured-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  padding: 0.3rem 0.55rem;
  border-radius: 3px;
  margin-bottom: 0.65rem;
  width: fit-content;
}

.featured-card h2 {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.featured-card p {
  font-size: 0.92rem;
  opacity: 0.88;
  margin-bottom: 0.85rem;
}

.featured-card .read-more {
  margin-top: auto;
  font-weight: 600;
  font-size: 0.9rem;
  color: #a8d4f5;
}

/* Section */
.section {
  padding: 1.5rem 0 2.5rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--accent);
}

.section-head h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--primary);
}

.section-head span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Article grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.card-article {
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}

.card-article:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-article.is-hidden {
  display: none;
}

.card-article .card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.card-article img {
  aspect-ratio: 16/10;
  object-fit: cover;
  width: 100%;
}

.card-body {
  padding: 1rem 1.05rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.card-body h3 {
  font-size: 1.02rem;
  line-height: 1.35;
  color: var(--primary);
  margin-bottom: 0.45rem;
  font-weight: 600;
}

.card-body p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Article page */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  background: transparent;
}

.read-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--success));
  transition: width 0.1s linear;
}

.article-page {
  padding: 1.5rem 0 3rem;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--muted);
}

.article-mast {
  max-width: 48rem;
  margin-bottom: 1.25rem;
}

.article-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.article-mast h1 {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3.2vw, 2.2rem);
  line-height: 1.25;
  color: var(--primary);
}

.article-meta-line {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.article-meta-line .dot {
  margin: 0 0.35rem;
}

.article-hero-fig {
  margin-bottom: 1.75rem;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-hero-fig img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.article-grid-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}

.article-lede {
  font-size: 1.12rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  max-width: 52ch;
}

.article-summary-box {
  background: #f0f8ff;
  border-left: 4px solid var(--accent);
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
}

.article-summary-box h2 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.article-summary-box ul {
  padding-left: 1.1rem;
  font-size: 0.92rem;
}

.article-prose {
  font-size: 1.02rem;
  max-width: 42rem;
}

.article-prose h2 {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin: 1.75rem 0 0.65rem;
  color: var(--primary);
}

.article-prose h3 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
}

.article-prose p {
  margin-bottom: 1rem;
}

.article-prose ul,
.article-prose ol {
  margin: 0 0 1rem 1.25rem;
}

.article-prose li {
  margin-bottom: 0.35rem;
}

.article-pullquote {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.45;
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1rem;
  margin: 1.25rem 0;
  color: var(--primary);
}

.article-callout {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.article-prose details {
  border: 1px solid var(--line);
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.5rem;
  background: var(--paper);
}

.article-prose summary {
  cursor: pointer;
  font-weight: 600;
}

.article-sources {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.article-sources h2 {
  font-size: 1rem;
  margin-bottom: 0.65rem;
}

.article-sources ul {
  list-style: none;
}

.article-sources li {
  margin-bottom: 0.35rem;
}

.article-disclaimer {
  margin-top: 1.5rem;
  font-size: 0.88rem;
}

.sidebar-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1rem;
  margin-bottom: 1rem;
}

.sidebar-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.sidebar-featured-link {
  display: block;
  color: var(--primary);
  text-decoration: none;
}

.sidebar-featured-link img {
  border-radius: 4px;
  margin-bottom: 0.55rem;
}

.sidebar-featured-link span {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.sidebar-links {
  list-style: none;
  font-size: 0.88rem;
}

.sidebar-links li {
  margin-bottom: 0.55rem;
  line-height: 1.35;
}

.sidebar-links a {
  color: var(--primary);
  text-decoration: none;
}

.sidebar-links a:hover {
  color: var(--accent);
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: #ecf0f1;
  padding: 2.5rem 0;
  margin-top: 2rem;
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.footer-tagline {
  margin-bottom: 1rem;
  opacity: 0.9;
}

.footer-legal {
  font-size: 0.82rem;
  line-height: 1.7;
  opacity: 0.88;
  margin-bottom: 1rem;
}

.footer-legal a {
  color: #a8d4f5;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1.25rem;
  margin-bottom: 1rem;
}

.footer-links .link-btn {
  color: #ecf0f1;
}

.footer-note,
.footer-copy {
  font-size: 0.8rem;
  opacity: 0.75;
}

/* Modals & cookies */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem;
}

.modal.is-open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
}

.modal-content {
  background: var(--paper);
  margin: 4vh auto 2rem;
  padding: 1.5rem;
  border-radius: 8px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow);
}

.modal-content--legal {
  max-width: 680px;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-body--legal {
  overflow-y: auto;
  padding-right: 0.25rem;
  max-height: calc(88vh - 4.5rem);
}

.modal-body--legal h3 {
  font-size: 1rem;
  color: var(--primary);
  margin: 1.25rem 0 0.5rem;
}

.modal-body--legal ul {
  margin: 0 0 0.85rem 1.2rem;
}

.modal-body--legal li {
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}

.modal-body--legal a {
  color: var(--accent);
}

.legal-updated {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 0.75rem 0 1rem;
}

.legal-table th,
.legal-table td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  background: var(--bg);
  font-weight: 600;
}

.link-btn--on-dark {
  color: #a8d4f5;
}

.btn-ghost--on-dark {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.btn-ghost--on-dark:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}

.modal-body p {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10050;
  background: rgba(44, 62, 80, 0.94);
  color: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-banner.hidden {
  display: none !important;
}

body.has-cookie-banner {
  padding-bottom: 7rem;
}

.search-meta.is-empty,
.search-meta[hidden] {
  display: none;
}

.cookie-banner-content p {
  margin: 0;
  font-size: 0.9rem;
}

.cookie-banner-buttons {
  display: flex;
  gap: 0.5rem;
}

@media (max-width: 960px) {
  .home-hero-grid {
    grid-template-columns: 1fr;
  }

  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-grid-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .article-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    font-size: 0.85rem;
  }
}
