/* ---------------------------------------------------------------------
   Feedline — green / white / black editorial theme.
   Structural DNA borrowed from thed2csummit.co (sticky nav, big hero,
   card grids, chip rows). Palette is strictly three notes: a deep
   forest green accent, clean white surfaces, and near-black ink.
------------------------------------------------------------------------ */

:root {
  --bg: #ffffff;
  --bg-alt: #f2f7f3;          /* white with the faintest green cast */
  --ink: #0b0f0d;             /* near-black */
  --ink-soft: #55605a;
  --line: #dfe7e2;
  --brand: #17a03c;           /* logo green — fills and decorative accents only */
  --accent: #0f7b3f;          /* forest green — text/CTA green, AA on white */
  --accent-dark: #0b5e2f;     /* hover / pressed */
  --accent-soft: rgba(15, 123, 63, 0.08);
  --link: #1558d6;            /* inline body links — blue, AA on white */
  --link-hover: #0f3fa0;
  --accent-ink: #ffffff;
  --black: #0b0f0d;
  --card-bg: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 15, 13, 0.05), 0 8px 24px rgba(11, 15, 13, 0.06);
  --shadow-hover: 0 4px 10px rgba(11, 15, 13, 0.07), 0 16px 32px rgba(11, 15, 13, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-mark {
  height: 30px;
  width: auto;
  display: block;
}

.nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-left: auto; }

.dropdown { position: relative; }
.nav-link {
  background: none;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 14.5px;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
}
.nav-link:hover { background: var(--bg-alt); color: var(--accent); }
.nav-link.is-active { color: var(--accent); background: var(--accent-soft); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  min-width: 220px;
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
  display: none;
  flex-direction: column;
}
.dropdown-menu--wide { min-width: 280px; column-count: 1; }
.dropdown.is-open .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: flex; }

.dropdown-menu a {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}
.dropdown-menu a:hover { background: var(--bg-alt); color: var(--accent); }
.dropdown-menu a.is-active { color: var(--accent); font-weight: 600; }

/* ---------- Masthead (hero) ----------
   Asymmetric editorial split: copy rail on the left, the section's current
   lead story on the right, sitting on a green/black split rule. */
.masthead {
  position: relative;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-alt) 100%);
}
.masthead::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand) 0 58%, var(--black) 58% 100%);
}

.masthead-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 60px 24px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 56px;
  align-items: center;
}
.masthead--compact .masthead-inner { padding: 44px 24px 44px; }
.masthead-inner--solo { grid-template-columns: minmax(0, 760px); }

.masthead-copy { text-align: left; }

