/* Event Bucket public board: Route Marker colors (sign blue band, signal
   yellow date tabs) set in Big Shoulders Display and Public Sans.
   Pairs with assets/js/eb-board-public.js. Every rule is scoped to the
   citizen home view (body.ebp-on #view-home) so the admin dashboard, the TV
   view, the flyer overlay and the shared modals keep their own look. */

/* First paint: keep the home view hidden until the layer has built (the JS
   adds html.ebp-ready even when it bails), with a timed release so the page
   can never stay hidden if the script fails to load. */
html:not(.ebp-ready) #view-home.active { visibility: hidden; animation: ebp-reveal 0s linear 2.5s forwards; }
@keyframes ebp-reveal { to { visibility: visible; } }

body.ebp-on #view-home {
  --ebp-sign: #1747C9; --ebp-sign-deep: #0F3399; --ebp-ink: #0B1A3A;
  --ebp-signal: #FFC20E; --ebp-paper: #F2F5FA; --ebp-line: #D3DCEA; --ebp-muted: #4A5A78;
  --ebp-tint: #E3EAFB; --ebp-stop: #C3302A;
  --ebp-display: 'Big Shoulders Display', 'Public Sans', 'Arial Narrow', sans-serif;
  --ebp-body: 'Public Sans', 'Segoe UI', system-ui, sans-serif;
  background: var(--ebp-paper) !important;
  color: var(--ebp-ink);
  font-family: var(--ebp-body);
}
body.ebp-on #view-home::before { display: none !important; }
body.ebp-on #view-home > * { align-self: stretch; min-width: 0; }
/* Older boards (template, demo) used a one-screen centered hero that clipped
   overflow; the home view becomes the scroll container, as on Waynesville. */
body.ebp-legacy #view-home {
  align-items: stretch !important; justify-content: flex-start !important;
  height: 100vh; max-height: 100vh; overflow-y: auto !important; overflow-x: hidden !important; -webkit-overflow-scrolling: touch;
}

/* Retired public chrome: kept in the DOM (ids, handlers and the keep-alive
   status stay reachable), just not shown. */
body.ebp-on #view-home .home-nav,
body.ebp-on #view-home .eb-board-shell,
body.ebp-on #view-home .v2-hero,
body.ebp-on #view-home .v2-events { display: none !important; }
body.ebp-legacy #view-home main.hero > :not(.ebp-wrap):not(.hero-note) { display: none !important; }
body.ebp-legacy #view-home main.hero {
  display: block !important; max-width: none !important; width: 100% !important; margin: 0 !important;
  padding: 0 !important; text-align: left !important; min-height: 0 !important; flex: 1 0 auto;
}
/* The older footer was pinned to the viewport over a one-screen hero; with
   a scrolling list it would cover rows, so it returns to the page flow. */
body.ebp-legacy #view-home .home-footer { position: static !important; flex: none; pointer-events: auto; gap: 12px; flex-wrap: wrap; }
body.ebp-on #view-home main.v2-wrap { max-width: none; width: 100%; padding: 0; margin: 0; }

body.ebp-on #view-home :focus-visible { outline: 3px solid var(--ebp-signal); outline-offset: 2px; border-radius: 6px; }
body.ebp-on #view-home .ebp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.ebp-on #view-home .ebp-i { display: inline-flex; width: 1em; height: 1em; flex: none; }
body.ebp-on #view-home .ebp-i svg { width: 100%; height: 100%; }

