/* ==========================================================================
   Douglas County Comprehensive Development Plan — web edition
   Built on the Environmental Services design system
   ("Env Services Example.fig": 1440 canvas / 80 gutter / 1280 container)
   ========================================================================== */

:root {
  /* Base */
  --ink: #10101d;
  --white: #ffffff;
  --grey: #595963;
  --outline: #c1c1cc;
  --outline-var: #e1e1e2;
  --outline-active: #262998;

  /* Main */
  --pri-purple: #2227c1;
  --sec-purple: #4448b2;
  --pri-yellow: #f6c232;

  /* Surfaces */
  --surface-grey: #f4f4f4;
  --surface-blue: #deeafd;
  --surface-cream: #fffae2;
  --surface-yellow: #f3dd99;
  --surface-purple: #f1f1ff;
  --field-bg: #f5f5f5;

  /* Chrome */
  --nav-blue: #30337f;
  --nav-black: #10101d;
  --header-grey: #f8f8f8;
  --msg-yellow: #ffefb7;
  --footer-bg: #21212a;
  --footer-text: #c1c1cc;
  --footer-head: #f4f4f4;

  /* Type */
  --inter: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --gutter: 80px;
  --container: 1280px;
  --sidebar: 320px;
  --col-gap: 40px;
  --radius: 12px;
  --radius-sm: 8px;

  /* Elevation */
  --shadow-card: 0 1px 2px rgba(16, 16, 29, .04), 0 8px 24px rgba(16, 16, 29, .06);
  --shadow-pop: 0 12px 40px rgba(16, 16, 29, .18);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; }

:focus-visible { outline: 2px solid var(--outline-active); outline-offset: 2px; border-radius: 4px; }

.container { width: min(var(--container), 100% - var(--gutter) * 2); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 50%; translate: -50% -120%; z-index: 100;
  background: var(--ink); color: var(--white); padding: 10px 20px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm); transition: translate .15s;
}
.skip-link:focus { translate: -50% 0; }

/* ---------- Type scale (Figma: Headings/H1..H6, Body, CTA) ---------- */
.h1 { font-size: clamp(32px, 4.2vw, 56px); line-height: 1.06; letter-spacing: -.01em; }
.h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.14; }
.h3 { font-size: 24px; line-height: 31px; }
.h4 { font-size: 20px; line-height: 26px; }
.h5 { font-size: 18px; line-height: 23px; }
.tagline {
  font-size: 14px; line-height: 20px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .015em;
}
.body-s { font-size: 14px; line-height: 26px; font-weight: 500; }
.muted { color: var(--grey); }

.cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 16px; line-height: 21px; font-weight: 700;
  text-transform: uppercase; color: var(--pri-purple);
}
.cta svg { flex: none; }
.cta:hover { color: var(--outline-active); }
.cta:hover svg { translate: 2px 0; }
.cta svg { transition: translate .15s; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: var(--radius-sm);
  background: var(--pri-yellow); color: var(--ink);
  font-size: 16px; line-height: 21px; font-weight: 700;
  transition: background .15s, translate .15s;
}
.btn:hover { background: #efb51a; }
.btn:active { translate: 0 1px; }
.btn--ghost { background: var(--white); box-shadow: inset 0 0 0 1px var(--outline); }
.btn--ghost:hover { background: var(--surface-purple); box-shadow: inset 0 0 0 1px var(--outline-active); }
.btn--sm { padding: 9px 16px; font-size: 14px; line-height: 20px; }

/* ==========================================================================
   Site chrome — Navigation symbol from the Figma (1440 × 188):
   48px utility strip, 100px logo + links row, 40px sitewide message.
   The left 300px rail (phone block over the white seal panel) is fixed at
   1440; it narrows on smaller screens and the links fold into a menu.
   ========================================================================== */
:root { --rail: clamp(169px, 100vw - 1140px, 300px); }

.utility { display: flex; min-height: 48px; background: var(--nav-blue); color: #f4f4f4; }
.utility__phone {
  flex: 0 0 var(--rail); display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; padding: 0 40px 0 16px; background: var(--footer-bg); color: var(--white);
  font-size: 16px; line-height: 21px; font-weight: 700; text-transform: uppercase; white-space: nowrap;
}
.utility__phone:hover { text-decoration: underline; text-underline-offset: 3px; }
.utility__in {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 24px;
  padding: 0 var(--gutter) 0 40px; font-family: var(--inter); font-weight: 500;
}
.utility__official { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 16px; }
.utility__official img { width: 24px; height: 24px; flex: none; }
.utility__links { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.utility__links span {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 14px; line-height: 17px; white-space: nowrap;
}
@media (max-width: 1100px) { .utility__links { display: none; } }

.masthead { position: relative; z-index: 45; display: flex; min-height: 100px; background: var(--header-grey); }
.masthead__logo {
  flex: 0 0 var(--rail); display: flex; align-items: center; justify-content: flex-end;
  padding: 0 40px; background: var(--white);
}
.masthead__logo img { width: 89px; height: 89px; border-radius: 50%; }
.masthead__in {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px;
  padding: 0 var(--gutter) 0 40px;
}
.masthead__nav { display: flex; align-items: center; gap: 16px; }
.masthead__nav > a, .navdd__btn {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-size: 16px; line-height: 26px; font-weight: 500; color: var(--ink);
}
.masthead__nav > a:hover, .navdd__btn:hover, .navdd.is-current > .navdd__btn { color: var(--pri-purple); }

/* dropdown — drops from the bottom edge of the 100px row */
.navdd { position: relative; }
.navdd__btn svg { transition: rotate .15s; }
.navdd.is-open > .navdd__btn svg { rotate: 180deg; }
.navdd__menu {
  display: none; position: absolute; top: calc(100% + 37px); left: -16px; z-index: 50;
  min-width: 260px; padding: 8px; background: var(--white);
  border: 1px solid var(--outline); border-radius: var(--radius); box-shadow: var(--shadow-pop);
}
.navdd__menu::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 38px; }
.navdd.is-open > .navdd__menu { display: block; }
@media (hover: hover) and (min-width: 1321px) { .navdd:hover > .navdd__menu { display: block; } }
.navdd__menu a {
  display: block; padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 15px; line-height: 22px; font-weight: 500; color: var(--ink);
}
.navdd__menu a:hover { background: var(--surface-grey); color: var(--pri-purple); }
.navdd__menu a[aria-current] { background: var(--surface-purple); color: var(--outline-active); font-weight: 600; }
.masthead__tools { margin-left: auto; display: flex; gap: 12px; }
.masthead__btn {
  width: 46px; height: 46px; display: grid; place-items: center; padding: 0;
  background: var(--white); color: var(--ink); cursor: pointer;
  border: 1px solid var(--outline); border-radius: 10px;
}
.masthead__btn:hover { border-color: var(--outline-active); color: var(--outline-active); }
.masthead__menu { display: none; }
@media (max-width: 1320px) {
  .masthead__menu { display: grid; }
  .masthead__nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 16px; background: var(--white);
    border-top: 1px solid var(--outline-var); box-shadow: var(--shadow-pop);
  }
  .masthead.is-open .masthead__nav { display: flex; }
  .masthead__nav > a, .navdd__btn {
    width: 100%; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--outline-var);
  }
  .masthead__nav > a:last-child { border-bottom: 0; }
  .navdd__menu {
    position: static; min-width: 0; padding: 4px 0 8px 12px;
    border: 0; border-bottom: 1px solid var(--outline-var); border-radius: 0; box-shadow: none;
  }
  .navdd__menu::before { content: none; }
}

.msgbar { background: var(--msg-yellow); }
/* Figma: a 502px frame centred in the bar, its row left-aligned inside it */
.msgbar__in {
  width: min(502px, 100% - var(--gutter) * 2); margin-inline: auto;
  min-height: 40px; display: flex; gap: 32px; font-size: 14px; line-height: 26px; font-weight: 500; color: var(--grey);
}
.msgbar__in > span { padding: 7px 0; }
.msgbar__more {
  display: inline-flex; align-items: center; flex: none; padding: 6px 8px;
  background: var(--pri-purple); color: var(--white);
  font-size: 12px; line-height: 16px; font-weight: 500; text-transform: uppercase; white-space: nowrap;
}
.msgbar__more:hover { background: var(--outline-active); }

@media (max-width: 760px) {
  :root { --rail: auto; }
  .utility__phone { padding: 0 16px; font-size: 14px; }
  .utility__in { padding: 0 16px; }
  .masthead { min-height: 80px; }
  .masthead__logo { padding: 0 16px; }
  .masthead__logo img { width: 64px; height: 64px; }
  .masthead__in { padding: 0 16px; }
  .msgbar__in { width: auto; gap: 16px; padding-inline: 16px; }
}
@media (max-width: 560px) {
  .utility__official span { display: none; }
  .utility__official::after { content: "Douglas County, NE"; font-size: 12px; white-space: nowrap; }
}

