:root {
  --bg: #f7f5f1;
  --bg-elevated: #ffffff;
  --ink: #1a1a1a;
  --ink-soft: #3c3c3c;
  --muted: #6b6b6b;
  --line: #d8d4cc;
  --navy: #0b1f3a;
  --navy-soft: #132a4a;
  --red: #c8102e;
  --green: #1f7a3f;
  --wrap: 1400px;
  --serif: "Newsreader", "Times New Roman", Georgia, serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --header-offset: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--navy);
}

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

.wrap {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 1000;
  padding: 0.65rem 1rem;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Status strip */
.status-strip {
  background: var(--navy);
  color: #e8e4dc;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.status-strip__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  align-items: center;
  padding: 0.45rem 0;
  overflow: hidden;
  white-space: nowrap;
}

.status-sep {
  opacity: 0.45;
}

.status-up {
  color: #8fd4a4;
}

.status-down {
  color: #f0a0a8;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 241, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 0.75rem;
}

.brand__logo {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3vw, 2.65rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--ink);
}

.brand__logo:hover {
  color: var(--ink);
}

.brand__tag {
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.live-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--red);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.live-btn:hover {
  background: #fff5f5;
  border-color: #e4b4bb;
}

.live-dot {
  color: var(--red);
  animation: pulse 1.6s ease-in-out infinite;
}

.live-note {
  margin: 0;
  max-width: 14rem;
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--ink-soft);
  text-align: right;
}

.live-note[hidden] {
  display: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1rem;
  height: 1.5px;
  background: currentColor;
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -5px;
}

.nav-toggle__bars::after {
  top: 5px;
}

.site-nav {
  border-top: 1px solid var(--line);
  background: var(--navy);
}

.site-nav__inner {
  overflow-x: auto;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.15rem;
  min-width: max-content;
}

.nav-list a {
  display: block;
  padding: 0.7rem 0.85rem;
  color: #e8e4dc;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background: var(--navy-soft);
  color: #fff;
  outline-offset: -2px;
}

/* Breaking ticker */
.breaking {
  background: #111;
  color: #f3f0ea;
  border-bottom: 1px solid #2a2a2a;
}

.breaking__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.9rem;
  min-height: 2.5rem;
}

.breaking__badge {
  background: var(--red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
  white-space: nowrap;
}

.breaking__track-wrap {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.breaking__track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
}

.breaking__track:hover {
  animation-play-state: paused;
}

.breaking__group {
  display: flex;
  gap: 2.5rem;
  padding-right: 2.5rem;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  font-weight: 500;
  white-space: nowrap;
}

.breaking__group span::before {
  content: "●";
  color: var(--red);
  margin-right: 0.75rem;
  font-size: 0.65rem;
  vertical-align: middle;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.25rem, 3vw, 2.75rem);
  align-items: stretch;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(2rem, 4vw, 3.25rem);
  border-bottom: 1px solid var(--line);
}

.hero__media {
  margin: 0;
  background: #e8e4dc;
  overflow: hidden;
}

.hero__media img {
  width: 100%;
  height: 100%;
  min-height: 28rem;
  object-fit: cover;
  object-position: 50% 28%;
  filter: contrast(1.05) saturate(0.95);
}

.hero__media figcaption {
  margin: 0;
  padding: 0.55rem 0.1rem 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 0.5rem;
}

