/* ==========================================================================
   Ethnic Festivals — one stylesheet, no build step. The contract is DESIGN.md.

   Direction: a wall of festival posters on a white noticeboard. Parish-hall
   and heritage-festival flyers make the date the biggest thing on the
   sheet; here the date tile does the same job, set in a heavy grotesque
   over the tradition's picture (or, until there is one, a plate in a
   natural-dye colour with a cross-stitch lattice). Pomegranate is the one
   colour you press. Deep teal carries the dark surfaces. Saffron is only
   ever a small mark. Everything else stays quiet.

   Every brick below is shown on /styleguide/ (DEBUG only).
   Contents:
      1. Fonts                 9. Tradition plate & date tile
      2. Tokens               10. Festival card & lists
      3. Base                 11. Tags & status badges
      4. Layout               12. Fact tiles, map panel, cards, band
      5. Header & menu        13. Notices, breadcrumbs, pagination
      6. Footer               14. Empty & status pages, utilities
      7. Type & page parts    15. Catalog pages (existing page classes)
      8. Buttons, pills,      16. Styleguide only
         chips, forms
   ========================================================================== */

/* 1. Fonts ------------------------------------------------------------------
   Self-hosted, Latin only (Google Fonts files under the SIL Open Font
   License 1.1: copyrights and licence text in static/fonts/OFL.txt). One
   variable file per family covers both weights
   the system uses. Each family has a metric-matched fallback built on Arial,
   so swapping to the web font does not move the layout. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin.c47ac31e5437.woff2") format("woff2");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin.392aed3eb142.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Fallbacks: Arial scaled to the web font's measured width (Bricolage 800
   at 24–64px against Arial Bold ≈ 0.97–1.02, Figtree 400 against Arial 1.00,
   Figtree 600 against Arial Bold 0.95), with the web font's vertical metrics
   (Bricolage 930/270, Figtree 950/250 per 1000) divided by the same scale. */
@font-face {
  font-family: "Bricolage Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 600 800;
  size-adjust: 99%;
  ascent-override: 93.94%;
  descent-override: 27.27%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Figtree Fallback";
  src: local("Arial"), local("ArialMT");
  font-weight: 400;
  size-adjust: 100%;
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Figtree Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 600;
  size-adjust: 95%;
  ascent-override: 100%;
  descent-override: 26.32%;
  line-gap-override: 0%;
}

/* 2. Tokens -------------------------------------------------------------------
   Every colour, size and space the site uses. Nothing below this block
   writes a raw colour. Contrast is against white unless stated. */
:root {
  /* Ground and text */
  --color-bg: #ffffff;              /* page */
  --color-surface: #ffffff;         /* cards, inputs */
  --color-ink: #211c18;             /* text: 16.9:1 */
  --color-muted: #6b6259;           /* secondary text: 6.0:1 */
  --color-line: #e2ded8;            /* hairlines, card and panel edges */
  --color-line-strong: #8a8077;     /* input and outline-button edges: 3.9:1 */

  /* Action: the only colour that means "press this" (buttons, nav pills,
     active chips, current page, links). */
  --color-action: #9b2335;          /* pomegranate: 7.8:1, white on it 7.8:1 */
  --color-action-hover: #7e1a2a;    /* hover; text on the wash: 8.6:1 */
  --color-action-wash: #f7e8ea;     /* nav pills, secondary hover */
  --color-action-wash-strong: #efd3d8;
  --color-on-action: #ffffff;

  /* Dark surfaces: footer, organizer band, the default plate, photo shade. */
  --color-teal: #1f4e5f;            /* white on it 9.1:1 */
  --color-teal-deep: #173c49;
  --color-teal-wash: #eaf1f3;       /* quiet panels; ink on it 14.8:1 */
  --color-on-dark: #ffffff;
  --color-on-dark-muted: #c9d7dc;   /* 6.2:1 on teal */

  /* Saffron: small marks only — the month on a date tile, ticks. Never text
     on white (2.4:1); on teal and every plate it is 3.2:1 or better, so it
     is always set as large text (19px bold and up). */
  --color-saffron: #d99a1e;
  --color-saffron-wash: #fbf0d9;

  /* Status */
  --color-confirmed: #2f6b3f;       /* 6.4:1 */
  --color-confirmed-wash: #eaf3ec;
  --color-expected: #8a6d1f;        /* 4.9:1 — on white only */
  --color-expected-wash: #fcf6e8;
  --color-cancelled: #8b1e1e;       /* 9.1:1 */
  --color-cancelled-wash: #fbecec;

  --color-focus: #211c18;           /* focus ring on light surfaces */
  --color-focus-on-dark: #ffffff;

  /* Tradition plates: one natural-dye colour per family (catalog.traditions).
     White on each is 7.8:1 or better, saffron 3.2:1 or better. */
  --tradition-greek-orthodox: #1e4473;        /* Aegean indigo */
  --tradition-slavic: #8e2424;                /* madder red */
  --tradition-italian-mediterranean: #4b5622; /* olive */
  --tradition-hispanic-latin: #7a2350;        /* cochineal */
  --tradition-caribbean: #0e5c5a;             /* verdigris */
  --tradition-african: #6b3a12;               /* walnut */
  --tradition-celtic: #1f5a35;                /* pine */
  --tradition-german-nordic: #34495e;         /* woad slate */
  --tradition-east-asian: #8c2f10;            /* cinnabar */
  --tradition-south-asian: #5b2a6e;           /* logwood */
  --tradition-jewish-middle-eastern: #5e4a1f; /* bronze */
  --tradition-native-american: #3f5244;       /* juniper */
  --tradition-parish: #6a1e3a;                /* altar wine */
  --tradition-default: #1f4e5f;               /* the house teal */

  /* The one shared pattern: a cross-stitch lattice (diamond, inner diamond,
     centre stitch). Used as a mask, so its own stroke colour is irrelevant. */
  --pattern-lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='1.25'%3E%3Cpath d='M24 0 48 24 24 48 0 24Z'/%3E%3Cpath d='M24 13 35 24 24 35 13 24Z'/%3E%3Cpath d='M24 21v6M21 24h6'/%3E%3C/svg%3E");
  /* Small marks drawn by CSS: the Lucide check, x and calendar, under the
     licence quoted in templates/core/includes/icon.html. Masks too. */
  --mark-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  --mark-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E");
  --mark-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v3M16 2v3'/%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M3 9h18'/%3E%3C/svg%3E");

  /* Type: Bricolage Grotesque for headings and date numerals (600, 800),
     Figtree for text and interface (400, 600). Base 17px. */
  --font-display: "Bricolage Grotesque", "Bricolage Fallback", "Arial Narrow", Arial, sans-serif;
  --font-body: "Figtree", "Figtree Fallback", Arial, sans-serif;

  --text-xs: 0.8125rem;   /* 13 — never below this */
  --text-sm: 0.875rem;    /* 14 — notes, labels, tags */
  --text-base: 1.0625rem; /* 17 — body */
  --text-md: 1.25rem;     /* 20 — lede, card names */
  --text-lg: 1.5rem;      /* 24 — h3, fact values */
  --text-xl: clamp(1.75rem, 1.35rem + 1.3vw, 2.5rem);  /* 28–40 — h2 */
  --text-2xl: clamp(2.5rem, 1.6rem + 3.2vw, 4rem);     /* 40–64 — h1 */
  --text-date: clamp(3rem, 2rem + 4vw, 6rem);          /* date numerals outside cards */

  /* Space: an 8px grid (4 for the tightest inline gaps). */
  --space-1: 0.25rem;   /* 4 */
  --space-2: 0.5rem;    /* 8 */
  --space-3: 0.75rem;   /* 12 */
  --space-4: 1rem;      /* 16 */
  --space-5: 1.5rem;    /* 24 */
  --space-6: 2rem;      /* 32 */
  --space-7: 3rem;      /* 48 */
  --space-8: 4rem;      /* 64 */
  --space-9: 6rem;      /* 96 */

  --radius: 12px;        /* every container, image, input */
  --radius-pill: 999px;  /* buttons, nav pills, chips, tags, badges */

  --container: 75rem;    /* 1200 */
  --measure: 40rem;      /* reading width, ~68 characters */
  --gutter: 1rem;
  --tap: 2.75rem;        /* 44 — smallest thing you can press */

  /* Old names, still read by static/organizers/organizers.css. */
  --rule: var(--color-line);
  --sand: var(--color-teal-wash);
  --radius-m: var(--radius);
  --step-2: var(--text-md);
  --step-3: var(--text-lg);
}