/* ==========================================================================
   Banner (interior page header — Figma "Background" #4448B2)
   ========================================================================== */
.banner {
  position: relative; background: var(--sec-purple); color: var(--white);
  padding: 48px 0 56px; overflow: hidden;
}
.banner--tall { padding: 56px 0 72px; }
/* solid #4448B2 — no photo or gradient (client, 2026-11-12) */
.banner__in { position: relative; }
.crumbs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 14px; line-height: 26px; font-weight: 500; color: #e4e5f7;
}
.crumbs a:hover { color: var(--white); text-decoration: underline; }
.crumbs svg { flex: none; opacity: .7; }
.crumbs [aria-current] { color: var(--white); }
.banner .h1 { margin-top: 12px; }
.banner__kicker { margin-bottom: 10px; color: #d6d8f5; }
.banner__meta {
  margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 24px;
  font-size: 14px; line-height: 24px; color: #dcdef5;
}
.banner__meta b { color: var(--white); font-weight: 600; }

/* ==========================================================================
   Cover page
   ========================================================================== */
.cover {
  position: relative; color: var(--white);
  background: var(--sec-purple); overflow: hidden;
}
.cover__in { position: relative; padding: 96px 0 88px; }
.cover .h1 { max-width: 18ch; margin: 12px 0 0; }
.cover__lede {
  margin: 20px 0 0; max-width: 62ch;
  font-size: 18px; line-height: 30px; font-weight: 500; color: #e9eafb;
}
.cover__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px; }
.cover__stats {
  margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(255, 255, 255, .22);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px;
}
.cover__stat b { display: block; font-size: 32px; line-height: 42px; }
.cover__stat span { font-size: 14px; line-height: 26px; color: #dcdef5; }

.section { padding: 72px 0; }
.section--grey { background: var(--surface-grey); }
.section--blue { background: var(--surface-blue); }
.section__head { max-width: 62ch; margin-bottom: 32px; }
.section__head .h2 { margin-bottom: 12px; }

.toc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.toc-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border: 1px solid var(--outline); border-radius: var(--radius);
  transition: box-shadow .18s, translate .18s, border-color .18s;
}
.toc-card:hover { box-shadow: var(--shadow-card); translate: 0 -2px; border-color: var(--outline-active); }
.toc-card__img { aspect-ratio: 16 / 7; width: 100%; object-fit: cover; background: var(--surface-blue); }
.toc-card__body { padding: 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.toc-card__kicker { color: var(--pri-purple); }
.toc-card__body .h4 { color: var(--ink); }
.toc-card__body p { margin: 0; color: var(--grey); font-size: 14px; line-height: 24px; }
.toc-card__foot {
  margin-top: auto; padding-top: 12px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}
.pill {
  display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px;
  background: var(--surface-purple); color: var(--outline-active);
  font-size: 12px; line-height: 16px; font-weight: 500;
}
.pill--blue { background: var(--surface-blue); color: var(--outline-active); }
.pill--yellow { background: var(--surface-yellow); color: var(--ink); }
.pill--solid { background: var(--sec-purple); color: var(--white); }

.callout {
  display: flex; gap: 20px; padding: 24px; border-radius: var(--radius);
  background: var(--surface-cream); border: 1px solid var(--outline);
}
.callout--grey { background: var(--surface-grey); }
.callout--blue { background: var(--surface-blue); }
.callout__icon {
  width: 48px; height: 48px; flex: none; border-radius: var(--radius);
  background: var(--pri-yellow); display: grid; place-items: center;
}
.callout--grey .callout__icon, .callout--blue .callout__icon { background: var(--white); }
.callout__body { flex: 1; min-width: 0; }
.callout__body .h4 { margin-bottom: 4px; }
.callout__body p { margin: 0; color: var(--grey); font-size: 14px; line-height: 24px; }

/* ==========================================================================
   Reader shell — sticky doc bar + 320/920 two-column (Figma interior layout)
   ========================================================================== */
.progress {
  position: fixed; inset: 0 auto auto 0; height: 3px; width: 0;
  background: var(--pri-purple); z-index: 60; transition: width .1s linear;
}

.docbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--outline-var);
}
.docbar__in {
  width: min(var(--container), 100% - var(--gutter) * 2); margin-inline: auto;
  min-height: 64px; display: flex; align-items: center; gap: 16px;
}
.docbar__title {
  font-size: 14px; line-height: 20px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.docbar__title span { color: var(--grey); font-weight: 500; }
.docbar__spacer { flex: 1; }
.docbar__nav { display: flex; align-items: center; gap: 8px; }
.iconbtn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: grid; place-items: center; border: 1px solid var(--outline);
  background: var(--white); transition: background .15s, border-color .15s;
}
.iconbtn:hover { background: var(--surface-purple); border-color: var(--outline-active); }
.iconbtn[aria-disabled="true"] { opacity: .38; pointer-events: none; }
.menu-toggle { display: none; }
@media (max-width: 1024px) {
  .menu-toggle { display: inline-flex; align-items: center; gap: 8px; }
  /* the drawer toggle already offers the contents; drop the duplicate link */
  .docbar__nav > a.btn { display: none; }
  .docbar__title { display: none; }
}

