/* K.E. McCartney & Associates — site styles
   Layout: one 1280px column on an ivory ground; maroon header and footer bands;
   alternating sand bands; the old header swoosh lives on as a clipped photo corner.
   Light by default, with a dark appearance from the footer switch (the brand colours stay put;
   see "dark appearance" near the end). */
:root {
  /* motion: a strong ease-out for things arriving or answering, an ease-in-out for things moving on screen */
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --maroon: #660000;
  --maroon-deep: #4A0000;
  --maroon-ink: #3F0000;
  --parchment: #EFE1BE;
  --parchment-soft: #E6D3B8;
  --ivory: #FBF7EF;
  --sand: #F3EBD9;
  --paper: #FFFFFF;
  --ink: #1B1714;
  --stone: #3D3530;
  --muted: #6B5F55;
  --line: #E2D7C3;
  --line-strong: #C9BBA4;
  --line-control: #8C8076;         /* the edge of a field, menu or control: 3.6:1 or more on ivory and white */
  --bar: #8C8076;
  --black: #000000;
  --focus: #1B1714;
  /* roles that change in the dark appearance (the brand colours above stay put, so text on a
     maroon or parchment fill reads the same in both) */
  --bg: var(--ivory);              /* the page */
  --surface: var(--paper);         /* cards, menus, fields, dialogs */
  --accent: var(--maroon);         /* links, accent text, rules and icons on the page */
  --accent-hover: var(--maroon-ink);
  --inverse: var(--ink);           /* a dark chip or tooltip on the page */
  --on-inverse: var(--ivory);
  --invalid-bg: #FFF6F4;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 32px);
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 24px 48px rgba(27, 23, 20, 0.16);
  --section: clamp(56px, 7vw, 96px);
  /* section headings (every h2 takes one of these): a page's own sections; sections inside a
     page's main column or a tool (the bid page, the admin, Bid History, page text); and cards,
     side panels, menus and dialogs. Footer and contents labels are small capitals, not headings. */
  --h2-page: clamp(1.85rem, 1.35rem + 1.6vw, 2.75rem);
  --h2-section: 1.6rem;
  --h2-card: 1.25rem;
  /* the shadow at the edge of a table that scrolls sideways */
  --scroll-edge: rgba(27, 23, 20, 0.18);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--scroll-pad, 120px); }   /* site.js adds room for stuck filter bars */
/* in-page links ("On this page", "See openings", photo updates…) glide to their section */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* no grey flash on a tap: each control shows its own :active state instead (see "press feedback") */
html { -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--maroon);
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; }
@media (hover: hover) and (pointer: fine) { a:hover { color: var(--accent-hover); } }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.on-dark { --focus: var(--parchment); }
/* the browser's own surfaces, in the site's colours: placeholders in the site's grey (5.8:1 on the
   page; the browser's default grey is 4.3:1), selected text in parchment, the text cursor in the
   accent, and no one-word last lines */
::placeholder { color: var(--muted); opacity: 1; }
::selection { background: var(--parchment); color: var(--maroon-ink); }
input, textarea { caret-color: var(--accent); }
p, li, figcaption, blockquote, dd { text-wrap: pretty; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0; color: var(--ink); }
h1 { font-size: clamp(2.35rem, 1.5rem + 3vw, 4rem); letter-spacing: -0.015em; line-height: 1.05; }
h2 { font-size: var(--h2-page); }
h3 { font-size: 1.4rem; line-height: 1.25; }
h4 { font-size: 1.15rem; }
p { margin: 0; }
ul, ol { margin: 0; }
address { font-style: normal; }
button { font: inherit; }
/* Controls answer a tap at once (no wait to see if it's a double-tap zoom), and a long press on one
   doesn't select its label as text or open the link menu. Text that is content stays selectable. */
a, button, summary, label, select, [role="button"] { touch-action: manipulation; }
button, .btn, .icon-btn, .seg label, .drawer summary, .footer-nav summary, .toc a, .svc-x-tab, .adm-nav a, .we-kinds a { -webkit-user-select: none; user-select: none; }
a.btn, .adm-nav a, .we-kinds a { -webkit-touch-callout: none; }
[hidden] { display: none !important; }
.tnum { font-variant-numeric: tabular-nums; }

.skip {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--parchment); color: var(--maroon); font-weight: 700;
  padding: 12px 18px; border-radius: var(--radius-sm);
}
.skip:focus { top: 12px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- layout ---------- */
.wrap {
  max-width: 1280px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.wrap--narrow { max-width: 880px; }
.apply-body > .form { max-width: 816px; }   /* the application form keeps its width, on the page's left edge with the title */
.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.band-sand { background: var(--sand); }
.band-black { background: var(--black); color: var(--ivory); }
.band-black h2, .band-black h3 { color: var(--ivory); }
.stack { display: flex; flex-direction: column; gap: var(--stack, 16px); }
.row { display: flex; flex-wrap: wrap; gap: var(--gap, 24px); }
.grid { display: grid; gap: var(--gap, 20px); grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 320px)), 1fr)); }
.split { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); align-items: center; }
.split > * { flex: 1 1 480px; min-width: 0; }
.split--top { align-items: flex-start; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 32px; margin-bottom: 36px; }
.section-head > div { flex: 1 1 520px; min-width: 0; }
.section-head p { color: var(--stone); margin-top: 10px; max-width: 62ch; }
.eyebrow { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.band-black .eyebrow { color: var(--parchment); }
.lead { font-size: 1.1875rem; color: var(--stone); max-width: 62ch; }
.muted { color: var(--muted); }
.more { font-weight: 700; text-decoration: none; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .more:hover { text-decoration: underline; } }

/* ---------- buttons, chips, badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn svg { flex: none; }
.btn--primary { background: var(--maroon); color: var(--ivory); }
@media (hover: hover) and (pointer: fine) { .btn--primary:hover { background: var(--maroon-deep); color: var(--ivory); } }
.btn--secondary { border-color: var(--ink); color: var(--ink); background: transparent; }
@media (hover: hover) and (pointer: fine) { .btn--secondary:hover { background: var(--inverse); color: var(--on-inverse); } }
.btn--cream { background: var(--parchment); color: var(--maroon); }
@media (hover: hover) and (pointer: fine) { .btn--cream:hover { background: var(--paper); color: var(--maroon); } }
.btn--outline-light { border-color: var(--parchment); color: var(--parchment); background: transparent; }
@media (hover: hover) and (pointer: fine) { .btn--outline-light:hover { background: var(--parchment); color: var(--maroon); } }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
/* a row whose buttons are all hidden for this visitor takes no room */
.btn-row:not(:has(> :not([hidden]))) { display: none; }
.badge {
  display: inline-block; font-family: var(--sans); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.02em; line-height: 1.4; background: var(--maroon); color: var(--ivory);
  border-radius: 3px; padding: 2px 8px; vertical-align: middle; white-space: nowrap;
}
.badge--soft { background: var(--parchment); color: var(--maroon-deep); }
.badge--ink { background: var(--inverse); color: var(--on-inverse); }
/* labels on cards (service, kind of story) are text, not pills: pills are for things you press */
.tag { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent); }
.meta .tag + .tag::before { content: "·"; margin-right: 10px; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { a.tag:hover { text-decoration: underline; } }

/* ---------- header: the logo, the menu, search, phone and Contact Us ---------- */

.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--maroon); color: var(--parchment);
  /* The header is taller at the top of the page (--hdr), with a bigger logo, and goes back to its
     usual height (--hdr-c) once the page scrolls (.is-compact, set by site.js). The shorter header
     keeps the difference as a bottom margin, so the page below doesn't move. The logo's width in
     each (--lof and --lof-c) is set with the heights below. */
  --hdr: 120px; --hdr-c: 84px;
  --lof: 275px; --lof-c: 189px;           /* 90 and 62 px tall */
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; height: var(--hdr); }
.site-header.is-compact { margin-bottom: calc(var(--hdr) - var(--hdr-c)); }
.site-header.is-compact .bar { height: var(--hdr-c); }
/* The change takes 220 ms on the site's ease-out curve. The logo changes size at once and site.js
   eases it (and the menu beside it) from where it was with a transform, so only the bar's height
   and margin are laid out again as it goes. */
.site-header.hdr-anim, .site-header.hdr-anim .bar { transition: margin-bottom .22s var(--ease-out), height .22s var(--ease-out), box-shadow .25s; }
.site-header.hdr-anim .brand, .site-header.hdr-anim .primary-nav { transition: transform .22s var(--ease-out); }
.site-header .brand { transform-origin: 0 50%; }
/* On wide screens the header runs a little wider than the page so the logo, the menu and the phone
   number all fit at full size. */
.site-header .bar { max-width: 1464px; }
/* The logo in the header and footer: Parchment Sign, or the official logo if site.yml's
   logo_default says so (base.html has only that one; the sign is the official logo's shape, so
   they take the same sizes). It sits centred in the bar, lines up with the page's left edge, takes
   the room the menu and buttons leave, up to its set width, and scales down evenly if there's less. */
.brand-block { flex: 0 1 auto; min-width: 0; display: flex; }
.brand { display: block; line-height: 0; min-width: 0; }
.brand img { max-width: 100%; height: auto; display: block; }
.brand img.logo-v { width: var(--lof); }
.is-compact .brand img.logo-v { width: var(--lof-c); }
.primary-nav, .header-actions { flex: none; }
@media (min-width: 68.75em) and (max-width: 79.9375em) { .site-header .primary-nav > a, .site-header .nav-trigger { padding-inline: 8px; } }
@media (min-width: 80em) { .site-header .primary-nav > a, .site-header .nav-trigger { padding-inline: 10px; } }
.primary-nav { display: flex; align-items: center; gap: 2px; font-size: 1rem; font-weight: 600; }
.primary-nav > a, .nav-trigger {
  color: var(--parchment); text-decoration: none; background: none; border: 0; cursor: pointer;
  padding: 12px 13px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; gap: 6px; line-height: 1.2;
}
.nav-trigger[aria-expanded="true"] { color: var(--paper); background: rgba(255, 255, 255, 0.08); }
@media (hover: hover) and (pointer: fine) { .primary-nav > a:hover, .nav-trigger:hover { color: var(--paper); background: rgba(255, 255, 255, 0.08); } }
.primary-nav > a[aria-current="page"], .nav-trigger.is-current { color: var(--paper); box-shadow: inset 0 -3px 0 var(--parchment); }
.nav-trigger svg { transition: transform .15s; }
.nav-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 48px; height: 48px; border-radius: var(--radius-sm); border: 0; background: none;
  color: var(--parchment); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--paper); } }
.header-phone { color: var(--parchment); text-decoration: none; font-weight: 600; padding: 0 10px; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .header-phone:hover { color: var(--paper); } }
.menu-toggle { display: none; }
.menu-toggle > span:not([hidden]) { display: inline-flex; }   /* centres the icon; inline, it sat on the text baseline */
/* the phone number as text where the menu leaves room for it, as a call button where it doesn't */
.header-call { display: none; }
@media (max-width: 89.9375em) { .header-phone { display: none; } .header-call { display: inline-flex; } }

.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface); color: var(--ink); border-top: 4px solid var(--parchment);
  box-shadow: var(--shadow); max-height: calc(100vh - 140px); overflow-y: auto;
}
.mega .wrap { display: flex; flex-wrap: wrap; gap: 32px; padding-block: 32px 28px; }
.mega ul { list-style: none; padding: 0; margin: 6px 0 0; font-size: 0.95rem; }
.mega li a { display: block; padding: 4px 0; color: var(--ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .mega li a:hover { color: var(--accent); text-decoration: underline; } }
.mega-aside { flex: 1 1 260px; align-self: flex-start; background: var(--sand); border-radius: var(--radius); padding: 24px; }
.mega-aside h2 { font-size: var(--h2-card); }
.mega-aside p { color: var(--stone); font-size: 0.95rem; margin: 8px 0 14px; }
.mega--small .wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 32px; }
.mega--small a.mega-link { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.mega--small a.mega-link strong { display: block; font-family: var(--serif); font-size: 1.1rem; color: var(--accent); }
.mega--small a.mega-link span { font-size: 0.9rem; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .mega--small a.mega-link:hover strong { text-decoration: underline; } }

.drawer {
  position: fixed; inset: 0; top: var(--header-h, 72px);
  background: var(--bg); overflow-y: auto; z-index: 49;
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  border-top: 3px solid var(--parchment);
}
.drawer .wrap { padding-block: 8px 24px; }
.drawer details { border-bottom: 1px solid var(--line); }
.drawer summary, .drawer .drawer-link {
  list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 56px;
  font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--ink); text-decoration: none; cursor: pointer;
}
.drawer .drawer-link { border-bottom: 1px solid var(--line); }
.drawer summary::-webkit-details-marker { display: none; }
.drawer details[open] summary svg { transform: rotate(180deg); }
.drawer details ul { list-style: none; padding: 0 0 14px; }
.drawer details li a { display: block; padding: 10px 0; color: var(--ink); text-decoration: none; font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .drawer details li a:hover { color: var(--accent); } }
.drawer .btn { width: 100%; margin-top: 22px; }
.drawer-contact { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 14px; font-weight: 700; }

/* The header's breakpoints are in em, not px: em in a media query follows the browser's own text
   size, so a visitor who sets larger text gets the menu button sooner instead of a squeezed logo.
   At the usual 16 px they fall at the same widths (68.75em = 1100 px, 43.75em = 700 px). */
@media (max-width: 68.6875em) {
  .primary-nav, .header-phone, .header-cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .site-header { --hdr: 100px; --hdr-c: 68px; --lof: 226px; --lof-c: 153px; }
}
@media (max-width: 43.6875em) {
  .site-header { --hdr: 84px; --hdr-c: 68px; --lof: 183px; --lof-c: 140px; }
  .site-header .bar { column-gap: 12px; }
  .header-actions { gap: 2px; }
  .header-actions .icon-btn { width: 44px; height: 44px; }
}
@media (min-width: 68.75em) { .drawer { display: none !important; } }

/* ---------- search dialog ---------- */
.search-dialog { border: 0; padding: 0; width: min(720px, calc(100vw - 32px)); max-height: min(80vh, 760px); max-height: min(80dvh, 760px); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); color: var(--ink); }
.search-dialog::backdrop { background: rgba(27, 23, 20, 0.55); }
.search-box { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.search-box input { flex: 1 1 auto; min-width: 0; border: 0; font: inherit; font-size: 1.15rem; padding: 10px 4px; background: transparent; color: var(--ink); }
.search-box input:focus-visible { border-radius: var(--radius-sm); }   /* the site's usual focus ring, rounded like a field */
/* Search boxes: no browser-drawn clear "x" (it looked like a second close button); site.js
   adds a plain "Clear" button that shows only while something is typed. */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.search-clear { flex: none; border: 0; background: none; font: inherit; font-size: 0.9rem; font-weight: 600; color: var(--muted); padding: 6px 8px; border-radius: 6px; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .search-clear:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; } }
.search-clear:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.search-clear[hidden] { display: none; }
.filter-search .search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.filter-search input { padding-right: 64px; }
.search-results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
/* The search box stays put and the results scroll underneath it. The list is the scroll
   area (sized by the dialog), so the wheel or a finger over the results always moves them. */
.search-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.search-dialog .search-box { flex: none; }
.search-dialog .search-results { flex: 1 1 auto; min-height: 0; }
.search-results a { display: block; padding: 12px 14px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); }
.search-results a:focus-visible { background: var(--sand); }
@media (hover: hover) and (pointer: fine) { .search-results a:hover { background: var(--sand); } }
.search-results strong { display: block; font-family: var(--serif); font-size: 1.1rem; }
.search-results span { display: block; font-size: 0.9rem; color: var(--muted); }
.search-results .section-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.search-empty { padding: 24px 22px; color: var(--muted); }

/* ---------- home hero ---------- */
.hero { padding-block: clamp(40px, 6vw, 72px) clamp(40px, 5vw, 56px); }
.hero h1 { margin: 16px 0 22px; }
.hero .lead { margin-bottom: 30px; }
.award { display: flex; align-items: center; gap: 14px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--stone); font-size: 0.95rem; }
.award svg { flex: none; }
.mosaic { display: flex; flex-direction: column; gap: 14px; }
.mosaic-row { display: flex; gap: 14px; }
.mosaic-row > * { flex: 1 1 0; min-width: 0; }

.photo-tile { position: relative; aspect-ratio: 869 / 400; max-width: 100%; }
.photo-tile::before { content: ""; position: absolute; inset: 0; background: var(--maroon); clip-path: polygon(0 38%, 64.6% 100%, 0 100%); pointer-events: none; }   /* the swoop is drawn over the photo; clicks pass through to its link */
.photo-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; clip-path: polygon(0 0, 100% 0, 100% 100%, 68% 100%, 0 34%); border-radius: 8px 8px 8px 0; }
.photo { position: relative; border-radius: 8px; overflow: hidden; background: var(--sand); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo--tile { aspect-ratio: 564 / 300; }
/* home page mosaic: each photo links to its project; the name shows on hover or focus (always on touch screens) */
.mosaic-link { position: absolute; inset: 0; display: block; color: inherit; text-decoration: none; }
.mosaic-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.mosaic-cap { position: absolute; right: 10px; bottom: 10px; z-index: 2; max-width: calc(100% - 20px); background: rgba(27, 23, 20, 0.84); color: var(--ivory); font-size: 0.8125rem; font-weight: 600; line-height: 1.3; padding: 6px 12px; border-radius: 4px; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; pointer-events: none; }
.mosaic-link:focus-visible .mosaic-cap { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) { .mosaic-link:hover .mosaic-cap { opacity: 1; transform: none; } }
@media (hover: none), (pointer: coarse) { .mosaic-cap { opacity: 1; transform: none; } }
/* On a phone or tablet the photos are too narrow for a name over them (on the small ones it
   covered most of the photo), so each name goes underneath, like a caption; on a touch screen too,
   where the names always show. The large photo keeps its swoop: it's sized to the photo alone. */
@media (max-width: 760px), (hover: none) {
  .mosaic-row { align-items: flex-start; }
  .mosaic .photo-tile, .mosaic .photo--tile { aspect-ratio: auto; overflow: visible; background: none; border-radius: 0; }
  .mosaic .mosaic-link { position: static; }
  .mosaic .photo-tile img { position: static; display: block; height: auto; aspect-ratio: 869 / 400; border-radius: 8px; }
  .mosaic .photo-tile::before, .mosaic .photo-tile::after { bottom: auto; aspect-ratio: 869 / 400; border-radius: 8px; }
  .mosaic .photo--tile img { height: auto; aspect-ratio: 564 / 300; border-radius: 8px; background: var(--sand); }
  .mosaic .mosaic-cap { position: static; display: block; max-width: none; margin-top: 6px; padding: 0 2px; background: none; color: var(--ink); font-size: 0.8125rem; line-height: 1.35; opacity: 1; transform: none; }
  .mosaic .mosaic-cap span { color: var(--accent); }
}
.photo-label { position: absolute; background: rgba(27, 23, 20, 0.84); color: var(--ivory); font-size: 0.8125rem; font-weight: 600; padding: 6px 12px; border-radius: 4px; }

/* the four figures: four across, or two by two (never three and one) */
.proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.proof > div { padding: 26px 24px; border-left: 1px solid var(--line); }
.proof > div:first-child { border-left: 0; padding-left: 0; }
@media (max-width: 1000px) {
  .proof { grid-template-columns: 1fr 1fr; }
  .proof > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .proof > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.proof b { display: block; font-family: var(--serif); font-size: 2.75rem; font-weight: 600; line-height: 1; color: var(--accent); }
.proof > div > span { display: block; margin-top: 10px; font-size: 0.95rem; color: var(--stone); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .card h3 a:hover { color: var(--accent); text-decoration: underline; } }
.card p { color: var(--stone); font-size: 0.97rem; }
.card .card-links { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-top: 8px; font-weight: 600; }
.card--link { text-decoration: none; color: inherit; transition: border-color .15s; }
@media (hover: hover) and (pointer: fine) {
  .card--link:hover { border-color: var(--accent); }
  .card--link:hover h3 { color: var(--accent); text-decoration: underline; }
}
.status { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 0.92rem; color: var(--stone); }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--bar); flex: none; }
.status--live::before { background: var(--accent); }
/* home page "How can we help?": short link cards */
/* ruled columns, like In Our Clients' Words, so lists of different lengths don't leave empty boxes */
.help-grid { column-gap: 48px; }
.help-grid .help-card { background: none; border: 0; box-shadow: none; border-radius: 0; border-top: 2px solid var(--ink); padding: 20px 0 0; gap: 14px; }
.help-head { display: flex; align-items: center; gap: 12px; }   /* the title wraps its words beside the icon, in every card alike */
.help-head h3 { margin: 0; font-size: 1.3rem; min-width: 0; }
/* each column's links: one card of full-width rows (an inset grouped list), so on the sand band they
   read as things to press. A row tints under the pointer and darkens the moment it's pressed; the
   arrow sits at the row's end and nudges on hover; what's open now is a badge beside it. */
.help-links { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 1px 2px rgba(27, 23, 20, 0.05); }
.help-links a { position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 18px; color: var(--ink);
  font-weight: 600; line-height: 1.3; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background-color 0.15s ease, color 0.15s ease; }
.help-links a + a::before { content: ""; position: absolute; top: 0; left: 18px; right: 0; height: 1px; background: var(--line); }   /* separators start at the words, as in a grouped list */
.help-links .arr { margin-left: auto; color: var(--accent); }
.help-links .help-badge { margin-left: auto; }
.help-links .help-badge + .arr { margin-left: 0; }
.help-badge { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 3px 9px 3px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 700;
  background: var(--bg); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--accent); }
.help-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
@media (hover: hover) and (pointer: fine) {
  .help-links a:hover { background: var(--bg); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); color: var(--accent); }
}
.help-links a:active { background: color-mix(in srgb, var(--accent) 11%, var(--surface)); transition-duration: 0s; }
.help-links a:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: var(--radius); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.job-where { display: flex; align-items: center; gap: 6px; margin: 6px 0 8px; font-size: 0.92rem; font-weight: 600; color: var(--stone); }
/* A job posting shows its office and the Apply button only in the sidebar cards. Where the
   sidebar drops below the description, the Job Details card moves up to sit before it, so the
   office is still the first thing read, and the Apply card follows the description. */
@media (max-width: 989px) {
  .content-layout.job-layout { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 20px; }
  .content-layout.job-layout > aside { display: contents; }
  .job-layout .job-details { order: -1; }
  .content-layout.job-layout > article { margin-block: 12px 16px; }
}
.icon { color: var(--accent); flex: none; }
.ic { flex: none; }
.ebid-dlg-close .icon { color: inherit; }   /* a dialog's X is one colour, whichever way its icon was drawn */

.media-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; min-width: 0; }
.media-card .media-img { aspect-ratio: 3 / 2; background: var(--sand); overflow: hidden; }
.media-card .media-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
@media (hover: hover) and (pointer: fine) { .media-card:hover .media-img img { transform: scale(1.03); } }
.media-card .media-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.media-card h3 { font-size: 1.25rem; }
@media (hover: hover) and (pointer: fine) { .media-card:hover h3 { color: var(--accent); text-decoration: underline; } }
.media-card p { color: var(--stone); font-size: 0.95rem; }
.media-card .meta { font-size: 0.85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.media-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--accent); background: var(--sand); }