@media (min-width: 48rem) { :root { --gutter: 1.5rem; } }
@media (min-width: 80rem) { :root { --gutter: 2rem; } }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.55;
  /* Footer sits at the bottom even on short pages. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-ink);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--text-2xl); font-weight: 800; line-height: 1; letter-spacing: -0.025em; }
h2 { font-size: var(--text-xl); font-weight: 800; line-height: 1.08; letter-spacing: -0.015em; }
h3 { font-size: var(--text-lg); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
h4 { font-size: var(--text-md); font-weight: 600; line-height: 1.25; }

p, ul, ol, dl, blockquote, figure { margin: 0 0 1em; }

a {
  color: var(--color-action);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--color-action-hover); text-decoration-thickness: 2px; }

strong, b { font-weight: 600; }
small { font-size: var(--text-sm); }
hr { border: 0; border-top: 1px solid var(--color-line); margin: var(--space-6) 0; }
img { max-width: 100%; height: auto; }
code { font-size: 0.9em; }

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}
main:focus { outline: none; }

/* Icons: Lucide outlines, 1.5px at any size (templates/core/includes/icon.html). */
.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  vertical-align: -0.25em;
}
.icon * { vector-effect: non-scaling-stroke; }
.icon--flip { transform: scaleX(-1); }

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

/* 4. Layout ---------------------------------------------------------------------- */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

/* Items in as many columns as fit: one on a phone, three on a desktop. */
.grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  padding: 0;
  margin: 0 0 var(--space-6);
  list-style: none;
}
.grid > li { display: flex; }
.grid > li > * { flex: 1; min-width: 0; }

/* Main column plus a side column from tablet width up. */
.layout-split { display: grid; gap: var(--space-6); }
@media (min-width: 56rem) {
  .layout-split { grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr); gap: var(--space-7); align-items: start; }
}

.stack > * + * { margin-top: var(--stack-gap, var(--space-4)); }

/* 5. Header & menu --------------------------------------------------------------
   Phone: wordmark, search, menu button; the menu (nav pills + "Add a
   festival") is a native <details> that drops below the header — no
   JavaScript. From 64rem: one row — wordmark, search, nav pills, button;
   the search gets its label from 75rem. */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 30;
  padding: var(--space-3) var(--space-4);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--color-ink);
  color: var(--color-bg);
  font: 600 var(--text-base)/1 var(--font-body);
  text-decoration: none;
}
.skip-link:focus { top: 0; color: var(--color-bg); }

.site-header {
  position: relative;
  z-index: 20;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-block: var(--space-3);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap);
  margin-right: auto;
  color: var(--color-ink);
  font: 800 1.375rem/1 var(--font-display);
  letter-spacing: -0.025em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--color-ink); }
.wordmark__mark { width: 1.75rem; height: 1.75rem; flex: none; }
.wordmark__mark-lines { stroke: var(--color-teal); }
.wordmark__mark-stitch { fill: var(--color-saffron); }

.header-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-pill);
  color: var(--color-ink);
  font: 600 var(--text-base)/1 var(--font-body);
  text-decoration: none;
}
.header-search:hover { border-color: var(--color-ink); color: var(--color-ink); }
.header-search[aria-current="page"] { border-color: var(--color-action); color: var(--color-action); }
.header-search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-nav ul, .site-menu__panel ul {
  display: flex;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav, .site-header .site-header__cta { display: none; }   /* phone: both live in the menu */

/* The phone menu. */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink);
  list-style: none;
  cursor: pointer;
}
.menu-toggle::-webkit-details-marker { display: none; }
.menu-toggle:hover { border-color: var(--color-ink); }
.menu-toggle__open, .menu-toggle__close { display: flex; }
.menu-toggle__close, .site-menu[open] .menu-toggle__open { display: none; }
.site-menu[open] .menu-toggle__close { display: flex; }
.site-menu[open] .menu-toggle { border-color: var(--color-ink); background: var(--color-ink); color: var(--color-bg); }
.site-menu__panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4) var(--gutter) var(--space-5);
  border-bottom: 1px solid var(--color-line);
  background: var(--color-surface);
}
.site-menu__panel ul { flex-direction: column; }
.site-menu__panel .pill { width: 100%; min-height: 3rem; }

@media (min-width: 64rem) {
  .site-header__inner { gap: var(--space-3); padding-block: var(--space-4); }
  .wordmark { margin-right: var(--space-3); font-size: 1.5rem; }
  .header-search { margin-right: auto; }
  .site-nav { display: block; }
  .site-header .site-header__cta { display: inline-flex; white-space: nowrap; }
  .site-menu { display: none; }
}
/* The search's label once the row has room for it beside the four pills
   and the button; until then it stays the round icon, as on a phone. */
@media (min-width: 75rem) {
  .header-search { padding: 0 var(--space-4) 0 var(--space-3); color: var(--color-muted); }
  .header-search__label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}

.messages { padding-top: var(--space-5); }

/* 6. Footer ----------------------------------------------------------------------
   The one big dark surface: deep teal, white text, the wordmark as sign-off. */
.site-footer {
  --color-focus: var(--color-focus-on-dark);
  margin-top: var(--space-9);
  padding-block: var(--space-7) var(--space-6);
  background: var(--color-teal);
  color: var(--color-on-dark);
}
.site-footer__inner { display: grid; gap: var(--space-5); }
.site-footer__brand {
  margin: 0;
  font: 800 clamp(2rem, 1.4rem + 2.4vw, 3.25rem)/1 var(--font-display);
  letter-spacing: -0.03em;
}
.site-footer__brand a { color: var(--color-on-dark); text-decoration: none; }
.site-footer__line { margin: 0; max-width: var(--measure); color: var(--color-on-dark-muted); }
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding: var(--space-4) 0 0;
  border-top: 1px solid color-mix(in srgb, var(--color-on-dark) 25%, transparent);
  list-style: none;
  font-weight: 600;
}
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--color-on-dark);
  text-decoration: none;
}
.site-footer__links a:hover { color: var(--color-on-dark); text-decoration: underline; text-decoration-thickness: 2px; }
.site-footer__operator { margin: 0; color: var(--color-on-dark-muted); font-size: var(--text-sm); }
/* Who built the site: the quietest line, right under the operator's. */
.site-footer__credit { margin: calc(var(--space-4) * -1) 0 0; color: var(--color-on-dark-muted); font-size: var(--text-sm); }
.site-footer__credit a { color: var(--color-on-dark-muted); text-decoration: underline; text-underline-offset: 0.15em; }
.site-footer__credit a:hover { color: var(--color-on-dark); }
.site-footer .placeholder { color: var(--color-ink); }

/* 7. Type & page parts ----------------------------------------------------------- */
.lede {
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-muted);
  max-width: var(--measure);
}
.lede > :last-child { margin-bottom: 0; }
.muted { color: var(--color-muted); }
.small { font-size: var(--text-sm); }

.prose { max-width: var(--measure); }
.prose h2 { margin-top: var(--space-7); font-size: clamp(1.5rem, 1.25rem + 0.8vw, 2rem); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--space-6); }
.prose :where(ul, ol) { padding-left: 1.25rem; }   /* zero-weight list type: .steps below wins */
.prose li + li { margin-top: var(--space-2); }

/* Numbered steps — only for content that really is a sequence. */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: var(--space-5) 0 var(--space-6);
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 3.5rem;
  min-height: 3rem;
}
.steps > li + li { margin-top: var(--space-5); }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.15em;
  width: 2.5rem;
  color: var(--color-teal);
  font: 800 2.5rem/1 var(--font-display);
  letter-spacing: -0.03em;
  text-align: center;
}
.steps h3 { margin: 0 0 var(--space-1); font-size: var(--text-md); }
.steps p { margin: 0; }

