/* Modern Naturalist Studio v3 — Self-Hosted OFL Editorial Design System (ccmgs.org) */
@font-face {
  font-family: 'Diablo Display';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/diablo-display.woff2') format('woff2');
}
@font-face {
  font-family: 'Diablo Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/diablo-sans.woff2') format('woff2');
}
@font-face {
  font-family: 'Diablo Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/diablo-mono.woff2') format('woff2');
}

:root {
  --ccs-bg: #F6F5F1;
  --ccs-surface: #FFFFFF;
  --ccs-elevated: #ECE9E0;
  --ccs-tint-teal: #EBF2F3;
  --ccs-glass: rgba(246, 245, 241, 0.88);
  --ccs-ink: #141E22;
  --ccs-ink-sec: #334349;
  --ccs-muted: #506066;
  --ccs-primary: #0D4A59;
  --ccs-primary-hover: #083440;
  --ccs-accent: #9A4212;
  --ccs-border: rgba(20, 30, 34, 0.10);
  --ccs-border-strong: rgba(20, 30, 34, 0.20);
  --ccs-colophon-bg: #102126;
  --ccs-colophon-surface: rgba(255, 255, 255, 0.045);
  --ccs-colophon-ink: #EDF2F3;
  --ccs-colophon-muted: #A9BAC0;
  --ccs-font-display: 'Diablo Display', Georgia, Cambria, serif;
  --ccs-font-sans: 'Diablo Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --ccs-font-mono: 'Diablo Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --ccs-shadow-sm: 0 1px 2px rgba(20, 30, 34, 0.04), 0 6px 18px -8px rgba(13, 74, 89, 0.08);
  --ccs-shadow-md: 0 2px 6px rgba(20, 30, 34, 0.05), 0 18px 38px -14px rgba(13, 74, 89, 0.13);
  --ccs-shadow-plate: 0 2px 8px rgba(20, 30, 34, 0.06), 0 22px 48px -18px rgba(20, 30, 34, 0.16);
  --ccs-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ccs-max-w: 79rem;
}

@view-transition { navigation: auto; }

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background-color: var(--ccs-bg);
  color: var(--ccs-ink);
  font-family: var(--ccs-font-sans);
  font-size: 1.02rem;
  line-height: 1.72;
}

main, article, section, aside, div, nav, ul, figure, a { min-width: 0; }
p, li, td, th, a, dd, blockquote, code { overflow-wrap: break-word; }
p, li, figcaption { text-wrap: pretty; }
h1, h2, h3, h4 {
  font-family: var(--ccs-font-display);
  color: var(--ccs-ink);
  font-variation-settings: "SOFT" 30, "WONK" 0;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.05rem, 1.5rem + 2.15vw, 3.15rem); font-weight: 600; line-height: 1.11; letter-spacing: -0.022em; }
h2 { font-size: clamp(1.38rem, 1.18rem + 0.8vw, 1.82rem); font-weight: 600; line-height: 1.22; letter-spacing: -0.016em; }
h3 { font-size: clamp(1.08rem, 1rem + 0.3vw, 1.26rem); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }

:target, h2[id], section[id] { scroll-margin-top: 5.4rem; }

:focus-visible {
  outline: 2px solid var(--ccs-primary);
  outline-offset: 2px;
}

a {
  color: var(--ccs-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 180ms ease, border-color 180ms ease;
}
a:hover { color: var(--ccs-primary-hover); }

img, svg, iframe, video { max-width: 100%; height: auto; display: block; }

pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 0.95rem 1.15rem;
  background: var(--ccs-elevated);
  border: 1px solid var(--ccs-border);
  border-radius: 8px;
  font-family: var(--ccs-font-mono);
  font-size: 0.85rem;
  line-height: 1.55;
}
code { font-family: var(--ccs-font-mono); font-size: 0.88em; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.6rem;
  background: var(--ccs-primary);
  color: #FFFFFF;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  z-index: 300;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.skip-link:focus { left: 1rem; }

/* 1. Sticky Glass Masthead (< 76px desktop, < 78px mobile) */
.journal-head {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--ccs-glass);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--ccs-border);
}

