/* PlanMySeat school tracker. Mobile-first: base styles are for phones,
   the @media block at the bottom widens things on bigger screens. */

:root {
  --bg: #f6f6f2;
  --surface: #ffffff;
  --text: #1c232b;
  --muted: #56606b;
  --line: #dcdfe3;
  --accent: #1d5b86;
  --accent-text: #ffffff;
  --open-bg: #ddf3e4;   --open-text: #135a2a;
  --soon-bg: #fff0cf;   --soon-text: #6e4300;
  --closed-bg: #eaecef; --closed-text: #444c55;
  --warn: #8a4600;
  --ok-bg: #eaf3fb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

a { color: var(--accent); }

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 1.6rem; margin: 0.2rem 0 0.5rem; }
h2 { font-size: 1.2rem; margin: 0 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 0; }

.small { font-size: 0.9rem; color: var(--muted); }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 20px 0 16px;
}
.brand { margin: 0; font-weight: 700; letter-spacing: 0.02em; }
.brand a { text-decoration: none; }
.lead { margin: 0; color: var(--muted); }

main { padding-top: 16px; padding-bottom: 32px; }

.notice {
  border-left: 4px solid var(--accent);
  background: var(--ok-bg);
  padding: 10px 12px;
  margin: 0 0 16px;
  font-size: 0.95rem;
}

.sample-banner {
  background: var(--soon-bg);
  color: var(--soon-text);
  border: 1px dashed var(--soon-text);
  padding: 10px 12px;
  margin: 0 0 16px;
  font-weight: 600;
}

/* Age checker */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 24px;
}
.age-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.age-row { display: flex; flex-wrap: wrap; gap: 8px; }
.age-message { margin: 10px 0 0; font-weight: 600; }
.age-message:empty { display: none; }

input, select, button {
  font: inherit;
  min-height: 44px;           /* easy to tap on a phone */
  border-radius: 8px;
}
input, select {
  border: 1px solid #b9bfc6;
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
}
input[type="date"] { flex: 1 1 100%; }   /* own row on phones; see @media below */
button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  padding: 8px 18px;
  font-weight: 600;
  cursor: pointer;
}
button.secondary { background: var(--surface); color: var(--accent); }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.filters label { display: flex; flex-direction: column; font-weight: 600; font-size: 0.9rem; flex: 1 1 150px; }
.filters select { margin-top: 4px; }

/* School cards */
.school-list { display: grid; gap: 12px; }

.school {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.school-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.school-sub { margin: 2px 0 10px; color: var(--muted); font-size: 0.95rem; }

.status {
  flex: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-open   { background: var(--open-bg);   color: var(--open-text); }
.status-soon   { background: var(--soon-bg);   color: var(--soon-text); }
.status-closed { background: var(--closed-bg); color: var(--closed-text); }
.status-tba    { background: var(--surface);   color: var(--muted); border: 1px solid var(--line); }

.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 0.95rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.eligibility {
  margin: 12px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--ok-bg);
  font-size: 0.95rem;
}
.eligibility.yes { background: var(--open-bg); color: var(--open-text); }
.eligibility.no  { background: var(--closed-bg); color: var(--closed-text); }

.school-foot { margin: 12px 0 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 0.9rem; }
.unverified { color: var(--warn); font-weight: 600; }

.empty, .error {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}
.error { border-color: var(--warn); color: var(--warn); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 16px 0 32px; color: var(--muted); font-size: 0.9rem; }
.site-footer p { margin: 0 0 6px; }

/* Wider screens */
@media (min-width: 640px) {
  h1 { font-size: 2rem; }
  input[type="date"] { flex: 1 1 180px; }
  .facts { grid-template-columns: 11rem 1fr; }
}