.page-head { padding-block: var(--space-6) var(--space-5); }
@media (min-width: 48rem) { .page-head { padding-block: var(--space-8) var(--space-6); } }
.page-head h1 { margin-bottom: 0.3em; max-width: 20ch; }
.page-head .lede { margin-bottom: 0; }
.page-head--tight { padding-bottom: var(--space-4); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-block: var(--space-5);
}

/* Facts as label/value rows (organizer, place, admission…). */
.facts { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-5); margin: 0 0 var(--space-5); }
.facts dt { padding-top: 0.15em; color: var(--color-muted); font: 600 var(--text-sm)/1.5 var(--font-body); }
.facts dd { margin: 0; }
.facts--stacked { grid-template-columns: 1fr; gap: 0; }
.facts--stacked dd + dt { margin-top: var(--space-3); }

/* 8. Buttons, pills, chips, forms ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 3rem;
  padding: 0.625rem 1.5rem;
  border: 1.5px solid var(--color-action);
  border-radius: var(--radius-pill);
  background: var(--color-action);
  color: var(--color-on-action);
  font: 600 var(--text-base)/1.15 var(--font-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--color-action-hover); border-color: var(--color-action-hover); color: var(--color-on-action); text-decoration: none; }
.btn:active { background: var(--color-action-hover); }
.btn .icon { width: 1.125rem; height: 1.125rem; }
.btn--secondary { background: var(--color-surface); color: var(--color-action); }
.btn--secondary:hover { background: var(--color-action-wash); border-color: var(--color-action-hover); color: var(--color-action-hover); }
.btn--quiet {
  min-height: var(--tap);
  padding-inline: var(--space-2);
  border-color: transparent;
  background: transparent;
  color: var(--color-action);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.btn--quiet:hover { background: transparent; border-color: transparent; color: var(--color-action-hover); text-decoration-thickness: 2px; }
/* On teal: a white button keeps pomegranate as the action colour. */
.btn--light { background: var(--color-surface); border-color: var(--color-surface); color: var(--color-action); }
.btn--light:hover { background: var(--color-action-wash); border-color: var(--color-action-wash); color: var(--color-action-hover); }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--color-action); border-color: var(--color-action); }

/* Nav pills: filled with the action colour's wash; the current page solid. */
.pill {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 1.125rem;
  border-radius: var(--radius-pill);
  background: var(--color-action-wash);
  color: var(--color-action-hover);
  font: 600 var(--text-base)/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}
.pill:hover { background: var(--color-action-wash-strong); color: var(--color-action-hover); }
.pill[aria-current="page"] { background: var(--color-action); color: var(--color-on-action); }

/* Chips. .chip is a filter in force (solid, with its remove button);
   .chip--option is one you can switch on (outlined). */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--tap);
  padding: 0 0 0 var(--space-4);
  border: 1px solid var(--color-action);
  border-radius: var(--radius-pill);
  background: var(--color-action);
  color: var(--color-on-action);
  font: 600 var(--text-sm)/1.2 var(--font-body);
}
.chip__remove {              /* the whole right end of the chip: 44px */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: 50%;
  color: var(--color-on-action);
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
}
.chip__remove:hover { background: var(--color-action-hover); color: var(--color-on-action); }
.chip__remove:focus-visible { outline: 2px solid var(--color-on-action); outline-offset: -4px; }
.chip__remove .icon { width: 1.125rem; height: 1.125rem; }
.chip--option {
  gap: var(--space-2);
  padding: 0 var(--space-4);
  border-color: var(--color-line-strong);
  background: var(--color-surface);
  color: var(--color-ink);
  text-decoration: none;
}
.chip--option:hover { border-color: var(--color-action); color: var(--color-action); }
.chip--option[aria-current="true"] { border-color: var(--color-action); background: var(--color-action); color: var(--color-on-action); }
.chip--option .icon { width: 1.125rem; height: 1.125rem; }
.chip--option[aria-current="true"] .tag__count { color: var(--color-on-action); }   /* the count turns white with the chip */
/* A chip--option on an <li> around a link and its count (a city list):
   the link covers the whole chip, the focus ring goes round the chip. */
li.chip--option { position: relative; }
li.chip--option > a { color: inherit; text-decoration: none; }
li.chip--option > a::after { content: ""; position: absolute; inset: -1px; }
@supports selector(:has(*)) {
  li.chip--option:has(> a:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 2px; }
  li.chip--option > a:focus-visible { outline: none; }
}
.chips__clear {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding-inline: var(--space-2);
  font: 600 var(--text-sm)/1.2 var(--font-body);
}

/* Forms */
.form { display: grid; gap: var(--space-5); max-width: 36rem; }
.form__actions { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-4); align-items: center; margin-top: var(--space-1); }
.form__note { margin: 0; color: var(--color-muted); font-size: var(--text-sm); }
/* Error summary (core/includes/form_errors.html): one link per field to fix;
   the field it lands on keeps its label in view. */
.form-problems ul { display: grid; margin: 0; padding: 0; list-style: none; }
.form-problems a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }
.form :is(input, select, textarea) { scroll-margin-top: var(--space-9); }   /* room for the label, help and error above */

.field { display: grid; gap: var(--space-2); margin: 0; min-width: 0; }
fieldset.field { border: 0; padding: 0; }
.field__label { padding: 0; color: var(--color-ink); font: 600 var(--text-base)/1.3 var(--font-body); }
.field__optional { color: var(--color-muted); font-weight: 400; }
.field__help { margin: 0; color: var(--color-muted); font-size: var(--text-sm); }
.field__errors { display: grid; gap: var(--space-1); }
.field__error {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  margin: 0;
  color: var(--color-cancelled);
  font: 600 var(--text-sm)/1.4 var(--font-body);
}
.field__error::before {
  content: "";
  flex: none;
  width: 1rem;
  height: 1rem;
  margin-top: 0.1em;
  background: currentColor;
  -webkit-mask: var(--mark-x) center / contain no-repeat;
  mask: var(--mark-x) center / contain no-repeat;
}

/* :where() keeps these base styles at zero specificity, so state rules such
   as .field--error below always win. */
:where(input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="hidden"]), select, textarea) {
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-ink);
  font: inherit;
  line-height: 1.4;
}
:where(input, select, textarea):hover { border-color: var(--color-ink); }
:where(input, select, textarea):focus-visible { border-color: var(--color-ink); }
:where(textarea) { min-height: 8rem; resize: vertical; }
::placeholder { color: var(--color-muted); opacity: 1; }
input[type="checkbox"], input[type="radio"] {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.15rem 0 0;
  accent-color: var(--color-action);
  flex: none;
}

/* File field (photos): the box is a field like the others; the browser's
   own "Choose files" button inside it looks like the outline button. */
input[type="file"] { padding-block: 0.5rem; cursor: pointer; }
input[type="file"]::file-selector-button {
  min-height: 2rem;
  margin-right: var(--space-3);
  padding: 0.25rem var(--space-4);
  border: 1.5px solid var(--color-action);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-action);
  font: 600 var(--text-sm)/1.2 var(--font-body);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
input[type="file"]:hover::file-selector-button { border-color: var(--color-action-hover); background: var(--color-action-wash); color: var(--color-action-hover); }

.field--error input:not([type="checkbox"], [type="radio"]),
.field--error select,
.field--error textarea { border-color: var(--color-cancelled); background: var(--color-cancelled-wash); }

/* Single checkbox: box, then its label on the same line. The label is the
   target, at least 44px tall like a choice row; the box stays level with its
   first line. */
.field--check { grid-template-columns: auto 1fr; column-gap: var(--space-3); align-items: start; }
.field--check > input[type="checkbox"] { margin-top: calc(var(--space-2) + 0.15rem); }
.field--check .field__label { min-height: var(--tap); padding-block: var(--space-2); font-weight: 400; line-height: 1.5; cursor: pointer; }
.field--check .field__help, .field--check .field__errors { grid-column: 2; }

/* Radio or checkbox group rendered by Django as nested divs. A choice named
   by the visitor's own text (a sponsor package) may hold one long word: it
   breaks anywhere rather than widening the form. */
.field--choices > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-1); }
.field--choices label {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  min-height: var(--tap);
  padding-block: var(--space-2);
  overflow-wrap: anywhere;
  cursor: pointer;
}

