:root {
  --blue: #1b3fd6;
  --blue-dark: #0f2590;
  --blue-ink: #0b1a5c;
  --yellow: #f6cd45;
  --yellow-soft: #fff6d6;
  --ink: #16182a;
  --muted: #5d6275;
  --line: #e3e6ef;
  --bg: #ffffff;
  --bg-soft: #f5f7fc;
  --ok: #157a46;
  --ok-bg: #e3f6eb;
  --warn: #8a5a00;
  --warn-bg: #fff1cc;
  --bad: #a3221b;
  --bad-bg: #fde5e3;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 64, 0.06), 0 8px 24px rgba(16, 24, 64, 0.06);
  --font: 'Commissioner', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 750; margin-top: 1.6em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.page-pad { padding-top: 40px; padding-bottom: 64px; }
.section { padding: 64px 20px 8px; }
.mt { margin-top: 24px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.wide { grid-column: 1 / -1; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand span { display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font-size: 1.05rem; }
.brand small { color: var(--muted); font-size: 0.8rem; }
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a, .mobile-nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.97rem; }
.main-nav a:hover { color: var(--blue); }
.main-nav a.btn, .mobile-nav a.btn { color: #fff; }
.nav-toggle { display: none; position: relative; }
.nav-toggle summary { list-style: none; cursor: pointer; padding: 10px; display: flex; flex-direction: column; gap: 5px; }
.nav-toggle summary::-webkit-details-marker { display: none; }
.nav-toggle summary span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }
.mobile-nav {
  position: absolute; right: 0; top: 52px; min-width: 240px;
  display: flex; flex-direction: column; gap: 14px; padding: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
@media (max-width: 920px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--blue); color: #fff; font: inherit; font-weight: 650; text-decoration: none;
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { background: var(--blue-dark); color: #fff; transform: translateY(-1px); }
.btn-small { padding: 7px 16px; font-size: 0.9rem; }
.btn-accent { background: var(--yellow); color: var(--blue-ink); }
.btn-accent:hover { background: #ffd95e; color: var(--blue-ink); }
.btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-ghost-dark { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost-dark:hover { background: var(--bg-soft); color: var(--blue-dark); }
.btn-danger { background: var(--bad); }
.btn-danger:hover { background: #7f1812; }
.btn-google { width: 100%; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-google:hover { background: var(--bg-soft); color: var(--ink); }
.link-button { background: none; border: 0; padding: 0; color: var(--bad); font: inherit; font-size: 0.9rem; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(246, 205, 69, 0.28), transparent 60%),
    radial-gradient(800px 400px at 0% 100%, rgba(255, 255, 255, 0.1), transparent 60%),
    linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 70%, var(--blue-ink) 100%);
}
.hero::before {
  content: ''; position: absolute; inset: 0; opacity: 0.12; pointer-events: none;
  background-image: repeating-radial-gradient(circle at 75% 40%, transparent 0 22px, #fff 22px 23px);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 120px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.02; margin-bottom: 20px; }
.hero h1 span { color: var(--yellow); font-weight: 500; font-style: italic; }
.hero .lead { font-size: 1.2rem; max-width: 36em; color: rgba(255, 255, 255, 0.9); margin-bottom: 28px; }
.hero-logo { justify-self: center; width: min(360px, 80%); filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.35)); }
.hero-ridge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 90px; fill: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; font-weight: 700; color: var(--blue); margin-bottom: 10px; }
.hero .eyebrow, .page-hero .eyebrow { color: var(--yellow); }
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 100px; }
  .hero-logo { width: 200px; grid-row: 1; justify-self: start; }
}

.page-hero { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); color: #fff; padding: 56px 0 44px; }
.page-hero h1 { margin-bottom: 8px; }
.page-hero .lead { color: rgba(255, 255, 255, 0.88); font-size: 1.15rem; max-width: 42em; margin: 0; }
.lead-dark { font-size: 1.2rem; color: var(--muted); }

/* ---------- sections & cards ---------- */
.section-head { margin-bottom: 28px; }
.section-head.row { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3.compact { gap: 16px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); color: inherit; text-decoration: none;
}
a.card { transition: transform 0.15s ease, box-shadow 0.15s ease; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(16, 24, 64, 0.06), 0 16px 32px rgba(16, 24, 64, 0.1); color: inherit; }
.card p:last-child { margin-bottom: 0; }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; background: var(--yellow-soft); margin-bottom: 14px; }
.stack { display: grid; gap: 14px; }
.empty { padding: 28px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }

.event-card { display: grid; grid-template-columns: 84px 1fr; gap: 20px; align-items: start; }
.event-card h3 { margin-bottom: 4px; }
.event-card p { margin-bottom: 6px; }
.event-date { background: var(--blue); color: #fff; border-radius: 14px; text-align: center; padding: 10px 6px; line-height: 1.1; }
.event-date span { display: block; font-size: 1.9rem; font-weight: 800; }
.event-date small { font-size: 0.8rem; opacity: 0.9; }
.post-card { padding: 0; overflow: hidden; }
.post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.card-body { padding: 20px 22px; }

.band { background: var(--yellow); margin-top: 64px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-top: 36px; padding-bottom: 36px; color: var(--blue-ink); }
.stats div { display: flex; flex-direction: column; }
.stats strong { font-size: 2.4rem; font-weight: 800; line-height: 1.1; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } }

.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 40px; border-radius: 24px; color: #fff; margin-bottom: 64px;
  background: linear-gradient(120deg, var(--blue-ink), var(--blue));
}
.cta h2 { margin-top: 0; }
.cta p { color: rgba(255, 255, 255, 0.88); max-width: 40em; margin: 0; }

.prose { font-size: 1.05rem; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose img.cover { border-radius: var(--radius); margin-bottom: 24px; width: 100%; }
.emblem { display: flex; gap: 24px; align-items: center; }
@media (max-width: 600px) { .emblem { flex-direction: column; align-items: start; } }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.board-member { padding: 16px 18px; border-radius: 12px; background: var(--bg-soft); display: flex; flex-direction: column; }
.board-member span { color: var(--muted); font-size: 0.92rem; }
.steps { padding-left: 1.2em; font-size: 1.08rem; }
.steps li { margin-bottom: 14px; }
.event-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.register-box { position: sticky; top: 90px; }
@media (max-width: 900px) { .event-layout { grid-template-columns: 1fr; } .register-box { position: static; } }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .form-grid.cols-3 { grid-template-columns: 1fr; } }
.form-grid > .btn { justify-self: start; }
.stack-form { display: grid; gap: 18px; }
.stack-form > .btn { justify-self: start; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 20px; margin: 0; }
legend { font-weight: 700; padding: 0 6px; }
fieldset.staff-only { background: var(--yellow-soft); border-color: #f0dd9a; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.93rem; }
.field > span { font-weight: 600; }
.field em { color: var(--bad); font-style: normal; }
.field small { color: var(--muted); }
input, select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(27, 63, 214, 0.12); }
input:disabled { background: var(--bg-soft); color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.check input { width: 18px; height: 18px; margin-top: 3px; flex: none; }
.code-input { font-size: 1.8rem; letter-spacing: 0.4em; text-align: center; font-weight: 700; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.filters input, .filters select { width: auto; flex: 1 1 180px; padding: 8px 10px; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form select { width: auto; padding: 6px 8px; }

/* ---------- auth ---------- */
.auth-wrap { display: grid; place-items: center; padding-top: 56px; padding-bottom: 80px; }
.auth-card { width: 100%; max-width: 440px; text-align: center; padding: 36px 32px; }
.auth-card .form-grid { text-align: left; }
.auth-card .btn { width: 100%; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 18px 0; font-size: 0.9rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- account / admin shell ---------- */
.side-layout { display: grid; grid-template-columns: 230px 1fr; gap: 36px; padding-top: 36px; padding-bottom: 72px; align-items: start; }
.side-nav { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 2px; }
.side-heading { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.side-nav a { padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 500; }
.side-nav a:hover { background: var(--bg-soft); }
.side-nav a.active { background: var(--blue); color: #fff; }
.side-content { min-width: 0; overflow-x: auto; }
.side-content h1 { font-size: 1.9rem; }
.side-content h2 { font-size: 1.3rem; }
@media (max-width: 860px) {
  .side-layout { grid-template-columns: 1fr; gap: 16px; }
  .side-nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .side-heading { display: none; }
  .side-nav a { white-space: nowrap; background: var(--bg-soft); }
}
.page-title { display: flex; justify-content: space-between; align-items: start; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin: 16px 0 8px; }
.kpi { border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; background: #fff; }
a.kpi:hover { border-color: var(--blue); color: var(--ink); }
.kpi strong { font-size: 1.8rem; font-weight: 800; color: var(--blue); }
.kpi span { color: var(--muted); font-size: 0.9rem; }
.table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.table th { text-align: left; font-weight: 650; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:hover { background: var(--bg-soft); }
.row-actions form { display: inline; }
.row-actions > * + * { margin-left: 10px; }
.list { padding-left: 1.2em; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 650; background: var(--bg-soft); color: var(--muted); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.flash { margin: 18px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--yellow-soft); border: 1px solid #f0dd9a; font-weight: 500; }
.error { color: var(--bad); background: var(--bad-bg); padding: 10px 14px; border-radius: 10px; }
.notice { background: var(--bg-soft); padding: 10px 14px; border-radius: 10px; font-size: 0.9rem; }
.section-admin .site-header { border-bottom-color: var(--yellow); }

/* ---------- footer ---------- */
.site-footer { background: var(--blue-ink); color: rgba(255, 255, 255, 0.82); padding-top: 48px; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { color: #fff; font-size: 0.95rem; margin-bottom: 12px; }
.footer-grid a { display: block; color: rgba(255, 255, 255, 0.82); text-decoration: none; margin-bottom: 6px; }
.footer-grid a:hover { color: var(--yellow); }
.motto { color: var(--yellow); font-weight: 600; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 32px; padding-top: 18px; padding-bottom: 24px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
