/* ==========================================================================
   Cub Scout Pack 223 — Lafayette, CA
   --------------------------------------------------------------------------
   Visual language: vintage national-park poster. Canvas paper, pine and clay,
   editorial serif headlines, a photographic hero, patch-shaped badges. Square
   corners and printed rules instead of pills and floating drop shadows.

   Single stylesheet, no build step, no external requests — the display face is
   a system serif stack, so nothing is downloaded from anywhere.
   ========================================================================== */

:root {
  /* --- Palette: canvas, forest, campfire ------------------------------- */
  --pine:        #1d3a2a;   /* deep forest — the primary dark */
  --pine-700:    #244733;
  --pine-900:    #101f17;
  --moss:        #4a6b4f;
  --fern:        #6d9160;
  --clay:        #b4532a;   /* campfire clay — the call-to-action colour */
  --clay-700:    #8f3f20;
  --gold:        #dfa53a;   /* Cub Scout gold, warmed */
  --gold-700:    #a8741d;
  --dusk:        #3f6480;   /* far-hills blue */
  --sand:        #ddceac;

  /* --- Surfaces --------------------------------------------------------- */
  --bg:          #f8f4ea;   /* canvas */
  --bg-alt:      #efe7d5;   /* kraft */
  --bg-sunken:   #e5dac2;
  --surface:     #fffdf7;   /* paper */
  --border:      #d8c8a6;
  --border-soft: #e6dac0;
  --text:        #241f17;
  --text-soft:   #524a3a;
  --text-faint:  #7b7160;

  /* Older names, kept because inline styles in the markup still call them. */
  --brand:       #1d3a2a;
  --brand-600:   #244733;
  --brand-800:   #1d3a2a;
  --brand-900:   #101f17;
  --gold-600:    #a8741d;
  --gold-ink:    #7d5410;
  --red:         #8f3f20;

  /* --- Den colours: earth-shifted -------------------------------------- */
  --lion:    #d3941f;
  --tiger:   #c1671f;
  --wolf:    #a63a28;
  --bear:    #35617f;
  --webelos: #4a7a3f;
  --aol:     #8a6a2f;

  /* --- Type ------------------------------------------------------------- */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
                  Georgia, "Times New Roman", serif;
  --font: "Segoe UI", -apple-system, system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-label: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;

  /* --- Shape: printed, not floating ------------------------------------- */
  --radius:    3px;
  --radius-lg: 4px;
  --shadow:    none;
  --shadow-lg: 0 10px 26px rgba(29, 58, 42, .16);
  --ring:      0 0 0 3px rgba(180, 83, 42, .38);

  --wrap: 1160px;

  /* Woven canvas texture, built from gradients so nothing is downloaded. */
  --weave:
    repeating-linear-gradient(90deg, rgba(120,100,60,.035) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(0deg,  rgba(120,100,60,.035) 0 1px, transparent 1px 4px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #161a15;   /* night forest */
    --bg-alt:      #1e2419;
    --bg-sunken:   #101410;
    --surface:     #1f2620;
    --border:      #3b4436;
    --border-soft: #2e372b;
    --text:        #f1ebdb;
    --text-soft:   #c3bca8;
    --text-faint:  #948d7b;

    --pine:        #0f1c14;
    --pine-700:    #1b3325;
    --pine-900:    #0a130d;
    --brand:       #0f1c14;
    --brand-800:   #0f1c14;
    --brand-900:   #0a130d;
    --clay:        #cc6438;
    --clay-700:    #b4532a;
    --gold:        #e8b854;
    --gold-ink:    #e2ac4a;
    --sand:        #a99b7c;

    --shadow-lg:   0 10px 30px rgba(0, 0, 0, .5);
    --weave:
      repeating-linear-gradient(90deg, rgba(255,245,220,.022) 0 1px, transparent 1px 4px),
      repeating-linear-gradient(0deg,  rgba(255,245,220,.022) 0 1px, transparent 1px 4px);
  }
}

/* --------------------------------------------------------------- base --- */

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.68;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--weave);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.14;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -.005em;
}
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.24rem; }
p  { margin: 0 0 1.1em; }

