:root {
  --ink: #172126;
  --navy: #15384a;
  --navy-dark: #0e2b39;
  --signal: #e6a117;
  --signal-soft: #fff1c8;
  --paper: #f5f3ed;
  --paper-deep: #e9e6dd;
  --white: #fff;
  --muted: #627078;
  --line: #d7d8d3;
  --success: #26715b;
  --success-soft: #e1f2eb;
  --warning: #9a5b05;
  --warning-soft: #fff0d5;
  --shadow: 0 18px 60px rgba(23, 33, 38, .08);
  --radius: 8px;
  --shell: min(1180px, calc(100% - 40px));
  --article: min(820px, calc(100% - 40px));
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  margin: 0;
  text-rendering: optimizeLegibility;
}

body.admin-bar .site-header {
  top: 32px;
}

img {
  height: auto;
  max-width: 100%;
}

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: .16em;
}

a:hover {
  color: #235d77;
}

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

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.14;
  margin-top: 0;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  overflow-wrap: anywhere;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 3.1rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

p {
  margin: 0 0 1.1em;
}

.site-shell {
  margin-inline: auto;
  width: var(--shell);
}

.site-shell--article {
  width: var(--article);
}

.skip-link {
  background: var(--white);
  color: var(--ink);
  left: 16px;
  padding: 12px 18px;
  position: fixed;
  top: -100px;
  z-index: 9999;
}

.skip-link:focus {
  top: 16px;
}

.eyebrow,
.content-type-label {
  color: var(--navy);
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .11em;
  margin: 0 0 .8rem;
  text-transform: uppercase;
}

