:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1b1f27;
  --muted: #5f6877;
  --primary: #163a70;
  --primary-dark: #10294f;
  --accent: #b58b3a;
  --line: #d7dde6;
  --footer: #0d1630;
  --max: 1180px;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.wrap {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

h1,
h2,
h3,
.brand {
  font-family: 'Merriweather', Georgia, serif;
  line-height: 1.2;
  margin: 0 0 14px;
  color: var(--primary-dark);
}

h1 {
  font-size: clamp(2rem, 4vw, 3.8rem);
}

h2 {
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 14px;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.top-strip {
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.9rem;
}

.latest-strip {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.latest-strip strong {
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.header-main {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--primary-dark);
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.main-nav a {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text);
}

.main-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

.brand-hero {
  position: relative;
  height: 200px;
  min-height: 140px;
  background-size: cover;
  background-position: center 20%;
  overflow: hidden;
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.brand-hero-overlay {
  display: none;
}

.hero-news {
  padding: 34px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 24px;
  align-items: stretch;
}

.lead-story,
.top-stories,
.article-card,
.category-card,
.story-page,
.category-page-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.lead-story {
  overflow: hidden;
}

.lead-story img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.story-body {
  padding: 24px;
}

.story-body h1 {
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.08;
  margin-bottom: 18px;
}

.story-body p {
  font-size: 1.02rem;
  color: var(--muted);
}

.article-card h3 {
  font-size: 1.45rem;
  line-height: 1.2;
  margin-bottom: 10px;
}

.story-body h1 a:hover,
.article-card h3 a:hover,
.top-story h3 a:hover,
.category-card a:hover {
  color: var(--primary);
}

.category-label {
  display: inline-block;
  color: var(--primary);
  background: rgba(22, 58, 112, 0.08);
  border: 1px solid rgba(22, 58, 112, 0.14);
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.meta {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.top-stories {
  padding: 22px;
}

.top-story {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.top-story:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.top-story span {
  display: block;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 7px;
}

section {
  padding: 34px 0;
}

.section-head {
  margin-bottom: 20px;
}

.latest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.article-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  padding: 16px;
  align-items: start;
}

.article-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.article-card p {
  color: var(--muted);
}

.section-soft {
  background: #eef1f6;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  overflow: hidden;
  padding: 0;
}

.category-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.category-card-body {
  padding: 22px;
}

.category-card p {
  color: var(--muted);
}

.site-footer {
  background: var(--footer);
  color: rgba(255,255,255,0.78);
  margin-top: 34px;
  padding: 42px 0 24px;
}

.site-footer h2,
.site-footer h3 {
  color: #fff;
}

.site-footer a {
  color: rgba(255,255,255,0.88);
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 28px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 9px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 28px;
  padding-top: 18px;
  font-size: 0.9rem;
}

/* Category page */

.page-hero {
  padding: 48px 0 26px;
  background: #eef1f6;
  border-bottom: 1px solid var(--line);
}

.page-hero p {
  max-width: 70ch;
  color: var(--muted);
}

.category-list {
  display: grid;
  gap: 18px;
}

.category-page-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  padding: 18px;
}

.category-page-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}

/* Post page */

.post-wrap {
  width: min(100% - 32px, 820px);
  margin: 0 auto;
}

.story-page {
  padding: 26px;
}

.story-page img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  margin: 18px 0 24px;
}

.story-content {
  font-size: 1.05rem;
}

.story-content p {
  margin-bottom: 18px;
}

@media (max-width: 980px) {
  .header-main {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 0;
  }

  .hero-grid,
  .latest-grid,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .latest-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding: 8px 0;
  }

  .brand {
    font-size: 1.55rem;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .brand-hero {
    min-height: 180px;
    height: 180px;
  }

  .main-nav {
    gap: 12px;
  }

  .hero-grid,
  .latest-grid,
  .category-grid,
  .footer-grid,
  .article-card,
  .category-page-card {
    grid-template-columns: 1fr;
  }

  .article-card img,
  .category-page-card img {
    aspect-ratio: 16 / 9;
  }

  .story-page {
    padding: 20px;
  }
}