/* =========================================================
   The Bridges Community Association — Design System
   ---------------------------------------------------------
   A restrained, editorial style for a private community
   portal. Token-driven; no build step required.
   ========================================================= */

/* -----------------------------
   Tokens
   ----------------------------- */
:root {
  /* color */
  --bg: #F7F3EA;
  --surface: #FFFDF8;
  --surface-2: #F1EBDD;
  --text: #252421;
  --text-muted: #6F6A60;
  --olive: #4F5A3D;
  --olive-dark: #303827;
  --bronze: #8A6A43;
  --sand: #D8CBB8;
  --border: #DDD3C2;
  --border-strong: #C7BBA4;
  --terracotta: #B5704D;
  --focus: #4F5A3D;

  /* type */
  --font-display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6.5rem;
  --space-8: 9rem;

  /* layout */
  --max: 1200px;
  --max-narrow: 820px;
  --radius: 4px;
  --radius-lg: 8px;

  /* motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* -----------------------------
   Reset & base
   ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  /* Sticky header is ~76px; offset hash-link landings so anchored headings aren't hidden behind it. */
  scroll-padding-top: 96px;
}

/* Belt-and-suspenders: applies when scroll-padding-top isn't honored (e.g. some Safari versions). */
[id] { scroll-margin-top: 96px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}
a:hover { color: var(--olive); border-color: var(--olive); }

button { font: inherit; cursor: pointer; }

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

::selection { background: var(--sand); color: var(--text); }

/* skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--olive-dark);
  color: var(--surface);
  padding: 0.75rem 1rem;
  z-index: 1000;
  border-bottom: none;
}
.skip-link:focus { left: 0; color: var(--surface); }

/* -----------------------------
   Typography
   ----------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text);
  margin: 0 0 var(--space-3);
  letter-spacing: -0.005em;
}

h1 {
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.12;
}
h3 {
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  line-height: 1.2;
}
h4 {
  font-size: 1.15rem;
  line-height: 1.3;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0;
}

p { margin: 0 0 var(--space-3); }
p.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 60ch;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
  display: inline-block;
  margin-bottom: var(--space-2);
}

.muted { color: var(--text-muted); }

ul, ol { padding-left: 1.2rem; margin: 0 0 var(--space-3); }
li { margin-bottom: 0.35rem; }

hr.rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: clamp(1rem, 2vw, 1.75rem) 0;
}
.rule-bronze {
  width: 48px;
  height: 1px;
  background: var(--bronze);
  border: 0;
  margin: 0 0 var(--space-3);
}
.rule-bronze.center { margin-inline: auto; }

/* -----------------------------
   Layout helpers
   ----------------------------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.container--narrow { max-width: var(--max-narrow); }

.section {
  padding-block: clamp(2rem, 4.5vw, 4.25rem);
}
.section--tight { padding-block: clamp(1.25rem, 2.5vw, 2rem); }
.section--alt { background: var(--surface); }

.grid {
  display: grid;
  gap: var(--space-3);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.stack > * + * { margin-top: var(--space-3); }
.stack-lg > * + * { margin-top: var(--space-5); }

.center { text-align: center; }

/* -----------------------------
   Buttons
   ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: background 180ms var(--ease), color 180ms var(--ease),
              border-color 180ms var(--ease), transform 180ms var(--ease);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}
.btn--primary {
  background: var(--olive-dark);
  color: var(--surface);
  border-color: var(--olive-dark);
}
.btn--primary:hover {
  background: var(--olive);
  border-color: var(--olive);
  color: var(--surface);
}
.btn--secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--secondary:hover {
  border-color: var(--olive);
  color: var(--olive);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: transparent;
  padding-inline: 0;
}
.btn--ghost:hover { color: var(--olive); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  color: var(--olive-dark);
  border-bottom: 1px solid transparent;
}
.link-arrow::after { content: "→"; transition: transform 200ms var(--ease); }
.link-arrow:hover { color: var(--olive); border-bottom-color: var(--olive); }
.link-arrow:hover::after { transform: translateX(3px); }

/* -----------------------------
   Header / Nav
   ----------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 243, 234, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 76px;
  padding-block: 0.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  border-bottom: none;
  color: var(--text);
  flex-shrink: 0;
}
.brand:hover { color: var(--olive); border-bottom: none; opacity: 0.85; }
.brand__logo {
  display: block;
  height: clamp(34px, 4.6vw, 44px);
  width: auto;
  max-width: min(58vw, 280px);
  object-fit: contain;
}
.nav-primary {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
}
.nav-primary a {
  font-size: 0.92rem;
  border-bottom: none;
  color: var(--text);
  padding: 0.25rem 0;
  position: relative;
}
.nav-primary a[aria-current="page"]::after,
.nav-primary a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--bronze);
}
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  color: var(--text);
}

@media (max-width: 960px) {
  /* WebKit/Chromium treat backdrop-filter as creating a containing block for
     position:fixed descendants — which traps the mobile menu inside the 76-px
     header. Strip it on mobile (the blur is a desktop-only nicety anyway). */
  .site-header {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav-primary {
    position: fixed;
    top: var(--header-h, 76px);
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-h, 76px));
    height: calc(100dvh - var(--header-h, 76px));
    z-index: 49;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    padding: var(--space-2) clamp(1.25rem, 4vw, 2.5rem) var(--space-5);
    gap: 0;
    transform: translateX(100%);
    transition: transform 280ms var(--ease);
    border-top: 1px solid var(--border);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .nav-primary.is-open { transform: translateX(0); }
  .nav-primary a {
    display: block;
    width: 100%;
    font-size: 1.1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
  }
  .nav-primary a:last-child { border-bottom: none; }
  /* Suppress the desktop bronze-underline pseudo on mobile — use color + weight instead */
  .nav-primary a[aria-current="page"]::after,
  .nav-primary a:hover::after { display: none; }
  .nav-primary a[aria-current="page"] {
    color: var(--olive-dark);
    font-weight: 500;
  }
  .nav-toggle { display: inline-flex; align-items: center; gap: 0.5rem; }
  body.nav-open { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-primary { transition: none !important; }
}