.reader {
  width: min(var(--container), 100% - var(--gutter) * 2); margin-inline: auto;
  display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr);
  gap: var(--col-gap); align-items: start; padding: 40px 0 80px;
}
@media (max-width: 1024px) { .reader { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Sidebar index ---------- */
.sidebar { position: sticky; top: 88px; max-height: calc(100vh - 112px); display: flex; flex-direction: column; }
.sidebar__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 12px;
}
.sidebar__head .tagline { color: var(--grey); }
.sidebar__search { position: relative; margin-bottom: 12px; }
.sidebar__search input {
  width: 100%; padding: 10px 12px 10px 36px; font: inherit; font-size: 14px;
  background: var(--field-bg); border: 1px solid var(--outline); border-radius: var(--radius-sm);
  color: var(--ink);
}
.sidebar__search input::placeholder { color: var(--grey); }
.sidebar__search input:focus { outline: none; border-color: var(--outline-active); background: var(--white); }
.sidebar__search svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; opacity: .55; }
.sidebar__scroll { overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; flex: 1; }
.sidebar__scroll::-webkit-scrollbar { width: 8px; }
.sidebar__scroll::-webkit-scrollbar-thumb { background: var(--outline); border-radius: 4px; }

.idx { list-style: none; }
.idx > li + li { margin-top: 2px; }
.idx__link {
  display: flex; gap: 10px; align-items: baseline;
  padding: 8px 12px; border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  font-size: 14px; line-height: 20px; font-weight: 500;
  transition: background .15s, color .15s;
}
.idx__link:hover { background: var(--surface-grey); }
.idx__num { flex: none; font-size: 12px; font-weight: 600; color: var(--grey); min-width: 22px; }
.idx__label { min-width: 0; }
.idx__label b { display: block; font-weight: 600; }
.idx > li.is-current > .idx__link {
  background: var(--surface-purple); border-left-color: var(--outline-active); color: var(--outline-active);
}
.idx > li.is-current .idx__num { color: var(--outline-active); }
.idx__sub { list-style: none; margin: 4px 0 8px; padding-left: 25px; display: none; }
.idx > li.is-current .idx__sub { display: block; }
.idx__sub a {
  display: block; padding: 5px 12px; border-left: 2px solid var(--outline-var);
  font-size: 13px; line-height: 19px; color: var(--grey);
}
.idx__sub a:hover { color: var(--pri-purple); border-left-color: var(--pri-purple); background: var(--surface-grey); }
.idx__sub a.is-active { color: var(--outline-active); border-left-color: var(--pri-purple); font-weight: 600; }
.idx__sub--h3 a { padding-left: 24px; font-size: 12.5px; }
.idx li[hidden] { display: none; }
.idx__empty { padding: 12px; color: var(--grey); font-size: 14px; }

.sidebar__foot { padding-top: 12px; border-top: 1px solid var(--outline-var); margin-top: 12px; }

/* Mobile drawer */
@media (max-width: 1024px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 70; width: min(340px, 88vw);
    max-height: none; background: var(--white); padding: 20px;
    box-shadow: var(--shadow-pop); translate: -105% 0; transition: translate .22s ease;
    border-right: 1px solid var(--outline);
  }
  body.nav-open .sidebar { translate: 0 0; }
  .scrim {
    position: fixed; inset: 0; z-index: 65; background: rgba(16, 16, 29, .45);
    opacity: 0; pointer-events: none; transition: opacity .2s;
  }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
}
.sidebar__close { display: none; }
@media (max-width: 1024px) { .sidebar__close { display: grid; } }

/* ==========================================================================
   Document content
   ========================================================================== */
