/* CleanSites public stylesheet. Mobile-first, no build step.
   Per-district colors and fonts arrive as CSS custom properties set inline by the layout shell. */

:root {
  --color-primary: #9b1c1c;
  --color-on-primary: #ffffff;
  --color-accent: #f2b705;
  --color-on-accent: #111111;
  --color-dark: #1b2a41;
  --color-on-dark: #ffffff;
  --color-link: #9b1c1c;
  --font-heading: system-ui, sans-serif;
  --font-body: system-ui, sans-serif;
  --color-text: #1f2328;
  --color-muted: #4a4f57;
  --color-bg: #ffffff;
  --color-tint: #f4f1ea;
  --color-border: #c9c4b8;
  --color-error: #a11212;
  --focus: #0b4fd8;
  --radius: 6px;
  --wrap: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; color: var(--color-dark); margin: 0 0 0.5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin-top: 1.75em; }
h3 { font-size: 1.2rem; margin-top: 1.25em; }
p, ul, ol, dl, address { margin: 0 0 1em; }
address { font-style: normal; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main:focus { outline: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
.wrap-wide { max-width: 100rem; }
.page { padding-top: 1.5rem; padding-bottom: 3rem; }
.lead { font-size: 1.2rem; color: var(--color-text); max-width: 46rem; }
.meta { display: block; color: var(--color-muted); font-size: 0.95rem; }
h2 .meta { display: inline; font-weight: normal; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.plain-list, .inline-list, .item-list, .event-list, .card-grid, .people-grid, .doc-list, .quick-links, .photo-grid, .layout-grid { list-style: none; padding: 0; }
.inline-list { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.prose { max-width: 46rem; }
.prose img { margin: 1rem 0; border-radius: var(--radius); }
.prose table { border-collapse: collapse; width: 100%; margin-bottom: 1em; }
.prose th, .prose td { border: 1px solid var(--color-border); padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; }
.prose th { background: var(--color-tint); }

.skip-link { position: absolute; left: 0.5rem; top: -4rem; background: #ffffff; color: #111111; padding: 0.6rem 1rem; z-index: 100; border-radius: var(--radius); }
.skip-link:focus { top: 0.5rem; }

/* Alerts */
.alert { padding: 0.6rem 0; }
.alert p { margin: 0; }
.alert a { color: inherit; font-weight: 600; }
.alert-emergency { background: #8a1010; color: #ffffff; --focus: #ffffff; }
.alert-warning { background: #ffe9a8; color: #2e2300; --focus: #2e2300; }
.alert-info { background: #dcebfa; color: #0b2e59; --focus: #0b2e59; }

/* Header */
.site-header { --focus: #ffffff; }
.utility-bar { background: var(--color-primary); color: var(--color-on-primary); font-size: 0.95rem; }
.utility-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1.5rem; padding-top: 0.4rem; padding-bottom: 0.4rem; }
.utility-inner p { margin: 0; }
.utility-bar a { color: inherit; font-weight: 600; }
.masthead { background: var(--color-dark); color: var(--color-on-dark); }
.masthead-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; color: inherit; text-decoration: none; }
.brand:hover .brand-name { text-decoration: underline; }
.crest { width: 3.25rem; height: 3.25rem; flex: none; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700; line-height: 1.15; }
.brand-tagline { font-size: 0.95rem; }
.masthead-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.emergency-note { margin: 0; font-size: 0.95rem; line-height: 1.35; }
.emergency-note a { color: inherit; }

.site-nav { background: var(--color-dark); color: var(--color-on-dark); border-top: 1px solid rgba(255, 255, 255, 0.35); }
.site-nav ul { list-style: none; margin: 0; padding: 0.25rem 0; display: flex; flex-wrap: wrap; gap: 0 0.25rem; }
.site-nav a { display: block; padding: 0.6rem 0.7rem; color: inherit; text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--color-accent); }
.nav-toggle { display: none; margin: 0.5rem 0; padding: 0.5rem 1rem; font: inherit; font-weight: 600; color: var(--color-on-dark); background: transparent; border: 2px solid var(--color-on-dark); border-radius: var(--radius); cursor: pointer; }
@media (max-width: 47.99rem) {
  .js-nav .nav-toggle { display: inline-block; }
  .js-nav .site-nav ul { display: none; flex-direction: column; }
  .js-nav .site-nav ul.is-open { display: flex; }
}

/* Buttons */
.button { display: inline-block; padding: 0.7rem 1.3rem; font: inherit; font-weight: 700; color: var(--color-on-primary); background: var(--color-primary); border: 2px solid transparent; border-radius: var(--radius); text-decoration: none; cursor: pointer; }
.button:hover { text-decoration: underline; }
.button-accent { color: var(--color-on-accent); background: var(--color-accent); }
.button-outline { color: var(--color-link); background: #ffffff; border-color: currentColor; }
.button-large { font-size: 1.2rem; padding: 0.9rem 1.6rem; }

/* Home */
.home-banner { background: var(--color-tint); border-bottom: 1px solid var(--color-border); padding: 1.75rem 0 1.25rem; }
.home-banner h1 { margin-bottom: 0.25em; }
.two-col { display: grid; gap: 1.5rem; margin-bottom: 1rem; }
@media (min-width: 52rem) {
  .two-col { grid-template-columns: 3fr 2fr; }
  .two-col-wide { grid-template-columns: 1fr 1fr; }
}
.panel { background: var(--color-tint); border: 1px solid var(--color-border); border-top: 5px solid var(--color-primary); border-radius: var(--radius); padding: 1.25rem; }
.panel > h2:first-child { margin-top: 0; }
.panel-form { background: #ffffff; }
.tag { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--color-on-dark); background: var(--color-dark); padding: 0.1rem 0.5rem; border-radius: 3px; }
.item-list li, .doc-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--color-border); }
.item-list li:last-child, .doc-list li:last-child { border-bottom: 0; }
.item-title { display: block; font-weight: 700; font-size: 1.1rem; margin: 0.2rem 0; }
.more { font-weight: 700; }
.filetype { font-weight: normal; }

.event-list li { display: flex; gap: 0.9rem; padding: 0.7rem 0; border-bottom: 1px solid var(--color-border); }
.event-list li:last-child { border-bottom: 0; }
.date-badge { flex: none; width: 3.4rem; text-align: center; background: var(--color-dark); color: var(--color-on-dark); border-radius: var(--radius); padding: 0.3rem 0; line-height: 1.15; align-self: flex-start; }
.date-badge span { display: block; }
.date-badge span:first-child { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.date-badge span:last-child { font-size: 1.4rem; font-weight: 700; }
.event-body { min-width: 0; }

.card-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.card { background: #ffffff; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { padding: 1rem; }
.card-body h3 { margin-top: 0; }
.card-body p:last-child { margin-bottom: 0; }

.quick-links { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.quick-links a { display: block; padding: 0.9rem 1rem; font-weight: 700; background: var(--color-tint); border: 1px solid var(--color-border); border-left: 5px solid var(--color-primary); border-radius: var(--radius); }

/* Hero */
.hero { position: relative; background: var(--color-dark); }
.hero-image { width: 100%; height: 16rem; object-fit: cover; }
.hero-box { background: var(--color-dark); color: var(--color-on-dark); padding: 1.5rem 1.25rem; --focus: #ffffff; }
.hero-box h1 { color: inherit; font-size: 2.1rem; }
.hero-box .lead { color: inherit; }
.hero-box p:last-child { margin-bottom: 0; }
.hero-inner { padding: 0; }
@media (min-width: 52rem) {
  .hero-image { height: 30rem; }
  .hero-join .hero-image { height: 22rem; }
  .hero-inner { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 0 1rem 2rem; left: 0; right: 0; }
  .hero-box { max-width: 36rem; border-radius: var(--radius); border-left: 6px solid var(--color-accent); padding: 1.75rem 2rem; }
  .hero-box h1 { font-size: 2.6rem; }
}

/* Breadcrumb */
.breadcrumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; font-size: 0.95rem; margin-bottom: 1.25rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; color: var(--color-muted); }

/* People */
.people-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.person { display: flex; gap: 1rem; }
.person h3 { margin: 0 0 0.15em; }
.person-title { font-weight: 600; margin-bottom: 0.25em; }
.person p { margin-bottom: 0.4em; }
.avatar { flex: none; width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; }
.avatar-initials { display: flex; align-items: center; justify-content: center; background: var(--color-dark); color: var(--color-on-dark); font-weight: 700; font-size: 1.3rem; font-family: var(--font-heading); }

/* Facts, callouts */
.facts { display: grid; gap: 0.5rem; }
.facts div { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; }
.facts dt { font-weight: 700; min-width: 9rem; }
.facts dd { margin: 0; }
.callout { background: var(--color-tint); border-left: 5px solid var(--color-dark); padding: 0.9rem 1rem; border-radius: var(--radius); }
.callout-emergency { background: #fdecec; border-left-color: #8a1010; color: #3d0808; }
.callout-emergency a { color: inherit; }

/* Forms */
.form { max-width: 38rem; }
.form-note, .help { color: var(--color-muted); font-size: 0.95rem; margin-bottom: 0.4rem; }
.field { margin: 0 0 1.25rem; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: 0.3rem; padding: 0; }
.req { font-weight: normal; color: var(--color-muted); font-size: 0.9rem; }
.field input[type="text"], .field input[type="email"], .field input[type="number"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; font: inherit; color: var(--color-text); background: #ffffff; padding: 0.6rem 0.7rem; border: 2px solid #5c6068; border-radius: var(--radius);
}
.field label.choice { display: flex; align-items: flex-start; gap: 0.6rem; font-weight: normal; padding: 0.35rem 0; }
.choice input { width: 1.3rem; height: 1.3rem; margin: 0.2rem 0 0; flex: none; accent-color: var(--color-dark); }
.has-error input, .has-error textarea, .has-error select { border-color: var(--color-error); }
.error { color: var(--color-error); font-weight: 700; margin-bottom: 0.4rem; }
.error-summary { border: 3px solid var(--color-error); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.25rem; background: #fff6f6; }
.error-summary-title { color: var(--color-error); font-size: 1.15rem; margin-bottom: 0.5rem; }
.error-summary a { color: var(--color-error); }
.error-summary ul { margin-bottom: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Calendar */
.month-nav { display: flex; justify-content: space-between; gap: 1rem; font-weight: 700; }
.calendar-grid { display: none; }
@media (min-width: 52rem) {
  .calendar-grid { display: block; }
  .calendar-list { display: none; }
}
.calendar-grid table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.calendar-grid th { background: var(--color-dark); color: var(--color-on-dark); padding: 0.4rem; }
.calendar-grid abbr { text-decoration: none; }
.calendar-grid td { border: 1px solid var(--color-border); vertical-align: top; height: 6.5rem; padding: 0.35rem; font-size: 0.9rem; }
.calendar-grid td a { display: block; margin-top: 0.25rem; line-height: 1.25; overflow-wrap: anywhere; }
.day-number { font-weight: 700; }
.other-month { background: var(--color-tint); }
.other-month .day-number { color: var(--color-muted); font-weight: normal; }
.today { outline: 3px solid var(--color-primary); outline-offset: -3px; }

/* Photos */
.photo-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.photo-grid figure { margin: 0; }
.photo-grid img { border-radius: var(--radius); }
.photo-grid figcaption { font-size: 0.95rem; color: var(--color-muted); padding-top: 0.4rem; }

/* Footer */
.site-footer { background: var(--color-dark); color: var(--color-on-dark); --focus: #ffffff; margin-top: 2rem; }
.site-footer h2 { color: inherit; font-size: 1.1rem; margin-top: 0; }
.site-footer a:not(.button) { color: inherit; }
.footer-columns { display: grid; gap: 1.5rem; padding-top: 2rem; padding-bottom: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.site-footer li { padding: 0.2rem 0; }
.footer-cta { background: var(--color-primary); color: var(--color-on-primary); padding: 2rem 0; text-align: center; }
.footer-cta h2 { font-size: 1.6rem; }
.footer-cta p:last-child { margin-bottom: 0; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, 0.35); padding: 1rem 0; font-size: 0.95rem; }
.footer-legal p, .footer-legal ul { margin-bottom: 0.5rem; }

/* /layouts/ */
.layout-grid { display: grid; gap: 2rem; }
@media (min-width: 64rem) { .layout-grid { grid-template-columns: 1fr 1fr; } }
.frame-wrap { height: 34rem; overflow: hidden; border: 2px solid var(--color-dark); border-radius: var(--radius); background: #ffffff; margin-bottom: 1rem; }
/* Rendered at twice the width and scaled down, so each preview shows the desktop design. */
.layout-grid iframe { width: 200%; height: 68rem; border: 0; transform: scale(0.5); transform-origin: 0 0; }
.layout-grid h2 { margin-top: 0; }
.layout-grid summary { cursor: pointer; font-weight: 700; padding: 0.4rem 0; }

/* Layout: Hero & Recruit */
.layout-hero_recruit .masthead { border-bottom: 4px solid var(--color-accent); }
.layout-hero_recruit .site-nav { background: #ffffff; color: var(--color-dark); border-top: 0; border-bottom: 1px solid var(--color-border); --focus: #0b4fd8; }
.layout-hero_recruit .site-nav a[aria-current="page"] { border-bottom-color: var(--color-primary); }
.layout-hero_recruit .nav-toggle { color: var(--color-dark); border-color: var(--color-dark); }
.layout-hero_recruit .card { border: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.layout-hero_recruit .panel { border-top-color: var(--color-dark); }

/* Style variant: Heritage (crest, serif headings, archival feel) */
.style-heritage { --font-heading: Georgia, "Times New Roman", Times, serif; --color-bg: #fbf7ee; --color-tint: #f1eadb; }
.style-heritage .crest { width: 4.75rem; height: 4.75rem; }
.style-heritage .brand-name { font-size: 1.6rem; letter-spacing: 0.02em; font-variant: small-caps; }
.style-heritage .masthead { border-bottom: 6px double var(--color-accent); }
.style-heritage h1 { border-bottom: 3px double var(--color-border); padding-bottom: 0.3em; }
.style-heritage .hero-box h1 { border-bottom: 0; padding-bottom: 0; }
.style-heritage .card, .style-heritage .panel, .style-heritage .quick-links a { border-radius: 0; }
.style-heritage .card img, .style-heritage .photo-grid img, .style-heritage .hero-image, .style-heritage .prose img { filter: sepia(0.55) contrast(0.95); }
.style-heritage .card, .style-heritage .panel-form { background: #fffdf7; }

@media print {
  .site-nav, .skip-link, .footer-cta, .alerts, .nav-toggle { display: none; }
  .masthead, .site-footer, .utility-bar { background: none; color: #000000; }
}

/* Preview ribbon (preview hosts only). Fixed colors: 9.7:1 text on background. */
.preview-ribbon { background: #3b1e00; color: #ffffff; padding: 0.5rem 0; --focus: #ffffff; border-bottom: 3px solid #f2b705; }
.preview-ribbon-inner { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; }
.preview-ribbon p { margin: 0; }
.preview-ribbon strong { text-transform: uppercase; letter-spacing: 0.05em; margin-right: 0.5rem; }
.preview-ribbon-button { display: inline-block; padding: 0.45rem 1rem; font-weight: 700; color: #1f1300; background: #f2b705; border: 2px solid #f2b705; border-radius: var(--radius); text-decoration: none; }
.preview-ribbon-button:hover { text-decoration: underline; }
@media print { .preview-ribbon { display: none; } }