.masthead-inner {
  max-width: var(--ccs-max-w);
  margin-inline: auto;
  padding: 0.68rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  text-decoration: none;
  color: var(--ccs-ink);
  flex-shrink: 0;
}
.brand-emblem {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(13, 74, 89, 0.10);
  border: 1px solid rgba(13, 74, 89, 0.28);
  display: inline-grid;
  place-items: center;
  color: var(--ccs-primary);
  flex-shrink: 0;
  transition: transform 280ms var(--ccs-ease);
}
.brand-emblem-core {
  width: 13px;
  height: 13px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
  transform: rotate(45deg);
  position: relative;
}
.brand-emblem-core::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: currentColor;
  opacity: 0.32;
}
.footer-brand-row .brand-emblem {
  background: rgba(124, 196, 211, 0.12);
  border-color: rgba(124, 196, 211, 0.34);
  color: #7CC4D3;
}
.pdf-doc-glyph {
  font-family: var(--ccs-font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand-link:hover .brand-emblem { transform: rotate(-5deg) scale(1.03); }
.brand-text { display: flex; flex-direction: column; gap: 0.08rem; }
.brand-name {
  font-family: var(--ccs-font-display);
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--ccs-ink);
}
.brand-sub {
  font-family: var(--ccs-font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ccs-muted);
}

.index-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.72rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ccs-ink-sec);
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease, background-color 180ms ease;
}
.nav-links a:hover {
  color: var(--ccs-primary);
  background: rgba(13, 74, 89, 0.06);
}
.nav-links a[aria-current="page"] {
  color: var(--ccs-primary);
  background: rgba(13, 74, 89, 0.08);
}
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.72rem;
  right: 0.72rem;
  bottom: 0.14rem;
  height: 2px;
  border-radius: 2px;
  background: var(--ccs-primary);
}
.nav-pdf-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--ccs-elevated);
  border: 1px solid var(--ccs-border-strong);
  font-family: var(--ccs-font-mono);
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--ccs-ink);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 180ms ease, background-color 180ms ease;
}
.nav-pdf-pill:hover {
  background: var(--ccs-surface);
  border-color: var(--ccs-primary);
  color: var(--ccs-primary);
}

@media (max-width: 1080px) {
  .brand-sub, .nav-pdf-pill { display: none; }
  .masthead-inner { gap: 0.75rem; padding-inline: 1.2rem; }
  .brand-name { font-size: 1.03rem; }
  .nav-links { gap: 0.15rem; }
  .nav-links a { padding: 0.36rem 0.56rem; font-size: 0.86rem; }
  .nav-links a[aria-current="page"]::after { left: 0.56rem; right: 0.56rem; }
}

