@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #14213D;
  --saffron: #F4A300;
  --paper: #FAF8F3;
  --white: #FFFFFF;
  --ink: #14213D;
  --muted: #4A5468;   /* 7.2:1 on paper, 7.6:1 on white */
  --line: #D9D5CA;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

a { color: var(--navy); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--saffron);
}
.site-header :focus-visible,
.site-footer :focus-visible { outline-color: var(--saffron); box-shadow: none; }

.wrap {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 16px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  background: var(--saffron);
  color: var(--navy);
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 600;
  z-index: 10;
}
.skip-link:focus { top: 8px; }

/* Header */
.site-header {
  background: var(--navy);
  color: var(--paper);
  padding: 20px 0 24px;
  border-bottom: 4px solid var(--saffron);
}
.brand {
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand-au { color: var(--saffron); }
.site-header h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  line-height: 1.25;
}
.lede { margin: 0; opacity: 0.92; }

/* Notice */
.notice {
  margin: 20px 0;
  padding: 12px 14px;
  background: var(--white);
  border-left: 4px solid var(--saffron);
  border-radius: 6px;
  font-size: 0.9375rem;
}
.notice p { margin: 0 0 6px; }
.notice p:last-child { margin-bottom: 0; }

/* Filters */
.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-weight: 600; font-size: 0.875rem; }
.field input,
.field select {
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #8A8577;  /* 3.4:1 non-text contrast on paper */
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 44px;
  width: 100%;
}
.field-actions { justify-content: flex-end; }
.btn {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 2px solid var(--navy);
  background: transparent;
  color: var(--navy);
  cursor: pointer;
}
.btn:hover { background: var(--navy); color: var(--paper); }

@media (min-width: 40rem) {
  .filters { grid-template-columns: 1fr 1fr; }
  .field-search { grid-column: 1 / -1; }
}
@media (min-width: 60rem) {
  .filters { grid-template-columns: 1.5fr 1.3fr 1.3fr 1.6fr auto; align-items: end; }
  .field-search { grid-column: auto; }
}

.count { color: var(--muted); font-size: 0.9375rem; margin: 8px 0 12px; }

/* Cards */
.cards {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 40rem) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 60rem) { .cards { grid-template-columns: 1fr 1fr 1fr; } }

.card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.avatar {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1rem;
}
.card-body { min-width: 0; }
.card h2 {
  margin: 0 0 2px;
  font-size: 1.0625rem;
  line-height: 1.3;
}
.card p { margin: 0; font-size: 0.9375rem; }
.card .meta { color: var(--muted); }
.card .profile { margin-top: 6px; display: inline-block; font-size: 0.875rem; }

.card-vacant { border-style: dashed; background: transparent; }
.card-vacant .avatar {
  background: transparent;
  color: var(--navy);
  border: 2px dashed var(--navy);
}

.empty { padding: 16px; background: var(--white); border-radius: var(--radius); }

/* Footer */
.site-footer {
  background: var(--navy);
  color: var(--paper);
  padding: 20px 0 28px;
  font-size: 0.875rem;
}
.site-footer a { color: var(--paper); }
.site-footer p { margin: 0 0 8px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* View toggle */
.view-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 8px 0 12px;
}
.view-bar .count { margin: 0; }
.view-toggle { display: inline-flex; border: 2px solid var(--navy); border-radius: 8px; overflow: hidden; }
.toggle {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  min-width: 72px;
  padding: 8px 16px;
  border: 0;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
}
.toggle[aria-pressed="true"] { background: var(--navy); color: var(--paper); }

/* Map */
.map-view { margin-bottom: 32px; }
.map-layer { margin: 0 0 8px; font-size: 0.9375rem; }
.map-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.btn-small { min-height: 44px; min-width: 44px; padding: 8px 12px; font-size: 0.9375rem; }
.map-frame {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.map { display: block; width: 100%; height: auto; aspect-ratio: 1 / 0.72; max-height: 70vh; }
.map-status { position: absolute; inset: auto 0 0 0; margin: 0; padding: 8px 12px; font-size: 0.875rem; color: var(--muted); }
.map-status:empty { display: none; }
.seat {
  fill: #E7EAF1;
  stroke: var(--navy);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
}
.seat.is-match { fill: #76839F; }          /* 3.4:1 against dimmed seats */
.seat.is-dim { fill: #F3F2EE; stroke: #8A8577; }
.seat:hover { fill: #FBDFA6; }
.seat.is-selected { fill: var(--saffron); stroke-width: 2; }
.map-detail {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--white);
  border-left: 4px solid var(--saffron);
  border-radius: 6px;
}
.map-detail h2 { margin: 0 0 8px; font-size: 1.125rem; }
.map-detail .cards { margin: 0; }
.map-detail p { margin: 0; }
.seat-list { margin-top: 12px; }
.seat-list summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.seat-list ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.seat-btn {
  font: inherit;
  font-size: 0.9375rem;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #8A8577;
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
}
.seat-btn[aria-current="true"] { background: var(--navy); color: var(--paper); border-color: var(--navy); }
.map-credit { font-size: 0.8125rem; color: var(--muted); margin: 12px 0 0; }
