:root {
  color-scheme: dark;
  --bg: #08090d;
  --surface: #11141b;
  --surface-2: #171b24;
  --text: #f8f5ee;
  --muted: #a8afbd;
  --line: rgba(255, 255, 255, 0.12);
  --brand: #e21b2d;
  --brand-2: #f0b84b;
  --accent: #18c7b8;
  --ink: #06070a;
  --shadow: 0 18px 70px rgba(0, 0, 0, 0.25);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #11131a;
  --muted: #5f6673;
  --line: rgba(16, 24, 40, 0.12);
  --shadow: 0 18px 60px rgba(16, 24, 40, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
}

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

button,
input {
  font: inherit;
}

.topbar {
  background: var(--brand);
  color: white;
  font-size: 13px;
}

.topbar-inner,
.site-header,
.headline-shell,
.controls-panel,
.section,
.content-layout,
.newsletter,
.footer {
  margin: 0 auto;
  max-width: 1240px;
  width: 100%;
}

.topbar-inner {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 8px 18px;
}

.top-actions {
  display: flex;
  gap: 8px;
}

.icon-button,
.menu-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.icon-button svg,
.menu-button svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.site-header {
  align-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 16px 18px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  align-items: center;
  display: flex;
  gap: 16px;
  font-size: 14px;
}

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

.nav-pill,
.button,
.filter,
.chip {
  border-radius: 8px;
}

.nav-pill {
  border: 1px solid var(--line);
  color: var(--text) !important;
  padding: 9px 12px;
}

.menu-button {
  background: var(--surface-2);
  color: var(--text);
  display: none;
}

.headline-shell {
  padding: 18px;
}

.gateway-shell {
  display: none;
  margin: 0 auto;
  max-width: 920px;
  padding: 24px 18px 10px;
}

.gateway-active .gateway-shell {
  display: block;
}

.gateway-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 6vw, 56px);
  text-align: center;
}

.gateway-card .brand-mark {
  margin-bottom: 22px;
}

.gateway-copy {
  margin-left: auto;
  margin-right: auto;
  max-width: 520px;
}

.timer-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 20px;
  margin: 22px auto 0;
  max-width: 260px;
  padding: 16px;
}

.gateway-final-band {
  margin: 0 auto;
  max-width: 920px;
  padding: 22px 18px;
}

.final-card {
  margin-top: 0;
}

.breaking-strip {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  overflow: hidden;
  padding: 10px 12px;
}

.breaking-strip strong {
  background: var(--brand);
  border-radius: 8px;
  color: white;
  padding: 7px 10px;
  text-transform: uppercase;
}

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

.portal-hero {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  margin-top: 18px;
}

.lead-card,
.side-panel,
.rail-card,
.post-card,
.category-board article,
.newsletter {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.lead-card {
  min-height: 440px;
  overflow: hidden;
  position: relative;
}

.lead-card img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.lead-overlay {
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.86));
  bottom: 0;
  color: white;
  left: 0;
  padding: 34px;
  position: absolute;
  right: 0;
}

.lead-overlay h1 {
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1.02;
  margin: 0 0 12px;
}

.lead-overlay p {
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 18px;
}

.side-panel {
  padding: 18px;
}