/* ---------- black bands (the mission on Our Story) ---------- */
.band-black p.lead { color: #CFC4B6; }
.band-black a { color: var(--parchment); }

/* ---------- quotes ---------- */
.quote { margin: 0; background: var(--surface); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; gap: 18px; }
.quote blockquote { margin: 0; font-family: var(--serif); font-size: 1.35rem; line-height: 1.42; font-style: italic; color: var(--ink); }
.quote figcaption { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.95rem; color: var(--stone); }
.quote figcaption strong { display: block; color: var(--ink); }

/* ---------- CTA + offices ---------- */
.cta { background: var(--maroon); color: var(--ivory); border-radius: var(--radius); padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; gap: 16px; }
.cta h2 { color: var(--ivory); }
.cta p { color: var(--parchment-soft); }
.cta .contact-line { color: var(--parchment); font-weight: 600; }
/* In the contact band at the foot of most pages the box is only as tall as its words,
   centred beside the office cards, with everything centred inside it. */
/* the same size as an office card beside it, its words at the foot where theirs are, and KEM's contour
   lines above them where the offices have their photos (templates/_cta.html) */
.cta-band .cta { align-self: stretch; overflow: hidden; justify-content: flex-end; align-items: flex-start; text-align: left; gap: 8px; padding: 22px 22px 24px; }
.cta-band .cta.topo { --topo-img: url("/img/topo-wide.svg"); --topo-ink: rgba(239, 225, 190, 0.3); --topo-size: 760px auto; --topo-pos: 35% 18%;
  --topo-fade: linear-gradient(#000 20%, rgba(0, 0, 0, 0.35) 62%, transparent 88%); }
.cta-band .cta h2 { font-size: 1.4rem; }
.cta-band .cta p { max-width: 30ch; }
.cta-band .cta .btn-row { justify-content: flex-start; margin-top: 8px; --gap: 10px; }
/* across the top of the offices on narrower screens: shorter, the lines behind the words */
@media (max-width: 880px) { .cta-band .cta.topo { --topo-fade: linear-gradient(90deg, rgba(0, 0, 0, 0.25), #000 75%); --topo-pos: right center; } }
.cta-band .cta .btn { padding-inline: 18px; }
.cta-band .cta-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
/* with a photo (site.yml, cta_photo): it's on top, cropped like the offices' photos beside it, and
   the words sit at the foot of the box where theirs are. When the box is wide (across the top of
   the offices on a tablet) the photo goes beside the words instead. */
.cta-band .cta--photo { padding: 0; gap: 0; container: cta / inline-size; }
.cta-band .cta--photo .cta-in { flex: 1 1 auto; display: flex; flex-direction: column; }
.cta-band .cta--photo .cta-img { aspect-ratio: 3 / 2; overflow: hidden; flex: none; }
.cta-band .cta--photo .cta-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cta-band .cta--photo .cta-body { flex: 1 1 auto; justify-content: flex-end; padding: 20px 22px 24px; }
/* the contour lines behind the words, strongest on the right, away from them */
.cta-band .cta--photo .cta-body.topo { --topo-img: url("/img/topo-wide.svg"); --topo-ink: rgba(239, 225, 190, 0.3); --topo-size: 760px auto; --topo-pos: 30% 45%;
  --topo-fade: linear-gradient(90deg, rgba(0, 0, 0, 0.35), #000 70%); }
@container cta (min-width: 540px) {
  .cta-band .cta--photo .cta-in { flex-direction: row; }
  .cta-band .cta--photo .cta-img { flex: 0 0 44%; aspect-ratio: auto; min-height: 220px; }
  .cta-band .cta--photo .cta-body { justify-content: center; padding: 28px; }
}
.cta .contact-line a { color: inherit; text-decoration-color: rgba(243, 233, 214, 0.45); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .cta .contact-line a:hover { text-decoration-color: currentColor; } }
.office { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.office .office-img { aspect-ratio: 3 / 2; overflow: hidden; }
.office .office-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* the text sits at the bottom of each card, so office names, addresses and links line up
   across cards even when one has a label (Headquarters) above its name */
.office .office-body { padding: 20px 22px 24px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; flex: 1 1 auto; }
.office h3 { font-size: 1.4rem; }
.office address { color: var(--stone); }
.office .links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; font-weight: 600; }

/* ---------- interior page hero ---------- */
.crumbs { font-size: 0.9rem; color: var(--muted); padding-top: 18px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li + li::before { content: "›"; margin: 0 6px 0 2px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.page-hero { padding-block: 28px clamp(40px, 5vw, 64px); }
.page-hero h1 { margin: 12px 0 18px; }
.page-hero .lead + .lead { margin-top: 12px; }
.page-hero .btn-row { margin-top: 26px; }
.page-hero--plain { padding-bottom: 32px; }
/* Jump links (a gallery's photo updates, a bid page's sections): a wrapping row of small squared buttons, each as wide as its words, with
   an arrow pointing down the page right after them (no pills; README, "Writing for the site"). */
.toc { margin-top: 28px; }
.toc-title { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 7px 12px 7px 14px; border: 1px solid var(--line-control);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.92rem; line-height: 1.2;
  transition: background-color .15s, color .15s, border-color .15s; }
@media (hover: hover) and (pointer: fine) { .toc a:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); } }
.toc a:active { background: var(--sand); }
.toc a svg { flex: none; width: 14px; height: 14px; transform: rotate(90deg); color: var(--accent); transition: transform .15s; }
@media (hover: hover) and (pointer: fine) { .toc a:hover svg { transform: rotate(90deg) translateX(2px); } }
@media (pointer: coarse) { .toc a { min-height: 44px; } }
.toc--updates { margin: 0 0 28px; }
/* a specialty page's sibling pages, as tabs under the header */
/* Specialty pages list their service's other specialties: a card at the top of the sidebar
   (current page marked), or on phones a "More in …" list that opens at the top of the page */
.svc-nav h2 { font-size: var(--h2-card); margin-bottom: 6px; }
.svc-nav h2 a { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.svc-nav h2 a svg { color: var(--accent); flex: none; }
@media (hover: hover) and (pointer: fine) { .svc-nav h2 a:hover span { color: var(--accent); text-decoration: underline; } }
.svc-nav .side-nav a { font-size: 0.97rem; line-height: 1.35; }
.svc-nav-mobile { display: none; }
@media (max-width: 999px) {
  .svc-nav { display: none; }
  .svc-nav-mobile { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; }
  .svc-nav-mobile > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; font-weight: 700; color: var(--ink); }
  .svc-nav-mobile > summary::-webkit-details-marker { display: none; }
  .svc-nav-mobile > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg) translateY(-3px); transition: transform .15s; }
  .svc-nav-mobile[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
  .svc-nav-mobile[open] { padding-bottom: 14px; }
  .svc-nav-mobile .side-nav { border-top: 1px solid var(--line); margin-bottom: 12px; }
}
/* Funding Assistance cards list the programs for each kind of project */
.fund-card .fund-programs { margin: 4px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--stone); }
.fund-card .svc-more { margin-top: auto; padding-top: 8px; }

/* ---------- prose (content from the CMS) ---------- */
/* long text at about 65 to 70 characters a line (72ch came out at 83 to 87 in Public Sans) */
.prose { max-width: 56ch; color: var(--stone); }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: var(--h2-section); margin-top: 1.6em; color: var(--ink); }
.prose h3 { font-size: 1.35rem; margin-top: 1.4em; color: var(--ink); }
.prose h4 { margin-top: 1.2em; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
/* plain lists in page text: a short maroon dash in place of the bullet; numbers in maroon */
.prose ul:not([class]) { list-style: none; padding-left: 0; }
.prose ul:not([class]) > li { position: relative; padding-left: 1.6em; }
.prose ul:not([class]) > li::before { content: ""; position: absolute; left: 0.15em; top: 0.8em; width: 0.75em; height: 2px; border-radius: 1px; background: var(--accent); }
.prose ul:not([class]) ul:not([class]) > li::before { background: var(--line-strong); }
.prose ol { padding-left: 1.7em; }
.prose ol > li { padding-left: 0.3em; }
.prose ol > li::marker { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.prose strong { color: var(--ink); }
.prose img { border-radius: 8px; display: block; }
.prose a { font-weight: 600; }
.prose blockquote { margin-left: 0; padding-left: 18px; border-left: 3px solid var(--parchment); font-style: italic; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; margin-top: 1.4em; }
.prose .gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.prose p:has(> img:only-child) { margin-top: 1.4em; }

.content-layout { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); align-items: flex-start; }
.content-layout > main, .content-layout > .content-main { flex: 999 1 560px; min-width: 0; }
.content-layout > aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
/* a project page with no write-up and no map: its cards across the page (templates/project.html) */
.content-layout.content-layout--short { display: block; }
.content-layout.content-layout--short > aside.stick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 24px; align-items: start; position: static; }
.content-layout--short > aside > .more { grid-column: 1 / -1; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.side-card h2 { font-size: var(--h2-card); margin-bottom: 12px; }
.side-nav { list-style: none; padding: 0; margin: 0; }
.side-nav a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.side-nav li:last-child a { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) { .side-nav a:hover { color: var(--accent); } }
.side-nav a[aria-current="page"], .side-nav a[aria-current="true"] { color: var(--accent); }
.side-nav a[aria-current="page"]::before, .side-nav a[aria-current="true"]::before { content: "→ "; }
.person { display: flex; gap: 16px; align-items: center; }
.person + .person { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.person .avatar { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--parchment); }
.person .avatar--initials { display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: var(--accent); }
.person b { display: block; font-family: var(--serif); font-size: 1.1rem; line-height: 1.25; }
.person span { display: block; font-size: 0.9rem; color: var(--stone); }
.person a { font-size: 0.92rem; font-weight: 700; }

.program { display: flex; gap: 18px; align-items: flex-start; }
.program img { flex: none; width: 72px; height: 72px; object-fit: cover; border-radius: 50%; border: 2px solid var(--accent); background: var(--surface); }
.program h3 { font-size: 1.2rem; }
.program p { color: var(--stone); font-size: 0.97rem; margin-top: 6px; }
.program a { display: inline-block; margin-top: 8px; font-weight: 700; font-size: 0.95rem; }

/* ---------- filters + lists ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-bottom: 22px; }
.filter-search { position: relative; flex: 1 1 300px; min-width: 0; max-width: 460px; }
.filter-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.filter-search input { width: 100%; font: inherit; padding: 12px 14px 12px 44px; border-radius: 8px; border: 1px solid var(--line-control); background: var(--surface); color: var(--ink); }
/* filters that pick one group (Team, References, All News, Bid Results): a segmented control, the
   choices in one bordered bar with the chosen one in maroon. Where the bar doesn't fit on one line
   (phones, narrow windows), site.js marks the row .filters--menu and a "Show" menu takes its place. */
.filter-chips { display: inline-flex; flex-wrap: nowrap; gap: 2px; padding: 3px; max-width: 100%; border: 1px solid var(--line-control); border-radius: 8px; background: var(--surface); }
.filter-chips button {
  position: relative; min-height: 40px; padding: 0 16px; border: 0; border-radius: 5px; white-space: nowrap;
  background: none; color: var(--ink); cursor: pointer; font: inherit; font-weight: 600; font-size: 0.95rem;
  transition: background-color .15s, color .15s;
}
.filter-chips button + button::before { content: ""; position: absolute; left: -2px; top: 10px; bottom: 10px; width: 1px; background: var(--line-strong); }
.filter-chips button[aria-pressed="true"]::before, .filter-chips button[aria-pressed="true"] + button::before { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .filter-chips button:hover::before, .filter-chips button:hover + button::before { opacity: 0; }
  .filter-chips button:hover { background: var(--sand); }
}
.filter-chips button:active { background: var(--line); }
.filter-chips button[aria-pressed="true"] { background: var(--maroon); color: var(--ivory); box-shadow: 0 1px 2px rgba(27, 23, 20, 0.25); }
.filter-chips button .n { font-weight: 500; color: var(--muted); margin-left: 1px; font-variant-numeric: tabular-nums; }
.filter-chips button[aria-pressed="true"] .n { color: rgba(251, 247, 238, 0.8); }
.filter-select { display: none; flex: 1 1 260px; min-width: 0; max-width: 460px; align-items: center; gap: 10px; font-weight: 600; }
.filters--menu .filter-chips { display: none; }
.filters--menu .filter-select { display: flex; }
.filter-select select {
  flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 0 42px 0 14px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
  border: 1px solid var(--line-control); border-radius: 8px; appearance: none; -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23660000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
}
:root[data-theme="dark"] .filter-select select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23E89A8E' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.result-count { font-size: 0.92rem; color: var(--stone); margin-bottom: 12px; }
.empty { padding: 36px 20px; text-align: center; color: var(--stone); border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.year-head { font-family: var(--serif); font-size: 1.6rem; margin: 40px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.year-head:first-child { margin-top: 0; }
.post-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.post-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.post-row .thumb { width: 112px; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--sand); }
.post-row .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-row a.title { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.3; }
@media (hover: hover) and (pointer: fine) { .post-row a.title:hover { color: var(--accent); text-decoration: underline; } }
.post-row p { color: var(--stone); font-size: 0.95rem; margin-top: 4px; }
.post-row .meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 4px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
@media (max-width: 520px) { .post-row { grid-template-columns: 76px minmax(0, 1fr); } .post-row .thumb { width: 76px; } }

/* team */
.team-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.team-grid--six { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.member { display: flex; flex-direction: column; gap: 10px; }
.member .portrait { aspect-ratio: 231 / 289; border-radius: 8px; overflow: hidden; background: var(--sand); }
.member .portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.member b { font-family: var(--serif); font-size: 1.1rem; line-height: 1.25; display: block; }
.member .cred { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; color: var(--accent); letter-spacing: 0.02em; }
.member span.role { font-size: 0.92rem; color: var(--stone); display: block; }
.team-group + .team-group { margin-top: 56px; }
.team-group h2 { font-size: var(--h2-section); margin-bottom: 22px; display: flex; align-items: baseline; gap: 12px; }

/* references */
.ref-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.ref { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-size: 0.95rem; color: var(--stone); }
.ref b { display: block; font-family: var(--serif); font-size: 1.1rem; color: var(--ink); line-height: 1.3; }
.ref .role { color: var(--ink); font-weight: 600; margin: 2px 0 6px; }
.ref .phone { margin-top: 6px; font-weight: 700; color: var(--accent); }

/* bid results table */
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.bids { min-width: 980px; }
.bids-head, .bid-main { display: grid; grid-template-columns: 112px minmax(0, 2.3fr) minmax(0, 1fr) minmax(0, 1.5fr) 118px 56px 56px; gap: 16px; align-items: center; }
.bids-head { padding: 12px 20px; background: var(--sand); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--stone); }
.bids-head .r, .bid-main .r { text-align: right; }
.bid { border-top: 1px solid var(--line); list-style: none; }
.bids ul { list-style: none; margin: 0; padding: 0; }
.bid-main { padding: 14px 20px; }
.bid-date { font-size: 0.92rem; font-weight: 600; color: var(--stone); font-variant-numeric: tabular-nums; }
.bid-title { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; line-height: 1.3; }
.bid-owner { font-size: 0.875rem; color: var(--muted); }
.money { font-variant-numeric: tabular-nums; }
.bid-low { font-weight: 700; color: var(--accent); }
.bid-lowname { font-size: 0.85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.delta { display: inline-block; font-size: 0.95rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.delta--under { color: var(--accent); }
.delta--over { color: var(--ink); }
.delta--na { color: var(--muted); font-weight: 600; }
.bid-toggle { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line-control); background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .bid-toggle:hover { background: var(--sand); } }
.bid-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.bid-detail { padding: 4px 20px 24px 148px; display: flex; flex-wrap: wrap; gap: 20px 48px; }
.bid-detail ol { flex: 3 1 520px; min-width: 0; list-style: none; padding: 0; margin: 0; }
.bid-detail li { display: grid; grid-template-columns: 24px minmax(0, 1.5fr) minmax(0, 1.5fr) minmax(132px, max-content); gap: 14px; align-items: center; padding: 6px 0; font-size: 0.95rem; }
.bid-detail .rank { color: var(--muted); }
.bid-detail .name { font-weight: 600; }
.bid-detail .name small { display: block; font-weight: 400; color: var(--muted); }
.bid-bar { height: 10px; background: var(--sand); border-radius: 2px; position: relative; }
.bid-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--bar); }
.bid-bar i.low { background: var(--accent); }
.bid-bar b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.bid-legend { display: flex; justify-content: space-between; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.bid-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bid-legend span i { width: 2px; height: 12px; background: var(--ink); display: inline-block; }
.bid-note { flex: 1 1 220px; min-width: 0; background: var(--bg); border-radius: 8px; padding: 16px 18px; font-size: 0.92rem; color: var(--stone); align-self: flex-start; }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: relative; }
.steps li::before { content: counter(step); display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; background: var(--maroon); color: var(--ivory); font-weight: 700; margin-bottom: 12px; }
.steps h3 { font-size: 1.15rem; margin-bottom: 6px; }
.steps p { font-size: 0.95rem; color: var(--stone); }

.solicitation { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 0; border-radius: var(--radius); padding: 22px 24px; }
.solicitation + .solicitation { margin-top: 12px; }
.solicitation > div { flex: 1 1 320px; min-width: 0; }
.solicitation dl { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 8px 0 0; font-size: 0.92rem; }
.solicitation dt { color: var(--muted); }
.solicitation dd { margin: 0; font-weight: 600; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 24px; margin: 0; display: flex; flex-direction: column; gap: 16px; background: var(--surface); }
.form legend { font-family: var(--serif); font-size: var(--h2-card); font-weight: 600; padding: 0 8px; margin-left: -8px; }
.form legend > h2 { font: inherit; line-height: 1.25; }   /* a section heading on the long application form, styled as the legend */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .label { font-weight: 700; font-size: 0.95rem; }
.field .hint { font-size: 0.85rem; color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-control); background: var(--bg); color: var(--ink); width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--accent); background: var(--invalid-bg); }
.field .error { color: var(--accent); font-size: 0.875rem; font-weight: 600; }
.field-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.choice { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; color: var(--stone); }
.choice input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.choices { display: flex; flex-wrap: wrap; gap: 10px 22px; }
/* follow-up questions that appear after an answer (data-show-when, see site.js) */
.form .follow-up { padding-left: 16px; border-left: 2px solid var(--line-strong); }
.field input[type="file"] { padding: 10px 12px; cursor: pointer; }
.field input[type="file"]::file-selector-button { font: inherit; font-size: 0.9rem; font-weight: 700; margin-right: 14px; padding: 8px 16px; border: 1.5px solid var(--ink); border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; transition: background-color .15s, color .15s; }
@media (hover: hover) and (pointer: fine) { .field input[type="file"]::file-selector-button:hover { background: var(--inverse); color: var(--on-inverse); } }
/* pay: an amount with a $ in front and an Annual/Hourly switch beside it */
.pay { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-amt { position: relative; flex: 1 1 130px; min-width: 0; }
.pay-amt > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.field .pay-amt input { padding-left: 28px; }
.seg { display: inline-flex; flex: none; border: 1px solid var(--line-control); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); }
.seg label { position: relative; display: flex; }
.seg label + label { border-left: 1px solid var(--line-control); }
.field .seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; padding: 0 14px; font-size: 0.9rem; font-weight: 600; color: var(--stone); transition: background-color .15s, color .15s; }
.seg input:checked + span { background: var(--maroon); color: var(--ivory); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }
.seg input:checked:focus-visible + span { outline-color: var(--parchment); }   /* on the maroon fill: ink on maroon is 1.3:1 */
@media (hover: hover) and (pointer: fine) { .seg label:hover input:not(:checked) + span { background: var(--sand); } }
/* in New Bid and Edit Project a switch stands as tall as the fields beside it */
.nb .seg span { min-height: 44px; padding: 0 18px; font-size: 0.95rem; }
@media (max-width: 520px) { .nb .nb-seg { display: flex; } .nb .nb-seg label { flex: 1 1 0; } .nb .seg span { width: 100%; justify-content: center; text-align: center; line-height: 1.2; } }
.nb-inline-check { display: flex; align-items: flex-end; }
.nb-inline-check .choice { min-height: 48px; align-items: center; }
.nb-inline-check .choice input { margin-top: 0; }
.req { color: var(--accent); }
.form-note { margin: 0 0 14px; font-size: 0.9rem; color: var(--stone); }
.form-status { border-radius: var(--radius); padding: 16px 18px; font-size: 0.95rem; }
.draft-note { margin-bottom: 18px; }
.draft-note .link-btn { padding: 0; }
.form-status--ok { background: var(--sand); color: var(--ink); border: 1px solid var(--line-strong); }
.form-status--warn { background: var(--surface); color: var(--ink); border: 2px solid var(--accent); }
.legal { font-size: 0.88rem; color: var(--stone); max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--bg); }
.legal p + p { margin-top: 10px; }
.repeat-block { border-top: 1px dashed var(--line-strong); padding-top: 16px; display: flex; flex-direction: column; gap: 16px; }
.repeat-block:first-of-type { border-top: 0; padding-top: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--maroon-deep); color: var(--parchment-soft); font-size: 0.95rem; }
.site-footer a { color: var(--parchment-soft); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .site-footer a:hover { color: var(--paper); text-decoration: underline; } }
.footer-top { display: flex; flex-wrap: wrap; gap: 40px 48px; padding-block: 60px 40px; }
.footer-brand { flex: 1 1 300px; min-width: 0; }
.footer-brand img { width: min(100%, 296px); height: auto; display: block; }
.footer-brand img.logo-v { width: min(100%, 270px); }
.footer-legal a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }   /* links inside the copyright line need more than colour to stand out */
.footer-legal .footer-flag { display: inline-block; height: 14px; width: auto; margin-right: 10px; vertical-align: -2px; border-radius: 1px; box-shadow: 0 0 0 1px rgba(251, 247, 238, 0.35); }
.footer-brand p { margin-top: 18px; max-width: 34ch; }
.footer-social { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 18px; font-weight: 600; }
.footer-col { flex: 1 1 160px; min-width: 0; }
.footer-sub { margin-top: 28px; }
/* the link lists sit in one Footer landmark; on wide screens they read as plain columns */
.footer-nav { flex: 3 1 520px; min-width: 0; display: flex; flex-wrap: wrap; gap: 40px 48px; }
.footer-nav summary { list-style: none; cursor: default; }
.footer-nav summary::-webkit-details-marker { display: none; }
/* phones: each list folds under its heading (site.js closes them), Offices stays open */
@media (max-width: 43.6875em) {
  .footer-top { row-gap: 0; }
  .footer-brand { margin-bottom: 28px; }
  .footer-nav { flex-basis: 100%; flex-direction: column; gap: 0; }
  .footer-nav .footer-col { flex: none; }
  .footer-nav details { border-bottom: 1px solid rgba(239, 225, 190, 0.18); }
  .footer-nav .footer-sub { margin-top: 0; }
  .footer-nav summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; cursor: pointer; }
  .footer-nav summary h2 { margin: 0; }
  .footer-nav summary::after { content: ""; width: 8px; height: 8px; margin-right: 4px; border-right: 2px solid var(--parchment); border-bottom: 2px solid var(--parchment); transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
  .footer-nav details[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
  .footer-nav details ul { padding-bottom: 14px; }
  .footer-offices { flex-basis: 100%; margin-top: 28px; }
}
.footer-col h2 { font-family: var(--sans); font-size: 1rem; color: var(--ivory); font-weight: 700; margin-bottom: 10px; }
.footer-col ul { list-style: none; padding: 0; line-height: 2; }
.footer-bottom { border-top: 1px solid #6E1A1A; }
.footer-bottom .wrap { display: flex; flex-wrap: wrap; gap: 10px 32px; justify-content: space-between; padding-block: 22px 28px; font-size: 0.86rem; color: #D9C4AE; }
.footer-bottom strong { color: var(--parchment); }
.site-footer { padding-bottom: env(safe-area-inset-bottom, 0px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .toc, .filters, .drawer { display: none !important; }
  body { background: #fff; }
}

/* ---------- project photos (galleries) ---------- */
.gallery-card .media-img { position: relative; }
.gallery-card .photo-label { top: 12px; left: 12px; }
.gallery-card .meta span { display: inline-flex; align-items: center; gap: 6px; }
.gallery-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--stone); font-weight: 600; margin-top: 6px; }
.gallery-facts span { display: inline-flex; align-items: center; gap: 7px; }
.gallery-facts svg { color: var(--accent); }
.updates { display: flex; flex-direction: column; gap: 14px; }
.update { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 120px; }
.update > summary { list-style: none; cursor: pointer; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 20px; padding: 18px 22px; border-radius: var(--radius); }
.update > summary::-webkit-details-marker { display: none; }
.update-title { flex: 1 1 260px; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.update-label { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
.update-sub { color: var(--stone); font-weight: 600; }
.update-count { color: var(--muted); font-size: 0.92rem; white-space: nowrap; }
.update-chev { color: var(--accent); transition: transform .2s; flex: none; margin-left: auto; }
.update[open] .update-chev { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) { .update > summary:hover .update-label { color: var(--accent); } }
.update-body { padding: 0 22px 22px; display: flex; flex-direction: column; gap: 18px; }
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr)); }
.photo-grid a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-sm); background: var(--sand); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
@media (hover: hover) and (pointer: fine) { .photo-grid a:hover img { transform: scale(1.04); } }
/* stitched drone panoramas run the full width of the grid at their own shape instead of being cut into a tile */
.photo-grid .pano { grid-column: 1 / -1; }
.photo-grid .pano a { aspect-ratio: auto; }
.photo-grid .pano img { height: auto; }
@media (hover: hover) and (pointer: fine) { .photo-grid .pano a:hover img { transform: none; } }
.video-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 8px; overflow: hidden; background: #1B1714; cursor: pointer; color: var(--ivory); font: inherit; }
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.88; }
.yt-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 68px; height: 68px; border-radius: 50%; background: var(--maroon); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); transition: background .15s; }
.yt-play svg { margin-left: 4px; }
.yt:focus-visible .yt-play { background: var(--maroon-deep); }
@media (hover: hover) and (pointer: fine) { .yt:hover .yt-play { background: var(--maroon-deep); } }
.yt-label { position: absolute; left: 12px; bottom: 12px; background: rgba(27, 23, 20, 0.8); font-size: 0.85rem; font-weight: 600; padding: 4px 11px; border-radius: 4px; }
.yt-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-link { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; padding: 14px 18px; background: var(--sand); border-radius: 8px; text-decoration: none; }
.gallery-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 28px; }

/* photo viewer */
.lightbox { padding: 0; border: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: rgba(18, 14, 12, 0.97); color: #fff; }
.lightbox::backdrop { background: rgba(18, 14, 12, 0.9); }
.lightbox[open] { display: flex; flex-direction: column; }
.lb-top { display: flex; align-items: center; gap: 16px; padding: max(12px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); }
.lb-caption { flex: 1 1 auto; min-width: 0; font-size: 0.95rem; color: #E9E1D4; }
.lb-stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 72px max(16px, env(safe-area-inset-bottom, 0px)); }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; touch-action: pan-y pinch-zoom; }
.lb-btn { background: rgba(255, 255, 255, 0.12); border: 0; color: #fff; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; }
@media (hover: hover) and (pointer: fine) { .lb-btn:hover { background: rgba(255, 255, 255, 0.24); } }
.lb-btn:focus-visible { outline: 3px solid var(--parchment); outline-offset: 2px; }
/* Download (site.js): the photo with the watermark */
.lb-dl { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.12); color: #fff; font: inherit; font-size: 0.95rem; font-weight: 700; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .lb-dl:hover { background: rgba(255, 255, 255, 0.24); } }
.lb-dl:focus-visible { outline: 3px solid var(--parchment); outline-offset: 2px; }
.lb-dl[aria-busy="true"] { opacity: 0.6; cursor: progress; }
.lb-msg { margin: 0; font-size: 0.9rem; color: #F4D9A8; }
/* the site's photos aren't saved or opened from the page (site.js): a right-click or a press goes to
   what's around a photo (its link, the page), never the photo; a phone's long-press menu is off on
   photos and on links to them */
img[src^="/uploads/"]:not(.lb-img) { pointer-events: none; }
img[src^="/uploads/"], a[data-lightbox] { -webkit-touch-callout: none; -webkit-user-drag: none; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: max(10px, env(safe-area-inset-left, 0px)); }
.lb-next { right: max(10px, env(safe-area-inset-right, 0px)); }
@media (max-width: 640px) {
  .lb-stage { padding: 0 0 calc(76px + env(safe-area-inset-bottom, 0px)); }
  .lb-prev, .lb-next { top: auto; bottom: max(14px, env(safe-area-inset-bottom, 0px)); transform: none; background: rgba(255, 255, 255, 0.16); }
  .lb-prev { left: calc(50% - 60px); } .lb-next { right: calc(50% - 60px); }
  .lb-dl { width: 48px; height: 48px; padding: 0; justify-content: center; }      /* the icon alone; "Download" stays its name */
  .lb-dl span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .update > summary { padding: 16px 18px; }
  .update-body { padding: 0 14px 16px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 6px; }
}

/* ---------- layout audit fixes ---------- */
.m-only { display: none; }
/* header: keep the button on one line; drop the phone number where space is tight */
.header-cta { white-space: nowrap; }
/* six menu items: the phone number moves to the bar above until the header is wide enough for it,
   and the items sit closer together on smaller laptop screens */
.nav-label { white-space: nowrap; }

@media (min-width: 68.75em) and (max-width: 77.4375em) {
  .site-header .bar { column-gap: 16px; }
  .primary-nav > a, .nav-trigger { padding-inline: 9px; }
}
/* links with arrows may wrap (the arrow stays with its last word) */
.more { white-space: normal; }
/* long words and addresses never push past their box */
.prose { overflow-wrap: break-word; }
.prose a { overflow-wrap: anywhere; }
.person > div { min-width: 0; }
.person b, .person span { overflow-wrap: break-word; }
.person a.email { overflow-wrap: anywhere; font-size: 0.9rem; }
aside .person { gap: 14px; align-items: flex-start; }
aside .person .avatar { width: 56px; height: 56px; }
aside .person .avatar--initials { font-size: 1.15rem; }
/* comfortable reading line lengths */
.post-row p, .card p, .legal p, fieldset > p.muted { max-width: 70ch; }
/* home: news cards without photos */
.media-card--text .media-body { padding-top: 24px; }
/* footer: wrapped link lines sit closer than separate links */
.footer-col ul { line-height: 1.35; display: flex; flex-direction: column; gap: 9px; }
/* bid results: money columns wide enough for $3,391,504.50, and wider for an amount that needs it;
   full bidder names */
.bids-head, .bid-main { grid-template-columns: 104px minmax(0, 2.3fr) minmax(136px, max-content) minmax(0, 1.4fr) 118px 48px 52px; }
.bid-lowname { white-space: normal; overflow: visible; text-overflow: clip; }
@media (max-width: 860px) {
  .table-box { overflow: visible; border: 0; background: transparent; }
  .bids { min-width: 0; }
  .bids-head { display: none; }
  .bids ul { display: flex; flex-direction: column; gap: 12px; }
  .bid { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .bid-main { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "date tog" "proj proj" "low low" "delta delta" "est n"; gap: 8px 12px; padding: 16px 16px 14px; }
  .bid-main .r { text-align: left; }
  .c-date { grid-area: date; align-self: center; }
  .c-date .d-only { display: none; }
  .c-proj { grid-area: proj; }
  .c-est { grid-area: est; font-size: 0.9rem; color: var(--stone); }
  .c-est::before { content: attr(data-label) ": "; color: var(--muted); }
  .c-low { grid-area: low; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .c-low .bid-low { font-size: 1.15rem; }
  .c-delta { grid-area: delta; }
  .c-n { grid-area: n; text-align: right !important; font-size: 0.9rem; color: var(--stone); }
  .c-tog { grid-area: tog; }
  .m-only { display: inline; }
  .bid-detail { padding: 0 16px 18px; }
  .bid-detail ol { flex-basis: 100%; }
  .bid-detail li { grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "rank name amt" "rank bar bar"; gap: 4px 10px; }
  .bid-detail li.bid-legend { display: flex !important; }
  .bid-detail .rank { grid-area: rank; }
  .bid-detail .name { grid-area: name; }
  .bid-detail .bid-bar { grid-area: bar; }
  .bid-detail li > .money { grid-area: amt; }
}
/* phones: two-up figures, compact cards with the photo beside the text */
@media (max-width: 560px) {
  .proof { display: grid; grid-template-columns: 1fr 1fr; }
  .proof > div, .proof > div:first-child { border: 0; border-top: 1px solid var(--line); padding: 18px 12px 18px 0; }
  .proof > div:nth-child(-n+2) { border-top: 0; }
  .proof b { font-size: 2.2rem; }
  .grid > .media-card .media-img { aspect-ratio: 16 / 9; }
  /* the photo beside the text, until the text is too big to share the width (larger text sizes):
     then the card wraps and the photo goes on top */
  .office { flex-direction: row; flex-wrap: wrap; }
  .office .office-img { flex: 1 1 7em; aspect-ratio: auto; min-height: 8em; }
  .office .office-body { flex: 999 1 12em; padding: 16px; }
  /* the contact box's photo goes too: the words and buttons are what it's for */
  .cta-band .cta--photo .cta-img { display: none; }
  .cta-band .cta--photo .cta-body { padding: 20px; }
  .office h3 { font-size: 1.2rem; }
}
.quality-mark { width: min(100%, 260px); height: auto; display: block; margin: 0 auto 4px; }
.more-projects { margin-top: clamp(40px, 5vw, 64px); }
/* a project's photos (project.html): below the write-up and the side column, the page's width */
.project-photos { margin-top: clamp(40px, 5vw, 64px); scroll-margin-top: 110px; }
.project-photos > h2 { font-size: var(--h2-section); margin-bottom: 8px; }
.project-photos > .gallery-facts { margin: 0 0 22px; align-items: center; }
.project-photos .gallery-foot { margin-top: 20px; }
.more-projects .grid--n1 { max-width: 400px; }
.more-projects .grid--n2 { max-width: 820px; }
.contact-main { max-width: 820px; }
/* Contact: the form with the offices beside it (wide screens) or below it */
.contact-cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 48px); align-items: start; }
.contact-cols .contact-main { max-width: none; }
.contact-offices { display: flex; flex-direction: column; gap: 16px; }
.contact-offices h2 { font-size: var(--h2-section); }
.contact-offices .office-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
@media (min-width: 1000px) {
  .contact-offices .office { flex-direction: row; }
  .contact-offices .office .office-img { flex: 0 0 38%; aspect-ratio: auto; }
  .contact-offices .office .office-body { padding: 16px 18px; }
  .contact-offices .office h3 { font-size: 1.2rem; }
}
@media (max-width: 999px) { .contact-cols { grid-template-columns: minmax(0, 1fr); } }
/* .grid--balance: a short showcase grid (the ten services) whose last row is centred instead of
   leaving one or two cards hanging on the left. Three across on wide screens, two on tablets;
   each card spans two of six (or four) narrow tracks so a lone card can sit in the middle. */
/* short rows stretch instead of leaving an empty slot */
.grid--fit { grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 320px)), 1fr)); }
/* ---------- things that stay in view while the page scrolls ----------
   .stick: a sidebar (or the Contact page's offices) beside a longer column stays just under the header
   (site.js sets --stick-top). A column taller than the room left in the window (site.js adds
   .stick--scroll) is held to that height, with no scrollbar: its cards move with the page as it
   scrolls and fade out at the column's edges, so they never slide under the header. The contact form isn't boxed in like that:
   when it doesn't fit (.stick--off) it scrolls with the page. Only when the columns sit side by side. */
@media (min-width: 1000px) {
  :is(.content-layout, .contact-cols, .survey-cols) > .stick { position: sticky; top: var(--stick-top, 112px); }
  :is(.content-layout, .contact-cols, .survey-cols) > .stick.stick--scroll { max-height: calc(100vh - var(--stick-top, 112px) - 4px); overflow-y: auto;
    padding: 4px; margin: -4px;   /* room for focus rings and the hover lift */
    scrollbar-width: none; }
  :is(.content-layout, .contact-cols, .survey-cols) > .stick.stick--scroll::-webkit-scrollbar { display: none; }
  :is(.content-layout, .contact-cols, .survey-cols) > .stick.has-above { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 36px); mask-image: linear-gradient(to bottom, transparent, #000 36px); }
  :is(.content-layout, .contact-cols, .survey-cols) > .stick.has-below { -webkit-mask-image: linear-gradient(to top, transparent, #000 36px); mask-image: linear-gradient(to top, transparent, #000 36px); }
  :is(.content-layout, .contact-cols, .survey-cols) > .stick.has-above.has-below { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to bottom, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
  :is(.content-layout, .contact-cols, .survey-cols) > .stick.stick--scroll > * { flex-shrink: 0; }
  :is(.content-layout, .contact-cols, .survey-cols) > .stick.stick--off { position: static; }
}
/* Search and filter bars on long lists stay under the header, and the bid results column
   headings stay above the rows. site.js keeps --sticky-head (the stuck header's height; not
   --header-h, which the mobile menu uses for the header's bottom edge) and --filters-h up to date. */
@media (min-width: 1000px) and (min-height: 640px) {
  .filters { position: sticky; top: var(--sticky-head, 84px); z-index: 20; padding-block: 12px; margin-block: -12px 10px; overflow-anchor: none; }   /* the bar folding or opening mustn't make the browser scroll to make up for it */
  .filters::before { content: ""; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw); background: var(--band-bg, var(--bg)); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
  .filters.is-stuck::before { border-bottom-color: var(--line); box-shadow: 0 8px 16px -14px rgba(27, 23, 20, 0.35); }
  /* While the bar is stuck, an empty search folds down to its magnifier (.is-folded, set by
     site.js), so the bar takes one row; clicking or tabbing to it opens it again, and it stays open
     while it holds a search. site.js keeps the room below the bar the same, so the list doesn't
     move when it folds or opens. */
  .filters.is-folded .filter-search { flex: 0 0 48px; max-width: 48px; }
  .filters.is-folded .filter-search input { padding: 12px 0 12px 46px; cursor: pointer; }
  .filters.is-folded .filter-search input::placeholder { color: transparent; }
  .filters.is-folded .filter-search svg { left: 13px; }
  @media (hover: hover) and (pointer: fine) { .filters.is-folded .filter-search input:hover { border-color: var(--accent); background-color: var(--sand); } }
}
.band-sand { --band-bg: var(--sand); }
@media (min-width: 68.75em) and (min-height: 640px) {
  .table-box--bids { overflow: clip; }     /* the table fits here; clip (not scroll) lets the headings stick */
  .table-box--bids .bids-head { position: sticky; top: calc(var(--sticky-head, 84px) + var(--filters-h, 77px)); z-index: 5; border-bottom: 1px solid var(--line); }
}
/* news rows without a photo show the date instead of a placeholder */
.post-row .thumb--date { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--sand); color: var(--accent); line-height: 1; }
.post-row .thumb--date span { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.post-row .thumb--date b { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; margin-top: 4px; }
@media (max-width: 520px) { .post-row .thumb--date b { font-size: 1.5rem; } }
/* testimonials of very different lengths: column flow, no empty card space */
/* ---------- testimonials: whole notes set as text, not boxes ----------
   References: the first one large, the rest in two columns divided by rules; in each, the line
   that sums it up (`highlight` in references.yml) is maroon. Home page: three short excerpts. */
.t-lead { margin: 0 0 clamp(36px, 5vw, 56px); display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(14px, 2.5vw, 28px); max-width: 1000px; }
.t-mark { grid-row: span 2; font-family: var(--serif); font-size: clamp(4.5rem, 3.6rem + 4vw, 7.5rem); line-height: 0.85; color: var(--accent); }
.t-lead blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.28rem, 1.08rem + 0.8vw, 1.7rem); line-height: 1.45; color: var(--ink); }
.t-lead .t-by { margin-top: 22px; }
.t-hl { color: var(--accent); font-weight: 600; }
.t-by { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; color: var(--stone); line-height: 1.35; }
.t-by strong { display: block; color: var(--ink); }
.t-mono { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--maroon); color: var(--ivory); display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 0.98rem; letter-spacing: 0.03em; }
.t-list { columns: 2 380px; column-gap: clamp(32px, 5vw, 64px); }
.t-item { break-inside: avoid; margin: 0; padding: 24px 0 30px; border-top: 1px solid var(--line-strong); display: flex; flex-direction: column; gap: 16px; }
.t-item blockquote { margin: 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.55; color: var(--stone); }
.t-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 0 clamp(28px, 4vw, 48px); }
/* the home page's three quotes: three across, or two where only two fit (the third left out), as
   in the rows of three cards; one above another on phones */
.t-quotes { container: quotes / inline-size; }
@container quotes (min-width: 588px) { .t-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container quotes (min-width: 588px) and (max-width: 935.98px) { .t-row > :nth-child(3) { display: none; } }
@container quotes (min-width: 936px) { .t-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.t-item--short { border-top: 2px solid var(--accent); padding-top: 20px; }
.t-item--short blockquote { font-size: 1.3rem; line-height: 1.42; color: var(--ink); }
.t-item--short blockquote::before { content: "“"; display: block; font-size: 2.8rem; line-height: 0.62; color: var(--accent); margin-bottom: 2px; }
.t-item--short .t-by { margin-top: auto; }
.masonry { columns: 3 320px; column-gap: 24px; }
.masonry > * { break-inside: avoid; margin: 0 0 24px; display: block; }
.masonry .quote { height: auto; }
.tag { line-height: 1.35; }
/* team: two people per row on phones (portraits are 231 px originals) */
@media (max-width: 560px) {
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .member b { font-size: 1rem; }
  .member span.role { font-size: 0.86rem; }
}

/* ---------- contact cards, scroll lock, header indicator ---------- */
.btn--sm { min-height: 40px; padding: 8px 14px; gap: 8px; font-size: 0.92rem; border-width: 1.5px; }
.btn--block { width: 100%; }
.contact { display: flex; flex-direction: column; gap: 14px; }
.contact + .contact { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
/* a team (a service page's contact_team): its people, a line between them halfway, then one Email Our Team button */
.contact--team .person + .person { margin-top: 0; padding-top: 14px; }
.contact--team > .btn { margin-top: 4px; }
/* a project under two or more service areas: each area's people under its name (project.html) */
.side-team { margin: 0 0 12px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.contact + .side-team { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-strong); }
.person .btn { margin-top: 10px; font-size: 0.88rem; }
/* nothing behind an open pop-up scrolls */
/* Lock the page by hiding the viewport's overflow only. Hiding body's overflow as well turned body into
   its own scroll box, and the sticky header then stuck to the top of the page instead of the screen,
   vanishing while a pop-up was open. The stable gutter stops the page shifting when the scrollbar goes. */
html { scrollbar-gutter: stable; }
html.scroll-lock { overflow: hidden; }
.lightbox, .search-dialog, .search-results, .drawer, .mega { overscroll-behavior: contain; }
/* current section: a straight bar under the label only */
.primary-nav > a[aria-current="page"], .nav-trigger.is-current { box-shadow: none; }
.nav-label { position: relative; }
.nav-label::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 1px;
  background: var(--parchment); transform: scaleX(0); transition: transform .2s ease;
}
.primary-nav > a[aria-current="page"] .nav-label::after, .nav-trigger.is-current .nav-label::after { transform: scaleX(1); }
.person span { line-height: 1.45; margin-top: 2px; }
/* badges and chips share a row: same height, text centred */
.chips { align-items: center; }
.badge { display: inline-flex; align-items: center; justify-content: center; }
.chips .badge { min-height: 30px; padding: 4px 12px; }
.tag { text-wrap: balance; }
/* a single related card sits beside its photo instead of filling the row with a giant image */
@media (min-width: 640px) {
  .grid--fit > .media-card:only-child { flex-direction: row; }
  .grid--fit > .media-card:only-child .media-img { flex: 0 0 44%; aspect-ratio: auto; min-height: 200px; }
  .grid--fit > .media-card:only-child .media-body { justify-content: center; padding: 24px 28px; }
  .grid--fit > .media-card:only-child p { max-width: 60ch; }
}

/* ---------- icons: Phosphor duotone, the soft half in parchment ---------- */
.icon .duo { fill: var(--parchment); opacity: 1; }
.yt-play svg { margin-left: 0; }

/* ---------- motion ----------
   Everything here is decoration: content is visible without it, site.js adds the
   reveal classes itself, and visitors who ask for reduced motion get none of it. */
.card--link, .media-card { transition: transform .25s var(--ease-out), box-shadow .25s, border-color .15s; }
@media (hover: hover) and (pointer: fine) { .card--link:hover, .media-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(27, 23, 20, 0.10); } }
.btn { transition: background-color .15s, color .15s, border-color .15s, transform .15s; }
.btn:active { transform: scale(.97); }
.arr { display: inline-block; transition: transform .2s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  a:hover .arr { transform: translateX(3px); }
  a:hover .arr--back { transform: translateX(-3px); }
}
.btn svg[data-i="arrow"] { transition: transform .2s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .btn:hover svg[data-i="arrow"] { transform: translateX(3px); } }
.chip, .filter-chips button, .icon-btn, .primary-nav > a, .nav-trigger,
.adm-nav a, .adm-tile, .ebid-dl, .ebid-dlg-close, .li-btn, .nb-cal-nav, .nb-cal-month button, .bid-toggle, .adm-mail summary { transition: background-color .15s, color .15s, border-color .15s; }
.bid-toggle svg { transition: transform .15s var(--ease-out); }
.site-header { transition: box-shadow .25s; }
.site-header.is-scrolled { box-shadow: 0 8px 24px rgba(27, 23, 20, 0.2); }

@keyframes kem-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes kem-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kem-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  /* page openings: text, then the photo, then the maroon swoosh sweeps in */
  .motion .hero > *, .motion .page-hero > * { animation: kem-rise .75s var(--ease-out) both; }
  .motion .hero > :nth-child(2), .motion .page-hero > :nth-child(2) { animation-delay: .12s; }
  .motion .hero > :nth-child(n+3), .motion .page-hero > :nth-child(n+3) { animation-delay: .22s; }
  /* menus and pop-ups */
  .mega, .drawer { transition: opacity .2s var(--ease-out), transform .2s var(--ease-out); }
  @starting-style { .mega:not([hidden]), .drawer:not([hidden]) { opacity: 0; transform: translateY(-8px); } }
  .search-dialog[open] { animation: kem-pop .22s var(--ease-out); }
  .search-dialog[open]::backdrop, .lightbox[open]::backdrop, .lightbox[open] { animation: kem-fade .22s ease-out; }
  /* "See who" pop-ups rise in as Search does, names and all, and close at once */
  .who-dialog[open] { animation: kem-pop .22s var(--ease-out); }
  .who-dialog[open]::backdrop { animation: kem-fade .22s ease-out; }
  .lb-img { transition: opacity .25s ease; }
  .lb-img.is-loading { opacity: 0; }
  /* scroll reveals and late-loading photos (classes added by site.js) */
  .rv { opacity: 0; transform: translateY(24px); transition: opacity .42s var(--ease-out), transform .42s var(--ease-out); transition-delay: var(--rv-delay, 0s); }
  .rv.is-in { opacity: 1; transform: none; }
  .fade-img { opacity: 0; transition: opacity .3s var(--ease-out); }
  .fade-img.is-loaded { opacity: 1; }
  .nav-label::after { transition: transform .25s var(--ease-out); }
}
/* photo updates and mobile menu sections slide open (250 ms) and shut (200 ms) where the browser can animate it */
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    .updates, .drawer { interpolate-size: allow-keywords; }
    .update::details-content, .drawer details::details-content { block-size: 0; overflow-y: clip; transition: block-size .2s var(--ease-out), content-visibility .2s allow-discrete; }
    .update[open]::details-content, .drawer details[open]::details-content { block-size: auto; transition-duration: .25s; }
  }
}
/* moving between public pages: a quick cross-fade of the whole page, every part of it 220 ms
   (base.html turns it off on the staff and bid pages) */