.site-header {
  background: rgba(245, 243, 237, .96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__bar {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: auto 1fr auto;
  min-height: 78px;
}

.site-brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
}

.site-brand:hover {
  color: var(--ink);
}

.site-brand--custom .custom-logo-link {
  align-items: center;
  display: inline-flex;
}

.site-brand--custom .custom-logo {
  height: auto;
  max-height: 52px;
  width: auto;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background: var(--paper);
  clip: auto !important;
  clip-path: none;
  color: var(--ink);
  display: block;
  font-size: .875rem;
  font-weight: 700;
  height: auto;
  left: 8px;
  padding: 12px 16px;
  top: 8px;
  width: auto;
  z-index: 1000;
}

.site-brand__mark {
  background: var(--navy);
  border-radius: 50%;
  display: grid;
  height: 42px;
  overflow: hidden;
  place-content: center;
  position: relative;
  width: 42px;
}

.site-brand__mark::before,
.site-brand__mark::after {
  background: var(--white);
  content: "";
  height: 5px;
  position: absolute;
  top: 18px;
  width: 11px;
}

.site-brand__mark::before { left: 6px; }
.site-brand__mark::after { right: 6px; }

.site-brand__mark i {
  background: var(--signal);
  display: block;
  height: 5px;
  width: 5px;
}

.site-brand__mark i + i { margin-top: 5px; }

.site-brand__text {
  display: flex;
  line-height: 1;
  flex-direction: column;
}

.site-brand__text strong {
  font-size: 1.18rem;
  letter-spacing: .035em;
}

.site-brand__text small {
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .04em;
  margin-top: 5px;
}

.primary-navigation {
  justify-self: center;
}

.primary-navigation ul,
.site-footer__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-navigation > ul {
  align-items: center;
  display: flex;
  gap: clamp(14px, 2vw, 28px);
}

.primary-navigation a {
  color: var(--ink);
  display: block;
  font-size: .88rem;
  font-weight: 650;
  padding: 27px 0 24px;
  text-decoration: none;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a {
  color: var(--navy);
  box-shadow: inset 0 -3px 0 var(--signal);
}

.primary-navigation .sub-menu {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-width: 240px;
  opacity: 0;
  padding: 10px 16px;
  position: absolute;
  transform: translateY(8px);
  visibility: hidden;
}

.primary-navigation .menu-item-has-children {
  position: relative;
}

.primary-navigation .menu-item-has-children:hover > .sub-menu,
.primary-navigation .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  transform: none;
  visibility: visible;
}

.primary-navigation .sub-menu a {
  padding: 10px 0;
}

.menu-toggle,
.search-toggle {
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.menu-toggle {
  align-items: center;
  display: none;
  gap: 8px;
}

.menu-toggle__icon,
.menu-toggle__icon::before,
.menu-toggle__icon::after {
  background: currentColor;
  content: "";
  display: block;
  height: 2px;
  width: 20px;
}

.menu-toggle__icon { position: relative; }
.menu-toggle__icon::before { position: absolute; top: -6px; }
.menu-toggle__icon::after { position: absolute; top: 6px; }

.search-toggle {
  border-left: 1px solid var(--line);
  padding: 8px 0 8px 20px;
}

.header-search {
  background: var(--navy);
  padding: 24px 0;
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-form label {
  flex: 1;
}

.search-field {
  background: var(--white);
  border: 1px solid transparent;
  border-radius: 3px;
  min-height: 48px;
  padding: 10px 14px;
  width: 100%;
}

.search-submit {
  background: var(--signal);
  border: 0;
  border-radius: 3px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
  padding: 10px 22px;
}

.button-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2rem;
}

.button {
  align-items: center;
  border: 1px solid var(--navy);
  border-radius: 3px;
  display: inline-flex;
  font-size: .92rem;
  font-weight: 750;
  justify-content: center;
  min-height: 48px;
  padding: 11px 20px;
  text-decoration: none;
}

.button--primary {
  background: var(--navy);
  color: var(--white);
}

.button--primary:hover {
  background: var(--navy-dark);
  color: var(--white);
}

.button--ghost {
  background: transparent;
  color: var(--navy);
}

.button--light {
  border-color: var(--white);
  color: var(--white);
}

.button--light:hover {
  background: var(--white);
  color: var(--navy);
}

.text-link {
  font-size: .9rem;
  font-weight: 750;
  text-decoration: none;
}

.home-hero {
  background:
    linear-gradient(90deg, rgba(244, 241, 235, .94) 0%, rgba(244, 241, 235, .86) 42%, rgba(244, 241, 235, .34) 70%, rgba(244, 241, 235, .12) 100%),
    url('../images/home-hero-viaduct-v1.webp') center center / cover no-repeat,
    #f4f1eb;
  padding: clamp(64px, 10vw, 130px) 0 clamp(70px, 10vw, 125px);
}

.home-hero__grid {
  align-items: center;
  display: grid;
  gap: clamp(50px, 8vw, 120px);
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
}

.home-hero__content,
.home-hero__diagram {
  min-width: 0;
}

.home-hero h1 {
  font-size: clamp(3rem, 4.4vw, 4rem);
  letter-spacing: -.035em;
  line-height: 1.08;
  max-width: 820px;
  margin-bottom: 1.5rem;
  overflow-wrap: normal;
  text-wrap: balance;
  word-break: normal;
}

.home-hero__lead {
  color: #3f4d54;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.55;
  max-width: 680px;
}

.home-hero__diagram {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 42px);
}

.diagram-node {
  align-items: center;
  display: grid;
  gap: 4px 14px;
  grid-template-columns: 44px 1fr;
}

.diagram-node span {
  align-items: center;
  background: var(--paper);
  border-radius: 50%;
  display: flex;
  font-size: .75rem;
  font-weight: 800;
  grid-row: 1 / 3;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.diagram-node--accent span {
  background: var(--signal);
}

.diagram-node strong { font-size: 1rem; }
.diagram-node small { color: var(--muted); }

.diagram-line {
  border-left: 1px dashed #aab1b3;
  height: 32px;
  margin-left: 21px;
}

.trust-strip {
  background: var(--navy);
  color: var(--white);
}

.trust-strip__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.trust-strip__grid > div {
  display: flex;
  flex-direction: column;
  min-height: 104px;
  justify-content: center;
  padding: 22px 36px;
}

.trust-strip__grid > div + div {
  border-left: 1px solid rgba(255, 255, 255, .2);
}

.trust-strip strong { font-family: var(--serif); font-size: 1.15rem; }
.trust-strip span { color: #c8d3d8; font-size: .84rem; margin-top: 4px; }

.home-section,
.listing-body,
.topic-children {
  padding-block: clamp(64px, 9vw, 110px);
}

.home-section--tinted {
  background: var(--paper-deep);
}

.section-heading {
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-heading--split {
  align-items: end;
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr minmax(240px, 420px);
}

.section-heading--split > p {
  color: var(--muted);
  margin: 0;
}

.portal-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, 1fr);
  background: var(--line);
  border: 1px solid var(--line);
}

.portal-card {
  background: var(--white);
  color: var(--ink);
  min-height: 275px;
  padding: clamp(24px, 3vw, 38px);
  position: relative;
  text-decoration: none;
  transition: background .2s, transform .2s;
}

.portal-card:hover {
  background: #fffaf0;
  color: var(--ink);
  transform: translateY(-2px);
  z-index: 1;
}

.portal-card--wide {
  grid-column: span 2;
}

.portal-card__number {
  color: var(--signal);
  display: block;
  font-size: .78rem;
  font-weight: 850;
  margin-bottom: 44px;
}

.portal-card h3 { font-size: 1.7rem; margin-bottom: 12px; }
.portal-card p { color: var(--muted); max-width: 510px; }
.portal-card .text-link { bottom: 28px; position: absolute; }

.topic-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
}

.topic-tile {
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(21, 56, 74, .14);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 160px;
  padding: 24px;
  text-decoration: none;
}

.topic-tile:hover {
  background: var(--white);
  border-color: var(--signal);
  color: var(--ink);
}

.topic-tile > span { color: var(--signal); font-size: .75rem; font-weight: 800; }
.topic-tile strong { font-family: var(--serif); font-size: 1.2rem; margin: auto 0 8px; }
.topic-tile small { color: var(--muted); }
.topic-grid--children { grid-template-columns: repeat(3, 1fr); }

.card-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-card {
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: box-shadow .2s, transform .2s;
}

.content-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.content-card__image {
  aspect-ratio: 18 / 11;
  background: var(--paper-deep);
  display: block;
  overflow: hidden;
}

.content-card__image img {
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
  width: 100%;
}

.content-card:hover .content-card__image img { transform: scale(1.025); }

.content-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.content-card__meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 16px;
}