.panel-header,
.split {
  align-items: end;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.panel-header h2,
.rail-card h2 {
  font-size: 20px;
  margin: 0;
}

.panel-header span {
  color: var(--muted);
  font-size: 12px;
}

.mini-list,
.ranked-list,
.category-stack {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.mini-item,
.ranked-item {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: 86px 1fr;
  padding-top: 12px;
}

.mini-item img {
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  object-fit: cover;
  width: 86px;
}

.mini-item h3,
.ranked-item h3 {
  font-size: 14px;
  line-height: 1.3;
  margin: 0;
}

.ranked-item {
  grid-template-columns: 34px 1fr;
}

.rank {
  align-items: center;
  background: var(--surface-2);
  border-radius: 8px;
  color: var(--brand);
  display: inline-flex;
  font-weight: 900;
  height: 30px;
  justify-content: center;
}

.controls-panel {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 300px 1fr;
  padding: 0 18px 18px;
}

.search-box {
  display: grid;
  gap: 6px;
}

.search-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.search-box input {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 12px 14px;
  width: 100%;
}

.filters,
.quick-buttons,
.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter,
.chip {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  padding: 10px 12px;
}

.filter.active,
.chip:hover {
  background: var(--brand);
  color: white;
}

.section {
  padding: 54px 18px 18px;
}

.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  margin: 0 0 9px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1;
  margin-bottom: 12px;
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  margin-bottom: 10px;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.content-layout {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) 330px;
  padding: 0 18px 28px;
}

.post-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.post-card img {
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  object-fit: cover;
  width: 100%;
}

.post-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.meta {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.post-body h3 {
  font-size: 18px;
  line-height: 1.28;
  margin-bottom: 10px;
}

.post-body a,
.category-stack a {
  color: var(--accent);
  font-weight: 800;
}

.share-row {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.share-row button,
.share-row a {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  padding: 8px 10px;
}

.rail {
  display: grid;
  gap: 18px;
  align-content: start;
}

.rail-card {
  padding: 18px;
}

.ad-box {
  align-items: center;
  display: grid;
  min-height: 250px;
  place-items: center;
  text-align: center;
}

.ad-box span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.load-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 26px 0 0;
}

.button {
  border: 1px solid var(--line);
  cursor: pointer;
  padding: 12px 16px;
}

.button.primary {
  background: var(--brand);
  color: white;
  font-weight: 900;
}

.button.ghost {
  background: var(--surface);
  color: var(--text);
}

.category-board {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, 1fr);
}

.category-board article {
  padding: 24px;
}

.icon-badge {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand);
  display: inline-flex;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  margin-bottom: 18px;
  width: 44px;
}

.feature-band {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(17, 20, 27, 0.96), rgba(17, 20, 27, 0.76)),
    url("https://images.unsplash.com/photo-1612287230202-1ff1d85d1bdf?auto=format&fit=crop&w=1600&q=85") center / cover;
  border-radius: 8px;
  color: white;
  display: grid;
  gap: 30px;
  grid-template-columns: 1.2fr 1fr;
  margin-top: 34px;
  padding: 44px;
}

.feature-band p {
  color: rgba(255, 255, 255, 0.78);
}

.feature-list span {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 14px;
}

.newsletter {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 52px auto;
  padding: 28px;
}

.subscribe-form {
  display: flex;
  gap: 10px;
  width: min(430px, 100%);
}

.subscribe-form input {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
}

.footer {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 34px;
  grid-template-columns: 1.5fr 0.7fr 1fr;
  padding: 46px 18px;
}

.footer a,
.footer p {
  color: var(--muted);
  display: block;
}

.footer-brand {
  color: var(--text);
  margin-bottom: 16px;
}

.page {
  margin: 0 auto;
  max-width: 900px;
  padding: 90px 22px;
}

.page h1 {
  font-size: clamp(42px, 6vw, 74px);
}

.article-shell {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) 330px;
  margin: 0 auto;
  max-width: 1180px;
  padding: 34px 18px 70px;
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.article-card img {
  aspect-ratio: 16 / 8;
  background: var(--surface-2);
  object-fit: cover;
  width: 100%;
}

.article-body {
  padding: clamp(22px, 4vw, 42px);
}

.article-body h1 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.04;
}

.article-summary {
  color: var(--text);
  font-size: 19px;
}

.source-note {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 24px 0;
  padding: 18px;
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.skeleton {
  animation: pulse 1.1s ease-in-out infinite alternate;
  background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2));
}

.image-skeleton {
  height: 440px;
}

@keyframes pulse {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

@media (max-width: 980px) {
  .portal-hero,
  .content-layout,
  .controls-panel,
  .article-shell,
  .feature-band,
  .footer {
    grid-template-columns: 1fr;
  }

  .post-grid,
  .category-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .site-header {
    flex-wrap: wrap;
  }

  .menu-button {
    display: inline-flex;
  }

  .nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding-top: 14px;
  }

  .nav.open {
    display: flex;
  }

  .lead-card {
    min-height: 360px;
  }

  .lead-overlay {
    padding: 22px;
  }

  .post-grid,
  .category-board,
  .rail {
    grid-template-columns: 1fr;
  }

  .panel-header,
  .split,
  .newsletter {
    align-items: flex-start;
    flex-direction: column;
  }

  .subscribe-form {
    flex-direction: column;
  }
}