.badge-breaking {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 0.9rem;
  background: var(--red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.2vw, 3.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.hero__dek {
  margin: 1.1rem 0 0;
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 34ch;
}

.meta {
  margin: 1.35rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Stories */
.stories {
  padding: clamp(2rem, 4vw, 3.5rem) 0;
}

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

.section-head h2,
.panel__head h2,
.analysis h2,
.newsletter h2,
.about h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.stories__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.story-card {
  padding: 1.25rem 1.15rem 1.4rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition: background 0.2s ease;
}

.story-card:nth-child(4n) {
  border-right: 0;
}

.story-card:hover {
  background: rgba(255, 255, 255, 0.55);
}

.story-card__cat {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}

.story-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
}

.story-card p:last-child {
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* Desk */
.desk {
  padding: 0 0 clamp(2rem, 4vw, 3.5rem);
}

.desk__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.25rem;
}

.desk__side {
  display: grid;
  gap: 1.25rem;
}

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 1.25rem 1.35rem 1.4rem;
}

.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.panel__meta {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel__head--live h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.live-label {
  display: inline-flex;
  align-items: center;
  background: var(--red);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.28rem 0.45rem;
}

.wire__feed,
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wire__feed li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.9rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.wire__feed li:last-child,
.timeline li:last-child {
  border-bottom: 0;
}

.wire__feed time,
.timeline time {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.wire__feed blockquote {
  margin: 0;
}

.wire__feed blockquote p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.timeline li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.9rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.timeline p {
  margin: 0;
  color: var(--ink-soft);
}

.live__note {
  margin: 1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

.markets__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.markets__table th,
.markets__table td {
  padding: 0.55rem 0.25rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.markets__table thead th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.markets__table tbody th {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
}

.markets__table td:nth-child(2),
.markets__table td:nth-child(3),
.markets__table thead th:nth-child(2),
.markets__table thead th:nth-child(3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.markets__table .up {
  color: var(--green);
  font-weight: 600;
}

.markets__disclaimer {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Analysis / about / newsletter */
.analysis,
.about {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  border-top: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.analysis__body {
  max-width: 68ch;
  margin-top: 1rem;
  font-size: 1.08rem;
  color: var(--ink-soft);
}

.analysis__body p {
  margin: 0 0 1rem;
}

.newsletter {
  padding: clamp(1.5rem, 3vw, 2.75rem) 0 clamp(2.5rem, 4vw, 3.5rem);
}

.newsletter__panel {
  background: var(--navy);
  color: #f3f0ea;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.newsletter h2 {
  color: #fff;
}

.newsletter__dek {
  margin: 0.65rem 0 1.25rem;
  max-width: 42ch;
  color: #d4cfc4;
}

.newsletter__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  max-width: 36rem;
}

.newsletter__form input {
  flex: 1 1 14rem;
  min-height: 2.85rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 0.7rem 0.9rem;
  font: inherit;
}

.newsletter__form input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.newsletter__form button,
.text-btn {
  min-height: 2.85rem;
  border: 1px solid transparent;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.7rem 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.newsletter__form button:hover {
  background: #e8e4dc;
}

.newsletter__feedback {
  margin: 0.85rem 0 0;
  font-size: 0.95rem;
  color: #d4cfc4;
}

.newsletter__feedback[hidden] {
  display: none;
}

.newsletter__fine {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.about blockquote {
  margin: 1rem 0 1.25rem;
  padding: 0;
  border: 0;
  max-width: 54ch;
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.about blockquote p {
  margin: 0;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-color: var(--line);
  background: var(--bg-elevated);
}

.text-btn:hover {
  background: #fff;
  color: var(--navy);
  border-color: #bdb7ad;
}

/* Footer */
.site-footer {
  background: #0a1628;
  color: #d8d4cc;
  padding: clamp(2rem, 4vw, 3rem) 0 2rem;
}

.site-footer__inner {
  display: grid;
  gap: 1.75rem;
}

.brand__logo--footer {
  margin: 0;
  font-size: 1.6rem;
  color: #fff;
}

.site-footer .brand__tag {
  color: rgba(255, 255, 255, 0.55);
}

.site-footer__tagline {
  margin: 0.85rem 0 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: #f3f0ea;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
}

.footer-nav a {
  color: #d8d4cc;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: #fff;
  text-decoration: underline;
}

.egg-tip {
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
  color: #f3f0ea;
  min-height: 1.35em;
}

.egg-tip[hidden] {
  display: none;
}

.site-footer__legal {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.site-footer__legal p {
  margin: 0 0 0.65rem;
  max-width: 70ch;
}

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

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@media (max-width: 1100px) {
  .stories__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .story-card:nth-child(4n) {
    border-right: 1px solid var(--line);
  }

  .story-card:nth-child(2n) {
    border-right: 0;
  }
}

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

  .hero__media img {
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 4 / 5;
    object-position: 50% 18%;
  }

  .desk__grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    min-width: 0;
  }

  .nav-list a {
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .status-strip__inner {
    white-space: normal;
  }
}

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

  .story-card,
  .story-card:nth-child(2n),
  .story-card:nth-child(4n) {
    border-right: 0;
  }

  .newsletter__form {
    flex-direction: column;
  }

  .newsletter__form button,
  .newsletter__form input {
    width: 100%;
  }
}

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

  .breaking__track,
  .live-dot {
    animation: none;
  }

  .breaking__track {
    transform: none;
  }

  .breaking__track-wrap {
    overflow-x: auto;
  }
}