/* ── Header band ── */
body.ebp-on #view-home .ebp-top { background: var(--ebp-sign); color: #fff; flex: none; }
body.ebp-on #view-home .ebp-bar,
body.ebp-on #view-home .ebp-tabrow { max-width: 1440px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }
body.ebp-on #view-home .ebp-bar { display: flex; align-items: center; gap: 18px; padding-top: 16px; padding-bottom: 14px; }
body.ebp-on #view-home .ebp-ident { display: flex; align-items: center; gap: 16px; min-width: 0; }
body.ebp-on #view-home .ebp-shield {
  display: inline-grid; place-items: center; width: 46px; height: 46px; flex: none;
  background: #fff; color: var(--ebp-ink); border: 3px solid var(--ebp-ink); border-radius: 10px; font-size: 24px;
}
body.ebp-on #view-home .ebp-name { margin: 0; font-family: var(--ebp-display); font-weight: 900; text-transform: uppercase; letter-spacing: .01em; font-size: 34px; line-height: .95; color: #fff; }
body.ebp-on #view-home .ebp-name-main { display: block; }
body.ebp-on #view-home .ebp-name-sub { display: block; margin-top: 4px; font-family: var(--ebp-body); text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; line-height: 1.3; color: #DCE5FA; }
body.ebp-on #view-home .ebp-links { margin-left: auto; display: flex; align-items: center; gap: 6px 20px; flex-wrap: wrap; justify-content: flex-end; }
body.ebp-on #view-home .ebp-link {
  font: 700 15px/1.2 var(--ebp-body); color: #fff; text-decoration: none; background: none; border: 0; padding: 6px 2px; cursor: pointer;
}
body.ebp-on #view-home .ebp-link:hover { text-decoration: underline; text-underline-offset: 4px; }
body.ebp-on #view-home .ebp-add {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; border-radius: 10px;
  background: var(--ebp-signal); color: var(--ebp-ink); padding: 11px 18px;
  font-family: var(--ebp-display); font-weight: 900; font-size: 20px; text-transform: uppercase; letter-spacing: .01em; line-height: 1;
}
body.ebp-on #view-home .ebp-add:hover { background: #FFD24D; }

/* Filter tabs sit on the band's bottom edge */
body.ebp-on #view-home .ebp-tabrow { padding-top: 6px; }
body.ebp-on #view-home .ebp-tabs { position: relative; display: flex; gap: 8px; align-items: flex-end; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
body.ebp-on #view-home .ebp-tabs::-webkit-scrollbar { display: none; }
body.ebp-on #view-home .ebp-tab {
  flex: none; border: 0; cursor: pointer; border-radius: 10px 10px 0 0; padding: 11px 16px 9px;
  background: rgba(255,255,255,.14); color: #fff;
  font-family: var(--ebp-display); font-weight: 800; font-size: 19px; line-height: 1; text-transform: uppercase; letter-spacing: .02em;
}
body.ebp-on #view-home .ebp-tab:hover { background: rgba(255,255,255,.24); }
body.ebp-on #view-home .ebp-tab.on { background: var(--ebp-paper); color: var(--ebp-ink); }
body.ebp-on #view-home .ebp-cat { display: inline-flex; align-items: center; gap: 8px; padding-top: 6px; padding-bottom: 5px; }
body.ebp-on #view-home .ebp-cat-sel {
  font: 600 14px/1.2 var(--ebp-body) !important; color: var(--ebp-ink) !important; background: #fff !important;
  border: 0 !important; border-radius: 7px !important; padding: 5px 8px !important; max-width: 220px; height: auto !important; margin: 0 !important;
  text-transform: none; letter-spacing: 0; box-shadow: none !important;
}

/* ── Two columns ── */
body.ebp-on #view-home .ebp-wrap {
  max-width: 1440px; margin: 0 auto; padding: 28px 40px 48px;
  display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 32px; align-items: start; text-align: left;
}
body.ebp-on #view-home .ebp-main { min-width: 0; }
body.ebp-on #view-home .ebp-group-h {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px;
  font-family: var(--ebp-display); font-weight: 900; font-size: 34px; line-height: 1; text-transform: uppercase; letter-spacing: .01em; color: var(--ebp-ink);
}
body.ebp-on #view-home .ebp-group-h2 { margin-top: 30px; }
body.ebp-on #view-home .ebp-group-n { font-family: var(--ebp-body); font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ebp-muted); }
body.ebp-on #view-home .ebp-empty { background: #fff; border-radius: 14px; padding: 28px; color: var(--ebp-muted); font-size: 16px; line-height: 1.5; }

