:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --bg-elevated: rgba(255, 255, 255, 0.78);
  --surface: #ffffff;
  --text: #111318;
  --muted: #626b79;
  --accent: #235dff;
  --accent-soft: rgba(35, 93, 255, 0.12);
  --border: rgba(16, 22, 33, 0.1);
  --shadow: 0 22px 48px rgba(19, 28, 45, 0.08);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1117;
  --bg-elevated: rgba(18, 23, 33, 0.84);
  --surface: #151b25;
  --text: #ecf0f8;
  --muted: #9ca8be;
  --accent: #8da8ff;
  --accent-soft: rgba(141, 168, 255, 0.16);
  --border: rgba(180, 201, 255, 0.18);
  --shadow: 0 30px 54px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  body:not([data-theme]) {
    color-scheme: dark;
    --bg: #0e1117;
    --bg-elevated: rgba(18, 23, 33, 0.84);
    --surface: #151b25;
    --text: #ecf0f8;
    --muted: #9ca8be;
    --accent: #8da8ff;
    --accent-soft: rgba(141, 168, 255, 0.16);
    --border: rgba(180, 201, 255, 0.18);
    --shadow: 0 30px 54px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 420px at 80% -20%, var(--accent-soft), transparent 50%),
              radial-gradient(900px 420px at 10% 110%, var(--accent-soft), transparent 62%),
              var(--bg);
  min-height: 100vh;
  transition: background 260ms ease, color 260ms ease;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  padding: 0.65rem 0.9rem;
  border-radius: 0.6rem;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.background-glow { display: none; }

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.2rem 1.2rem 4rem;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2rem;
}

.theme-toggle {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text);
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
}

.subtitle {
  margin-top: 1rem;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.6;
}

.submit-cta {
  margin: 1.5rem 0 0;
}

.submit-link,
.back-link,
a.source {
  display: inline-flex;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.controls {
  margin-top: 2.25rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-elevated);
  backdrop-filter: blur(16px);
}

label {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  font-size: .82rem;
  color: var(--muted);
  font-weight: 600;
}

select,
input,
textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  padding: .72rem .82rem;
  font: inherit;
}

.stats-row {
  margin: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.stats {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-elevated);
}

.toggle-btn {
  border: 0;
  color: var(--muted);
  background: transparent;
  padding: 0.5rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.toggle-btn.is-active {
  background: var(--accent-soft);
  color: var(--text);
}


.empty-state {
  margin-top: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.empty-state h2 {
  margin: 0;
  font-size: 1.2rem;
}

.empty-state p {
  margin: 0.6rem 0 1rem;
  color: var(--muted);
}

.reset-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  padding: 0.55rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.95rem;
}

.card,
.submission-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.card h3 { margin: 0 0 .25rem; font-size: 1.08rem; }
.meta { color: var(--muted); font-size: .9rem; margin-bottom: .7rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .65rem 0; }
.chip {
  border: 1px solid var(--border);
  background: var(--accent-soft);
  color: var(--text);
  border-radius: 999px;
  padding: .18rem .58rem;
  font-size: .76rem;
}

.schedule { margin: .7rem 0; padding-left: 1.05rem; }
.schedule li { margin-bottom: .35rem; color: var(--muted); }

.submission-form { display: grid; gap: 0.9rem; }
textarea { resize: vertical; }

.submit-btn {
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  padding: 0.6rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

.form-help,
.form-status,
.footer {
  color: var(--muted);
  font-size: 0.85rem;
}

.form-status.is-success {
  margin-top: 0.25rem;
  padding: 0.95rem 1rem;
  border: 1px solid color-mix(in srgb, #2ec27e 55%, var(--border));
  border-left-width: 0.38rem;
  border-radius: 14px;
  background: linear-gradient(120deg, color-mix(in srgb, #2ec27e 22%, transparent), transparent 65%), var(--surface);
  color: color-mix(in srgb, #2ec27e 64%, var(--text));
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px color-mix(in srgb, #2ec27e 22%, transparent);
}

.form-status.is-success::before {
  content: "✓ Submission received";
  display: block;
  margin-bottom: 0.28rem;
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 800;
  color: color-mix(in srgb, #2ec27e 74%, var(--text));
}

.footer {
  margin-top: 1.5rem;
}

.map {
  height: 620px;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hidden { display: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 820px) {
  .controls { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .page { padding-top: 1.3rem; }
  .topbar { margin-bottom: 1.2rem; }
  .map { height: 460px; }
}