.doc { max-width: none; }
/* keep a comfortable measure for prose but let maps use the whole column */
.doc > p, .doc > ul, .doc > ol, .doc > h2, .doc > h3, .doc > .pagestrip {
  max-width: 78ch;
}
.doc > * + * { margin-top: 20px; }

.doc h2 {
  font-size: 28px; line-height: 36px; margin-top: 56px; padding-top: 20px;
  border-top: 2px solid var(--pri-purple); scroll-margin-top: 96px;
}
.doc h2:first-child { margin-top: 0; }
.doc h3 {
  font-size: 20px; line-height: 27px; margin-top: 36px; color: var(--ink);
  scroll-margin-top: 96px;
}
.doc p { margin: 0; color: #2c2c3a; }
.doc p + p { margin-top: 16px; }
/* `.doc p { margin: 0 }` out-specifies the flow rule, so restore the gap
   where a paragraph follows a list, quote or figure */
.doc ul + p, .doc ol + p, .doc blockquote + p,
.doc figure + p, .doc .src-note + p { margin-top: 20px; }
.doc .lede { font-size: 18px; line-height: 30px; font-weight: 500; color: var(--ink); }

.doc ul, .doc ol { margin: 16px 0 0; padding-left: 0; list-style: none; }
.doc ul > li, .doc ol > li {
  position: relative; padding-left: 28px; color: #2c2c3a;
  font-size: 15px; line-height: 26px;
}
.doc ul > li + li, .doc ol > li + li { margin-top: 10px; }
.doc ul > li::before {
  content: ""; position: absolute; left: 8px; top: 11px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--pri-purple);
}
.doc ol { counter-reset: item; }
.doc ol > li { counter-increment: item; padding-left: 40px; }
.doc ol > li::before {
  content: counter(item); position: absolute; left: 0; top: 2px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-blue); color: var(--outline-active);
  font-size: 12px; font-weight: 700; display: grid; place-items: center;
}
/* the Comprehensive Plan sets plain printed numbers ("1.", "2."), as in the
   adopted document (client review, November 2026) */
.doc.plan ol > li::before {
  content: counter(item) "."; top: 0; width: 30px; height: auto; border-radius: 0;
  background: none; display: block; text-align: right; padding-right: 8px; box-sizing: border-box;
  color: var(--ink); font-size: 15px; line-height: 26px; font-weight: 600;
}
.doc li ul { margin-top: 8px; }
.doc li ul > li::before { background: var(--outline); }

/* Printed numbers: lists resume across pages ("6." after a map), so the
   number comes from the source, not from a counter that restarts */
.doc.plan ol > li[data-n]::before { content: attr(data-n) "."; }
/* "»" sub-points and further paragraphs of a list item */
.doc li ul.sub { margin-top: 8px; }
.doc li ul.sub > li { padding-left: 22px; }
.doc li ul.sub > li::before {
  content: "»"; background: none; width: auto; height: auto; border-radius: 0;
  left: 4px; top: 0; color: var(--pri-purple); font-weight: 700;
}
.doc li > p { margin-top: 10px; font-size: 15px; line-height: 26px; }

