/* Town of Sand Lake - demonstration site
   Shared stylesheet. Every color, font, radius, shadow and easing lives in :root.
   Change tokens, not components. */

:root {
  /* Structural tones: lake (deep navy-teal from the Town's own site CSS) and birch (paper) */
  --lake-950: #0E1D25;
  --lake-900: #132630;
  --lake-800: #1B333F;
  --lake-700: #2A4552;
  --lake-600: #3E5560;
  --lake-300: #AFC0C6;
  --lake-200: #C9D3D6;
  --birch-0: #FFFFFF;
  --birch-50: #FBFAF6;
  --birch-100: #F6F4EC;
  --birch-200: #ECE8DA;
  --birch-300: #D8D2BE;

  /* Rationed accent: oak green from the seal's oak tree and the "New York" script */
  --oak-700: #4A6316;   /* text, links, buttons on light surfaces (6.2:1 on birch-100) */
  --oak-800: #3A4E10;   /* hover on light */
  --oak-500: #739700;   /* decorative strokes only, never text */
  --oak-300: #B5D27A;   /* text and strokes on lake-800 or darker (7.8:1) */
  --oak-200: #D3E5AE;   /* hover on dark */

  /* Semantic roles */
  --bg: var(--birch-100);
  --bg-alt: var(--birch-200);
  --surface: var(--birch-50);
  --surface-raised: var(--birch-0);
  --ink: var(--lake-800);
  --ink-muted: var(--lake-600);
  --line: var(--birch-300);
  --link: var(--oak-700);
  --link-hover: var(--oak-800);
  --on-dark: var(--birch-100);
  --on-dark-muted: var(--lake-200);
  --on-dark-accent: var(--oak-300);
  --notice-bg: #EEF2E2;
  --notice-line: var(--oak-500);
  --focus: var(--oak-700);
  --focus-on-dark: var(--oak-300);
  --scrim: rgba(14, 29, 37, 0.62);
  --scrim-strong: rgba(14, 29, 37, 0.82);

  /* Type */
  --font-display: "Libre Caslon Text", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans: "Public Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --fs-xs: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --fs-sm: clamp(0.88rem, 0.86rem + 0.12vw, 0.95rem);
  --fs-base: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --fs-lg: clamp(1.12rem, 1.05rem + 0.35vw, 1.3rem);
  --fs-xl: clamp(1.35rem, 1.2rem + 0.7vw, 1.75rem);
  --fs-2xl: clamp(1.7rem, 1.4rem + 1.4vw, 2.5rem);
  --fs-3xl: clamp(2.2rem, 1.6rem + 2.8vw, 4rem);
  --fs-hero: clamp(2.6rem, 1.7rem + 4.4vw, 5.4rem);
  --lh-tight: 1.12;
  --lh-snug: 1.3;
  --lh-body: 1.62;
  --tracking-caps: 0.12em;

  /* Space and shape */
  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1180px;
  --wrap-narrow: 760px;
  --section-pad: clamp(56px, 4rem + 3vw, 104px);
  --radius-sm: 4px;
  --radius: 10px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(19, 38, 48, 0.08);
  --shadow: 0 2px 6px rgba(19, 38, 48, 0.07), 0 10px 28px rgba(19, 38, 48, 0.08);
  --shadow-lg: 0 18px 50px rgba(14, 29, 37, 0.22);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 160ms;
  --dur: 320ms;
  --dur-slow: 700ms;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: var(--lh-tight); margin: 0 0 0.5em; color: inherit; }
h1 { font-size: var(--fs-3xl); letter-spacing: -0.01em; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-lg); line-height: var(--lh-snug); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
address { font-style: normal; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible, .site-footer :focus-visible, .hero :focus-visible { outline-color: var(--focus-on-dark); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--lake-900); color: var(--on-dark); padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-dark); }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: calc(var(--wrap-narrow) + 2 * var(--gutter)); }