/* -----------------------------
   Hero
   ----------------------------- */
.hero {
  position: relative;
  padding-block: clamp(2.25rem, 5.5vw, 4.5rem);
  overflow: hidden;
}
.hero--cover {
  min-height: clamp(360px, 48vh, 520px);
  display: flex;
  align-items: flex-end;
  color: var(--surface);
}
.hero--cover::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(28,30,22,0.08) 0%, rgba(28,30,22,0.38) 70%, rgba(28,30,22,0.58) 100%);
  z-index: 1;
}
.hero__image {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero__content { position: relative; z-index: 2; max-width: 760px; }
.hero--cover .hero__content h1,
.hero--cover .hero__content p { color: var(--surface); }
.hero--cover .eyebrow { color: var(--sand); }
.hero--cover .rule-bronze { background: var(--sand); }

.hero--quiet { background: var(--surface); border-bottom: 1px solid var(--border); }
.hero--quiet h1 { max-width: 18ch; }
.hero--quiet .lead { color: var(--text-muted); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* -----------------------------
   Cards
   ----------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  transition: border-color 200ms var(--ease), transform 200ms var(--ease),
              box-shadow 200ms var(--ease);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 6px 24px -18px rgba(48, 56, 39, 0.35);
}

.card--link {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-decoration: none;
  border-bottom: none;
  color: var(--text);
  height: 100%;
}
.card--link:hover {
  color: var(--text);
  border-bottom: none;
  transform: translateY(-2px);
}
.card__eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze);
}
.card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.2;
  margin: 0;
}
.card__body {
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.55;
  margin: 0;
}
.card__meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.5rem;
}
.card__cta { margin-top: auto; padding-top: 0.5rem; }

/* Quick-link tile */
.quick-link {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: border-color 200ms var(--ease), transform 200ms var(--ease),
              background 200ms var(--ease);
  min-height: 168px;
}
.quick-link:hover {
  color: var(--text);
  border-color: var(--olive);
  transform: translateY(-2px);
}
.quick-link__num {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--bronze);
  letter-spacing: 0.05em;
}
.quick-link__title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.15;
}
.quick-link__sub {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* -----------------------------
   Document & Notice patterns
   ----------------------------- */
.doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}
.doc-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.doc-item:hover { border-color: var(--border-strong); background: #FCF8EF; }
.doc-item__primary { display: grid; gap: 0.3rem; min-width: 0; }
.doc-item__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.25;
  margin: 0;
}
.doc-item__title a { border-bottom: 1px solid transparent; }
.doc-item__title a:hover { border-bottom-color: var(--olive); }
.doc-item__desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}
.doc-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--olive);
  background: #ECEAD9;
  border: 1px solid var(--border);
  padding: 0.18rem 0.55rem;
  border-radius: 99px;
}
.tag--muted { color: var(--text-muted); background: transparent; }
.tag--private { color: var(--bronze); border-color: var(--bronze); }
.doc-item__action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--olive-dark);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.55rem 0.85rem;
  white-space: nowrap;
  align-self: start;
}
.doc-item__action:hover { color: var(--olive); border-color: var(--olive); }

@media (max-width: 600px) {
  .doc-item { grid-template-columns: 1fr; }
}

/* Document filters */
.filters {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.65rem;
  margin-bottom: var(--space-4);
  align-items: center;
}
.filters input[type="search"],
.filters select {
  font: inherit;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  color: var(--text);
}
.filters input[type="search"] { width: 100%; }
.filters input[type="search"]:focus,
.filters select:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--olive);
}
.filters__count {
  font-size: 0.85rem;
  color: var(--text-muted);
}
@media (max-width: 700px) {
  .filters { grid-template-columns: 1fr; }
}

