:root {
  --bg: #fff7f7;
  --surface: #ffffff;
  --surface-soft: #fff1f1;
  --ink: #181818;
  --ink-soft: #4a4a4a;
  --muted: #737373;
  --brand: #d80621;
  --brand-dark: #a40016;
  --accent: #d80621;
  --line: #ead4d7;
  --shadow: 0 18px 45px rgba(164, 0, 22, 0.08);
  --max-width: 1120px;
  --font-ui: Arial, "Segoe UI", Helvetica, sans-serif;
  --font-display: Constantia, Georgia, "Times New Roman", serif;
  --font-body: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #ffffff 0, var(--bg) 340px),
    var(--bg);
  line-height: 1.6;
  font-family: var(--font-ui);
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: 0;
}

h1 {
  margin: 0.2rem 0 0.7rem;
  font-size: clamp(2.2rem, 4.5vw, 4.1rem);
}

h2 { font-size: 1.62rem; }
h3 { font-size: 1.16rem; }

p { margin: 0.55rem 0; }

a {
  color: var(--brand-dark);
  text-decoration: none;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(216, 6, 33, 0.22);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(234, 212, 215, 0.9);
  backdrop-filter: blur(14px);
}

.header-inner {
  position: relative;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  color: var(--ink);
  min-width: 0;
}

.brand:hover {
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(132px, 20vw, 194px);
  height: auto;
  max-height: 50px;
}

.primary-nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem;
}

.site-nav {
  position: absolute;
  top: calc(100% - 0.25rem);
  right: 0;
  width: min(280px, calc(100vw - 2rem));
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  z-index: 20;
}

.site-nav.open {
  display: flex;
}

.primary-nav a,
.site-nav a {
  padding: 0.42rem 0.68rem;
  border-radius: 6px;
  color: var(--ink-soft);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 700;
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
}

.primary-nav a.active,
.primary-nav a:hover,
.site-nav a.active,
.site-nav a:hover {
  color: var(--brand-dark);
  border-color: rgba(185, 28, 28, 0.18);
  background: #fff1f1;
  text-decoration: none;
}

.menu-button {
  margin-left: 0.15rem;
  margin-right: 0.25rem;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
  font-weight: 800;
}

main.wrap {
  padding-top: 1.1rem;
}

.news-strip {
  margin: 0;
}

.hero {
  margin: 0 0 1.2rem;
  padding: clamp(1.15rem, 3vw, 2rem);
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 241, 241, 0.9)),
    var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--brand);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero h1 {
  max-width: 880px;
  line-height: 1.05;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--brand);
  margin: 0 0 0.25rem;
  font-weight: 900;
}

.hero p {
  max-width: 780px;
  color: var(--ink-soft);
  font-size: 1.04rem;
  line-height: 1.55;
}

.read-more {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 0.45rem;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  padding: 0.55rem 0.82rem;
  font-weight: 800;
}

.read-more:hover {
  background: var(--brand-dark);
  color: #fff;
  text-decoration: none;
}

.category-grid,
.footer-block,
.about-content,
.disclaimer-content {
  margin: 1rem 0 1.2rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.tag:hover {
  color: var(--brand);
  border-color: rgba(185, 28, 28, 0.28);
  text-decoration: none;
}

.controls {
  position: sticky;
  top: 84px;
  z-index: 5;
  margin: 1rem 0;
}

.controls input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.76rem 0.9rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 25px rgba(23, 34, 53, 0.06);
  color: var(--ink);
  font: inherit;
}

.article-grid,
.article-list,
.category-grid,
.concept-grid {
  display: grid;
  gap: 0.85rem;
}

.article-grid {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  align-items: stretch;
}

.article-list {
  grid-template-columns: minmax(0, 1fr);
}

.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.concept-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-bottom: 1.2rem;
}

.news-card,
.post-card,
.category-card,
.concept-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 10px 28px rgba(23, 34, 53, 0.05);
}

.news-card,
.post-card,
.concept-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.news-card:hover,
.post-card:hover,
.concept-card:hover {
  transform: translateY(-2px);
  border-color: #e5b9bf;
  box-shadow: 0 18px 38px rgba(164, 0, 22, 0.09);
}

.news-card h3,
.post-card h3,
.concept-card h3 {
  margin: 0.1rem 0 0.2rem;
  font-size: 1.22rem;
  line-height: 1.12;
}

.news-card h3 a,
.post-card h3 a,
.concept-card h3 a {
  color: var(--ink);
}

.news-card h3 a:hover,
.post-card h3 a:hover,
.concept-card h3 a:hover {
  color: var(--brand);
}