@media (max-width: 780px) {
  .masthead-inner {
    padding: 0.42rem 1rem 0.46rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.24rem;
  }
  .brand-emblem { width: 22px; height: 22px; }
  .brand-link { gap: 0.48rem; max-width: 100%; }
  .brand-name { font-size: 0.98rem; }
  .index-nav { width: 100%; max-width: 100%; }
  .nav-links {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    gap: 0.12rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a {
    padding: 0.24rem 0.5rem;
    font-size: 0.82rem;
  }
  .nav-links a[aria-current="page"]::after {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.05rem;
  }
}

@media (max-width: 385px) {
  .masthead-inner { padding-inline: 0.75rem; }
  .nav-links { gap: 0.04rem; }
  .nav-links a { padding: 0.24rem 0.36rem; font-size: 0.76rem; }
  .nav-links a[aria-current="page"]::after { left: 0.36rem; right: 0.36rem; }
}

/* 2. Page Container & Typography Primitives */
.content-wrap {
  max-width: var(--ccs-max-w);
  margin-inline: auto;
  padding: clamp(1.5rem, 3vw, 2.75rem) 1.5rem clamp(3rem, 5vw, 4.5rem);
}
@media (max-width: 760px) {
  .content-wrap { padding: 1.15rem 1rem 2.75rem; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  font-family: var(--ccs-font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.085em;
  color: var(--ccs-accent);
  margin: 0 0 0.75rem;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ccs-accent);
  flex-shrink: 0;
}

.byline-meta {
  font-family: var(--ccs-font-mono);
  font-size: 0.77rem;
  color: var(--ccs-muted);
  font-variant-numeric: tabular-nums;
}

p.lead {
  font-size: clamp(1.06rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.65;
  color: var(--ccs-ink-sec);
  margin: 0 0 1.4rem;
  max-width: 62ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  padding: 0.7rem 1.28rem;
  border-radius: 8px;
  font-family: var(--ccs-font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 180ms var(--ccs-ease), background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.btn-primary {
  background: var(--ccs-primary);
  color: #FFFFFF;
  border: 1px solid var(--ccs-primary);
  box-shadow: 0 2px 8px -2px rgba(13, 74, 89, 0.32);
}
.btn-primary:hover {
  background: var(--ccs-primary-hover);
  border-color: var(--ccs-primary-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--ccs-surface);
  color: var(--ccs-ink);
  border: 1px solid var(--ccs-border-strong);
}
.btn-ghost:hover {
  border-color: var(--ccs-primary);
  color: var(--ccs-primary);
  background: var(--ccs-tint-teal);
}
.icon-inline {
  display: inline-block;
  flex-shrink: 0;
  transition: transform 200ms var(--ccs-ease);
}
.btn-primary:hover .icon-inline,
.feature-link:hover .icon-inline,
.dir-row:hover .icon-inline,
.pdf-card:hover .icon-inline {
  transform: translateX(3px);
}

/* 3. Asymmetric 7+5 Gallery Hero (100% Above the Fold, Zero Chopping) */
.hero-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.95fr);
  gap: clamp(1.75rem, 3.8vw, 3.5rem);
  align-items: center;
  padding-bottom: clamp(2rem, 3.8vw, 3rem);
  margin-bottom: clamp(2.2rem, 4vw, 3.25rem);
  border-bottom: 1px solid var(--ccs-border);
}
.hero-copy h1 { margin-bottom: 0.95rem; }

.hero-stats-dock {
  margin-top: 1.65rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--ccs-border);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.hero-stat-val {
  font-family: var(--ccs-font-display);
  font-size: 1.22rem;
  font-weight: 650;
  color: var(--ccs-ink);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.hero-stat-lbl {
  font-family: var(--ccs-font-mono);
  font-size: 0.69rem;
  color: var(--ccs-muted);
  margin-top: 0.22rem;
  line-height: 1.35;
}

.hero-plate {
  margin: 0;
  background: var(--ccs-surface);
  border: 1px solid var(--ccs-border);
  border-radius: 14px;
  padding: 0.65rem 0.65rem 0.85rem;
  box-shadow: var(--ccs-shadow-plate);
}
.hero-plate-img-wrap {
  border-radius: 9px;
  overflow: clip;
  aspect-ratio: 4 / 3;
  max-height: 410px;
  background: var(--ccs-elevated);
}
.hero-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.hero-plate figcaption {
  margin-top: 0.68rem;
  padding-inline: 0.35rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: var(--ccs-font-mono);
  font-size: 0.73rem;
  color: var(--ccs-muted);
}
.plate-tag {
  color: var(--ccs-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

@media (max-width: 920px) {
  .hero-showcase {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    padding-bottom: 1.75rem;
    margin-bottom: 2rem;
  }
  .hero-copy h1 { font-size: clamp(1.78rem, 6.2vw, 2.3rem); margin-bottom: 0.65rem; }
  p.lead { font-size: 0.98rem; margin-bottom: 1rem; }
  .cta-row { margin-top: 0.85rem; }
  .btn-primary, .btn-ghost { padding: 0.6rem 1.05rem; font-size: 0.88rem; }
  .hero-stats-dock {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1.2rem;
    padding-top: 0.95rem;
    gap: 0.75rem;
  }
  .hero-plate-img-wrap { aspect-ratio: 16 / 10; max-height: 220px; }
}

/* 4. Homepage Editorial Sections */
.section-band { margin-bottom: clamp(2.8rem, 5vw, 4.2rem); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--ccs-border);
}
.section-head .eyebrow { margin-bottom: 0.35rem; }
.section-desc {
  margin: 0;
  font-size: 0.93rem;
  color: var(--ccs-muted);
  max-width: 52ch;
  line-height: 1.55;
}

/* Lead Horizontal Spotlight Card */
.spotlight-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  background: var(--ccs-surface);
  border: 1px solid var(--ccs-border);
  border-radius: 14px;
  overflow: clip;
  box-shadow: var(--ccs-shadow-sm);
  margin-bottom: 1.5rem;
  transition: box-shadow 240ms var(--ccs-ease), border-color 240ms ease;
}
.spotlight-card:hover {
  box-shadow: var(--ccs-shadow-md);
  border-color: var(--ccs-border-strong);
}
.spotlight-media {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 260px;
  height: 100%;
  overflow: clip;
  background: var(--ccs-elevated);
}
.spotlight-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms var(--ccs-ease);
}
.spotlight-card:hover .spotlight-media img { transform: scale(1.03); }
.spotlight-body {
  min-width: 0;
  padding: clamp(1.35rem, 2.8vw, 2.25rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.spotlight-body h3 {
  font-size: clamp(1.32rem, 1.12rem + 0.7vw, 1.72rem);
  margin: 0.55rem 0 0.75rem;
  line-height: 1.22;
}
.spotlight-body h3 a { color: var(--ccs-ink); text-decoration: none; }
.spotlight-body h3 a:hover { color: var(--ccs-primary); }
.spotlight-excerpt {
  margin: 0 0 1.2rem;
  color: var(--ccs-ink-sec);
  font-size: 0.96rem;
  line-height: 1.62;
}
.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--ccs-primary);
  text-decoration: none;
}

@media (max-width: 860px) {
  .spotlight-card { grid-template-columns: 1fr; }
  .spotlight-media { aspect-ratio: 16 / 10; height: auto; min-height: 0; }
}

/* 3-Column Subgrid-Aligned Card Matrix */
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}
.visual-card {
  background: var(--ccs-surface);
  border: 1px solid var(--ccs-border);
  border-radius: 12px;
  overflow: clip;
  box-shadow: var(--ccs-shadow-sm);
  display: grid;
  grid-template-rows: auto 1fr;
  grid-row: span 2;
  grid-template-rows: subgrid;
  transition: transform 220ms var(--ccs-ease), box-shadow 220ms var(--ccs-ease), border-color 220ms ease;
}
.visual-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ccs-shadow-md);
  border-color: var(--ccs-border-strong);
}
.card-thumb-wrap {
  aspect-ratio: 16 / 10;
  overflow: clip;
  background: var(--ccs-elevated);
}
.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 480ms var(--ccs-ease);
}
.visual-card:hover .card-thumb { transform: scale(1.035); }
.card-body {
  padding: 1.2rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--ccs-font-mono);
  font-size: 0.69rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.56rem;
  border-radius: 6px;
  background: var(--ccs-tint-teal);
  color: var(--ccs-primary);
}
.tag-pill.tag-warm {
  background: #F9EFE8;
  color: var(--ccs-accent);
}
.card-body h3 { margin-bottom: 0.5rem; }
.card-body h3 a { color: var(--ccs-ink); text-decoration: none; }
.card-body h3 a:hover { color: var(--ccs-primary); }
.card-excerpt {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ccs-ink-sec);
  line-height: 1.56;
}