/* Event rows */
body.ebp-on #view-home .ebp-row {
  display: grid; grid-template-columns: 96px 112px minmax(0, 1fr) auto; grid-template-areas: "date thumb info acts";
  position: relative; gap: 20px; align-items: center; background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(11,26,58,.06); cursor: pointer; transition: box-shadow .15s;
}
body.ebp-on #view-home .ebp-row:hover { box-shadow: 0 0 0 2px var(--ebp-line), 0 6px 18px rgba(11,26,58,.08); }
body.ebp-on #view-home .ebp-date {
  grid-area: date; text-align: center; background: var(--ebp-signal); color: var(--ebp-ink); border-radius: 10px; padding: 9px 0 7px;
  font-family: var(--ebp-display); font-weight: 900; line-height: 1; text-transform: uppercase; letter-spacing: .02em;
}
body.ebp-on #view-home .ebp-date b { display: block; font-size: 46px; margin: 3px 0 2px; font-weight: 900; }
body.ebp-on #view-home .ebp-date small { display: block; font-size: 16px; font-weight: 800; }
body.ebp-on #view-home .ebp-date.ebp-every { background: var(--ebp-ink); color: #fff; }
body.ebp-on #view-home .ebp-date.ebp-every b { font-size: 40px; }
body.ebp-on #view-home .ebp-thumb {
  grid-area: thumb; width: 112px; height: 112px; border-radius: 10px; overflow: hidden; background: var(--ebp-paper);
  display: grid; place-items: center; position: relative;
}
body.ebp-on #view-home .ebp-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
body.ebp-on #view-home .ebp-thumb-ph {
  padding: 8px; text-align: center; font-family: var(--ebp-display); font-weight: 800; font-size: 16px; line-height: 1.05;
  text-transform: uppercase; color: var(--ebp-sign); overflow-wrap: anywhere;
}
body.ebp-on #view-home .ebp-info { grid-area: info; min-width: 0; }
body.ebp-on #view-home .ebp-title {
  margin: 0; font-family: var(--ebp-display); font-weight: 800; font-size: 30px; line-height: 1; text-transform: uppercase; letter-spacing: .01em;
  color: var(--ebp-ink); overflow-wrap: anywhere;
}
body.ebp-on #view-home .ebp-meta { margin: 8px 0 0; color: var(--ebp-muted); font-size: 15px; line-height: 1.4; display: flex; gap: 4px 16px; flex-wrap: wrap; }
body.ebp-on #view-home .ebp-m { display: inline-flex; gap: 6px; align-items: flex-start; min-width: 0; overflow-wrap: anywhere; }
body.ebp-on #view-home .ebp-m .ebp-i { margin-top: 2px; }
body.ebp-on #view-home .ebp-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
body.ebp-on #view-home .ebp-tag { display: inline-block; font-size: 13px; font-weight: 800; color: var(--ebp-sign); background: var(--ebp-tint); border-radius: 6px; padding: 3px 8px; line-height: 1.3; }
body.ebp-on #view-home .ebp-tag-cat { color: var(--ebp-muted); background: var(--ebp-paper); font-weight: 700; }
body.ebp-on #view-home .ebp-tag-stop { color: #fff; background: var(--ebp-stop); }
body.ebp-on #view-home .ebp-canceled .ebp-title { text-decoration: line-through; text-decoration-thickness: 2px; }
body.ebp-on #view-home .ebp-acts { grid-area: acts; display: flex; gap: 8px; }
body.ebp-on #view-home .ebp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; border-radius: 10px;
  font: 800 15px/1.1 var(--ebp-body); padding: 10px 14px; white-space: nowrap;
}
body.ebp-on #view-home .ebp-btn-plain { background: #fff; color: var(--ebp-ink); box-shadow: inset 0 0 0 2px var(--ebp-line); }
body.ebp-on #view-home .ebp-btn-plain:hover { box-shadow: inset 0 0 0 2px var(--ebp-sign); color: var(--ebp-sign); }
body.ebp-on #view-home .ebp-btn-sign { background: var(--ebp-sign); color: #fff; }
body.ebp-on #view-home .ebp-btn-sign:hover { background: var(--ebp-sign-deep); }

