/*
 * Stoei Core — website components ("Stoei CSS"). Load after tokens.css and
 * base.css; a site's theme file loads last.
 *
 * Page frame, type, buttons, forms, cards, chips, tabs, pagination, hero,
 * page heads, page sections and photo uploads, from the approved Louisville
 * Finds mockups (Nov 2026). Directory parts (listing pages, contact box and
 * bar, people, filter bar, area bands) are in recipes/directory.css.
 *
 * Rules: every look value comes from tokens.css (checked by
 * tools/check-css.php); no shadows; one heading scale; one spacing scale;
 * focus is always visible; nothing moves for visitors who turn motion off.
 * Class names start with "st-".
 */

/* ---------- 2. Base ---------- */

/* The footer always sits at the bottom, even on short pages. */
body { min-height: 100vh; display: flex; flex-direction: column; }

body > main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  font-family: var(--st-font-display);
  font-weight: var(--st-weight-heading);
  line-height: var(--st-leading-heading);
  letter-spacing: var(--st-tracking-heading);
  margin: 0;
}
h1, .st-head__title { font-size: var(--st-text-h1); line-height: var(--st-leading-title); letter-spacing: var(--st-tracking-title); }
h2 { font-size: var(--st-text-h2); }
h3 { font-size: var(--st-text-h3); line-height: var(--st-leading-tight); }
p { margin: 0; }

a { text-decoration: none; }
a:hover, .st-prose a, .st-footer__credit { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { border-radius: var(--st-radius-focus); }


@media (prefers-reduced-motion: no-preference) {
  a, .st-card {
    transition: color var(--st-motion), background-color var(--st-motion), border-color var(--st-motion);
  }
}

/* ---------- 3. Layout ---------- */

.st-container { max-width: var(--st-container); margin-inline: auto; padding-inline: var(--st-gutter); }
.st-narrow { max-width: var(--st-measure); }
.st-results-page { max-width: var(--st-measure-wide); } /* the search page */
.st-reading { max-width: var(--st-measure-reading); }

/* Page sections: one rhythm everywhere, the same space above and below
   (--st-section-space: 64px, 48px on phones). Owner rule 2026-11-18. */
.st-page { padding-block: var(--st-page-top) var(--st-section-space); }
.st-page > * + * { margin-top: var(--st-section-space); }
/* The page head is part of the top, not a section: less space above it
   (--st-page-top) and after it (--st-head-space). Also after a breadcrumb
   that starts the page (listings) and a site's box around a page head
   (.st-head-wrap). An article page (.st-article) keeps the section gap. */
.st-page > :is(.st-head, .st-breadcrumb, .st-head-wrap) + * { margin-top: var(--st-head-space); }
.st-stack, .st-list, .st-head, .st-signup { display: flex; flex-direction: column; gap: var(--st-space-4); }
.st-stack--md { gap: var(--st-space-5); }
.st-stack--lg { gap: var(--st-space-6); }

.st-grid { display: grid; gap: var(--st-space-5); grid-template-columns: repeat(auto-fill, minmax(var(--st-grid-min, 260px), 1fr)); }

.st-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--st-space-2) var(--st-space-6); margin-bottom: var(--st-space-6); }
.st-section-head a { font-weight: var(--st-weight-strong); }
/* Content right under a plain h2 (no section head row). */
.st-after-head { margin-top: var(--st-space-6); }
.st-section-head + .st-after-head { margin-top: 0; } /* the head row already leaves the gap */

/* ---------- 4. Text pieces ---------- */

.st-lead { font-size: var(--st-text-lead); color: var(--st-color-text-muted); max-width: var(--st-measure-reading); }
.st-muted { color: var(--st-color-text-muted); }
.st-small { font-size: var(--st-text-small); }
.st-eyebrow { font-size: var(--st-text-label); font-weight: var(--st-weight-strong); letter-spacing: var(--st-tracking-label); text-transform: uppercase; color: var(--st-color-accent); }