@media (max-width: 900px) {
  .card-grid-3 { grid-template-columns: 1fr; }
  .visual-card { grid-row: auto; display: flex; flex-direction: column; }
}

/* Printable PDF Reference Tray */
.pdf-tray {
  background: var(--ccs-elevated);
  border: 1px solid var(--ccs-border);
  border-radius: 16px;
  padding: clamp(1.35rem, 2.8vw, 2rem);
}
.pdf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.15rem;
}
.pdf-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  background: var(--ccs-surface);
  border: 1px solid var(--ccs-border);
  border-radius: 11px;
  padding: 1.15rem 1.2rem;
  text-decoration: none;
  color: var(--ccs-ink);
  box-shadow: var(--ccs-shadow-sm);
  transition: border-color 180ms ease, transform 180ms var(--ccs-ease), box-shadow 180ms ease;
}
.pdf-card:hover {
  border-color: var(--ccs-primary);
  transform: translateY(-2px);
  box-shadow: var(--ccs-shadow-md);
}
.pdf-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.pdf-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--ccs-tint-teal);
  color: var(--ccs-primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.pdf-card h3 {
  font-family: var(--ccs-font-sans);
  font-size: 0.98rem;
  font-weight: 650;
  margin: 0.2rem 0 0.35rem;
  color: var(--ccs-ink);
}
.pdf-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ccs-muted);
  line-height: 1.5;
}
.pdf-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--ccs-font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ccs-primary);
  padding-top: 0.65rem;
  border-top: 1px dashed var(--ccs-border);
}

@media (max-width: 880px) {
  .pdf-grid { grid-template-columns: 1fr; }
}