/* Call-out panels and definition sidebars from the printed page */
.doc .panel {
  margin-top: 24px; padding: 20px 24px; border-radius: var(--radius);
  background: #eef2f3; border-left: 4px solid #8fa3a9;
}
.doc .panel p, .doc .panel li { font-size: 15px; line-height: 24px; color: #2c2c3a; }
.doc .panel p + p, .doc .panel p + ul { margin-top: 10px; }
.doc .panel ul { margin-top: 8px; }
.doc .panel ul > li + li { margin-top: 4px; }
.doc .panel__title { font-weight: 700; color: #874252 !important; margin-bottom: 6px; }
.doc .panel--def { background: var(--surface-cream); border-left-color: var(--pri-yellow); }
.doc .panel--def p:first-child b, .doc .panel--def p:first-child { font-size: 16px; }

/* Figures */
.fig { margin-top: 32px; }
.fig .fig__title { margin: 0 0 10px; }
.fig__note { margin: 8px 0 0 !important; font-size: 13px; line-height: 20px; font-style: italic; color: var(--grey); }
.tbl__source { font-style: normal; }
/* wide tables (Table 1.1, ten census years) fit the column without scrolling */
.doc .tbl--compact table, .tbl.tbl--compact table { font-size: 12.5px; line-height: 18px; }
.tbl.tbl--compact th, .tbl.tbl--compact td { padding-left: 6px !important; padding-right: 6px !important; }
.tbl.tbl--compact tbody th { white-space: normal !important; min-width: 120px; }
.fig__frame {
  border: 1px solid var(--outline); border-radius: var(--radius);
  background: var(--surface-grey); overflow: hidden; position: relative;
}
.fig__frame img { width: 100%; height: auto; }
.fig__zoom {
  position: absolute; right: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(16, 16, 29, .82); color: var(--white);
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em;
  opacity: 0; transition: opacity .18s;
}
.fig__frame:hover .fig__zoom, .fig__frame:focus-within .fig__zoom { opacity: 1; }
.fig figcaption {
  margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline;
  font-size: 13px; line-height: 21px; color: var(--grey);
}
.fig figcaption .pill { flex: none; }
.fig--page .fig__frame { background: var(--white); }

/* aux "original page" strip */
.pagestrip {
  margin-top: 28px; display: flex; gap: 16px; align-items: flex-start;
  padding: 16px; border: 1px solid var(--outline); border-radius: var(--radius);
  background: var(--surface-grey);
}
.pagestrip img {
  width: 92px; flex: none; border: 1px solid var(--outline); border-radius: 6px; background: var(--white);
}
.pagestrip__body { flex: 1; min-width: 0; }
.pagestrip__body .h5 { font-size: 16px; line-height: 22px; margin-bottom: 2px; }
.pagestrip__body p { margin: 0 0 8px; font-size: 13px; line-height: 21px; color: var(--grey); }

/* prev / next */
.pager { margin-top: 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .pager { grid-template-columns: 1fr; } }
.pager__link {
  display: flex; flex-direction: column; gap: 4px; padding: 20px 24px;
  border: 1px solid var(--outline); border-radius: var(--radius); background: var(--white);
  transition: box-shadow .18s, border-color .18s, translate .18s;
}
.pager__link:hover { border-color: var(--outline-active); box-shadow: var(--shadow-card); translate: 0 -2px; }
.pager__link--next { text-align: right; grid-column: 2; }
@media (max-width: 620px) { .pager__link--next { grid-column: 1; text-align: left; } }
.pager__dir { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--pri-purple); }
.pager__t { font-size: 16px; line-height: 22px; font-weight: 600; }

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lb {
  position: fixed; inset: 0; z-index: 90; display: none;
  background: rgba(10, 10, 23, .92); padding: 24px;
}
.lb.is-open { display: grid; grid-template-rows: auto 1fr; gap: 12px; }
.lb__bar { display: flex; align-items: center; gap: 16px; color: #e9eafb; }
.lb__cap { font-size: 14px; line-height: 20px; min-width: 0; }
.lb__cap b { color: var(--white); }
.lb__bar .iconbtn { background: transparent; border-color: rgba(255, 255, 255, .3); color: var(--white); }
.lb__bar .iconbtn:hover { background: rgba(255, 255, 255, .12); }
.lb__stage { overflow: auto; display: grid; place-items: center; }
.lb__stage img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  background: var(--white); border-radius: 6px;
}
.lb__stage.is-zoomed { place-items: start; cursor: zoom-out; }
.lb__stage.is-zoomed img { max-width: none; max-height: none; width: 190%; }

/* ==========================================================================
   Footer (Figma Footer symbol)
   ========================================================================== */
/* Footer symbol from the Figma: 1440 × 375, 60/80/40/80 padding, 60px between rows */
.footer { background: var(--footer-bg); color: var(--footer-text); padding: 60px 0 40px; }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 48px 40px; }
.footer__about { width: 399px; max-width: 100%; }
.footer__title { margin: 0; color: var(--footer-head); font-size: 24px; line-height: 32px; font-weight: 600; }
.footer__about p + p { margin: 6px 0 0; font-size: 16px; line-height: 1.8; }
.footer__links { display: flex; flex-wrap: wrap; gap: 40px; min-width: 0; max-width: 100%; }
.footer__col { width: 205px; }
.footer__col--services { width: 391px; max-width: 100%; }
.footer__col h5 {
  margin: 0 0 12px; color: var(--footer-head);
  font-size: 16px; line-height: 21px; font-weight: 600; text-transform: uppercase;
}
.footer__col ul { list-style: none; margin: 0; padding: 0; font-size: 16px; line-height: 2.2; }
.footer__col--services ul {
  display: grid; grid-template-columns: repeat(2, minmax(0, 190px)); grid-template-rows: repeat(4, auto);
  grid-auto-flow: column; column-gap: 11px;
}
.footer__col a:hover { color: var(--white); text-decoration: underline; }
.footer__legal {
  margin-top: 60px; min-height: 29px; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px 48px; font-size: 16px; line-height: 21px; opacity: .6;
}
.footer__legal nav { display: flex; flex-wrap: wrap; gap: 12px 48px; }
.footer__legal a:hover { color: var(--white); text-decoration: underline; }
@media (max-width: 700px) {
  .footer__links, .footer__col--services { width: 100%; }
  .footer__legal { margin-top: 48px; }
  .footer__legal nav { gap: 12px 28px; }
}