@view-transition { navigation: auto; }
::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation-duration: .22s; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
@media print { .rv, .fade-img { opacity: 1 !important; transform: none !important; } }
/* icon + text links: the underline starts at the text, not at a leading space */
.office .links a, .gallery-facts a { display: inline-flex; align-items: center; gap: 6px; }
/* footer: social networks as round icon buttons */
.footer-social { gap: 10px; }
.social-btn { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(255, 255, 255, 0.08); color: var(--parchment-soft); transition: background-color .15s, color .15s; }
@media (hover: hover) and (pointer: fine) { .site-footer a.social-btn:hover { background: var(--parchment); color: var(--maroon-deep); text-decoration: none; } }
/* service cards: the whole card is the link; specialties are chosen on the service page */
.svc-more { color: var(--accent); font-weight: 700; font-size: 0.95rem; }
/* home page What We Do: the services as a list beside one service at a time, shown with the
   photo of its best project */
.svc-x { display: grid; grid-template-columns: minmax(230px, 290px) minmax(0, 1fr); gap: 28px; align-items: stretch; }
.svc-x-tabs { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.svc-x-tab { display: flex; align-items: center; gap: 12px; padding: 11px 14px 11px 12px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent;
  color: var(--ink); font-weight: 600; line-height: 1.25; text-decoration: none; }
.svc-x-tab .icon { flex: none; color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .svc-x-tab:hover { background: var(--sand); color: var(--ink); } }
.svc-x-tab[aria-selected="true"], .svc-x-tab[aria-current="true"] { background: var(--surface); border-left-color: var(--accent); color: var(--accent); }
.svc-x-tab:focus-visible { outline-offset: -3px; }
.svc-x-panel { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.svc-x-panel[hidden] { display: none; }
/* With JavaScript (site.js adds .is-tabs) the panels sit on top of each other, so the section
   keeps one height, and the chosen one fades in over the last (220 ms). The last stays under it
   until then, so the photos dissolve into each other, but its words fade out in 120 ms, so the
   two are never both readable. The See Projects & Details button is in the same spot in every
   panel, so it doesn't fade: it stays put while the rest changes around it (the card's white and
   its edge are on the stage, under the panels, so a panel fading in doesn't cover the one under it
   with white). Chosen with the arrow keys, Home or End, they switch at once (.is-instant,
   site.js). It only changes opacity, so visitors who ask for less motion see it too: !important
   gets it past the reduced-motion rule after the footer styles, which stops every other
   transition for them. Panels not shown (.is-off) stay out of reach of the keyboard and screen
   readers (visibility: hidden). */
.svc-x.is-tabs .svc-x-stage { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.svc-x.is-tabs .svc-x-panel { grid-area: 1 / 1; background: none; border: 0; border-radius: 0; }
.svc-x.is-tabs .svc-x-panel.is-off { visibility: hidden; z-index: 0; transition: visibility 0s linear .22s !important; }
.svc-x.is-tabs .svc-x-panel:not(.is-off) { z-index: 1; transition: visibility 0s !important; }
.svc-x.is-tabs .svc-x-panel > .svc-x-photo, .svc-x.is-tabs .svc-x-text > :not(.btn) { transition: opacity .22s ease-out !important; }
.svc-x.is-tabs .svc-x-panel.is-off > .svc-x-photo { opacity: 0; transition: opacity 0s linear .22s !important; }
.svc-x.is-tabs .svc-x-panel.is-off .svc-x-text > :not(.btn) { opacity: 0; transition: opacity .12s ease-out !important; }
.svc-x.is-tabs.is-instant .svc-x-panel, .svc-x.is-tabs.is-instant .svc-x-panel > .svc-x-photo, .svc-x.is-tabs.is-instant .svc-x-text > * { transition: none !important; }
@media (prefers-reduced-motion: no-preference) {
  .svc-x.is-tabs .svc-x-photo img { transition: opacity .4s ease; }
}
/* a photo still on its way in fades up when it arrives instead of popping in */
.svc-x-photo img.is-loading { opacity: 0; }
.svc-x-photo { position: relative; margin: 0; min-height: 380px; background: var(--sand); }
.svc-x-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.svc-x-photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 14px; background: linear-gradient(to top, rgba(27, 23, 20, 0.78), rgba(27, 23, 20, 0)); font-size: 0.92rem; }
.svc-x-photo figcaption a { color: #fff; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.5); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .svc-x-photo figcaption a:hover { text-decoration-color: #fff; } }
.svc-x-credit { display: block; margin-top: 3px; font-size: 0.78rem; color: rgba(255, 255, 255, 0.82); }
.svc-x-text { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 28px 28px 30px; }
.svc-x-text h3 { font-size: 1.6rem; margin: 0; }
.svc-x-text p { margin: 0; color: var(--stone); }
/* the specialties: a ruled list of links, like the specialty list beside each service page */
.svc-x-subs { list-style: none; margin: 4px 0 8px; padding: 0; width: 100%; border-top: 1px solid var(--line); }
.svc-x-subs li { border-bottom: 1px solid var(--line); }
.svc-x-subs a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 2px; font-size: 0.95rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.svc-x-subs a::after { content: ""; flex: none; width: 7px; height: 7px; margin-right: 3px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); transform: rotate(45deg); }
@media (hover: hover) and (pointer: fine) {
  .svc-x-subs a:hover { color: var(--accent); }
  .svc-x-subs a:hover::after { transform: translateX(3px) rotate(45deg); }
}
@media (prefers-reduced-motion: no-preference) { .svc-x-subs a::after { transition: transform .15s ease; } }
.svc-x-text .btn { margin-top: auto; }
@media (max-width: 1180px) {
  .svc-x-panel { grid-template-columns: 1fr; }
  .svc-x-photo { min-height: 0; aspect-ratio: 16 / 9; }
}
/* Phones: too narrow for a list beside a panel, so What We Do is the list of all ten services,
   each opening its own page (site.js leaves them as plain links at this width). Before, the
   services were one sideways-scrolling row whose first name filled the screen, hiding the rest. */
@media (max-width: 760px) {
  .svc-x { grid-template-columns: 1fr; gap: 0; }
  .svc-x .svc-x-stage, .svc-x.is-tabs .svc-x-stage { display: none; }
  .svc-x-tab { min-height: 54px; padding: 12px 4px; border-left: 0; }
  .svc-x-tab::after { content: ""; flex: none; width: 8px; height: 8px; margin: 0 6px 0 auto; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); transform: rotate(45deg); }
  .svc-x-tab[aria-current="true"] { background: none; color: var(--ink); }
  .svc-x-tab:active { background: var(--sand); }
  @media (hover: hover) and (pointer: fine) { .svc-x-tab:hover { background: var(--sand); } }
}
/* funding programs: cards in two balanced columns, the key figure in bold */
.program-grid { columns: 2 300px; column-gap: 18px; }
.program-card { break-inside: avoid; margin: 0 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.program-card h3 { font-size: 1.2rem; }
.program-card p { color: var(--stone); font-size: 0.95rem; }
.program-card p.program-fact { color: var(--accent); font-weight: 700; font-size: 1rem; line-height: 1.35; }
.program-link { font-weight: 700; font-size: 0.92rem; display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; }
.program-index ul { list-style: none; padding: 0; margin: 0; color: var(--stone); font-size: 0.93rem; display: flex; flex-direction: column; gap: 4px; }
.program-index li { padding-left: 16px; position: relative; }
.program-index li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--parchment-soft); }
.program-index .svc-more { margin-top: auto; padding-top: 10px; }
/* checklists in page text (build.py decides which lists): one item per row with a hairline
   between rows; two columns when every item is short */
.prose ul.checklist { list-style: none; padding: 0; margin-top: 1.1em; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 36px; }
.prose ul.checklist--two { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.prose ul.checklist li { position: relative; margin: 0; padding: 11px 0 11px 34px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 500; line-height: 1.45; }
.prose ul.checklist li::before {
  content: ""; position: absolute; left: 0; top: 10px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--parchment) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23660000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4 4 9-9'/%3E%3C/svg%3E") center / 13px no-repeat;
}
/* a heading with its checklist ("What we do"): one panel, ruled in maroon like the
   prequalification card on the Qualifications page */
/* a boxed list in page text (ODOT prequalification, compensation and benefits): a plain card, its heading in the accent */
.prose .scope { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 28px 8px; margin-top: 1.8em; max-width: none; }
.prose .scope + * { margin-top: 1.6em; }
.prose .scope > h2, .prose .scope > h3 { margin-top: 0; color: var(--accent); }
.prose .scope > h2 { font-size: var(--h2-card); }
.prose .scope > p { margin-top: 8px; }
.prose .scope ul.checklist { margin-top: 14px; }
@media (max-width: 600px) { .prose .scope { padding: 18px 18px 6px; } }
/* a service page's Details: its card runs the column's full width, like the grids above and below
   it; the text keeps to the reading width */