/* Antispam decoy: off-screen for people, still in the DOM for bots. */
.hp-field {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Filter panel: fields side by side as space allows, actions at the end. */
.filters {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  align-items: end;
  margin: 0 0 var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
}
.filters .field__label { font-size: var(--text-sm); }
.filters__search { grid-column: 1 / -1; }
.filters__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.filters__check { padding-bottom: 0; }   /* its 44px label already centres the line on the selects beside it */

/* Filter drawer: a native <details> (no JavaScript). On a phone the filters
   fold behind the "Filters" summary; from 48rem the summary hides and the
   panel is always open — in browsers that can style ::details-content.
   Older ones keep the summary on wide screens too: one click, same panel. */
.drawer { margin: 0 0 var(--space-5); }
.drawer__toggle { list-style: none; }
.drawer__toggle::-webkit-details-marker { display: none; }
.drawer[open] > .drawer__toggle { margin-bottom: var(--space-3); border-color: var(--color-action-hover); background: var(--color-action-wash); }
.drawer > .drawer__panel { margin-bottom: 0; }
@media (min-width: 48rem) {
  @supports selector(::details-content) {
    .drawer > .drawer__toggle { display: none; }
    .drawer::details-content { content-visibility: visible; display: block; }
  }
}
.drawer__count {
  display: inline-grid;
  place-items: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 var(--space-1);
  border-radius: var(--radius-pill);
  background: var(--color-action);
  color: var(--color-on-action);
  font-size: var(--text-xs);
  line-height: 1;
}
/* 9. Tradition plate & date tile ------------------------------------------------
   .tradition .tradition--<key> is a picture box: the family's photo
   (static/img/traditions/<key>.jpg) under a teal shade that keeps white
   text and the saffron month readable. Under the photo sits the family's
   plate colour with the cross-stitch lattice: that is what shows while a
   photo loads, for a key with no photo, and with .tradition--plain.
   One rule per family switches its photo on (--tradition-photo, and its
   480px copy --tradition-photo-sm for small plates); add one only together
   with both files (a url() to a missing file breaks collectstatic in
   production). */
.tradition, .fest-head__date {
  --plate: var(--tradition-default);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius);
  background-color: var(--plate);
  background-image: var(--tradition-photo, none);
  background-size: cover;
  background-position: center;
  color: var(--color-on-dark);
}
.tradition { container-type: inline-size; }
.tradition::before, .fest-head__date::before {     /* the lattice */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--color-on-dark);
  opacity: calc(0.15 * var(--lattice, 1));
  -webkit-mask: var(--pattern-lattice) 0 0 / 3rem 3rem repeat;
  mask: var(--pattern-lattice) 0 0 / 3rem 3rem repeat;
}
/* Shade over a photo, in the family's dye deepened with ink
   (--shade-color), so every family keeps its colour and the photo stays a
   photo. Two layers:
   - the picture: a soft gradient from the bottom that is gone by half
     height, so the top half shows the photo in its own colours;
   - the text: whatever sits on the picture (the date tile, a
     .tradition__caption) carries its own scrim, at least 88% from its top
     edge down to the bottom of the picture, fading out over --scrim-fade
     above it. Even behind a white photo pixel that keeps white text above
     7.6:1 and the saffron month above 3.1:1, for all 14 families, whatever
     the text's size. A badge in the top corner reads on its own white pill. */
.tradition { --shade-color: color-mix(in srgb, var(--plate) 60%, var(--color-ink)); }
.tradition::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: var(--shade, 0);
  background: linear-gradient(to top, color-mix(in srgb, var(--shade-color) 55%, transparent) 0%, transparent 50%);
}
.tradition .date-tile, .tradition__caption { position: relative; }
.tradition .date-tile::before, .tradition__caption::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: calc(-1 * var(--scrim-fade, 1rem)) -3rem -3rem;   /* out to the picture's edges; the picture clips it */
  opacity: var(--shade, 0);
  background: linear-gradient(to bottom,
    transparent 0,
    color-mix(in srgb, var(--shade-color) 88%, transparent) var(--scrim-fade, 1rem),
    color-mix(in srgb, var(--shade-color) 92%, transparent) 100%);
}
.tradition__caption { display: grid; gap: var(--space-1); }
.tradition--greek-orthodox { --plate: var(--tradition-greek-orthodox); --tradition-photo: url("../img/traditions/greek-orthodox.c0b527e4e330.jpg"); --tradition-photo-sm: url("../img/traditions/greek-orthodox-sm.061c1eac7b61.jpg"); }
.tradition--slavic { --plate: var(--tradition-slavic); --tradition-photo: url("../img/traditions/slavic.825f6b14796f.jpg"); --tradition-photo-sm: url("../img/traditions/slavic-sm.6986db0b3afb.jpg"); }
.tradition--italian-mediterranean { --plate: var(--tradition-italian-mediterranean); --tradition-photo: url("../img/traditions/italian-mediterranean.8df4cf1c3a59.jpg"); --tradition-photo-sm: url("../img/traditions/italian-mediterranean-sm.e2b30413da38.jpg"); }
.tradition--hispanic-latin { --plate: var(--tradition-hispanic-latin); --tradition-photo: url("../img/traditions/hispanic-latin.ac48c2b3fa33.jpg"); --tradition-photo-sm: url("../img/traditions/hispanic-latin-sm.0e8da013afdc.jpg"); }
.tradition--caribbean { --plate: var(--tradition-caribbean); --tradition-photo: url("../img/traditions/caribbean.a04f3aa5a77f.jpg"); --tradition-photo-sm: url("../img/traditions/caribbean-sm.579d69df7079.jpg"); }
.tradition--african { --plate: var(--tradition-african); --tradition-photo: url("../img/traditions/african.01ff3e7aeb9f.jpg"); --tradition-photo-sm: url("../img/traditions/african-sm.78358b9897f8.jpg"); }
.tradition--celtic { --plate: var(--tradition-celtic); --tradition-photo: url("../img/traditions/celtic.4306319fb314.jpg"); --tradition-photo-sm: url("../img/traditions/celtic-sm.528170bbf954.jpg"); }
.tradition--german-nordic { --plate: var(--tradition-german-nordic); --tradition-photo: url("../img/traditions/german-nordic.cddf0cdf4a1d.jpg"); --tradition-photo-sm: url("../img/traditions/german-nordic-sm.f35b585d9596.jpg"); }
.tradition--east-asian { --plate: var(--tradition-east-asian); --tradition-photo: url("../img/traditions/east-asian.c047292efd97.jpg"); --tradition-photo-sm: url("../img/traditions/east-asian-sm.c7cda8a1a8c1.jpg"); }
.tradition--south-asian { --plate: var(--tradition-south-asian); --tradition-photo: url("../img/traditions/south-asian.0e87caa66342.jpg"); --tradition-photo-sm: url("../img/traditions/south-asian-sm.fd6e4a5e0e5d.jpg"); }
.tradition--jewish-middle-eastern { --plate: var(--tradition-jewish-middle-eastern); --tradition-photo: url("../img/traditions/jewish-middle-eastern.7ff6e816ebde.jpg"); --tradition-photo-sm: url("../img/traditions/jewish-middle-eastern-sm.a0d79cc6c359.jpg"); }
.tradition--native-american { --plate: var(--tradition-native-american); --tradition-photo: url("../img/traditions/native-american.80e13242406a.jpg"); --tradition-photo-sm: url("../img/traditions/native-american-sm.3d283d343f8f.jpg"); }
.tradition--parish { --plate: var(--tradition-parish); --tradition-photo: url("../img/traditions/parish.680c40770223.jpg"); --tradition-photo-sm: url("../img/traditions/parish-sm.a8a2b7ba49df.jpg"); }
.tradition--default { --plate: var(--tradition-default); --tradition-photo: url("../img/traditions/default.f235184e3359.jpg"); --tradition-photo-sm: url("../img/traditions/default-sm.77b401f04e78.jpg"); }
/* A photo turns the lattice off and the shade on. */
.tradition--greek-orthodox, .tradition--slavic, .tradition--italian-mediterranean, .tradition--hispanic-latin,
.tradition--caribbean, .tradition--african, .tradition--celtic, .tradition--german-nordic, .tradition--east-asian,
.tradition--south-asian, .tradition--jewish-middle-eastern, .tradition--native-american, .tradition--parish,
.tradition--default { --lattice: 0; --shade: 1; }
/* Plate and lattice only, no photo (the fallback, on purpose). */
.tradition.tradition--plain { --tradition-photo: none; --tradition-photo-sm: none; --lattice: 1; --shade: 0; }
/* The organizer's own photo in the box (catalog/includes/head_photo.html):
   an <img class="tradition__photo"> instead of the family's picture, so the
   family's file is not fetched. It lies under the shade and under the text's
   scrim exactly where the family photo was (same stacking: lattice, photo,
   scrim, gradient), so the date keeps its contrast over any photo. The
   plate's colour shows while it loads. */