a { color: #8f3f20; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #b4532a; }
@media (prefers-color-scheme: dark) {
  a { color: #e2ac4a; }
  a:hover { color: #f0c470; }
}

img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.2em; }
li { margin-bottom: .4em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

:focus-visible { outline: none; box-shadow: var(--ring); }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 740px); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--gold); color: #241f17; padding: .7rem 1.2rem; font-weight: 700;
}
.skip-link:focus { left: 0; }

main { flex: 1 0 auto; }

/* A small-caps label with a printed rule in front of it. */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-label);
  font-size: .74rem; font-weight: 700;
  letter-spacing: .19em; text-transform: uppercase;
  color: var(--clay-700); margin-bottom: .8rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 0; border-top: 2px solid currentColor; flex: none;
}
.hero .eyebrow { color: var(--gold); }
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--gold-ink); } }

.lede { font-size: 1.16rem; color: var(--text-soft); }
.muted { color: var(--text-faint); font-size: .92rem; }
.center { text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

/* ------------------------------------------------------------- header --- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--pine);
  box-shadow: inset 0 -4px 0 var(--gold);
}

.nav { display: flex; align-items: center; gap: 1rem; min-height: 76px; }

.brand {
  display: flex; align-items: center; gap: .8rem;
  color: #fdf8ec; text-decoration: none; margin-right: auto; padding: .4rem 0;
}
.brand:hover { color: #fff; }
.brand-mark { width: 44px; height: 44px; flex: none; color: var(--gold); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b {
  font-family: var(--font-display); font-size: 1.22rem; font-weight: 700; letter-spacing: -.01em;
}
.brand-text span {
  font-family: var(--font-label); font-size: .66rem; font-weight: 700;
  color: var(--sand); letter-spacing: .17em; text-transform: uppercase;
}

.nav-toggle {
  display: none; background: transparent; border: 1px solid rgba(253, 248, 236, .4);
  color: #fdf8ec; padding: .5rem .8rem; cursor: pointer; border-radius: 2px;
  font-family: var(--font-label); font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  align-items: center; gap: .5rem;
}
.nav-toggle svg { width: 18px; height: 18px; }

.nav-links { display: flex; align-items: center; gap: .1rem; list-style: none; margin: 0; padding: 0; }
.nav-links li { margin: 0; }
.nav-links a {
  display: block; padding: .5rem .75rem; border-radius: 2px;
  color: #e6ddc8; text-decoration: none; white-space: nowrap;
  font-family: var(--font-label); font-size: .78rem; font-weight: 700;
  letter-spacing: .11em; text-transform: uppercase;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: #fff; border-bottom-color: rgba(223, 165, 58, .55); }
.nav-links a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }
.nav-links .nav-cta {
  background: var(--clay); color: #fff8ee; margin-left: .7rem;
  padding: .6rem 1.1rem; border-bottom-color: transparent;
}
.nav-links .nav-cta:hover { background: var(--clay-700); color: #fff; border-bottom-color: transparent; }

@media (max-width: 1040px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--pine); padding: .6rem 1.25rem 1.2rem;
    box-shadow: 0 6px 0 var(--gold), 0 26px 40px rgba(0, 0, 0, .3);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .85rem .5rem; border-bottom: 1px solid rgba(253, 248, 236, .1); }
  .nav-links .nav-cta { margin: .8rem 0 0; text-align: center; }
  .site-header { position: relative; }
}

/* ------------------------------------------------------------ buttons --- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.7rem; border: 2px solid transparent; border-radius: 2px;
  font-family: var(--font-label); font-size: .82rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.btn-primary { background: var(--clay); color: #fff8ee; border-color: var(--clay); }
.btn-primary:hover { background: var(--clay-700); border-color: var(--clay-700); color: #fff; }
.btn-outline { border-color: rgba(253, 248, 236, .55); color: #fdf8ec; }
.btn-outline:hover { background: rgba(253, 248, 236, .12); border-color: #fdf8ec; color: #fff; }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--clay); color: var(--clay-700); }
.btn-sm { padding: .55rem 1.1rem; font-size: .74rem; }

/* --------------------------------------------------------------- hero --- */

.hero {
  position: relative;
  padding: clamp(3.2rem, 7vw, 6rem) 0 clamp(4.5rem, 9vw, 7rem);
  background-color: var(--pine);
  color: #fdf8ec;
  overflow: hidden;
}

/* Contour lines, drawn with gradients — a topo map beneath the type. */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background:
    repeating-radial-gradient(ellipse 900px 340px at 78% 18%,
      transparent 0 38px, rgba(223, 165, 58, .09) 38px 40px);
}