.st-prose { font-size: var(--st-text-prose); line-height: var(--st-leading-prose); }
.st-prose > * + * { margin-top: var(--st-space-6); }
.st-prose h2 { margin-top: var(--st-space-9); }
.st-prose h3 { margin-top: var(--st-space-7); }
.st-prose ul, .st-prose ol { padding-left: 1.3em; }
.st-prose li + li { margin-top: var(--st-space-2); }
.st-prose blockquote { margin-inline: 0; padding-left: var(--st-space-5); border-left: 3px solid var(--st-color-line); color: var(--st-color-text-muted); }
.st-prose figure { margin-inline: 0; }
.st-prose figcaption { margin-top: var(--st-space-3); font-size: var(--st-text-caption); color: var(--st-color-text-muted); }
.st-prose img { border-radius: var(--st-radius-card); }
/* Pictures inside the text (Stoei Markdown ![](media:id)): full text width, never wider. */
.st-picture img { display: block; width: 100%; height: auto; }
/* Tables inside the text: the box scrolls sideways when the table is wider than the screen. */
.st-table { overflow-x: auto; border: var(--st-line-width) solid var(--st-color-line); border-radius: var(--st-radius-card); }
.st-table table { width: 100%; border-collapse: collapse; font-size: var(--st-text-small); line-height: 1.5; font-variant-numeric: tabular-nums; }
.st-table th, .st-table td { padding: var(--st-space-3) var(--st-space-4); text-align: left; vertical-align: top; }
.st-table th { font-weight: var(--st-weight-strong); background: var(--st-color-sunk); white-space: nowrap; }
.st-table td { min-width: 8em; } /* on phones the box scrolls before a cell gets too narrow to read */
.st-table tr + tr td, .st-table thead + tbody td { border-top: var(--st-line-width) solid var(--st-color-line); }
.st-table .st-table__center { text-align: center; }
.st-table .st-table__right { text-align: right; }

/* ---------- 5. Page frame: header, menu, footer, breadcrumb ---------- */

.st-header, .st-footer { background: var(--st-color-band); color: var(--st-color-on-band); }
.st-header__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--st-space-4) var(--st-space-7); padding-block: var(--st-space-4); }
.st-logo { font-family: var(--st-font-display); font-weight: 700; font-size: var(--st-text-logo); letter-spacing: var(--st-tracking-heading); color: var(--st-color-on-band); white-space: nowrap; }
.st-logo:hover { text-decoration: none; color: var(--st-color-on-band); }
.st-logo__glow { color: var(--st-color-band-accent); }
.st-header__actions { display: flex; gap: var(--st-space-2); margin-left: auto; }

.st-nav { flex: 1 1 auto; }
.st-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--st-space-1) var(--st-space-6); font-weight: 500; font-size: var(--st-text-5); }
.st-nav a { color: var(--st-color-on-band); display: inline-block; padding-block: var(--st-space-2); }
.st-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--st-color-band-accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* Search bar next to the logo (approved mockup docs/mockups/header-search/, Option B).
   Computers: logo, wide search bar and theme switch on top, the menu on a second
   row under a thin line. Phones: see the 959px block below. */
.st-hsearch {
  display: flex; align-items: center; gap: var(--st-space-1);
  height: var(--st-touch); padding: var(--st-space-1) var(--st-space-1) var(--st-space-1) var(--st-space-5);
  background: var(--st-color-surface); border-radius: var(--st-radius-pill);
  flex: 1 1 auto; max-width: 560px; min-width: 0;
}
.st-hsearch input {
  flex: 1 1 auto; min-width: 0; height: 100%; border: 0; background: transparent;
  font: inherit; font-size: var(--st-text-5); color: var(--st-color-text); outline: none;
}
.st-hsearch input::placeholder { color: var(--st-color-text-muted); opacity: 1; }
.st-hsearch button {
  flex: none; width: 36px; height: 36px; border: 0; border-radius: var(--st-radius-pill);
  background: var(--st-color-accent); color: var(--st-color-on-accent); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.st-hsearch button:hover { background: var(--st-color-accent-hover); }
@media (min-width: 960px) {
  .st-header__inner:has(.st-hsearch) { row-gap: 0; padding-bottom: 0; }
  .st-hsearch ~ .st-nav { order: 3; flex-basis: 100%; margin-top: var(--st-space-3); border-top: var(--st-line-width) solid color-mix(in srgb, var(--st-color-on-band) 18%, transparent); padding-block: var(--st-space-1); }
}

.st-menu-btn { display: none; }
/* Menu icon becomes a cross while the menu is open. */
.st-menu-btn .st-menu-btn__close, .st-menu-btn[aria-expanded="true"] .st-menu-btn__open { display: none; }
.st-menu-btn[aria-expanded="true"] .st-menu-btn__close { display: block; }

/* Below 960px (phones and tablets) the menu folds into a Menu button. Only when the
   menu script has run (.st-js); without it the menu just wraps. */
@media (max-width: 959px) {
  /* Logo and buttons share one row on phones. */
  .st-header__inner { column-gap: var(--st-space-3); flex-wrap: wrap; }
  .st-js .st-menu-btn { display: inline-flex; }
  .st-js .st-nav { order: 3; flex-basis: 100%; }
  .st-js .st-nav:not(.is-open) { display: none; }
  .st-js .st-nav ul { flex-direction: column; gap: 0; padding-bottom: var(--st-space-2); }
  .st-js .st-nav a { display: block; padding-block: var(--st-space-3); }
  /* The search bar gets its own full-width row under the logo row. */
  .st-hsearch { order: 2; flex: 1 1 100%; max-width: none; height: var(--st-control-height); }
  .st-hsearch button { width: 40px; height: 40px; }
}

.st-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--st-space-6); padding-block: var(--st-space-8); font-size: var(--st-text-small); }
.st-footer .st-logo { font-size: var(--st-text-9); }
.st-footer__tagline { opacity: 0.85; margin-top: var(--st-space-2); }
.st-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--st-space-2) var(--st-space-6); }
.st-footer a { color: var(--st-color-on-band); }
.st-footer__legal { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--st-space-2) var(--st-space-6); opacity: 0.8; font-size: var(--st-text-caption); }