/* ---------- Demo bar (every page) ---------- */
.demo-bar {
  background: var(--lake-950); color: var(--on-dark-muted);
  font-size: var(--fs-xs); line-height: 1.4; padding: 8px 0; text-align: center;
}
.demo-bar strong { color: var(--on-dark); }
.demo-bar a { color: var(--on-dark-accent); }

/* ---------- Utility strip ---------- */
.utility {
  background: var(--lake-800); color: var(--on-dark-muted); font-size: var(--fs-xs);
}
.utility .wrap { display: flex; flex-wrap: wrap; gap: 4px 22px; align-items: center; justify-content: space-between; min-height: 38px; padding-top: 6px; padding-bottom: 6px; }
.utility ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.utility a { color: var(--on-dark); text-decoration: none; }
.utility a:hover { color: var(--on-dark-accent); text-decoration: underline; }
.utility .hamlets { letter-spacing: 0.04em; }

/* ---------- Header and primary nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--birch-50);
  background: color-mix(in srgb, var(--birch-50) 94%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand-seal {
  width: 46px; height: 55px; border-radius: 6px; background: var(--birch-0);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); padding: 3px; object-fit: contain;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); }
.brand-sub { font-size: var(--fs-xs); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--ink-muted); margin-top: 4px; }

.primary-nav { margin-left: auto; }
.primary-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; align-items: center; }
.primary-nav a {
  display: block; padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink); text-decoration: none;
}
.primary-nav a:hover { background: var(--birch-200); color: var(--ink); }
.primary-nav a[aria-current="page"] { color: var(--oak-700); box-shadow: inset 0 -3px 0 var(--oak-500); border-radius: 0; }

.menu-toggle {
  display: none; margin-left: auto; align-items: center; gap: 8px;
  font: 600 var(--fs-sm) var(--font-sans); color: var(--ink);
  background: var(--birch-0); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 9px 16px; cursor: pointer;
}
.menu-toggle:hover { border-color: var(--lake-600); }
.menu-toggle svg { width: 18px; height: 18px; }
.index-toggle { margin-left: 8px; }

/* Full site index panel (opened by .index-toggle / .menu-toggle). Hidden only when JS runs. */
.site-index {
  background: var(--surface-raised); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.js .site-index { display: none; }
.js .site-index.is-open { display: block; animation: drop-in var(--dur) var(--ease-out); }
.site-index .wrap { padding-top: 28px; padding-bottom: 32px; }
.site-index-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.site-index-head h2 { font-size: var(--fs-xl); margin: 0; }
.index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px 28px; }
.index-grid h3 {
  font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--tracking-caps);
  text-transform: uppercase; color: var(--ink-muted); margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.index-grid ul { list-style: none; margin: 0; padding: 0; }
.index-grid li { margin: 0; }
.index-grid a { display: inline-block; padding: 3px 0; font-size: var(--fs-sm); color: var(--ink); text-decoration: none; }
.index-grid a:hover { color: var(--oak-700); text-decoration: underline; }
.index-grid a[aria-current="page"] { color: var(--oak-700); font-weight: 700; }

@keyframes drop-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1060px) {
  .primary-nav > ul a { padding: 10px 8px; }
}
@media (max-width: 940px) {
  .js .primary-nav { display: none; }
  .js .menu-toggle { display: inline-flex; }
  .js .index-toggle { display: none; }
  .primary-nav { margin-left: 0; width: 100%; }
  .site-header .wrap { flex-wrap: wrap; }
  .primary-nav > ul { flex-wrap: wrap; }
}