.hero > * { position: relative; z-index: 2; }

/* A ridge line where the hero meets the page, instead of a ruled edge. */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 46px; z-index: 3;
  background-repeat: repeat-x; background-size: 1200px 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 46' preserveAspectRatio='none'%3E%3Cpath d='M0 46 L96 20 L168 34 L268 6 L372 30 L470 12 L560 32 L676 8 L790 30 L890 14 L988 32 L1090 16 L1200 38 L1200 46 Z' fill='%23f8f4ea'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  .hero::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 46' preserveAspectRatio='none'%3E%3Cpath d='M0 46 L96 20 L168 34 L268 6 L372 30 L470 12 L560 32 L676 8 L790 30 L890 14 L988 32 L1090 16 L1200 38 L1200 46 Z' fill='%23161a15'/%3E%3C/svg%3E");
  }
}

/* Home page: a photograph behind the type, pushed well back so it stays legible. */
.hero-feature {
  background-image: url("../img/photo-campout.jpg");
  background-size: cover;
  background-position: center 32%;
}
.hero-feature::before {
  opacity: 1;
  background:
    linear-gradient(180deg, rgba(16, 31, 23, .84) 0%, rgba(16, 31, 23, .76) 55%, rgba(16, 31, 23, .93) 100%),
    repeating-radial-gradient(ellipse 900px 340px at 78% 18%,
      transparent 0 38px, rgba(223, 165, 58, .07) 38px 40px);
}

.hero-grid {
  display: grid; grid-template-columns: 1.12fr .88fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero h1 { color: #fdf8ec; margin-bottom: .3em; text-wrap: balance; }
.hero h1 .accent { color: var(--gold); font-style: italic; }
.hero p { color: #ddd6c2; font-size: 1.17rem; max-width: 44ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: .6rem 2rem; margin-top: 2.4rem;
  padding-top: 1.4rem; border-top: 1px solid rgba(253, 248, 236, .2);
  font-family: var(--font-label); font-size: .76rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--sand);
}
.hero-meta span { display: inline-flex; align-items: center; gap: .55rem; }
.hero-meta svg { width: 16px; height: 16px; flex: none; color: var(--gold); }

/* Field photographs, pinned up rather than floated. */
.hero-art { position: relative; }
.hero-photo {
  background: #fdf8ec; padding: 9px 9px 34px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
  transform: rotate(-1.6deg);
}
.hero-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.hero-photo.small {
  position: absolute; right: -14px; bottom: -40px; width: 46%;
  transform: rotate(3.2deg); padding: 7px 7px 24px;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}

/* ------------------------------------------------------------ section --- */

.section { padding: clamp(3.4rem, 6.5vw, 5.5rem) 0; }
.section-alt { background-color: var(--bg-alt); background-image: var(--weave); }
.section-head { max-width: 60ch; margin-bottom: 2.6rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { text-wrap: balance; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

/* --------------------------------------------------------------- card --- */

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.5rem;
}
/* A hand-set accent rule along the top, cycling through the palette so a row
   of cards doesn't read as machine-stamped. */
.card::before {
  content: ""; position: absolute; inset: -1px -1px auto -1px; height: 4px;
  background: var(--card-rule, var(--moss));
}
.grid > .card:nth-child(4n+1) { --card-rule: var(--clay); }
.grid > .card:nth-child(4n+2) { --card-rule: var(--moss); }
.grid > .card:nth-child(4n+3) { --card-rule: var(--gold-700); }
.grid > .card:nth-child(4n+4) { --card-rule: var(--dusk); }

.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }

/* A stitched patch rather than a filled app-icon tile. */
.card-icon {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--card-rule, var(--moss)); color: var(--card-rule, var(--moss));
  box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 3px rgba(0, 0, 0, .07);
  margin-bottom: 1.1rem;
}
.card-icon svg { width: 24px; height: 24px; }

