/* ==========================================================================
   The public event pages (/events/): what search engines read and what a
   student lands on before opening the app. Same tokens and register as the
   app (DESIGN.md "Calm"); every value that exists as a token comes from
   /design/tokens.css.
   ========================================================================== */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  font-weight: var(--body-w);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-dark); }
:root[data-theme="dark"] a { color: var(--teal-bright); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a { color: var(--teal-bright); } }

h1, h2 { font-family: var(--font-display); font-weight: 900; margin: 0; }

.page { max-width: var(--content-max); margin: 0 auto; padding: var(--sp-lg) var(--sp-lg) var(--sp-4xl); }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md); padding: var(--sp-xs) 0 var(--sp-xl); }
.brand { display: inline-flex; align-items: center; gap: var(--sp-sm); font-family: var(--font-display); font-weight: 900; font-size: 20px; color: var(--text); text-decoration: none; }
/* The mark, as in the app (app.css `.logo`; pipeline/brand/icons.py). */
.logo { width: 32px; height: 32px; flex: none; display: block; color: var(--teal-dark); overflow: visible; }
.logo .logo-dot { fill: var(--amber); }
:root[data-theme="dark"] .logo { color: var(--teal-bright); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo { color: var(--teal-bright); } }
.brand { letter-spacing: -.015em; }

.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 var(--sp-md); }
.crumbs a { color: var(--muted); }

.hero { background: var(--hero-bg); color: var(--on-hero); border-radius: var(--r-xl); padding: var(--sp-2xl); margin-bottom: var(--sp-xl); }
.hero h1 { font-size: 28px; line-height: 32px; }
.hero p { margin: var(--sp-sm) 0 0; max-width: 62ch; }
@media (min-width: 1024px) { .hero h1 { font-size: 36px; line-height: 40px; } }

.card { background: var(--surface); border: var(--line) solid var(--border); border-radius: var(--r-lg); padding: var(--sp-xl); box-shadow: var(--card-shadow); margin-bottom: var(--sp-xl); }
.card h2 { font-size: 20px; line-height: 26px; margin-bottom: var(--sp-md); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--sp-md); margin: 0; }
.stats div { background: var(--surface-2); border-radius: var(--r-md); padding: var(--sp-md) var(--sp-lg); }
.stats dt { font-size: 12px; line-height: 16px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: var(--sp-2xs) 0 0; font-family: var(--font-display); font-weight: 900; font-size: 24px; line-height: 30px; font-variant-numeric: tabular-nums; }

.cta { display: flex; align-items: center; justify-content: center; min-height: 54px; border-radius: var(--r-md); background: var(--teal); color: var(--on-teal) !important; font-family: var(--font-display); font-weight: var(--btn-w); font-size: 19px; text-transform: var(--btn-case); text-decoration: none; box-shadow: var(--cta-glow); }
.cta:hover { background: var(--teal-dark); }
.cta:focus-visible { outline: 3px solid var(--teal-bright); outline-offset: 2px; }

.list { columns: 2 240px; column-gap: var(--sp-2xl); margin: 0; padding: 0; list-style: none; }
.list li { break-inside: avoid; padding: var(--sp-2xs) 0; font-size: 15px; line-height: 22px; }
.muted { color: var(--muted); }

.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-md); margin: 0; padding: 0; list-style: none; }
.events a { display: block; height: 100%; background: var(--surface); border: var(--line) solid var(--border); border-radius: var(--r-lg); padding: var(--sp-lg); text-decoration: none; color: var(--text); box-shadow: var(--card-shadow); }
.events a:hover { border-color: var(--teal); }
.events b { display: block; font-family: var(--font-display); font-weight: 900; font-size: 18px; line-height: 24px; }
.events span { display: block; font-size: 14px; line-height: 20px; color: var(--muted); margin-top: var(--sp-2xs); }

footer { margin-top: var(--sp-3xl); font-size: 13px; line-height: 20px; color: var(--muted); }

/* ── For schools (/schools/) and the connection check (/check/) ────────── */
.doc .card p { margin: 0 0 var(--sp-md); max-width: 70ch; }
.doc .card p:last-child { margin-bottom: 0; }
.plain { margin: 0 0 var(--sp-lg); padding: 0; list-style: none; }
.plain li { position: relative; padding: var(--sp-xs) 0 var(--sp-xs) var(--sp-xl); max-width: 72ch; }
.plain li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 8px; height: 8px; border-radius: var(--r-full); background: var(--teal); }
.facts { margin: 0 0 var(--sp-lg); }
.facts div { display: grid; grid-template-columns: 1fr; gap: var(--sp-2xs); padding: var(--sp-md) 0; border-top: var(--line) solid var(--border); }
.facts div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font-size: 12px; line-height: 16px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; max-width: 70ch; }
@media (min-width: 720px) { .facts div { grid-template-columns: 180px 1fr; gap: var(--sp-xl); } }
code { font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 14px; background: var(--surface-2); border-radius: var(--r-sm); padding: 1px 6px; overflow-wrap: anywhere; }
.note { margin: 0 0 var(--sp-lg); padding: var(--sp-lg); background: var(--surface-2); border-radius: var(--r-md); font-family: var(--font-body); font-size: 15px; line-height: 22px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cta.quiet { display: inline-flex; min-height: 46px; padding: 0 var(--sp-xl); background: var(--surface-2); color: var(--text) !important; border: var(--line) solid var(--border); box-shadow: none; font-size: 16px; cursor: pointer; }
.cta.quiet:hover { background: var(--surface-2); border-color: var(--teal); }
.card .cta { max-width: 360px; }

.checks { margin: 0 0 var(--sp-lg); padding: 0; list-style: none; }
.checks li { display: grid; grid-template-columns: 28px minmax(120px, 220px) 1fr; gap: var(--sp-md); align-items: start; padding: var(--sp-md) 0; border-top: var(--line) solid var(--border); }
.checks .mark { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: var(--r-full); background: var(--surface-2); color: var(--muted); font-weight: 800; font-size: 15px; }
.checks .what { font-weight: 700; }
.checks .said { color: var(--muted); }
.checks .ok .mark { background: var(--correct); color: var(--on-correct, #fff); }
.checks .bad .mark { background: var(--error); color: var(--on-error, #fff); }
.checks .bad .said { color: var(--text); }
.checks .soft .mark { background: var(--amber); color: #141A24; }
@media (max-width: 560px) { .checks li { grid-template-columns: 28px 1fr; } .checks .said { grid-column: 2; } }
.check-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-md); }
.check-acts .cta { padding: 0 var(--sp-2xl); }
[hidden] { display: none !important; }