/* Clean 2-Column Editorial Directory Rows */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 2.25rem;
}
.dir-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.15rem;
  background: var(--ccs-surface);
  border: 1px solid var(--ccs-border);
  border-radius: 11px;
  text-decoration: none;
  color: var(--ccs-ink);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms var(--ccs-ease);
}
.dir-row:hover {
  border-color: var(--ccs-primary);
  box-shadow: var(--ccs-shadow-sm);
  transform: translateY(-1px);
}
.dir-row h3 {
  font-size: 1.04rem;
  margin: 0.28rem 0 0.32rem;
  color: var(--ccs-ink);
}
.dir-row:hover h3 { color: var(--ccs-primary); }
.dir-row p {
  margin: 0;
  font-size: 0.87rem;
  color: var(--ccs-muted);
  line-height: 1.52;
}
.dir-arrow {
  margin-top: 0.2rem;
  color: var(--ccs-primary);
  flex-shrink: 0;
}

@media (max-width: 820px) {
  .directory-grid { grid-template-columns: 1fr; }
}

/* 5. Publication-Grade Data Visualization Card */
.hydro-viz-card {
  margin: 0;
  background: var(--ccs-surface);
  border: 1px solid var(--ccs-border);
  border-radius: 14px;
  padding: clamp(1.1rem, 2.4vw, 1.65rem);
  box-shadow: var(--ccs-shadow-sm);
}
.hydro-viz-card svg {
  width: 100%;
  height: auto;
  margin: 0;
}
.hydro-viz-card figcaption {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ccs-border);
  font-family: var(--ccs-font-mono);
  font-size: 0.76rem;
  color: var(--ccs-muted);
  line-height: 1.5;
}
svg .viz-bar, svg .viz-band {
  transition: opacity 200ms ease, filter 200ms ease;
}
svg .viz-bar:hover, svg .viz-band:hover {
  opacity: 1;
  filter: brightness(1.08);
}

/* 6. Borderless Fluid Article Reading Stage + Sticky H2 TOC (Zero Dead Gutter!) */
.article-stage {
  display: grid;
  grid-template-columns: minmax(0, 46rem) minmax(240px, 272px);
  justify-content: space-between;
  gap: clamp(2rem, 4.5vw, 4rem);
  align-items: start;
}
.monograph-card {
  background: transparent;
  border: 0;
  padding: 0;
}
.article-header {
  padding-bottom: 1.35rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--ccs-border);
}
.article-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--ccs-font-mono);
  font-size: 0.73rem;
  color: var(--ccs-muted);
  margin-bottom: 0.8rem;
}
.article-crumbs a { color: var(--ccs-muted); text-decoration: none; }
.article-crumbs a:hover { color: var(--ccs-primary); }
.article-header h1 { margin-bottom: 0.8rem; }
.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.2rem;
}

.narrative-flow {
  font-size: 1.04rem;
  line-height: 1.76;
  color: var(--ccs-ink);
}
.narrative-flow p { margin: 0 0 1.25rem; color: var(--ccs-ink-sec); }
.narrative-flow p.lead {
  font-size: clamp(1.08rem, 1.02rem + 0.28vw, 1.22rem);
  color: var(--ccs-ink);
  font-weight: 450;
  max-width: none;
  margin-bottom: 1.65rem;
}
.narrative-flow h2 {
  margin: 2.5rem 0 0.85rem;
  padding-top: 0.35rem;
}
.narrative-flow a {
  color: var(--ccs-primary);
  font-weight: 550;
  text-decoration: underline;
  text-decoration-color: rgba(13, 74, 89, 0.35);
  text-underline-offset: 3px;
}
.narrative-flow a:hover {
  text-decoration-color: var(--ccs-primary);
}

figure {
  margin: 1.85rem 0;
  background: var(--ccs-surface);
  border: 1px solid var(--ccs-border);
  border-radius: 12px;
  padding: 0.6rem 0.6rem 0.8rem;
  box-shadow: var(--ccs-shadow-sm);
}
figure img {
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
figure.article-lead-figure {
  margin: 0 0 2rem;
}
figure figcaption {
  margin-top: 0.65rem;
  padding-inline: 0.35rem;
  font-family: var(--ccs-font-mono);
  font-size: 0.76rem;
  color: var(--ccs-muted);
  line-height: 1.5;
}

/* Responsive Data Table Wrapper (`modern-web-guidance: responsive-table`) */
.table-wrapper {
  margin: 1.9rem 0;
  max-inline-size: 100%;
  overflow-x: auto;
  background: var(--ccs-surface);
  border: 1px solid var(--ccs-border);
  border-radius: 12px;
  box-shadow: var(--ccs-shadow-sm);
  container-type: inline-size;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.52;
}
th, td {
  padding: 0.72rem 0.85rem;
  border-bottom: 1px solid var(--ccs-border);
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--ccs-elevated);
  font-family: var(--ccs-font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ccs-ink);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(13, 74, 89, 0.03); }