.tradition.tradition--photo { --tradition-photo: none; --tradition-photo-sm: none; --lattice: 0; --shade: 1; }
.tradition__photo {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Small pictures take <key>-sm.jpg (480px wide) instead of the 960px file:
   the 96px plate of a compact card row (phones, .fest-rows lists, the card
   over a form) and the tradition tiles on a phone. A poster card from 48rem
   goes back to the full file. Only the file in use is downloaded. */
.fest-card__media.tradition { background-image: var(--tradition-photo-sm, var(--tradition-photo, none)); }
@media (max-width: 47.99rem) {
  .tradition-tile.tradition { background-image: var(--tradition-photo-sm, var(--tradition-photo, none)); }
}
@media (min-width: 48rem) {
  .fest-grid:not(.fest-rows) .fest-card__media.tradition { background-image: var(--tradition-photo, none); }
}

/* Dates announced but not confirmed: a dashed frame inside the plate (the
   card adds is-expected; the festival page head has its own modifier). */
.tradition.is-expected, .fest-head__date--tentative {
  outline: 2px dashed var(--color-on-dark);
  outline-offset: -6px;
}

/* DateTile — the signature. Month (saffron) and year on the first line,
   the day numerals huge below. Its spans keep their page's prefix
   (fest-card__month, fest-head__days…), so the tile styles any
   *__month / *__days / *__year / *__usually child, and orders them itself.
     --expected     dates announced, not confirmed (the plate gets the frame)
     --usual        no dates; "Usually" + the usual month in the numeral slot
     --unannounced  no dates, no month: "Dates" + "TBA"
     --long         5-character day ranges ("26–28") a size down
     --range        months or years that span two ("Dec–Jan", "2026–27") a size down
   Nothing wraps inside a span; on a narrow poster the year drops to its own
   line. Compact (phone rows, form asides) is the default; poster sizes apply
   inside poster cards and on .date-tile--poster. */
.date-tile, .fest-head__date {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-end;
  align-items: baseline;
  column-gap: var(--space-2);
  width: 100%;
  color: var(--color-on-dark);
  font-family: var(--font-display);
  line-height: 0.9;
}
.date-tile > *, .fest-head__date > * { white-space: nowrap; }
.date-tile [class$="__usually"], .fest-head__date [class$="__usually"] { order: 0; }
.date-tile [class$="__month"], .fest-head__date [class$="__month"] {
  order: 1;
  color: var(--color-saffron);
  font-size: 1.1875rem;   /* 19px bold: large text, so saffron stays AA */
  font-weight: 800;
  letter-spacing: -0.02em;
}
.date-tile [class$="__year"], .fest-head__date [class$="__year"] {
  order: 2;
  display: none;
  color: var(--color-on-dark-muted);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
}
.date-tile [class$="__days"], .fest-head__date [class$="__days"] {
  order: 3;
  flex-basis: 100%;
  margin-top: 0.08em;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  font-variant-numeric: lining-nums;
}
.date-tile--long [class$="__days"] { font-size: 1.375rem; }
.date-tile [class$="__usually"], .fest-head__date [class$="__usually"] {
  color: var(--color-on-dark-muted);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.1;
}
.date-tile--usual [class$="__month"], .date-tile--unannounced [class$="__month"],
.fest-head__date--usual [class$="__month"], .fest-head__date--unannounced [class$="__month"] {
  order: 3;
  flex-basis: 100%;
  margin-top: 0.08em;
  color: var(--color-on-dark);
  font-size: 1.75rem;
  letter-spacing: -0.035em;
}

/* Poster size: inside a .tradition plate the numerals follow the plate's
   width (cqi); outside one they take --text-date. */
.date-tile--poster { --scrim-fade: 3rem; }
.date-tile--poster [class$="__month"] { font-size: 1.5rem; }
.date-tile--poster.date-tile--range [class$="__month"] { font-size: 1.25rem; }
.date-tile--poster [class$="__year"] { display: block; }
.date-tile--poster [class$="__usually"] { color: var(--color-saffron); font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; }
.date-tile--poster [class$="__days"],
.date-tile--poster.date-tile--usual [class$="__month"],
.date-tile--poster.date-tile--unannounced [class$="__month"] { font-size: var(--text-date); font-size: clamp(3rem, 27cqi, 6.5rem); }
.date-tile--poster.date-tile--long [class$="__days"] { font-size: clamp(2.5rem, 19cqi, 5rem); }

/* 10. Festival card & lists -----------------------------------------------------
   One card, two shapes. A compact row everywhere by default (phones, form
   asides, .fest-rows lists); a poster — plate on top, caption below — in a
   .fest-grid from 48rem up. The whole card is the link to its page. */
.fest-card {
  position: relative;
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  grid-template-areas: "media body" "media status";
  grid-template-rows: auto 1fr;
  gap: var(--space-2) var(--space-4);
  align-items: start;
}
.fest-card__media {
  grid-area: media;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 1;
  padding: var(--space-2) var(--space-2) var(--space-2) 0.625rem;
}
.fest-card__body { grid-area: body; min-width: 0; }
.fest-card__status { grid-area: status; margin: 0; }
.fest-card__name {
  margin: 0 0 var(--space-1);
  font: 600 var(--text-md)/1.2 var(--font-display);
  letter-spacing: -0.01em;
}
.fest-card__name a { color: var(--color-ink); text-decoration: none; }
.fest-card__name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }   /* whole card is the link */
.fest-card:hover .fest-card__name a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
.fest-card__place {
  display: flex;
  gap: var(--space-1);
  align-items: flex-start;
  margin: 0 0 var(--space-2);
  color: var(--color-muted);
  font-size: var(--text-sm);
}
.fest-card__place .icon { width: 1rem; height: 1rem; margin-top: 0.15em; }
.fest-card__note { margin: var(--space-2) 0 0; color: var(--color-muted); font-size: var(--text-sm); }
.fest-card__note + .fest-card__note { margin-top: 0; }
.fest-card__media.is-not-held { filter: saturate(0.2); }   /* not held this year: the plate goes grey */
.fest-card .tags a { position: relative; z-index: 2; }   /* clickable above the card link */
.fest-card .tags { margin-top: var(--space-2); }
@supports selector(:has(*)) {
  .fest-card:has(.fest-card__name a:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 6px; border-radius: var(--radius); }
  .fest-card__name a:focus-visible { outline: none; }
}

/* Lists of cards: rows split by hairlines on a phone (and in .fest-rows),
   a poster grid from 48rem. */