.content-card__meta span,
.content-card__meta a {
  color: var(--navy);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
}

.content-card__meta a { color: var(--muted); }
.content-card h3 { margin-bottom: 14px; }
.content-card h3 a { color: var(--ink); text-decoration: none; }
.content-card p { color: var(--muted); font-size: .92rem; }

.content-card__footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 17px;
}

.content-card__footer time { color: var(--muted); font-size: .74rem; }

.content-card--compact .content-card__body { padding: 20px; }
.content-card--compact h3 { font-size: 1.1rem; }

.status-badge {
  align-items: center;
  border-radius: 99px;
  display: inline-flex;
  font-size: .7rem;
  font-weight: 800;
  gap: 6px;
  padding: 5px 9px;
  white-space: nowrap;
}

.status-badge::before {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 6px;
  width: 6px;
}

.status-badge--verified { background: var(--success-soft); color: var(--success); }
.status-badge--warning { background: var(--warning-soft); color: var(--warning); }
.status-badge--neutral { background: #edf0f1; color: var(--muted); }

.empty-state {
  background: var(--white);
  border: 1px dashed #aeb6b8;
  padding: clamp(28px, 5vw, 54px);
  text-align: center;
}

.empty-state strong { font-family: var(--serif); font-size: 1.45rem; }
.empty-state p { color: var(--muted); margin: 10px auto 0; max-width: 600px; }

.home-method {
  background: var(--navy);
  color: var(--white);
  padding: clamp(70px, 10vw, 120px) 0;
}

.home-method h2,
.home-method .eyebrow { color: var(--white); }
.home-method .eyebrow { opacity: .7; }

.home-method__grid {
  display: grid;
  gap: 60px;
  grid-template-columns: minmax(260px, .8fr) minmax(400px, 1.2fr);
}

.home-method__grid > .button { align-self: start; justify-self: start; }

.method-steps {
  counter-reset: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

.method-steps li {
  border-top: 1px solid rgba(255, 255, 255, .2);
  display: grid;
  gap: 20px;
  grid-template-columns: 42px 1fr;
  padding: 24px 0;
}

.method-steps span { color: var(--signal); font-weight: 850; }
.method-steps strong { font-family: var(--serif); font-size: 1.25rem; }
.method-steps p { color: #c8d3d8; font-size: .92rem; margin: 6px 0 0; }

.breadcrumbs {
  margin-bottom: clamp(36px, 6vw, 70px);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li {
  color: var(--muted);
  font-size: .76rem;
}

.breadcrumbs li:not(:last-child)::after {
  color: #9ca5a8;
  content: "/";
  margin-left: 8px;
}

.breadcrumbs a { color: var(--muted); text-decoration: none; }

.listing-header,
.page-header,
.article-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: clamp(50px, 8vw, 100px) 0 clamp(58px, 8vw, 105px);
}

.listing-header h1,
.page-header h1 {
  font-size: clamp(2.6rem, 6vw, 4.7rem);
  margin-bottom: 24px;
  max-width: 920px;
}

.listing-intro {
  color: #3f4d54;
  font-size: 1.16rem;
  max-width: 800px;
}

.listing-reviewed {
  color: var(--muted);
  font-size: .8rem;
  margin-top: 24px;
}

.listing-search { max-width: 720px; margin-top: 30px; }
.listing-search .search-form { background: var(--paper); padding: 8px; }

.navigation.pagination { margin-top: 54px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.page-numbers { align-items: center; background: var(--white); border: 1px solid var(--line); display: inline-flex; min-height: 42px; padding: 7px 14px; text-decoration: none; }
.page-numbers.current { background: var(--navy); color: var(--white); }

.page-content {
  font-size: 1.08rem;
  padding-block: clamp(50px, 7vw, 85px);
}

.article-header__meta,
.article-header__facts {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.article-header__meta { margin-bottom: 18px; }
.article-header__meta .content-type-label { margin: 0; }
.topic-link { color: var(--muted); font-size: .8rem; font-weight: 700; text-decoration: none; }
.article-header h1 { font-size: clamp(2.7rem, 6vw, 5.1rem); margin-bottom: 25px; }

.article-deck {
  color: #38464d;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.3vw, 1.55rem);
  line-height: 1.5;
}

.article-deck > :last-child { margin-bottom: 0; }
.article-header__facts { border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; margin-top: 32px; padding-top: 22px; }

.article-hero {
  margin-bottom: -10px;
  margin-top: 42px;
}

.article-hero img {
  display: block;
  max-height: 720px;
  object-fit: cover;
  width: 100%;
}

.article-hero__caption {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.55;
  padding: 14px 2px 16px;
}

.article-layout {
  align-items: start;
  display: grid;
  gap: clamp(40px, 7vw, 90px);
  grid-template-columns: minmax(0, 760px) minmax(240px, 300px);
  padding-block: clamp(60px, 9vw, 110px);
}

.article-main { min-width: 0; }

.prose {
  font-size: 1.07rem;
  line-height: 1.75;
}

.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }
.prose h2 { font-size: 2rem; margin: 2em 0 .7em; }
.prose h3 { margin: 1.8em 0 .65em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .45em; }
.prose blockquote { border-left: 4px solid var(--signal); font-family: var(--serif); font-size: 1.2rem; margin: 2rem 0; padding: .4rem 0 .4rem 1.4rem; }
.prose a { overflow-wrap: anywhere; }

.prose .dtp-inline-figure {
  background: var(--white);
  border: 1px solid var(--line);
  margin: 2.4rem 0;
}

.prose .dtp-inline-figure img {
  display: block;
  height: auto;
  width: 100%;
}

.prose .dtp-inline-figure figcaption {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.55;
  margin: 0;
  padding: 13px 15px 15px;
}

.article-content {
  border-bottom: 1px solid var(--line);
  margin-bottom: 42px;
  padding-bottom: 42px;
}

.article-section {
  border-bottom: 1px solid var(--line);
  padding: 36px 0;
}

.article-section > h2 { font-size: clamp(1.65rem, 3vw, 2.25rem); margin-bottom: 22px; }
.article-section--accent { background: var(--signal-soft); border: 0; margin: 28px -28px; padding: 30px 28px; }
.article-section--limitations { border-left: 4px solid var(--signal); padding-left: 22px; }
.article-section--quote .prose { border-left: 4px solid var(--navy); font-family: var(--serif); padding-left: 22px; }

.fact-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 28px;
  background: var(--line);
  border: 1px solid var(--line);
}

.fact-grid > div {
  background: var(--white);
  min-width: 0;
  padding: 18px;
}

.fact-grid dt { color: var(--muted); font-size: .72rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.fact-grid dd { font-weight: 700; margin: 6px 0 0; overflow-wrap: anywhere; }

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-list li {
  border-top: 1px solid var(--line);
  padding: 13px 0 13px 28px;
  position: relative;
}

.check-list li::before { color: var(--signal); content: "—"; font-weight: 900; left: 2px; position: absolute; }

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.data-table {
  border-collapse: collapse;
  font-size: .88rem;
  min-width: 650px;
  width: 100%;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 12px;
  text-align: left;
  vertical-align: top;
}

.data-table th { background: var(--navy); color: var(--white); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.data-table tr:nth-child(even) td { background: rgba(255, 255, 255, .55); }

.rule-card {
  background: var(--navy);
  color: var(--white);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 30px;
}

.rule-card > div { border-right: 1px solid rgba(255, 255, 255, .2); display: flex; flex-direction: column; padding: 22px; }
.rule-card span { color: #c6d2d7; font-size: .72rem; text-transform: uppercase; }
.rule-card strong { font-family: var(--serif); font-size: 1.2rem; margin-top: 7px; }

.definition-card,
.calculator-notice,
.legal-note {
  background: var(--signal-soft);
  border-left: 4px solid var(--signal);
  margin-bottom: 32px;
  padding: 25px 28px;
}

.definition-card > span { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.definition-card p { font-family: var(--serif); font-size: 1.45rem; line-height: 1.45; margin: 10px 0 0; }
.calculator-notice p, .legal-note { font-size: .9rem; }
.calculator-notice p { margin: 7px 0 0; }

.article-rail {
  position: sticky;
  top: 110px;
}

.review-panel,
.rail-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 24px;
}

.review-panel h2 { font-size: 1.45rem; margin-bottom: 18px; }
.review-panel p { font-size: .83rem; }
.review-panel__status { margin-bottom: 20px; }
.review-note { background: var(--paper); padding: 12px; }
.rail-card { margin-top: 16px; }
.rail-card .eyebrow { display: block; margin-bottom: 8px; }
.rail-card a { font-family: var(--serif); font-size: 1.05rem; font-weight: 650; text-decoration: none; }

.sources-section {
  border-top: 3px solid var(--ink);
  margin-top: 50px;
  padding-top: 34px;
}

.sources-section .section-heading { margin-bottom: 24px; }
.sources-list { margin: 0; padding-left: 2rem; }
.sources-list li { border-top: 1px solid var(--line); padding: 16px 0 16px 8px; }
.source-title { font-weight: 700; }
.source-official { background: var(--success-soft); color: var(--success); font-size: .68rem; margin-left: 8px; padding: 3px 6px; white-space: nowrap; }
.source-meta, .source-locator, .source-checked, .source-archive { color: var(--muted); display: block; font-size: .78rem; margin-top: 4px; }

.change-log {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 20px;
}

.change-log summary { cursor: pointer; font-weight: 750; }
.change-log li { margin-top: 8px; }

.article-relations {
  border-top: 1px solid var(--line);
  padding-bottom: clamp(70px, 10vw, 120px);
  padding-top: clamp(50px, 7vw, 85px);
}

.related-section + .related-section { margin-top: 70px; }

.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: 70px 0 22px;
}

.site-footer__grid {
  display: grid;
  gap: 60px;
  grid-template-columns: 1.2fr 1fr .8fr;
}

.site-brand--footer,
.site-brand--footer:hover { color: var(--white); }
.site-brand--footer .site-brand__text small { color: #b8c1c4; }
.site-brand--footer-custom .custom-logo-link {
  align-items: center;
  background: var(--white);
  border-radius: 8px;
  display: inline-flex;
  padding: 8px 10px;
}
.site-brand--footer-custom .custom-logo {
  display: block;
  height: auto;
  max-height: 62.4px;
  max-width: min(100%, 260px);
  object-fit: contain;
  width: auto;
}
.site-footer__about p { color: #b8c1c4; margin-top: 22px; max-width: 430px; }
.site-footer__nav .menu { columns: 2; }
.site-footer__nav li { break-inside: avoid; margin-bottom: 10px; }
.site-footer a { color: var(--white); text-decoration-color: rgba(255,255,255,.35); }
.site-footer__trust h2 { color: var(--white); font-family: var(--sans); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.site-footer__trust ul { list-style: none; margin: 0; padding: 0; }
.site-footer__trust li { margin-bottom: 9px; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .16); color: #9facb1; display: flex; font-size: .72rem; justify-content: space-between; margin-top: 54px; padding-top: 20px; }
.site-footer__bottom p { margin: 0; }

.error-page { min-height: 70vh; padding: clamp(70px, 10vw, 130px) 0; }
.error-page__grid { align-items: center; display: grid; gap: 80px; grid-template-columns: 1.1fr .9fr; }
.error-page h1 { font-size: clamp(2.8rem, 6vw, 4.8rem); }
.error-page .search-form { background: var(--white); border: 1px solid var(--line); margin: 30px 0 20px; max-width: 650px; padding: 7px; }
.error-code { color: var(--signal); font-size: .8rem; font-weight: 900; letter-spacing: .1em; }
.error-sign { align-items: center; aspect-ratio: 1; background: var(--signal); clip-path: polygon(50% 0, 100% 88%, 94% 100%, 6% 100%, 0 88%); display: flex; justify-content: center; margin: auto; max-width: 340px; width: 100%; }
.error-sign span { color: var(--ink); font-family: var(--serif); font-size: 9rem; transform: translateY(9%); }

@media (max-width: 1080px) {
  .site-header__bar { grid-template-columns: auto auto 1fr auto; }
  .menu-toggle { display: inline-flex; }
  .primary-navigation { background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; grid-column: 1 / -1; justify-self: stretch; margin-inline: calc((100vw - 100%) / -2); padding: 10px max(20px, calc((100vw - 1180px) / 2)); }
  .primary-navigation.is-open { display: block; }
  .primary-navigation > ul { align-items: stretch; flex-direction: column; gap: 0; }
  .primary-navigation a { border-bottom: 1px solid var(--line); padding: 13px 0; }
  .primary-navigation a:hover { box-shadow: none; }
  .primary-navigation .sub-menu { border: 0; box-shadow: none; opacity: 1; padding: 0 0 0 20px; position: static; transform: none; visibility: visible; }
  .search-toggle { justify-self: end; }
  .home-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .home-hero__diagram { max-width: 620px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topic-grid { grid-template-columns: repeat(3, 1fr); }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-rail { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; position: static; }
  .rail-card { margin-top: 0; }
}

@media (max-width: 760px) {
  :root { --shell: min(100% - 28px, 1180px); --article: min(100% - 28px, 820px); }
  body { font-size: 16px; }
  body.admin-bar .site-header { top: 46px; }
  .site-header__bar { gap: 12px; grid-template-columns: auto 1fr auto; min-height: 68px; }
  .menu-toggle { grid-column: 2; justify-self: end; }
  .search-toggle { border: 0; font-size: 0; grid-column: 3; padding: 8px; }
  .search-toggle::before { content: "⌕"; font-size: 1.5rem; }
  .site-brand__text small { display: none; }
  .primary-navigation { grid-column: 1 / -1; }
  .search-form { flex-direction: column; }
  .home-hero {
    background:
      linear-gradient(rgba(244, 241, 235, .88), rgba(244, 241, 235, .88)),
      url('../images/home-hero-viaduct-v1.webp') 62% center / cover no-repeat,
      #f4f1eb;
    padding-top: 60px;
  }
  .home-hero h1 { font-size: clamp(2rem, 10vw, 3rem); }
  .home-hero__diagram { padding: 22px; }
  .trust-strip__grid { grid-template-columns: 1fr; }
  .trust-strip__grid > div { min-height: auto; padding: 20px 0; }
  .trust-strip__grid > div + div { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .2); }
  .section-heading--split { align-items: start; gap: 14px; grid-template-columns: 1fr; }
  .portal-grid { grid-template-columns: 1fr; }
  .portal-card--wide { grid-column: auto; }
  .portal-card { min-height: 245px; }
  .topic-grid, .topic-grid--children { grid-template-columns: repeat(2, 1fr); }
  .card-grid, .card-grid--compact { grid-template-columns: 1fr; }
  .home-method__grid { gap: 34px; grid-template-columns: 1fr; }
  .article-header h1, .listing-header h1, .page-header h1 { font-size: clamp(2.35rem, 12vw, 3.7rem); }
  .breadcrumbs { margin-bottom: 34px; }
  .article-layout { padding-top: 45px; }
  .article-rail { grid-template-columns: 1fr; }
  .article-section--accent { margin-inline: 0; }
  .fact-grid { grid-template-columns: 1fr 1fr; }
  .rule-card { grid-template-columns: 1fr; }
  .rule-card > div { border-bottom: 1px solid rgba(255, 255, 255, .2); border-right: 0; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-brand--footer-custom .custom-logo { max-width: min(100%, 230px); }
  .site-footer__bottom { flex-direction: column; gap: 8px; }
  .error-page__grid { grid-template-columns: 1fr; }
  .error-sign { max-width: 220px; }
}

@media (max-width: 440px) {
  .site-brand__mark { height: 36px; width: 36px; }
  .site-brand__text strong { font-size: 1rem; }
  .menu-toggle span:last-child { display: none; }
  .button-row, .button { width: 100%; }
  .topic-grid, .topic-grid--children { grid-template-columns: 1fr; }
  .topic-tile { min-height: 130px; }
  .fact-grid { grid-template-columns: 1fr; }
  .article-header__facts { align-items: flex-start; flex-direction: column; }
  .source-official { display: inline-block; margin: 5px 0 0; }
}

@media print {
  .site-header,
  .site-footer,
  .article-rail,
  .article-relations,
  .button-row,
  .breadcrumbs { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .article-header { border: 0; padding: 0 0 24px; }
  .article-layout { display: block; padding: 0; width: 100%; }
  a { color: #000; text-decoration: none; }
  .article-section, .sources-section { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