/* Notice card */
.notice-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--olive);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  display: grid;
  gap: 0.45rem;
}
.notice-card__date {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.notice-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.2;
  margin: 0;
}
.notice-card__summary { color: var(--text-muted); margin: 0; }
.notice-card__body {
  margin-top: 0.5rem;
  font-size: 0.96rem;
}
.notice-card__body p:last-child { margin-bottom: 0; }
.notice-card--alert { border-left-color: var(--terracotta); }

/* Standing notice bar */
.notice-bar {
  background: #ECEAD9;
  border: 1px solid var(--border);
  border-left: 3px solid var(--bronze);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.95rem;
}
.notice-bar strong { font-weight: 600; }

/* Contact card */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  display: grid;
  gap: 0.4rem;
  transition: border-color 240ms var(--ease), box-shadow 240ms var(--ease), background 240ms var(--ease);
}

/* Anchor-link focus — when the user lands on a card via a #hash link */
.contact-card:target {
  border-color: var(--bronze);
  background: linear-gradient(180deg, #FCF7EB 0%, var(--surface) 60%);
  box-shadow:
    0 0 0 1px var(--bronze),
    0 14px 36px -18px rgba(138, 106, 67, 0.32);
  animation: target-pulse 1.6s var(--ease) 1;
}
.contact-card:target .contact-card__role { color: var(--bronze); }

@keyframes target-pulse {
  0% {
    box-shadow:
      0 0 0 0 rgba(138, 106, 67, 0),
      0 0 0 1px var(--bronze),
      0 14px 36px -18px rgba(138, 106, 67, 0.32);
  }
  35% {
    box-shadow:
      0 0 0 8px rgba(138, 106, 67, 0.18),
      0 0 0 1px var(--bronze),
      0 18px 44px -16px rgba(138, 106, 67, 0.5);
  }
  100% {
    box-shadow:
      0 0 0 0 rgba(138, 106, 67, 0),
      0 0 0 1px var(--bronze),
      0 14px 36px -18px rgba(138, 106, 67, 0.32);
  }
}
.contact-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}
.contact-card__role {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.contact-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(72px, max-content) minmax(0, 1fr);
  gap: 0.4rem 0.9rem;
  font-size: 0.95rem;
}
.contact-card dt {
  color: var(--text-muted);
  font-weight: 500;
  min-width: 0;
}
.contact-card dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.contact-card a { border-bottom-color: var(--border); }
.contact-card a:hover { border-bottom-color: var(--olive); }
@media (max-width: 420px) {
  .contact-card dl { grid-template-columns: 1fr; gap: 0.15rem 0; }
  .contact-card dl dt { margin-top: 0.5rem; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
  .contact-card dl dt:first-of-type { margin-top: 0; }
}

/* Board variant — a portrait above name, role, and a single email */
.contact-card--board {
  text-align: center;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.contact-card--board h3 { margin-bottom: 0.25rem; }
.contact-card__body {
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-card__email {
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.contact-card__email a {
  display: inline-block;
  padding: 0.1rem 0;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.contact-card__email a:hover {
  color: var(--olive);
  border-bottom-color: var(--olive);
}

/* Board portrait — a 3:4 frame at the top of each board card */
.board-portrait {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  margin: 0;
}
.board-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  transition: transform 600ms var(--ease);
}
.contact-card--board:hover .board-portrait img { transform: scale(1.02); }

/* Monogram placeholder — refined fallback when a photo is unavailable */
.board-portrait--monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 80% at 50% 0%, #F4ECDB 0%, var(--surface-2) 55%, #E6DCC4 100%);
}
.board-portrait--monogram::after {
  content: attr(data-initials);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 7vw, 4.5rem);
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--bronze);
  opacity: 0.78;
  user-select: none;
}

/* -----------------------------
   Breadcrumbs
   ----------------------------- */
.breadcrumbs {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.breadcrumbs a { border-bottom: none; color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--olive); }
.breadcrumbs span[aria-current] { color: var(--text); }
.breadcrumbs .sep { margin-inline: 0.45rem; color: var(--border-strong); }

/* -----------------------------
   Footer
   ----------------------------- */
.site-footer {
  background: var(--olive-dark);
  color: #E9E2D1;
  padding-block: clamp(2.5rem, 5vw, 3.75rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.site-footer a {
  color: #E9E2D1;
  border-bottom: 1px solid rgba(233, 226, 209, 0.25);
}
.site-footer a:hover { color: #fff; border-bottom-color: #fff; }
.site-footer h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--sand);
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-5);
}
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.92rem;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--sand);
  line-height: 1.15;
  margin-bottom: 0.8rem;
}
.footer-meta {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(233, 226, 209, 0.18);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: rgba(233, 226, 209, 0.7);
}