.st-breadcrumb, .st-card__line, .st-steps__note { font-size: var(--st-text-small); color: var(--st-color-text-muted); }
.st-breadcrumb ol, .st-tabs ul, .st-social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--st-space-2); }
.st-breadcrumb li:not(:last-child)::after { content: "/"; margin-left: var(--st-space-2); }
.st-breadcrumb a { color: var(--st-color-text-muted); }

/* ---------- 6–7. Buttons and forms ----------
   Buttons, fields, field messages, .st-actions and .st-errors are in
   controls.css (shared with apps). Website-only form parts below. */

.st-form { display: flex; flex-direction: column; gap: var(--st-space-6); }
.st-panel { background: var(--st-color-surface); border: var(--st-line-width) solid var(--st-color-line); border-radius: var(--st-radius-card); padding: var(--st-space-7); }
.st-fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--st-space-5); }
.st-fieldset legend { padding: 0; margin-bottom: var(--st-space-4); font-family: var(--st-font-display); font-size: var(--st-text-10); font-weight: var(--st-weight-heading); }
.st-tip { border: var(--st-line-width) solid var(--st-color-accent); background: var(--st-color-featured); border-radius: var(--st-radius-control); padding: var(--st-space-3) var(--st-space-4); font-size: var(--st-text-small); margin: 0; }
.st-tip a { font-weight: var(--st-weight-strong); }
.st-tip[hidden] { display: none; }
/* Words only needed when the page's script isn't running. */
.st-js .st-nojs-only { display: none; }
/* Spam trap on visitor forms: off screen, never seen or tabbed to by people. */
.st-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* What replaces a one-shot form once it's sent. */
.st-success { background: var(--st-color-surface); border: var(--st-line-width) solid var(--st-color-line); border-radius: var(--st-radius-card); padding: var(--st-space-8); display: flex; flex-direction: column; gap: var(--st-space-3); }
.st-success h2, .st-success h3 { font-size: var(--st-text-box-title); }

/* ---------- 8. Callout ---------- */

.st-callout { background: var(--st-color-sunk); border-radius: var(--st-radius-big); padding: var(--st-space-8); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--st-space-6); }
.st-callout__text { flex: 1 1 480px; display: flex; flex-direction: column; gap: var(--st-space-3); }
.st-callout h2 { font-size: var(--st-text-12); }

/* =====================================================================
 * Part 2 of 4: cards and listing parts.
 * One link per card (its title). That link stretches over the whole
 * card, so the card is clickable without repeating the link for
 * screen readers.
 * ===================================================================== */

/* ---------- 9. Icons and photo boxes ---------- */

.st-icon { flex: none; display: inline-block; vertical-align: -2px; }

.st-photo { position: relative; overflow: hidden; background: var(--st-color-placeholder); color: var(--st-color-on-placeholder); }
.st-photo--4x3  { aspect-ratio: 4 / 3; }
.st-photo--16x9 { aspect-ratio: 16 / 9; }
.st-photo--21x9 { aspect-ratio: 21 / 9; }
.st-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.st-photo--empty { display: flex; align-items: center; justify-content: center; }

/* ---------- 10. Card basics ---------- */

.st-card { position: relative; background: var(--st-color-surface); border: var(--st-line-width) solid var(--st-color-line); border-radius: var(--st-radius-card); overflow: hidden; display: flex; flex-direction: column; }
.st-card:hover, .st-card:focus-within { border-color: var(--st-color-accent); }
.st-card__body { padding: var(--st-space-5) var(--st-space-5) var(--st-space-6); display: flex; flex-direction: column; gap: var(--st-space-2); flex: 1; }
.st-card__title { font-family: var(--st-font-display); font-size: var(--st-text-card-title); font-weight: var(--st-weight-heading); line-height: var(--st-leading-tight); margin: 0; }
.st-card__title--lg { font-size: var(--st-text-11); }
.st-card__title a { color: var(--st-color-text); }

/* The title link covers the whole card. */
.st-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.st-card__link:focus-visible { outline: none; }
.st-card__link:hover { text-decoration: none; }

/* Area and opening hours under a card. They follow the title with the card's
   normal gap; only the contact buttons (.st-card__contact) or a card's own
   link (.st-card__cta) are pushed to the bottom, so text starts at the top and
   buttons line up across a row (owner rule 2026-11-18). */