/* Side column */
body.ebp-on #view-home .ebp-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
body.ebp-on #view-home .ebp-cta {
  background: var(--ebp-sign); color: #fff; border-radius: 16px; padding: 28px;
  box-shadow: inset 0 0 0 5px var(--ebp-sign), inset 0 0 0 8px #fff;
}
body.ebp-on #view-home .ebp-cta-h { margin: 0; font-family: var(--ebp-display); font-weight: 900; font-size: 40px; line-height: .95; text-transform: uppercase; letter-spacing: .01em; color: #fff; }
body.ebp-on #view-home .ebp-cta-p { font-size: 15px; line-height: 1.5; color: #DCE5FA; margin: 12px 0 18px; }
body.ebp-on #view-home .ebp-cta-btn {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; border-radius: 10px;
  background: var(--ebp-signal); color: var(--ebp-ink); font: 800 15px/1.1 var(--ebp-body); padding: 11px 16px;
}
body.ebp-on #view-home .ebp-cta-btn:hover { background: #FFD24D; }
body.ebp-on #view-home .ebp-cta-edit {
  display: block; margin-top: 14px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
  font: 600 14px/1.4 var(--ebp-body); color: #fff; text-decoration: underline; text-underline-offset: 3px;
}
body.ebp-on #view-home .ebp-hall { background: #fff; border-radius: 14px; padding: 20px; }
body.ebp-on #view-home .ebp-hall-h {
  margin: 0; display: flex; gap: 8px; align-items: center; font-family: var(--ebp-display); font-weight: 900; font-size: 22px; line-height: 1;
  text-transform: uppercase; letter-spacing: .01em; color: var(--ebp-ink);
}
body.ebp-on #view-home .ebp-hall-dl { margin: 12px 0 0; font-size: 15px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
body.ebp-on #view-home .ebp-hall-dl dt { color: var(--ebp-muted); }
body.ebp-on #view-home .ebp-hall-dl dd { margin: 0; color: var(--ebp-ink); }
body.ebp-on #view-home .ebp-hall-closed { margin: 14px 0 0; background: #FFF4D1; color: #6B4E00; border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 700; line-height: 1.35; }

/* ── The sections that follow the list (kept, restyled) ── */
body.ebp-on #view-home .v2-also,
body.ebp-on #view-home .v2-lobby,
body.ebp-on #view-home .hero-note { max-width: 1360px; margin-left: auto; margin-right: auto; box-sizing: border-box; }
body.ebp-on #view-home .v2-also { margin-bottom: 24px; width: calc(100% - 80px); background: #fff; border: 0; border-radius: 14px; }
body.ebp-on #view-home .v2-also-lbl { font-family: var(--ebp-display); font-size: 17px; font-weight: 900; letter-spacing: .03em; color: var(--ebp-ink); }
body.ebp-on #view-home .v2-lobby { width: calc(100% - 80px); background: #fff; border: 0; border-radius: 16px; margin-bottom: 24px; }
body.ebp-on #view-home .v2-lobby h2 { font-family: var(--ebp-display); font-weight: 900; font-size: 34px; line-height: 1; text-transform: uppercase; letter-spacing: .01em; color: var(--ebp-ink); }
body.ebp-on #view-home .v2-lobby-cta { background: var(--ebp-sign); border-color: var(--ebp-sign); color: #fff; border-radius: 10px; font-family: var(--ebp-body); font-weight: 800; }
body.ebp-on #view-home .v2-lobby-cta--ghost { background: #fff; color: var(--ebp-ink); border: 0; box-shadow: inset 0 0 0 2px var(--ebp-line); }
body.ebp-on #view-home .v2tv-bar { background: var(--ebp-sign); }
body.ebp-on #view-home .hero-note { padding: 0 40px 24px; max-width: 1440px; text-align: left; }
body.ebp-legacy #view-home .hero-note { margin: 0 auto; }
body.ebp-on #view-home .hero-note a { color: var(--ebp-sign) !important; }
body.ebp-on #view-home .home-footer { background: #fff; border-top: 1px solid var(--ebp-line); }
body.ebp-on #view-home .staff-access-btn { color: var(--ebp-sign) !important; }

/* ── Detail modal: same content and controls, board type on the title ── */
body.ebp-on #cvModalOverlay .cv-modal-title { font-family: 'Big Shoulders Display', 'Public Sans', sans-serif; font-weight: 900; text-transform: uppercase; letter-spacing: .01em; font-size: 2rem; line-height: 1; color: #0B1A3A; }
body.ebp-on #cvModalOverlay .cv-modal-type { color: #1747C9; }