.prose--full { max-width: none; }
.prose--full > :not(.scope) { max-width: 56ch; }
.prose .gallery { gap: 12px; }
.prose .gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
/* a hero is followed directly by page content: no double gap */
.page-hero + .wrap.section { padding-top: clamp(8px, 2vw, 24px); }
.prose--intro p { font-size: 1.08rem; color: var(--ink); }
.eyebrow-links { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.eyebrow-links a { color: var(--accent); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .eyebrow-links a:hover { text-decoration: underline; } }
.eyebrow-links span { color: var(--line-strong); }
/* a project's services, in a line that wraps like text: each dot stays at the end of the line
   with the service before it, so a new line never starts with one */
.eyebrow-trail a { color: var(--accent); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .eyebrow-trail a:hover { text-decoration: underline; } }
.eyebrow-trail .sep { color: var(--line-strong); padding-right: 6px; }
/* small photos in page text float beside it, alternating sides */
.prose .prose-photo { margin: 0.35em 0 1em; max-width: min(46%, 340px); clear: both; }
.prose .prose-photo img { width: auto; max-width: 100%; height: auto; }
.prose .prose-photo--right { float: right; margin-left: 28px; }
.prose .prose-photo--left { float: left; margin-right: 28px; }
.prose h2, .prose h3, .prose .gallery { clear: both; }
.prose p.photo-start { clear: both; }
.prose img.prose-photo { width: auto; height: auto; }
.prose::after { content: ""; display: block; clear: both; }
@media (max-width: 560px) {
  .prose .prose-photo { float: none; max-width: 100%; margin: 1em 0; }
}
.prose > :first-child { margin-top: 0; }

@media (max-width: 560px) { .prose .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }

/* ---------- services menu: service lines first, specialties beneath ---------- */
/* Services menu: ten service lines in balanced newspaper columns (alphabetical down each
   column), with the "not sure" box as a strip underneath, so the menu fits a 1280 x 720 screen */
.mega--services .wrap { display: block; padding-block: 16px 14px; }
.mega-svcs { columns: 4 220px; column-gap: 28px; }
.mega-svc { min-width: 0; break-inside: avoid; padding-bottom: 13px; }
.mega a.mega-svc-head { display: flex; align-items: center; gap: 12px; padding: 5px 10px 5px 5px; margin: -5px 0 0 -5px; border-radius: 10px; color: var(--ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .mega a.mega-svc-head:hover { background: var(--sand); } }
.mega-svc-icon { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--sand); display: grid; place-items: center; transition: background-color .15s; }
.mega-svc-icon svg { width: 21px; height: 21px; }
@media (hover: hover) and (pointer: fine) { .mega a.mega-svc-head:hover .mega-svc-icon { background: var(--surface); } }
.mega-svc-title { font-family: var(--serif); font-size: 1.06rem; font-weight: 600; line-height: 1.2; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .mega a.mega-svc-head:hover .mega-svc-title { color: var(--accent); } }
.mega ul.mega-svc-subs { margin: 6px 0 0 16px; padding: 0 0 0 30px; border-left: 1px solid var(--line); font-size: 0.88rem; }
.mega .mega-svc-subs li a { padding: 1px 0; color: var(--stone); line-height: 1.38; }
/* a dot before each specialty, so one that wraps onto two lines reads as one */
.mega .mega-svc-subs li { position: relative; }
.mega .mega-svc-subs li + li { margin-top: 2px; }
.mega .mega-svc-subs li::before { content: ""; position: absolute; left: -14px; top: calc(1px + 0.69em - 2.5px); width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
@media (hover: hover) and (pointer: fine) { .mega .mega-svc-subs li a:hover { color: var(--accent); } }
.mega-svc-note { margin: 6px 0 0 46px; font-size: 0.86rem; line-height: 1.45; color: var(--muted); max-width: 32ch; }
.mega--services .mega-aside { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 10px 18px; margin-top: 0; }
.mega--services .mega-aside h2 { font-size: var(--h2-card); }
.mega--services .mega-aside p { flex: 1 1 260px; margin: 0; font-size: 0.9rem; }

/* ---------- photo edge: a tapering maroon swoosh along a curved edge, as in KEM's header graphics ---------- */
.photo-tile { border-radius: 8px; overflow: hidden; }
.photo-tile img { clip-path: none; border-radius: 0; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H100V100H40C25 97 11 89 0 76Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H100V100H40C25 97 11 89 0 76Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
.photo-tile::before { clip-path: none; z-index: 1; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 76C11 89 25 97 40 100C28 99.6 14 96 0 89Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 76C11 89 25 97 40 100C28 99.6 14 96 0 89Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
.photo-tile::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 76C11 89 25 97 40 100' fill='none' stroke='%23EFE1BE' stroke-width='5' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
/* Signing in: a turning ring on the button while its request is out, in the dialog while the
   page gets ready behind it, and on a staff page while it checks who's signed in. The ring
   fades in after a moment, so a quick answer never flashes it. */
.ebid-spin { flex: none; display: inline-block; vertical-align: -0.2em; overflow: visible; }
.ebid-spin circle { fill: none; stroke: currentColor; stroke-width: 2.5; }
.ebid-spin-track { opacity: 0.22; }
.ebid-spin-arc { stroke-dasharray: 15 42; stroke-linecap: round; }
/* busy (EBID.busy): the sides narrow by the ring and its gap (26 px), so the button keeps its width */
.btn[aria-busy="true"] { cursor: progress; padding-inline: 9px; gap: 8px; }
.btn--sm[aria-busy="true"] { padding-inline: 6px; }
.adm-link[aria-busy="true"] { cursor: progress; }
.adm-link .ebid-spin { margin-right: 6px; }
/* a button that can't be pressed now: faded, and pointing at it changes nothing (a busy one keeps
   its colour, with the ring) */
.btn:disabled:not([aria-busy="true"]), .adm-link:disabled:not([aria-busy="true"]) { opacity: 0.55; cursor: not-allowed; }
.btn--primary:disabled:hover { background: var(--maroon); color: var(--ivory); }
.btn--secondary:disabled:hover { background: transparent; color: var(--ink); }
/* a two-step button, armed (EBID.sure): the accent fill, with Cancel beside it. A maroon button is
   already the accent in the light appearance, so it gets a ring as well. (The attribute is named
   twice so the fill wins over a section's own button colours, like Take Off the Site's.) */
.btn[data-sure="1"][data-sure], .adm-link[data-sure="1"][data-sure] { background: var(--accent); border-color: var(--accent); color: var(--on-inverse); }
@media (hover: hover) {
  .btn[data-sure="1"][data-sure]:hover, .adm-link[data-sure="1"][data-sure]:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-inverse); }
}
.btn--primary[data-sure="1"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.adm-link[data-sure="1"] { padding-inline: 12px; border-radius: var(--radius-sm); text-decoration: none; transition: background-color .15s, color .15s; }
.ebid-cancel { margin-left: 4px; }
.ebid-sure-note { display: block; max-width: 34ch; margin-top: 6px; font-size: 0.85rem; line-height: 1.4; color: var(--stone); white-space: normal; text-align: left; }
.btn-row > .ebid-sure-note { flex-basis: 100%; max-width: none; margin-top: 0; }
/* the same, where the second click needs explaining: a box with the explanation and the buttons */
.ebid-confirm { padding: 12px 16px; border: 2px solid var(--accent); border-radius: var(--radius-sm); display: grid; gap: 10px; }
.ebid-confirm .btn-row { margin: 0; }
.adm-card .ebid-confirm p { color: var(--ink); }
.ebid-waiting { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px 0 20px; text-align: center; font-weight: 600; color: var(--ink); }
.ebid-waiting .ebid-spin { color: var(--accent); }
.ebid-checking { display: flex; align-items: center; gap: 12px; padding-block: 28px var(--section); color: var(--stone); font-weight: 600; }
.ebid-checking[hidden] { display: none; }
.ebid-checking .ebid-spin { color: var(--accent); }
.ebid-checking--inline { padding-block: 26px 0; }
@keyframes kem-spin { to { transform: rotate(360deg); } }
@keyframes kem-breathe { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: no-preference) {
  .ebid-spin { animation: kem-spin .8s linear infinite; }
  .ebid-checking, .ebid-waiting { animation: kem-fade .25s .3s ease-out both; }
}
/* with reduced motion the ring pulses instead of turning (!important gets it past the
   reduced-motion rule after the footer styles, which stops every other animation) */
@media (prefers-reduced-motion: reduce) {
  .ebid-spin { animation: kem-breathe 1.6s ease-in-out infinite !important; }
}

@keyframes kem-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: no-preference) {
  .motion .photo-tile::before, .motion .photo-tile::after { animation: kem-wipe 1s .4s cubic-bezier(.65, 0, .25, 1) both; }
}
/* phone menu: service lines carry their icons, as in the desktop menu */
.drawer details li a.drawer-svc { display: flex; align-items: center; gap: 12px; }
/* bid opportunities: one link through to the results archive */
.results-link { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: 24px 28px; }
.results-link > div { flex: 1 1 360px; min-width: 0; }
.results-link h2 { font-size: var(--h2-card); }
.results-link p { margin-top: 4px; }
@media (hover: hover) and (pointer: fine) { .results-link:hover h2 { color: var(--accent); } }

/* ---------- topo: contour-line backgrounds ----------
   The line patterns are static/img/topo-*.svg, drawn by tools/make_topo.py. They are used as
   masks, so each place sets its own line colour (--topo-ink) and fade (--topo-fade). Add the
   classes "topo topo--head" (or --band, --dark, --footer) to a section to give it one.
   --topo-edge softens an edge that would otherwise cut the lines off in a straight line. */
main { overflow-x: clip; }                      /* header maps reach the screen edges */
.topo { position: relative; isolation: isolate; --topo-fade: linear-gradient(#000, #000); --topo-edge: linear-gradient(#000, #000); }
.topo::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--topo-ink);
  -webkit-mask-image: var(--topo-img), var(--topo-fade), var(--topo-edge);
  -webkit-mask-size: var(--topo-size, cover), 100% 100%, 100% 100%;
  -webkit-mask-position: var(--topo-pos, right center), 0 0, 0 0;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-composite: source-in;
  mask-image: var(--topo-img), var(--topo-fade), var(--topo-edge);
  mask-size: var(--topo-size, cover), 100% 100%, 100% 100%;
  mask-position: var(--topo-pos, right center), 0 0, 0 0;
  mask-repeat: no-repeat;
  mask-composite: intersect;
}
/* page headers without a photo: the map sits where the photo would be, fading out toward the heading */
.topo--head { --topo-img: url("/img/topo-head.svg"); --topo-ink: #BBA37A; --topo-pos: right top;
  --topo-fade: radial-gradient(ellipse 72% 150% at 100% 0, #000 35%, transparent 92%);
  --topo-edge: linear-gradient(to top, transparent, #000 72px); }
.page-hero.topo::before { top: calc(-1 * var(--crumbs-h, 42px)); left: calc(50% - 50vw); right: calc(50% - 50vw); }
.crumbs { position: relative; z-index: 1; }
/* the bar at the top of a staff page (templates/_staff_back.html), where a public page has its
   breadcrumb: the way back on the left, who's signed in on the right, in the same place on every page.
   On a phone the name keeps to one line and "Signed in as" is left to screen readers. */
.staff-bar { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; }
.staff-bar > nav { display: flex; flex: 0 0 auto; max-width: 60%; min-width: 0; }   /* the way back keeps its name; a long one (a bid's) shortens */
.staff-bar-crumbs { padding-top: 0; }
.staff-back-link { display: inline-flex; align-items: center; gap: 4px; min-width: 0; margin-left: -4px; padding-inline: 4px 8px; }
.staff-back-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-back-link svg { flex: none; }
.staff-who { display: flex; flex: 1 1 auto; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; margin: 0; font-size: 0.92rem; color: var(--stone); }   /* the name shortens first */
.staff-who[hidden] { display: none; }
.staff-who strong { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 32ch; }
.staff-who-dot { color: var(--muted); }
.staff-who .adm-link { padding-inline: 4px; white-space: nowrap; }
@media (max-width: 640px) {
  .staff-who-pre { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .staff-bar { gap: 8px; }
  .staff-who { gap: 4px; }
  .staff-who strong { max-width: none; }
  .staff-who-dot { display: none; }
}
.staff-bar + .adm-hero, .staff-bar + div > .adm-hero, .staff-bar + .wm > .adm-hero { padding-top: 8px; }
/* small call-to-action bands */
.topo--band { --topo-img: url("/img/topo-wide.svg"); --topo-ink: #BBA37A; --topo-pos: right 40%;
  --topo-fade: linear-gradient(90deg, transparent 30%, #000 80%); }
/* the mission statement on Our story: faint lines, quieter behind the words */
.topo--dark { --topo-img: url("/img/topo-wide.svg"); --topo-ink: rgba(239, 225, 190, 0.2); --topo-pos: center;
  --topo-fade: radial-gradient(ellipse 46% 62% at 50% 52%, rgba(0, 0, 0, 0.3) 45%, #000 100%); }
.topo--footer { --topo-img: url("/img/topo-wide.svg"); --topo-ink: rgba(239, 225, 190, 0.075); --topo-pos: left top; }
@media (max-width: 900px) {
  .topo--head { --topo-fade: radial-gradient(ellipse 80% 260px at 100% 0, #000 25%, transparent 100%); }
}
@media (max-width: 700px) {
  .topo--band { --topo-fade: linear-gradient(transparent 35%, #000 100%); }
}
@media print { .topo::before { display: none; } }

/* ---------- 404: a topographic map behind the message (templates/_topo_map.svg) ---------- */
.nf { position: relative; overflow: hidden; min-height: max(560px, 42vw); background: var(--bg); }
.nf-map { position: absolute; inset: 0; pointer-events: none; }
.nf-svg { display: block; width: 100%; height: 100%; }
.nf-text { position: relative; z-index: 1; padding-block: clamp(40px, 7vw, 88px) 32px; }
.nf-text h1 { margin: 12px 0 26px; max-width: 13em; }
.nf-text .btn--secondary { background: var(--bg); }
@media (hover: hover) and (pointer: fine) { .nf-text .btn--secondary:hover { background: var(--inverse); } }
@media (max-width: 700px) {
  .nf { min-height: 0; padding-bottom: 250px; }
  .nf-map { inset: auto 0 0; height: 400px; -webkit-mask-image: linear-gradient(transparent 18%, #000 55%); mask-image: linear-gradient(transparent 18%, #000 55%); }
  .nf-svg { position: absolute; bottom: 0; left: calc(50% - 537px); width: 960px; height: 400px; }
}

/* ---------- team bios ---------- */
.member--link { color: inherit; text-decoration: none; border-radius: 10px; }
.member--link .portrait { transition: box-shadow .2s ease; }
@media (hover: hover) and (pointer: fine) {
  .member--link:hover .portrait { box-shadow: 0 0 0 3px var(--accent); }
  .member--link:hover b { color: var(--accent); text-decoration: underline; text-underline-offset: 0.18em; }
}
.member .bio-link { display: inline-block; margin-top: 4px; font-size: 0.86rem; font-weight: 700; color: var(--accent); }
.person-link { color: inherit; text-decoration: underline; text-decoration-color: rgba(102, 0, 0, 0.35); text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .person-link:hover { color: var(--accent); text-decoration-color: currentColor; } }
.person-portrait { aspect-ratio: 231 / 289; max-width: 260px; border-radius: var(--radius); overflow: hidden; background: var(--sand); display: flex; align-items: center; justify-content: center; }
.person-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person-portrait .avatar--initials { font-family: var(--serif); font-size: 3rem; color: var(--accent); }
/* on wide screens the portrait sits above the qualifications card, and the two stay in view together beside the bio */
.person-portrait--side { width: 180px; max-width: 100%; }   /* small enough that photo and card fit on the screen together under the header */
@media (max-height: 840px) { .person-portrait--side { width: 130px; } }
@media (min-width: 1000px) { .person-hero .person-portrait--hero { display: none; } }
@media (max-width: 999px) { .person-portrait--side { display: none; } }
.person-office a { color: inherit; }
.quals h3 { font-family: var(--sans); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }
.quals h2 + h3 { margin-top: 4px; }
.quals ul { list-style: none; margin: 0; padding: 0; font-size: 0.95rem; color: var(--ink); line-height: 1.4; }
.quals li { padding: 7px 0; border-top: 1px solid var(--line); }
.person-hero { padding-bottom: 0; }
.person-hero .person-portrait--hero { max-width: 200px; margin-bottom: 24px; }
@media (max-width: 700px) { .person-hero .person-portrait--hero { max-width: 170px; } }
@media (min-width: 1000px) { .person-page .content-layout > aside { margin-top: 28px; } }

/* ---------- project location map (aerial tiles with the project outline drawn on top) ---------- */
.footprint figure { margin: 0; }
.footprint-map { position: relative; overflow: hidden; aspect-ratio: 16 / 9; max-height: 420px; width: 100%; background: #3A3631; border-radius: var(--radius); isolation: isolate; }
.footprint-map img { position: absolute; display: block; max-width: none; user-select: none; -webkit-user-drag: none; }
.footprint-map svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.footprint-map .fp-halo { fill: none; stroke: rgba(27, 23, 20, 0.6); stroke-width: 6; stroke-linejoin: round; }
.footprint-map .fp-line { fill: rgba(239, 225, 190, 0.18); stroke: #FFE8A3; stroke-width: 2.5; stroke-linejoin: round; }
.footprint-map .fp-ring { fill: none; stroke: #FFE8A3; stroke-width: 2.5; }
/* on a street map: a maroon outline with a white edge, over a light ground while tiles load */
.footprint-map--street { background: #F2EFE9; }
/* the scale bar and north arrow, in the corners like a plan sheet's */
.footprint-map .fp-scale, .footprint-map .fp-north { position: absolute; z-index: 1; color: #1B1714; background: rgba(255, 255, 255, 0.82); border-radius: 4px; pointer-events: none; }
.footprint-map .fp-scale { left: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 2px; padding: 5px 8px 4px; font-size: 0.72rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.footprint-map .fp-scale-bar { display: block; height: 6px; border: 2px solid currentColor; border-top: 0; }
.footprint-map .fp-north { top: 10px; right: 10px; display: grid; place-items: center; width: 34px; height: 42px; }
.footprint-map .fp-north svg { position: static; width: 20px; height: 28px; overflow: visible; }
.footprint-map .fp-north text { font: 700 9px/1 var(--sans); fill: currentColor; }
.footprint-map--street .fp-halo { stroke: rgba(255, 255, 255, 0.9); stroke-width: 6; }
.footprint-map--street .fp-line { fill: rgba(102, 0, 0, 0.12); stroke: var(--accent); stroke-width: 2.5; }
.footprint-map--street .fp-ring { stroke: var(--accent); }
.footprint figcaption .footprint-credit a { color: inherit; font-weight: 400; }
.footprint figcaption { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-top: 10px; font-size: 0.9rem; color: var(--stone); }
.footprint figcaption a { color: var(--accent); font-weight: 600; }
.footprint-credit { margin-left: auto; font-size: 0.78rem; color: var(--muted); }
.photo-credit { margin: 8px 0 0; text-align: right; font-size: 0.78rem; color: var(--muted); }

/* ---------- project facts ---------- */
.facts dl { margin: 0; display: grid; gap: 10px; }
.facts dl > div { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.facts dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
/* the last row showing ends the card without a rule, even with hidden rows after it (a visitor's bid page: Addenda, Plan holders) */
.facts dl > div:not(:has(~ div:not([hidden]))) { border-bottom: 0; padding-bottom: 0; }
.facts dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

/* ---------- projects: search, filters, county map, results (after ArcGIS Hub's catalog) ---------- */
:root { --water: #D6E3E9; }
.explorer-body { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: clamp(24px, 3vw, 44px); align-items: start; }
.explorer:not(.is-enhanced) .explorer-body { grid-template-columns: minmax(0, 1fr); }
/* the filter rail stays in view while the results scroll; if it is taller than the window it scrolls on its own */
.explorer-filters { position: sticky; top: var(--x-top, 100px); max-height: calc(100vh - var(--x-top, 100px) - 16px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 10px; margin-right: -10px; }
.filters-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.filters-head h2 { font-size: var(--h2-card); }
.rail-close, .rail-done { display: none; }
.rail-close { color: var(--ink); }
.rail-done { position: sticky; bottom: 0; z-index: 2; background: var(--bg); padding: 12px 0 calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); margin-top: 12px; }
.rail-done .btn { width: 100%; justify-content: center; }
.link-btn { font: inherit; font-weight: 700; color: var(--accent); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.facet { padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.facet > h3, .facet > summary { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
details.facet > summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; margin: 0; min-height: 30px; }
details.facet > summary::-webkit-details-marker { display: none; }
details.facet > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; margin-left: auto; }
details.facet[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
details.facet > summary::before { content: ""; order: 2; margin-left: auto; font-size: 0.75rem; letter-spacing: 0; text-transform: none; color: var(--stone); font-weight: 600; }
details.facet > summary[data-count]:not([data-count=""])::before { content: attr(data-count) " selected"; margin-right: 10px; }
details.facet > summary::after { order: 3; margin-left: 0; }
details.facet[open] > summary { margin-bottom: 6px; }
.facet-list { border: 0; margin: 0; padding: 0; min-width: 0; }
/* the Community list's search box: narrows the list as you type */
.facet-find { position: relative; margin: 2px 0 8px; }
.facet-find .search-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.facet-find input { width: 100%; min-height: 40px; padding: 8px 64px 8px 12px; font: inherit; font-size: max(1rem, 16px); color: var(--ink); background: var(--surface); border: 1px solid var(--line-control); border-radius: var(--radius-sm); }
.facet-find input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.facet-none { margin: 4px 0 0; font-size: 0.9rem; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; padding: 3px 0; cursor: pointer; font-size: 0.93rem; line-height: 1.3; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; margin: 0; cursor: pointer; }
.check span:first-of-type { flex: 1 1 auto; }
.check .n { font-size: 0.8rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.check[hidden] { display: none; }
/* a ticked service's specialties, under it (Projects page) */
.facet-subs { margin: 0 0 6px 28px; padding-left: 10px; border-left: 2px solid var(--line); }
.facet-subs[hidden] { display: none; }
.check--sub { font-size: 0.88rem; }
.check.is-zero { color: var(--muted); cursor: default; }
.check.is-zero span:first-of-type { opacity: 0.6; }
.map-box { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--water); }
.map-tip { position: absolute; z-index: 2; pointer-events: none; background: var(--inverse); color: var(--on-inverse); border-radius: 6px; padding: 6px 10px; font-size: 0.82rem; line-height: 1.35; white-space: nowrap; box-shadow: 0 4px 12px rgba(27, 23, 20, 0.25); }
.map-tip b { display: block; font-size: 0.88rem; }
.map-tip span { display: block; color: var(--parchment); font-size: 0.75rem; }
.map-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.78rem; color: var(--stone); margin: 8px 0 0; }
.key-scale { display: inline-flex; }
.key-scale i { width: 14px; height: 10px; display: inline-block; }
.key-scale i:first-child { border-radius: 3px 0 0 3px; } .key-scale i:last-child { border-radius: 0 3px 3px 0; }
.key-scale .shade-1 { background: #EBCFC6; } .key-scale .shade-2 { background: #D9A497; } .key-scale .shade-3 { background: #BF6F62; }
.key-scale .shade-4 { background: #94352B; } .key-scale .shade-5 { background: #660000; }
.key-office { width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); margin-left: 6px; }

/* the map: sizes are in map units times --k, the crop's scale, so text stays the same size on screen */
.ohio-map { display: block; width: 100%; height: auto; }
.ohio-map text { font-family: var(--sans); pointer-events: none; }
.ohio-map .m-water { fill: var(--water); }
.ohio-map .m-land path { fill: #EEE8DA; stroke: #CDBFA8; stroke-width: 1; vector-effect: non-scaling-stroke; }
.ohio-map .m-lake path { fill: var(--water); stroke: #A9C1CC; stroke-width: 0.8; vector-effect: non-scaling-stroke; }
.ohio-map .m-county { fill: #FFFDF8; stroke: #D3C6B2; stroke-width: 0.8; vector-effect: non-scaling-stroke; transition: fill .15s ease; }
.ohio-map .m-county.shade-1 { fill: #EBCFC6; } .ohio-map .m-county.shade-2 { fill: #D9A497; } .ohio-map .m-county.shade-3 { fill: #BF6F62; }
.ohio-map .m-county.shade-4 { fill: #94352B; } .ohio-map .m-county.shade-5 { fill: #660000; }
.ohio-map .m-county[role="button"] { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ohio-map .m-county[role="button"]:hover { stroke: var(--ink); stroke-width: 2; } }
/* keyboard focus: a light outline with a dark halo reads on every shade, light or maroon */
.ohio-map .m-county[role="button"]:focus-visible { stroke: #FFF6D8; stroke-width: 3; paint-order: stroke; filter: drop-shadow(0 0 1.5px #1B1714) drop-shadow(0 0 1px #1B1714); }
.ohio-map .m-county:focus { outline: none; }
.ohio-map .m-sel path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ohio-map .m-rivers, .ohio-map .m-roads, .ohio-map .m-sel, .ohio-map .m-shields, .ohio-map .m-labels, .ohio-map .m-offices, .ohio-map .m-furniture { pointer-events: none; }
.ohio-map .m-rivers path { fill: none; stroke: #86ABBE; stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.ohio-map .m-roads path { fill: none; stroke: #7E7266; stroke-opacity: 0.5; stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.ohio-map .m-shields path { fill: #FFFDF8; stroke: #6F655A; stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.ohio-map .m-shields text { font-size: 10px; font-weight: 700; fill: #4A433B; text-anchor: middle; }
.ohio-map .m-lake-label { font-family: var(--serif); font-size: calc(15px * var(--k, 1)); font-style: italic; fill: #5F8697; }
.ohio-map .m-city { fill: #4A433B; }
.ohio-map .m-city-label { font-size: calc(12px * var(--k, 1)); fill: #3F3832; paint-order: stroke; stroke: rgba(255, 253, 248, 0.92); stroke-width: calc(3px * var(--k, 1)); stroke-linejoin: round; }
.ohio-map .m-offices path { fill: var(--accent); stroke: #FFFDF8; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ohio-map .m-offices text { font-size: 12.5px; font-weight: 700; fill: var(--accent); paint-order: stroke; stroke: #FFFDF8; stroke-width: 3px; stroke-linejoin: round; }
.ohio-map .m-furniture rect { fill: #4A433B; }
.ohio-map .m-furniture rect.alt { fill: #FFFDF8; stroke: #4A433B; stroke-width: 1; vector-effect: non-scaling-stroke; }
.ohio-map .m-furniture text { font-size: calc(10px * var(--k, 1)); fill: #4A433B; }
.ohio-map .m-north path { fill: #4A433B; }
.ohio-map .m-north text { font-size: 10px; font-weight: 700; text-anchor: middle; }

/* results */
.explorer-search { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.explorer-search .filter-search { flex: 1 1 280px; max-width: none; }
.explorer-filters-toggle { display: none; gap: 8px; }
.explorer-filters-toggle .n:not(:empty) { background: var(--maroon); color: var(--ivory); border-radius: 3px; padding: 0 6px; font-size: 0.8rem; }
.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; margin-bottom: 12px; }
.results-count { margin: 0; font-weight: 700; }
.results-tools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; color: var(--stone); }
.sort select { font: inherit; font-size: max(1rem, 16px); color: var(--ink); border: 1px solid var(--line-control); border-radius: 8px; padding: 0 12px; min-height: 40px; background: var(--surface); cursor: pointer; }
.view-toggle { display: inline-flex; border: 1px solid var(--line-control); border-radius: 8px; overflow: hidden; }
.view-toggle button { width: 44px; height: 44px; display: grid; place-items: center; background: var(--surface); border: 0; cursor: pointer; color: var(--stone); }
.view-toggle button + button { border-left: 1px solid var(--line-control); }
.view-toggle button[aria-pressed="true"] { background: var(--maroon); color: var(--ivory); }
.view-toggle button:focus-visible { outline-offset: -3px; }   /* drawn inside: the bar clips anything outside its edge */
.view-toggle button[aria-pressed="true"]:focus-visible { outline-color: var(--parchment); }
/* projects page: Map view (site.js; Leaflet and its cluster plugin, loaded when it's first opened).
   The canvas is its own stacking context, so Leaflet's layers stay under the sticky header. */
.results-map { margin: 0 0 24px; }
.results-map[hidden] { display: none; }
.results-map-canvas { position: relative; z-index: 0; isolation: isolate; height: clamp(360px, 62vh, 580px); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #F2EFE9; }
.results-map-canvas.leaflet-container { font: inherit; }
.results-map-wait { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; text-align: center; color: var(--stone); }
.results-map-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-top: 10px; font-size: 0.88rem; color: var(--stone); }
.map-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.map-legend li { display: inline-flex; align-items: center; gap: 7px; }
.lg-pin { width: 12px; height: 12px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #660000; box-shadow: 0 0 0 1.5px #FBF7EF inset; }
.lg-pin--area { background: #FBF7EF; box-shadow: 0 0 0 2px #660000 inset; }
.lg-area { width: 18px; height: 12px; border: 2px solid #660000; border-radius: 2px; background: rgba(102, 0, 0, 0.16); }
.lg-cluster { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #660000; color: #FBF7EF; font-size: 0.68rem; font-weight: 700; }
.map-note { margin: 0; }
.x-pin { background: none; border: 0; }
.x-pin svg { display: block; overflow: visible; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.35)); transform-origin: 50% 100%; transition: transform 0.15s ease; }
.x-pin .pin-body { fill: #660000; stroke: #FBF7EF; stroke-width: 1.5; }
.x-pin .pin-dot { fill: #FBF7EF; }
.x-pin--area .pin-body { fill: #FBF7EF; stroke: #660000; stroke-width: 2.2; }
.x-pin--area .pin-dot { fill: #660000; }
.x-pin.is-lit svg, .x-pin:focus-visible svg { transform: scale(1.2); }
@media (hover: hover) and (pointer: fine) { .x-pin:hover svg { transform: scale(1.2); } }
.x-pin:focus-visible { outline: none; }
/* keyboard focus: a ring in the focus colour (ink, or parchment in the dark appearance) around the pin's own shape,
   with a gap in the page colour, so it reads on the light and the dark street map and on either kind of pin */
.x-pin:focus-visible svg { filter: drop-shadow(1.5px 0 0 var(--bg)) drop-shadow(-1.5px 0 0 var(--bg)) drop-shadow(0 1.5px 0 var(--bg)) drop-shadow(0 -1.5px 0 var(--bg))
  drop-shadow(2px 0 0 var(--focus)) drop-shadow(-2px 0 0 var(--focus)) drop-shadow(0 2px 0 var(--focus)) drop-shadow(0 -2px 0 var(--focus)); }
.leaflet-marker-icon.x-cluster { box-sizing: border-box; display: grid; place-items: center; border-radius: 50%; border: 2px solid #FBF7EF; background: #660000; color: #FBF7EF; font-weight: 700; font-size: 0.85rem;
  box-shadow: 0 0 0 4px rgba(102, 0, 0, 0.28), 0 1px 3px rgba(0, 0, 0, 0.3); }
.leaflet-marker-icon.x-cluster:focus-visible { background: #4A0000; outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 4px rgba(102, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3); }
@media (hover: hover) and (pointer: fine) { .leaflet-marker-icon.x-cluster:hover { background: #4A0000; box-shadow: 0 0 0 4px rgba(102, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3); } }
.x-area { cursor: pointer; }
.leaflet-tooltip.x-map-tip { font: inherit; font-size: 0.82rem; font-weight: 600; }
/* how to zoom or move the map, shown for a moment when a scroll or one finger only moves the page */
.x-map-hint { position: absolute; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(27, 23, 20, 0.22); opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.x-map-hint span { padding: 10px 16px; border-radius: 6px; background: rgba(27, 23, 20, 0.88); color: #fff; font-size: 1rem; font-weight: 600; text-align: center; }
.x-map-hint.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .x-map-hint { transition: none; } }
/* Filter as map moves (site.js), above the scale */
.results-map .x-map-filter { display: flex; align-items: center; gap: 8px; min-height: 36px; margin-bottom: 6px; padding: 6px 12px 6px 10px; border: 1px solid var(--line-control);
  border-radius: 6px; background: var(--surface); color: var(--ink); font: 600 0.86rem/1.2 var(--sans); box-shadow: 0 1px 4px rgba(27, 23, 20, 0.18); cursor: pointer; user-select: none; }
.results-map .x-map-filter input { width: 18px; height: 18px; margin: 0; accent-color: var(--maroon); cursor: pointer; }
.results-map .x-map-filter:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.results-map .leaflet-control-scale-line { border-color: #1B1714; color: #1B1714; background: rgba(255, 255, 255, 0.82); font: 600 0.72rem/1.4 var(--sans); }
.x-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: 10px; overflow: hidden; }
.x-popup .leaflet-popup-content { margin: 0; line-height: 1.35; }
.leaflet-container .x-popup a.leaflet-popup-close-button { top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(27, 23, 20, 0.55); color: #FFFFFF; font: 18px/24px var(--sans); }
@media (hover: hover) and (pointer: fine) { .leaflet-container .x-popup a.leaflet-popup-close-button:hover { background: rgba(27, 23, 20, 0.8); color: #FFFFFF; } }
.leaflet-container a.x-pop { display: block; color: inherit; text-decoration: none; }
.x-pop img { display: block; width: 100%; height: 131px; object-fit: cover; }
.x-pop-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px 12px; font-size: 0.86rem; color: #4F463F; }
.x-pop-body strong { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; line-height: 1.25; color: #1B1714; }
.x-pop:focus-visible strong { text-decoration: underline; }
@media (hover: hover) and (pointer: fine) { .x-pop:hover strong { text-decoration: underline; } }
.x-pop-tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #660000; }
.x-pop-note { margin-top: 4px; font-size: 0.78rem; color: #6B5F55; }
/* projects page: landing spots in the list */
#featured, #all-projects { scroll-margin-top: 100px; }
#what-we-do { scroll-margin-top: -40px; }   /* lands with the heading just under the header (the section's own top padding is the gap) */
/* on a phone the featured and recent cards scroll sideways, so the full list isn't far down the page */
@media (max-width: 699px) {
  .proj-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(var(--gutter, 16px) * -1); padding: 2px var(--gutter, 16px) 14px; scroll-padding-inline: var(--gutter, 16px); scrollbar-width: thin; }
  .proj-row > * { scroll-snap-align: start; }
}
/* the filters you've applied: each a name with a maroon ✕ to remove it, over a thin rule */
.active-filters { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 16px; align-items: center; }
.active-filters button:not(.link-btn) { font: inherit; font-size: 0.92rem; font-weight: 600; background: none; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  padding: 4px 0; cursor: pointer; color: var(--ink); min-height: 36px; transition: color .15s, border-color .15s; }
.active-filters button:not(.link-btn) span[aria-hidden] { color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .active-filters button:not(.link-btn):hover { border-bottom-color: var(--accent); color: var(--accent); } }
.card-facts { font-size: 0.85rem; color: var(--muted); margin: -2px 0 2px; }
.card-facts svg { vertical-align: -2px; margin-right: 2px; }
.results-grid .media-card .media-body { padding: 16px 18px 18px; gap: 6px; }
.results-grid .media-card h3 { font-size: 1.15rem; }
.media-card .card-summary { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.results-grid .card-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.92rem; }
.results--list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.results--list .media-card { flex-direction: row; }
.results--list .media-card .media-img { flex: 0 0 200px; aspect-ratio: auto; min-height: 130px; }
.results--list .card-summary { -webkit-line-clamp: 2; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 28px; }
.pager button { font: inherit; font-weight: 600; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; cursor: pointer; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .pager button:hover:not(:disabled):not([aria-current]) { border-color: var(--accent); color: var(--accent); } }
.pager button[aria-current="page"] { background: var(--maroon); border-color: var(--maroon); color: var(--ivory); }
.pager button:disabled { opacity: 0.4; cursor: default; }
.pager .gap { padding: 0 4px; color: var(--muted); }
@media (max-width: 960px) {
  .explorer-body { grid-template-columns: minmax(0, 1fr); }
  .explorer-results { order: 1; }
  .explorer-filters { order: 2; position: static; max-height: none; overflow: visible; padding-right: 0; margin-right: 0; }
  .explorer.is-enhanced .explorer-filters-toggle { display: inline-flex; }
  .explorer.is-enhanced .explorer-filters { display: none; }
  .explorer.filters-open .explorer-filters { display: block; position: fixed; inset: 0; z-index: 300; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 0; margin: 0;
    padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }   /* clear of the notch in landscape */
  .explorer.filters-open .filters-head { position: sticky; top: -14px; z-index: 2; background: var(--bg); padding-top: 14px; margin-top: -14px; align-items: center; gap: 16px; }
  .explorer.filters-open .filters-head h2 { margin-right: auto; }
  .explorer.filters-open .filters-head h2:focus { outline: none; }
  .explorer.filters-open .rail-close { display: grid; }
  .explorer.filters-open .rail-done { display: block; }
  .facet--map .map-box { max-width: 440px; }
}
@media (max-width: 560px) {
  .results--list .media-card .media-img { flex-basis: 110px; min-height: 0; }
  .results--list .card-summary { display: none; }
}

/* ---------- qualifications ---------- */
.q-section + .q-section { margin-top: clamp(48px, 6vw, 72px); }
.q-nav-mobile { margin-bottom: 32px; }   /* Qualifications' On This Page list on phones */
.q-section > h2 { font-size: var(--h2-section); margin-bottom: 10px; }
.q-section > p.lead { margin-bottom: 26px; max-width: 70ch; }
.q-cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.q-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.q-card h3 { font-size: 1.25rem; margin-bottom: 4px; }
.q-card .q-note { font-size: 0.88rem; color: var(--muted); margin: 0 0 12px; }
.q-card ul { list-style: none; margin: 0; padding: 0; color: var(--ink); line-height: 1.4; }
.q-card li { padding: 7px 0; border-top: 1px solid var(--line); }
/* what each agency's prequalification covers: a small maroon check per category */
.q-cards--3 .q-card li, .q-cols li { position: relative; padding-left: 24px; }
.q-cards--3 .q-card li::before, .q-cols li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 14px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23660000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5l4.5 4.5 10-10'/%3E%3C/svg%3E") center / contain no-repeat; }
.q-cards--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin-top: 20px; }
.q-cards--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.q-feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 20px 40px; }
.q-feature h3 { font-size: 1.4rem; margin-bottom: 6px; color: var(--accent); }
.q-feature .q-note { font-size: 0.95rem; color: var(--stone); margin: 0 0 12px; }
.q-cols { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; color: var(--ink); line-height: 1.4; }
.q-cols li { break-inside: avoid; padding-top: 7px; padding-bottom: 7px; border-top: 1px solid var(--line); }
.q-link { display: inline-block; font-size: 0.9rem; font-weight: 700; color: var(--accent); margin-top: 10px; }
.q-link svg { vertical-align: -2px; }
@media (max-width: 860px) { .q-feature { grid-template-columns: 1fr; padding: 22px 22px; } }
@media (max-width: 520px) { .q-cols { columns: 1; } }
.q-subhead { font-family: var(--sans); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 26px 0 12px; }
.q-section > h2 + .q-subhead { margin-top: 14px; }
.q-licenses { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 40px; }
.q-licenses li { display: flex; align-items: baseline; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.q-licenses b { font-family: var(--serif); font-size: 2.4rem; font-weight: 600; color: var(--accent); line-height: 1; min-width: 2.4ch; }
.q-licenses li > div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.q-licenses li > div > span { font-weight: 700; color: var(--ink); }
.q-creds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 0 36px; }
.q-creds li { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.q-creds b { font-family: var(--serif); font-size: 2rem; font-weight: 600; color: var(--accent); line-height: 1; text-align: right; }
.q-creds li > div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.q-cred-name { font-weight: 700; color: var(--ink); }
.q-cred-about { color: var(--stone); font-size: 0.95rem; }
.q-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; margin-top: 4px; }
.q-actions .q-link { margin-top: 0; }
/* "See who" opens a list of the people who hold the license or certification */
.q-who { appearance: none; background: none; border: 0; padding: 0; margin-top: 4px; font: inherit; font-size: 0.9rem; font-weight: 700; color: var(--accent); cursor: pointer;
  text-decoration: underline; text-decoration-color: rgba(102, 0, 0, 0.35); text-underline-offset: 3px; }
.q-actions .q-who { margin-top: 0; }
@media (hover: hover) and (pointer: fine) { .q-who:hover { text-decoration-color: currentColor; } }
.who-dialog { border: 0; padding: 0; width: min(600px, calc(100vw - 32px)); max-height: min(80vh, 720px); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); color: var(--ink); }
.who-dialog::backdrop { background: rgba(27, 23, 20, 0.55); }
.who-dialog[open] { display: flex; flex-direction: column; }
.who-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 22px 16px 26px; border-bottom: 1px solid var(--line); }
.who-head .eyebrow { margin-bottom: 6px; }
.who-head h2 { font-size: var(--h2-card); margin: 0; }
.who-close { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .who-close:hover { background: var(--sand); } }
.who-body { overflow-y: auto; padding: 14px 26px 24px; }
.q-people { list-style: none; margin: 0; padding: 0; columns: 2 200px; column-gap: 32px; }
.q-people li { break-inside: avoid; padding: 6px 0; display: flex; flex-direction: column; }
.q-people a, .q-people span { font-weight: 600; }
.q-people small { font-size: 0.85rem; color: var(--muted); line-height: 1.3; }
.q-awards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.q-awards li { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.q-awards .yr { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--accent); }
.q-awards h3 { font-size: 1.15rem; margin-bottom: 4px; }
.q-awards p { color: var(--stone); margin: 0; max-width: 72ch; }
.q-tags { list-style: none; margin: 0; padding: 0; columns: 3 260px; column-gap: 40px; color: var(--ink); }
.q-tags li { break-inside: avoid; padding: 9px 0; border-top: 1px solid var(--line); }

/* ---------- photo galleries in text (news, newsletter, projects) ----------
   build.py marks how many photos a gallery has (data-n) and their usual shape (data-shape),
   so two photos sit side by side with no empty slot and tall photos aren't cut to landscape. */
.prose .gallery[data-n="2"], .prose .gallery[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prose .gallery[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.prose .gallery[data-n="5"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.prose .gallery[data-n="5"] > :nth-child(-n+2) { grid-column: span 3; }
.prose .gallery[data-n="5"] > :nth-child(n+3) { grid-column: span 2; }
.prose .gallery[data-shape="square"] img { aspect-ratio: 1; }
.prose .gallery[data-shape="tall"] img { aspect-ratio: 3 / 4; }
.prose .gallery figure { margin: 0; min-width: 0; }
.prose .gallery figcaption, .prose .gallery-fig > figcaption, .prose .photo-fig > figcaption { font-size: 0.92rem; color: var(--stone); margin-top: 8px; line-height: 1.4; }
.prose .gallery-fig, .prose .photo-fig { margin: 1.4em 0 0; clear: both; }
/* Slideshows in page text (a service page set to show photo groups as slideshows): one photo at a
   time, whole, on a dark stage so scans with black backgrounds read well; arrows, a count and a
   strip of small previews; a click opens the full-screen viewer (site.js) */
.prose .carousel { margin: 1.6em 0 0; clear: both; }
.carousel-stage { position: relative; }
.carousel-track { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  aspect-ratio: 16 / 10; background: #000000; border-radius: var(--radius); }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.carousel-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; cursor: zoom-in; }
.carousel-slide img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0;
  display: grid; place-items: center; background: rgba(251, 247, 239, 0.92); color: var(--maroon); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .carousel-btn:hover { background: #FFFFFF; } }
.carousel-btn:focus-visible { outline: 3px solid var(--parchment); outline-offset: 2px; }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-count { position: absolute; right: 12px; bottom: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(20, 17, 15, 0.72);
  color: #FFFFFF; font-size: 0.8rem; font-variant-numeric: tabular-nums; pointer-events: none; }
.carousel-cap { margin: 8px 0 0; font-size: 0.92rem; color: var(--stone); line-height: 1.4; min-height: 1.3em; }
.carousel-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px; margin-top: 8px; scrollbar-width: thin; }
.carousel-thumbs button { flex: 0 0 auto; width: 96px; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; border-radius: var(--radius-sm);
  overflow: hidden; background: #000000; opacity: 0.6; cursor: pointer; transition: opacity 0.15s ease; }
@media (hover: hover) and (pointer: fine) { .carousel-thumbs button:hover { opacity: 0.9; } }
.carousel-thumbs button[aria-current="true"] { opacity: 1; border-color: var(--accent); }
.carousel-thumbs button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.carousel-thumbs img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.carousel:not(.is-ready) .carousel-btn, .carousel:not(.is-ready) .carousel-count, .carousel:not(.is-ready) .carousel-thumbs { display: none; }
/* ...and beside their section on wide screens (service.html, site.js): the cards stay in view at the
   top of the side column, and the photos under them (.rail) start in line with the section's heading
   and stay in view under the cards until the section ends. The photos reach left over the empty room
   beside the section's text, as wide as fits under the cards, and sit on the page, not in a card:
   their tabs above them as labels, a caption under them, no small previews (the arrows, a swipe and
   the count do that). site.js places the track (top and height) and sets the panel's top and width.
   A tab for each slideshow, named for its heading; the next is added when the reader reaches that
   heading, and opens. */
.rail-track[hidden] { display: none; }
@media (min-width: 1000px) {
  .content-layout > aside.rail-aside { align-self: stretch; position: relative; }
  .rail-aside > .rail-top { position: sticky; top: var(--stick-top, 112px); z-index: 2; display: flex; flex-direction: column; gap: 20px; }
  /* in line with the heading whatever the cards above measure (they change shape, below) */
  .rail-track { position: absolute; left: 0; right: 0; }
  .rail { position: sticky; top: var(--rail-top, 320px); padding: 0; max-width: none; background: none; border: 0; border-radius: 0; }
  .rail .carousel-track { aspect-ratio: 16 / 10; border-radius: var(--radius-sm); }
  .rail .carousel-btn { width: 36px; height: 36px; }
  .rail .carousel-prev { left: 8px; }
  .rail .carousel-next { right: 8px; }
  .rail .carousel-count { right: 8px; bottom: 8px; }
  .rail .carousel-cap { margin-top: 10px; font-size: 0.86rem; min-height: 2.6em; }
  .rail .carousel-thumbs { display: none; }

  /* While the photos are beside the text the cards above them are as wide (site.js sets the column's
     width), and a contact is one row: the photo and name, then the Email button at the end. site.js
     morphs a card between the two: a shell (.rail-shell) draws the card's edge and fill, clipped from
     the old outline to the new; the photo travels and shrinks; the name and button fade from where
     they were (a copy, .rail-ghost) into where they are now. */
  .rail-top .side-card { position: relative; z-index: 1; }
  .rail-top .side-card.is-wide { padding: 16px 20px; }
  .rail-top .side-card.is-wide .contact { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
  .rail-top .side-card.is-wide .contact .person { flex: 1 1 240px; min-width: 0; }
  .rail-top .side-card.is-wide .contact > .btn--block { width: auto; margin-left: auto; }
  .rail-top .side-card.is-wide .person .avatar { width: 56px; height: 56px; }
  .rail-top .side-card.is-morphing { background: none !important; border-color: transparent !important; }
  .rail-top > .rail-shell { position: absolute; z-index: 0; pointer-events: none; }
  .rail-shell > * { position: absolute; inset: 0; }
  .rail-top .side-card.rail-ghost { position: absolute; z-index: 1; margin: 0; background: none !important; border-color: transparent !important; pointer-events: none; }
  .rail-ghost .avatar { visibility: hidden; }
}
.rail-tabs { position: relative; display: flex; gap: 24px; margin: 0 0 12px; border-bottom: 1px solid var(--line); }
.rail-tab { flex: none; margin-bottom: -1px; padding: 6px 0 10px; border: 0; background: none; color: var(--stone);
  font: inherit; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; line-height: 1.2; text-transform: uppercase; cursor: pointer; }
.rail-tab[aria-selected="true"] { color: var(--accent); }
.rail-tab:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
@media (hover: hover) and (pointer: fine) { .rail-tab:not([aria-selected="true"]):hover { color: var(--ink); } }
/* the open tab's underline, one bar that slides to the tab opened (site.js sets where and how wide) */
.rail-mark { position: absolute; left: 0; bottom: -1px; width: 1px; height: 2px; background: var(--accent); transform-origin: 0 0; pointer-events: none; }
.rail-tabs.is-live .rail-mark { transition: transform 0.32s var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .rail-tabs.is-live .rail-mark { transition: none; } }
.rail-page[hidden] { display: none; }
@media (max-width: 600px) {
  .carousel-track { aspect-ratio: 4 / 3; }
  .carousel-btn { width: 38px; height: 38px; }
  .carousel-prev { left: 8px; }
  .carousel-next { right: 8px; }
  .carousel-thumbs button { width: 72px; }
}
.prose .gallery-fig .gallery { margin-top: 0; }
.prose .photo-fig img { max-width: 100%; height: auto; }
@media (max-width: 560px) {
  .prose .gallery[data-n="3"]:not([data-shape="tall"]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prose .gallery[data-n="3"]:not([data-shape="tall"]) > :first-child { grid-column: span 2; }
}

/* ---------- newsletter: one page per issue ---------- */
.nl-sent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--stone); font-weight: 600; margin: 0; }
.nl-sent svg { color: var(--accent); }
.nl-sent span { color: var(--line-strong); }
.nl-toc h2 { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-family: inherit; margin: 0 0 10px; }
.nl-toc-list { list-style: none; margin: 0; padding: 0; counter-reset: nl; }
.nl-toc-list li { counter-increment: nl; }
.nl-toc-list a { display: grid; grid-template-columns: 2em minmax(0, 1fr); gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.35; }
.nl-toc-list li:last-child a { border-bottom: 0; }
.nl-toc-list a::before { content: counter(nl, decimal-leading-zero); color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.85rem; padding-top: 0.12em; }
.nl-toc-list a[aria-current="true"] { color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .nl-toc-list a:hover { color: var(--accent); } }
.nl-toc-list a[aria-current="true"]::before { color: var(--accent); }
.content-layout > aside.nl-toc { flex: 1 1 250px; gap: 0; }
.nl-issue { max-width: 800px; }
.nl-section { display: flow-root; padding-bottom: clamp(36px, 5vw, 56px); }
.nl-section + .nl-section { border-top: 1px solid var(--line); padding-top: clamp(32px, 4vw, 48px); }
.nl-section > h2 { font-size: var(--h2-page); margin: 0 0 6px; }
.nl-section .prose > :first-child { margin-top: 0.6em; }
.nl-section .prose h3 { font-size: 1.4rem; }
.nl-section .prose h4 { font-size: 1.1rem; }
.nl-section .prose blockquote { font-size: 1.08rem; color: var(--stone); }
.nl-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding-top: 24px; }
.nl-pager-link { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.nl-pager-link span { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.nl-pager-link b { color: var(--accent); }
.nl-pager-link--next { text-align: right; }
@media (hover: hover) and (pointer: fine) { .nl-pager-link:hover b { text-decoration: underline; } }
@media (max-width: 999px) {
  .nl-toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 10px; }
  .nl-toc-list { columns: 2 230px; column-gap: 28px; }
  .nl-toc-list li { break-inside: avoid; }
  .nl-toc-list li:last-child a { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .nl-pager { grid-template-columns: 1fr 1fr; }
  .nl-pager .more { grid-row: 2; grid-column: 1 / -1; justify-self: center; }
}
/* the newsletter page: the latest issue up top, past issues below */
.nl-past-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; margin: clamp(48px, 6vw, 72px) 0 24px; }
/* past issues: a row per year, the year beside compact cards (a small cover photo, the month,
   the issue and its topics) so the archive reads as a list rather than a wall of photos */
.nl-year { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px 24px; padding: 22px 0; border-top: 1px solid var(--line-strong); scroll-margin-top: 110px; }
.nl-year-title { font-size: 1.75rem; line-height: 1.1; margin: 0; padding-top: 8px; font-variant-numeric: lining-nums tabular-nums; }
.nl-past-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 244px), 1fr)); gap: 12px; }
.nl-past-card { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: center; height: 100%; padding: 10px 14px 10px 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: border-color .15s; }
@media (hover: hover) and (pointer: fine) {
  .nl-past-card:hover { border-color: var(--accent); }
  .nl-past-card:hover .nl-past-name { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
}
.nl-past-img { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--sand); color: var(--muted); }
.nl-past-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nl-past-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nl-past-when { font-size: 0.82rem; color: var(--muted); }
.nl-past-name { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; line-height: 1.25; margin: 0; }
.nl-past-topics { font-size: 0.82rem; line-height: 1.4; color: var(--stone); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
@media (max-width: 700px) {
  .nl-year { grid-template-columns: minmax(0, 1fr); padding: 18px 0; }
  .nl-year-title { padding-top: 0; font-size: 1.5rem; }
  .nl-past-card { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
}
.nl-latest { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.nl-latest-img { display: block; min-height: 280px; background: var(--sand); }
.nl-latest-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nl-latest-body { padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 12px; }
.nl-latest-body .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--muted); font-size: 0.95rem; }
.nl-latest-body h2 { font-size: var(--h2-page); margin: 0; }
.nl-latest-body h2 a { color: inherit; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .nl-latest-body h2 a:hover { color: var(--accent); } }
.nl-latest-sub { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-family: inherit; margin: 8px 0 0; }
.nl-latest-body .btn { align-self: flex-start; margin-top: 10px; }
@media (max-width: 820px) {
  .nl-latest { grid-template-columns: 1fr; }
  .nl-latest-img { aspect-ratio: 16 / 9; min-height: 0; }
}

/* ---------- News page: a few other stories under the latest issue ---------- */
.nl-other { margin-top: clamp(32px, 4vw, 48px); }
.nl-other-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 12px; }
.nl-other-head h2 { font-size: var(--h2-section); }
.nl-other-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 0 32px; border-top: 1px solid var(--line-strong); }
.nl-other-list a { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); height: 100%; }
.nl-other-list time { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.nl-other-list span { font-weight: 700; line-height: 1.35; }
@media (hover: hover) and (pointer: fine) { .nl-other-list a:hover span { color: var(--accent); text-decoration: underline; } }

/* ---------- newsletter sign-up: a button to Constant Contact's sign-up page. The site doesn't run
   Constant Contact's own script, so nothing of theirs loads on pages that share an address with
   KEM Electronic Bidding. ---------- */
.nl-signup { flex: 1 1 360px; min-width: 0; display: grid; gap: 12px; justify-items: start; align-content: center; }
/* on the News page, a card beside the title */
.nl-head { align-items: center; }
.nl-head > .nl-signup--top { flex: 0 1 420px; justify-items: start; gap: 10px; padding: 24px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.nl-signup--top h2 { font-size: var(--h2-card); }
.nl-signup--top p { margin: 0; }

/* ---------- project facts: under the photo when the page is one column, in the sidebar beside it ---------- */
.facts--top { margin: 0; }
.facts--top dl { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px 24px; }
.facts--top dl > div { border-bottom: 0; padding-bottom: 0; }
@media (min-width: 1000px) { .facts--top { display: none; } }
@media (max-width: 999px) { .facts--side { display: none; } }

/* ---------- three cards in a row: never two and one ----------
   A row of three interchangeable cards (featured, related and latest) shows two where only two
   fit across, rather than leaving the third alone on a row; the help cards, which aren't
   interchangeable, let the third run the full width instead. A row of four shows three where
   three fit. The grids use --min: 240px and --gap: 20px, which these widths follow. */
.grid--trio, .grid--quad { --min: 240px; --gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min)), 1fr)); container-type: inline-size; }
@container (min-width: 500px) and (max-width: 759.98px) {
  .grid--trio:not(.grid--keep) > :nth-child(3) { display: none; }
  .grid--trio.grid--keep > :nth-child(3) { grid-column: 1 / -1; }
}
@container (min-width: 760px) and (max-width: 1019.98px) {
  .grid--quad > :nth-child(4) { display: none; }
}
/* on a phone these rows scroll sideways too (.proj-row, above), so the full lists aren't far down */
@media (max-width: 699px) { .grid.proj-row { grid-template-columns: none; } }

/* a service page's specialties: wide photos, and on phones compact rows with the photo beside the
   text, so five or six of them fit where two did */
.grid--subs .media-img { aspect-ratio: 16 / 9; }
@media (max-width: 560px) {
  .grid--subs { --gap: 12px; }
  .grid--subs > .media-card { flex-direction: row; }
  .grid--subs > .media-card .media-img { flex: 0 0 36%; aspect-ratio: auto; min-height: 7.5em; }
  .grid--subs > .media-card .media-body { padding: 14px 16px; gap: 6px; }
  .grid--subs > .media-card h3 { font-size: 1.15rem; }
  .grid--subs > .media-card p { font-size: 0.95rem; }
}

/* ---------- touch screens: every control at least 40 to 44 points tall ----------
   Small text links that stand on their own (View all, footer links, office phone numbers,
   names on contact cards) get a taller tap area; where the page has no room to grow, the area
   reaches past the text without moving anything. */
@media (pointer: coarse) {
  .more { display: inline-flex; align-items: center; min-height: 44px; }
  .footer-col ul { gap: 0; }
  .footer-col ul a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer address a { display: inline-block; padding-block: 8px; margin-block: -6px; }
  .footer-legal a { padding-block: 10px; }
  .office .links a { min-height: 44px; }
  .person-link { display: inline-block; padding-block: 14px; margin-block: -14px; }
  .q-who, .q-link { min-height: 44px; display: inline-flex; align-items: center; }
  .eyebrow-links a, .eyebrow-trail a { padding-block: 14px; }
  .crumbs a { display: inline-block; padding-block: 12px; margin-block: -12px; }
  .award a, .proof a { padding-block: 14px; }   /* "Watch the video", "See them on the map": 44 px to tap, the text where it was */
  .choices .choice, .nb-kind-list .choice, .adm-ack-list .choice { min-height: 44px; align-items: center; }
  .choices .choice input, .nb-kind-list .choice input, .adm-ack-list .choice input { margin-top: 0; }
  .form fieldset > .choice { padding-block: 10px; margin-block: -10px; }   /* a checkbox on its own line (the application's "no work history") */
  .svc-x-subs a { min-height: 44px; }
  .facts dd > a { padding-block: 12px; }        /* a project's Location */
  .drawer-contact a { padding-block: 9px; margin-block: -9px; }
  .card .card-links { gap: 0; }
  .card .card-links a { display: flex; align-items: center; min-height: 44px; }
  .btn--sm, .sort select { min-height: 44px; }
  .nl-toc-list a { padding-block: 10px; min-height: 44px; }      /* In This Issue */
}

/* ---------- press feedback ----------
   The browser's tap flash is off (html, at the top), so each kind of control shows its hover
   colours while it's pressed: a finger gets the answer a mouse gets from hovering (hover styles
   only apply with a mouse or trackpad). Buttons also shrink a little (.btn:active, in "motion").
   site.js listens for touchstart, which iPhones need before they apply :active. */
.icon-btn:active { background: rgba(255, 255, 255, 0.1); color: var(--paper); }
.theme-seg button:not([aria-pressed="true"]):active { color: var(--paper); background: rgba(255, 255, 255, 0.08); }
.lb-btn:active { background: rgba(255, 255, 255, 0.24); }
.site-footer a.social-btn:active { background: var(--parchment); color: var(--maroon-deep); }
.drawer summary:active, .drawer .drawer-link:active, .drawer details li a:active, .side-nav a:active, .svc-x-subs a:active, .update > summary:active .update-label { color: var(--accent); }
.bid-toggle:active, .seg label:active input:not(:checked) + span, .ebid-dl:active, .li-menu button:active, .we-kinds a:not([aria-current="page"]):active, .search-results a:active { background: var(--sand); }
.adm-nav a:not([aria-current="page"]):active { background: var(--sand); color: var(--accent); }
.ga-range button[aria-pressed="false"]:active { background: var(--sand); }
.li-btn:active, .who-close:active, .ebid-dlg-close:active, .svc-x-tab:active { background: var(--sand); color: var(--ink); }
.pager button:not(:disabled):not([aria-current]):active, .we-tile-cover:not([aria-pressed="true"]):active { border-color: var(--accent); color: var(--accent); }
.active-filters button:not(.link-btn):active { border-bottom-color: var(--accent); color: var(--accent); }
.card--link:active, .media-card:active, .nl-past-card:active, .adm-tile:active, .we-row:active { border-color: var(--accent); }
.nb-cal-nav:active, .nb-cal-month button:not(:disabled):active { border-color: var(--ink); }
.carousel-btn:active { background: #FFFFFF; }
.carousel-thumbs button:active { opacity: 0.9; }
.yt:active .yt-play { background: var(--maroon-deep); }
.we-tile-x:active { background: var(--maroon); }

/* ---------- Increase Contrast: darker secondary text and rules ---------- */
@media (prefers-contrast: more) {
  :root { --muted: #3D3530; --stone: #2B2522; --line: #B5A48F; --line-strong: #7D6C5C; --bar: #5E5249; }
}

/* ---------- logo menu and appearance switch (footer): the logos; Auto, Light, Dark ---------- */
.footer-switches { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.footer-switches:not(:has(> :not([hidden]))) { display: none; }
.theme-switch { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.theme-switch[hidden] { display: none; }
.theme-switch-label { font-weight: 700; color: var(--parchment); }
/* the switch's choices wrap onto a second row on narrow screens rather than run off the screen */
.theme-seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; border: 1px solid rgba(239, 225, 190, 0.35); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.theme-seg button { appearance: none; border: 0; background: none; color: var(--parchment-soft); font: inherit; font-weight: 600; font-size: 0.86rem; white-space: nowrap;
  min-height: 34px; padding: 0 14px; border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
@media (hover: hover) and (pointer: fine) { .theme-seg button:hover { color: var(--paper); background: rgba(255, 255, 255, 0.08); } }
.theme-seg button[aria-pressed="true"] { background: var(--parchment); color: var(--maroon-deep); }
.theme-seg svg { flex: none; }
@media (pointer: coarse) { .theme-seg button { min-height: 44px; } }

/* ---------- KEM Electronic Bidding (templates/bid.html; js/bid.js) ----------
   .ebid carries data-viewer, data-auth and data-state; bid.js shows or hides each [data-when]
   block. Bids are on paper, so the page has no bid form. */
.ebid-due { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 18px; color: var(--stone); }
.ebid-due-label { color: var(--muted); font-weight: 600; margin-right: 4px; }
.ebid-due strong { color: var(--ink); }
/* bold maroon is for links; the countdown and the admin's state are plain bold ink */
.ebid-due-left { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ebid-due-left:empty { display: none; }
.ebid-upcoming { margin-top: 14px; color: var(--stone); }
.ebid-upcoming a { font-weight: 700; }
.ebid-note { margin-top: 10px; font-size: 0.9rem; color: var(--stone); }
.ebid-note:empty { display: none; }
.ebid-practice { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; margin: 0 0 36px;
  padding: 18px 22px; border: 2px solid var(--line-control); border-radius: var(--radius); background: var(--surface); }
.ebid-practice-text { flex: 1 1 380px; min-width: 0; }
.ebid-practice h2 { font-size: var(--h2-card); margin-bottom: 4px; }
.ebid-practice p { font-size: 0.92rem; color: var(--stone); max-width: 72ch; }
.ebid-switches { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.ebid-switch { display: flex; align-items: center; gap: 8px; }
.ebid-switch-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ebid-switch .seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.ebid-switch .seg span { min-height: 46px; }   /* as tall as the Reset Practice Data button beside it (48 px with the border) */

.ebid-toc { margin: 0 0 4px; }
.ebid-toc .n { color: var(--muted); font-weight: 600; margin-left: 2px; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .ebid-toc a:hover .n { color: inherit; } }
.ebid-sec { padding-top: 40px; scroll-margin-top: 110px; }
.ebid-sec + .ebid-sec { border-top: 1px solid var(--line); margin-top: 40px; }
/* the Overview ends on its last fact's rule, so the first section showing after it (Documents for a plan
   holder, Bid Tab for a visitor) starts under that rule instead of drawing a second one */
#overview ~ .ebid-sec:not([hidden]) { border-top: 0; margin-top: 0; }
#overview ~ .ebid-sec:not([hidden]) ~ .ebid-sec:not([hidden]) { border-top: 1px solid var(--line); margin-top: 40px; }
.ebid-sec > h2 { font-size: var(--h2-section); margin-bottom: 10px; }
.ebid-sec h3 { font-size: 1.15rem; margin: 22px 0 6px; }
.ebid-sec p { color: var(--stone); max-width: 72ch; }
.ebid-sub { font-size: 0.95rem; color: var(--stone); margin: 0 0 16px; max-width: 72ch; }
/* Sign In with Microsoft (ebid-common.js, msButton): Microsoft's four squares on a white tile, so they
   read on the maroon button; in the sign-in dialog, the button and then a rule that says "or" */
.btn-ms-logo { background: #fff; padding: 3px; border-radius: 3px; box-sizing: content-box; }
.ebid-ms .btn-ms { width: 100%; }
.ebid-ms-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 12px; font-size: 0.875rem; font-weight: 700; color: var(--stone); }
.ebid-ms-or::before, .ebid-ms-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
/* the Overview: one fact a row, the label in a column of its own, hairlines between */
.ebid-facts { margin: 8px 0 0; border-top: 1px solid var(--line); }
.ebid-facts > div { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); gap: 4px 24px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.ebid-facts dt, .ebid-side-dl dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ebid-facts dd, .ebid-side-dl dd { margin: 2px 0 0; color: var(--ink); }
.ebid-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .ebid-facts > div { grid-template-columns: 1fr; padding: 10px 0; } }

.ebid-files { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.ebid-files li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; align-items: center; gap: 4px 14px; padding: 8px 16px; min-height: 56px; }
.ebid-files li + li { border-top: 1px solid var(--line); }
.ebid-files .icon { color: var(--accent); }
.ebid-file-name { font-weight: 600; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.ebid-file-size { font-size: 0.85rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ebid-lock { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.ebid-dl { min-height: 40px; padding: 6px 14px; border: 1px solid var(--line-control); border-radius: var(--radius-sm); background: var(--bg);
  color: var(--ink); font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ebid-dl:hover { background: var(--sand); } }
.ebid-files--small li { min-height: 48px; padding: 6px 14px; }
@media (pointer: coarse) { .ebid-dl { min-height: 44px; } }
@media (max-width: 560px) {
  .ebid-lock { display: none; }          /* the line above the list says who can download */
  .ebid-files li { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .ebid-files .icon { grid-row: 1 / span 2; align-self: start; margin-top: 2px; }
  .ebid-file-name { grid-column: 2 / -1; }
  .ebid-file-size { grid-column: 2; grid-row: 2; }
  .ebid-file-act { grid-column: 3; grid-row: 2; }
}
.ebid-addendum { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.ebid-addendum + .ebid-addendum { margin-top: 12px; }
.ebid-addendum p { overflow-wrap: anywhere; }
.ebid-addendum-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 6px; }
.ebid-sec .ebid-addendum-head h3 { margin: 0; }
.ebid-addendum .ebid-files { margin-top: 14px; background: var(--bg); }
.ebid-changes { margin: 10px 0 0; padding-left: 1.2em; color: var(--stone); font-size: 0.92rem; }
.ebid-changes li + li { margin-top: 2px; }
.ebid-file-note { display: block; font-size: 0.85rem; font-weight: 400; color: var(--stone); }

.ebid-qa { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ebid-qa > li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.ebid-q, .ebid-a { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.ebid-sec .ebid-q p { font-weight: 600; color: var(--ink); }
.ebid-qa p { overflow-wrap: anywhere; }   /* a pasted link or a long word wraps instead of running off the card */
.ebid-qa p + p { margin-top: 8px; }
.ebid-qa-tag { width: 28px; height: 28px; border-radius: 4px; display: grid; place-items: center; font-size: 0.85rem; font-weight: 700; background: var(--sand); color: var(--ink); }
.ebid-a .ebid-qa-tag { background: var(--maroon); color: var(--ivory); }
.ebid-sec .ebid-qa-date, .adm-qa .ebid-qa-date { font-size: 0.82rem; color: var(--muted); }
/* an answer changed after it was posted: the earlier ones, behind Answer History */
.ebid-history { margin-top: 10px; font-size: 0.92rem; }
.ebid-history summary { cursor: pointer; font-weight: 600; color: var(--accent); width: fit-content; }
.ebid-history ol { list-style: none; margin: 8px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line-strong); display: grid; gap: 10px; }
.ebid-history li p { color: var(--stone); font-weight: 400; }
.ebid-ask { margin-top: 20px; display: grid; gap: 12px; max-width: 640px; }
.ebid-qa + .ebid-sub, .ebid-qa ~ .ebid-sub { margin-top: 16px; }
.ebid-ask .btn { justify-self: start; }
/* a plan holder's own questions, until they're answered (only the company and KEM see them) */
.ebid-mine { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; max-width: 72ch; }
.ebid-mine h3 { margin: 0; font-size: 1.15rem; }
.ebid-mine .ebid-sub { margin: 0; }
.ebid-myq { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.ebid-myq-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 14px 18px; border: 1px dashed var(--line-control); border-radius: var(--radius); background: var(--bg); }
.ebid-myq-text p { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.ebid-myq-text p + p { margin-top: 6px; }
.ebid-myq-state { margin: 0; font-size: 0.85rem; color: var(--muted); }
.ebid-myq-state.is-closed { color: var(--stone); }
/* a project username and password, set apart so similar characters can be told apart */
.ebid-hash { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.92em; overflow-wrap: anywhere; }
/* who plan holder access is for, agreed to before paying (ebid-common.js, askPay) */
.ebid-terms { display: grid; gap: 8px; margin: 14px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); font-size: 0.9rem; color: var(--stone); }
.ebid-terms p { margin: 0; }
.ebid-terms .choice { color: var(--ink); font-weight: 600; }

.ebid-count-n { font-family: var(--sans); font-size: 1rem; font-weight: 700; color: var(--muted); margin-left: 6px; vertical-align: middle; font-variant-numeric: tabular-nums; }
/* the plan holders: a plain table in a card, scrolling sideways on a narrow phone */
.ebid-table-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow-x: auto; }
.ebid-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.ebid-table th, .ebid-table td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.ebid-table thead th { background: var(--sand); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--stone); white-space: nowrap; }
.ebid-table tbody th { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ebid-table tbody td { color: var(--stone); }
.ebid-table tbody tr:last-child > * { border-bottom: 0; }
.ebid-holders td.tnum { white-space: nowrap; }
/* company names wrap between words, never inside one; on phones the headings and dates may wrap too,
   so the names get the room */
.ebid-holders tbody th { overflow-wrap: break-word; }
@media (max-width: 520px) { .ebid-holders thead th, .ebid-holders td.tnum { white-space: normal; } }
@media (max-width: 520px) { .ebid-table th, .ebid-table td { padding: 10px 12px; } }
.ebid-welcome { display: grid; gap: 8px; }
.ebid-welcome h2 { margin: 0; overflow-wrap: anywhere; }
.ebid-welcome p { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }

.ebid-callout { background: var(--sand); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px; display: grid; gap: 12px; justify-items: start; }
.ebid-sec .ebid-callout p { color: var(--ink); }

.ebid-receipt { border: 2px solid var(--accent); border-radius: var(--radius); background: var(--surface); padding: 22px 24px; display: grid; gap: 12px; }
.ebid-receipt dl { display: grid; gap: 10px; margin: 0; }
.ebid-receipt dl > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; }
.ebid-receipt dt { color: var(--muted); font-weight: 600; }
.ebid-receipt dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.ebid-receipt .ebid-hash { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.85rem; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 520px) { .ebid-receipt dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

.ebid-state { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.ebid-dot { width: 10px; height: 10px; border-radius: 50%; background: #3B7D3B; flex: none; }
.ebid[data-state="closed"] .ebid-dot { background: var(--muted); }
/* not open yet (scheduled, or a draft not advertised): a hollow grey ring, not the green of open */
.ebid[data-state="upcoming"] .ebid-dot, .ebid[data-draft]:not([data-state="closed"]) .ebid-dot { background: transparent; box-shadow: inset 0 0 0 2px var(--muted); }
.ebid-side-dl { margin: 0; }
.ebid-side-dl > div { padding: 8px 0; border-top: 1px solid var(--line); }
.ebid-side-dl > div:first-child { border-top: 0; }

/* ---------- KEM Electronic Bidding: the practice admin (templates/admin.html, js/bid-admin.js) ---------- */
.adm-meta { color: var(--stone); font-size: 1.05rem; max-width: 72ch; }
.adm-meta strong { color: var(--ink); }
.adm-state { font-weight: 700; color: var(--ink); white-space: nowrap; }
.adm-hero .btn-row { margin-top: 20px; }
/* the sign-in box or the page's tools start right under the title, as on a project's page and New Bid */
.adm-hero ~ .adm-gate, .adm-hero ~ .section[data-body] { padding-top: 0; }
.adm-practice .ebid-switches { align-items: center; }
.adm-top { padding-bottom: 28px; }
.adm-top .ebid-practice { margin: 8px 0 0; }
.adm-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.adm-nav { position: sticky; top: calc(var(--sticky-head, 84px) + 16px); }
.adm-nav ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.adm-nav li + li { border-top: 1px solid var(--line); }
.adm-nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; padding: 10px 16px; color: var(--ink); text-decoration: none; font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .adm-nav a:hover { background: var(--sand); color: var(--accent); } }
.adm-nav a:focus-visible { outline-offset: -3px; }
.adm-nav a[aria-current="page"] { background: var(--maroon); color: var(--ivory); }
.adm-nav a[aria-current="page"]:focus-visible { outline-color: var(--parchment); }   /* on the maroon fill: ink on maroon is 1.3:1 */
.adm-n { font-size: 0.85rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.adm-nav a[aria-current="page"] .adm-n { color: var(--parchment); }
@media (max-width: 860px) {
  .adm-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .adm-nav { position: static; }
  .adm-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-nav li { box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
  .adm-nav li + li { border-top: 0; }
}
.adm-sec > h2 { font-size: var(--h2-section); margin-bottom: 12px; }
.adm-sec > h2:focus { outline: none; }     /* focus lands here for screen readers when a section opens */
/* a section opened from the menu above it on a phone is brought up to just under the header (bid-admin.js) */
.adm-sec { scroll-margin-top: calc(var(--sticky-head, 68px) + 16px); }
/* what an action did (bid-admin.js, announce): under the section's heading, and held in view under
   the header while the section scrolls */
.adm-status { position: sticky; top: calc(var(--adm-head, 84px) + 12px); z-index: 5; margin: 0 0 16px; }
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; margin-bottom: 16px; }
.adm-tile { display: grid; gap: 6px; align-content: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--stone); font-size: 0.92rem; }
.adm-tile b { font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .adm-tile:hover { border-color: var(--accent); } }
.adm-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.adm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; min-width: 0; margin: 0 0 16px; }
.adm-card .field textarea { min-height: 84px; }
.adm-cols > .adm-card { margin: 0; }
.adm-card h3 { font-size: 1.15rem; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.adm-card p { color: var(--stone); }
.adm-todo { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; color: var(--stone); }
.adm-todo a { font-weight: 700; }
.adm-dl { margin: 0; display: grid; gap: 8px; }
.adm-dl > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; }
.adm-dl dt { color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.adm-dl dd { margin: 0; color: var(--ink); }
.adm-filter { margin: 4px 0 18px; }
.adm-filter label { position: relative; display: flex; }
.adm-filter input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.adm-filter span { min-height: 40px; }
@media (pointer: coarse) { .adm-filter span { min-height: 44px; } }
.adm-q-head { font-size: 0.92rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.adm-q-head strong { color: var(--ink); }
.adm-q-text { display: grid; gap: 6px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.adm-q-text .label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.adm-q-text p { margin: 0; font-weight: 600; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.adm-link { background: none; border: 0; padding: 8px 4px; min-height: 44px; color: var(--accent); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
/* one empty state ("No addenda yet"): a dashed outline, left-aligned. Dashed means only that: nothing here yet */
.adm-empty, .li-empty { padding: 18px 20px; border: 1px dashed var(--line-control); border-radius: var(--radius); color: var(--stone); }
.adm-empty { margin: 0 0 16px; }
.adm-h3 { font-size: 1.15rem; margin: 28px 0 12px; }
.adm-sec .ebid-addendum { margin-bottom: 12px; }
.adm-sec .ebid-addendum + .ebid-addendum { margin-top: 0; }
.adm-sec .ebid-addendum h3 { font-family: var(--serif); font-size: 1.1rem; margin: 0; color: var(--ink); }
.adm-changes { margin: 10px 0 0; padding-left: 1.2em; color: var(--stone); font-size: 0.92rem; }
.adm-filelist { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; font-size: 0.92rem; color: var(--ink); }
.adm-filelist li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.adm-scroll { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 0 0 16px; }   /* relative: a hidden label inside stays inside */
/* a table wider than its box scrolls sideways with a shadow at each edge that has more beyond it
   (the covers move with the table and hide the shadow at an end it has reached) */
.adm-scroll, .ebid-table-wrap {
  background:
    linear-gradient(to right, var(--surface) 30%, transparent) left / 40px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, transparent) right / 40px 100% no-repeat local,
    linear-gradient(to right, var(--scroll-edge), transparent) left / 14px 100% no-repeat,
    linear-gradient(to left, var(--scroll-edge), transparent) right / 14px 100% no-repeat,
    var(--surface);
}
.adm-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.adm-table th, .adm-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-table thead th { background: var(--sand); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--stone); white-space: nowrap; }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table .r { text-align: right; }
.adm-table .nw { white-space: nowrap; }
.adm-table .adm-sub { display: block; font-size: 0.88rem; color: var(--stone); }
/* a link-button alone in a cell: its words on the row's first line, its 44 px reach kept */
.adm-table td > .adm-link { margin-block: -8px; text-align: left; }
.adm-holders td { vertical-align: top; }
/* the company gets room before the rest; the phone number and Send New Password may wrap */
.adm-holders td:first-child { min-width: 16rem; overflow-wrap: break-word; }
.adm-holders span.nw { white-space: normal; }
.adm-holders .adm-sub { overflow-wrap: anywhere; }   /* a long email address breaks rather than widen the table */
.adm-holders td:nth-child(3) { min-width: 12rem; }   /* room for an ordinary one on one line */
.adm-table input:not([type="checkbox"]) { min-height: 40px; padding: 6px 8px; border: 1px solid var(--line-control); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font: inherit; font-size: 1rem; width: 100%; min-width: 0; }
.adm-table input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.adm-table .adm-num { width: 100px; text-align: right; }
/* paper bids at the opening: the bid as it's read, and its prices */
.adm-paper { margin-bottom: 18px; }
/* the results: published to Bid Results, emailed, then the contacts cleared */
.adm-results { margin-top: 28px; border: 2px solid var(--accent); }
.adm-results .choice { min-height: 44px; align-items: center; }
.adm-results .hint { color: var(--muted); }
.adm-acks { border: 0; padding: 0; margin: 0; min-width: 0; }
.adm-acks legend { padding: 0; margin-bottom: 6px; font-weight: 700; font-size: 0.95rem; }   /* as the labels beside it */
.adm-ack-list { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.adm-acts { display: flex; flex-wrap: wrap; gap: 0 14px; }
.adm-nowrap { white-space: nowrap; }
.adm-tab td:nth-child(2) { min-width: 16rem; }
.adm-table input.adm-price { width: 7.5rem; min-width: 6.5rem; }
/* the item list and the prices: the description is the column that gives and takes; numbers keep
   to their width */
.adm-items td:nth-child(3), .adm-price-grid td:nth-child(3) { min-width: 14rem; }
.adm-items .r, .adm-price-grid .r { width: 1%; white-space: nowrap; }
.adm-price-grid :is(th, td) { padding-inline: 6px; }   /* nine columns: at 1440 px (with a scrollbar) the Unit price and Extension stay in view */
@media (min-width: 1100px) { .adm-table input.adm-price { width: 6.5rem; } }
.adm-price[aria-invalid="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.adm-price-grid td, .adm-price-grid th { vertical-align: middle; }
.adm-price-sum { margin: 0 0 14px; font-weight: 600; color: var(--ink); }
.adm-tag { display: block; font-size: 0.78rem; font-weight: 600; color: var(--accent); }
/* prices read from a scanned bid tab: a quiet line under each, and the ones to check against the
   bid tinted with a rule down the left edge, like the apparent low bid */
.adm-scan-read { display: block; font-size: 0.78rem; color: var(--stone); }
.adm-scan-check { font-weight: 600; }
.adm-scan-flag td { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.adm-scan-flag td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
/* the apparent low bid: a tint of the accent and a rule down its left edge, in both appearances */
.adm-low td { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.adm-low td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.adm-tab .muted { display: block; }
.adm-table:not(.adm-tab):not(.adm-items) { min-width: 520px; }
.adm-est td { color: var(--stone); font-style: italic; }
.adm-subtotal th { text-align: right; font-weight: 700; color: var(--stone); }
.adm-subtotal td { font-weight: 700; }
.adm-grand th, .adm-grand td { color: var(--ink); border-top: 2px solid var(--line-strong); }
.adm-group-alt th { box-shadow: inset 4px 0 0 var(--accent); }
.adm-decides { font-weight: 700; }
.adm-tab thead th.adm-alt-h { white-space: normal; min-width: 8rem; max-width: 13rem; }
.adm-alt-reads { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 18px; }
.adm-when { white-space: nowrap; }

.adm-draft { border: 2px solid var(--accent); }
.adm-draft .btn-row { align-items: center; }
.ebid[data-draft] [data-become], .ebid[data-draft] [data-signin] { display: none !important; }

/* ---------- New Bid (templates/admin_new.html, js/bid-new.js) ---------- */
.nb-test, .nb-restored { margin: 0 0 20px; }
.nb-sec { scroll-margin-top: calc(var(--sticky-head, 84px) + 16px); }
.nb-sec + .nb-sec { margin-top: 36px; }
.nb-sec > h2 { font-size: var(--h2-section); margin-bottom: 12px; }
.nb-sec .adm-card { margin: 0; }
.nb-fieldset { border: 0; padding: 0; margin: 0; }
.nb-fieldset legend { padding: 0; margin-bottom: 6px; }
.nb-seg { align-self: flex-start; max-width: 100%; }
.nb-kinds { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px 14px; margin: 0; min-width: 0; }
.nb-kinds legend { padding: 0 6px; font-weight: 600; color: var(--ink); }
.nb-kind-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 8px 20px; }
.nb-dates { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nb-date { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 14px; }
.nb-date .field { width: min(100%, 240px); }
.nb-add { justify-self: start; }
/* New Bid's line items (static/js/bid-items.js): a grid filled in line by line, and an import
   that matches a spreadsheet's columns before loading it, as FieldBook does */
.li-tools { align-items: center; }
.li-card { container-type: inline-size; }
.li-body { position: relative; }
.li-scroll { margin: 0; max-height: min(72vh, 760px); overflow: auto; scroll-padding-top: 48px; }
.li-body > .li-scroll { margin: 0 -22px; border-inline: 0; border-radius: 0; }
.li-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.92rem; }
.li-grid th, .li-grid td { padding: 4px 6px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.li-grid thead th { position: sticky; top: 0; z-index: 1; background: var(--sand); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--stone); white-space: nowrap; padding: 10px 8px; vertical-align: bottom; }
.li-grid .r { text-align: right; }
.li-grid tbody tr:last-child > * { border-bottom: 0; }
.li-grid .li-group th, .adm-items .adm-group th { background: var(--bg); padding: 12px 12px 6px; font-weight: 700; color: var(--ink); text-align: left; }
/* the grid: fixed columns, and the description takes the rest and grows to fit */
.li-edit { table-layout: fixed; min-width: 680px; }
.li-c-n { width: 52px; } .li-c-code { width: 124px; } .li-c-qty { width: 90px; } .li-c-unit { width: 86px; } .li-c-price { width: 134px; } .li-c-act { width: 80px; }   /* Unit fits ALLOW, Fixed price 12,345,678.90 */
.li-c-opt { width: 84px; }
.li-edit .li-opt { text-align: center; }
.li-edit td.li-opt { padding-top: 12px; }
.li-edit input[type="checkbox"] { display: inline-block; width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; border: 0; accent-color: var(--accent); cursor: pointer; }
.li-edit .li-head-in { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.li-edit .li-head-in textarea { flex: 1 1 240px; }
.li-edit .li-check { min-height: 36px; align-items: center; color: var(--ink); font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.li-edit .li-check input { margin-top: 0; }
.li-edit .li-alt-tag { flex: none; }
.li-edit .li-head-alt > td { background: var(--sand); }
.li-edit .li-head-alt > td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.li-edit thead .li-n { padding: 10px 4px 10px 22px; }
.li-edit .li-n { padding: 13px 4px 0 22px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.li-edit :is(input, textarea) { display: block; width: 100%; min-width: 0; min-height: 36px; padding: 7px 8px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--ink); font: inherit; font-size: 0.95rem; line-height: 1.35; }
@media (pointer: coarse) { .li-edit :is(input, textarea) { font-size: max(1rem, 16px); } }   /* 16 px on touch screens, so iPhones don't zoom in */
.li-edit textarea { resize: none; overflow: hidden; field-sizing: content; }
.li-edit .li-blank :is(input, textarea) { border-color: var(--line); }
@media (hover: hover) and (pointer: fine) { .li-edit tbody tr:hover :is(input, textarea) { border-color: var(--line); } }
.li-edit :is(input, textarea):focus { border-color: var(--ink); background: var(--bg); }
.li-edit :is(input, textarea):focus-visible { outline: 3px solid var(--focus); outline-offset: 0; }
.li-edit [aria-invalid="true"] { border-color: var(--accent); background: var(--invalid-bg); }
.li-edit .li-head > td { background: var(--bg); padding-top: 10px; }
.li-edit .li-head > td:first-child { padding-left: 16px; }
.li-edit .li-head [data-k="head"] { font-weight: 700; font-size: 1rem; }
.li-edit .li-act { padding: 6px 12px 0 0; text-align: right; white-space: nowrap; }
.li-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--stone); cursor: pointer; }
.li-btn[aria-expanded="true"] { background: var(--sand); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .li-btn:hover { background: var(--sand); color: var(--ink); }
  .li-btn[data-li-remove]:hover { color: var(--accent); }
}
.li-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.li-menu { position: absolute; z-index: 5; min-width: 210px; display: grid; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 10px 28px rgb(0 0 0 / 0.16); }
.li-menu button { padding: 10px 12px; border: 0; border-radius: 4px; background: none; color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.li-menu button:focus { background: var(--sand); outline: none; }
@media (hover: hover) and (pointer: fine) { .li-menu button:hover { background: var(--sand); } }
.li-menu button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.li-preview { min-width: 720px; }
.li-preview td { padding: 8px 10px; }
.li-empty { margin: 0; }
.li-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.li-sum { flex: 1 0 100%; margin: 0; color: var(--stone); }
.li-sum strong { color: var(--ink); }
.li-bad { color: var(--accent); font-weight: 700; }
.li-undo { margin-left: 6px; }
.li-problem { display: block; margin-top: 4px; color: var(--ink); }
/* a narrow card: each line is a small form of its own */
@container (max-width: 620px) {
  .li-body > .li-scroll { margin: 0; max-height: none; overflow: visible; border: 0; background: none; }
  .li-edit, .li-edit tbody { display: grid; gap: 10px; min-width: 0; }
  .li-edit colgroup, .li-edit thead { display: none; }
  .li-edit tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 8px 10px; padding: 8px 10px 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
  .li-edit tr > * { display: block; padding: 0; border: 0; }
  .li-edit tbody tr:last-child > * { border: 0; }
  .li-edit .li-n { grid-column: 1 / 3; grid-row: 1; align-self: center; padding: 0; color: var(--stone); font-weight: 700; }
  .li-edit .li-n::before { content: "Line "; }
  .li-edit .li-n:empty::before { content: "New line"; }
  .li-edit .li-act { grid-column: 3; grid-row: 1; padding: 0; }
  .li-edit .li-desc { grid-column: 1 / -1; grid-row: 2; }   /* the description takes a row of its own; the item, quantity, unit and price follow it */
  .li-edit .li-price { grid-column: 1 / 3; }   /* room for 12,345,678.90 */
    .li-edit td[data-label] { display: flex; flex-direction: column; justify-content: flex-end; }
  .li-edit td[data-label]::before { content: attr(data-label); display: block; margin: 0 0 3px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--stone); }
  .li-edit :is(input, textarea) { min-height: 44px; border-color: var(--line-control); background: var(--surface); }
  .li-edit textarea { padding-block: 10.5px; }   /* one line of a box that grows sits level with the fields beside it */
  .li-edit .li-head { grid-template-columns: minmax(0, 1fr) auto; align-items: center; background: var(--bg); }
  .li-edit .li-head > td, .li-edit .li-head > td:first-child { background: none; padding: 0; }
  .li-edit .li-head .li-act { grid-column: 2; }
  .li-edit td.li-opt { padding: 0; text-align: left; }
  .li-edit td.li-opt input { margin: 12px 0; }
  .li-edit .li-head-alt { background: var(--sand); box-shadow: inset 4px 0 0 var(--accent); }
  .li-edit .li-head-alt > td:first-child { box-shadow: none; }
  .li-edit .li-check { min-height: 44px; }
  .li-btn { width: 44px; height: 44px; }
}
.li-map { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.li-map-head h3 { font-size: 1.2rem; margin: 0 0 4px; }
.li-map-head h3:focus { outline: none; }
.li-map .field-row { max-width: 720px; }
.li-map select, .li-map textarea { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line-control); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; }
.li-map textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem; }
@media (pointer: coarse) { .li-map textarea { font-size: max(1rem, 16px); } }
.li-maps { display: grid; grid-template-columns: max-content minmax(0, 300px) minmax(0, 1fr); gap: 8px 14px; align-items: center; }
.li-map-l { font-weight: 700; }
.li-map-s { color: var(--muted); font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-note { margin: 0; }
.li-mode { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (max-width: 700px) {
  .li-maps { grid-template-columns: 1fr; gap: 4px; }
  .li-map-s { white-space: normal; margin-bottom: 8px; }
}

.adm-items .adm-sec th { background: var(--sand); text-align: left; font-weight: 700; }
/* Edit Project and the dates: Ohio's holidays and the notice rules */
.nb-day { margin: 6px 0 0; color: var(--accent); font-weight: 600; }
/* a date and its time (New Bid's opening and deadline: the time starts at KEM's usual one) */
.nb-when { display: flex; flex-wrap: wrap; gap: 8px; }
.nb-when input[type="date"] { flex: 1.4 1 140px; min-width: 0; padding-inline: 12px; }
.nb-when input[type="time"] { flex: 1 1 132px; min-width: 0; padding-inline: 10px; }
.nb-window { margin: 0; }
.nb-window p { margin: 0; }
.nb-window .adm-link { padding: 0 2px; min-height: 0; }
/* New Bid's calendar: two months from the opening, holidays, the opening, the deadline and the
   recommended deadline (2 to 4 weeks after it opens) */
.nb-cal { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px 14px; display: grid; gap: 10px; background: var(--bg); }
.nb-cal-head { display: flex; align-items: center; gap: 10px; }
.nb-cal-rec { flex: 1; margin: 0; font-size: 0.95rem; color: var(--stone); text-align: center; }
.nb-cal-rec strong { color: var(--ink); }
.nb-cal-nav { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line-control); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .nb-cal-nav:hover { border-color: var(--ink); } }
.nb-cal-months { display: grid; gap: 8px 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.nb-cal-month { border-collapse: collapse; width: 100%; table-layout: fixed; }
.nb-cal-month caption { font-weight: 700; padding: 2px 0 6px; text-align: left; }
.nb-cal-month th { font-size: 0.75rem; font-weight: 700; color: var(--muted); padding: 2px 0; }
.nb-cal-month abbr { text-decoration: none; }
.nb-cal-month td { padding: 2px; text-align: center; }
.nb-cal-month button { width: 100%; aspect-ratio: 1; max-width: 40px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--ink);
  font: inherit; font-size: 0.9rem; font-variant-numeric: tabular-nums; cursor: pointer; padding: 0; }
@media (hover: hover) and (pointer: fine) { .nb-cal-month button:hover:not(:disabled) { border-color: var(--ink); } }
.nb-cal-month button:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.nb-cal-month button:disabled { cursor: default; }
.nb-cal-month .is-past { opacity: .4; }
.nb-cal-month .is-off { color: var(--muted); }
.nb-cal-month .is-hol { background: var(--invalid-bg); color: var(--accent); font-weight: 700; text-decoration: line-through; }
.nb-cal-month .is-rec { background: var(--water); }
.nb-cal-month .is-today { border-color: var(--line-strong); }
.nb-cal-month .is-open { background: var(--ink); color: var(--bg); font-weight: 700; text-decoration: none; }
.nb-cal-month .is-due { background: var(--accent); color: var(--on-inverse); font-weight: 700; text-decoration: none; }
.nb-cal-help { margin: 0; grid-column: 1 / -1; }
.nb-cal-pick .adm-link { padding: 6px 0; min-height: 0; font-weight: 400; }
.nb-cal-pick [aria-pressed="true"] { font-weight: 700; text-decoration-thickness: 2px; }
@media (pointer: coarse) {
  .nb-cal-nav { width: 44px; height: 44px; }
  .nb-cal-month button { max-width: 44px; min-height: 44px; aspect-ratio: auto; }   /* as wide as a phone allows, 44 px tall */
  .nb-cal-pick .adm-link { min-height: 44px; }
}
.nb-cal-key { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.85rem; color: var(--stone); }
.nb-cal-key li { display: flex; align-items: center; gap: 6px; }
.nb-cal-key i { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.nb-cal-key .k-open { background: var(--ink); }
.nb-cal-key .k-due { background: var(--accent); }
.nb-cal-key .k-rec { background: var(--water); }
.nb-cal-key .k-off { background: var(--invalid-bg); border: 1px solid var(--accent); }
/* the pre-bid meeting, when there is one */
.nb-prebid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.nb-holidays { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
.nb-holidays summary { cursor: pointer; font-weight: 600; color: var(--ink); min-height: 28px; }
@media (pointer: coarse) { .nb-holidays summary { padding-block: 9px; margin-block: -9px; } }
.nb-holidays[open] summary { margin-bottom: 8px; }
.nb-holidays .ebid-sub { margin-bottom: 8px; }
.nb-holidays ul { margin: 0; padding-left: 1.2em; columns: 2 18rem; column-gap: 28px; font-size: 0.92rem; color: var(--stone); }
.nb-warnings { margin-top: 16px; }
.nb-warnings ul { margin: 4px 0 0; padding-left: 1.2em; font-size: 0.92rem; color: var(--stone); }
.nb-warn-h { margin: 0; font-weight: 700; color: var(--ink); }
.nb-docs { margin-bottom: 14px; }
.ebid-files:empty { display: none; }
.nb-docs li { grid-template-columns: 22px minmax(0, 1fr) auto auto; }
.nb-doc-gone .ebid-file-name { color: var(--muted); }
.nb-doc-gone .nb-doc-name { text-decoration: line-through; }
.nb-doc-act { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 12px; }
@media (max-width: 560px) {
  .nb-docs .ebid-file-size { grid-column: 2 / -1; }
  .nb-docs .nb-doc-act { grid-column: 2 / -1; grid-row: 3; justify-content: flex-start; }
}
.ebid-files:not([hidden]) + .ebid-files { margin-top: 10px; }
.adm-edit-row { margin-bottom: 16px; }
.nb-ren { width: 100%; min-height: 40px; padding: 6px 10px; font: inherit; font-weight: 400; border: 1px solid var(--line-control); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); }
.nb-add-h { font-size: 1rem; margin: 0; }
.nb-add-dlg .adm-changes { margin: 0; max-height: 40vh; overflow-y: auto; }
.nb-file { font-weight: 600; color: var(--ink) !important; overflow-wrap: anywhere; }
.nb-file:empty { display: none; }
.nb-error { margin: 0; }
.adm-card > .nb-error { color: var(--accent); font-weight: 600; }
[data-nb-ok] .btn-row, [data-nb-error] .btn { margin-top: 12px; }

@media print {
  .ebid-receipt { break-inside: avoid; }
}

/* ---------- Bid History (templates/bid_account.html, static/js/bid-account.js) ---------- */
.bid-mine { margin: 14px 0 0; font-size: 0.95rem; color: var(--stone); }
.acct-body { padding-bottom: var(--section); display: grid; gap: 40px; }
.acct-main { display: grid; gap: 40px; }
.acct-signin { max-width: 640px; }
.acct-signin h2 { margin: 0; font-size: var(--h2-card); }
.acct-loading { color: var(--muted); margin: 0; }
.acct-sec { display: grid; gap: 16px; }
.acct-sec > h2 { margin: 0; font-size: var(--h2-section); }
.acct-count { font-family: var(--sans); font-size: 0.6em; font-weight: 600; color: var(--muted); vertical-align: middle; }
.acct-list { display: grid; gap: 16px; }
.acct-proj { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; display: grid; gap: 12px; min-width: 0; }
.acct-proj-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.acct-proj-head h3 { margin: 0; min-width: 0; }
.acct-proj-head h3 a { color: var(--ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .acct-proj-head h3 a:hover { color: var(--accent); text-decoration: underline; } }
.acct-state { display: inline-flex; align-items: center; gap: 7px; font-size: 0.92rem; font-weight: 700; color: var(--ink); }
.acct-state--closed .ebid-dot { background: var(--muted); }
.acct-meta { margin: 0; color: var(--stone); font-size: 0.95rem; }
.acct-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px 28px; }
.acct-box { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.acct-box h4 { margin: 0; font-family: var(--sans); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.acct-box p { margin: 0; color: var(--stone); }
.acct-box > p:first-of-type { color: var(--ink); font-weight: 600; }
.acct-box .btn-row { margin-top: 6px; align-items: center; }
.adm-table td.ebid-hash { white-space: nowrap; }
/* People from Your Company (bid-account.js, usersBox) */
.acct-user-list { list-style: none; margin: 0; padding: 0; display: grid; }
.acct-user-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.acct-user-list li > span { min-width: 0; overflow-wrap: anywhere; }
.acct-user-list .muted { font-size: 0.9rem; }
.acct-user-state { display: block; font-size: 0.85rem; color: var(--muted); }
.acct-user-state--on { color: var(--ink); font-weight: 600; }
.acct-user-acts { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; }
.acct-invite { max-width: 760px; }
.acct-invite p { margin: 0; }
.acct-invite h2:focus { outline: none; }
.acct-user-add { display: grid; gap: 10px; margin-top: 8px; }
.acct-user-add .field-row { gap: 10px 14px; }
.acct-box .acct-user-add .ebid-sub { font-size: 0.85rem; }
.acct-receipt h4 { margin: 0; font-size: 1.3rem; }
.acct-receipt-from { margin: 0; font-size: 0.85rem; color: var(--stone); }
.acct-pair { display: grid; gap: 40px 24px; align-items: start; }
@media (min-width: 900px) { .acct-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.acct-dl { display: grid; gap: 8px; margin: 0; }
.acct-dl > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
.acct-dl dt { color: var(--muted); font-weight: 600; }
.acct-dl dd { margin: 0; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.acct-staff { margin: 0; color: var(--stone); }
/* Get Bid Alerts (Bid Opportunities) */
/* Bid Opportunities: how bidding works, what's out for bid and the results down the page, beside
   the Receive Bid Alerts card, which stays in view (.stick) where the columns sit side by side */
/* the two figures in the header: side by side, one above the other when they wrap (a line
   between them either way: the shadow at a box's outer edge is clipped) */
.bid-stats { display: flex; flex-wrap: wrap; flex: 0 1 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.bid-stats > div { flex: 1 1 140px; padding: 18px 26px; box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); }
.bid-stats b { display: block; font-family: var(--serif); font-size: 2.2rem; line-height: 1; }
.bid-stats .bid-stat-accent { color: var(--accent); }
.bid-stats .bid-stat-none { flex-basis: 240px; display: flex; flex-direction: column; justify-content: center; }   /* on a phone it takes its own row */
.bid-stat-none strong { display: block; color: var(--ink); font-size: 1.05rem; white-space: nowrap; }
.bid-stats .bid-stat-none span { white-space: normal; }
.bid-stats span { display: block; margin-top: 4px; font-size: 0.9rem; color: var(--stone); white-space: nowrap; }
.bidops-body { padding-top: clamp(40px, 5vw, 64px); }
.bid-sec + .bid-sec { margin-top: 56px; }
/* The bidding demo under How Bidding Works (demos/bid-demo/): a still at the size the demo draws,
   the wide design or, in a column under 600 px, the phone one, until the demo takes its place */
.bid-demo-figure { margin: 0 0 28px; container-type: inline-size; }
.bid-demo-frame { position: relative; aspect-ratio: 760 / 476; }
.bid-demo-still { display: none; width: 100%; height: 100%; border-radius: 14px; }
.bid-demo-still[data-v="wide"][data-t="light"] { display: block; }
:root[data-theme="dark"] .bid-demo-still[data-v="wide"][data-t="light"] { display: none; }
:root[data-theme="dark"] .bid-demo-still[data-v="wide"][data-t="dark"] { display: block; }
@container (max-width: 599.98px) {
  .bid-demo-frame { aspect-ratio: 343 / 600; max-width: 343px; margin-inline: auto; }
  .bid-demo-still[data-v="wide"][data-t], :root[data-theme] .bid-demo-still[data-v="wide"][data-t] { display: none; }
  .bid-demo-still[data-v="phone"][data-t="light"] { display: block; }
  :root[data-theme="dark"] .bid-demo-still[data-v="phone"][data-t="light"] { display: none; }
  :root[data-theme="dark"] .bid-demo-still[data-v="phone"][data-t="dark"] { display: block; }
}
.bid-demo-frame[data-live] > .bid-demo-still { display: none !important; }
.bid-demo-live { position: absolute; inset: 0; }
.bid-demo-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; min-height: 44px; margin-top: 4px; color: var(--muted); font-size: 0.9rem; }
@container (max-width: 599.98px) { .bid-demo-cap { justify-content: center; text-align: center; } }
.bid-sec > h2 { margin-bottom: 20px; }
.bidops-main .steps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.bid-alerts-side { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.bid-alerts-side > .icon { color: var(--accent); }
.bid-alerts-side h2 { margin: 4px 0 0; font-size: var(--h2-card); }
.bid-alerts-side p { margin: 0 0 6px; color: var(--stone); }
.bid-alerts-side .btn { align-self: stretch; justify-content: center; }
/* Get Bid Alerts (/bidding/alerts/): the sign-up form */
.alerts-main { display: grid; gap: 28px; align-items: start; padding-bottom: var(--section); }
.alerts-main .form { max-width: 760px; }
.form .alerts-kinds { border: 0; padding: 0; background: none; gap: 10px; }
.form .alerts-kinds legend { font-family: var(--sans); font-size: 0.95rem; font-weight: 700; margin: 0 0 8px; padding: 0; }
.alerts-kinds .choices { gap: 10px 26px; }
.alerts-kinds .choice { color: var(--ink); font-size: 1rem; min-height: 44px; align-items: center; }
.alerts-kinds .choice input { margin-top: 0; }
.alerts-consent { margin: 0; font-size: 0.85rem; color: var(--stone); }
/* what the alerts are: beside the form on wide screens, after it on narrow ones */
@media (min-width: 1000px) { .alerts-main { grid-template-columns: minmax(0, 760px) minmax(0, 360px); gap: 40px; } }
.alerts-about ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; color: var(--stone); font-size: 0.95rem; }
/* the same form as a pop-up on Bid Opportunities and the bid pages (_bid_alerts_dialog.html): no
   box around it inside the pop-up's own */
.alerts-dlg { width: min(620px, calc(100vw - 32px)); }
.alerts-dlg .ebid-dlg-body { padding-bottom: 26px; }
.alerts-dlg-lead { margin: 0; color: var(--stone); }
.alerts-dlg .alerts-form > fieldset { border: 0; padding: 0; background: none; border-radius: 0; }
.alerts-dlg .form-note { margin: 0; }
.alerts-done { display: grid; gap: 14px; }
.alerts-done .form-status:focus { outline: none; }
/* Bid Alerts and Delete Account (Bid History) */
.acct-delete { max-width: 760px; gap: 14px; }
.acct-delete-confirm { padding: 12px 16px; border: 2px solid var(--accent); border-radius: var(--radius-sm); display: grid; gap: 10px; }
.acct-delete-confirm p { margin: 0; }
.acct-delete-confirm .btn-row { margin: 0; }
@media (max-width: 520px) {
  .acct-proj { padding: 18px; }
  .acct-dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* ---------- The Staff Portal (templates/admin_home.html, linked in the footer) ---------- */
/* One sign-in, then a section for each thing the person's roles allow: a heading over a grid of
   tiles (Quick Links, Website, Marketing, My Tools), or over a card (Bids,
   Staff and Roles). The tiles share one grid on every section: three across on a computer (the
   columns line up from section to section), two on a tablet, one on a phone. Quick Links come in
   groups, each under a small heading. */
.staff-hero .lead { margin-bottom: 0; }
.staff-error { margin-top: 20px; max-width: 62ch; }
/* minmax(0, 1fr): a column as wide as the window at most, never as wide as the staff table */
.staff-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: var(--section); }
.portal:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(36px, 4.5vw, 52px); }
.portal-sec:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.portal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; min-height: 40px; }
.portal-h { font-size: var(--h2-section); }
.portal-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
/* Quick Links in groups (staff-links.yml, group): a small heading over each group's tiles, closer
   to its tiles than to the group above */
.portal-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.portal-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.portal-sub { font-family: var(--sans); font-size: 1rem; font-weight: 650; line-height: 1.3; color: var(--stone); }
.portal-tiles > li { display: flex; min-width: 0; }
.portal-tile { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 14px 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: border-color .15s ease, transform .16s var(--ease-out); }
.portal-ic { flex: none; width: 42px; height: 42px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--sand); color: var(--accent); }
/* a Quick Link without an icon: its first letter */
.portal-ic--mark { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; line-height: 1; }
.portal-tx { min-width: 0; display: grid; gap: 2px; }
.portal-tx strong { font-weight: 650; line-height: 1.3; }
.portal-tx span { font-size: 0.86rem; line-height: 1.35; color: var(--stone); }
/* a Quick Link's note (or its address, when it has no note): two lines at most, an address
   broken anywhere rather than pushing the tile wider */
.portal-tile--out .portal-tx span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.portal-go { flex: none; margin-left: auto; color: var(--muted); transition: transform .16s var(--ease-out), color .15s ease; }
@media (hover: hover) and (pointer: fine) {
  .portal-tile:hover { border-color: var(--line-strong); }
  .portal-tile:hover strong { color: var(--accent); }
  .portal-tile:hover .portal-go { color: var(--accent); transform: translateX(2px); }
  .portal-tile--out:hover .portal-go { transform: translate(1px, -1px); }
}
.portal-tile:active { transform: scale(0.985); }
.portal-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.portal-card { padding: clamp(16px, 2.4vw, 24px); gap: 14px; }
.portal-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.portal-card-head h3 { font-size: var(--h2-card); }
/* Bids: the list, with a bell beside New Bid that opens Bid Alerts in a pop-up */
.portal-head-acts { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.portal-bell { position: relative; flex: none; width: 40px; height: 40px; padding: 0; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: border-color .15s ease, color .15s ease, transform .16s var(--ease-out); }
.portal-bell .icon { color: inherit; }
@media (hover: hover) and (pointer: fine) { .portal-bell:hover { border-color: var(--accent); color: var(--accent); } }
.portal-bell:active { transform: scale(0.96); }
.portal-bell:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.portal-bell-dot { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
@media (pointer: coarse) { .portal-bell { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { .portal-bell { transition: none; } .portal-bell:active { transform: none; } }
.staff-bids { list-style: none; margin: 0; padding: 0; }
.staff-bid { padding: 14px 0; border-bottom: 1px solid var(--line); }
.staff-bid:first-child { padding-top: 0; }
.staff-bid:last-child { padding-bottom: 0; border-bottom: 0; }
.staff-bid--none { color: var(--stone); }
.staff-bid > a { font-weight: 700; font-size: 1.05rem; }
.staff-bid-meta { margin-top: 4px; font-size: 0.92rem; color: var(--stone); }
.staff-bid-meta strong { color: var(--accent); }
.staff-note { font-size: 0.9rem; color: var(--stone); }
/* Staff and Roles: what each role can do, folded away until it's wanted */
.staff-roles-help { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.staff-roles-help summary { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-weight: 700; color: var(--accent); cursor: pointer; list-style: none; }
.staff-roles-help summary::-webkit-details-marker { display: none; }
.staff-roles-chev { transition: transform .2s var(--ease-out); }
.staff-roles-help[open] .staff-roles-chev { transform: rotate(90deg); }
.staff-roles-help summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.staff-roles-help .staff-roles { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .portal-tile, .portal-go, .staff-roles-chev { transition: none; } .portal-tile:active { transform: none; } }
/* Bid Alerts: the Constant Contact connection and the list for each kind of work */
/* Staff and Roles (Site Admins): what each role does, the staff list and its form */
.staff-roles { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px 32px; font-size: 0.9rem; max-width: 1000px; }
.staff-roles dt { font-weight: 700; color: var(--ink); }
.staff-roles dd { margin: 2px 0 0; color: var(--stone); }
.staff-person-form .field > .choice + .choice { margin-top: 8px; }
@media (pointer: coarse) { .staff-person-form .choice { min-height: 44px; align-items: center; } .staff-person-form .choice input { margin-top: 0; } }
.staff-person-title { display: block; font-size: 0.88rem; color: var(--stone); font-weight: 400; }
.staff-hint { margin: 6px 0 0; font-size: 0.86rem; color: var(--stone); }
/* Staff and Roles: the grid, a row per person and a column per permission (a bid role, each part
   of the website, SOQs, Contacts, Site Admin); a box saves the moment it changes. The groups of
   columns (Website, Marketing) are set apart by a rule on their left. The name stays in view
   when the grid scrolls sideways. */
.staff-people .adm-table.staff-grid { min-width: 980px; }   /* past .adm-table's 520px: it scrolls sideways below that */
.staff-grid th, .staff-grid td { vertical-align: middle; }
.staff-grid thead th { white-space: normal; line-height: 1.25; }
.staff-grid thead th[scope="colgroup"] { text-align: center; }
.staff-grid .staff-tick-h { text-align: center; font-size: 0.7rem; letter-spacing: 0.03em; padding: 8px 4px; min-width: 58px; }
.staff-grid .staff-g { border-left: 1px solid var(--line); }
.staff-grid th.staff-name { min-width: 190px; max-width: 240px; font-weight: 400; text-align: left; }
.staff-grid th.staff-name, .staff-grid .staff-name-h { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: inset -1px 0 0 var(--line); }
.staff-grid .staff-name-h { z-index: 2; background: var(--sand); }
.staff-grid td.staff-tick { text-align: center; padding: 2px 4px; }
.staff-tick-box { display: inline-grid; place-items: center; width: 44px; height: 40px; border-radius: var(--radius-sm); cursor: pointer; }
.staff-tick-box input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.staff-tick-box input:disabled { cursor: not-allowed; opacity: 0.5; }
.staff-tick-box:has(input:disabled) { cursor: not-allowed; }
.staff-tick-box input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .staff-tick-box:not(:has(input:disabled)):hover { background: var(--sand); } }
/* a box's name and the "Website" captions show only on a phone, where there are no column headings */
.staff-tick-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.staff-grid .staff-cap { display: none; }
.staff-role-box { display: block; }
.staff-grid select { font: inherit; font-size: 0.92rem; min-height: 40px; padding: 6px 8px; border: 1px solid var(--line-control); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); max-width: 100%; }
.staff-grid select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.staff-grid tr[aria-busy="true"] { cursor: progress; }
/* someone just added: their row lights up once, so it's found */
.staff-grid tr.is-new > * { animation: staff-new 1.6s var(--ease-out); }
@keyframes staff-new { from { background-color: var(--sand); } }
.staff-detail > td { padding: 12px; background: var(--bg); }
.staff-detail .staff-person-form { margin: 0; }
.staff-person-form .btn-row { align-items: center; }
.staff-remove { margin-left: auto; color: var(--accent); }
.staff-acts { white-space: nowrap; }
.staff-acts .adm-link { padding-inline: 2px; }
@media (pointer: coarse) { .staff-acts .adm-link { min-height: 44px; } }
.staff-grid-hint { margin: 0 0 10px; max-width: 75ch; }
/* a long list scrolls inside the card, under the column headings, which stay at the top (the names
   stay at the left when it scrolls sideways). Borders are the cells' own (separate), so each
   heading keeps its lines as it sticks; the second heading row sits under the first, whose height
   the page measures (--staff-head-1). */
.staff-people .adm-scroll { max-height: max(380px, calc(100dvh - 170px)); overflow: auto; }
.staff-people .adm-table.staff-grid { border-collapse: separate; border-spacing: 0; }
.staff-grid thead th { position: sticky; top: 0; z-index: 2; }
.staff-grid thead tr + tr th { top: var(--staff-head-1, 34px); }
.staff-grid thead .staff-name-h { z-index: 3; }
/* when the card is too narrow for the grid (phones and small tablets): each person a card, with
   their bid role and then each box with its name beside it, two across */
.staff-people { container: staff-people / inline-size; }
@container staff-people (max-width: 760px) {
  .staff-people .adm-scroll { overflow: visible; max-height: none; }
  .staff-people .adm-table.staff-grid { min-width: 0; }
  .staff-grid thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .staff-grid tbody { display: block; }
  .staff-grid tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; padding: 14px; border-bottom: 1px solid var(--line); }
  .staff-grid tbody tr:last-child { border-bottom: 0; }
  .staff-grid th, .staff-grid td { display: block; padding: 0; border: 0; text-align: left; }
  .staff-grid th.staff-name { position: static; max-width: none; box-shadow: none; grid-column: 1 / -1; margin-bottom: 8px; }
  .staff-grid td.staff-role, .staff-grid td.staff-acts { grid-column: 1 / -1; }
  .staff-role-box { display: flex; align-items: center; gap: 12px; }
  .staff-grid .staff-cap { display: block; grid-column: 1 / -1; margin: 12px 0 2px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
  .staff-grid .staff-g { border-left: 0; }
  .staff-grid td.staff-tick { text-align: left; }
  .staff-tick-box { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: auto; height: auto; min-height: 40px; padding: 0 6px; margin-left: -6px; }
  .staff-tick-l, .staff-role-box .staff-tick-l { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; font-size: 0.92rem; color: var(--stone); }
  .staff-grid td.staff-acts { margin-top: 8px; }
  .staff-detail { display: block; }
  .staff-detail > td { display: block; padding: 12px 0 0; background: none; }
}
/* what a change in the grid did, with Undo: at the foot of the window */
.staff-toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); z-index: 40; display: flex; align-items: center; gap: 6px 16px; max-width: min(640px, calc(100vw - 32px)); padding: 12px 16px 12px 18px; border-radius: var(--radius); background: var(--inverse); color: var(--on-inverse); box-shadow: 0 10px 30px rgba(27, 23, 20, 0.22), 0 2px 6px rgba(27, 23, 20, 0.14); font-size: 0.95rem;
  transform: translate(-50%, 8px); opacity: 0; visibility: hidden; transition: transform .2s var(--ease-out), opacity .2s var(--ease-out), visibility 0s linear .2s; }
.staff-toast.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .2s var(--ease-out), opacity .2s var(--ease-out), visibility 0s; }
.staff-toast.is-warn { background: var(--accent); color: #fff; }
.staff-toast .adm-link { color: inherit; font-weight: 700; flex: none; }
@media (prefers-reduced-motion: reduce) { .staff-toast, .staff-toast.is-on { transform: translate(-50%, 0); transition: opacity .15s, visibility 0s linear .15s; } .staff-grid tr.is-new > * { animation: none; } }
.staff-person-form { display: grid; gap: 14px; }
.staff-person-form h3 { margin: 0; }
.staff-person-form .label { font-weight: 700; font-size: 0.95rem; }
/* Staff and Roles: what someone can edit on the website, ticked one by one */
.staff-areas { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 8px; justify-items: start; }
.staff-areas legend { padding: 0; font-weight: 700; font-size: 0.95rem; }
.staff-areas .staff-hint { margin: 0; }
.staff-area-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 8px 20px; width: 100%; }
.staff-alerts-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-width: 0; }
.staff-alerts-dlg .ebid-dlg-body > .form-status { margin: 0; }
.staff-alerts-dlg .form-status:focus { outline: none; }
.staff-alerts-body { display: grid; gap: 14px; }
.staff-alerts-body > p, .staff-alerts-body .btn-row { margin: 0; }
.staff-alerts-body .btn-row { align-items: center; }
.staff-alert-lists { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.staff-alert-lists li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
/* each list's count in a column on the right, so the numbers line up */
.staff-alert-lists li > :last-child { max-width: 13em; text-align: right; }
@media (max-width: 560px) { .staff-alert-lists li { grid-template-columns: minmax(0, 1fr); } .staff-alert-lists li > :last-child { max-width: none; text-align: left; } }
.staff-alert-lists .muted { color: var(--stone); font-size: 0.92rem; }
.staff-alert-missing { color: var(--accent); font-size: 0.92rem; }

/* ---------- KEM Electronic Bidding: signing in, test mode, the admin's gate and emails ---------- */
.ebid-dlg { border: 0; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: min(88vh, 860px); max-height: min(88dvh, 860px); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); color: var(--ink); }
.ebid-dlg::backdrop { background: rgba(27, 23, 20, 0.55); }
.ebid-dlg[open] { display: flex; flex-direction: column; }
.ebid-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 12px; border-bottom: 1px solid var(--line); }
.ebid-dlg-head h2 { font-size: var(--h2-card); margin: 0; }
.ebid-dlg-head h2:focus { outline: none; }
.ebid-dlg-close { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--stone); display: grid; place-items: center; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ebid-dlg-close:hover { background: var(--sand); color: var(--ink); } }
.ebid-dlg > .form-status { margin: 14px 22px 0; }
.ebid-dlg-body { padding: 16px 22px 22px; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 14px; }
/* it pops in as the search dialog does (EBID.modal locks the page behind it) */
@media (prefers-reduced-motion: no-preference) {
  .ebid-dlg[open] { animation: kem-pop .2s var(--ease-out); }
  .ebid-dlg[open]::backdrop { animation: kem-fade .2s ease-out; }
}
.ebid-dlg-body form { display: grid; gap: 14px; }
.ebid-dlg-body .btn-row { margin-top: 4px; align-items: center; }
.ebid-code { font-size: 1.5rem !important; letter-spacing: 0.3em; font-variant-numeric: tabular-nums; max-width: 12ch; }
/* one notice: a 4 px rule down its left side, on sand. The rule is in the accent for a warning or a
   test-site note, and in the control grey for plain information (.notice--info). The older names
   are the same notice, for the pages and scripts that write them. */
.notice, .ebid-test-code, .ebid-test, .adm-warn, .nb-warnings, .li-note, .nb-window.form-status { padding: 10px 14px; border: 0; border-left: 4px solid var(--accent); border-radius: var(--radius-sm); background: var(--sand); color: var(--ink); font-size: 0.95rem; }
.notice--info, .li-note { border-left-color: var(--line-control); }
.ebid-test-code strong { font-size: 1.15rem; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.ebid-account { margin-top: 14px; font-size: 0.95rem; color: var(--stone); overflow-wrap: anywhere; }
.ebid-account .adm-link { min-height: 0; padding: 0 2px; }
@media (pointer: coarse) { .ebid-account .adm-link { padding-block: 10px; margin-block: -10px; } }   /* Sign Out: 44 px to tap, the line stays put */
.adm-gate-card { max-width: 640px; gap: 12px; }
.adm-gate-card h2 { font-size: var(--h2-card); margin: 0; }
.adm-ro { font-weight: 600; }
.adm-sec .btn-row + .ebid-sub { margin-top: 12px; }
.adm-mail { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 0 0 10px; }
.adm-mail summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 16px; cursor: pointer; }
/* an Email Log row and a site visit (the Staff Portal's photo pages) open and close: a chevron at the
   end turns over when it's open, and the row lights up under the pointer */
.adm-mail > summary, .we-visit > summary { position: relative; padding-right: 46px; border-radius: calc(var(--radius) - 1px); }
.adm-mail[open] > summary, .we-visit[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
@media (hover: hover) { .adm-mail > summary:hover, .we-visit > summary:hover { background: var(--sand); } }
.adm-chev { position: absolute; right: 14px; top: 50%; translate: 0 -50%; color: var(--stone); }
details[open] > summary > .adm-chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: no-preference) { .adm-chev { transition: transform .15s ease-out; } }
.adm-mail summary strong { color: var(--ink); }
.adm-mail-when { color: var(--muted); font-size: 0.9rem; min-width: 11em; }
.adm-mail > :not(summary) { margin: 0 16px; }
.adm-mail pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 0.92rem; color: var(--stone); background: var(--bg); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; }

/* ---------- website pages in the Staff Portal (admin_website.html, site-admin.js) ---------- */
.we-note { margin: 0 0 24px; max-width: 80ch; }
.we-note + .form-status { margin: -12px 0 24px; }
/* Publish to Live Site (templates/_publish.html, site-publish.js): what's saved on the preview site
   and not on the live site yet. With nothing waiting it's one quiet line. */
.we-publish { margin: 0 0 24px; padding: 20px 24px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--sand); display: flex; flex-direction: column; gap: 10px; }
.we-publish-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.we-publish-head h2 { margin: 0; font-size: var(--h2-card); }
.we-publish-head .btn-row { margin: 0; align-items: center; }
.we-publish-lead { margin: 0; color: var(--stone); }
.we-publish-list { list-style: none; margin: 0; padding: 0; }
.we-publish-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding: 8px 0; border-top: 1px solid var(--line); }
.we-publish-list li:last-child { padding-bottom: 0; }
.we-publish-list strong { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.we-publish-list span, .we-publish-more { font-size: 0.9rem; color: var(--muted); }
.we-publish-msg { margin: 0; font-weight: 600; }
.we-publish-msg:empty { display: none; }
.we-publish--empty { padding: 0; border: 0; background: none; }
.we-publish--empty .we-publish-head { display: none; }
/* the list: its search and New button stay in view under the site header as the list scrolls */
.we-list-bar { position: sticky; top: var(--sticky-head, 84px); z-index: 6; background: var(--bg); padding: 12px 0; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.we-list-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.we-list-head h2 { font-size: var(--h2-section); margin: 0; display: flex; align-items: baseline; gap: 10px; flex: 0 0 auto; }
.we-search { flex: 1 1 260px; max-width: 520px; }
.we-list-head .btn { margin-left: auto; }
.we-list-msg { margin-bottom: 18px; }
.we-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 10px; }
.we-list li[hidden] { display: none; }
.we-row { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 8px 14px 8px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .we-row:hover { border-color: var(--accent); }
  .we-row:hover strong { color: var(--accent); }
}
.we-thumb { flex: none; width: 84px; height: 56px; border-radius: var(--radius-sm); overflow: hidden; background: var(--sand); display: grid; place-items: center; color: var(--muted); }
.we-thumb--portrait { width: 48px; height: 60px; }
.we-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.we-thumb--portrait img { object-position: 50% 0; }
.we-row-text { display: grid; gap: 2px; min-width: 0; }
.we-row-text strong { font-size: 0.98rem; line-height: 1.3; }
.we-row-text span { color: var(--muted); font-size: 0.86rem; }
.we-row-text .we-flag { color: var(--accent); font-weight: 600; }
.we-gone .we-row { border-style: dashed; }
.we-gone .we-row-text strong { color: var(--muted); text-decoration: line-through; }

/* editing: the page header folds down so the form starts near the top */
.we--editing .adm-hero { padding-block: 4px 0; }
.we--editing .adm-hero .lead, .we--editing .adm-hero .btn-row, .we--editing .we-kinds { display: none; }
/* while editing, the record's own name is the heading people see; the page's h1 stays for screen readers */
.we--editing .adm-hero h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
.we--editing .we-body { padding-top: 8px; }
.we .we-body { padding-top: 12px; }
/* a short field with no partner keeps to half the row */
@media (min-width: 640px) { .we-pair > .field:only-child { max-width: calc(50% - 8px); } }
.we--editing .we-note { display: none; }
/* an open entry's way back is the bar's link at the top (site-admin.js, backTop), not one in the form */
[data-edit-view] .we-back { display: none; }
.we-edit-head { margin-bottom: 18px; }
.we-edit-head h2 { font-size: var(--h2-page); margin: 2px 0 6px; }
.we-edit-head h2:focus { outline: none; }
.we-back { padding-left: 0; display: inline-flex; align-items: center; gap: 4px; }
.we-path { color: var(--muted); font-size: 0.92rem; overflow-wrap: anywhere; margin: 0; }

/* the form beside its side panel (Save, status, the main action, the cards, notes) */
.we-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.we-form { display: grid; gap: 18px; min-width: 0; }
.we-side { position: sticky; top: calc(var(--sticky-head, 84px) + 16px); max-height: calc(100vh - var(--sticky-head, 84px) - 32px); overflow-y: auto; overscroll-behavior: contain;
  display: grid; gap: 18px; padding: 18px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.we-actions { display: grid; gap: 10px; }
.we-actions-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.we-actions-row .btn { width: 100%; }
.we-state { margin: 0; font-size: 0.9rem; color: var(--stone); }
.we-busy { margin: 0; color: var(--stone); font-size: 0.9rem; font-weight: 600; }
.we-busy:empty, .we-state:empty { display: none; }
.we-msg { padding: 12px 14px; font-size: 0.9rem; }
.we-msg p { margin: 0; }
.we-side-extra { display: grid; gap: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.we-side-btn { width: 100%; }
.we-side-h { margin: 0 0 4px; font-size: 0.9rem; font-weight: 700; color: var(--stone); }
.we-side-nav ul { list-style: none; margin: 0; padding: 0; }
.we-side-nav a { display: block; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 600; text-decoration: none; }
.we-side-nav li:last-child a { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) { .we-side-nav a:hover { color: var(--accent); } }
.we-side-note { margin: 0; font-size: 0.86rem; color: var(--muted); }
.we-side-danger { display: grid; gap: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.we-side-danger .btn { border-color: var(--accent); color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .we-side-danger .btn:hover { background: var(--accent); color: var(--on-inverse); } }
.we-tail { display: none; }
@media (max-width: 1099px) {
  .we-editor { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* the panel becomes the Save row stuck to the bottom of the window; the rest follows the form */
  .we-side { position: sticky; top: auto; bottom: 0; z-index: 7; max-height: none; overflow: visible; margin-top: 18px; padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));   /* the buttons stay above the home indicator */
    border-radius: var(--radius) var(--radius) 0 0; box-shadow: 0 -8px 24px rgba(27, 23, 20, 0.12); }
  .we-side > .we-side-extra { display: none; }
  .we-actions-row { grid-template-columns: 1fr auto; }
  .we-tail { display: grid; padding: 18px 0 0; border-top: 0; }
  .we-tail .we-side-nav { display: none; }
}

/* Project Requests (site-admin.js, requestUi): the person asking fills the form in a step at a
   time, under a row of the steps; the last step shows it all to check and send. The list marks
   each request Draft or Sent for Review. */
.we-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.we-steps::-webkit-scrollbar { display: none; }
.we-steps li { flex: 1 1 0; min-width: max-content; }
.we-steps button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 10px 8px 2px; background: none; border: 0; border-top: 3px solid var(--line);
  color: var(--muted); font: inherit; font-size: 0.92rem; font-weight: 600; text-align: left; cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease; }
.we-step-n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 0.8rem; font-variant-numeric: tabular-nums;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.we-steps button.is-done { color: var(--stone); border-top-color: var(--accent); }
.we-steps button.is-done .we-step-n { background: var(--sand); border-color: var(--line-strong); }
.we-steps button.is-current { color: var(--accent); border-top-color: var(--accent); }
.we-steps button.is-current .we-step-n { background: var(--accent); border-color: var(--accent); color: var(--on-inverse); }
@media (hover: hover) and (pointer: fine) { .we-steps button:hover { color: var(--accent); } }
.we-steps button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 720px) {
  .we-steps li { flex: 0 0 auto; min-width: 0; }
  .we-steps li:has(.is-current) { flex: 1 1 auto; }
  .we-steps button:not(.is-current) .we-step-name { display: none; }
}
.we-step-nav { display: flex; justify-content: space-between; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.we-step-nav > .btn--primary:only-child { margin-left: auto; }
@media (prefers-reduced-motion: no-preference) {
  .we--wizard .we-form > .we-card:not([hidden]) { animation: we-step-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
}
@keyframes we-step-in { from { opacity: 0; transform: translateY(6px); } }
.we-review-lead { margin: 0; color: var(--stone); }
.we-review-gaps p { margin: 0; }
.we-review-gaps ul { margin: 6px 0 0; padding-left: 1.2em; }
.we-review-gaps .adm-link { padding: 0; text-align: left; font-weight: 600; }
.we-review-part { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.we-review-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.we-review-h h4 { margin: 0; font-size: 1.02rem; }
.we-review-h .adm-link { padding: 0; }
.we-review-dl { margin: 0; display: grid; gap: 12px; }
.we-review-dl > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 2px 16px; }
@media (max-width: 560px) { .we-review-dl > div { grid-template-columns: minmax(0, 1fr); } }
.we-review-dl dt { color: var(--muted); font-size: 0.88rem; font-weight: 600; padding-top: 2px; }
.we-review-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.we-review-dl dd p { margin: 0; }
.we-review-text { white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.we-review-none { color: var(--muted); font-style: italic; }
.we-review-md > :first-child { margin-top: 0; }
.we-review-md > :last-child { margin-bottom: 0; }
.we-review-md p, .we-review-md ul, .we-review-md ol { margin: 0 0 0.6em; }
.we-review-md ul, .we-review-md ol { padding-left: 1.4em; }
.we-review-md h2, .we-review-md h3 { font-family: var(--serif); font-size: 1.08rem; margin: 0.8em 0 0.3em; }
.we-review-md .we-rt-photos { display: flex; flex-wrap: wrap; gap: 6px; margin: 0.3em 0 0.6em; }
.we-review-md .we-rt-img { margin: 0; width: 72px; height: 54px; border-radius: 4px; overflow: hidden; background: var(--sand); }
.we-review-md .we-rt-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.we-review-img { display: block; width: min(100%, 320px); aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); background: var(--sand); }
.we-review-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.we-review-strip img { width: 72px; height: 54px; object-fit: cover; border-radius: 4px; background: var(--sand); }
.we-badge { flex: none; margin-left: auto; padding: 3px 10px; border-radius: 999px; background: var(--sand); color: var(--stone); font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.we-badge--sent { background: #F3E1DC; color: var(--accent); }
/* an archived project (off the website): its row in the list, and its header */
.we-badge--archived { display: inline-flex; align-items: center; gap: 5px; background: var(--ink); color: var(--bg); }
.we-badge--archived svg { flex: none; }
.we-archived { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 6px; padding: 3px 10px 3px 8px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; }
.we-archived svg { flex: none; }
.we-side-add { display: grid; gap: 8px; }
.we-none-yet { margin-top: 14px; }
.we-sent { max-width: 620px; margin: 8px auto 0; justify-self: center; padding: 36px 28px; text-align: center; justify-items: center; }
.we-sent h2 { font-size: var(--h2-page); margin: 0; }
.we-sent h2:focus { outline: none; }
.we-sent p { margin: 0; color: var(--stone); max-width: 52ch; }
.we-sent .btn-row { justify-content: center; }
.we-sent-mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--on-inverse); }
@media (prefers-reduced-motion: no-preference) { .we-sent-mark { animation: we-pop 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both; } }
@keyframes we-pop { from { transform: scale(0.6); opacity: 0; } }

.we-card { margin: 0; gap: 18px; scroll-margin-top: calc(var(--sticky-head, 84px) + 16px); }
.we-card > h3 { font-size: 1.2rem; }
.we-pair > .field > input, .we-pair > .field > select { margin-top: auto; }   /* side by side, the boxes line up whatever the hints above them */
.we-card > h3:focus { outline: none; }
.we-hint { margin: 0; font-size: 0.86rem; color: var(--muted); }
/* a footprint's CAD file (site-admin.js, cadfile) */
.we-cad-file { margin: 6px 0 0; overflow-wrap: anywhere; }
.we-cad-row { margin-top: 8px; }
.we-cad-status { margin: 6px 0 0; font-size: 0.9rem; }
.we-cad-status:empty { display: none; }
.we-cad-warn { color: var(--accent); font-weight: 600; }
.field .we-hint + input, .field .we-hint + select, .field .we-hint + textarea { margin-top: 2px; }
.we-md { min-height: 220px !important; font-size: 0.95rem; }
/* The Word-style text box (site-richtext.js) over a Markdown field: a toolbar, then the formatted
   text; Markdown swaps it for the textarea underneath, which is always the saved value */
.we-rt { display: grid; gap: 0; margin-top: 2px; }
.we-rt-bar { position: sticky; top: calc(var(--sticky-head, 84px) + 4px); z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  padding: 6px; background: var(--surface); border: 1px solid var(--line-control); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.we-rt:not(.we-rt--on) .we-rt-bar { position: static; border-bottom: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; padding: 4px 6px; }
/* on a phone: one row that scrolls sideways, rather than three */
@media (max-width: 640px) {
  .we-rt-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .we-rt-bar::-webkit-scrollbar { display: none; }
  .we-rt-group, .we-rt-mode { flex: none; }
  .we-rt select.we-rt-style { min-width: 0; width: 128px; }
}
.we-rt-group { display: inline-flex; align-items: center; gap: 2px; padding-right: 6px; margin-right: 2px; border-right: 1px solid var(--line); }
.we-rt-group:last-of-type { border-right: 0; }
.we-rt-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--stone); cursor: pointer;
  font: 600 1rem/1 var(--serif); transition: background-color 0.12s ease, color 0.12s ease; }
.we-rt-btn b { font-family: var(--sans); font-weight: 800; }
.we-rt-btn i { font-family: var(--serif); font-size: 1.1rem; }
@media (hover: hover) and (pointer: fine) { .we-rt-btn:not(:disabled):hover { background: var(--sand); color: var(--ink); } }
.we-rt-btn[aria-pressed="true"] { background: var(--sand); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line-strong); }
.we-rt-btn:disabled { opacity: 0.35; cursor: default; }
.we-rt-btn:focus-visible, .we-rt-mode:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.we-rt select.we-rt-style { width: auto; min-width: 140px; height: 34px; padding: 0 8px 0 10px; border: 1px solid var(--line); border-radius: 6px; background-color: var(--surface); font-size: 0.9rem; line-height: 1.2; color: var(--ink); }
.we-rt select.we-rt-style:disabled { opacity: 0.5; }
.we-rt-mode { margin-left: auto; height: 30px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: none; color: var(--stone); font: 600 0.82rem/1 var(--sans); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .we-rt-mode:hover { color: var(--accent); border-color: var(--accent); } }
.we-rt-linkrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line-control); border-bottom: 0; background: var(--sand); }
.we-rt input.we-rt-linkin { flex: 1 1 240px; width: auto; padding: 8px 12px; }
.we-rt-note { margin: 0 0 8px; }
.we-rt-box { min-height: 220px; padding: 14px 16px; border: 1px solid var(--line-control); border-radius: 0 0 var(--radius-sm) var(--radius-sm); background: var(--surface);
  color: var(--ink); font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; cursor: text; }
.we-rt-box:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
/* the same colour and type everywhere in it, so Chrome has no style to carry from one line to the next */
.we-rt-box p, .we-rt-box li, .we-rt-box ul, .we-rt-box ol, .we-rt-box strong, .we-rt-box em, .we-rt-box b, .we-rt-box i { color: inherit; font-size: inherit; font-family: inherit; }
.we-rt-box > :first-child { margin-top: 0; }
.we-rt-box > :last-child { margin-bottom: 0; }
.we-rt-box p { margin: 0 0 0.8em; }
.we-rt-box h2 { font-family: var(--serif); font-size: 1.45rem; line-height: 1.25; margin: 1.1em 0 0.4em; }
.we-rt-box h3 { font-family: var(--serif); font-size: 1.15rem; line-height: 1.3; margin: 1em 0 0.35em; }
.we-rt-box ul, .we-rt-box ol { margin: 0 0 0.8em; padding-left: 1.5em; }
.we-rt-box li { margin: 0.15em 0; }
.we-rt-box li > ul, .we-rt-box li > ol { margin: 0.15em 0 0.25em; }
.we-rt-box a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.we-rt-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 0.4em 0 0.8em; }
.we-rt-img { margin: 0; width: 168px; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--sand); box-shadow: 0 0 0 1px var(--line); }
.we-rt-photos:only-child .we-rt-img:only-child, .we-rt-photos > .we-rt-img:only-child { width: min(100%, 340px); }
.we-rt-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.we-rt-photos:focus, .we-rt-img:focus { outline: 2px solid var(--accent); }
.we-rt--on > textarea { display: none; }
.we-rt:not(.we-rt--on) > .we-rt-box { display: none; }
/* photos in a news story's or newsletter's text: the button above the text, new ones below it */
.we-md-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 2px 0 8px; }
.we-md-bar .we-hint { flex: 1 1 260px; }
.we-md-photos { margin-top: 12px; }
/* the website pages, one row of links in the page header (the one open is marked) */
/* the website lists as tabs under the title (templates/_website_tabs.html): moving between
   sibling lists, so they read as tabs, not buttons. One row that scrolls sideways when it doesn't
   fit; the open list is underlined in the accent. */
.we-kinds { position: relative; display: flex; gap: 2px; margin-top: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.we-kinds::-webkit-scrollbar { display: none; }
.we-kinds a { position: relative; flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; color: var(--stone); font-weight: 600; font-size: 0.95rem; white-space: nowrap; text-decoration: none; transition: color 150ms ease, background-color 150ms ease; }
.we-kinds a[aria-current="page"] { color: var(--ink); }
.we-kinds a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
@media (hover: hover) and (pointer: fine) { .we-kinds a:not([aria-current="page"]):hover { color: var(--ink); background: var(--sand); } }
.we-kinds a:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
@media (max-width: 640px) { .we-kinds { margin-inline: calc(var(--gutter, 16px) * -1); padding-inline: var(--gutter, 16px); scroll-padding-inline: var(--gutter, 16px); } }
.we-rows .label, .we-image > .label { font-weight: 700; font-size: 0.95rem; }
.we-row-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.we-row-list:empty { display: none; }
.we-row-list li { display: flex; gap: 12px; align-items: center; }
.we-row-list li > input, .we-row-list li > select { flex: 1 1 auto; min-width: 0; }
/* a line picked from a list, with a box under it for a new one (registrations, certifications) */
.we-row-list li > .we-pick { flex: 1 1 auto; min-width: 0; display: grid; gap: 6px; }
.we-pick > select, .we-pick > input { width: 100%; min-width: 0; }
.we-row-list li:has(> .we-pick) { align-items: flex-start; }
.we-row-list li:has(> .we-pick) > .adm-link { margin-top: 12px; }
.we-card .field > .btn, .we-card .field > .we-file { align-self: flex-start; }
.we-services { gap: 14px; }
/* Services, in three steps (site-admin.js, services): the areas, their specialties, the main one */
.we-svc-step { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); margin: 0; padding: 12px 16px 16px; display: grid; gap: 10px; min-width: 0; }
.we-svc-step > legend { display: flex; align-items: center; gap: 10px; padding: 0 6px; margin-left: -6px; font-family: var(--serif); font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.we-svc-num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--maroon); color: var(--ivory); font-family: var(--sans); font-size: 0.85rem; font-weight: 700; display: grid; place-items: center; }
.we-svc-main { display: grid; gap: 8px; }
.we-svc-areas, .we-svc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px 22px; }
.we-svc-area { color: var(--ink); font-weight: 600; }
.we-svc-block { display: grid; gap: 8px; }
.we-svc-block[hidden] { display: none; }
.we-svc-block:not([hidden]) ~ .we-svc-block:not([hidden]) { padding-top: 10px; border-top: 1px solid var(--line); }
.we-svc-area-h { margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.we-svc-none { margin: 0; font-size: 0.9rem; color: var(--muted); font-style: italic; }
.we-svc-none[hidden] { display: none; }
/* a job's offices */
.we-choices { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.we-choices > legend { padding: 0; margin-bottom: 4px; font-weight: 700; font-size: 0.95rem; color: var(--ink); }
/* the project's outline, picked on a map (site-admin.js, footprints) */
.we-fp { gap: 10px; }
.we-fp-map { height: clamp(300px, 52vh, 460px); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--sand); z-index: 0; }
.we-fp-map[hidden] { display: none; }
.we-fp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.we-fp-list:empty { display: none; }
.we-fp-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.we-fp-list li strong { font-variant-numeric: tabular-nums; }
.we-fp-list li .adm-link { margin-left: auto; }
.we-fp-add { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.we-fp-add input { flex: 0 1 220px; min-width: 0; }
/* a new project: its write-up first (site-admin.js, drawStart) */
.we-start { max-width: 860px; }
.we-start + .we-start { margin-top: 20px; }
.we-start textarea { min-height: 260px; }
.we-filled { margin: 0 0 18px; max-width: 860px; }
.we-pic { position: relative; background: var(--sand); border-radius: var(--radius-sm); overflow: hidden; display: grid; place-items: center; }
.we-pic--wide { aspect-ratio: 16 / 7; max-width: 640px; }
.we-pic--portrait { aspect-ratio: 231 / 289; width: 180px; }
.we-pic img { width: 100%; height: 100%; object-fit: cover; display: block; grid-area: 1 / 1; }
.we-pic--portrait img { object-fit: contain; }
.we-pic[data-empty="true"] img, .we-pic img:not([src]) { display: none; }
.we-pic-empty { grid-area: 1 / 1; color: var(--muted); font-size: 0.9rem; }
.we-pic[data-empty="false"] .we-pic-empty { display: none; }
.we-up-state { margin: 0; font-size: 0.86rem; color: var(--stone); }
.we-up-state:empty { display: none; }
[data-state="failed"] > .we-up-state, [data-state="failed"] .we-up-state { color: var(--accent); font-weight: 600; }
.we-pic-btns { align-items: center; gap: 12px 20px; }
.we-file { position: relative; overflow: hidden; cursor: pointer; }
.we-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.we-file:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.we-visits-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.we-visit-list { display: grid; gap: 10px; margin-top: 4px; }
.we-visit { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); scroll-margin-top: calc(var(--sticky-head, 84px) + 16px); }
.we-visit > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 16px; cursor: pointer; min-height: 48px; }
.we-visit > summary strong { color: var(--ink); font-size: 1.02rem; }
.we-visit-n { color: var(--muted); font-size: 0.9rem; }
.we-visit-body { padding: 4px 16px 16px; display: grid; gap: 18px; }
.we-photo-field { gap: 10px; }
.we-photo-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.we-photos { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, calc(50% - 7px)), 1fr)); gap: 14px; }
.we-photos:empty { display: none; }
.we-tile { display: grid; gap: 6px; align-content: start; }
.we-tile-pic { position: relative; }
.we-tile-pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); background: var(--sand); display: block; }
.we-tile[data-state="preparing"] img, .we-tile[data-state="waiting"] img, .we-tile[data-state="sending"] img { opacity: 0.55; }
/* Remove sits on the photo: a 36 px circle with a 44 px reach */
.we-tile-x { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border: 0; border-radius: 50%; padding: 0; display: grid; place-items: center;
  background: rgba(27, 23, 20, 0.74); color: #fff; cursor: pointer; }
.we-tile-x::after { content: ""; position: absolute; inset: -4px; }
@media (hover: hover) and (pointer: fine) { .we-tile-x:hover { background: var(--maroon); } }
.we-tile-x:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.we-tile-cover { width: 100%; min-height: 36px; padding: 6px 8px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--line-control); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
  font: 600 0.84rem/1.2 var(--sans); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .we-tile-cover:hover { border-color: var(--accent); color: var(--accent); } }
.we-tile-cover[aria-pressed="true"] { background: var(--maroon); border-color: var(--maroon); color: var(--ivory); }
.we-tile-cover:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.we-tile > .adm-link { min-height: 32px; padding: 4px 0; font-size: 0.86rem; justify-self: start; }
img[data-missing] { background: repeating-linear-gradient(45deg, var(--sand), var(--sand) 8px, var(--line) 8px, var(--line) 16px); min-height: 60px; }
.we-danger { justify-self: start; padding-left: 0; }
.we-exp { gap: 12px; }
.we-exp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.we-exp-list:empty { display: none; }
.we-exp-row { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.we-exp-row > .adm-link { justify-self: start; padding-left: 0; min-height: 36px; }
/* a project request's key people: who and their role on one line, Remove at the end */
.we-team { gap: 12px; }
.we-team-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.we-team-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto; align-items: end; gap: 10px 14px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.we-team-row > .field { margin: 0; }
.we-team-rm { min-height: 44px; padding-inline: 4px; }
.we-team > .btn { justify-self: start; }
@media (max-width: 640px) {
  .we-team-row { grid-template-columns: minmax(0, 1fr); }
  .we-team-rm { justify-self: start; padding-left: 0; min-height: 36px; }
}
.we-review-team { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
/* while a project request saves, is sent or goes on the site (site-admin.js, hold): over the whole
   page, taking no clicks; it fades in, unless it's put straight back after a save */
.we-shield { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 24px;
  background: rgba(251, 247, 239, 0.78); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); cursor: progress; }
.we-shield-box { display: grid; justify-items: center; gap: 10px; width: min(380px, 100%); padding: 28px 28px 24px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 40px rgba(27, 23, 20, 0.16); }
.we-shield .ebid-spin { color: var(--accent); margin-bottom: 4px; }
:root[data-theme="dark"] .we-shield { background: rgba(22, 18, 16, 0.78); }
:root[data-theme="dark"] .we-shield-box { box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5); }
.we-shield-text { margin: 0; font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.we-shield-note { margin: 0; color: var(--stone); font-size: 0.9rem; }
@media (prefers-reduced-motion: no-preference) {
  .we-shield:not(.is-quick) { animation: kem-fade 0.15s ease-out both; }
  .we-shield:not(.is-quick) .we-shield-box { animation: kem-pop 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
}
.we-loading { color: var(--stone); }

/* ---------- dark appearance ----------
   Set by the switch in the footer, or by the device when the switch is on Auto (the script at
   the top of each page sets data-theme before anything is drawn). The brand colours stay put:
   the maroon header and footer, parchment buttons and black bands look the same in both. What
   changes is the page, cards, text, rules and the accent, which turns from maroon to a light
   rose so links and accents read on dark ground (8:1 on cards). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #161210;
  --sand: #1F1915;
  --surface: #241D19;
  --ink: #F2EAE0;
  --stone: #D1C5B6;
  --muted: #A99B8E;
  --line: #3B322C;
  --line-strong: #6E6054;
  --line-control: #8A7C70;
  --accent: #E89A8E;
  --accent-hover: #F6C9C1;
  --on-inverse: #1B1714;
  --invalid-bg: #3A1814;
  --focus: var(--parchment);
  --water: #1C2A31;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
  --scroll-edge: rgba(0, 0, 0, 0.6);
}
:root[data-theme="dark"] img { color-scheme: normal; }
/* maroon buttons on a dark page: a parchment edge keeps their shape (5:1 on the page and on cards and
   dialogs; the maroon fill alone is 1.4:1) */
:root[data-theme="dark"] .btn--primary { box-shadow: inset 0 0 0 1px rgba(239, 225, 190, 0.55); }
:root[data-theme="dark"] .btn--primary[data-sure="1"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
/* contour lines: fainter on dark ground */
:root[data-theme="dark"] .topo--head, :root[data-theme="dark"] .topo--band { --topo-ink: rgba(187, 163, 122, 0.32); }
/* the small checks on Qualifications */
:root[data-theme="dark"] .q-cards--3 .q-card li::before, :root[data-theme="dark"] .q-cols li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E89A8E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5l4.5 4.5 10-10'/%3E%3C/svg%3E"); }
/* project location map: the street map turned dark, the outline in the accent */
:root[data-theme="dark"] .footprint-map--street { background: #2A2522; }
:root[data-theme="dark"] .footprint-map--street img { filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.88) saturate(0.55); }
:root[data-theme="dark"] .footprint-map--street .fp-halo { stroke: rgba(22, 18, 16, 0.85); }
:root[data-theme="dark"] .footprint-map--street .fp-line { fill: rgba(232, 154, 142, 0.16); }
:root[data-theme="dark"] .footprint-map .fp-scale, :root[data-theme="dark"] .footprint-map .fp-north { color: #F2EBDD; background: rgba(27, 23, 20, 0.78); }
/* the Projects page's Map view: the same dark street map; pins, outlines and pop-ups keep their colours */
:root[data-theme="dark"] .results-map-canvas { background: #2A2522; border-color: var(--line-strong); }
:root[data-theme="dark"] .results-map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.88) saturate(0.55); }
:root[data-theme="dark"] .results-map .leaflet-control-attribution { background: rgba(36, 29, 25, 0.85); color: var(--stone); }
:root[data-theme="dark"] .results-map .leaflet-control-attribution a { color: var(--accent); }
:root[data-theme="dark"] .results-map path.x-area { stroke: var(--accent); fill: var(--accent); }
:root[data-theme="dark"] .lg-area { border-color: var(--accent); background: rgba(232, 154, 142, 0.16); }
/* the Ohio map on the Projects page */
:root[data-theme="dark"] .ohio-map .m-land path { fill: #1E1A17; stroke: #3B322C; }
:root[data-theme="dark"] .ohio-map .m-lake path { stroke: #2E4450; }
:root[data-theme="dark"] .ohio-map .m-county { fill: #2A231F; stroke: #4A3F37; }
:root[data-theme="dark"] .ohio-map .m-county.shade-1 { fill: #4A2622; }
:root[data-theme="dark"] .ohio-map .m-county.shade-2 { fill: #6E2E27; }
:root[data-theme="dark"] .ohio-map .m-county.shade-3 { fill: #9A3B30; }
:root[data-theme="dark"] .ohio-map .m-county.shade-4 { fill: #C4594A; }
:root[data-theme="dark"] .ohio-map .m-county.shade-5 { fill: #E89A8E; }
:root[data-theme="dark"] .ohio-map .m-rivers path { stroke: #3F6577; }
:root[data-theme="dark"] .ohio-map .m-roads path { stroke: #8C8076; }
:root[data-theme="dark"] .ohio-map .m-shields path { fill: #2A231F; stroke: #8C8076; }
:root[data-theme="dark"] .ohio-map .m-shields text, :root[data-theme="dark"] .ohio-map .m-city,
:root[data-theme="dark"] .ohio-map .m-furniture text, :root[data-theme="dark"] .ohio-map .m-north path { fill: #D1C5B6; }
:root[data-theme="dark"] .ohio-map .m-north text { fill: #D1C5B6; }
:root[data-theme="dark"] .ohio-map .m-lake-label { fill: #7FA3B4; }
:root[data-theme="dark"] .ohio-map .m-city-label { fill: #E8DFD3; stroke: rgba(22, 18, 16, 0.9); }
:root[data-theme="dark"] .ohio-map .m-offices path { stroke: #161210; }
:root[data-theme="dark"] .ohio-map .m-offices text { stroke: #161210; }
:root[data-theme="dark"] .ohio-map .m-furniture rect { fill: #D1C5B6; }
:root[data-theme="dark"] .ohio-map .m-furniture rect.alt { fill: #2A231F; stroke: #D1C5B6; }
:root[data-theme="dark"] .we-badge--sent { background: #4A2622; }
:root[data-theme="dark"] .cw-svg .m-county.cw-area { fill: #4A2622; stroke: #6E3A31; }
:root[data-theme="dark"] .cw-svg .m-county.cw-area.is-lit { fill: #6E2E27; stroke: var(--accent); }
:root[data-theme="dark"] .cw-ctx circle { fill: #A3978A; }
:root[data-theme="dark"] .cw-ctx text { fill: #A3978A; stroke: rgba(22, 18, 16, 0.9); }
:root[data-theme="dark"] .cw-lake { fill: #7FA3B4; }
:root[data-theme="dark"] .cw-dot--city .cw-pin { stroke: #161210; }
:root[data-theme="dark"] .cw-dot--village .cw-pin, :root[data-theme="dark"] .cw-key--village { fill: #161210; background: #161210; }
:root[data-theme="dark"] .cw-label { fill: #E8DFD3; stroke: rgba(22, 18, 16, 0.92); }
:root[data-theme="dark"] .cw-label--city { fill: #F5EEE4; }
:root[data-theme="dark"] .cw-label.is-lit { fill: var(--accent); }
:root[data-theme="dark"] .cw-key--area { background: #4A2622; box-shadow: inset 0 0 0 1px #6E3A31; }
/* the "KEM Quality" mark on Our story is maroon artwork: turned to a light rose on dark ground */
:root[data-theme="dark"] .quality-mark { filter: invert(1) hue-rotate(180deg); }

/* ------------------------------------------------------------------ Staff Portal: checking and previewing a story
   Spelling & Grammar and Preview, in the side panel of a news story or newsletter issue
   (site-admin.js): the mistakes Claude found, each one a button that selects it in the text. */
.we-tools { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.we-side-extra > .we-tools:first-child { padding-top: 0; border-top: 0; }
/* a mistake selected in the text from the list stands out in the field */
.we-form :is(input, textarea)::selection { background: var(--accent); color: var(--on-inverse); }
.we-tools .we-side-h { margin: 0; }
.pf { display: grid; gap: 10px; }
.pf-sum { margin: 0; font-size: 0.9rem; color: var(--stone); }
.pf-sum:empty { display: none; }
.pf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pf-item { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.pf-kind { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.pf-go { display: block; width: 100%; padding: 2px 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 0.92rem; line-height: 1.45; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.pf-go mark { background: none; color: var(--accent); font-weight: 700; text-decoration: underline wavy var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .pf-go:hover mark { background: var(--parchment); } }
.pf-note, .pf-fix { margin: 0; font-size: 0.86rem; color: var(--stone); }
.pf-fix b { color: var(--ink); }
.pf-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.pf-acts .adm-link { min-height: 32px; padding: 0; font-size: 0.86rem; }
.pf-done { font-size: 0.86rem; font-weight: 600; color: var(--muted); }
.pf-item[data-state="fixed"], .pf-item[data-state="ignored"] { background: none; }
.pf-item[data-state="fixed"] .pf-go, .pf-item[data-state="ignored"] .pf-go { color: var(--muted); }
.pf-item[data-state="fixed"] .pf-go mark, .pf-item[data-state="ignored"] .pf-go mark { color: var(--muted); text-decoration: line-through; }
.pf-item[data-state="fixed"] .pf-note, .pf-item[data-state="fixed"] .pf-fix, .pf-item[data-state="ignored"] .pf-note, .pf-item[data-state="ignored"] .pf-fix { display: none; }

/* The live preview of a story or issue (site-preview.js): the site's own page, with a bar to see
   it at phone size. Phone shows the same page 390 px wide in a frame. */
.pv-bar { position: fixed; z-index: 70; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 18px; width: max-content; max-width: calc(100vw - 32px);
  padding: 8px 8px 8px 20px; border-radius: 999px; background: var(--inverse); color: var(--on-inverse); box-shadow: var(--shadow); font-size: 0.9rem; }
.pv-bar p { margin: 0; }
.pv-bar-text strong { margin-right: 6px; }
.pv-bar-note { opacity: 0.75; }
.pv-views { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--on-inverse) 14%, transparent); }
.pv-views button { min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.pv-views button[aria-pressed="true"] { background: var(--on-inverse); color: var(--inverse); }
.pv-views button:focus-visible { outline: 2px solid var(--on-inverse); outline-offset: 2px; }
html[data-pv-kind]:not(.pv-framed) body { padding-bottom: 96px; }
.pv-frame { position: fixed; inset: 0; z-index: 69; display: flex; justify-content: center; align-items: flex-start; padding: 20px 16px 96px;
  background: color-mix(in srgb, var(--inverse) 60%, transparent); }
.pv-frame iframe { width: 390px; max-width: 100%; height: min(844px, 100%); border: 0; border-radius: 28px; background: var(--bg); box-shadow: var(--shadow); }
.pv-phone body { overflow: hidden; }
@media (max-width: 43.6875em) {
  .pv-bar { border-radius: var(--radius); padding: 10px 12px; }
  .pv-bar-note { display: none; }
}

/* Business Cards and Email Signature on the Staff Portal (staff-cards.js, staff-signature.js): the form
   beside a preview that stays in view as the form scrolls */
.bc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 8px; }
@media (min-width: 1100px) { .bc-layout { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 40px; } .bc-preview { position: sticky; top: calc(var(--sticky-head, 84px) + 16px); } }
.bc-form { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
fieldset.bc-card { margin: 0; gap: 14px; }
.bc-legend { float: left; width: 100%; padding: 0; margin: 0 0 2px; font-family: var(--serif); font-size: var(--h2-card); font-weight: 600; color: var(--ink); }
.bc-legend + * { clear: both; }
.bc-hint { margin: 0; font-size: 0.88rem; line-height: 1.5; color: var(--stone); }
.bc-card .field input[readonly] { background: var(--sand); color: var(--stone); }
.bc-cell-show { margin-top: 10px; }   /* Show on business card / Show on signature, under the cell */
.bc-seg span { min-height: 44px; padding: 0 18px; font-size: 0.95rem; }
.bc-lib-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.bc-lib-bar .field { flex: 1 1 200px; }
.bc-lib-bar .btn { min-height: 48px; }
.bc-lib { list-style: none; margin: 0; padding: 2px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-height: 560px; overflow-y: auto; }
.bc-lib-item { display: flex; flex-direction: column; gap: 4px; width: 100%; height: 100%; padding: 4px 4px 6px; border: 1px solid var(--line-control); border-radius: 8px;
  background: var(--paper); color: var(--ink); font: inherit; text-align: left; cursor: grab; -webkit-user-select: none; user-select: none; }
.bc-lib-item img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; border-radius: 4px; background: var(--sand); pointer-events: none; }
.bc-lib-item { transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1), border-color 140ms ease; }
.bc-lib-item:active { transform: scale(0.97); }
/* the badge on a photo: its number on the card, a cross over the number on hover (a click takes it
   off), or a plus on hover for one that isn't on the card */
.bc-lib-pic { position: relative; display: block; }
.bc-lib-badge { position: absolute; top: 6px; left: 6px; display: none; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px;
  background: var(--maroon); color: var(--ivory); font-size: 0.82rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--ivory), 0 2px 6px rgba(27, 23, 20, 0.3); pointer-events: none; }
.bc-lib-badge svg { display: none; width: 14px; height: 14px; color: inherit; }
.bc-lib-n:empty { display: none; }   /* an empty number would take a row of the badge and push the plus down */
.bc-lib-item[aria-pressed="true"] .bc-lib-badge { display: grid; }
.bc-lib-name { font-size: 0.8rem; font-weight: 600; line-height: 1.3; }
.bc-lib-tag { font-size: 0.76rem; font-weight: 700; color: var(--accent); }
.bc-lib-tag:empty { display: none; }
.bc-lib-item[aria-pressed="true"] { border: 3px solid var(--maroon); padding: 2px 2px 4px; background: var(--sand); }
.bc-lib-item:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .bc-lib-item:hover { border-color: var(--ink); }
  .bc-lib-item[aria-pressed="true"]:hover { border-color: var(--maroon); }
  .bc-lib-item[aria-pressed="true"]:hover .bc-lib-badge { padding: 0; }
  .bc-lib-item[aria-pressed="true"]:hover .bc-lib-n { display: none; }
  .bc-lib-item[aria-pressed="true"]:hover .bc-lib-badge svg:first-of-type { display: block; }
  .bc-lib-item[aria-pressed="false"]:hover .bc-lib-badge { display: grid; padding: 0; background: var(--ivory); color: var(--ink); }
  .bc-lib-item[aria-pressed="false"]:hover .bc-lib-badge svg:last-of-type { display: block; }
}
/* the line over the library: how many are on the back, and what a pick does; picking a replacement
   for a selected photo turns it sand, with Cancel */
.bc-lib-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-height: 24px; }
.bc-lib-note p { margin: 0; flex: 1 1 220px; font-size: 0.88rem; line-height: 1.5; color: var(--stone); }
.bc-lib-note.is-picking { padding: 10px 14px; border-radius: 8px; background: var(--sand); }
.bc-lib-note.is-picking p { color: var(--ink); font-weight: 600; }
.bc-preview { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.bc-prev-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.bc-prev-head h2 { margin: 0; font-size: var(--h2-section); }
.bc-stage { position: relative; width: 100%; max-width: 630px; }
.bc-canvas { display: block; width: 100%; box-shadow: 0 10px 30px rgba(27, 23, 20, 0.18); background: var(--sand); }
.bc-slots { position: absolute; inset: 0; }
.bc-slot { position: absolute; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; cursor: grab; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.bc-slot:active { cursor: grabbing; }
.bc-slot { transition: box-shadow 140ms ease; }
.bc-slot:focus-visible { outline: 4px double var(--ivory); outline-offset: -7px; }
.bc-slot.is-over { outline: 4px solid var(--ivory); outline-offset: -4px; background: rgba(251, 247, 239, 0.18); }
.bc-slot.is-from { background: rgba(251, 247, 239, 0.6); }
/* held (pressed, before it moves) and selected (pressed and let go: the library's next pick replaces it) */
.bc-slot.is-held { box-shadow: inset 0 0 0 3px var(--ivory); }
.bc-slot[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--ivory), inset 0 0 0 5px var(--maroon); background: rgba(27, 23, 20, 0.12); }
@media (hover: hover) and (pointer: fine) { .bc-slot:hover:not(.is-held):not([aria-pressed="true"]) { box-shadow: inset 0 0 0 2px rgba(251, 247, 239, 0.75); } }
/* each photo's number on the card, the same number the library shows */
.bc-slot-num { position: absolute; z-index: 1; top: 8px; left: 8px; display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  background: rgba(27, 23, 20, 0.78); color: var(--ivory); font-size: 0.8rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 4px rgba(27, 23, 20, 0.35); pointer-events: none; }
.bc-slot[aria-pressed="true"] .bc-slot-num { background: var(--ivory); color: var(--maroon); }
/* the library photo that a pick would replace shows the same turned-round number */
.bc-lib-item.is-target .bc-lib-badge { background: var(--ivory); color: var(--maroon); box-shadow: 0 0 0 2px var(--maroon), 0 2px 6px rgba(27, 23, 20, 0.3); }
/* the cross that takes a photo off (only with two or three on the back), at its top right corner */
.bc-slot-x { position: absolute; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; margin: 7px 0 0 -37px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(251, 247, 239, 0.94); color: var(--ink); cursor: pointer;
  box-shadow: 0 2px 6px rgba(27, 23, 20, 0.35); transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1), background-color 140ms ease, color 140ms ease; }
.bc-slot-x::before { content: ""; position: absolute; inset: -7px; }   /* a 44 px target */
.bc-slot-x svg { width: 16px; height: 16px; color: inherit; }
.bc-slot-x:active { transform: scale(0.92); }
.bc-slot-x:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .bc-slot-x:hover { background: var(--maroon); color: var(--ivory); } }
.bc-stage-hint strong { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .bc-slot, .bc-slot-x, .bc-lib-item { transition: none; } .bc-slot-x:active, .bc-lib-item:active { transform: none; } }
.bc-safe { position: absolute; left: 2%; right: 2%; top: 3.5%; bottom: 3.5%; border: 1px dashed #FFFFFF; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(27, 23, 20, 0.55), inset 0 0 0 1px rgba(27, 23, 20, 0.55); }
.bc-ghost { position: fixed; z-index: 90; width: 120px; height: 80px; object-fit: cover; border: 2px solid var(--ivory); border-radius: 4px;
  box-shadow: 0 8px 22px rgba(27, 23, 20, 0.35); opacity: 0.92; pointer-events: none; }
.bc-get { background: var(--sand); border-color: transparent; }
.bc-get h3 { margin: 0; font-size: var(--h2-card); }
.bc-get .form-status { margin: 0; }
@media (max-width: 520px) { .bc-lib { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Email Signature: the signature as it will look in an email, on white like a message */
.sg-mail { padding: 24px 28px; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; color: #1B1714; }
.sg-steps { margin: 0; color: var(--stone); font-size: 0.95rem; line-height: 1.55; }
/* The photo watermark (Staff Portal, Website Editors): the photo with it, and the form beside it */
.wm-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 8px; }
@media (min-width: 1000px) { .wm-layout { grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); } }
.wm-figure { margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.wm-canvas { display: block; width: 100%; height: auto; border-radius: var(--radius); background: var(--sand); aspect-ratio: 4 / 3; }
.wm-canvas[width] { aspect-ratio: auto; }
.wm-card { gap: 18px; }
.wm-card input[type=file] { max-width: 100%; }
.wm-width { display: flex; align-items: center; gap: 14px; }
.wm-width input[type=range] { flex: 1 1 auto; width: auto; min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; accent-color: var(--maroon); height: 44px; cursor: pointer; }
.wm-width-num { display: inline-flex; align-items: center; gap: 6px; flex: none; font-weight: 600; }
.wm-width-num input { width: 4.6em; text-align: right; }
.bc-sub { margin: 10px 0 0; font-size: var(--h2-card); }
.bc-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
@media (max-width: 1099px) {
  .bc-preview { order: -1; }   /* on a phone or narrow window the card comes first */
  /* and on Business Cards its photos come next, so picking one is close to the card it changes */
  [data-cards] .bc-form { display: contents; }
  [data-cards] .bc-form > .bc-card:first-child { order: 1; }
}

/* ---------- Careers (templates/careers.html): Why KEM, Benefits, Students ---------- */
.careers-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 56px; align-items: start; }
@media (min-width: 1000px) { .careers-split { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); } }
.careers-split > div > .lead { margin-top: 14px; }
.careers-split > div > p:not(.lead) { margin-top: 12px; color: var(--stone); max-width: 62ch; }
.careers-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.careers-cards .card { padding: 24px; gap: 10px; }
.benefit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.benefit-list li { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.benefit-tick { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--sand); color: var(--accent); display: grid; place-items: center; }
.benefit-list b { display: block; line-height: 1.35; }
.benefit-list li > span:last-child { min-width: 0; }
.benefit-list li > span:last-child > span { display: block; margin-top: 2px; font-size: 0.94rem; line-height: 1.5; color: var(--stone); }
.benefit-note { margin: 18px 0 0; max-width: 72ch; font-size: 0.88rem; line-height: 1.55; color: var(--muted); }
.careers-recog { padding-bottom: 24px; }
.careers-follow { padding-top: 0; }
.careers-cta { padding-bottom: var(--section); }
.careers-cta .cta { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.careers-cta .cta > div { flex: 1 1 420px; min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 8px; }
.t-photo { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--parchment); }

/* ---------- Request a Survey (templates/survey_request.html) ---------- */
.survey-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 4vw, 48px); align-items: start; }
@media (min-width: 1000px) { .survey-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); } }
.survey-side { display: flex; flex-direction: column; gap: 20px; }
.field-row--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.survey-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 2px 24px; }
.survey-types .choice { min-height: 40px; align-items: center; color: var(--ink); }
.survey-types .choice input { margin-top: 0; }
.survey-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.survey-reply { font-size: 0.94rem; color: var(--stone); }
.survey-done { padding: clamp(24px, 3vw, 32px); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--sand); display: flex; flex-direction: column; gap: 14px; }
.survey-done h2 { font-size: var(--h2-card); }
.survey-done h2:focus:not(:focus-visible) { outline: none; }
.survey-done p { color: var(--stone); max-width: 62ch; }
.mini-steps { list-style: none; margin: 4px 0 0; padding: 0; counter-reset: mini; display: flex; flex-direction: column; gap: 14px; }
.mini-steps li { counter-increment: mini; position: relative; padding-left: 44px; min-height: 30px; }
.mini-steps li::before { content: counter(mini); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--maroon); color: var(--ivory); font-weight: 700; font-size: 0.94rem; display: grid; place-items: center; }
.mini-steps b { display: block; line-height: 1.35; padding-top: 3px; }
.mini-steps span { display: block; margin-top: 2px; font-size: 0.94rem; color: var(--stone); }
.side-list { margin: 4px 0 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; font-size: 0.94rem; color: var(--stone); }
.contact-also { margin-top: 12px; color: var(--stone); font-size: 0.97rem; max-width: 62ch; }

/* ---------- Communities: the community sections of Municipal Engineering (templates/_communities.html) ---------- */
/* Communities We Work With: the map and the names (build.py, community_map). Sizes on the map are
   in map units: --u is map units per pixel with the map 520 px wide, --up with it 300 px wide (a
   phone), --f and --fp the label sizes for each; the phone set takes over when the map is narrow. */
.cw { display: grid; gap: 28px 48px; padding: 28px 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
@media (max-width: 559px) { .cw { padding: 20px 18px; } }
@media (min-width: 1080px) { .cw--map { grid-template-columns: minmax(0, 500px) minmax(0, 1fr); align-items: center; } }
.cw-map { container-type: inline-size; max-width: 560px; }
.cw-svg { --s: var(--u); border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.cw-svg .cw-sym { transform: scale(var(--s)); }
.cw-svg text, .cw-svg .m-shields, .cw-svg .m-rivers, .cw-svg .m-roads, .cw-svg .cw-ctx, .cw-svg .m-land, .cw-svg .m-lake, .cw-svg .m-county:not(.cw-area) { pointer-events: none; }
.cw-svg text.cw-full { font-size: var(--f); }
.cw-svg text.cw-phone { font-size: var(--fp); display: none; }
@container (max-width: 399px) {
  .cw-svg { --s: var(--up); }
  .cw-svg text.cw-full { display: none; }
  .cw-svg text.cw-phone { display: inline; }
  .cw-svg .cw-lake { font-size: calc(var(--fp) * 1.3); }
}
.cw-svg .m-county.cw-area { fill: #EBCFC6; stroke: #CFA99D; }
.cw-svg .m-county.cw-area.is-lit { fill: #DDAC9F; stroke: var(--accent); stroke-width: 2; }
.cw-lake { font-family: var(--serif); font-style: italic; font-size: calc(var(--f) * 1.2); fill: #5F8697; text-anchor: middle; }
.cw-ctx circle { fill: #8A7F73; }
.cw-ctx text { font-weight: 500; font-style: italic; fill: #7A6F64; paint-order: stroke; stroke: rgba(255, 253, 248, 0.9); stroke-width: 0.26em; stroke-linejoin: round; }
.cw-hit { fill: transparent; }
.cw-pin { stroke-width: 1.5; vector-effect: non-scaling-stroke; transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cw-dot--city .cw-pin { fill: var(--accent); stroke: #FFFDF8; }
.cw-dot--village .cw-pin { fill: #FFFDF8; stroke: var(--accent); stroke-width: 1.8; }
.cw-dot.is-lit .cw-pin { transform: scale(calc(var(--s) * 1.5)); }
.cw-label { font-weight: 500; fill: #3F3832; paint-order: stroke; stroke: rgba(255, 253, 248, 0.92); stroke-width: 0.28em; stroke-linejoin: round; transition: fill 0.15s ease, opacity 0.15s ease; }
.cw-label--city { font-weight: 650; fill: #2B2520; }
.cw-label.is-tight { opacity: 0; }
.cw-label.is-lit { fill: var(--accent); opacity: 1; }
.cw-names { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 32px; align-content: start; }
@media (min-width: 560px) { .cw-names { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cw-group--wide { grid-column: span 2; } .cw-group--area, .cw-hint { grid-column: 1 / -1; } }
.cw-names ul { list-style: none; margin: 0; padding: 0; line-height: 1.9; columns: 2; column-gap: 24px; }
.cw-group--area ul { columns: 2 20em; }
@media (min-width: 560px) { .cw-group:not(.cw-group--wide, .cw-group--area) ul { columns: 1; } }
.cw-names li a { color: inherit; text-decoration: none; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color 0.15s ease; }
.cw-names li.is-lit, .cw-names li.is-lit a { color: var(--accent); }
.cw-names li.is-lit a, .cw-names li a:focus-visible { text-decoration: underline; }
.cw-key { display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: -1px; border-radius: 50%; }
.cw-key--city { background: var(--accent); }
.cw-key--village { background: #FFFDF8; box-shadow: inset 0 0 0 2px var(--accent); }
.cw-key--area { border-radius: 2px; background: #EBCFC6; box-shadow: inset 0 0 0 1px #CFA99D; }
.cw-hint { margin: 0; font-size: 0.88rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .cw-pin { transition: none; } }
.client-group-name { margin: 0 0 10px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 1000px) { .steps--five { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.steps--five li { display: flex; flex-direction: column; gap: 6px; }
.steps--five li::before { align-self: flex-start; margin-bottom: 6px; }
.steps--five li .more { margin-top: auto; padding-top: 8px; font-size: 0.94rem; }
.tick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tick-list li { position: relative; padding-left: 36px; min-height: 26px; line-height: 1.5; }
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--parchment) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23660000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4 4 9-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; color: var(--stone); }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { padding: 0 22px 20px; color: var(--stone); }
.form-test-note { font-size: 0.9rem; color: var(--stone); border-top: 1px dashed var(--line-strong); padding-top: 12px; }

/* ---------- cookie notice (templates/_consent.html, site.js "cookie notice") ----------
   Google Analytics' Accept and Reject, at the bottom left on a computer and across the foot of a phone.
   It sits over the page, never in its way: nothing is blocked while it's up. Like the site's other pop-ups
   it has no colour band on top (it fights the rounded corners): a thin edge, so it stands off the page
   without a backdrop. Accept and Reject look the same, so turning analytics down is as easy as allowing them. */
.consent {
  position: fixed; z-index: 65; left: max(24px, env(safe-area-inset-left, 0px)); bottom: max(24px, env(safe-area-inset-bottom, 0px));
  width: min(440px, calc(100vw - 48px)); max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px 20px;
}
.consent[hidden] { display: none; }
@keyframes kem-consent-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .consent[data-mode="first"]:not([hidden]) { animation: kem-consent-in .24s var(--ease-out) .6s both; }
  .consent[data-mode="settings"]:not([hidden]) { animation: kem-consent-in .18s var(--ease-out) both; }
}
.consent:focus { outline: none; }
.consent:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.consent-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.consent-title { margin: 0 0 6px; font-family: var(--serif); font-size: 1.25rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
.consent-close { flex: none; width: 44px; height: 44px; margin: -10px -12px 0 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--stone); display: grid; place-items: center; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .consent-close:hover { background: var(--sand); color: var(--ink); } }
.consent-text { margin: 0 0 14px; font-size: 0.95rem; line-height: 1.55; color: var(--stone); }
.consent-now { margin: -2px 0 14px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--sand); color: var(--ink); font-size: 0.95rem; line-height: 1.5; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.consent-actions .btn { min-height: 46px; padding: 10px 14px; }
@media (max-width: 43.6875em) {
  .consent { left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); bottom: max(10px, env(safe-area-inset-bottom, 0px)); width: auto; max-height: calc(100vh - 20px); padding: 16px; }
  .consent-text { font-size: 0.92rem; margin-bottom: 12px; }
}
@media print { .consent { display: none !important; } }

/* ---------- Website Analytics on the Staff Portal (templates/admin_analytics.html, staff-analytics.js) ----------
   Four headline numbers against the period before, visitors each day as one line (a crosshair and a
   table for the numbers), and ranked bars in one hue. Marks wear the accent (maroon, or rose on the dark
   page); words wear the text colours. */
:root { --ga-up: #2E6A3A; --ga-down: #A3361A; }
:root[data-theme="dark"] { --ga-up: #8FCB98; --ga-down: #F0A58E; }
.ga-lead { margin: 10px 0 0; color: var(--stone); max-width: 60ch; }
.ga-body { display: flex; flex-direction: column; gap: 20px; }
.ga-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
/* the four periods: one row, or two by two on a phone; the 1px gaps are the lines between them */
.ga-range { display: inline-grid; grid-auto-flow: column; gap: 1px; background: var(--line); border: 1px solid var(--line-control); border-radius: var(--radius-sm); overflow: hidden; }
.ga-range button { appearance: none; border: 0; background: var(--surface); font: inherit; font-size: 0.95rem; font-weight: 600; min-height: 44px; padding: 10px 14px; color: var(--ink); cursor: pointer; }
@media (max-width: 560px) { .ga-range { grid-auto-flow: row; grid-template-columns: 1fr 1fr; width: 100%; } }
.ga-range button[aria-pressed="true"] { background: var(--maroon); color: var(--ivory); }
@media (hover: hover) and (pointer: fine) { .ga-range button[aria-pressed="false"]:hover { background: var(--sand); } }
.ga-dates { margin: 0; color: var(--stone); font-size: 0.95rem; }
.ga-note { margin: 0; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--sand); color: var(--ink); font-size: 0.95rem; }
.ga-report { display: flex; flex-direction: column; gap: 20px; transition: opacity 0.2s; }
.ga-report[hidden] { display: none; }
.ga-loading { opacity: 0.55; }
.ga-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .ga-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ga-kpis { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.ga-kpi { padding: 18px 20px; gap: 0; }
.ga-kpi .ga-kpi-label { font-family: var(--sans); font-size: 0.95rem; font-weight: 700; line-height: 1.3; }
.ga-kpi .ga-kpi-value { margin: 6px 0 0; font-size: clamp(1.8rem, 1.35rem + 1.3vw, 2.5rem); font-weight: 650; line-height: 1.1; color: var(--ink); }
.ga-kpi .ga-kpi-hint { margin: 4px 0 0; color: var(--muted); font-size: 0.85rem; }
.ga-kpi .ga-delta { margin: 10px 0 0; color: var(--stone); font-size: 0.88rem; font-weight: 600; }
.ga-kpi .ga-delta--up { color: var(--ga-up); }
.ga-kpi .ga-delta--down { color: var(--ga-down); }
.ga-card { padding: 20px 22px; gap: 0; }
.ga-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 14px; }
.ga-card h2 { font-size: var(--h2-card); }
.ga-card .ga-sub { margin: 0; color: var(--muted); font-size: 0.9rem; }
.ga-chart { position: relative; }
.ga-svg { display: block; width: 100%; height: auto; overflow: visible; }
.ga-svg:focus { outline: none; }
.ga-svg:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.ga-grid-line { stroke: var(--line); stroke-width: 1; }
.ga-base-line { stroke: var(--line-strong); stroke-width: 1; }
.ga-axis { fill: var(--muted); font-family: var(--sans); font-size: 12px; font-variant-numeric: tabular-nums; }
.ga-area { fill: var(--accent); opacity: 0.1; }
.ga-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ga-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.ga-hair { stroke: var(--ink); stroke-width: 1; opacity: 0.35; }
.ga-tip { position: absolute; z-index: 2; pointer-events: none; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: 0 8px 20px rgba(27, 23, 20, 0.14); font-size: 0.85rem; }
.ga-tip[hidden] { display: none; }
.ga-tip-value { color: var(--ink); font-size: 1rem; }
.ga-tip-sub, .ga-tip-date { color: var(--stone); }
.ga-numbers { margin-top: 10px; }
.ga-numbers summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 600; cursor: pointer; }
.ga-table-scroll { max-height: 360px; overflow: auto; margin-top: 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.ga-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.ga-table th, .ga-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.ga-table td { text-align: right; font-variant-numeric: tabular-nums; }
.ga-table thead th { position: sticky; top: 0; background: var(--surface); color: var(--ink); }
.ga-table thead th + th { text-align: right; }
.ga-table tbody th { font-weight: 400; color: var(--ink); }
.ga-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 800px) { .ga-grid { grid-template-columns: minmax(0, 1fr); } }
.ga-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ga-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 0.95rem; }
.ga-row-label { min-width: 0; overflow-wrap: anywhere; color: var(--ink); }
.ga-row-sub { display: block; color: var(--muted); font-size: 0.82rem; }
.ga-row-value { flex: none; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ga-track { height: 10px; margin-top: 5px; }
.ga-fill { height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.ga-empty { color: var(--muted); font-size: 0.95rem; }
.ga-foot { margin: 0; color: var(--stone); font-size: 0.9rem; max-width: 80ch; }
.ga-setup p { margin: 10px 0 0; }
@media print { .ga-bar, .ga-numbers summary { display: none; } .ga-report { opacity: 1; } }

/* ---------- Contacts on the Staff Portal (templates/admin_contacts.html, js/contacts-admin.js) ----------
   One long list with the tools above it: the search, Views and Filter stay at the top of the
   window as the list scrolls; the filters in use show as chips under them. Menus and the filter
   editor are popovers that grow from the corner of the button that opened them; a contact or
   organization opens in a sheet that slides in from the right and leaves the same way. */
.ct { --ease-drawer: cubic-bezier(.32, .72, 0, 1); }
.ct-body { padding-bottom: var(--section); }
.ct-bar { position: sticky; top: var(--sticky-head, 84px); z-index: 6; background: var(--bg); padding: 12px 0; margin: 4px 0 0; border-bottom: 1px solid var(--line); }
.ct-bar[hidden] { display: none; }
.ct-bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ct-search { position: relative; flex: 1 1 300px; min-width: 0; max-width: 560px; }
.ct-search .ct-search-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ct-search input { width: 100%; min-height: 46px; padding: 10px 14px 10px 42px; border: 1px solid var(--line-control); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; }
.ct-search input::placeholder { color: var(--muted); }
.ct-search input { padding-right: 72px; }
.ct-search .search-clear, .ct-edit-find .search-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.ct-search input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
.ct-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.ct-tool { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; max-width: 260px; padding: 0 14px; border: 1px solid var(--line-control); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background-color .15s, border-color .15s, transform .12s var(--ease-out); }
.ct-tool .ct-tool-tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-tool .ct-tool-tx[data-changed]::after { content: " · Changed"; color: var(--muted); font-weight: 500; }
.ct-tool .ct-caret { color: var(--muted); flex: none; }
.ct-tool > svg:first-child { flex: none; color: var(--accent); }
.ct-tool[aria-expanded="true"], .ct-tool--on { border-color: var(--ink); }
.ct-tool--on { box-shadow: inset 0 0 0 1px var(--ink); }
@media (hover: hover) and (pointer: fine) { .ct-tool:hover { background: var(--sand); } }
.ct-tool:active { background: var(--sand); transform: scale(.97); }
.ct-tool:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ct-new { min-height: 46px; }
@media (max-width: 560px) {
  .ct-tools { width: 100%; flex-wrap: nowrap; }
  .ct-tools .ct-tool[data-views-btn] { flex: 1 1 0; min-width: 0; }
  .ct-new-more { display: none; }
}

.ct-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.ct-chips[hidden] { display: none; }
.ct-chip { display: inline-flex; align-items: stretch; max-width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--sand); overflow: hidden; }
.ct-chip button { border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.ct-chip-main { display: inline-flex; align-items: baseline; gap: 6px; min-height: 38px; min-width: 0; padding: 6px 4px 6px 12px; font-size: 0.9rem; text-align: left; }
.ct-chip-l { font-weight: 700; white-space: nowrap; }
.ct-chip-v { color: var(--stone); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34ch; }
.ct-chip-x { display: grid; place-items: center; width: 34px; flex: none; color: var(--stone); }
@media (hover: hover) and (pointer: fine) { .ct-chip-main:hover .ct-chip-v, .ct-chip-x:hover { color: var(--accent); } .ct-chip-x:hover { background: var(--line); } }
.ct-chip button:active { background: var(--line); }
.ct-chip button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.ct-chip[data-chip]:has([aria-expanded="true"]) { border-color: var(--ink); }
.ct-clear { min-height: 38px; padding-inline: 6px; }

.ct-results { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: 16px 0 12px; }
.ct-results[hidden] { display: none; }
.ct-count { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; color: var(--stone); font-variant-numeric: tabular-nums; }
.ct-count strong { color: var(--ink); font-size: 1.25rem; }
.ct-count-sub { flex-basis: 100%; font-size: 0.88rem; color: var(--muted); }
.ct-results-acts { display: flex; align-items: center; gap: 10px; }
.ct-msg { margin: 0 0 14px; }

/* the list */
.ct-scroll[hidden] { display: none; }
.ct-table { min-width: 860px; }
.ct-table thead th { padding: 0; }
.ct-table thead th:not(:has(button)) { padding: 8px 12px; }
.ct-table thead th button { display: inline-flex; align-items: center; gap: 6px; width: 100%; min-height: 40px; padding: 8px 12px; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.ct-table thead th button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.ct-sort-ic { opacity: 0; transition: transform .15s var(--ease-out); }
.ct-table th[aria-sort="ascending"] .ct-sort-ic { opacity: 1; transform: rotate(180deg); }
.ct-table th[aria-sort="descending"] .ct-sort-ic { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .ct-table thead th button:hover { color: var(--ink); } .ct-table th[aria-sort="none"] button:hover .ct-sort-ic { opacity: 0.4; } }
.ct-table td { vertical-align: top; padding-block: 10px; }
.ct-table tbody tr { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ct-table tbody tr:hover { background: var(--sand); } .ct-table tbody tr:hover .ct-open { color: var(--accent); } }
.ct-table tbody tr:active { background: var(--sand); }
.ct-open { display: inline; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.ct-open:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.ct-sub { display: block; margin-top: 2px; font-size: 0.86rem; color: var(--muted); }
.ct-c-name, .ct-c-org { min-width: 170px; }
.ct-c-city { min-width: 130px; }
.ct-c-kem { min-width: 120px; }
.ct-c-reach { min-width: 210px; }
.ct-c-reach .ct-email { overflow-wrap: anywhere; }
.ct-c-reach .ct-no { color: var(--muted); text-decoration: line-through; }
.ct-c-lists { color: var(--stone); font-size: 0.88rem; min-width: 150px; max-width: 240px; }
.ct-c-kem { color: var(--stone); }
.ct-tag { display: inline-block; margin-left: 8px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 0.75rem; font-weight: 700; color: var(--stone); vertical-align: 1px; }
.ct-archived .ct-open { color: var(--muted); }
/* a contact just saved shows where it landed, then fades back */
.ct-table tbody tr.ct-flash { background: var(--sand); }
.ct-table tbody tr.ct-fading { transition: background-color .8s ease-out; }
.ct-none { display: grid; justify-items: start; gap: 12px; }
.ct-none[hidden] { display: none; }
.ct-none p { margin: 0; }
@media (max-width: 760px) {
  .ct-table { min-width: 0; }
  .ct-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .ct-table tbody { display: block; }
  .ct-table tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .ct-table tbody tr:last-child { border-bottom: 0; }
  .ct-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .ct-table td:empty, .ct-table td:not(:has(:not(:empty))) { display: none; }
  .ct-c-org .ct-sub, .ct-c-city .ct-sub { display: inline; margin: 0; }
  .ct-c-org .ct-sub::before, .ct-c-city .ct-sub::before { content: " · "; }
  .ct-c-name, .ct-c-org, .ct-c-reach, .ct-c-city, .ct-c-lists, .ct-c-kem { min-width: 0; max-width: none; }
  .ct-c-lists::before, .ct-c-kem::before { content: attr(data-label) " "; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
  .ct-c-kem { white-space: normal; }
  .ct-c-lists, .ct-c-kem { font-size: 0.86rem; }
}

/* no contacts yet */
.ct-empty { max-width: 720px; display: grid; gap: 10px; padding: 22px 26px; margin: 16px 0 4px; }
.ct-empty[hidden] { display: none; }
.ct-empty h2 { font-size: var(--h2-card); margin: 0; }
.ct-empty p { margin: 0; color: var(--stone); }
.ct-hint { margin: 0; font-size: 0.86rem; color: var(--muted); line-height: 1.45; }

/* menus and the filter editor */
.ct-pop { position: fixed; inset: auto; margin: 0; padding: 6px; min-width: 248px; max-width: min(360px, calc(100vw - 16px)); overflow: auto; overscroll-behavior: contain;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  box-shadow: 0 14px 34px rgba(27, 23, 20, 0.16), 0 2px 6px rgba(27, 23, 20, 0.08); transform-origin: var(--ct-origin, top left); }
.ct-pop-h { margin: 6px 10px 4px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ct-menu-list { display: grid; }
.ct-menu-list button { display: flex; align-items: flex-start; gap: 8px; width: 100%; min-height: 40px; padding: 9px 12px 9px 8px; border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--ink); font: inherit; font-size: 0.95rem; text-align: left; cursor: pointer; }
.ct-menu-list button:disabled { color: var(--muted); cursor: default; }
@media (hover: hover) and (pointer: fine) { .ct-menu-list button:not(:disabled):hover { background: var(--sand); } }
.ct-menu-list button:not(:disabled):active { background: var(--line); }
.ct-menu-list button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.ct-mi-tick { flex: none; width: 18px; height: 20px; display: grid; place-items: center; color: var(--accent); }
.ct-mi-tx { display: grid; gap: 1px; min-width: 0; }
.ct-mi-tx > span:first-child { font-weight: 600; }
.ct-mi-note { font-size: 0.82rem; color: var(--muted); }
.ct-mi-sep { height: 1px; margin: 6px 8px; background: var(--line); }
.ct-edit { width: 340px; padding: 0; display: none; flex-direction: column; overflow: hidden; }
.ct-edit:popover-open { display: flex; }
.ct-edit-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 10px; border-bottom: 1px solid var(--line); }
.ct-edit-head h2 { margin: 0; font-size: 1.05rem; }
.ct-anyall span { min-height: 32px; padding: 0 12px; font-size: 0.85rem; }
.ct-anyall input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ct-edit-find { position: relative; margin: 10px 14px 0; }
.ct-edit-find[hidden] { display: none; }
.ct-edit-find input { width: 100%; min-height: 40px; padding: 8px 64px 8px 12px; border: 1px solid var(--line-control); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font: inherit; }
.ct-edit-find input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.ct-edit-list { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 6px; max-height: min(52vh, 420px); }
.ct-ev { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 38px; padding: 6px 8px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.95rem; }
.ct-ev[hidden] { display: none; }
.ct-ev input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ct-ev:hover { background: var(--sand); } }
.ct-ev:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: -3px; }
.ct-ev-n { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.ct-ev--zero .ct-ev-t { color: var(--muted); }
.ct-edit-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--line); }
.ct-edit-foot .adm-link { padding-inline: 0; }
.ct-edit-foot .adm-link[hidden] { visibility: hidden; display: inline-block; }
.ct-edit-foot .btn { margin-left: auto; }
@media (prefers-reduced-motion: no-preference) {
  .ct-pop { transition: opacity .16s var(--ease-out), transform .16s var(--ease-out), overlay .16s allow-discrete, display .16s allow-discrete; }
  .ct-pop:not(:popover-open) { opacity: 0; transform: scale(.97); transition-duration: .1s; }
  @starting-style { .ct-pop:popover-open { opacity: 0; transform: scale(.97); } }
}

/* the sheet: a contact or an organization, from the right */
.ct-sheet { position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; width: min(580px, 100vw); height: 100vh; height: 100dvh; max-width: 100vw; max-height: none;
  border: 0; border-left: 1px solid var(--line-strong); border-radius: 14px 0 0 14px; background: var(--surface); color: var(--ink);
  box-shadow: -18px 0 48px rgba(27, 23, 20, 0.18); overflow: hidden; }
.ct-sheet[open] { display: flex; }
.ct-sheet::backdrop { background: rgba(27, 23, 20, 0.45); }
.ct-sheet--org { width: min(540px, 100vw); }
.ct-sheet-form { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.ct-sheet-head { align-items: flex-start; padding: 18px 18px 14px 24px; }
.ct-sheet-title { min-width: 0; }
.ct-sheet-head h2 { font-size: var(--h2-card); margin: 0; overflow-wrap: anywhere; }
.ct-sheet-head h2:focus { outline: none; }
.ct-sheet-sub { margin: 4px 0 0; color: var(--stone); font-size: 0.92rem; }
.ct-sheet-sub:empty { display: none; }
.ct-sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 24px 24px; display: grid; align-content: start; gap: 4px; }
.ct-sheet-body > .form-status { margin: 12px 0 4px; }
.ct-sheet-body > .form-status:focus { outline: none; }
.ct-archived-note { margin: 12px 0 0; padding: 10px 14px; border: 1px dashed var(--line-control); border-radius: var(--radius-sm); color: var(--stone); font-size: 0.92rem; }
.ct-archived-note[hidden] { display: none; }
.ct-group { border: 0; margin: 0; padding: 18px 0 16px; display: grid; gap: 12px; min-width: 0; }
.ct-group + .ct-group { border-top: 1px solid var(--line); }
.ct-group legend { float: left; width: 100%; margin: 0 0 2px; padding: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--stone); }
.ct-group legend + * { clear: both; }
.ct-sheet .field { gap: 5px; }
.ct-sheet .field label { font-size: 0.9rem; }
.ct-sheet .field input, .ct-sheet .field select, .ct-sheet .field textarea { padding: 10px 12px; min-height: 44px; }
.ct-sheet .field textarea { min-height: 88px; }
.ct-sheet .field select:disabled { color: var(--muted); }
.ct-sheet .field input:read-only:not([type=checkbox]) { background: var(--sand); color: var(--stone); border-style: dashed; }
.ct-sheet .ct-hint[hidden] { display: none; }
.ct-row { display: grid; gap: 12px; }
@media (min-width: 480px) {
  .ct-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-row--city { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
}
.ct-field-acts { display: flex; flex-wrap: wrap; gap: 0 16px; margin: 0; }
.ct-field-acts .adm-link { padding-inline: 0; min-height: 36px; font-size: 0.9rem; }
.ct-field-acts .adm-link[hidden] { display: none; }
.ct-inline { display: flex; align-items: center; gap: 10px; }
.ct-inline input { flex: 1 1 auto; min-width: 0; }
.ct-inline .adm-link { flex: none; padding-inline: 2px; }
.ct-checks { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.ct-checks:empty { display: none; }
.ct-checks .choice { color: var(--ink); align-items: center; min-height: 32px; }
.ct-checks .choice input { margin-top: 0; }
.ct-cc { margin: 0; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--sand); color: var(--stone); font-size: 0.88rem; line-height: 1.45; }
.ct-cc[hidden] { display: none; }
.ct-cc--warn { background: none; border: 1px solid var(--accent); color: var(--ink); }
.ct-addtag { display: flex; gap: 8px; }
.ct-addtag input { flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line-control); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font: inherit; font-size: 0.95rem; }
.ct-addtag input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.ct-meta { margin: 8px 0 0; font-size: 0.85rem; color: var(--muted); }
.ct-meta:empty { display: none; }
.ct-sheet-foot { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 24px; padding-bottom: max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.ct-sheet-foot-main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ct-archive { padding-inline: 4px; }
.ct-archive[hidden] { display: none; }
.ct-divs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ct-divs li { display: flex; align-items: center; gap: 10px; }
.ct-divs input { flex: 1 1 auto; min-width: 0; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line-control); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font: inherit; font-size: 0.95rem; }
.ct-divs input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.ct-div-n { flex: none; font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.ct-divs .adm-link { flex: none; padding-inline: 2px; }
.ct-divs .adm-link:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.ct-adddiv { justify-self: start; }
@media (max-width: 560px) {
  .ct-sheet { border-radius: 0; border-left: 0; }
  .ct-sheet-head { padding-left: 18px; }
  .ct-sheet-body, .ct-sheet-foot { padding-inline: 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  .ct-sheet { transform: translateX(0); transition: transform .2s var(--ease-drawer), overlay .2s allow-discrete, display .2s allow-discrete; }
  .ct-sheet:not([open]) { transform: translateX(100%); }
  .ct-sheet[open] { transition-duration: .34s; }
  @starting-style { .ct-sheet[open] { transform: translateX(100%); } }
  .ct-sheet::backdrop { transition: background-color .2s ease-out, overlay .2s allow-discrete, display .2s allow-discrete; }
  .ct-sheet:not([open])::backdrop { background-color: rgba(27, 23, 20, 0); }
  @starting-style { .ct-sheet[open]::backdrop { background-color: rgba(27, 23, 20, 0); } }
}
@media (prefers-reduced-motion: reduce) {
  .ct-sheet { transition: opacity .15s ease, overlay .15s allow-discrete, display .15s allow-discrete; }
  .ct-sheet:not([open]) { opacity: 0; }
  @starting-style { .ct-sheet[open] { opacity: 0; } }
}

/* labels and envelopes */
.ct-print { width: min(520px, calc(100vw - 32px)); }
.ct-print-sum { margin: 0; color: var(--stone); }
.ct-print-seg { align-self: start; }
.ct-print-seg span { min-height: 44px; }
.ct-print-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ct-sheetpick[hidden] { display: none; }
.ct-sheetpick .label strong { color: var(--accent); font-variant-numeric: tabular-nums; }
/* a sheet of 30, as it sits in the printer: the first empty label is picked */
.ct-sheetgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px 5px; width: 186px; padding: 12px 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--bg); box-shadow: 0 2px 8px rgba(27, 23, 20, 0.08); }
.ct-cell { height: 16px; padding: 0; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface); cursor: pointer; transition: background-color .12s, border-color .12s; }
.ct-cell--used { background: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 5px); border-style: dashed; }
.ct-cell[aria-checked="true"] { background: var(--maroon); border-color: var(--maroon); }
@media (hover: hover) and (pointer: fine) { .ct-cell:not([aria-checked="true"]):hover { border-color: var(--ink); } }
.ct-cell:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
@media (pointer: coarse) { .ct-sheetgrid { width: 220px; gap: 4px 6px; } .ct-cell { height: 26px; } }
.ct-print .choice[hidden] { display: none; }
.ct-save-sum { margin: 0; color: var(--stone); font-size: 0.95rem; }
.ct-save-which { display: grid; gap: 8px; }
.ct-save-which[hidden] { display: none; }
.ct-save-del { margin-left: auto; }
.ct-save-del[hidden] { display: none; }

:root[data-theme="dark"] .ct-pop { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3); }
:root[data-theme="dark"] .ct-sheet { box-shadow: -18px 0 48px rgba(0, 0, 0, 0.5); }
:root[data-theme="dark"] .ct-sheet::backdrop { background: rgba(0, 0, 0, 0.55); }
:root[data-theme="dark"] .ct-cell[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
@media print { .ct-bar, .ct-results-acts { display: none; } }