.st-meta { list-style: none; margin: 0; padding: var(--st-space-1) 0 0; display: flex; flex-wrap: wrap; gap: var(--st-space-1) var(--st-space-4); font-size: var(--st-text-small); color: var(--st-color-text-muted); }
.st-meta li { display: flex; align-items: center; gap: var(--st-space-2); }
.st-meta:not(:has(li)) { display: none; } /* hide an empty line */

/* ---------- 11. Card types ---------- */


/* Section card (home). */
.st-card--section { padding: var(--st-space-6); gap: var(--st-space-2); }
.st-card__cta { margin-top: auto; padding-top: var(--st-space-2); color: var(--st-color-accent); font-weight: var(--st-weight-strong); font-size: var(--st-text-small); display: flex; align-items: center; gap: var(--st-space-2); }


/* Article card: no border, photo rounded on its own. */
.st-card--article { background: transparent; border: 0; border-radius: 0; overflow: visible; gap: var(--st-space-3); }
.st-card--article .st-photo { border-radius: var(--st-radius-card); }
.st-card--article:hover .st-card__title a { color: var(--st-color-accent); }
.st-card--article .st-card__title { line-height: 1.25; }

/* Search result row. */
.st-card--result { flex-direction: row; align-items: center; gap: var(--st-space-5); padding: var(--st-space-4); }
.st-card__photo { flex: none; width: 120px; }
.st-card__photo .st-photo { border-radius: var(--st-radius-control); }
.st-card--result .st-card__body { padding: 0; gap: var(--st-space-1); min-width: 0; }
.st-card--result .st-card__title { font-size: var(--st-text-9); line-height: 1.25; }
@media (max-width: 480px) { .st-card__photo { width: 88px; } }


/* ---------- 12. Card grids ---------- */

.st-grid--sections { --st-grid-min: 240px; grid-template-columns: repeat(auto-fit, minmax(var(--st-grid-min), 1fr)); }
.st-grid--articles { --st-grid-min: 300px; }
/* Lists used as grids: no bullets. :where() keeps this weak so spacing classes win. */
:where(ul.st-grid, ol.st-grid, ul.st-list, ol.st-list) { list-style: none; margin: 0; padding: 0; }
.st-grid > li, .st-list > li { display: flex; flex-direction: column; }
.st-grid > li > .st-card, .st-list > li > .st-card { flex: 1; }

/* =====================================================================
 * Part 3 of 4: chips, filter bar, tabs, pagination.
 * All plain links and a GET form: they work without JavaScript, and every
 * filtered view has its own address.
 * ===================================================================== */

/* ---------- 13. Chips ---------- */

.st-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--st-space-3); }
.st-chip {
  display: inline-flex; align-items: center; gap: var(--st-space-2); border-radius: var(--st-radius-pill);
  font-size: var(--st-text-small); font-weight: var(--st-weight-strong); color: var(--st-color-text); text-decoration: none;
}
.st-chip:hover { text-decoration: none; color: var(--st-color-text); }
.st-chip--tag { min-height: var(--st-control-height-sm); padding: 0 var(--st-space-4); background: var(--st-color-sunk); }
.st-chip--tag:hover { background: color-mix(in srgb, var(--st-color-sunk) 80%, var(--st-color-accent)); }
.st-chip--plain:hover { background: var(--st-color-sunk); } /* not a link */
.st-chip--outline { min-height: var(--st-touch); padding: 0 var(--st-space-5); border: var(--st-line-width) solid var(--st-color-line); background: var(--st-color-surface); font-weight: 500; }
.st-chip--outline:hover { border-color: var(--st-color-accent); }
.st-chip__count { color: var(--st-color-text-muted); font-weight: 500; }
.st-chip--remove { min-height: var(--st-control-height-sm); padding: 0 var(--st-space-3) 0 var(--st-space-4); background: var(--st-color-sunk); font-weight: 500; }
.st-chip--remove:hover { background: color-mix(in srgb, var(--st-color-sunk) 80%, var(--st-color-accent)); }

/* ---------- 15. Tabs ---------- */

.st-tab {
  display: inline-flex; align-items: center; gap: var(--st-space-2); min-height: var(--st-touch); padding: 0 var(--st-space-4);
  border-radius: var(--st-radius-pill); border: var(--st-line-width) solid var(--st-color-line); background: var(--st-color-surface);
  color: var(--st-color-text); font-size: var(--st-text-small); font-weight: var(--st-weight-strong); text-decoration: none;
}
.st-tab:hover, .st-pager-link:hover { border-color: var(--st-color-accent); color: var(--st-color-text); text-decoration: none; }
.st-tab[aria-current="page"], .st-pager-link[aria-current="page"] { background: var(--st-color-accent); border-color: var(--st-color-accent); color: var(--st-color-on-accent); }
.st-tab__count { font-weight: 500; opacity: 0.85; }

/* ---------- 16. Pagination ---------- */