.fest-grid { gap: 0 var(--space-5); }
.fest-grid > li { padding-block: var(--space-4); border-top: 1px solid var(--color-line); }
.fest-grid > li:first-child { border-top: 0; padding-top: 0; }
.fest-rows { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
@media (min-width: 48rem) {
  .fest-rows { row-gap: var(--space-5); }
  .fest-rows > li { padding: 0; border: 0; }
  .fest-grid:not(.fest-rows) { gap: var(--space-7) var(--space-5); }
  .fest-grid:not(.fest-rows) > li { padding: 0; border: 0; }
  .fest-grid:not(.fest-rows) .fest-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "media" "body";
    grid-template-rows: auto 1fr;
    row-gap: var(--space-4);
  }
  .fest-grid:not(.fest-rows) .fest-card__media { --scrim-fade: 3rem; aspect-ratio: 4 / 3; padding: var(--space-4) var(--space-5) var(--space-5); }
  .fest-grid:not(.fest-rows) .fest-card__status { grid-area: media; align-self: start; justify-self: start; margin: var(--space-3); z-index: 2; pointer-events: none; }
  .fest-grid:not(.fest-rows) .fest-card__name { font-size: 1.375rem; }
  .fest-grid:not(.fest-rows) .date-tile [class$="__month"] { font-size: 1.5rem; }
  .fest-grid:not(.fest-rows) .date-tile--range [class$="__month"] { font-size: 1.25rem; }
  .fest-grid:not(.fest-rows) .date-tile [class$="__year"] { display: block; }
  .fest-grid:not(.fest-rows) .date-tile [class$="__usually"] { color: var(--color-saffron); font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; }
  .fest-grid:not(.fest-rows) .date-tile [class$="__days"],
  .fest-grid:not(.fest-rows) .date-tile--usual [class$="__month"],
  .fest-grid:not(.fest-rows) .date-tile--unannounced [class$="__month"] { font-size: 4.5rem; font-size: clamp(3rem, 27cqi, 6.5rem); }
  .fest-grid:not(.fest-rows) .date-tile--long [class$="__days"] { font-size: 3.5rem; font-size: clamp(2.5rem, 19cqi, 5rem); }
}

/* VendorCard: one business in the vendor directory
   (vendors/includes/vendor_card.html). Always the compact row: a 96px
   picture — the vendor's own first photo, or the neutral plate with the
   lattice, never a picture from the web — then the name, home city,
   categories and the states it works in. No date and no poster: the loud
   element of the site stays the festival's date tile. Lists: ul.grid.vendor-grid,
   rows under hairlines on a phone, a grid of rows from 48rem. The whole
   card is the link. */
.vendor-card {
  position: relative;
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  grid-template-areas: "media body";
  gap: var(--space-4);
  align-items: start;
}
.vendor-card__media { --shade: 0; grid-area: media; aspect-ratio: 1; }
.vendor-card__body { grid-area: body; min-width: 0; }
.vendor-card__name {
  margin: 0 0 var(--space-1);
  font: 600 var(--text-md)/1.2 var(--font-display);
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}
.vendor-card__name a { color: var(--color-ink); text-decoration: none; }
.vendor-card__name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }   /* whole card is the link */
.vendor-card:hover .vendor-card__name a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
.vendor-card__place {
  display: flex;
  gap: var(--space-1);
  align-items: flex-start;
  margin: 0 0 var(--space-2);
  color: var(--color-muted);
  font-size: var(--text-sm);
}
.vendor-card__place .icon { width: 1rem; height: 1rem; margin-top: 0.15em; }
.vendor-card__note { margin: var(--space-2) 0 0; color: var(--color-muted); font-size: var(--text-sm); }
@supports selector(:has(*)) {
  .vendor-card:has(.vendor-card__name a:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 6px; border-radius: var(--radius); }
  .vendor-card__name a:focus-visible { outline: none; }
}
.vendor-grid { gap: 0 var(--space-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.vendor-grid > li { padding-block: var(--space-4); border-top: 1px solid var(--color-line); }
.vendor-grid > li:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 48rem) {
  .vendor-grid { gap: var(--space-6) var(--space-5); }
  .vendor-grid > li { padding: 0; border: 0; }
}

/* 11. Tags & status badges -------------------------------------------------------
   Culture tags are quiet links. The tag--tone-1…8 classes still come from
   {{ slug|tone }} in the templates and are kept, but render alike: a
   tradition's colour lives on its plate, and pomegranate stays the only
   colour that means "press". */
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.125rem 0.75rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink);
  font: 600 var(--text-sm)/1.3 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
}
a.tag:hover { border-color: var(--color-ink); color: var(--color-ink); }
.tags--large .tag { min-height: var(--tap); padding: 0.375rem 1rem; font-size: var(--text-base); }
.tag__count { margin-left: var(--space-2); color: var(--color-muted); font-weight: 400; font-variant-numeric: tabular-nums; }

/* StatusBadge: one per festival, from when.badge (catalog.dates.When). */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 1.75rem;
  padding: 0.125rem 0.75rem 0.125rem 0.625rem;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font: 600 var(--text-sm)/1.2 var(--font-body);
  white-space: nowrap;
}
.badge::before {
  content: "";
  flex: none;
  width: 1rem;
  height: 1rem;
  background: currentColor;
  -webkit-mask: var(--badge-mark, none) center / contain no-repeat;
  mask: var(--badge-mark, none) center / contain no-repeat;
}
.badge--happening-now { border-color: var(--color-confirmed); background: var(--color-confirmed); color: var(--color-on-dark); }
.badge--happening-now::before { width: 0.5rem; height: 0.5rem; margin-inline: 0.25rem; border-radius: 50%; -webkit-mask: none; mask: none; }
.badge--this-weekend { --badge-mark: var(--mark-calendar); border-color: var(--color-teal); background: var(--color-teal); color: var(--color-on-dark); }
.badge--confirmed, .badge--verified { --badge-mark: var(--mark-check); color: var(--color-confirmed); }
.badge--expected { color: var(--color-expected); border-style: dashed; padding-left: 0.75rem; }
.badge--expected::before { display: none; }
.badge--not-held { --badge-mark: var(--mark-x); color: var(--color-cancelled); }
.badge--muted { border-color: var(--color-line-strong); color: var(--color-muted); padding-left: 0.75rem; }
.badge--muted::before { display: none; }

/* 12. Fact tiles, map panel, cards, band ----------------------------------------- */
.fact-tiles {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  margin: 0 0 var(--space-6);
  padding: 0;
}
.fact-tile {
  display: grid;
  align-content: start;
  gap: var(--space-1);
  margin: 0;
  padding: var(--space-4) var(--space-5) var(--space-5);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}
.fact-tile__label { color: var(--color-muted); font: 600 var(--text-sm)/1.3 var(--font-body); }
.fact-tile__value { margin: 0; color: var(--color-ink); font: 600 var(--text-lg)/1.15 var(--font-display); letter-spacing: -0.01em; }
.fact-tile__note { margin: 0; color: var(--color-muted); font-size: var(--text-sm); }

/* Map panel: no coordinates in the data yet, so the "no map" state is the
   panel — the place in words and a directions link, beside a plate. */
.map-panel {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}
.map-panel__plate { display: grid; place-items: center; min-height: 7rem; border-radius: 0; }
.map-panel__plate .icon { width: 2.5rem; height: 2.5rem; }
.map-panel__body { padding: var(--space-5); }
.map-panel__title { margin: 0 0 var(--space-2); font-size: var(--text-lg); }
.map-panel__address { margin: 0 0 var(--space-4); }
.map-panel__body .btn { margin-top: var(--space-1); }
@media (min-width: 40rem) { .map-panel { grid-template-columns: 11rem minmax(0, 1fr); } }

/* A plain boxed block. --accent holds a page's main action (sponsor panel),
   --sand (alias --quiet) is a quiet teal-wash note. */
.card {
  padding: var(--space-5);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
}
.card > :last-child { margin-bottom: 0; }
.card h2 { font-size: var(--text-lg); font-weight: 800; }
.card--accent { border-color: var(--color-action); }
.card--sand, .card--quiet { border-color: transparent; background: var(--color-teal-wash); }

/* Band: the dark teal strip (for organizers, for sponsors). */
.band {
  --color-focus: var(--color-focus-on-dark);
  display: grid;
  gap: var(--space-4) var(--space-6);
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius);
  background: var(--color-teal);
  color: var(--color-on-dark);
}
.band h2, .band h3 { color: var(--color-on-dark); margin-bottom: var(--space-2); }
.band p { margin: 0; max-width: var(--measure); color: var(--color-on-dark-muted); }
.band a:not(.btn) { color: var(--color-on-dark); }
.band .actions { margin: 0; }
@media (min-width: 48rem) {
  .band { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: var(--space-7); }
}
/* --compact: the band in a side column (the website offer beside the claim
   form). One column at every width, a card's padding and heading size, and
   the line under the heading in full white: it carries the offer. */
.band.band--compact { grid-template-columns: minmax(0, 1fr); padding: var(--space-5); }
.band--compact h2, .band--compact h3 { font-size: var(--text-lg); }
.band--compact p { color: var(--color-on-dark); }