.link-card { display: block; text-decoration: none; color: inherit; transition: border-color .14s ease, transform .14s ease; }
.link-card:hover { border-color: var(--clay); transform: translateY(-2px); color: inherit; }
.link-card h3 { color: var(--text); }
.link-card:hover h3 { color: var(--clay-700); }
@media (prefers-color-scheme: dark) { .link-card:hover h3 { color: var(--gold-ink); } }
.link-card .arrow { color: var(--clay); font-family: var(--font); }

/* ----------------------------------------------------------- den card --- */

.den-card { padding-top: 1.8rem; }
.den-card::before { background: var(--den, var(--moss)); }

/* The rank diamond, edged like an embroidered patch. */
.den-badge {
  width: 54px; height: 54px; margin: .3rem 0 1.7rem;
  display: grid; place-items: center;
  background: var(--den, var(--moss)); color: #fff8ee;
  transform: rotate(45deg); border-radius: 3px;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--den, var(--moss));
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
}
.den-badge span { transform: rotate(-45deg); }

.den-grade {
  display: block; font-family: var(--font-label);
  font-size: .7rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--den, var(--moss)); margin-bottom: .35rem;
}

/* --------------------------------------------------------- month grid --- */

.calendar-layout {
  display: grid; grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 2.4rem; align-items: start;
}
@media (max-width: 900px) { .calendar-layout { grid-template-columns: 1fr; } }
.calendar-layout.no-panel { grid-template-columns: 1fr; }

.month-panel { position: sticky; top: 96px; }
/* Below the nav breakpoint the header stops being sticky, so this must too --
   otherwise the panel pins itself under a header that has scrolled away. */
@media (max-width: 1040px) { .month-panel { position: static; } }
.month-panel[hidden] { display: none; }

.month-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem;
  box-shadow: inset 0 0 0 1px var(--surface), inset 0 0 0 2px var(--border-soft);
}

.cal-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.cal-head strong { font-family: var(--font-display); font-size: 1.14rem; font-weight: 700; }

.cal-nav {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 2px; cursor: pointer;
  background: var(--surface); color: var(--text-soft);
}
.cal-nav:hover:not(:disabled) { border-color: var(--clay); color: var(--clay); }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-nav svg { width: 16px; height: 16px; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }

.cal-dow {
  text-align: center; font-family: var(--font-label); font-size: .64rem;
  font-weight: 700; letter-spacing: .1em; color: var(--text-faint); padding-bottom: .4rem;
}

.cal-day {
  position: relative; aspect-ratio: 1; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  font-size: .85rem; color: var(--text-faint);
  border: 1px solid transparent; border-radius: 2px;
  background: transparent; font-family: inherit; padding: 0;
}
.cal-day.is-blank { visibility: hidden; }
.cal-day.has-events {
  cursor: pointer; color: var(--text); font-weight: 700;
  background: var(--bg-alt); border-color: var(--border-soft);
}
.cal-day.has-events:hover { border-color: var(--clay); background: var(--bg-sunken); }
.cal-day.is-today { box-shadow: inset 0 0 0 2px var(--clay); color: var(--clay-700); }
@media (prefers-color-scheme: dark) { .cal-day.is-today { color: var(--clay); } }

.cal-dots { display: flex; gap: 2px; margin-top: 2px; height: 5px; }
.cal-dots i { width: 5px; height: 5px; border-radius: 50%; display: block; }

.cal-hint { margin: 1rem 0 .8rem; font-size: .8rem; }