.st-pagination ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--st-space-2); }
.st-pager-link {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--st-space-2);
  min-width: var(--st-touch); height: var(--st-touch); padding: 0 var(--st-space-2); border-radius: var(--st-radius-control);
  border: var(--st-line-width) solid var(--st-color-line); background: var(--st-color-surface); color: var(--st-color-text); font-weight: var(--st-weight-strong); text-decoration: none;
}
.st-pager-link--wide { padding: 0 var(--st-space-4); }
.st-pager-link--gap { border-color: transparent; background: transparent; min-width: 24px; color: var(--st-color-text-muted); }
.st-pagination__where { display: none; }
/* Small phones: Previous, "Page 5 of 12", Next on one line. Arrows only;
   their labels still say "Previous page" and "Next page". */
@media (max-width: 480px) {
  .st-pagination__num { display: none; }
  .st-pagination__where { display: flex; align-items: center; padding: 0 var(--st-space-3); font-weight: var(--st-weight-strong); }
  .st-pager-link--wide { padding: 0; width: var(--st-touch); }
  .st-pager-link__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* =====================================================================
 * Part 4 of 4: page parts.
 * (d1) page tops and bands: hero, search box, page heads, wide photo,
 * "nothing found" box. (d2) listing page and forms follow.
 * ===================================================================== */

/* ---------- 17. Hero (home page top) ---------- */

.st-hero { background: var(--st-color-band); color: var(--st-color-on-band); padding-block: var(--st-section-space); }
.st-hero .st-eyebrow { color: var(--st-color-band-accent); }
.st-hero__title { font-size: var(--st-text-hero); line-height: 1.05; letter-spacing: var(--st-tracking-title); max-width: 820px; color: var(--st-color-on-band); }
.st-hero__lead { font-size: var(--st-text-lead); max-width: 620px; }
.st-hero .st-search { margin-top: var(--st-space-3); max-width: 860px; }

/* ---------- 18. Search box ---------- */

.st-search { background: var(--st-color-surface); border-radius: var(--st-radius-card); padding: var(--st-space-2); display: flex; flex-wrap: wrap; gap: var(--st-space-2); }
.st-search--outlined { border: var(--st-line-width) solid var(--st-color-line); }
.st-search__q, .st-search__area { min-height: var(--st-control-height-lg); font: inherit; color: var(--st-color-text); }
.st-search__q { flex: 2 1 260px; border: 0; background: transparent; padding: 0 var(--st-space-4); min-width: 0; }
.st-search__area { flex: 1 1 200px; border: var(--st-line-width) solid var(--st-color-line); border-radius: var(--st-radius-control); background: var(--st-color-surface); padding: 0 var(--st-space-4); }
.st-search .st-btn { flex: 0 0 auto; min-height: var(--st-control-height-lg); padding: 0 var(--st-space-7); }
/* Phones: each part gets the full width, the button too. */
@media (max-width: 600px) {
  .st-search > input, .st-search > select, .st-search > .st-btn { flex-basis: 100%; }
}

/* ---------- 19. Page heads ---------- */

/* Always the page-title size, whatever the heading level. */
.st-head__meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--st-space-2) var(--st-space-4); font-size: var(--st-text-small); color: var(--st-color-text-muted); }
.st-head .st-chips { margin-top: var(--st-space-1); }
.st-head--article { max-width: var(--st-measure); margin-inline: auto; }
/* Breadcrumb close to the title (or the eyebrow over it): the head's 16px
   gap pulled up to --st-crumb-space (8px). Anything else between them, such
   as an ad, keeps the normal gap. */
.st-head > .st-breadcrumb + :is(.st-head__title, .st-eyebrow) { margin-top: calc(var(--st-crumb-space) - var(--st-space-4)); }

/* ---------- 20. Wide photo with caption (article top) ---------- */

.st-figure { margin: 0 auto; width: 100%; max-width: 1100px; }
.st-figure .st-photo { border-radius: var(--st-radius-big); }
.st-figure figcaption { max-width: var(--st-measure); margin: var(--st-space-3) auto 0; font-size: var(--st-text-caption); color: var(--st-color-text-muted); }

/* An article page: head, wide photo, then the text in a centered reading column. */
.st-article > * + * { margin-top: var(--st-space-7); }
.st-article > .st-reading { margin-inline: auto; margin-top: var(--st-space-8); }
/* Sections after an article: reading-width ones line up with the text; wide ones (bands, card grids) stay wide. */

/* ---------- 21. Nothing found ---------- */

.st-empty { background: var(--st-color-surface); border: var(--st-line-width) solid var(--st-color-line); border-radius: var(--st-radius-card); padding: var(--st-space-7); display: flex; flex-direction: column; gap: var(--st-space-4); }
.st-empty h2, .st-empty h3 { font-size: var(--st-text-box-title); }
.st-empty__foot { margin-top: var(--st-space-2); padding-top: var(--st-space-4); border-top: var(--st-line-width) solid var(--st-color-line); color: var(--st-color-text-muted); }
.st-empty__foot a { font-weight: var(--st-weight-strong); }

