:root {
  --paper: #f4f1e9;
  --paper-bright: #fbfaf6;
  --paper-deep: #ebe6da;
  --ink: #17232d;
  --ink-soft: #53616a;
  --rule: #cfc9bc;
  --rule-strong: #aaa397;
  --blue: #1268d4;
  --blue-dark: #084b9e;
  --blue-soft: #dceaff;
  --coral: #ec604c;
  --danger: #a52d26;
  --success: #18704d;
  --display: ui-rounded, "Avenir Next", "Trebuchet MS", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --radius-sm: 0.55rem;
  --radius-md: 0.9rem;
  --radius-lg: 1.35rem;
  --shadow-control: 0 1px 1px rgb(23 35 45 / 8%), 0 8px 24px rgb(23 35 45 / 7%);
  --shadow-map: 0 2px 2px rgb(23 35 45 / 8%), 0 24px 60px rgb(23 35 45 / 12%);
}

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

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 13% 7%, rgb(255 255 255 / 52%) 0 1px, transparent 1.5px),
    radial-gradient(circle at 78% 43%, rgb(23 35 45 / 5%) 0 0.7px, transparent 1.2px);
  background-size: 19px 23px, 29px 31px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 0.08em;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--blue-soft);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--paper-bright);
  font-weight: 750;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(100%, 90rem);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 4rem);
}

.site-header {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand__mark {
  position: relative;
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper-bright);
}

.brand__mark span {
  position: absolute;
  width: 1.35rem;
  height: 0.35rem;
  border: 1px solid var(--blue);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.brand__mark span:nth-child(2) {
  width: 0.9rem;
  height: 1.35rem;
  transform: rotate(28deg);
}

.brand__mark span:nth-child(3) {
  width: 0.28rem;
  height: 0.28rem;
  border: 0;
  background: var(--coral);
  transform: none;
}

.header-link {
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.header-link:hover {
  color: var(--blue-dark);
}

.task-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(24rem, 1.12fr);
  grid-template-areas:
    "query atlas"
    "result atlas"
    "actions actions";
  column-gap: clamp(2.5rem, 6vw, 6.5rem);
  row-gap: 1.5rem;
  min-height: calc(100vh - 5rem);
  padding-block: clamp(2rem, 4.5vh, 3.75rem) clamp(3.5rem, 7vh, 6rem);
  border-bottom: 1px solid var(--rule);
}

.query-panel {
  grid-area: query;
  align-self: start;
  min-width: 0;
}

.eyebrow,
.status-label {
  margin: 0 0 0.65rem;
  color: var(--blue-dark);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  font-family: var(--display);
  text-wrap: balance;
}

h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.4rem, 4.2vw, 4rem);
  font-weight: 780;
  letter-spacing: -0.058em;
  line-height: 0.98;
}

.lede {
  max-width: 36rem;
  margin: 0.85rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.92rem, 1.1vw, 1.02rem);
  line-height: 1.52;
}

.lookup-form {
  width: 100%;
  max-width: 39rem;
  margin-top: 1.05rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.lookup-form > label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.015em;
}

.label-emphasis {
  display: block;
  margin-top: 0.12rem;
  color: var(--success);
  font-size: 0.7rem;
  font-weight: 780;
  letter-spacing: 0;
}

.lookup-form__row {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
}

.lookup-form input {
  min-width: 0;
  min-height: 3.55rem;
  flex: 1 1 18rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-md);
  background: var(--paper-bright);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 70%);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.lookup-form input::placeholder {
  color: #7d858a;
  opacity: 1;
}

.lookup-form input:hover {
  border-color: #777e7f;
}

.lookup-form input:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgb(18 104 212 / 18%);
}

.lookup-form input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgb(165 45 38 / 12%);
}

.button {
  min-height: 3.55rem;
  padding: 0.8rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 0.91rem;
  font-weight: 820;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 130ms ease, background-color 130ms ease, box-shadow 130ms ease;
}

.button--primary {
  flex: 0 0 auto;
  background: var(--blue);
  box-shadow: 0 7px 18px rgb(18 104 212 / 18%);
  color: #fff;
}

.button--primary:hover {
  background: var(--blue-dark);
  box-shadow: 0 9px 22px rgb(8 75 158 / 22%);
  transform: translateY(-1px);
}