.cal-key { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.cal-key li { display: flex; align-items: center; gap: .55rem; margin: 0; font-size: .78rem; color: var(--text-soft); }
.cal-key i { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* ----------------------------------------------------------- timeline --- */

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-soft);
  padding: .5rem 1rem; border-radius: 2px; cursor: pointer;
  font-family: var(--font-label); font-size: .74rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
}
.filter-btn:hover { border-color: var(--clay); color: var(--clay-700); }
.filter-btn[aria-pressed="true"] { background: var(--pine); border-color: var(--pine); color: #fdf8ec; }
@media (prefers-color-scheme: dark) {
  .filter-btn[aria-pressed="true"] { background: var(--fern); border-color: var(--fern); color: #10190f; }
}

.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.event {
  display: grid; grid-template-columns: 96px 1fr; gap: 1.4rem; align-items: start;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 5px solid var(--moss);
  border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 0;
}
.event.is-past { opacity: .48; }
.event[data-type="meeting"]  { border-left-color: var(--dusk); }
.event[data-type="outdoor"]  { border-left-color: var(--webelos); }
.event[data-type="signature"]{ border-left-color: var(--clay); }
.event[data-type="service"]  { border-left-color: var(--wolf); }
.event[data-type="optional"] { border-left-color: var(--text-faint); }

/* The date reads like a stamp on a trail permit. */
.event-date {
  text-align: center; background: var(--bg-alt); border: 1px solid var(--border-soft);
  border-radius: 2px; padding: .5rem .3rem; line-height: 1.15;
}
.event-date .mon {
  display: block; font-family: var(--font-label); font-size: .66rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--clay-700);
}
.event-date .day {
  display: block; font-family: var(--font-display); font-size: 1.75rem;
  font-weight: 700; color: var(--text);
}
.event-date .dow {
  display: block; font-family: var(--font-label); font-size: .64rem;
  font-weight: 700; letter-spacing: .06em; color: var(--text-faint); white-space: nowrap;
}
@media (prefers-color-scheme: dark) { .event-date .mon { color: var(--gold-ink); } }

.event-body h3 { font-size: 1.16rem; margin-bottom: .35rem; }
.event-body p { margin: .45rem 0 0; font-size: .95rem; color: var(--text-soft); }
.event-meta {
  display: flex; flex-wrap: wrap; gap: .3rem 1.2rem;
  font-family: var(--font-label); font-size: .78rem; letter-spacing: .04em; color: var(--text-faint);
}
.event-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.event-meta svg { width: 14px; height: 14px; flex: none; }

.tag {
  display: inline-block; font-family: var(--font-label);
  font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: .18rem .5rem; border: 1px solid var(--border);
  color: var(--text-faint); margin-left: .5rem; vertical-align: middle;
}
.tag-tentative { border-color: var(--gold-700); color: var(--gold-ink); background: rgba(223, 165, 58, .12); }

.event.is-flash { animation: flash 1.6s ease-out; }
@keyframes flash {
  0%, 22% { box-shadow: 0 0 0 3px var(--gold); }
  100%    { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .event.is-flash { animation: none; box-shadow: 0 0 0 3px var(--gold); }
}

@media (max-width: 520px) {
  .event { grid-template-columns: 76px 1fr; gap: .9rem; padding: 1rem; }
  .event-date .day { font-size: 1.4rem; }
  .month-card { padding: .9rem; }
}

/* -------------------------------------------------------------- steps --- */

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; counter-reset: step; }
.steps > li { display: grid; grid-template-columns: 48px 1fr; gap: 1.3rem; align-items: start; margin: 0; }
.steps > li::before {
  counter-increment: step; content: counter(step);
  width: 48px; height: 48px; display: grid; place-items: center;
  border: 2px solid var(--clay); color: var(--clay-700); background: var(--surface);
  border-radius: 50%; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
}
@media (prefers-color-scheme: dark) { .steps > li::before { color: var(--clay); } }
.steps h3 { margin-bottom: .3rem; }
.steps p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- misc --- */

.callout {
  border: 1px solid var(--border); border-left: 5px solid var(--gold-700);
  background: var(--surface); border-radius: var(--radius);
  padding: 1.4rem 1.6rem; margin: 2rem 0;
}
.callout h3 { margin-bottom: .4rem; }
.callout p:last-child { margin-bottom: 0; }

.banner-warn {
  border: 1px solid var(--gold-700); border-left: 5px solid var(--gold-700);
  background: rgba(223, 165, 58, .14);
  border-radius: var(--radius); padding: 1.3rem 1.6rem; margin-bottom: 2rem;
}
.banner-warn h3 { color: var(--gold-ink); margin-bottom: .4rem; }
.banner-warn p:last-child { margin-bottom: 0; }
.banner-warn code {
  background: var(--bg-sunken); padding: .1rem .4rem; border-radius: 2px; font-size: .9em;
}

/* An enamel-sign panel for the closing call to action. */
.cta-band {
  position: relative; background: var(--pine); color: #fdf8ec;
  border-radius: var(--radius); padding: clamp(2.4rem, 5vw, 3.8rem);
  text-align: center;
  box-shadow: inset 0 0 0 7px var(--pine), inset 0 0 0 8px rgba(223, 165, 58, .55);
}
.cta-band h2 { color: #fdf8ec; }
.cta-band p { color: #ddd6c2; max-width: 55ch; margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.6rem 0; }
table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: .96rem; }
th, td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
th {
  font-family: var(--font-label); font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em; color: var(--text-faint);
  border-bottom: 2px solid var(--border);
}
tbody tr:hover { background: var(--bg-alt); }

details.faq {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); margin-bottom: .7rem;
}
details.faq > summary {
  cursor: pointer; padding: 1.05rem 1.4rem; list-style: none;
  font-family: var(--font-display); font-size: 1.08rem; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary::after { content: "+"; font-family: var(--font); font-size: 1.4rem; color: var(--clay); flex: none; }
details.faq[open] > summary::after { content: "\2013"; }
details.faq > div { padding: 0 1.4rem 1.3rem; color: var(--text-soft); }
details.faq > div > :last-child { margin-bottom: 0; }

/* Roster entries as name-tag cards. */
.roster { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); }
.person {
  background: var(--surface); border: 1px solid var(--border);
  border-top: 3px solid var(--moss); border-radius: var(--radius); padding: 1.1rem 1.25rem;
}
.person .role {
  font-family: var(--font-label); font-size: .68rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase; color: var(--clay-700);
}
@media (prefers-color-scheme: dark) { .person .role { color: var(--gold-ink); } }
.person .name { font-family: var(--font-display); font-weight: 700; font-size: 1.16rem; margin-top: .1rem; }
.person .name.open { color: var(--text-faint); font-style: italic; }
.person .note { font-size: .88rem; color: var(--text-faint); margin-top: .25rem; }

.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.4rem 0; }
.pill {
  background: var(--surface); border: 1px solid var(--border); border-radius: 2px;
  padding: .38rem 1rem; color: var(--text-soft);
  font-family: var(--font-label); font-size: .74rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
}
a.pill:hover { border-color: var(--clay); color: var(--clay-700); }