/* -----------------------------
   Misc
   ----------------------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.panel--quiet { background: var(--surface-2); border-color: var(--border); }

.image-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

.aspect-4-3 { aspect-ratio: 4 / 3; }
.aspect-16-9 { aspect-ratio: 16 / 9; }
.aspect-3-4 { aspect-ratio: 3 / 4; }

.disclaimer {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  border-top: 1px solid var(--border);
  padding-top: var(--space-3);
  margin-top: var(--space-5);
}

.todo {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta);
  background: rgba(181, 112, 77, 0.08);
  border: 1px dashed var(--terracotta);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}

/* Guard officer card */
.officer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.officer-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 6px 18px -14px rgba(48, 56, 39, 0.3);
}
.officer-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, #F4ECDB 0%, var(--surface-2) 55%, #E6DCC4 100%);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--bronze);
  user-select: none;
}
.officer-card__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.2;
  margin: 0;
  color: var(--text);
}
.officer-card__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0;
}

/* Data table — restrained, editorial */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: 0.95rem;
}
.data-table caption {
  caption-side: top;
  text-align: left;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 0.6rem;
}
.data-table th,
.data-table td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.data-table thead th {
  background: var(--surface-2);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody th {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text);
}
.data-table tbody td ul {
  margin: 0;
  padding-left: 1rem;
}
.data-table tbody td ul li { margin-bottom: 0.2rem; }

/* Procedure list — numbered, editorial */
.procedure-list {
  list-style: none;
  counter-reset: proc;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}
.procedure-list > li {
  counter-increment: proc;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem 1.1rem 3.25rem;
  position: relative;
  color: var(--text);
}
.procedure-list > li::before {
  content: counter(proc, decimal-leading-zero);
  position: absolute;
  left: 1rem;
  top: 1.05rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--bronze);
  line-height: 1;
  letter-spacing: 0.04em;
}
.procedure-list > li p { margin: 0 0 0.5rem; }
.procedure-list > li p:last-child { margin-bottom: 0; }
.procedure-list ul,
.procedure-list ol {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.procedure-list ul li,
.procedure-list ol li { margin-bottom: 0.25rem; }

/* Service code chips */
.code-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.code-chips li {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.88rem;
  color: var(--text);
}
.code-chips li strong {
  font-family: var(--font-display);
  color: var(--bronze);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

/* Meeting minutes — editorial document layout */
.minutes h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: var(--space-4) 0 var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}
.minutes h2:first-of-type { border-top: none; padding-top: 0; margin-top: var(--space-3); }
.minutes h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: var(--space-3) 0 var(--space-2);
  color: var(--text);
}
.minutes h3 .motion-marker {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
  font-weight: 600;
  display: block;
  margin-bottom: 0.2rem;
}
.minutes ul, .minutes ol { padding-left: 1.25rem; }
.minutes .motion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--bronze);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 0.5rem 0;
  font-size: 0.96rem;
}
.minutes .motion::before {
  content: "Motion";
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze);
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.minutes .attest {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Minute page navigation footer */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}
.pager a {
  display: block;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-bottom: 1px solid var(--border);
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}
.pager a:hover { border-color: var(--olive); color: var(--olive); }
.pager .pager__label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.pager .pager__title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.25;
}
.pager .pager--next { text-align: right; }
.pager .pager--prev:only-child { grid-column: 1 / 2; }
.pager .pager--next:only-child { grid-column: 2 / 3; }
@media (max-width: 600px) {
  .pager { grid-template-columns: 1fr; }
  .pager .pager--next { text-align: left; }
}

/* Process steps */
.steps {
  display: grid;
  gap: var(--space-3);
  counter-reset: step;
  list-style: none;
  padding: 0;
}
.steps > li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-2);
  align-items: start;
}
.steps > li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--bronze);
  line-height: 1;
}
.steps h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
}
.steps p { margin: 0; color: var(--text-muted); }

/* Two-column editorial */
.editorial {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, var(--space-6));
  align-items: center;
}
@media (max-width: 800px) {
  .editorial { grid-template-columns: 1fr; }
}

/* Definition list */
.deflist {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.deflist > div {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
}
.deflist > div:first-child { border-top: none; }
.deflist dt { color: var(--text-muted); font-weight: 500; margin: 0; }
.deflist dd { margin: 0; }
@media (max-width: 600px) {
  .deflist > div { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* Empty state */
.empty {
  text-align: center;
  padding: var(--space-5);
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

/* Utilities */
.flow > * + * { margin-top: var(--space-3); }
.hide { display: none !important; }
.no-wrap { white-space: nowrap; }
.text-muted { color: var(--text-muted); }