/* Style guide only: full-width parts shown inside the page column. */
.st-demo { border-radius: var(--st-radius-big); overflow: hidden; }

/* ---------- 23. Forms that check as you go ---------- */

.st-form--compact { padding: var(--st-space-6); gap: var(--st-space-5); }
.st-field-row > .st-field--small { flex: 0 1 140px; }
.st-field input[type="file"] { padding: var(--st-space-3) var(--st-space-4); max-width: 100%; }
/* Fieldsets grow to fit their widest content by default; keep them in the column. */
.st-fieldset, .st-choices { min-width: 0; }
.st-field input[type="file"]::file-selector-button {
  margin-right: var(--st-space-3); padding: var(--st-space-2) var(--st-space-4); border: var(--st-line-width) solid var(--st-color-line); border-radius: var(--st-radius-pill);
  background: var(--st-color-sunk); color: var(--st-color-text); font: inherit; font-weight: var(--st-weight-strong); cursor: pointer;
}
.st-field select:disabled { opacity: 0.6; cursor: not-allowed; }
.st-choices { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--st-space-1); }
.st-fieldset .st-choices legend, .st-fieldset .st-hours legend { padding: 0; margin-bottom: var(--st-space-2); font-family: var(--st-font-body); font-size: var(--st-text-small); font-weight: var(--st-weight-strong); }
.st-field input, .st-field select { min-width: 0; }
.st-success__title { font-family: var(--st-font-display); font-size: var(--st-text-box-title); font-weight: var(--st-weight-heading); line-height: var(--st-leading-tight); }
.st-success:focus:not(:focus-visible) { outline: none; }

/* What happens after a form is sent. */
/* A note above a form (e.g. "A note from us" on a private edit link). */
.st-note { background: var(--st-color-sunk); border-left: 4px solid var(--st-color-accent); border-radius: var(--st-radius-card); padding: var(--st-space-6); margin-bottom: var(--st-space-6); display: flex; flex-direction: column; gap: var(--st-space-2); }
.st-note p { margin: 0; }
.st-note__title { font-weight: var(--st-weight-strong); }
.st-steps { background: var(--st-color-sunk); border-radius: var(--st-radius-card); padding: var(--st-space-6); display: flex; flex-direction: column; gap: var(--st-space-3); }
.st-steps__title { font-weight: var(--st-weight-strong); }
.st-steps ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: var(--st-space-2); }

/* ---------- 24. Page sections (templates/<theme>/section-*.php) ---------- */

/* Text with photo: side by side, the photo drops under the text on narrow screens. */
.st-split { display: flex; flex-wrap: wrap; align-items: center; gap: var(--st-space-7) var(--st-space-9); }
.st-split__text { flex: 1 1 420px; max-width: var(--st-measure-reading); }
.st-split__media { flex: 1 1 360px; }
.st-split__media .st-photo { border-radius: var(--st-radius-card); }
.st-split--left .st-split__media { order: -1; }
.st-split--solo .st-split__text { flex-basis: 100%; }

/* Questions and answers: each question opens to show its answer. */
.st-faq__list { border-top: var(--st-line-width) solid var(--st-color-line); }
.st-faq__item { border-bottom: var(--st-line-width) solid var(--st-color-line); }
.st-faq__item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--st-space-4); min-height: var(--st-control-height); padding-block: var(--st-space-4); font-weight: var(--st-weight-strong); font-size: var(--st-text-7); }
.st-faq__item summary::-webkit-details-marker { display: none; }
.st-faq__item summary::after { content: "+"; flex: none; font-size: var(--st-text-10); line-height: 1; color: var(--st-color-accent); }
.st-faq__item[open] summary::after { content: "−"; }
.st-faq__item summary:hover { color: var(--st-color-accent); }
.st-faq__answer { padding-bottom: var(--st-space-5); font-size: var(--st-text-6); line-height: 1.6; }
/* A Hero further down a page sits inside the page column, with rounded corners. */
.st-page > .st-hero { border-radius: var(--st-radius-big); }
/* A saved section's preview in the admin: just the section, with the page's side and top spacing. */
body.st-preview { min-height: 0; }
.st-preview .st-page { padding-block: var(--st-space-7); }

/* ---------- 25. Back to top (footer.php button, stoei.js part 5) ---------- */

/* A round button in the bottom right corner. It shows once the visitor has
   scrolled down a screen and a half, and fades in. On phones it sits above the
   contact bar on listing pages, so Call, Website and Directions stay free. */