.news-card p:not(.card-meta):not(.score),
.post-card p:not(.card-meta):not(.score),
.concept-card p:not(.card-meta):not(.score) {
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.concept-card .plain-name {
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.concept-card-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 100%;
  color: inherit;
  text-decoration: none;
}

.concept-card-link:hover {
  color: inherit;
  text-decoration: none;
}

.concept-card-link:hover h3 {
  color: var(--brand);
}

.concept-library .hero h1 {
  max-width: 760px;
}

.concept-section {
  margin: 1.15rem 0 1.6rem;
}

.concept-section h2 {
  margin-bottom: 0.7rem;
}

.card-meta,
.post-meta,
.breadcrumb {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.score {
  color: var(--accent);
  font-size: 0.84rem;
  margin: 0 0 0.2rem;
  font-weight: 900;
}

.tag {
  width: fit-content;
  margin-top: auto;
  padding: 0.22rem 0.58rem;
  background: #fffafa;
}

.single-post,
.category-page,
.about-content,
.disclaimer-content,
.footer-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}

.single-post {
  max-width: 860px;
  margin: 0 auto;
}

.article-template {
  max-width: 820px;
  padding: 0;
  overflow: hidden;
}

.article-header,
.article-hero {
  padding: clamp(1.2rem, 3vw, 2.4rem) clamp(1.1rem, 4vw, 3rem) 1.2rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 241, 241, 0.92), #fff 78%),
    var(--surface);
}

.article-header .breadcrumb,
.article-hero .breadcrumb {
  margin-bottom: 0.8rem;
}

.article-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.article-category {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.18rem 0.6rem;
  border: 1px solid rgba(185, 28, 28, 0.22);
  border-radius: 999px;
  background: #fff5f5;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.article-category:hover {
  color: var(--brand-dark);
  text-decoration: none;
  border-color: rgba(185, 28, 28, 0.4);
}