/* Gallery: an organizer's photos (catalog/includes/photo_gallery.html). Two
   columns on a phone, three from 48rem; every picture cut to 4:3 with the
   picture's own radius, no frame and no shadow. The <img> carries its width
   and height, the aspect-ratio holds the box, so nothing moves while the
   lazy pictures arrive. The caption is quiet text under the picture. */
.gallery {
  display: grid;
  gap: var(--space-4) var(--space-3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 48rem) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5) var(--space-4); } }
.gallery__figure { margin: 0; }
.gallery__link { display: block; border-radius: var(--radius); }
.gallery__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--color-teal-wash);
}
.gallery__caption { margin-top: var(--space-2); color: var(--color-muted); font-size: var(--text-sm); line-height: 1.4; overflow-wrap: break-word; }

/* 13. Notices, breadcrumbs, pagination ------------------------------------------- */
.notice {
  margin: 0 0 var(--space-5);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-teal);
  border-radius: var(--radius);
  background: var(--color-teal-wash);
  color: var(--color-ink);
}
.notice > :last-child { margin-bottom: 0; }
.notice__title { display: block; margin-bottom: var(--space-1); font-weight: 600; }
.notice--info { border-color: var(--color-teal); background: var(--color-teal-wash); }
.notice--success { border-color: var(--color-confirmed); background: var(--color-confirmed-wash); }
.notice--warning { border-color: var(--color-expected); background: var(--color-expected-wash); }
.notice--error { border-color: var(--color-cancelled); background: var(--color-cancelled-wash); }

.breadcrumbs { padding-top: var(--space-5); }
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--color-muted);
  font-size: var(--text-sm);
}
.breadcrumbs li + li::before { content: "/"; content: "/" / ""; margin-right: var(--space-2); color: var(--color-line-strong); }   /* not read aloud */
.breadcrumbs a { color: var(--color-muted); }
.breadcrumbs a:hover { color: var(--color-action); }
.breadcrumbs [aria-current="page"] { color: var(--color-ink); }

.result-count { margin: 0 0 var(--space-4); color: var(--color-muted); font-weight: 600; }

.pagination { margin: var(--space-6) 0; }
.pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0 var(--space-3);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-pill);
  color: var(--color-ink);
  font: 600 var(--text-base)/1 var(--font-body);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}
.pagination a:hover { border-color: var(--color-action); color: var(--color-action); }
.pagination [aria-current="page"] { border-color: var(--color-action); background: var(--color-action); color: var(--color-on-action); }
.pagination .pagination__gap { border-color: transparent; }
.pagination a[rel="prev"], .pagination a[rel="next"] { padding-inline: var(--space-4); }
.pagination .icon { width: 1.125rem; height: 1.125rem; }

/* 14. Empty & status pages, utilities -------------------------------------------- */
/* Empty state: says what happened and always offers a way on — wider
   filters, or festivals nearby or expected (.empty__more). */
.empty {
  max-width: 48rem;
  margin: var(--space-4) 0 var(--space-7);
  padding: var(--space-6) var(--space-5);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}
@media (min-width: 48rem) { .empty { padding: var(--space-7); } }
.empty__title { margin: 0 0 var(--space-2); font-size: var(--text-xl); }
.empty > p { color: var(--color-muted); max-width: var(--measure); }
.empty .actions { margin-bottom: 0; }
.empty__more { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--color-line); }
.empty__more-title { margin: 0 0 var(--space-4); font-size: var(--text-md); }
.empty__more .grid { margin-bottom: 0; }

/* Month group: lists run soonest first and break at each month. The count
   sits outside the heading. */
.month-group + .month-group { margin-top: var(--space-7); }
.month-group__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-4);
  margin-bottom: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-ink);
}
.month-group__title { margin: 0; font-size: var(--text-xl); }
.month-group__count { margin: 0; color: var(--color-muted); font-weight: 600; }

/* Tradition tiles: browse by tradition — the family's picture with the name
   in white at the bottom left. */
.tradition-tiles {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr));
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
}
@media (min-width: 48rem) { .tradition-tiles { gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); } }
.tradition-tile {
  --scrim-fade: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-1);
  aspect-ratio: 4 / 3;
  padding: var(--space-3) var(--space-4);
  color: var(--color-on-dark);
  text-decoration: none;
}
.tradition-tile:hover { color: var(--color-on-dark); }
.tradition-tile__name { font: 800 var(--text-md)/1.1 var(--font-display); letter-spacing: -0.01em; }
.tradition-tile:hover .tradition-tile__name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
.tradition-tile__count { color: var(--color-on-dark-muted); font-size: var(--text-sm); font-weight: 600; }
/* The count beside the name, as the culture tags write it (.tag__count). */
.tradition-tile .tag__count { margin-left: var(--space-2); color: var(--color-on-dark-muted); font: 600 var(--text-sm)/1 var(--font-body); letter-spacing: 0; }
@media (min-width: 48rem) { .tradition-tile__name { font-size: var(--text-lg); } }
.chip--option .tag__count { margin-left: 0; }

.status-page { padding-block: var(--space-7) var(--space-4); max-width: var(--measure); }
.status-page__code {
  margin: 0;
  color: var(--color-teal);
  font: 800 clamp(5rem, 3rem + 9vw, 9rem)/0.9 var(--font-display);
  letter-spacing: -0.045em;
}

/* Visible stand-in for a value nobody has filled in yet. */
.placeholder {
  padding: 0 var(--space-1);
  background: var(--color-saffron-wash);
  outline: 2px dashed var(--color-expected);
  outline-offset: 1px;
  color: var(--color-ink);
  font-weight: 600;
}

.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;
}

/* 15. Catalog pages (existing page classes; their full redesign is per page) ------ */

/* Home's head (.hero: the owner's photo, the title, the search) is only on
   the home page, so all of it lives in static/css/pages/home.css. */

/* A titled band of a list page; bands after the first get a hairline. Each
   band ends without the bottom margin of its last list, so the gap to the
   next heading is the band's own padding, the same for every band. */
.home-section { padding-block: var(--space-6); }
.home-section + .home-section { border-top: 1px solid var(--color-line); }
@media (min-width: 48rem) { .home-section { padding-block: var(--space-7); } }
.home-section > h2 { margin-bottom: var(--space-5); }
.home-section > :last-child { margin-bottom: 0; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-5);
  margin-bottom: var(--space-5);
}
.section-head h2 { margin: 0; }
.section-head__more { font-weight: 600; }

/* Cities with counts, in as many columns as fit. */
.city-group__state { margin: var(--space-5) 0 var(--space-2); font-size: var(--text-md); }
.city-group__state a { color: var(--color-ink); text-decoration: none; }
.city-group__state a:hover { color: var(--color-action); text-decoration: underline; }
.city-list { columns: 10rem 5; column-gap: var(--space-5); margin: 0 0 var(--space-4); padding: 0; list-style: none; }
.city-list li { break-inside: avoid; padding-block: var(--space-1); font-weight: 600; }
.city-list__count { color: var(--color-muted); font-weight: 400; font-variant-numeric: tabular-nums; }

/* "For organizers" / "For sponsors" pair on the home page. */
.home-audiences { display: grid; gap: var(--space-4); }
@media (min-width: 48rem) { .home-audiences { grid-template-columns: 1fr 1fr; } }
.home-audiences__title { font-size: var(--text-lg); }
.home-audiences .actions { margin-bottom: 0; }

/* Search page on a phone: selects two to a row so results start sooner. */
@media (max-width: 47.99rem) {
  .filters--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: var(--space-4); }
  .filters--compact .filters__check,
  .filters--compact .filters__actions { grid-column: 1 / -1; }
  .filters--compact .filters__check { padding-bottom: 0; }
}
.filters--inline { grid-template-columns: minmax(0, 18rem) auto; justify-content: start; }

/* Festival page head: the date poster on the default plate beside the name
   (a strip on a phone, a square from 40rem). */