.figure { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 8px; }
.figure img { width: 100%; }

/* ------------------------------------------------------------- footer --- */

.site-footer {
  background: var(--pine-900); color: #c2bba7; margin-top: auto;
  padding: 3.8rem 0 2rem; font-size: .94rem;
  border-top: 5px solid var(--gold);
}
.footer-grid { display: grid; gap: 2.4rem; grid-template-columns: 1.5fr 1fr 1fr; }
.site-footer h4 {
  font-family: var(--font-label); color: #fdf8ec; font-size: .72rem;
  letter-spacing: .18em; text-transform: uppercase; margin-bottom: 1rem;
}
.site-footer a { color: #c2bba7; text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.footer-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.1rem; color: #fdf8ec; }
.footer-brand .brand-mark { color: var(--gold); }
.footer-brand b { font-family: var(--font-display); font-size: 1.25rem; }
.footer-bottom {
  border-top: 1px solid rgba(253, 248, 236, .14); margin-top: 2.6rem; padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between;
  font-size: .84rem; color: #8f8875;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------- print --- */

@media print {
  .site-header, .site-footer, .hero-actions, .filters, .nav-toggle,
  .month-panel { display: none !important; }
  .calendar-layout { display: block; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .event, .card { border: 1px solid #ccc; break-inside: avoid; }
  .hero { background: #fff; color: #000; padding: 1rem 0; }
  .hero::before, .hero::after { display: none; }
  .hero h1, .hero p { color: #000; }
}
