:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-alt: #e8eef8;
  --text: #0f172a;
  --muted: #526074;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.16);
  --brand: #0f766e;
  --brand-2: #1d4ed8;
  --highlight: #be123c;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius: 24px;
  --radius-sm: 16px;
  --container: min(1380px, calc(100vw - 40px));
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.12), transparent 24%),
    var(--bg);
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.site-shell {
  min-height: 100vh;
}

.topline {
  background: #09101e;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.88rem;
}

.topline__inner,
.topline__links,
.topline__meta,
.masthead,
.masthead__actions,
.main-nav__inner,
.ticker__inner,
.section-heading,
.hero-story__meta,
.article-meta,
.article-share,
.footer-bottom .container {
  display: flex;
  align-items: center;
}

.topline__inner,
.main-nav__inner,
.ticker__inner,
.footer-bottom .container {
  justify-content: space-between;
}

.topline__links,
.topline__meta,
.masthead__actions,
.main-nav__inner,
.ticker__items,
.footer-socials,
.article-share,
.breadcrumbs,
.table-actions,
.checkbox-row,
.editor-actions {
  gap: 16px;
}

.topline__links,
.topline__meta {
  padding: 10px 0;
}

.live-badge,
.exclusive-pill,
.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(190, 18, 60, 0.18);
  color: #fff;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(243, 246, 251, 0.92);
  border-bottom: 1px solid transparent;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-sticky {
  border-color: var(--line);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.masthead {
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, #0f766e, #1d4ed8);
  color: #fff;
  box-shadow: var(--shadow);
}

.brand-name {
  font-family: 'Merriweather', serif;
  font-size: clamp(1.2rem, 1rem + 0.9vw, 1.9rem);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.brand-tagline {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  min-width: min(440px, 54vw);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 8px 8px 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.search-form input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-form button,
.newsletter-form button,
.auth-form button,
.profile-form button,
.button-link,
.filter-bar button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e, #0f4d44);
  color: #fff;
  padding: 12px 20px;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  border: 0;
  background: #09101e;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  padding: 12px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
}

.search-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  display: none;
  flex-direction: column;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.search-suggestions.is-visible {
  display: flex;
}

.search-suggestions a {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.main-nav {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.main-nav__inner {
  overflow-x: auto;
  padding: 0;
}

.main-nav__inner a {
  position: relative;
  white-space: nowrap;
  font-weight: 700;
  padding: 16px 0;
}

.main-nav__inner a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--accent, var(--brand));
  transition: transform 0.18s ease;
}

.main-nav__inner a:hover::after {
  transform: scaleX(1);
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  background: rgba(9, 16, 30, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mobile-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer__panel {
  margin-left: auto;
  width: min(84vw, 360px);
  height: 100%;
  background: #fff;
  padding: 28px;
  transform: translateX(100%);
  transition: transform 0.24s ease;
}

.mobile-drawer.is-open .mobile-drawer__panel {
  transform: translateX(0);
}

.mobile-drawer__header,
.mobile-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-drawer__header {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.drawer-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-alt);
}

.ticker {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #0b1324, #12233b);
  color: #fff;
}

.ticker__inner {
  gap: 20px;
  padding: 14px 0;
}

.ticker__label {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ticker__items {
  overflow: auto;
  display: flex;
  flex: 1;
  white-space: nowrap;
}

.ticker__items a {
  position: relative;
  padding-right: 18px;
  margin-right: 18px;
}

.ticker__items a::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transform: translateY(-50%);
}

.flash-stack,
.admin-flashes {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.flash,
.admin-flash {
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.flash--success,
.admin-flash--success {
  border-color: rgba(15, 118, 110, 0.24);
  background: rgba(15, 118, 110, 0.08);
}

.flash--error,
.admin-flash--error {
  border-color: rgba(190, 18, 60, 0.24);
  background: rgba(190, 18, 60, 0.08);
}

.page-main {
  padding: 32px 0 60px;
}

.home-layout,
.article-layout,
.category-page__layout,
.search-results,
.columnist-page__layout,
.auth-layout,
.profile-layout,
.generic-page {
  display: grid;
  gap: 28px;
}

.section-panel,
.hero-story,
.story-card,
.special-card,
.columnist-card,
.sidebar-panel,
.editoria-header,
.article-main,
.auth-panel,
.profile-card,
.generic-page__article,
.search-item,
.category-highlight a {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
}

.section-panel,
.sidebar-panel,
.generic-page__article {
  padding: 28px;
}

.hero-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
  align-items: start;
}

.hero-story {
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 0.95fr;
}

.hero-story__image img,
.story-card__thumb img,
.special-card img,
.section-lead img,
.section-list__item img,
.article-cover img,
.search-item img,
.category-highlight img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-story__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
  gap: 14px;
}

.hero-story h1,
.article-header h1,
.auth-panel h1,
.profile-card h1,
.generic-page__article h1 {
  margin: 0;
  font-family: 'Merriweather', serif;
  font-size: clamp(2.3rem, 1.6rem + 2vw, 4.1rem);
  line-height: 1.05;
}

.hero-secondary,
.quick-feed__grid,
.columnists-grid,
.trending-cards__grid {
  display: grid;
  gap: 18px;
}

.hero-secondary {
  grid-template-columns: 1fr;
}

.story-card {
  overflow: hidden;
}

.story-card--compact {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
}

.story-card--featured {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(29, 78, 216, 0.04));
}

.story-card__body {
  padding: 18px;
}

.story-card h2,
.story-card h3,
.section-lead h3,
.section-list__item h4,
.search-item h2,
.columnist-card h3 {
  margin: 10px 0 8px;
  line-height: 1.18;
}

.story-card p,
.section-lead p,
.section-list__item p,
.columnist-card p,
.search-item p,
.editoria-header p,
.article-subtitle,
.empty-state,
.auth-panel p,
.profile-card p,
.footer-brand p {
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.quick-feed__grid,
.trending-cards__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-heading h2,
.sidebar-panel h2 {
  margin: 0;
  font-size: 1.35rem;
}

.section-heading a {
  color: var(--brand-2);
  font-weight: 700;
}

.category-pill {
  --accent: var(--brand);
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.special-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
}

.special-card a,
.section-lead a,
.section-list__item a,
.category-highlight a,
.search-item {
  display: block;
  height: 100%;
}

.special-card__overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 22px;
  background: linear-gradient(180deg, transparent, rgba(9, 16, 30, 0.86));
  color: #fff;
}

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

.columnist-card {
  padding: 24px;
  display: grid;
  gap: 18px;
  grid-template-columns: 92px minmax(0, 1fr);
}

.columnist-card__avatar img,
.columnist-hero img,
.author-box img,
.profile-card__summary img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 26px;
}

.columnist-card__link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  color: var(--brand-2);
}