.live-line {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.live-dot {
  position: relative;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--brand);
  animation: live-pulse 2.4s ease-out infinite;
}
@keyframes live-pulse {
  0%   { transform: scale(1);   opacity: 0.55; }
  70%  { transform: scale(2.8); opacity: 0; }
  100% { transform: scale(2.8); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot::after { animation: none; }
}

.masthead-title {
  font-size: clamp(36px, 4.7vw, 60px);
  line-height: 1.03;
  letter-spacing: -0.025em;
}
.masthead-title .highlight { color: var(--accent); }

.masthead-sub {
  margin: 20px 0 0;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 16.5px;
}

.masthead-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-rail {
  display: flex;
  flex-wrap: wrap;
  margin: 34px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.stat {
  padding-right: 26px;
  margin-right: 26px;
  border-right: 1px solid var(--line);
}
.stat:last-child { padding-right: 0; margin-right: 0; border-right: 0; }
.stat dt {
  margin: 0 0 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.stat dd {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--black);
}

/* ---------- Lead story card ---------- */
.lead { position: relative; }
.lead::after {
  content: '';
  position: absolute;
  right: -14px;
  bottom: -14px;
  width: 62%;
  height: 55%;
  background: var(--brand);
  border-radius: var(--radius);
  z-index: 0;
}

.lead-card {
  position: relative;
  z-index: 1;
  display: block;
  background: var(--card-bg);
  border: 1.5px solid var(--black);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.lead-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-hover);
}

.lead-media {
  aspect-ratio: 16 / 9;
  background: var(--bg-alt);
  border-bottom: 1.5px solid var(--black);
}
.lead-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lead-media--contain { background: #fff; }
.lead-media--contain img { object-fit: contain; padding: 18px; }

.lead-body { padding: 20px 22px 22px; }

.lead-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--black);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lead-title {
  font-size: clamp(20px, 2.1vw, 25px);
  line-height: 1.22;
  margin-bottom: 10px;
}
.lead-meta {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.lead-meta .lead-source { color: var(--accent); }
.lead-meta .lead-dot { margin: 0 6px; }

@media (max-width: 900px) {
  .masthead-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding: 44px 24px 48px;
  }
  .lead::after { right: -8px; bottom: -8px; }
}

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 20px rgba(15, 123, 63, 0.28);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Chip rows ---------- */
.chip-row {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip-row--wrap { flex-wrap: wrap; overflow: visible; }

.chip {
  flex: 0 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--line);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}
.chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chip--active { background: var(--black); color: #fff; border-color: var(--black); }

/* ---------- Briefing / grid ---------- */
.briefing { max-width: 1180px; margin: 0 auto; padding: 12px 24px 64px; }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 24px 0 20px;
  flex-wrap: wrap;
  gap: 8px;
}
.section-heading h2 { font-size: 26px; }
.section-sub { color: var(--ink-soft); font-size: 13.5px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(15, 123, 63, 0.45);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-alt);
  overflow: hidden;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Logo lockups and diagrams read better letterboxed than cropped. */
.card-thumb--contain { background: #fff; }
.card-thumb--contain img { object-fit: contain; padding: 14px; }

.card-body {
  padding: 20px;
}

.card-source {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.card-title {
  font-size: 17px;
  line-height: 1.35;
  margin-bottom: 8px;
}
.card:hover .card-title { color: var(--accent-dark); }
.card-snippet {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.card-meta {
  font-size: 12.5px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.empty-state, .empty-state-block {
  color: var(--ink-soft);
  background: var(--bg-alt);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

/* ---------- Article detail page ---------- */
.article-page { max-width: 760px; padding-top: 32px; }

.back-link {
  display: inline-block;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.back-link:hover { color: var(--accent); }

.article-hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  margin: 0 0 24px;
}
.article-hero-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Logo lockups and diagrams shouldn't be cropped to fill the frame. */
.article-hero-image--contain {
  background: #fff;
  border: 1px solid var(--line);
}
.article-hero-image--contain img { object-fit: contain; }

.article-image-credit {
  margin: -16px 0 24px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Badge marking the site's own reporting, as opposed to a syndicated feed item. */
.original-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.article-dek {
  margin: 0 0 28px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
  padding-left: 16px;
  border-left: 3px solid var(--brand);
}

.article-body h3 {
  font-size: 24px;
  line-height: 1.25;
  margin: 34px 0 14px;
}

.article-source {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.article-source a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-source a:hover { color: var(--accent-dark); }
.article-title { font-size: clamp(26px, 4vw, 38px); line-height: 1.2; margin-bottom: 12px; }
.article-meta { color: var(--ink-soft); font-size: 14px; margin-bottom: 28px; }

.article-body {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
}
.article-body p { margin: 0 0 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 22px; }
.article-body blockquote {
  margin: 0 0 18px;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
  color: var(--ink-soft);
  font-style: italic;
}

/* Inline links in authored copy: blue, no underline at rest. The underline
   comes back on hover/focus so the target is still confirmable. */
.article-body a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease;
}
.article-body a:hover,
.article-body a:focus-visible {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Source / outbound link box ---------- */
.source-box {
  margin-top: 36px;
  padding: 22px 24px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
}
.source-box-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.source-box-name {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--black);
  margin-bottom: 6px;
}
.source-box-url {
  display: block;
  font-size: 13.5px;
  color: var(--accent);
  word-break: break-all;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.source-box-url:hover { color: var(--accent-dark); }
.source-box-actions {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.source-box-actions .btn { font-size: 14.5px; padding: 11px 20px; }
.ext-arrow { display: inline-block; margin-left: 2px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.article-note {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}

/* ---------- Switcher ---------- */
.switcher { max-width: 1180px; margin: 0 auto; padding: 8px 24px 48px; }
.switcher h2 { font-size: 20px; margin-bottom: 16px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 3px solid var(--accent);
  background: var(--black);
  color: #ffffff;
}
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 40px 24px; }
.footer-brand { height: 22px; width: auto; display: block; margin-bottom: 10px; }
.footer-legal { color: rgba(255, 255, 255, 0.7); font-size: 12.5px; margin: 8px 0 0; }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .nav-inner { flex-wrap: wrap; row-gap: 10px; justify-content: center; }
  .nav-links { width: 100%; justify-content: center; margin-left: 0; }
  .dropdown-menu {
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100vw - 32px);
    width: max-content;
  }
}