.fest-head {
  display: grid;
  gap: var(--space-5);
  padding-block: var(--space-5) var(--space-6);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-line);
}
@media (min-width: 40rem) {
  .fest-head { grid-template-columns: auto minmax(0, 1fr); gap: var(--space-6); align-items: start; padding-block: var(--space-6) var(--space-7); }
}
.fest-head__date { min-height: 8rem; padding: var(--space-4) var(--space-5); }
.fest-head__date [class$="__month"] { font-size: 1.5rem; }
.fest-head__date [class$="__year"] { display: block; }
.fest-head__date [class$="__usually"] { color: var(--color-saffron); font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; }
.fest-head__date [class$="__days"],
.fest-head__date--unannounced [class$="__month"] { font-size: 4rem; }
.fest-head__date--usual [class$="__month"] { font-size: 3rem; }
@media (min-width: 40rem) {
  .fest-head__date { width: 14rem; aspect-ratio: 1; }
  .fest-head__date [class$="__days"],
  .fest-head__date--unannounced [class$="__month"] { font-size: 4.5rem; }
  /* This page prints the usual month in full ("September"): it has to fit 14rem. */
  .fest-head__date--usual [class$="__month"] { font-size: 2.125rem; letter-spacing: -0.03em; }
}
.fest-head__name { max-width: 22ch; margin-bottom: 0.3em; }
.fest-head__place { margin: 0 0 var(--space-3); color: var(--color-muted); font-size: var(--text-md); }
.fest-head__tags { margin-bottom: var(--space-4); }
.fest-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin: 0; }
.fest-head__jump { margin-left: auto; font-weight: 600; }
@media (min-width: 56rem) { .fest-head__jump { display: none; } }   /* the panel is in view beside */

/* Festival page body. */
.fest-section + .fest-section { margin-top: var(--space-7); }
.fest-section > h2 { margin-bottom: var(--space-3); font-size: var(--text-lg); }
.when__dates { margin: 0 0 var(--space-1); font: 800 var(--text-lg)/1.2 var(--font-display); letter-spacing: -0.01em; }
.when__weekdays { margin: 0 0 var(--space-3); color: var(--color-muted); }
.when__note { margin: var(--space-2) 0 var(--space-3); color: var(--color-muted); }
.when__note .badge { margin-right: var(--space-2); }
.when__last { margin: var(--space-2) 0 0; }
.when__past-title { margin: var(--space-5) 0 var(--space-2); font-size: var(--text-md); }
.past-years dt, .past-years dd { font-variant-numeric: tabular-nums lining-nums; }

.link-list { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); margin: 0; padding: 0; list-style: none; }

.fest-aside { display: grid; gap: var(--space-5); }

/* "For sponsors" and "For vendors" panels: one layout. The sponsor panel is
   .card--accent with the solid button (the page's main action); the vendor
   panel is a plain .card with the outline button. */
.sponsor-block__title, .vendor-block__title { margin-bottom: var(--space-3); }
.sponsor-block__note, .vendor-block__note { margin-bottom: var(--space-5); }
.sponsor-block__note > :last-child, .vendor-block__note > :last-child { margin-bottom: 0; }
.sponsor-block__fine, .vendor-block__fine { margin-top: var(--space-3); }
.sponsor-block__closed, .vendor-block__closed {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--color-teal-wash);
  font-weight: 600;
}
/* The vendor panel's last line, under a hairline: the vendor directory's
   join form, for every festival rather than this one (story 128). */
.vendor-block__join {
  margin: var(--space-5) 0 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: var(--text-sm);
}
.vendor-block__join a { font-weight: 600; }

/* Sponsor packages (catalog/includes/sponsor_packages.html), inside the
   sponsor panel: rows under hairlines, because the panel is already the card
   (no box in a box). Name and price share a line — the price wraps under a
   long name — and the price is the display face, large; "Price on request"
   is quiet text. Then what is included, spots and deadline, and the link
   that opens the form with the package chosen. Sold-out and closed packages
   come last, muted, with no link. A long unbroken word (a pasted address)
   breaks anywhere: the columns are minmax(0, 1fr), so it never widens the
   panel or the page. */
.sponsor-block__range { margin: 0 0 var(--space-3); font-weight: 600; }
.packages { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--color-line); }
.package { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); padding-block: var(--space-4); border-top: 1px solid var(--color-line); }
.package > * { margin: 0; }
.package__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 var(--space-3); }
.package__name { min-width: 0; margin: 0; font: 600 var(--text-md)/1.25 var(--font-display); overflow-wrap: anywhere; }
.package__price {
  margin: 0;
  font: 800 var(--text-lg)/1.15 var(--font-display);
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums tabular-nums;
}
.package__price--ask { color: var(--color-muted); font: 600 var(--text-sm)/1.5 var(--font-body); letter-spacing: 0; }
.package__items { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-1); padding-left: 1.25em; line-height: 1.4; overflow-wrap: anywhere; }
.package__items li::marker { color: var(--color-muted); }
.package__terms { color: var(--color-muted); font-size: var(--text-sm); }
.package__ask { display: inline-flex; align-items: center; justify-self: start; min-height: var(--tap); margin-bottom: calc(-1 * var(--space-2)); font-weight: 600; }
.package__status { justify-self: start; font-size: var(--text-sm); font-weight: 600; }
.package--off, .package--off .package__name, .package--off .package__price { color: var(--color-muted); }
.packages__fine { margin: var(--space-3) 0 var(--space-5); }

/* Claim and report links under the panel. */
.listing-actions ul { display: grid; gap: var(--space-2); margin: 0; padding: 0 var(--space-1); list-style: none; }
.listing-actions a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }

/* The card over a form: always the compact row. */
.form-festival .facts { margin-bottom: 0; }

/* 16. Styleguide only ------------------------------------------------------------ */
.sg-section { padding-block: var(--space-7); border-top: 1px solid var(--color-line); }
.sg-section > h2 { margin-bottom: var(--space-2); }
.sg-section > h3 { margin: var(--space-6) 0 var(--space-3); font-size: var(--text-md); }
.sg-classes { margin: 0 0 var(--space-5); max-width: 60rem; color: var(--color-muted); font-size: var(--text-sm); }
.sg-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin-bottom: var(--space-4); }
.sg-swatches { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr)); margin: 0 0 var(--space-5); padding: 0; list-style: none; }
.sg-swatch { display: grid; gap: var(--space-1); font-size: var(--text-sm); }
.sg-swatch::before { content: ""; height: 4rem; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--swatch); }
.sg-swatch code { color: var(--color-muted); }
.sg-plates { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr)); margin: 0 0 var(--space-5); padding: 0; list-style: none; }
.sg-plates .tradition { --scrim-fade: 1.5rem; display: flex; align-items: flex-end; aspect-ratio: 4 / 3; padding: var(--space-3); font-size: var(--text-sm); font-weight: 600; line-height: 1.2; }
.sg-type { display: grid; gap: var(--space-4); margin-bottom: var(--space-5); }
.sg-type > * { margin: 0; }
.sg-type__meta { color: var(--color-muted); font-size: var(--text-sm); }
.sg-tiles { display: grid; gap: var(--space-4) var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr)); margin: 0 0 var(--space-5); padding: 0; list-style: none; }
@media (min-width: 48rem) { .sg-tiles { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); } }
.sg-tiles .tradition { --scrim-fade: 2.5rem; display: flex; align-items: flex-end; aspect-ratio: 4 / 3; padding: var(--space-3) var(--space-4) var(--space-4); }
.sg-compact-tiles { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: 0 0 var(--space-5); padding: 0; list-style: none; }
.sg-compact-tiles .tradition { display: flex; align-items: flex-end; width: 6rem; aspect-ratio: 1; padding: var(--space-2); }
.sg-caption { margin: var(--space-2) 0 0; color: var(--color-muted); font-size: var(--text-sm); }
.sg-narrow { max-width: 24rem; }
.sg-phone { position: relative; max-width: 24.375rem; min-height: 24rem; margin-bottom: var(--space-5); overflow: hidden; border: 1px solid var(--color-line-strong); border-radius: var(--radius); }
.sg-phone .site-header__inner { padding-inline: var(--space-3); padding-block: var(--space-3); }
.sg-phone .wordmark { margin-right: auto; font-size: 1.25rem; }
.sg-phone .header-search__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sg-phone .header-search { margin-right: 0; padding: 0; }
.sg-phone .site-menu { display: block; }
.sg-phone .site-menu__panel { padding-inline: var(--space-3); }
