/* Free AA Meeting Directory — system fonts only, mobile first */
:root {
  --bg: #2f6fb5;
  --bg-deep: #245a94;
  --card: #ffffff;
  --text: #1a2330;
  --muted: #3d4a5c;
  --closed: #c01515;
  --line: #d8e1ec;
  --focus: #ffd454;
  --today: #ffd454;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 36, 64, 0.12), 0 4px 12px rgba(16, 36, 64, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: #fff;
  line-height: 1.45;
}

.skip {
  position: absolute;
  left: 8px;
  top: -40px;
  background: #fff;
  color: var(--bg-deep);
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 10;
  font-weight: 700;
}

.skip:focus { top: 8px; }

a {
  color: var(--bg-deep);
  font-weight: 600;
}

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

.site-header {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.15rem 1rem 0.5rem;
}

h1 {
  margin: 0 0 0.9rem;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1.2;
  text-wrap: balance;
}

.top-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.top-nav button {
  min-height: 44px;
  padding: 0.5rem 0.6rem;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--bg-deep);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.top-nav button[aria-expanded="true"] {
  background: var(--bg-deep);
  color: #fff;
  box-shadow: inset 0 0 0 2px #fff;
}

.panel {
  margin-top: 0.7rem;
  padding: 0.95rem 1rem;
  background: #fff;
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel p { margin: 0 0 0.7rem; }
.panel p:last-child { margin-bottom: 0; }

.search-form {
  display: grid;
  gap: 0.45rem;
}

.search-form label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.search-form select,
.btn-today {
  min-height: 44px;
  width: 100%;
  padding: 0.45rem 0.7rem;
  border: 1px solid #b8c5d6;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.btn-today {
  margin-top: 0.35rem;
  border: 0;
  background: var(--bg);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.btn-today:hover { background: var(--bg-deep); }

#meetings {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0.4rem 1rem 2rem;
}

.day-section { margin: 1.15rem 0 1.4rem; }

.day-heading {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.today-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--today);
  color: #1a2330;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.meeting-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.meeting {
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.85rem 1rem;
}

.meeting-time {
  margin: 0 0 0.15rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--bg-deep);
  font-variant-numeric: tabular-nums;
}

.meeting-name {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.closed-mark {
  color: var(--closed);
  font-weight: 800;
  margin-left: 0.3rem;
  letter-spacing: 0.02em;
}

.closed-mark .sr-only { /* keep C visible; hide extra words */ }

.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;
}

.meeting-notes {
  margin: -0.15rem 0 0.4rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.meeting-club {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.meeting-city,
.meeting-contact {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
}

.meeting-contact a { font-weight: 600; }

.day-note,
.closed-note {
  margin: 0.7rem 0 0;
  padding: 0.75rem 0.9rem;
  background: var(--card);
  color: var(--text);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  line-height: 1.4;
}

.closed-note { border-left: 4px solid var(--closed); }

.empty {
  margin: 1.25rem 0;
  padding: 1.1rem 1rem;
  background: #fff;
  color: var(--text);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
}

.site-footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer p { margin: 0 0 0.3rem; }

@media (min-width: 640px) {
  h1 { font-size: 2rem; }
  .top-nav { grid-template-columns: repeat(4, 1fr); }
  .search-form {
    grid-template-columns: 1fr 1fr auto;
    grid-template-areas:
      "type-label value-label ."
      "type value today";
    align-items: end;
    column-gap: 0.7rem;
  }
  .search-form label[for="search-type"] { grid-area: type-label; }
  .search-form #search-type { grid-area: type; }
  .search-form label[for="search-value"] { grid-area: value-label; }
  .search-form #search-value { grid-area: value; }
  .btn-today { grid-area: today; margin-top: 0; width: auto; white-space: nowrap; }
  .meeting {
    display: grid;
    grid-template-columns: 6.4rem 1fr;
    column-gap: 0.9rem;
  }
  .meeting-time {
    grid-column: 1;
    grid-row: 1 / -1;
    margin: 0;
    font-size: 1.05rem;
    padding-top: 0.1rem;
  }
  .meeting-name,
  .meeting-notes,
  .meeting-club,
  .meeting-city,
  .meeting-contact { grid-column: 2; }
}

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