.button--primary:active {
  transform: translateY(0);
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.field-hint {
  margin: 0.45rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.location-button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--blue);
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color 130ms ease, border-color 130ms ease, color 130ms ease;
}

.location-button:hover {
  border-color: var(--blue-dark);
  background: #cbdfff;
  color: var(--blue-dark);
}

.location-button svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.privacy-note {
  display: flex;
  max-width: 37rem;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.5;
}

.privacy-note svg {
  flex: 0 0 auto;
  margin-top: 0.1rem;
  fill: none;
  stroke: var(--success);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.default-location-status {
  margin: 0;
  color: var(--blue-dark);
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.45;
}

.location-overview {
  width: 100%;
  max-width: 39rem;
  min-height: 14.5rem;
  margin-top: 1.15rem;
  padding-block: 0.95rem;
  border-block: 1px solid var(--rule);
}

.location-overview[data-state="loading"],
.location-overview[data-state="privacy"],
.location-overview[data-state="unavailable"],
.location-overview[data-state="idle"] {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.district-summary {
  min-width: 0;
}

.location-caveat {
  max-width: 38rem;
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.48;
}

.precision-upgrade {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.85rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--rule);
}

.precision-hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.4;
}

.precision-status {
  margin: 0.75rem 0 0;
  padding-left: 0.7rem;
  border-left: 3px solid var(--blue);
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 680;
  line-height: 1.48;
}

.precision-status[data-tone="error"] {
  border-left-color: var(--danger);
  color: #79251f;
}

.form-error {
  max-width: 38rem;
  margin: 0.85rem 0 0;
  padding: 0.75rem 0.85rem;
  border-left: 3px solid var(--danger);
  background: rgb(165 45 38 / 7%);
  color: #79251f;
  font-size: 0.84rem;
  font-weight: 650;
}

.lookup-progress {
  max-width: 39rem;
  margin-top: 1.4rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: rgb(251 250 246 / 72%);
}

.lookup-progress__label {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: 0.96rem;
  font-weight: 800;
}

.lookup-progress__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lookup-progress__steps li {
  position: relative;
  color: #808681;
  font-size: 0.68rem;
  line-height: 1.35;
}

.lookup-progress__steps li span {
  display: block;
  width: 100%;
  height: 3px;
  margin-bottom: 0.45rem;
  overflow: hidden;
  border-radius: 4px;
  background: var(--paper-deep);
}

.lookup-progress__steps li span::after {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--blue);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
}

.lookup-progress__steps li.is-active,
.lookup-progress__steps li.is-done {
  color: var(--ink);
}

.lookup-progress__steps li.is-active span::after {
  animation: progress-fill 1.25s ease-in-out infinite;
}

.lookup-progress__steps li.is-done span::after {
  transform: scaleX(1);
}

@keyframes progress-fill {
  0% { transform: scaleX(0); }
  70%, 100% { transform: scaleX(1); }
}

.candidate-panel {
  max-width: 39rem;
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}

.section-heading h2,
.candidate-panel h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.candidate-panel__hint {
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

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

.candidate-button {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--paper-bright);
  box-shadow: 0 2px 8px rgb(23 35 45 / 4%);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 130ms ease, transform 130ms ease, box-shadow 130ms ease;
}

.candidate-button:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-control);
  transform: translateY(-1px);
}

.candidate-button__address {
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.4;
}

.candidate-button__action {
  color: var(--blue-dark);
  font-size: 0.75rem;
  font-weight: 820;
  white-space: nowrap;
}

.result-panel {
  grid-area: result;
  align-self: start;
  min-width: 0;
  padding-top: 0.95rem;
  border-top: 1px solid var(--rule);
  animation: result-in 300ms ease-out both;
}

.result-details-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.result-details-heading .status-label {
  margin: 0;
}

.result-details-heading h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

@keyframes result-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.result-confirmation__dot {
  width: 0.58rem;
  height: 0.58rem;
  flex: 0 0 auto;
  margin-top: 0.26rem;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 2px var(--success);
}

.result-confirmation .status-label {
  margin-bottom: 0.18rem;
  color: var(--success);
}

.matched-address {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.77rem;
  line-height: 1.42;
}

.district-tabs {
  width: max-content;
  max-width: 100%;
  display: flex;
  gap: 0.25rem;
  margin: 0 0 1rem;
  padding: 0.25rem;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  background: var(--paper-deep);
  scrollbar-width: thin;
}