/* ---------- Buttons, chips, eyebrows ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 700 var(--fs-sm) var(--font-sans); letter-spacing: 0.01em; text-decoration: none;
  padding: 13px 22px; border-radius: var(--radius-pill); border: 2px solid transparent; cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--oak-700); color: var(--birch-0); }
.btn-primary:hover { background: var(--oak-800); color: var(--birch-0); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--lake-600); }
.btn-secondary:hover { background: var(--lake-800); color: var(--on-dark); border-color: var(--lake-800); text-decoration: none; }
.on-dark .btn-primary, .hero .btn-primary { background: var(--oak-300); color: var(--lake-900); }
.on-dark .btn-primary:hover, .hero .btn-primary:hover { background: var(--oak-200); color: var(--lake-900); }
.on-dark .btn-secondary, .hero .btn-secondary { color: var(--on-dark); border-color: var(--on-dark-muted); }
.on-dark .btn-secondary:hover, .hero .btn-secondary:hover { background: var(--birch-100); color: var(--lake-900); border-color: var(--birch-100); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row-spaced { margin-top: 24px; }
.more-link { margin: 16px 0 0; font-weight: 600; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 var(--fs-xs) var(--font-sans); letter-spacing: var(--tracking-caps); text-transform: uppercase;
  color: var(--oak-700); margin: 0 0 14px;
}
.on-dark .eyebrow, .hero .eyebrow { color: var(--on-dark-accent); }

/* Signature motif: the shoreline mark - three ripple lines, used as eyebrow lead-in and section rule */
.ripple { width: 34px; height: 12px; flex-shrink: 0; color: var(--oak-500); }
.on-dark .ripple, .hero .ripple { color: var(--oak-300); }
.shoreline {
  display: block; width: 100%; height: 22px; color: var(--birch-300);
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='22' viewBox='0 0 120 22'%3E%3Cpath d='M0 6c15 0 15-4 30-4s15 4 30 4 15-4 30-4 15 4 30 4M0 13c15 0 15-4 30-4s15 4 30 4 15-4 30-4 15 4 30 4M0 20c15 0 15-4 30-4s15 4 30 4 15-4 30-4 15 4 30 4' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") repeat-x left center / 120px 22px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='22' viewBox='0 0 120 22'%3E%3Cpath d='M0 6c15 0 15-4 30-4s15 4 30 4 15-4 30-4 15 4 30 4M0 13c15 0 15-4 30-4s15 4 30 4 15-4 30-4 15 4 30 4M0 20c15 0 15-4 30-4s15 4 30 4 15-4 30-4 15 4 30 4' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") repeat-x left center / 120px 22px;
}

.chip {
  display: inline-block; font: 600 var(--fs-xs) var(--font-sans); letter-spacing: 0.02em;
  padding: 4px 10px; border-radius: var(--radius-pill); background: var(--birch-200); color: var(--ink);
}
.chip-oak { background: var(--notice-bg); color: var(--oak-800); }
.chip-muted { background: transparent; border: 1px solid var(--line); color: var(--ink-muted); }

/* ---------- Sections ---------- */
.section { padding: var(--section-pad) 0; }
.section-alt { background: var(--bg-alt); }
.section-surface { background: var(--surface); }
.section-dark { background: var(--lake-800); color: var(--on-dark); }
.section-dark a { color: var(--on-dark-accent); }
.section-dark a:hover { color: var(--oak-200); }
.section-head { max-width: 720px; margin-bottom: clamp(28px, 3vw, 44px); }
.section-head p { color: var(--ink-muted); font-size: var(--fs-lg); margin: 0; }
.section-dark .section-head p { color: var(--on-dark-muted); }
.section-head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: clamp(28px, 3vw, 44px); }
.section-head-row .section-head { margin-bottom: 0; }

/* ---------- Home hero ---------- */
.hero {
  position: relative; isolation: isolate; color: var(--on-dark);
  min-height: clamp(540px, 82vh, 780px); display: flex; align-items: flex-end;
  background: var(--lake-900);
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(14, 29, 37, 0.15) 0%, rgba(14, 29, 37, 0.05) 30%, var(--scrim) 62%, var(--scrim-strong) 100%),
    linear-gradient(90deg, rgba(14, 29, 37, 0.55) 0%, rgba(14, 29, 37, 0) 60%);
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; padding-top: 120px; padding-bottom: clamp(40px, 6vw, 72px); }
.hero h1 { font-size: var(--fs-hero); margin: 0 0 18px; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35); }
.hero h1 em { font-style: italic; font-weight: 400; color: var(--on-dark-accent); }
.hero-lede { font-size: var(--fs-lg); max-width: 40ch; color: var(--birch-100); margin-bottom: 28px; }
.hero-credit { position: absolute; right: var(--gutter); bottom: 10px; font-size: 0.72rem; color: var(--lake-200); opacity: 0.9; }