.st-totop {
  position: fixed; right: var(--st-gutter); bottom: var(--st-space-5); z-index: 40;
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--st-control-height); height: var(--st-control-height); padding: 0; border-radius: var(--st-radius-pill);
  background: var(--st-color-band); color: var(--st-color-on-band);
  border: var(--st-line-width) solid color-mix(in srgb, var(--st-color-on-band) 30%, transparent);
  cursor: pointer; opacity: 0; transform: translateY(8px); visibility: hidden; /* not clickable or reachable by Tab until shown */
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}
.st-totop.is-shown { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.st-totop:hover { background: color-mix(in srgb, var(--st-color-band) 85%, var(--st-color-on-band)); }
.st-totop[hidden] { display: none; }
@media (max-width: 720px) {
  .st-totop { right: var(--st-space-4); bottom: var(--st-space-4); width: var(--st-touch); height: var(--st-touch); }
}
@media (prefers-reduced-motion: reduce) { .st-totop { transition: none; transform: none; } }
@media print { .st-totop { display: none; } }

/* Photo boxes on visitor forms (Media step 4, approved mockup docs/mockups/media/form.html).
   Without JavaScript they are plain file boxes; stoei.js part 7 turns them into previews with ×. */
.st-fieldset__hint { margin-top: calc(var(--st-space-2) * -1); font-size: var(--st-text-small); color: var(--st-color-text-muted); }
.st-upload, .st-nl-extra { display: flex; flex-direction: column; gap: var(--st-space-3); }
.st-upload__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--st-space-3); grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.st-upload__list:empty { display: none; }
.st-upload__item { border: var(--st-line-width) solid var(--st-color-line); border-radius: var(--st-radius-control); overflow: hidden; background: var(--st-color-surface); display: flex; flex-direction: column; min-width: 0; }
.st-upload__item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--st-color-placeholder); }
.st-upload__item--logo { max-width: 200px; }
.st-upload__item--logo img { aspect-ratio: 1 / 1; object-fit: contain; padding: var(--st-space-2); background: var(--st-color-sunk); }
.st-upload__item.is-removed img { opacity: 0.35; }
.st-upload__info { padding: var(--st-space-2) var(--st-space-3); display: flex; align-items: center; gap: var(--st-space-2); font-size: var(--st-text-caption); min-height: var(--st-control-height-lg); }
.st-upload__info span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--st-color-text-muted); }
.st-upload__info:has(.st-choice:not([hidden])) { flex-wrap: wrap; }
.st-upload__info:has(.st-choice:not([hidden])) span { flex-basis: 100%; }
.st-upload__info .st-choice { min-height: var(--st-control-height-sm); gap: var(--st-space-2); font-weight: 400; }
.st-upload__info .st-choice input { width: 18px; height: 18px; }
.st-upload__remove { flex: none; min-width: 36px; min-height: var(--st-control-height-sm); border-radius: var(--st-radius-pill); border: var(--st-line-width) solid var(--st-color-line); background: var(--st-color-surface); color: var(--st-color-text); font: inherit; font-size: var(--st-text-7); line-height: 1; cursor: pointer; }
.st-upload__remove:hover { border-color: var(--st-color-accent); }
.st-upload__add { border: 2px dashed var(--st-color-line); border-radius: var(--st-radius-control); background: var(--st-color-sunk); color: var(--st-color-text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--st-space-1); min-height: 120px; padding: var(--st-space-3); text-align: center; font-weight: var(--st-weight-strong); font-size: var(--st-text-small); cursor: pointer; }
.st-upload__add:hover { border-color: var(--st-color-accent); }
.st-upload__add svg { color: var(--st-color-accent); }
.st-upload__add small { font-weight: 400; color: var(--st-color-text-muted); font-size: var(--st-text-caption); }
.st-upload__add[hidden], .st-upload [hidden] { display: none; }
.st-fieldset legend .st-field__optional { font-family: var(--st-font-body); font-size: var(--st-text-small); }

/* "More details": fields made in the admin, label and value (fields_details()). One column on phones. */
.st-details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--st-space-2) var(--st-space-6); margin: 0; font-size: var(--st-text-small); border: var(--st-line-width) solid var(--st-color-line); border-radius: var(--st-radius-card); background: var(--st-color-surface); padding: var(--st-space-4); max-width: 62ch; }
.st-details dt { color: var(--st-color-text-muted); }
.st-details dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) { .st-details { grid-template-columns: minmax(0, 1fr); gap: 2px; } .st-details dd + dt { margin-top: var(--st-space-2); } }

/* ---------- 26. Sign-up box and "All" tick lists (Stoei Newsletter, approved mockup
   louisville-finds docs/mockups/email-updates/, 16 Nov 2026; stoei.js part 8) ---------- */
