:root {
  color-scheme: light;
  --bg: #faf7ff;
  --surface: #ffffff;
  --surface-2: #f3ecff;
  --text: #211432;
  --muted: #6c617a;
  --line: #e5d8f6;
  --brand: #7c3aed;
  --brand-2: #a855f7;
  --accent: #4c1d95;
  --danger: #be123c;
  --shadow: 0 18px 45px rgba(76, 29, 149, 0.10);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12091f;
  --surface: #1d102f;
  --surface-2: #2a1744;
  --text: #fbf8ff;
  --muted: #cdbfe0;
  --line: #40255f;
  --brand: #c084fc;
  --brand-2: #e9d5ff;
  --accent: #f5f3ff;
  --danger: #fb7185;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.skip-link {
  background: var(--text);
  color: var(--surface);
  left: 1rem;
  padding: .7rem 1rem;
  position: absolute;
  top: -4rem;
  z-index: 20;
}

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

.wrap {
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 20px;
}

.topbar {
  background: linear-gradient(90deg, #174ea6, #7c3aed);
  color: var(--surface);
  font-size: .82rem;
}

.topbar__inner,
.brand-row,
.category-nav__inner {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.topbar__inner {
  min-height: 36px;
}

.topbar nav,
.category-nav__inner,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.topbar a {
  color: color-mix(in srgb, var(--surface), transparent 14%);
}

.site-header {
  background: color-mix(in srgb, var(--surface), var(--surface-2) 18%);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand-row {
  justify-content: center;
  min-height: 118px;
  position: relative;
}

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

.brand__logo {
  display: block;
  height: auto;
  max-height: 108px;
  object-fit: contain;
  width: min(500px, 72vw);
}

.brand__mark {
  align-items: center;
  background: linear-gradient(135deg, #174ea6, #a855f7);
  border-radius: 6px;
  color: #fff;
  display: grid;
  font-weight: 900;
  height: 46px;
  letter-spacing: 0;
  place-items: center;
  width: 54px;
}

.brand strong {
  display: block;
  font-size: clamp(1.35rem, 2vw, 2rem);
  letter-spacing: 0;
  line-height: 1;
}

.brand small {
  color: var(--muted);
  display: block;
  margin-top: 5px;
}

.header-ad,
.ad-box {
  background: linear-gradient(135deg, #ffffff, #f3e8ff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  min-height: 70px;
  padding: 14px 18px;
}

.header-ad {
  flex: 1;
  max-width: 560px;
  text-align: center;
}

.header-ad span,
.ad-box span {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
}

.header-ad strong,
.ad-box strong {
  color: var(--text);
  display: block;
  margin-top: 4px;
}

.theme-toggle {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand);
  cursor: pointer;
  display: grid;
  height: 42px;
  place-items: center;
  position: absolute;
  right: 20px;
  width: 42px;
}

.category-nav {
  background: #174ea6;
  border-bottom: 4px solid #dc2626;
  border-top: 4px solid #dc2626;
}

.category-nav__inner {
  justify-content: flex-start;
  min-height: 48px;
  overflow-x: auto;
  padding-bottom: 8px;
  padding-top: 8px;
}

.category-nav a {
  border: 0px solid #ef4444;
  border-radius: 999px;
  color: #ffffff;
  font-size: .9rem;
  font-weight: 800;
  padding: 7px 10px;
  white-space: nowrap;
}

.category-nav a:hover,
.category-nav a.is-active {
  background: rgba(220, 38, 38, 0.26);
  border-color: #ffffff;
  color: #ffffff;
}

.ad-marquee {
  background: #ffffff;
  border-bottom: 1px solid #ef4444;
  color: #2e1065;
  overflow: hidden;
  width: 100%;
}

.ad-marquee__track {
  align-items: center;
  animation: marqueeMove 28s linear infinite;
  display: flex;
  gap: 34px;
  min-height: 38px;
  white-space: nowrap;
  width: max-content;
}

.ad-marquee__track span {
  font-size: .88rem;
  font-weight: 900;
}

.ad-marquee__track span::before {
  color: #dc2626;
  content: "AD";
  display: inline-block;
  font-size: .72rem;
  margin-right: 8px;
}

@keyframes marqueeMove {
  from {
    transform: translateX(100vw);
  }

  to {
    transform: translateX(-100%);
  }
}

.search-panel {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(260px, .8fr) 1.2fr;
  padding-bottom: 28px;
  padding-top: 34px;
}

.eyebrow {
  color: var(--brand-2);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(1.6rem, 3vw, 2.85rem);
  line-height: 1.04;
  margin-bottom: 0;
  max-width: 740px;
}

.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  grid-template-columns: 1.4fr repeat(3, minmax(128px, .8fr));
  padding: 14px;
}

label span {
  color: var(--muted);
  display: block;
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: 6px;
}

input,
select,
textarea {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  padding: 0 12px;
  width: 100%;
}

input,
select {
  min-height: 42px;
}

textarea {
  line-height: 1.55;
  min-height: 160px;
  padding-bottom: 12px;
  padding-top: 12px;
  resize: vertical;
}

.lead-grid,
.content-shell {
  display: grid;
  align-items: start;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.lead-grid {
  grid-template-columns: 1fr;
  padding-top: 34px;
}

.lead-grid .side-stack {
  display: none;
}

.lead-story {
  background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--surface-2), var(--surface) 45%));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: minmax(250px, .78fr) 1.22fr;
  height: 426px;
  min-height: 0;
  overflow: hidden;
}

.lead-story img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.lead-story__content {
  align-self: center;
  padding: clamp(18px, 3vw, 28px);
}

.tag {
  background: color-mix(in srgb, var(--brand), transparent 86%);
  border-radius: 999px;
  color: var(--brand);
  display: inline-flex;
  font-size: .75rem;
  font-weight: 800;
  margin-bottom: 14px;
  padding: 6px 9px;
}

.lead-story h2 {
  font-size: clamp(1.25rem, 1.8vw, 1.8rem);
  line-height: 1.08;
  margin-bottom: 10px;
}

.lead-story p {
  display: -webkit-box;
  font-size: .95rem;
  line-height: 1.45;
  margin-bottom: 10px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.lead-story p,
.module-note,
.ad-box p,
.site-footer p {
  color: var(--muted);
  line-height: 1.65;
}

.meta {
  color: var(--muted);
  font-size: .85rem;
}

.side-stack,
.right-rail {
  display: grid;
  gap: 18px;
  align-content: start;
}

.module {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.module__heading {
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.module h2,
.section-title h2,
.site-footer h2 {
  font-size: 1.1rem;
  line-height: 1.2;
  margin-bottom: 0;
}

.trending-list {
  counter-reset: item;
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.trending-list li {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: 34px 1fr;
  padding-bottom: 14px;
}

.trending-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.trend-rank {
  align-items: center;
  background: var(--surface-2);
  border-radius: 6px;
  color: var(--brand);
  display: grid;
  font-weight: 900;
  height: 34px;
  place-items: center;
}

.trend-title {
  display: block;
  font-weight: 800;
  line-height: 1.25;
}

.trend-meta {
  color: var(--muted);
  display: block;
  font-size: .8rem;
  margin-top: 5px;
}

.content-shell {
  padding-bottom: 48px;
  padding-top: 0;
}

.section-title {
  align-items: end;
  border-bottom: 2px solid var(--text);
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
}

.section-title > p {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 0;
}

.article-feed {
  display: grid;
  gap: 14px;
}

.category-home-feed {
  gap: 28px;
}

.category-latest-section {
  display: grid;
  gap: 14px;
}

.category-latest-heading {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding-bottom: 10px;
}

.category-latest-heading h3 {
  font-size: 1.25rem;
  margin: 0;
}

.category-latest-heading a,
.category-card a {
  color: var(--brand);
  font-size: .88rem;
  font-weight: 900;
}

.category-latest-grid {
  display: grid;
  gap: 14px;
}

.category-page-hero {
  padding-bottom: 8px;
  padding-top: 34px;
}

.category-page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  margin-bottom: 10px;
}

.category-page-hero p:last-child {
  color: var(--muted);
  line-height: 1.65;
  max-width: 760px;
}

.category-content {
  padding-top: 18px;
}

.contact-page {
  display: grid;
  gap: 34px;
  grid-template-columns: .9fr 1.1fr;
  padding-bottom: 56px;
  padding-top: 42px;
}

.contact-intro h1 {
  margin-bottom: 14px;
}

.contact-intro p {
  color: var(--muted);
  line-height: 1.7;
}

.contact-note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 14px;
}

.contact-note span {
  color: var(--muted);
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px);
}

.contact-form button {
  background: linear-gradient(135deg, #6d28d9, #9333ea);
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  min-height: 46px;
  padding: 0 18px;
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 16px;
  grid-template-columns: 190px 1fr;
  padding: 12px;
}

.article-card[hidden] {
  display: none;
}

.article-card img {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.article-card h3 {
  font-size: 1.18rem;
  line-height: 1.25;
  margin-bottom: 8px;
}

.article-card p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 10px;
}

.card-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: .82rem;
  gap: 10px;
}

.score {
  color: var(--brand);
  font-weight: 800;
}

.read-more-btn {
  background: var(--brand);
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: .86rem;
  font-weight: 900;
  margin-top: 14px;
  min-height: 38px;
  padding: 0 14px;
}

.read-more-btn:hover,
.read-more-btn[aria-expanded="true"] {
  background: var(--accent);
}

.article-details {
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.7;
  margin-top: 14px;
  padding-top: 14px;
}

.article-details p {
  margin-bottom: 12px;
}

.article-details p:last-child {
  margin-bottom: 0;
}

.load-more,
.newsletter button {
  background: linear-gradient(135deg, #174ea6 #5a3ddb);
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  margin-top: 18px;
  min-height: 44px;
  padding: 0 18px;
}

.recommendation {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.recommendation:first-child {
  padding-top: 0;
}

.recommendation:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.recommendation strong {
  display: block;
  line-height: 1.3;
}

.recommendation span {
  color: var(--muted);
  display: block;
  font-size: .82rem;
  margin-top: 6px;
}

.authors {
  display: grid;
  gap: 14px;
}

.authors article {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 48px 1fr;
}

.authors img {
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
}

.authors span {
  color: var(--muted);
  display: block;
  font-size: .84rem;
  margin-top: 3px;
}

.newsletter form {
  display: grid;
  gap: 12px;
}

.ad-rail {
  display: grid;
  gap: 16px;
}

.rail-ad {
  background: linear-gradient(135deg, #ffffff, #f5edff);
  border: 1px solid #e5d8f6;
  border-left: 5px solid #dc2626;
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(76, 29, 149, 0.08);
  min-height: 168px;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.rail-ad::after {
  background: rgba(124, 58, 237, 0.09);
  border-radius: 999px;
  content: "";
  height: 96px;
  position: absolute;
  right: -34px;
  top: -36px;
  width: 96px;
}

.rail-ad span {
  color: #dc2626;
  display: block;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.rail-ad strong {
  color: var(--text);
  display: block;
  font-size: 1.08rem;
  line-height: 1.25;
  margin-bottom: 10px;
  max-width: 230px;
}

.rail-ad p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
  max-width: 260px;
}

.rail-ad--motion {
  animation: adSweep 5s ease-in-out infinite;
  background: linear-gradient(120deg, #ffffff 0%, #efe3ff 35%, #ffffff 70%);
  background-size: 220% 100%;
}

.rail-ad--pulse {
  animation: adPulse 3.8s ease-in-out infinite;
  border-left-color: #174ea6;
}

.rail-ad--dark {
  background: linear-gradient(135deg, #2e1065, #174ea6);
  border-color: rgba(255, 255, 255, 0.22);
  border-left-color: #ef4444;
}

.rail-ad--dark span,
.rail-ad--dark strong {
  color: #ffffff;
}

.rail-ad--dark p {
  color: #e9d5ff;
}

@keyframes adSweep {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes adPulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 12px 28px rgba(76, 29, 149, 0.08);
  }

  50% {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(23, 78, 166, 0.16);
  }
}

.category-blocks {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border-top: 1px solid var(--line);
  padding: 42px 0;
}

.category-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(5, 1fr);
}

.category-card {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 160px;
  padding: 16px;
}

.category-card h3 {
  margin-bottom: 10px;
}

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

.category-card span {
  color: var(--brand);
  font-size: .82rem;
  font-weight: 900;
}

.site-footer {
  background: linear-gradient(135deg, #2e1065, #4c1d95);
  color: #fbf8ff;
  padding: 40px 0;
}

.site-footer .brand__mark {
  background: #ffffff;
  color: #6d28d9;
}

.brand__logo--footer {
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.22));
  max-height: 96px;
  width: min(360px, 76vw);
}

.site-footer p,
.site-footer a,
.site-footer small {
  color: #eadcff;
}

.footer-grid {
  display: grid;
  gap: 34px;
  grid-template-columns: 1.1fr 1fr 1fr;
}

.footer-links {
  gap: 10px 16px;
}

@media (max-width: 980px) {
  .brand-row,
  .search-panel,
  .lead-grid,
  .content-shell,
  .contact-page,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .brand-row {
    align-items: center;
    display: grid;
    justify-items: center;
    min-height: 108px;
    padding-bottom: 10px;
    padding-top: 10px;
  }

  .brand__logo {
    max-height: 92px;
    width: min(400px, 76vw);
  }

  .theme-toggle {
    position: absolute;
    right: 20px;
    top: 54px;
  }

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

  .lead-story {
    grid-template-columns: 1fr;
    height: auto;
  }

  .lead-story img {
    aspect-ratio: 21 / 9;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 10px;
    padding-top: 10px;
  }

  .filters,
  .article-card,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .brand__logo {
    max-height: 78px;
    width: min(320px, 78vw);
  }

  .article-card img {
    aspect-ratio: 16 / 9;
  }

  .section-title {
    align-items: flex-start;
    gap: 10px;
    flex-direction: column;
  }
}
