:root {
  --background: #f5f5f5;
  --surface: #ffffff;
  --text: #171717;
  --muted: #686868;
  --border: #dedede;
  --focus: #6aa9ff;
}

:root[data-theme="dark"] {
  --background: #121212;
  --surface: #1d1d1d;
  --text: #f2f2f2;
  --muted: #b2b2b2;
  --border: #393939;
  --focus: #8bb9ff;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; padding: clamp(22px, 6vw, 52px) 16px; color: var(--text); background: var(--background); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
main { width: min(100%, 760px); margin: 0 auto; }
.page-header { display: grid; gap: 24px; margin-bottom: 24px; }
.page-header a { width: fit-content; color: var(--text); font-size: .82rem; font-weight: 750; text-decoration: none; }
.page-header a:hover { text-decoration: underline; }
h1 { margin: 0; font-size: clamp(1.7rem, 7vw, 2.45rem); letter-spacing: -.035em; }
h2 { margin: 0 0 10px; font-size: 1.12rem; }
h3 { margin: 0 0 7px; font-size: .9rem; }
p, li { font-size: .88rem; line-height: 1.6; }
.intro { margin: 0 0 30px; color: var(--muted); font-size: 1rem; }
section { margin-top: 32px; }
code { overflow-wrap: anywhere; font-size: .82em; }
.consent-panel, .event-list article, .legal-note { padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.consent-panel > p { margin: 0 0 12px; font-weight: 700; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.consent-actions button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--text); border-radius: 9px; color: var(--text); background: var(--surface); font: inherit; font-size: .8rem; font-weight: 750; cursor: pointer; }
.consent-actions button[aria-pressed="true"] { color: var(--surface); background: var(--text); }
.event-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.event-list article p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }
.event-list article strong { color: var(--text); }
.legal-note { margin-top: 34px; color: var(--muted); font-size: .8rem; line-height: 1.5; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
[hidden] { display: none !important; }

@media (max-width: 560px) {
  .event-list, .consent-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