.st-signup__row { display: flex; flex-wrap: wrap; gap: var(--st-space-3); align-items: flex-end; }
.st-signup__row .st-field { flex: 1 1 260px; min-width: 0; }
.st-signup__title { font-family: var(--st-font-display); font-size: var(--st-text-10); font-weight: var(--st-weight-heading); margin: 0; line-height: var(--st-leading-tight); }
.st-signup .st-choice, .st-topics .st-choice { align-items: flex-start; }
.st-signup .st-choice input, .st-topics .st-choice input, .st-nl-extra > .st-choice input, .st-works-at__line .st-icon { margin-top: 2px; flex: none; } /* a long label mustn't squeeze the box */
.st-signup > p, .st-signup .st-form > p { margin: 0; }
.st-topics { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-topics legend { font-weight: var(--st-weight-strong); margin-bottom: var(--st-space-2); padding: 0; }
.st-topics__all { padding-bottom: var(--st-space-2); margin-bottom: var(--st-space-1); border-bottom: var(--st-line-width) solid var(--st-color-line); }
.st-topics__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 var(--st-space-4); }
.st-topics .st-choice:has(input:disabled) { color: var(--st-color-text-muted); }
.st-topics .st-choice input:disabled { opacity: 0.55; }
.st-topics__hint { margin: var(--st-space-1) 0 0; }
.st-topics .st-field__msg { margin-top: var(--st-space-1); }
.st-nl-extra > .st-choice { align-items: flex-start; }
.st-nl-extra [hidden] { display: none; }
.st-nl-extra > div, .st-location { display: flex; flex-direction: column; gap: var(--st-space-2); }
.st-nl-extra p { margin: 0; }

/* Photo lightbox (Core 0.14.0). A photo grid's links ([data-lightbox] > a) open the
   photo big in a <dialog> made by the site's script; without the script each link
   simply opens the full-size photo. Follows the theme: a pale stage in light, a dark
   one in dark. No headings inside. */
.st-photo-link { display: block; border-radius: var(--st-radius-card); cursor: zoom-in; }
.st-photo-link .st-photo { border-radius: inherit; }
.st-photo-link img { transition: opacity 0.15s; }
.st-photo-link:hover img { opacity: 0.88; }
.st-lightbox {
  --st-lightbox-stage: light-dark(#F6F6F3, #0E0E0E);
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: var(--st-lightbox-stage); color: var(--st-color-text);
  overscroll-behavior: contain;
}
.st-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; }
.st-lightbox::backdrop { background: var(--st-color-backdrop); }
.st-lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--st-space-3); padding: var(--st-space-3) var(--st-space-4); }
.st-lightbox__count { margin: 0; font-size: var(--st-text-small); font-variant-numeric: tabular-nums; color: var(--st-color-text-muted); padding-inline: var(--st-space-2); }
.st-lightbox__stage { position: relative; margin: 0; min-height: 0; display: grid; place-items: center; padding: 0 var(--st-space-4); touch-action: pan-y pinch-zoom; }
.st-lightbox__img { display: block; max-width: 100%; max-height: calc(100dvh - var(--st-lightbox-room, 200px)); width: auto; height: auto; object-fit: contain; border-radius: var(--st-radius-2); user-select: none; -webkit-user-drag: none; }
.st-lightbox__img[data-loading] { opacity: 0; }
.st-lightbox__caption { margin: 0 auto; max-width: 70ch; padding: var(--st-space-3) var(--st-space-4) 0; text-align: center; font-size: var(--st-text-small); color: var(--st-color-text); }
.st-lightbox__caption:empty { display: none; }
.st-lightbox__nav { display: flex; justify-content: center; gap: var(--st-space-3); padding: var(--st-space-3) var(--st-space-4) var(--st-space-4); }
.st-lightbox__btn {
  display: inline-flex; align-items: center; justify-content: center; width: var(--st-control-height); height: var(--st-control-height); padding: 0;
  border: var(--st-line-width) solid var(--st-color-line-strong); border-radius: var(--st-radius-full);
  background: var(--st-color-surface); color: var(--st-color-text); cursor: pointer;
}
.st-lightbox__btn:hover { border-color: var(--st-color-text); }
.st-lightbox__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-lightbox--one .st-lightbox__nav, .st-lightbox--one .st-lightbox__count { visibility: hidden; }
/* Wider screens: Previous and Next sit at the sides of the photo. */
@media (min-width: 720px) {
  .st-lightbox { --st-lightbox-room: 150px; }
  .st-lightbox__stage { padding: 0 calc(var(--st-control-height) + var(--st-space-4) * 2); }
  .st-lightbox__nav { padding: 0; display: contents; }
  .st-lightbox__prev, .st-lightbox__next { position: fixed; top: 50%; translate: 0 -50%; }
  .st-lightbox__prev { left: var(--st-space-4); }
  .st-lightbox__next { right: var(--st-space-4); }
  .st-lightbox[open] { grid-template-rows: auto minmax(0, 1fr) auto; padding-bottom: var(--st-space-5); }
}
@keyframes st-lightbox-in { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .st-lightbox[open] { animation: st-lightbox-in 0.18s ease-out; }
  .st-lightbox__img { transition: opacity 0.18s; }
}