.content-with-rail {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

.content-with-rail__main,
.content-with-rail__sidebar {
  display: grid;
  gap: 24px;
}

.editorial-section {
  display: grid;
  gap: 18px;
}

.editorial-section__grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
}

.section-lead,
.category-highlight a {
  overflow: hidden;
}

.section-lead__copy,
.category-highlight div {
  padding: 24px;
}

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

.section-list__item a {
  display: grid;
  gap: 16px;
  grid-template-columns: 140px minmax(0, 1fr);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.sidebar-panel ul,
.article-tags,
.footer-grid ul,
.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-panel li,
.timeline-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.ad-slot {
  border-radius: 24px;
  overflow: hidden;
}

.ad-card img {
  width: 100%;
  border-radius: 24px;
}

.breadcrumbs {
  flex-wrap: wrap;
  color: var(--muted);
}

.article-main {
  padding: 36px;
}

.article-meta {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  margin: 22px 0;
}

.article-share {
  flex-wrap: wrap;
}

.article-share a,
.article-tags a,
.footer-socials a {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface-alt);
  font-weight: 700;
}

.article-cover {
  margin: 0 0 28px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.article-cover figcaption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  background: rgba(9, 16, 30, 0.04);
  color: var(--muted);
}

.article-content {
  font-size: 1.08rem;
  line-height: 1.8;
}

.article-content h2,
.article-content h3 {
  margin-top: 1.8em;
  font-family: 'Merriweather', serif;
  line-height: 1.2;
}

.article-content blockquote {
  margin: 2em 0;
  padding: 22px 26px;
  border-left: 4px solid var(--brand);
  background: rgba(15, 118, 110, 0.06);
  border-radius: 0 22px 22px 0;
  font-size: 1.18rem;
}

.author-box,
.columnist-hero,
.profile-card__summary {
  display: grid;
  gap: 22px;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
}

.filter-bar form,
.newsletter-form,
.auth-form,
.profile-form {
  display: grid;
  gap: 14px;
}

.filter-bar form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.newsletter-form input,
.auth-form input,
.profile-form input,
.search-form,
.filter-bar select,
.filter-bar button,
.stack-form input,
.stack-form select,
.stack-form textarea,
.editor-form input,
.editor-form select,
.editor-form textarea,
.editor-form__grid input,
.editor-form__grid textarea,
.editor-form__grid select {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
}

.search-list {
  display: grid;
  gap: 16px;
}

.search-item {
  padding: 18px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
}

mark {
  background: rgba(234, 179, 8, 0.28);
  border-radius: 6px;
  padding: 0 4px;
}

.auth-layout,
.profile-layout {
  justify-items: center;
}

.auth-panel,
.profile-card {
  width: min(720px, 100%);
  padding: 34px;
}

.site-footer {
  background: #09101e;
  color: rgba(255, 255, 255, 0.84);
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  gap: 30px;
  padding: 56px 0 36px;
  grid-template-columns: 1.2fr 0.9fr 0.9fr 1.2fr;
}

.footer-grid h3 {
  color: #fff;
  margin-top: 0;
}

.footer-grid li {
  margin: 0 0 12px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
}

.pagination {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.pagination a {
  min-width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.pagination a.is-active {
  background: #0f172a;
  color: #fff;
}

@media (max-width: 1180px) {
  .hero-grid,
  .content-with-rail,
  .editorial-section__grid,
  .quick-feed__grid,
  .special-strip__row,
  .columnists-grid,
  .trending-cards__grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-with-rail {
    grid-template-columns: 1fr;
  }

  .hero-story {
    grid-template-columns: 1fr;
  }

  .search-form {
    min-width: 0;
  }
}

@media (max-width: 820px) {
  .topline__links {
    display: none;
  }

  .masthead {
    align-items: flex-start;
  }

  .search-form {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
  }

  .main-nav {
    display: none;
  }

  .quick-feed__grid,
  .special-strip__row,
  .columnists-grid,
  .trending-cards__grid,
  .editorial-section__grid,
  .filter-bar form,
  .footer-grid,
  .hero-grid,
  .article-cover figcaption,
  .author-box,
  .columnist-hero,
  .profile-card__summary,
  .search-item {
    grid-template-columns: 1fr;
  }

  .story-card--compact,
  .section-list__item a {
    grid-template-columns: 1fr;
  }

  .article-main {
    padding: 24px;
  }

  .article-header h1,
  .hero-story h1 {
    font-size: 2rem;
  }
}