/* Seal medallion */
.medallion {
  position: relative; width: clamp(150px, 15vw, 200px); aspect-ratio: 1; border-radius: 50%;
  background: var(--birch-0); display: grid; place-items: center;
  box-shadow: 0 0 0 6px rgba(246, 244, 236, 0.18), 0 0 0 7px var(--oak-300), var(--shadow-lg);
}
.medallion img { width: 52%; height: auto; }
.medallion svg.medallion-ring { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--lake-800); }
.medallion-ring text { font: 700 10.5px var(--font-sans); letter-spacing: 0.22em; fill: currentColor; }

/* ---------- Interior page head ---------- */
.page-head { background: var(--lake-800); color: var(--on-dark); position: relative; overflow: hidden; }
.page-head .wrap { position: relative; padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(36px, 5vw, 60px); }
.page-head h1 { font-size: var(--fs-3xl); margin: 0 0 12px; max-width: 22ch; }
.page-head .lede { color: var(--lake-200); font-size: var(--fs-lg); max-width: 60ch; margin: 0; }
.page-head .eyebrow { color: var(--on-dark-accent); }
.page-head::after {
  content: ""; position: absolute; right: -40px; bottom: -10px; width: 420px; height: 120px; opacity: 0.18;
  background: var(--oak-300);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='22' viewBox='0 0 120 22'%3E%3Cpath d='M0 6c15 0 15-4 30-4s15 4 30 4 15-4 30-4 15 4 30 4M0 13c15 0 15-4 30-4s15 4 30 4 15-4 30-4 15 4 30 4M0 20c15 0 15-4 30-4s15 4 30 4 15-4 30-4 15 4 30 4' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") repeat left top / 120px 22px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='22' viewBox='0 0 120 22'%3E%3Cpath d='M0 6c15 0 15-4 30-4s15 4 30 4 15-4 30-4 15 4 30 4M0 13c15 0 15-4 30-4s15 4 30 4 15-4 30-4 15 4 30 4M0 20c15 0 15-4 30-4s15 4 30 4 15-4 30-4 15 4 30 4' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") repeat left top / 120px 22px;
  pointer-events: none;
}
.breadcrumbs { font-size: var(--fs-xs); margin-bottom: 18px; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumbs li { color: var(--lake-200); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--lake-300); }
.breadcrumbs a { color: var(--birch-100); }
.breadcrumbs a:hover { color: var(--on-dark-accent); }
.breadcrumbs [aria-current="page"] { color: var(--lake-200); }

/* ---------- Interior layout: article + aside ---------- */
.page-body { padding: clamp(40px, 5vw, 72px) 0 var(--section-pad); }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 880px) { .page-grid { grid-template-columns: minmax(0, 1fr); } }
.page-grid > aside { display: grid; gap: 20px; }
@media (min-width: 881px) { .page-grid > aside { position: sticky; top: 100px; } }

