:root {
  --page: #f5f7f5;
  --surface: #ffffff;
  --ink: #17201e;
  --muted: #566461;
  --line: #d9e1dd;
  --teal: #286864;
  --teal-dark: #173f42;
  --amber: #b97d2b;
  --plum: #624b6b;
  --leaf: #5a7c50;
  --soft-teal: #e4f0ed;
  --soft-amber: #f5ead9;
  --soft-plum: #efe9f2;
  --shadow: 0 18px 60px rgba(23, 32, 30, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.62;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 50;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 72px);
  background: rgba(245, 247, 245, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-header nav a {
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible,
.site-header nav a.active {
  color: var(--ink);
}

.hero {
  min-height: min(760px, calc(100vh - 65px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: clamp(32px, 7vw, 96px);
  align-items: center;
  padding: clamp(64px, 9vw, 120px) clamp(20px, 6vw, 96px);
  background:
    linear-gradient(135deg, rgba(228, 240, 237, 0.92), rgba(245, 234, 217, 0.78)),
    var(--page);
}

.hero-copy {
  max-width: 780px;
}

.kicker,
.eyebrow {
  margin: 0 0 14px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  margin-bottom: 28px;
  font-size: clamp(3.2rem, 9vw, 8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero p:not(.kicker) {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1.12rem, 2vw, 1.5rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  color: var(--teal-dark);
  text-decoration: none;
  font-weight: 760;
}

.button.primary {
  background: var(--teal-dark);
  color: white;
}

.topology {
  position: relative;
  min-height: 430px;
  border: 1px solid rgba(40, 104, 100, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(40, 104, 100, 0.18) 1px, transparent 1px),
    linear-gradient(0deg, rgba(98, 75, 107, 0.12) 1px, transparent 1px),
    rgba(255, 255, 255, 0.58);
  background-size: 42px 42px;
  box-shadow: var(--shadow);
}

.topology::before,
.topology::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 2px solid rgba(185, 125, 43, 0.34);
  transform: rotate(-16deg);
}

.topology::after {
  inset: 28% 12%;
  border-color: rgba(40, 104, 100, 0.35);
  transform: rotate(18deg);
}

.node {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(190px, 42%);
  min-height: 74px;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(23, 32, 30, 0.12);
  font-weight: 780;
  text-align: center;
}

.node-main {
  left: 10%;
  top: 16%;
}

.node-secondary {
  right: 10%;
  top: 30%;
  background: var(--soft-teal);
}

.node-tertiary {
  left: 18%;
  bottom: 18%;
  background: var(--soft-amber);
}

.node-fourth {
  right: 12%;
  bottom: 12%;
  background: var(--soft-plum);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.stats div {
  padding: clamp(24px, 5vw, 44px);
  border-right: 1px solid var(--line);
}

.stats div:last-child {
  border-right: 0;
}

.stats strong {
  display: block;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
}

.stats span {
  color: var(--muted);
}

.section-band {
  padding: clamp(56px, 8vw, 104px) clamp(20px, 6vw, 96px);
}

.section-band.compact {
  padding-top: clamp(36px, 6vw, 72px);
}

.section-heading {
  max-width: 820px;
  margin-bottom: clamp(28px, 5vw, 52px);
}

.section-heading h2,
.page-hero h1 {
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.section-heading p:last-child,
.page-hero p:last-child {
  color: var(--muted);
  font-size: 1.08rem;
}

.page-hero {
  padding: clamp(54px, 8vw, 100px) clamp(20px, 6vw, 96px);
  background: linear-gradient(135deg, var(--soft-teal), var(--soft-amber));
  border-bottom: 1px solid var(--line);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  min-height: 250px;
  background: var(--surface);
}

.card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
  text-decoration: none;
}

.card h3 {
  margin: 18px 0 10px;
  font-size: 1.25rem;
  line-height: 1.2;
}

.card p {
  color: var(--muted);
}

.card .meta {
  margin-top: auto;
  padding-top: 28px;
  color: var(--muted);
  font-size: 0.88rem;
}

.status {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--soft-amber);
  color: #674109;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-hydrated {
  background: var(--soft-teal);
  color: var(--teal-dark);
}

.status-draft {
  background: var(--soft-plum);
  color: var(--plum);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
}

.list-panel {
  border-top: 1px solid var(--line);
}

.season-row,
.cluster-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.season-row h3,
.cluster-row h3 {
  margin-bottom: 4px;
}

.season-row p,
.cluster-row p {
  grid-column: 1 / -1;
  color: var(--muted);
}

.article-shell {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 90px) 0;
}

.breadcrumbs {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 0.92rem;
}

.article-header h1 {
  margin: 18px 0 24px;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.article-header p {
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.34rem);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.9rem;
}

.article-meta span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.article-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 38px 0;
}

.article-pagination a {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
  font-weight: 760;
}

.article-pagination a span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.article-pagination a:last-child {
  text-align: right;
}

.article-content {
  padding-top: 10px;
  font-size: 1.06rem;
}

.diagram-figure {
  margin: 0 0 34px;
  padding: clamp(14px, 2vw, 22px);
  border: 1px solid var(--line);
  background: #ffffff;
}

.diagram-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.diagram-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.article-content h1,
.article-content h2,
.article-content h3 {
  margin-top: 2.1em;
  line-height: 1.12;
  letter-spacing: 0;
}

.article-content h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.article-content blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--amber);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.article-content a {
  color: var(--teal-dark);
  font-weight: 720;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 56px;
  background: var(--line);
  border: 1px solid var(--line);
}

.related-grid section {
  padding: 22px;
  background: var(--surface);
}

.related-grid h2 {
  margin-bottom: 16px;
  font-size: 1rem;
}

.related-grid ul {
  margin: 0;
  padding-left: 20px;
}

.site-footer {
  padding: 28px clamp(20px, 6vw, 96px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .split,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .topology {
    min-height: 320px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .stats div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .article-pagination {
    grid-template-columns: 1fr;
  }

  .article-pagination a:last-child {
    text-align: left;
  }
}
