:root {
  --green-950: #063c31;
  --green-900: #074c3d;
  --green-800: #0b604d;
  --green-700: #14745c;
  --green-100: #dff2ea;
  --green-50: #f0f8f5;
  --ink: #172d27;
  --muted: #687a73;
  --line: #d9e4df;
  --surface: #fff;
  --page: #f3f6f5;
  --shadow: 0 15px 40px rgba(6, 60, 49, .07);
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { min-height: 100vh; display: flex; flex-direction: column; margin: 0; background: var(--page); }
button, input, select { font: inherit; }
a { color: inherit; }

.topbar {
  position: relative;
  overflow: hidden;
  color: #fff;
  border-bottom: 4px solid #4bc096;
  background: linear-gradient(112deg, var(--green-950), var(--green-800));
}
.topbar::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -140px;
  top: -250px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  pointer-events: none;
}
.topbar__inner, .page-shell, .footer-inner { width: min(1220px, calc(100% - 40px)); margin-inline: auto; }
.topbar__inner { position: relative; z-index: 1; min-height: 116px; display: flex; align-items: center; gap: 20px; }
.brand-logo {
  width: 72px;
  height: 82px;
  display: block;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 16px;
  background-color: #fff;
  background-image: url("logo-sme.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 340% auto;
  box-shadow: 0 9px 25px rgba(0, 0, 0, .17);
}
.eyebrow { margin: 0; font-size: .78rem; font-weight: 820; letter-spacing: .09em; text-transform: uppercase; opacity: .76; }
.topbar h1 { max-width: 760px; margin: 5px 0 0; font-size: clamp(1.45rem, 2.8vw, 2.1rem); line-height: 1.12; letter-spacing: -.025em; }

.page-shell { flex: 1 0 auto; padding: 42px 0 66px; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 28px; margin-bottom: 23px; }
.intro h2 { margin: 12px 0 8px; font-size: clamp(1.8rem, 3.8vw, 2.55rem); line-height: 1.1; letter-spacing: -.045em; }
.intro p { max-width: 730px; margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.year-pill { display: inline-flex; padding: 7px 11px; color: var(--green-900); border-radius: 999px; background: var(--green-100); font-size: .78rem; font-weight: 800; }
.last-update { min-width: 220px; padding: 13px 16px; border-left: 3px solid var(--green-700); border-radius: 0 11px 11px 0; background: rgba(255, 255, 255, .72); }
.last-update span, .last-update strong { display: block; }
.last-update span { color: var(--muted); font-size: .7rem; font-weight: 840; letter-spacing: .08em; }
.last-update strong { margin-top: 5px; font-size: .88rem; }

.filter-card { display: grid; grid-template-columns: minmax(280px, 2fr) minmax(170px, 1fr) minmax(170px, 1fr) auto; align-items: end; gap: 15px; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow); }
.field { min-width: 0; }
.field label { display: block; margin: 0 0 7px; color: #3f574d; font-size: .875rem; font-weight: 750; }
input, select { width: 100%; min-height: 46px; padding: 0 13px; color: var(--ink); border: 1px solid #c9d8d1; border-radius: 10px; background: #fff; outline: none; }
input:focus, select:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(20, 116, 92, .11); }
.input-icon { position: relative; }
.input-icon svg { position: absolute; width: 19px; height: 19px; left: 14px; top: 14px; fill: none; stroke: #6c8178; stroke-width: 2; stroke-linecap: round; }
.input-icon input { padding-left: 43px; }
.filter-actions { display: flex; gap: 8px; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 0 18px; border: 1px solid transparent; border-radius: 10px; font-weight: 780; text-decoration: none; cursor: pointer; transition: background .15s, transform .15s; }
.button:hover { transform: translateY(-1px); }
.button--primary { color: #fff; background: var(--green-800); }
.button--primary:hover { background: var(--green-950); }
.button--ghost { color: var(--green-900); border-color: #cad9d2; background: #fff; }

.results-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 38px 0 15px; }
.results-heading .eyebrow { color: var(--green-700); opacity: 1; }
.results-heading h2 { margin: 5px 0 0; font-size: 1.4rem; }
.privacy-note { max-width: 420px; margin: 0; color: var(--muted); font-size: .84rem; text-align: right; }
.queue-groups { display: grid; gap: 18px; }
.queue-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 6px 22px rgba(6, 60, 49, .05); }
.queue-card__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, var(--green-50), #fff 58%); }
.queue-card__header h3 { margin: 4px 0 0; font-size: 1.22rem; }
.location-label { color: var(--green-700); font-size: .76rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.count-badge { padding: 6px 10px; color: var(--green-900); border: 1px solid #cce4db; border-radius: 999px; background: #fff; font-size: .76rem; font-weight: 750; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { position: sticky; z-index: 1; top: 0; padding: 12px 15px; color: #53675f; background: #f8faf9; font-size: .74rem; font-weight: 800; letter-spacing: .035em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 14px 15px; border-top: 1px solid #edf2f0; font-size: .89rem; vertical-align: middle; }
tbody tr:nth-child(even) { background: #fbfdfc; }
tbody tr:hover { background: var(--green-50); }
.position-col { width: 90px; }
.position-badge { min-width: 42px; height: 30px; display: inline-grid; place-items: center; padding: 0 8px; color: #fff; border-radius: 8px; background: var(--green-800); font-weight: 850; }
.school-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.school-tags span { display: inline-flex; padding: 5px 8px; color: #385148; border-radius: 7px; background: #edf4f1; font-size: .78rem; }
.muted { color: var(--muted); }
.state-card { margin-top: 33px; padding: 52px 24px; text-align: center; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.state-card h2 { margin: 12px 0 6px; }
.state-card p { margin: 0; color: var(--muted); }
.state-card--error { border-color: #efc8c8; background: #fff8f8; }
.state-icon { width: 44px; height: 44px; display: grid; place-items: center; margin: auto; color: var(--green-900); border-radius: 50%; background: var(--green-100); font-weight: 900; }

footer { margin-top: auto; border-top: 1px solid var(--line); background: #fff; }
.footer-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .81rem; }

@media (min-width: 1100px) {
  .topbar__inner { min-height: 126px; }
  .brand-logo { width: 78px; height: 90px; }
  .page-shell { padding-top: 48px; }
  .filter-card { padding: 22px 24px; }
}

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; align-items: start; gap: 17px; }
  .last-update { width: fit-content; }
  .filter-card { grid-template-columns: 1fr 1fr; }
  .field--search { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .topbar__inner, .page-shell, .footer-inner { width: min(100% - 26px, 560px); }
  .topbar__inner { min-height: 94px; gap: 13px; }
  .brand-logo { width: 55px; height: 63px; border-radius: 12px; }
  .topbar .eyebrow { font-size: .64rem; }
  .topbar h1 { margin-top: 4px; font-size: 1.02rem; line-height: 1.18; }
  .page-shell { padding: 28px 0 46px; }
  .intro { gap: 14px; margin-bottom: 18px; }
  .intro h2 { margin-top: 10px; font-size: 1.68rem; }
  .intro p { font-size: .91rem; line-height: 1.55; }
  .last-update { padding: 11px 14px; }
  .filter-card { grid-template-columns: 1fr; padding: 15px; }
  .field--search { grid-column: auto; }
  .filter-actions .button { flex: 1; }
  .results-heading { align-items: flex-start; flex-direction: column; gap: 8px; margin-top: 31px; }
  .privacy-note { text-align: left; }
  .queue-card__header { align-items: flex-start; padding: 15px 16px; }
  .table-wrap { overflow: visible; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody tr { padding: 13px 15px; border-top: 1px solid var(--line); }
  tbody tr:first-child { border-top: 0; }
  td { display: grid; grid-template-columns: 106px minmax(0, 1fr); align-items: start; gap: 11px; padding: 7px 0; border: 0; }
  td::before { content: attr(data-label); color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
  .footer-inner { min-height: 88px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