.prose { max-width: 68ch; }
.prose h2 { font-size: var(--fs-xl); margin-top: 2.2em; padding-top: 0.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--fs-lg); margin-top: 1.8em; }
.prose li { margin-bottom: 0.4em; }
.prose figure { margin: 2rem 0; }
.prose figcaption, .caption { font-size: var(--fs-xs); color: var(--ink-muted); margin-top: 8px; }
.prose img { border-radius: var(--radius); }
.source-note { font-size: var(--fs-xs); color: var(--ink-muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 2.5rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(18px, 2vw, 26px); box-shadow: var(--shadow-sm);
}
.card h2, .card h3 { font-size: var(--fs-lg); margin-bottom: 10px; }
.card > :last-child { margin-bottom: 0; }
.card-dark { background: var(--lake-800); color: var(--on-dark); border-color: var(--lake-700); }
.card-dark a { color: var(--on-dark-accent); }
.card-label {
  font: 700 var(--fs-xs) var(--font-sans); letter-spacing: var(--tracking-caps); text-transform: uppercase;
  color: var(--ink-muted); margin: 0 0 10px;
}
.card-dark .card-label { color: var(--lake-200); }

.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.link-card {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink);
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.link-card:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--lake-300); text-decoration: none; }
.link-card strong { font-family: var(--font-display); font-size: var(--fs-lg); line-height: var(--lh-snug); }
.link-card span { font-size: var(--fs-sm); color: var(--ink-muted); }
.link-card .go { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--oak-700); font-size: var(--fs-sm); }

/* Task tiles (How do I) */
.tasks { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); list-style: none; padding: 0; margin: 0; }
.tasks a {
  display: flex; align-items: center; gap: 14px; height: 100%;
  padding: 16px 18px; border-radius: var(--radius); background: var(--surface-raised); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); line-height: 1.35;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.tasks a:hover { border-color: var(--oak-700); background: var(--birch-50); color: var(--ink); text-decoration: none; }
.tasks .icon {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: var(--notice-bg); color: var(--oak-700);
}
.tasks .icon svg { width: 20px; height: 20px; }
.tasks .ext { margin-left: auto; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-muted); white-space: nowrap; }

/* Notice callout */
.notice {
  background: var(--notice-bg); border-left: 4px solid var(--notice-line); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px; margin: 0 0 1.5rem;
}
.notice > :last-child { margin-bottom: 0; }
.notice-title { font-weight: 700; margin-bottom: 6px; }

/* Definition lists for contact facts */
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: var(--fs-sm); }
.facts dt { color: var(--ink-muted); font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.card-dark .facts dt { color: var(--lake-200); }

/* People list */
.people { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.people li { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-raised); }
.people .name { font-weight: 700; display: block; }
.people .role { font-size: var(--fs-sm); color: var(--ink-muted); display: block; margin-bottom: 4px; }
.people a { font-size: var(--fs-sm); overflow-wrap: anywhere; }

/* Agenda / event list */
.events { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.event { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.event:last-child { border-bottom: 0; }
.event-date { text-align: center; border-radius: var(--radius); background: var(--surface-raised); border: 1px solid var(--line); padding: 8px 4px; line-height: 1.05; }
.event-date .mo { display: block; font: 700 var(--fs-xs) var(--font-sans); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--oak-700); }
.event-date .day { display: block; font: 700 1.7rem var(--font-display); }
.event h3 { font-family: var(--font-sans); font-size: var(--fs-base); font-weight: 700; margin: 2px 0 2px; }
.event p { margin: 0; font-size: var(--fs-sm); color: var(--ink-muted); }

/* News list */
.news { list-style: none; padding: 0; margin: 0; }
.news li { border-top: 1px solid var(--line); }
.news li:last-child { border-bottom: 1px solid var(--line); }
.news a { display: block; padding: 14px 0; color: var(--ink); text-decoration: none; font-weight: 600; }
.news a:hover { color: var(--oak-700); text-decoration: underline; }
.news small { display: block; font-weight: 400; color: var(--ink-muted); font-size: var(--fs-sm); margin-top: 2px; }

/* Tables: wide content scrolls inside its own container */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-raised); margin: 0 0 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
caption { text-align: left; padding: 14px 16px 0; font-weight: 700; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); background: var(--birch-50); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; }