.article-source-type {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.18rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.article-template h1 {
  max-width: 760px;
  margin-top: 0.7rem;
  font-size: clamp(2.35rem, 4vw, 3.45rem);
  line-height: 1.04;
}

.article-standfirst,
.article-dek {
  max-width: 680px;
  margin-top: 0.7rem;
  color: var(--ink-soft);
  font-size: 1.12rem;
  line-height: 1.5;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.article-meta span + span::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 0.65rem 0.1rem 0;
  border-radius: 50%;
  background: var(--line);
}

.article-body {
  padding: clamp(1.2rem, 3vw, 2.5rem) clamp(1.1rem, 4vw, 3rem);
  color: #242424;
  font-family: var(--font-body);
  font-size: clamp(1.12rem, 1.35vw, 1.22rem);
  line-height: 1.68;
}

.article-body p {
  margin: 0 0 1.05rem;
}

.concept-link {
  color: var(--brand-dark);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.concept-link:hover {
  color: var(--brand);
}

.concept-detail .article-body p:first-child::first-letter {
  float: none;
  padding: 0;
  color: inherit;
  font: inherit;
}

.concept-detail-page .single-post {
  max-width: 780px;
}

.concept-detail .article-header {
  padding: clamp(1rem, 2.5vw, 1.65rem) clamp(1rem, 4vw, 2rem) 1rem;
}

.concept-detail .article-header .breadcrumb {
  margin-bottom: 0.55rem;
}

.concept-detail h1 {
  margin-top: 0.55rem;
  font-size: clamp(2.05rem, 5vw, 3.15rem);
  line-height: 1.03;
}

.concept-detail .article-standfirst {
  margin-top: 0.45rem;
  font-size: 1.04rem;
}

.concept-detail .article-body {
  padding: clamp(1rem, 2.6vw, 1.75rem) clamp(1rem, 4vw, 2rem);
}

.concept-detail .article-body p {
  margin-bottom: 0.85rem;
}

.concept-detail h2 {
  margin-top: 1rem;
  padding-top: 0.65rem;
}

.concept-detail h2:first-of-type {
  margin-top: 0;
}

.concept-detail .article-classification,
.concept-detail .article-related,
.concept-detail .article-sources {
  padding: 0.85rem clamp(1rem, 4vw, 2rem) 1rem;
}

.concept-detail .article-classification h2,
.concept-detail .article-related h2,
.concept-detail .article-sources h2 {
  margin-bottom: 0.38rem;
}

.concept-detail .topic-chips {
  margin: 0.35rem 0 0;
}

.concept-detail .concept-aliases {
  margin-bottom: 0.75rem;
}

.concept-detail .concept-aliases .tag {
  margin-top: 0;
  color: var(--ink-soft);
  background: #fffafa;
}

.article-lede {
  color: var(--ink);
  font-size: inherit;
  font-weight: inherit;
}

.article-body p:first-child::first-letter {
  color: var(--brand-dark);
  float: left;
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 0.86;
  padding: 0.08rem 0.38rem 0 0;
}

.article-sources,
.article-source,
.article-classification,
.article-related {
  padding: 1.05rem clamp(1.1rem, 4vw, 3rem) 1.25rem;
  border-top: 1px solid rgba(234, 212, 215, 0.85);
  background: var(--surface);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: clamp(1rem, 1vw, 1.08rem);
  line-height: 1.55;
}

.article-sources h2,
.article-source h2,
.article-classification h2,
.article-related h2 {
  margin: 0 0 0.5rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.15;
}

.article-sources ul,
.article-source ul,
.article-related ul {
  margin: 0;
  padding-left: 1.15rem;
}

.article-sources li,
.article-source li,
.article-related li {
  margin: 0.25rem 0;
}

.article-sources a,
.article-source a,
.article-related a {
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.18em;
}

.article-classification {
  background: linear-gradient(180deg, #fff, rgba(255, 250, 250, 0.58));
}

.article-classification p {
  margin: 0 0 0.5rem;
}

.article-classification .topic-chips {
  margin: 0.55rem 0 0;
}

.article-classification .tag {
  border-color: rgba(234, 212, 215, 0.9);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
}

.article-related li span {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  margin-left: 0.35rem;
}

.single-post h1 {
  font-size: clamp(2.25rem, 4vw, 3.35rem);
}

.single-post h2,
.single-post h3 {
  margin: 1.45rem 0 0.45rem;
}

.single-post h2 {
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.single-post h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.single-post h2 + p,
.single-post section p {
  margin-top: 0;
}

.single-post ul {
  padding-left: 1.2rem;
}

.single-post li {
  margin: 0.32rem 0;
}

.topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.7rem 0 1rem;
}

.post-media {
  margin: 0.7rem 0 1.2rem;
}

.post-media img,
.post-media video {
  max-width: 100%;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  background: var(--surface-soft);
}

.post-media figcaption {
  margin-top: 0.45rem;
  font-size: 0.84rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.site-footer {
  margin-top: 1.7rem;
  border-top: 1px solid var(--line);
  padding: 1rem 0 1.45rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.9rem;
}

.site-footer p {
  margin: 0;
  margin-right: auto;
}

.footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem 0.9rem;
}

.site-footer a {
  color: var(--brand-dark);
  font-weight: 700;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  border: 1px solid var(--line);
  background: var(--brand-dark);
  color: #fff;
  text-decoration: none;
  padding: 0.48rem 0.72rem;
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(23, 34, 53, 0.18);
  display: none;
}

.back-to-top:hover {
  color: #fff;
  background: var(--brand);
  text-decoration: none;
}

.back-to-top.visible { display: inline-flex; }

.ad-slot {
  border: 1px dashed #e5b9bf;
  background: #fffafa;
  padding: 0.75rem;
  text-align: center;
  margin: 0.9rem 0;
  border-radius: 8px;
}

.ad-slot-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.hidden { display: none !important; }

@media (max-width: 900px) {
  .header-inner {
    min-height: 62px;
    gap: 0.45rem;
  }

  .primary-nav {
    margin-left: auto;
  }

  .primary-nav a {
    padding-left: 0.52rem;
    padding-right: 0.52rem;
  }

  .wrap { width: min(100% - 1rem, var(--max-width)); }

  .controls {
    top: 76px;
    margin: 0.75rem 0;
  }

  .controls input {
    min-height: 46px;
    box-shadow: 0 12px 28px rgba(164, 0, 22, 0.11);
  }
}

@media (max-width: 700px) {
  main.wrap {
    padding-top: 0.7rem;
  }

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

  .hero {
    margin-top: 0;
  }

  .site-header {
    position: static;
  }

  .controls {
    top: 0.5rem;
    z-index: 8;
    padding: 0.25rem 0;
    background: linear-gradient(180deg, rgba(255, 247, 247, 0.96), rgba(255, 247, 247, 0.72));
    backdrop-filter: blur(10px);
  }

  .site-footer .wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer p {
    margin-right: 0;
  }

  .footer-links {
    flex-direction: row;
  }

  .article-template {
    border-radius: 6px;
  }

  .article-header,
  .article-hero,
  .article-body,
  .article-sources,
  .article-source,
  .article-classification,
  .article-related {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .article-template h1 {
    font-size: 2.15rem;
    line-height: 1.06;
  }

  .article-standfirst,
  .article-dek {
    font-size: 1.06rem;
  }

  .article-meta {
    display: grid;
    gap: 0.25rem;
  }

  .article-meta span + span::before {
    display: none;
  }

  .article-body p:first-child::first-letter {
    font-size: 2.8rem;
  }
}

@media (max-width: 420px) {
  .brand {
    flex-basis: 126px;
  }

  .primary-nav a {
    font-size: 0.84rem;
    padding-left: 0.38rem;
    padding-right: 0.38rem;
  }

  .brand-logo {
    width: 126px;
  }

  .article-template h1 {
    font-size: 2rem;
  }

}
