:root {
  --bg: #0a0a0a;
  --bg-elevated: #141413;
  --bg-elevated-2: #111110;
  --text-primary: #f4f2ed;
  --text-secondary: #a3a099;
  --text-tertiary: #6b6a64;
  --accent: #d9a45b;
  --accent-dim: #8a6638;
  --risk: #c55a3f;
  --risk-dim: #6b2e1e;
  --border: #2a2824;
  --border-strong: #3d3a33;
  --font-serif: "Iowan Old Style", "Apple Garamond", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --font-mono: "SF Mono", Menlo, Consolas, ui-monospace, monospace;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body.pane-open {
  overflow: hidden;
}

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

button {
  font: inherit;
}

.layout {
  display: flex;
  flex-direction: column;
}

.sidebar {
  display: none;
}

.mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand-row {
  padding: 14px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mobile-topbar h1,
.sidebar .brand,
h2,
.item h3,
.detail-top h2 {
  font-family: var(--font-serif);
}

.mobile-topbar h1 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mobile-nav-chips {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 16px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mobile-nav-chips::-webkit-scrollbar {
  display: none;
}

.mobile-nav-chips a {
  flex-shrink: 0;
  padding: 6px 12px;
  margin-right: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid transparent;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.mobile-nav-chips a:hover,
.mobile-nav-chips a.active {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
}

.mobile-action,
.sidebar-action,
.detail-close {
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.mobile-action:hover,
.sidebar-action:hover,
.detail-close:hover,
.mobile-action:focus-visible,
.sidebar-action:focus-visible,
.detail-close:focus-visible {
  color: var(--text-primary);
  border-color: var(--accent-dim);
  background: rgba(217, 164, 91, 0.06);
  outline: none;
}

main {
  padding: 0 20px;
  max-width: 760px;
  margin: 0 auto;
}

section {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 100px;
}

section:last-of-type {
  border-bottom: none;
}

section > header {
  margin-bottom: 28px;
}

section > header h2 {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.section-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

#overview {
  padding-top: 32px;
}

.broad-picture {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-primary);
  margin-bottom: 36px;
  letter-spacing: -0.005em;
}

.broad-picture .lede {
  color: var(--accent);
  font-style: italic;
}

.top-stories,
.section-cards {
  margin-bottom: 36px;
}

.top-stories h3,
.section-cards h3,
.risk-strip h3,
.detail-kicker,
.detail-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.top-stories ol {
  list-style: none;
  counter-reset: story;
}

.top-stories li {
  counter-increment: story;
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: baseline;
}

.top-stories li:last-child {
  border-bottom: none;
}

.top-stories li::before {
  content: counter(story, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
}

.story-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 2px;
}

.story-head {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.35;
  display: block;
  margin-bottom: 3px;
}

.story-line {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.story-button,
.item-button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
}

.story-button:hover .story-head,
.story-button:focus-visible .story-head,
.item-button:hover h3,
.item-button:focus-visible h3 {
  color: var(--accent);
}

.story-button:focus-visible,
.item-button:focus-visible {
  outline: none;
}

.section-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.section-cards .card {
  background: var(--bg);
  padding: 18px 20px 20px;
}

.section-cards .card h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.section-cards .card ul,
.risk-strip ul,
.detail-list {
  list-style: none;
}

.section-cards .card li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  padding: 3px 0;
}

.section-cards .card li strong {
  color: var(--text-primary);
  font-weight: 500;
}

.risk-strip {
  margin-top: 16px;
  padding: 16px 18px;
  border-left: 2px solid var(--risk);
  background: rgba(197, 90, 63, 0.06);
  border-radius: 0 4px 4px 0;
}

.risk-strip h3 {
  color: var(--risk);
  margin-bottom: 10px;
}

.risk-strip li {
  font-size: 13px;
  color: var(--text-primary);
  padding: 5px 0;
  line-height: 1.45;
}

.risk-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--risk);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-right: 8px;
}

.item {
  padding: 22px 0 26px;
  border-bottom: 1px solid var(--border);
}

.item:last-child {
  border-bottom: none;
}

.item:first-of-type {
  padding-top: 4px;
}

.item-rank {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rank-num {
  color: var(--accent);
  font-weight: 500;
}

.rank-sep {
  color: var(--border-strong);
}

.item h3 {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.item.top-item h3 {
  font-size: 24px;
}

.summary {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.wim {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 14px;
  padding-left: 14px;
  border-left: 2px solid var(--border-strong);
}

.wim strong {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag,
.status {
  padding: 2px 8px;
  font-size: 10px;
  border-radius: 2px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  border: 1px solid;
}

.tag {
  color: var(--text-secondary);
  border-color: var(--border-strong);
}

.tag.new,
.status.imminent,
.status.leader {
  color: var(--accent);
  border-color: var(--accent-dim);
}

.tag.risk {
  color: var(--risk);
  border-color: var(--risk-dim);
}

.status.tracking {
  color: var(--text-secondary);
  border-color: var(--border-strong);
}

.status.rumored {
  color: var(--text-tertiary);
  border-color: var(--border);
}

.sources,
.sources-wrap,
.detail-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sources a,
.sources-wrap a,
.detail-links a {
  color: var(--text-secondary);
  border-bottom: 1px dotted var(--text-tertiary);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

.sources a:hover,
.sources-wrap a:hover,
.detail-links a:hover,
.sources a:focus-visible,
.sources-wrap a:focus-visible,
.detail-links a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.sources-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-secondary);
}

.site-footer {
  padding: 40px 0 60px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.7;
  letter-spacing: 0.02em;
}

.detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 59;
  background: rgba(3, 3, 3, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.detail-pane {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: min(400px, 100vw);
  height: 100vh;
  padding: 24px 18px 18px;
  transform: translateX(100%);
  transition: transform 0.24s ease;
  pointer-events: none;
}

.detail-shell {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  background: rgba(20, 20, 19, 0.98);
  box-shadow: var(--shadow);
}

.detail-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.detail-top h2 {
  margin-top: 8px;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.detail-meta,
.detail-summary,
.detail-why,
.detail-list {
  color: var(--text-secondary);
}

.detail-body {
  overflow: auto;
  padding-right: 6px;
}

.detail-block + .detail-block {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.detail-label {
  margin-bottom: 10px;
}

.detail-list li + li {
  margin-top: 10px;
}

body.pane-open .detail-backdrop {
  opacity: 1;
  pointer-events: auto;
}

body.pane-open .detail-pane {
  transform: translateX(0);
  pointer-events: auto;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 640px) {
  .section-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .layout {
    flex-direction: row;
    min-height: 100vh;
  }

  .mobile-topbar {
    display: none;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    width: 240px;
    flex-shrink: 0;
    padding: 40px 28px;
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }

  .sidebar .brand {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.025em;
    margin-bottom: 4px;
  }

  .sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 40px;
  }

  .sidebar nav a {
    padding: 7px 0;
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.15s;
    position: relative;
  }

  .sidebar nav a:hover,
  .sidebar nav a.active {
    color: var(--text-primary);
  }

  .sidebar nav a.active::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
  }

  .footer-note {
    margin-top: auto;
    padding-top: 32px;
    font-size: 11px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    line-height: 1.5;
  }

  .sidebar-action {
    margin-top: 16px;
    align-self: flex-start;
  }

  main {
    flex: 1;
    padding: 40px 56px 120px;
    max-width: 780px;
  }

  section > header h2 {
    font-size: 38px;
  }

  .broad-picture {
    font-size: 22px;
  }

  .item h3 {
    font-size: 23px;
  }

  .item.top-item h3 {
    font-size: 28px;
  }
}

@media (max-width: 720px) {
  .detail-pane {
    width: 100vw;
    padding: 72px 12px 12px;
  }

  .detail-top {
    grid-template-columns: 1fr;
  }

  .detail-top h2 {
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
    animation: none !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