/* Document library */
.doc-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 18px; }
.doc-filter label { display: grid; gap: 6px; font-size: var(--fs-sm); font-weight: 600; flex: 1 1 260px; }
.doc-count { font-size: var(--fs-sm); color: var(--ink-muted); }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.doc-item {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px 16px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius);
}
.doc-item .doc-icon { width: 44px; height: 52px; border-radius: 4px; background: var(--birch-200); display: grid; place-items: center; font: 700 0.66rem var(--font-sans); letter-spacing: 0.06em; color: var(--ink-muted); }
.doc-item a.doc-title { font-weight: 700; color: var(--ink); text-decoration: none; }
.doc-item a.doc-title:hover { color: var(--oak-700); text-decoration: underline; }
.doc-item .doc-meta { display: block; font-size: var(--fs-xs); color: var(--ink-muted); margin-top: 2px; }
.doc-item .doc-orig { font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
@media (max-width: 560px) { .doc-item { grid-template-columns: 36px minmax(0, 1fr); } .doc-item .doc-orig { grid-column: 2; } .doc-item .doc-icon { width: 36px; height: 44px; } }

/* Accessible document page */
.doc-meta-bar { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: var(--fs-sm); color: var(--lake-200); margin-top: 16px; }
.doc-meta-bar a { color: var(--on-dark-accent); }
.doc-sheet {
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(22px, 4vw, 56px); max-width: 820px;
  font-size: var(--fs-base);
}
.doc-sheet h2 { font-size: var(--fs-xl); text-align: center; letter-spacing: 0.04em; }
.doc-sheet .letterhead { margin-bottom: 1.4em; }
.doc-sheet .blank { display: inline-block; min-width: 10ch; border-bottom: 1px solid var(--ink); height: 1.1em; vertical-align: -0.15em; }
.doc-sheet .blank-line { display: block; border-bottom: 1px solid var(--ink); height: 1.8em; margin-bottom: 0.4em; }
.doc-sheet .field { display: grid; grid-template-columns: max-content 1fr; gap: 10px; align-items: end; margin-bottom: 0.9em; }
.doc-sheet .field .blank { width: 100%; }
.doc-sheet .office-use { border-top: 2px dashed var(--birch-300); margin-top: 2em; padding-top: 1em; }
.doc-sheet .office-use-title { text-align: center; font-weight: 700; letter-spacing: 0.08em; font-size: var(--fs-sm); }
.doc-sheet .instruction { font-style: italic; color: var(--ink-muted); font-size: var(--fs-sm); }
.editor-note { font-size: var(--fs-xs); color: var(--ink-muted); background: var(--birch-200); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 1.5rem; }

/* ---------- Forms (demo only) ---------- */
.form { display: grid; gap: 16px; }
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.field-label { display: grid; gap: 6px; font-weight: 600; font-size: var(--fs-sm); }
.field-label .hint { font-weight: 400; color: var(--ink-muted); font-size: var(--fs-xs); }
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], select, textarea {
  width: 100%; font: 400 var(--fs-base) var(--font-sans); color: var(--ink);
  background: var(--birch-0); border: 1px solid var(--lake-600); border-radius: var(--radius-sm); padding: 11px 13px;
}
textarea { min-height: 140px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 6px; margin: 0; }
legend { font-weight: 700; font-size: var(--fs-sm); padding: 0 6px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 6px 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); margin-bottom: 8px; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--oak-700); }
.demo-flag {
  display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm);
  background: var(--birch-200); border: 1px dashed var(--lake-600); border-radius: var(--radius); padding: 12px 14px;
}
.form-status { font-weight: 600; color: var(--oak-700); min-height: 1.5em; }

