:root {
  --sse-primary: #1f4e9c;
  --sse-primary-dark: #14367a;
  --sse-accent: #f5a524;
}

body { background: #f4f6fa; }

.site-nav { background: linear-gradient(90deg, var(--sse-primary-dark), var(--sse-primary)); }
.site-nav .navbar-brand { white-space: normal; min-width: 0; }  /* wrap on very narrow screens instead of overflowing */

.hero {
  background: linear-gradient(135deg, var(--sse-primary-dark), var(--sse-primary) 60%, #3b82c4);
  box-shadow: 0 .5rem 1.5rem rgba(20, 54, 122, .25);
}

.reg-no {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--sse-primary-dark);
  background: #e8f0fc;
  border: 2px dashed var(--sse-primary);
  border-radius: .75rem;
  padding: .25rem 1rem;
}

/* htmx spinners are hidden until a request is in flight */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { display: inline-block; }

/* ---------- announcements marquee ---------- */
.marquee-bar {
  display: flex;
  align-items: stretch;
  background: #fff6dc;
  border-bottom: 1px solid #f0d58a;
  font-size: .95rem;
  min-height: 2.5rem;
}
.marquee-label {
  display: flex; align-items: center; gap: .4rem;
  flex: 0 0 auto;
  padding: 0 .9rem;
  background: var(--sse-accent);
  color: #1b2437;
  font-weight: 600;
  white-space: nowrap;
}
.marquee-viewport { flex: 1 1 auto; min-width: 0; overflow: hidden; display: flex; align-items: center; }
.marquee-track {
  display: flex;
  width: max-content;
  /* JS replaces the duration so the speed is the same whatever the text length */
  animation: marquee-scroll var(--marquee-duration, 40s) linear infinite;
  will-change: transform;
}
.marquee-group {
  display: flex;
  flex: 0 0 auto;
  min-width: 100vw;          /* each copy is at least a screen wide, so the loop has no gaps */
  margin: 0; padding: 0; list-style: none;
}
.marquee-item { display: flex; align-items: center; white-space: nowrap; padding-right: 2.25rem; position: relative; }
.marquee-item::after { content: "\25C6"; color: var(--sse-accent); font-size: .6rem; position: absolute; right: .9rem; }
.marquee-item a { color: #14367a; font-weight: 500; }
.marquee-item.is-important a, .marquee-item.is-important > span:last-child { color: #a11d2b; font-weight: 600; }
.marquee-toggle, .marquee-all {
  flex: 0 0 auto; display: flex; align-items: center;
  border: 0; border-left: 1px solid #f0d58a; background: transparent;
  padding: 0 .8rem; color: #5b4a12; font-size: .85rem; text-decoration: none; white-space: nowrap;
}
.marquee-toggle:hover, .marquee-all:hover { background: #ffecb0; color: #1b2437; }

@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Stop while someone is reading / aiming at a link, or when they press pause. */
.marquee-bar:hover .marquee-track,
.marquee-bar:focus-within .marquee-track,
.marquee-bar.is-paused .marquee-track { animation-play-state: paused; }

/* People who ask their device for less motion get a still, scrollable line instead. */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee-viewport { overflow-x: auto; }
  .marquee-group { min-width: 0; }
  .marquee-group[aria-hidden="true"], .marquee-toggle { display: none; }
}
@media (max-width: 575.98px) {
  .marquee-label span { display: none; }
  .marquee-label { padding: 0 .7rem; }
}

/* ---------- staff area ---------- */
body.staff .navbar { background: #1b2437; }
body.staff .navbar .nav-link.active { color: #fff; font-weight: 600; border-bottom: 2px solid var(--sse-accent); }

.stat-card .stat-value { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-icon {
  width: 3rem; height: 3rem; border-radius: .75rem;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem;
}

.table-sticky thead th { position: sticky; top: 0; background: #fff; z-index: 1; }
.table > :not(caption) > * > * { vertical-align: middle; }
/* .visually-hidden labels are position:absolute and would otherwise escape the wrapper's
   overflow clipping and make the whole page scroll sideways on phones */
.table-responsive { position: relative; }

.stall-empty td { color: #9aa3b2; background: #fafbfd; }

.htmx-swapping { opacity: 0; transition: opacity .25s ease-out; }

/* ---------- print ---------- */
@media print {
  body { background: #fff; }
  .site-nav, footer, .no-print, .navbar, .messages, .marquee-bar { display: none !important; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; }
  .room-sheet { page-break-after: always; }
  .room-sheet:last-child { page-break-after: auto; }
}