/* Right Sticky Sidebar (TOC + Quick Ledger + Related) */
.field-sidebar {
  position: sticky;
  top: 5.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.rail-card {
  background: var(--ccs-surface);
  border: 1px solid var(--ccs-border);
  border-radius: 12px;
  padding: 1.15rem 1.2rem;
  box-shadow: var(--ccs-shadow-sm);
}
.rail-card-tinted {
  background: var(--ccs-elevated);
}
.aside-title {
  font-family: var(--ccs-font-mono);
  font-size: 0.7rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.085em;
  color: var(--ccs-accent);
  margin: 0 0 0.65rem;
}
.toc-list, .aside-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.38rem;
}
.toc-list a {
  display: block;
  font-size: 0.84rem;
  line-height: 1.42;
  color: var(--ccs-ink-sec);
  text-decoration: none;
  padding: 0.26rem 0 0.26rem 0.7rem;
  border-left: 2px solid var(--ccs-border);
  transition: border-color 160ms ease, color 160ms ease;
}
.toc-list a:hover {
  color: var(--ccs-primary);
  border-left-color: var(--ccs-primary);
}
.aside-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 550;
  line-height: 1.42;
  color: var(--ccs-ink);
  text-decoration: none;
  padding: 0.36rem 0;
  border-bottom: 1px dashed var(--ccs-border);
}
.aside-list li:last-child a { border-bottom: 0; padding-bottom: 0; }
.aside-list a:hover { color: var(--ccs-primary); }
.mini-dl {
  margin: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.82rem;
}
.mini-dl div {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding-bottom: 0.38rem;
  border-bottom: 1px dashed var(--ccs-border);
}
.mini-dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-dl dt { color: var(--ccs-muted); }
.mini-dl dd {
  margin: 0;
  font-family: var(--ccs-font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ccs-ink);
  text-align: right;
}

@media (max-width: 960px) {
  .article-stage { grid-template-columns: 1fr; }
  .field-sidebar { position: static; }
}

/* 7. Architectural 4-Column Dark Slate Colophon Footer */
.imprint-footer {
  background: var(--ccs-colophon-bg);
  color: var(--ccs-colophon-ink);
  margin-top: clamp(3.5rem, 6vw, 5rem);
  padding: clamp(2.8rem, 5vw, 4rem) 1.5rem 2rem;
  border-top: 3px solid var(--ccs-primary);
}
.footer-grid {
  max-width: var(--ccs-max-w);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(0, 1fr));
  gap: 2.25rem;
}
.footer-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  color: #FFFFFF;
  text-decoration: none;
  margin-bottom: 0.75rem;
}
.footer-brand-row .brand-emblem { color: #67B7C7; }
.footer-brand-row strong {
  font-family: var(--ccs-font-display);
  font-size: 1.14rem;
  font-weight: 650;
  color: #FFFFFF;
}
.footer-mission {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ccs-colophon-muted);
  max-width: 38ch;
}
.footer-badge {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  background: var(--ccs-colophon-surface);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font-family: var(--ccs-font-mono);
  font-size: 0.72rem;
  color: #CBE4E9;
}
.footer-col-title {
  font-family: var(--ccs-font-mono);
  font-size: 0.71rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #7CC4D3;
  margin: 0 0 0.85rem;
}
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.footer-list a {
  font-size: 0.88rem;
  color: var(--ccs-colophon-muted);
  text-decoration: none;
  transition: color 160ms ease;
}
.footer-list a:hover {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-bottom {
  max-width: var(--ccs-max-w);
  margin: 2.4rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-family: var(--ccs-font-mono);
  font-size: 0.74rem;
  color: var(--ccs-colophon-muted);
}
.footer-bottom a { color: #CBE4E9; text-decoration: none; }
.footer-bottom a:hover { color: #FFFFFF; text-decoration: underline; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