/* ── Tablet: side column drops below the list ── */
@media (max-width: 1100px) {
  body.ebp-on #view-home .ebp-wrap { grid-template-columns: minmax(0, 1fr); padding: 24px 24px 40px; }
  body.ebp-on #view-home .ebp-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
  body.ebp-on #view-home .ebp-bar, body.ebp-on #view-home .ebp-tabrow { padding-left: 24px; padding-right: 24px; }
  body.ebp-on #view-home .v2-also, body.ebp-on #view-home .v2-lobby { width: calc(100% - 48px); }
  body.ebp-on #view-home .hero-note { padding: 0 24px 24px; }
  body.ebp-on #view-home .ebp-bar { flex-wrap: wrap; }
  body.ebp-on #view-home .ebp-links { margin-left: 0; width: 100%; justify-content: flex-start; }
  body.ebp-on #view-home .ebp-add { margin-left: auto; }
  body.ebp-on #view-home .ebp-tab { font-size: 17px; padding: 10px 12px 8px; }
  body.ebp-on #view-home .ebp-cat-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body.ebp-on #view-home .ebp-cat-sel { max-width: 170px; }
}
@media (max-width: 900px) {
  body.ebp-on #view-home .ebp-row { grid-template-columns: 84px 96px minmax(0, 1fr); grid-template-areas: "date thumb info" "date thumb acts"; row-gap: 12px; align-items: start; }
  body.ebp-on #view-home .ebp-thumb { width: 96px; height: 96px; }
  body.ebp-on #view-home .ebp-date b { font-size: 40px; }
  body.ebp-on #view-home .ebp-title { font-size: 26px; }
}

/* ── Phone ── */
@media (max-width: 600px) {
  body.ebp-on #view-home .ebp-bar, body.ebp-on #view-home .ebp-tabrow { padding-left: 16px; padding-right: 16px; }
  body.ebp-on #view-home .ebp-bar { gap: 12px; padding-top: 14px; }
  body.ebp-on #view-home .ebp-shield { width: 40px; height: 40px; font-size: 21px; }
  body.ebp-on #view-home .ebp-name { font-size: 30px; }
  body.ebp-on #view-home .ebp-name-sub { font-size: 13px; }
  body.ebp-on #view-home .ebp-links { gap: 2px 12px; }
  body.ebp-on #view-home .ebp-link { font-size: 13px; }
  body.ebp-on #view-home .ebp-add { width: 100%; justify-content: center; margin: 4px 0 0; padding: 13px 18px; }
  body.ebp-on #view-home .ebp-tab { font-size: 17px; padding: 10px 13px 8px; }
  body.ebp-on #view-home .ebp-tabs { margin-right: -16px; padding-right: 16px; }
  body.ebp-on #view-home .ebp-wrap { padding: 20px 16px 32px; gap: 24px; }
  body.ebp-on #view-home .ebp-group-h { font-size: 28px; }
  body.ebp-on #view-home .ebp-row {
    grid-template-columns: 64px minmax(0, 1fr) 76px; grid-template-areas: "date info thumb" "acts acts acts";
    gap: 12px; padding: 12px; align-items: start;
  }
  body.ebp-on #view-home .ebp-date { padding: 7px 0 6px; }
  body.ebp-on #view-home .ebp-date b { font-size: 32px; }
  body.ebp-on #view-home .ebp-date.ebp-every b { font-size: 28px; }
  body.ebp-on #view-home .ebp-date small { font-size: 13px; }
  body.ebp-on #view-home .ebp-thumb { width: 76px; height: 76px; }
  body.ebp-on #view-home .ebp-title { font-size: 23px; }
  body.ebp-on #view-home .ebp-meta { font-size: 14px; flex-direction: column; gap: 4px; }
  body.ebp-on #view-home .ebp-acts .ebp-btn { flex: 1; }
  body.ebp-on #view-home .ebp-cta { padding: 24px; }
  body.ebp-on #view-home .ebp-cta-h { font-size: 34px; }
  body.ebp-on #view-home .v2-also, body.ebp-on #view-home .v2-lobby { width: calc(100% - 32px); }
  body.ebp-on #view-home .v2-lobby h2 { font-size: 28px; }
  body.ebp-on #view-home .hero-note { padding: 0 16px 20px; }
}