@media (max-width: 700px) { :root { --gutter: 20px; } .section { padding: 48px 0; } }
@media print {
  .docbar, .sidebar, .progress, .pager, .utility, .msgbar, .fig__zoom, .scrim { display: none !important; }
  .reader { display: block; }
  .doc { max-width: none; }
}

/* ---------- Appendix B: BMP field cards ---------- */
.bmp__pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px !important; }
.doc .bmp__f {
  font-size: 12px; line-height: 16px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--outline-active);
  margin-right: 6px;
}

/* sections with no photograph of their own */
.toc-card__img--none {
  display: block;
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, var(--surface-blue) 0%, var(--surface-purple) 100%);
  border-bottom: 1px solid var(--outline-var);
}

/* ==========================================================================
   Tables reconstructed from the PDF
   ========================================================================== */
.tbl { margin-top: 32px; }
.tbl figcaption {
  margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline;
  font-size: 13px; line-height: 21px; color: var(--grey);
}
.tbl__scroll {
  overflow-x: auto; border: 1px solid var(--outline); border-radius: var(--radius);
  background: var(--white);
}
.tbl__scroll:focus-visible { outline: 2px solid var(--outline-active); outline-offset: 2px; }
.tbl table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 20px; }
.tbl thead th, .tbl thead td {
  background: var(--surface-blue); color: var(--outline-active);
  font-size: 12px; line-height: 16px; font-weight: 700;
  text-align: right; vertical-align: bottom; padding: 10px 12px;
  border-bottom: 1px solid var(--outline);
  position: sticky; top: 0;
}
.tbl thead th:first-child, .tbl thead td:first-child { text-align: left; }
.tbl tbody th {
  text-align: left; font-weight: 500; color: var(--ink);
  padding: 9px 12px; white-space: nowrap;
}
.tbl tbody td { padding: 9px 12px; color: #2c2c3a; }
.tbl tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tbody tr + tr th, .tbl tbody tr + tr td { border-top: 1px solid var(--outline-var); }
.tbl tbody tr:nth-child(even) { background: #fafafb; }
.tbl tbody tr.is-sub th { padding-left: 30px; color: var(--grey); font-weight: 400; }
.tbl__note {
  margin: 10px 0 0; font-size: 12.5px; line-height: 19px; color: var(--grey);
  display: flex; flex-wrap: wrap; gap: 6px 18px;
}
.tbl__key { display: inline-flex; align-items: center; gap: 6px; }

/* Summary matrices: many narrow columns, so the headings stand on end */
.tbl--matrix table { font-size: 13px; }
.tbl--matrix thead th.rot {
  writing-mode: vertical-rl; transform: rotate(180deg);
  white-space: nowrap; text-align: left; vertical-align: bottom;
  padding: 12px 4px; position: static;   /* height follows the longest label */
}
.tbl--matrix thead tr:first-child th {
  text-align: center; border-left: 1px solid var(--white); position: static;
  border-bottom: 1px solid rgba(38, 41, 152, .18);
}
.tbl--matrix thead tr:nth-child(2) th:first-child { position: static; }
.tbl--matrix tbody th { white-space: normal; min-width: 200px; }
.tbl--matrix td.mark { text-align: center; padding: 7px 4px; }
.mark b, td.mark {
  font-variant-numeric: tabular-nums;
}
.m-x, .m-h, .m-m, .m-na { font-weight: 700; }
.m-x, .m-h { color: var(--outline-active); }
.m-m { color: #6d70c4; }
.m-na { color: #b9b9c6; font-weight: 400; }
b.mark {
  display: inline-grid; place-items: center; width: 20px; height: 20px;
  border-radius: 5px; background: var(--surface-purple); font-size: 12px;
}
@media (max-width: 700px) {
  .tbl--matrix tbody th { min-width: 150px; }
  .tbl table { font-size: 13px; }
}

/* ---------- Appendix A: transcribed scan (quotes, sub-heads, source notes) ---------- */
.doc h4 {
  font-size: 16px; line-height: 23px; font-weight: 700; font-style: italic;
  color: var(--ink); margin-top: 26px; scroll-margin-top: 96px;
}
.doc blockquote {
  margin: 20px 0 0; padding: 18px 24px;
  background: var(--surface-purple); border-left: 3px solid var(--outline-active);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.doc blockquote p {
  margin: 0; font-size: 15px; line-height: 26px; font-style: italic; color: var(--ink);
}
.doc blockquote p + p { margin-top: 12px; }
.doc blockquote cite {
  display: block; margin-top: 10px; font-style: normal;
  font-size: 12.5px; line-height: 19px; color: var(--grey);
}
.doc .src-note {
  margin-top: 8px !important; font-size: 12.5px; line-height: 19px;
  color: var(--grey); word-break: break-word;
}

/* ---------- Appendix C: survey pies (as printed) ---------- */
.chart { margin-top: 40px; }
.chart figcaption { margin: 0 0 14px; }
.pies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pies--wide { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
.pie {
  border: 1px solid var(--outline); border-radius: var(--radius);
  background: var(--white); padding: 16px 16px 14px;
}
.pie__body { display: flex; align-items: center; gap: 4px; }
.pie__legend { list-style: none; margin: 0; padding: 0; flex: none; }
.pie__legend li {
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: 12.5px; line-height: 18px; color: #2c2c3a;
}
.pie__legend li + li { margin-top: 9px; }
.pie__legend .swatch { margin-top: 0; border: 0; }
.pie__canvas { position: relative; height: 240px; flex: 1; min-width: 0; }
.pie__cap { margin: 12px 0 0; font-size: 14px; line-height: 22px; color: var(--ink); }
.chart__legend-full { list-style: none; margin: 14px 0 0; padding: 0; }
.chart__legend-full li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13px; line-height: 21px; color: var(--grey);
}
.chart__legend-full li + li { margin-top: 6px; }
.swatch { width: 13px; height: 13px; flex: none; margin-top: 4px; border: 1px solid #1b1b26; }
.chart__legend-full .swatch { border: 1px solid #1b1b26; }
.chart__data { margin-top: 12px; }
.chart__data summary {
  cursor: pointer; font-size: 13px; line-height: 20px; font-weight: 600;
  color: var(--pri-purple); text-transform: uppercase; letter-spacing: .03em; padding: 6px 0;
}
.chart__data .tbl__scroll { margin-top: 8px; }
.chart__data table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.chart__data thead th {
  background: var(--surface-blue); color: var(--outline-active); font-size: 11.5px;
  line-height: 15px; font-weight: 700; text-align: right; vertical-align: bottom;
  padding: 9px 10px; border-bottom: 1px solid var(--outline);
}
.chart__data thead th:first-child { text-align: left; }
.chart__data tbody th { text-align: left; font-weight: 500; color: var(--ink); padding: 8px 10px; min-width: 230px; }
.chart__data tbody td { padding: 8px 10px; }
.chart__data tbody tr + tr > * { border-top: 1px solid var(--outline-var); }
@media (max-width: 1180px) and (min-width: 761px) {
  .pie__body { flex-direction: column; align-items: stretch; }
  .pie__legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
  .pie__legend li + li { margin-top: 0; }
}
@media (max-width: 760px) {
  .pies { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .pie__body { flex-direction: column; align-items: stretch; }
  .pie__legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
  .pie__legend li + li { margin-top: 0; }
}
/* the legends are lists inside .doc — opt them out of article list styling */
.doc .pie__legend, .doc .chart__legend-full { margin-top: 0; padding: 0; list-style: none; }
.doc .chart__legend-full { margin-top: 14px; }
.doc .pie__legend > li, .doc .chart__legend-full > li {
  padding-left: 0; font-size: 12.5px; line-height: 18px;
}
.doc .chart__legend-full > li { font-size: 13px; line-height: 21px; color: var(--grey); }
.doc .pie__legend > li::before, .doc .chart__legend-full > li::before { content: none; }
.doc .pie__legend > li + li { margin-top: 9px; }
.doc .chart__legend-full > li + li { margin-top: 6px; }
@media (max-width: 1180px) and (min-width: 761px), (max-width: 420px) {
  .doc .pie__legend > li + li { margin-top: 0; }
}