.district-tab {
  min-height: 2.35rem;
  padding: 0.45rem 0.8rem;
  border: 0;
  border-radius: 0.52rem;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.district-tab[aria-selected="true"] {
  background: var(--paper-bright);
  box-shadow: 0 1px 4px rgb(23 35 45 / 12%);
  color: var(--blue-dark);
}

.district-answer:focus {
  outline: none;
}

.district-answer:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 0.45rem;
}

.district-type {
  margin: 0 0 0.38rem;
  color: var(--blue-dark);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.district-answer h2 {
  max-width: 25ch;
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.district-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0.75rem 0 0;
  border-block: 1px solid var(--rule);
}

.district-facts div {
  min-width: 0;
  padding: 0.8rem 0.8rem 0.85rem 0;
}

.district-facts div + div {
  padding-left: 0.8rem;
  border-left: 1px solid var(--rule);
}

.district-facts dt {
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.district-facts dd {
  margin: 0.24rem 0 0;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.atlas-column {
  grid-area: atlas;
  align-self: start;
  min-width: 0;
  perspective: 80rem;
}

.atlas-stage {
  position: relative;
  margin: 0;
  padding: 0.9rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background: var(--paper-bright);
  box-shadow: var(--shadow-map);
  transform-origin: 50% 60%;
  transform-style: preserve-3d;
  will-change: transform;
}

.atlas-stage::before,
.atlas-stage::after {
  position: absolute;
  z-index: -1;
  right: 1rem;
  bottom: -0.55rem;
  left: 1rem;
  height: 0.7rem;
  border: 1px solid var(--rule-strong);
  border-top: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: #e6e0d4;
  content: "";
}

.atlas-stage::after {
  right: 2rem;
  bottom: -0.95rem;
  left: 2rem;
  height: 0.5rem;
  background: #d8d1c4;
}

.atlas-stage__topline {
  min-height: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0.25rem 0.65rem;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.map-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--blue-dark);
  text-align: right;
}

.map-status::before {
  width: 0.38rem;
  height: 0.38rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.atlas-stage[data-state="loading"] .map-status::before {
  animation: status-pulse 900ms ease-in-out infinite alternate;
}

.atlas-stage[data-state="unavailable"] .map-status {
  color: var(--danger);
}

@keyframes status-pulse {
  to { opacity: 0.2; }
}

.atlas-canvas {
  position: relative;
  aspect-ratio: 1000 / 620;
  overflow: hidden;
  border: 1px solid #b9b4aa;
  border-radius: 0.8rem;
  background: #edf3f5;
}

.boundary-map {
  width: 100%;
  height: 100%;
}

.map-paper {
  fill: #edf2f2;
}

.map-grid-line {
  fill: none;
  stroke: #92a7aa;
  stroke-opacity: 0.23;
  stroke-width: 1;
}

.preview-boundary path:first-child {
  fill: rgb(18 104 212 / 9%);
  stroke: #547c9d;
  stroke-dasharray: 9 10;
  stroke-width: 3;
}

.preview-boundary path:nth-of-type(2) {
  fill: none;
  stroke: #849a9d;
  stroke-width: 2;
}

.preview-boundary circle {
  fill: var(--coral);
  stroke: var(--paper-bright);
  stroke-width: 5;
}

.preview-boundary path:last-child {
  fill: none;
  stroke: #72888b;
  stroke-dasharray: 3 9;
  stroke-width: 2;
}

.atlas-stage[data-state="loading"] .preview-boundary {
  opacity: 0.45;
}

.real-boundary .district-shape {
  fill: rgb(18 104 212 / 16%);
  fill-rule: evenodd;
  stroke: var(--blue-dark);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
  animation: boundary-draw 950ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.real-boundary .district-shape[data-animate="true"] {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

@keyframes boundary-draw {
  0% { fill-opacity: 0; stroke-dashoffset: 1; }
  62% { fill-opacity: 0.04; }
  100% { fill-opacity: 1; stroke-dashoffset: 0; }
}

.real-boundary .pin-halo {
  fill: rgb(236 96 76 / 19%);
  stroke: rgb(236 96 76 / 48%);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.real-boundary .pin-dot {
  fill: var(--coral);
  stroke: #fff;
  stroke-width: 5;
  vector-effect: non-scaling-stroke;
}

.real-boundary .address-pin {
  animation: pin-settle 500ms 420ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes pin-settle {
  from { opacity: 0; transform: translateY(-18px) scale(0.72); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.map-coordinate {
  position: absolute;
  z-index: 2;
  color: #55686b;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.map-coordinate--top {
  top: 0.75rem;
  right: 0.8rem;
}

.map-coordinate--bottom {
  right: 0.8rem;
  bottom: 0.65rem;
  padding: 0.2rem 0.35rem;
  background: rgb(237 242 242 / 76%);
}

.atlas-stage figcaption {
  min-height: 3.1rem;
  margin-top: 0.78rem;
  padding-inline: 0.25rem;
  color: var(--ink-soft);
  font-size: 0.73rem;
  line-height: 1.5;
}

.source-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.3rem 0 0;
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.official-source-link {
  color: var(--blue-dark);
  font-weight: 760;
}

.result-actions {
  grid-area: actions;
  margin-top: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.action-button,
.check-another {
  min-height: 2.65rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--paper-bright);
  box-shadow: 0 1px 2px rgb(23 35 45 / 5%);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 130ms ease, color 130ms ease, transform 130ms ease;
}

.action-button:hover,
.check-another:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
  transform: translateY(-1px);
}

.action-button[aria-pressed="true"] {
  border-color: var(--success);
  background: rgb(24 112 77 / 7%);
  color: var(--success);
}

.result-guidance {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 1.2rem;
}

.result-guidance p {
  max-width: 54rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.result-guidance strong {
  color: var(--ink);
}

.verification-link {
  flex: 0 0 auto;
  font-size: 0.76rem;
}

.check-another {
  margin-top: 1.35rem;
  padding-inline: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--blue-dark);
}

.check-another span {
  display: inline-block;
  margin-right: 0.35rem;
}

.print-location-note {
  display: none;
}

.explainer {
  display: grid;
  grid-template-columns: minmax(15rem, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(2.5rem, 8vw, 8rem);
  padding-block: clamp(4.5rem, 10vw, 9rem);
  border-bottom: 1px solid var(--rule);
}

.explainer__intro h2 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.process-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule-strong);
  list-style: none;
}

.process-list li {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 1rem;
  padding-block: 1.3rem;
  border-bottom: 1px solid var(--rule);
}

.process-list__number {
  color: var(--blue-dark);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 800;
}

.process-list h3,
.definition-note h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.018em;
}

.process-list p {
  max-width: 40rem;
  margin: 0.32rem 0 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.definition-note {
  grid-column: 2;
  margin-top: 1.2rem;
  padding: 1.25rem 0 0 4.2rem;
  border-top: 1px solid var(--rule);
}

.definition-note p {
  max-width: 48rem;
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.site-footer {
  min-height: 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  gap: 1.15rem;
}

.site-footer a {
  font-weight: 700;
}

.legal-dialog {
  width: min(46rem, calc(100% - 2rem));
  max-height: min(48rem, calc(100dvh - 2rem));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background: var(--paper-bright);
  box-shadow: 0 30px 100px rgb(15 24 31 / 30%);
  color: var(--ink);
}

.legal-dialog::backdrop {
  background: rgb(16 27 35 / 58%);
  backdrop-filter: blur(3px);
}

.legal-dialog__frame {
  max-height: min(48rem, calc(100dvh - 2rem));
  padding: clamp(1.25rem, 4vw, 2.4rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.legal-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.legal-dialog__header h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.dialog-close {
  width: 2.65rem;
  height: 2.65rem;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
}

.legal-dialog__nav {
  display: flex;
  gap: 0.3rem;
  margin-top: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.legal-dialog__nav a {
  padding: 0.5rem 0.8rem;
  border-radius: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.legal-dialog__nav a[aria-current="page"] {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.legal-copy {
  padding-top: 1.25rem;
}

.legal-copy__updated {
  margin: 0 0 1.4rem;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.legal-copy h3 {
  margin: 1.35rem 0 0;
  font-size: 1rem;
}

.legal-copy p:not(.legal-copy__updated) {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.7;
}

.noscript-note {
  position: fixed;
  z-index: 80;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  max-width: 42rem;
  margin-inline: auto;
  padding: 0.85rem 1rem;
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  background: var(--paper-bright);
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 700;
}

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

@media (max-width: 67rem) {
  .task-stage {
    grid-template-columns: minmax(0, 0.95fr) minmax(21rem, 1.05fr);
    column-gap: 2.5rem;
  }

  h1 {
    font-size: clamp(2.4rem, 5.5vw, 3.5rem);
  }

  .lookup-form__row {
    flex-direction: column;
  }

  .lookup-form input {
    width: 100%;
    flex: 0 0 auto;
  }

  .button--primary {
    width: 100%;
  }

  .district-facts {
    grid-template-columns: 1fr 1fr;
  }

  .district-facts div:nth-child(3) {
    grid-column: 1 / -1;
    padding-left: 0;
    border-top: 1px solid var(--rule);
    border-left: 0;
  }
}

@media (max-width: 48rem) {
  .site-shell {
    padding-inline: clamp(1rem, 4.5vw, 2rem);
  }

  .site-header {
    min-height: 4.25rem;
  }

  .header-link {
    display: none;
  }

  .task-stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "query"
      "atlas"
      "result"
      "actions";
    min-height: 0;
    padding-block: 1.6rem 3.75rem;
  }

  .query-panel {
    align-self: start;
  }

  h1 {
    max-width: 14ch;
    font-size: clamp(2.25rem, 10.8vw, 3.2rem);
  }

  .lede {
    margin-top: 0.7rem;
    font-size: 0.9rem;
  }

  .location-overview {
    min-height: 13.75rem;
    margin-top: 0.85rem;
    padding-block: 0.8rem;
  }

  .lookup-form {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
  }

  .lookup-form input {
    font-size: 1rem;
  }

  .result-panel {
    padding-top: 0;
  }

  .district-answer h2 {
    font-size: clamp(1.55rem, 8vw, 2.2rem);
  }

  .atlas-column {
    align-self: start;
  }

  .atlas-stage {
    padding: 0.7rem;
    border-radius: 1.05rem;
    box-shadow: 0 2px 2px rgb(23 35 45 / 7%), 0 16px 38px rgb(23 35 45 / 11%);
  }

  .atlas-stage::after {
    display: none;
  }

  .atlas-canvas {
    min-height: 13rem;
  }

  .source-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .result-guidance {
    flex-direction: column;
    gap: 0.7rem;
  }

  .explainer {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-block: 4.5rem;
  }

  .definition-note {
    grid-column: auto;
    padding-left: 0;
  }

  .site-footer {
    min-height: 7rem;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.65rem;
  }
}

@media (max-width: 27rem) {
  .brand__name {
    font-size: 0.78rem;
  }

  .precision-upgrade {
    align-items: stretch;
    flex-direction: column;
    gap: 0.35rem;
  }

  .location-button {
    width: 100%;
  }

  .result-details-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .lookup-progress__steps {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .lookup-progress__steps li {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    align-items: center;
    gap: 0.55rem;
  }

  .lookup-progress__steps li span {
    margin: 0;
  }

  .district-facts {
    grid-template-columns: 1fr;
  }

  .district-facts div + div,
  .district-facts div:nth-child(3) {
    grid-column: auto;
    padding-left: 0;
    border-top: 1px solid var(--rule);
    border-left: 0;
  }

  .candidate-button {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .atlas-canvas {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
}

@media (hover: hover) and (pointer: fine) {
  .atlas-stage[data-state="loaded"] {
    cursor: crosshair;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .atlas-stage {
    transform: none !important;
  }
}

@media (forced-colors: active) {
  .result-confirmation__dot,
  .map-status::before,
  .brand__mark span:nth-child(3) {
    forced-color-adjust: none;
  }

  .real-boundary .district-shape {
    fill: transparent;
    stroke: CanvasText;
  }
}

@media print {
  @page {
    margin: 0.65in;
  }

  body {
    min-width: 0;
    background: #fff;
    color: #000;
  }

  .site-shell {
    width: 100%;
    padding: 0;
  }

  .site-header,
  .query-panel > .eyebrow,
  .query-panel > h1,
  .query-panel > .lede,
  .lookup-form,
  .lookup-progress,
  .candidate-panel,
  .default-location-status,
  .precision-upgrade,
  .precision-status,
  .location-caveat,
  .district-tabs,
  .matched-address,
  .action-row,
  .check-another,
  .explainer,
  .site-footer,
  .source-line,
  .legal-dialog {
    display: none !important;
  }

  .task-stage {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    grid-template-areas:
      "query atlas"
      "result atlas"
      "actions actions";
    min-height: 0;
    gap: 0.35in;
    padding: 0;
    border: 0;
  }

  .query-panel,
  .result-panel,
  .atlas-column,
  .result-actions {
    display: block !important;
  }

  .location-overview,
  .district-summary {
    min-height: 0;
    display: block !important;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .result-confirmation {
    display: none;
  }

  .district-answer h2 {
    font-size: 28pt;
  }

  .atlas-stage {
    break-inside: avoid;
    box-shadow: none;
    transform: none !important;
  }

  .atlas-stage::before,
  .atlas-stage::after {
    display: none;
  }

  .result-actions {
    border-top: 1px solid #777;
  }

  .print-location-note {
    display: block;
    margin: 0 0 0.4rem;
    font-size: 8pt;
  }

  .result-guidance {
    display: block;
  }

  .verification-link {
    display: none;
  }
}

/* Real interactive map and nearby-school workspace */
.atlas-column {
  perspective: none;
}

.atlas-stage {
  transform: none !important;
  transform-style: flat;
  will-change: auto;
}

.interactive-map {
  position: relative;
  height: clamp(25rem, 52vh, 34rem);
  min-height: 25rem;
  aspect-ratio: auto;
  isolation: isolate;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  background: #dce7eb;
  outline: none;
  user-select: none;
}

.interactive-map:active {
  cursor: grabbing;
}

.interactive-map:focus-visible {
  outline: 3px solid rgb(18 104 212 / 55%);
  outline-offset: 3px;
}

.interactive-map:fullscreen,
.interactive-map.is-fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
}

.map-tile-layer,
.map-overlay,
.map-marker-layer {
  position: absolute;
  inset: 0;
}

.map-tile-layer {
  z-index: 0;
  overflow: hidden;
  background: #dce7eb;
}

.map-tile {
  position: absolute;
  top: 0;
  left: 0;
  width: 256px;
  height: 256px;
  max-width: none;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  transition: opacity 140ms ease;
}

.map-tile.is-loaded {
  opacity: 1;
}

.map-tile.is-unavailable {
  visibility: hidden;
}

.map-overlay {
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.map-marker-layer {
  z-index: 3;
  pointer-events: none;
}

.real-boundary .district-shape {
  fill: rgb(18 104 212 / 17%);
  fill-rule: evenodd;
  stroke: #0752ae;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 1px rgb(0 36 82 / 25%));
}

.map-location-layer .location-accuracy {
  fill: rgb(236 96 76 / 11%);
  stroke: rgb(190 62 44 / 42%);
  stroke-dasharray: 5 5;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.map-location-layer .location-halo {
  fill: rgb(236 96 76 / 24%);
  stroke: rgb(236 96 76 / 46%);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.map-location-layer .location-dot {
  fill: var(--coral);
  stroke: #fff;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 3px rgb(23 35 45 / 45%));
}

.school-map-marker {
  position: absolute;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--blue-dark);
  box-shadow: 0 2px 8px rgb(23 35 45 / 34%);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transform-origin: center;
  cursor: pointer;
  transition: box-shadow 140ms ease, background 140ms ease, transform 140ms ease;
}


.school-map-marker:hover,
.school-map-marker:focus-visible,
.school-map-marker.is-selected {
  z-index: 2;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgb(255 255 255 / 75%), 0 5px 14px rgb(23 35 45 / 36%);
  outline: none;
  transform: translate(-50%, -50%) scale(1.14);
}

.map-controls {
  position: absolute;
  z-index: 6;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  pointer-events: auto;
}

.map-control-group {
  overflow: hidden;
  border: 1px solid rgb(54 70 80 / 42%);
  border-radius: 0.55rem;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 2px 9px rgb(23 35 45 / 20%);
}

.map-control-group--actions {
  display: flex;
}

.map-control-group button {
  width: 2.55rem;
  height: 2.55rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: rgb(255 255 255 / 96%);
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.map-control-group:not(.map-control-group--actions) button + button {
  border-top: 1px solid rgb(54 70 80 / 25%);
}

.map-control-group--actions button + button {
  border-left: 1px solid rgb(54 70 80 / 25%);
}

.map-control-group button:hover:not(:disabled) {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.map-control-group button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgb(18 104 212 / 45%);
  outline-offset: -3px;
}

.map-control-group button:disabled {
  color: #8a9397;
  cursor: not-allowed;
  opacity: 0.58;
}

.map-control-group svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.map-empty-state {
  position: absolute;
  z-index: 4;
  right: 0.8rem;
  bottom: 2.35rem;
  width: min(18rem, calc(100% - 1.6rem));
  padding: 0.7rem 0.78rem;
  border: 1px solid rgb(54 70 80 / 28%);
  border-radius: 0.65rem;
  background: rgb(251 250 246 / 92%);
  box-shadow: 0 4px 16px rgb(23 35 45 / 16%);
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.42;
  pointer-events: none;
}

.map-empty-state strong,
.map-empty-state span {
  display: block;
}

.map-empty-state strong {
  margin-bottom: 0.15rem;
  color: var(--ink);
  font-size: 0.76rem;
}

.map-legend {
  position: absolute;
  z-index: 5;
  bottom: 1.75rem;
  left: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  max-width: calc(100% - 1.1rem);
  padding: 0.36rem 0.48rem;
  border: 1px solid rgb(54 70 80 / 24%);
  border-radius: 0.5rem;
  background: rgb(251 250 246 / 90%);
  box-shadow: 0 2px 7px rgb(23 35 45 / 14%);
  color: var(--ink-soft);
  font-size: 0.58rem;
  font-weight: 730;
  line-height: 1.2;
  pointer-events: none;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.map-legend i {
  width: 0.72rem;
  height: 0.72rem;
  display: inline-block;
  flex: 0 0 auto;
}

.legend-boundary {
  border: 2px solid var(--blue-dark);
  background: rgb(18 104 212 / 16%);
}

.legend-location {
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 1px rgb(23 35 45 / 24%);
}

.legend-school {
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0.18rem;
  background: var(--blue-dark);
  box-shadow: 0 0 0 1px rgb(23 35 45 / 24%);
  transform: rotate(-45deg);
}

.map-attribution {
  position: absolute;
  z-index: 7;
  right: 0;
  bottom: 0;
  padding: 0.12rem 0.35rem;
  background: rgb(255 255 255 / 86%);
  color: #32444d;
  font-size: 0.58rem;
  line-height: 1.35;
}

.map-attribution a {
  font-weight: 650;
  text-decoration: none;
}

.map-attribution a:hover {
  text-decoration: underline;
}

.source-line__links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 0.8rem;
}

.nearby-schools {
  margin-top: 1.35rem;
  padding: 1.05rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background: rgb(251 250 246 / 88%);
  box-shadow: 0 10px 34px rgb(23 35 45 / 8%);
}

.nearby-schools__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.nearby-schools__header .status-label {
  margin-bottom: 0.28rem;
}

.nearby-schools__header h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.school-count {
  flex: 0 0 auto;
  padding: 0.28rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper-bright);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 750;
  white-space: nowrap;
}

.school-disclaimer {
  margin: 0.75rem 0 0;
  padding: 0.62rem 0.7rem;
  border-left: 3px solid var(--coral);
  background: #fff2ed;
  color: #603a32;
  font-size: 0.72rem;
  line-height: 1.48;
}

.school-filters {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.8rem;
  overflow-x: auto;
  padding: 0.08rem 0 0.2rem;
  scrollbar-width: thin;
}

.school-filters button {
  min-height: 2.2rem;
  flex: 0 0 auto;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper-bright);
  color: var(--ink-soft);
  font-size: 0.66rem;
  font-weight: 780;
  cursor: pointer;
}

.school-filters button[aria-pressed="true"] {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
  color: #fff;
}

.school-filters button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.school-filters button:focus-visible {
  outline: 3px solid rgb(18 104 212 / 25%);
  outline-offset: 2px;
}

.school-status,
.school-source {
  margin: 0.72rem 0 0;
  color: var(--ink-soft);
  font-size: 0.68rem;
  line-height: 1.45;
}

.school-status:empty {
  display: none;
}

.school-error {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgb(165 45 38 / 28%);
  border-radius: var(--radius-sm);
  background: rgb(165 45 38 / 6%);
}

.school-error p {
  margin: 0;
  color: var(--danger);
  font-size: 0.72rem;
  line-height: 1.45;
}

.school-error button {
  min-height: 2.35rem;
  margin-top: 0.55rem;
  padding: 0.42rem 0.65rem;
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  background: var(--paper-bright);
  color: var(--danger);
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

.school-list {
  max-height: 34rem;
  display: grid;
  gap: 0.62rem;
  margin: 0.85rem 0 0;
  padding: 0 0.25rem 0 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.school-card {
  padding: 0.82rem;
  border: 1px solid var(--rule);
  border-radius: 0.8rem;
  background: var(--paper-bright);
  box-shadow: 0 2px 8px rgb(23 35 45 / 5%);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.school-card:hover {
  border-color: #8a9aa1;
}

.school-card.is-selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(18 104 212 / 12%), 0 5px 16px rgb(23 35 45 / 8%);
}

.school-card__heading {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  align-items: start;
  gap: 0.58rem;
}

.school-card__number {
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-dark);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 850;
}

.school-card.is-selected .school-card__number {
  background: var(--coral);
}

.school-card__heading-copy {
  min-width: 0;
}

.school-card h3 {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: -0.018em;
  line-height: 1.24;
}

.school-card__meta,
.school-card__district,
.school-card__address {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.66rem;
  line-height: 1.42;
}

.school-card__meta {
  margin-top: 0.18rem;
  font-family: var(--mono);
  font-size: 0.59rem;
}

.school-card__district {
  margin-top: 0.58rem;
  color: var(--ink);
  font-weight: 730;
}

.school-card__address {
  margin-top: 0.12rem;
}

.school-card__details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.school-card__details span {
  padding: 0.18rem 0.38rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.57rem;
  font-weight: 720;
}

.school-card__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.45rem;
  margin-top: 0.7rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
}

.school-card__actions button,
.school-card__actions a {
  min-height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.48rem;
  border-radius: var(--radius-sm);
  font-size: 0.61rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.school-card__actions button {
  border: 1px solid var(--blue-dark);
  background: var(--blue-dark);
  color: #fff;
  cursor: pointer;
}

.school-card__actions button:hover {
  background: var(--blue);
}

.school-card__actions button:focus-visible,
.school-card__actions a:focus-visible,
.school-error button:focus-visible {
  outline: 3px solid rgb(18 104 212 / 25%);
  outline-offset: 2px;
}

.school-card__actions a {
  border: 1px solid var(--rule-strong);
  background: var(--paper-bright);
  color: var(--blue-dark);
  text-decoration: none;
}

.school-card__actions a:hover {
  border-color: var(--blue-dark);
  background: var(--blue-soft);
}

.school-list__empty {
  padding: 1rem;
  border: 1px dashed var(--rule-strong);
  border-radius: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  text-align: center;
}

@media (max-width: 67rem) {
  .interactive-map {
    height: clamp(23rem, 48vh, 30rem);
    min-height: 23rem;
  }
}

@media (max-width: 48rem) {
  .interactive-map {
    height: min(58vh, 29rem);
    min-height: 20rem;
    aspect-ratio: auto;
  }

  .map-controls {
    top: 0.55rem;
    left: 0.55rem;
    gap: 0.4rem;
  }

  .map-control-group button {
    width: 2.75rem;
    height: 2.75rem;
  }

  .map-empty-state {
    right: 0.55rem;
    bottom: 2.1rem;
  }

  .map-legend {
    bottom: 1.55rem;
    left: 0.35rem;
  }

  .source-line__links {
    justify-content: flex-start;
  }

  .nearby-schools {
    padding: 0.9rem;
  }

  .school-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 27rem) {
  .interactive-map {
    height: 19rem;
    min-height: 19rem;
    aspect-ratio: auto;
  }

  .map-control-group--actions button {
    width: 2.55rem;
  }

  .map-legend {
    right: 0.35rem;
    max-width: none;
  }

  .nearby-schools__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .school-filters {
    flex-wrap: wrap;
    overflow: visible;
  }

  .school-card__actions {
    grid-template-columns: 1fr;
  }

  .school-card__actions button,
  .school-card__actions a {
    width: 100%;
    min-height: 2.75rem;
  }
}

@media (hover: hover) and (pointer: fine) {
  .atlas-stage[data-state="loaded"] {
    cursor: default;
  }
}

@media (forced-colors: active) {
  .school-map-marker,
  .school-card__number,
  .map-location-layer .location-dot {
    forced-color-adjust: none;
  }
}

@media print {
  .map-controls,
  .map-empty-state,
  .map-legend,
  .nearby-schools {
    display: none !important;
  }

  .interactive-map {
    height: 4.2in;
    min-height: 0;
  }
}