/* ---------- Home: split feature, gallery, departments band ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.split-media { position: relative; }
.split-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.split-media .medallion { position: absolute; right: -14px; bottom: -22px; width: 116px; }
@media (max-width: 520px) { .split-media .medallion { right: 8px; width: 96px; } }

.hamlet-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.hamlet-list li { padding-left: 46px; position: relative; }
.hamlet-list li::before {
  content: ""; position: absolute; left: 0; top: 0.55em; width: 32px; height: 10px; background: var(--oak-500);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='10' viewBox='0 0 32 10'%3E%3Cpath d='M0 3c4 0 4-2 8-2s4 2 8 2 4-2 8-2 4 2 8 2M0 9c4 0 4-2 8-2s4 2 8 2 4-2 8-2 4 2 8 2' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='10' viewBox='0 0 32 10'%3E%3Cpath d='M0 3c4 0 4-2 8-2s4 2 8 2 4-2 8-2 4 2 8 2M0 9c4 0 4-2 8-2s4 2 8 2 4-2 8-2 4 2 8 2' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat center / contain;
}
.hamlet-list strong { font-family: var(--font-display); font-size: var(--fs-lg); display: block; }
.hamlet-list span { color: var(--ink-muted); font-size: var(--fs-sm); }

.gallery { display: grid; gap: 12px; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(220px, 24vw, 340px); }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--lake-800); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; font-size: var(--fs-xs); color: var(--birch-100);
  background: linear-gradient(180deg, transparent, rgba(14, 29, 37, 0.85));
}
.gallery .g1 { grid-column: span 7; }
.gallery .g2 { grid-column: span 5; }
.gallery .g3 { grid-column: span 5; }
.gallery .g4 { grid-column: span 7; }
@media (max-width: 700px) { .gallery .g1, .gallery .g2, .gallery .g3, .gallery .g4 { grid-column: span 12; } .gallery { grid-auto-rows: 240px; } }

.dept-grid { display: grid; gap: 1px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); background: var(--lake-700); border: 1px solid var(--lake-700); border-radius: var(--radius); overflow: hidden; }
.dept-grid a { display: block; background: var(--lake-800); padding: 20px 22px; text-decoration: none; color: var(--on-dark); transition: background var(--dur-fast) var(--ease-out); }
.dept-grid a:hover { background: var(--lake-700); color: var(--on-dark); text-decoration: none; }
.dept-grid strong { display: block; font-family: var(--font-display); font-size: var(--fs-lg); margin-bottom: 4px; }
.dept-grid span { display: block; font-size: var(--fs-sm); color: var(--lake-200); }
.dept-grid .tel { color: var(--on-dark-accent); font-weight: 600; margin-top: 8px; }

.visit { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--lake-900); color: var(--on-dark-muted); font-size: var(--fs-sm); }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--on-dark-accent); text-decoration: underline; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr); gap: clamp(28px, 5vw, 64px); padding-top: clamp(48px, 6vw, 80px); padding-bottom: 40px; }
@media (max-width: 860px) { .footer-top { grid-template-columns: minmax(0, 1fr); } }
.footer-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.footer-brand img { width: 54px; height: 65px; background: var(--birch-0); border-radius: 6px; padding: 3px; }
.footer-brand strong { font-family: var(--font-display); font-size: var(--fs-xl); color: var(--on-dark); display: block; line-height: 1.1; }
.footer-brand span { font-size: var(--fs-xs); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.site-footer .facts dt { color: var(--lake-300); }
.site-footer .facts dd { color: var(--on-dark); }
.footer-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 24px; }
.footer-index h2 { font: 700 var(--fs-xs) var(--font-sans); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--oak-300); margin: 0 0 10px; }
.footer-index ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; }
.footer-bottom { border-top: 1px solid var(--lake-700); padding-top: 18px; padding-bottom: 26px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: var(--fs-xs); }
.footer-bottom ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ---------- Reveal: content is visible by default; JS opts in to the entrance ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .gallery figure:hover img, .link-card:hover { transform: none; }
}

@media print {
  .demo-bar, .utility, .site-header, .site-index, .site-footer .footer-index, .btn-row { display: none !important; }
  body { background: #fff; }
  .page-head { background: none; color: #000; }
  .page-head .lede, .breadcrumbs li { color: #333; }
  .doc-sheet { box-shadow: none; border: 0; padding: 0; }
}

/* Hero on small screens: medallion drops below the copy and shrinks */
@media (max-width: 640px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-top: 72px; }
  .hero .medallion { width: 112px; justify-self: start; }
  .hero-credit { left: var(--gutter); right: auto; }
}
