.city-comparison { padding-block: clamp(2.75rem, 5vw, 4.5rem); background: var(--paper); }
.guide-directory { scroll-margin-top: calc(var(--header-height) + .75rem); }
.compare-controls {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 1.25rem clamp(1.5rem, 5vw, 5rem);
  align-items: end;
}
.compare-controls h2 { font-size: clamp(2.25rem, 3.9vw, 3.6rem); }
.compare-controls p { margin-top: .5rem; max-width: 32rem; color: var(--muted); }
.compare-controls form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: .8rem;
  align-items: end;
}
.compare-controls label { font-size: .875rem; font-weight: 600; }
.compare-controls select {
  display: block;
  width: 100%;
  min-height: 3.15rem;
  margin-top: .3rem;
  padding: .45rem .55rem;
  border: 1px solid var(--control-line);
  border-radius: .2rem;
  background: var(--white);
  color: var(--brand-navy);
  font: 1rem var(--body);
}
.compare-controls select:focus-visible { outline: 2px solid var(--brand-navy); outline-offset: 3px; }
.compare-table {
  width: 100%;
  margin-top: 2rem;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
  overflow-wrap: anywhere;
}
.compare-table :is(th, td) { padding: 1rem; vertical-align: top; }
.compare-table thead { color: var(--white); background: var(--brand-navy); }
.compare-table thead td { width: 18%; }
.compare-table thead th { font: clamp(1.5rem, 2.8vw, 2.25rem)/1.15 var(--display); }
.compare-table thead span { display: block; margin-bottom: .3rem; font: .8rem/1.5 var(--body); }
.compare-table tbody tr { border-bottom: 1px solid var(--line); }
.compare-table tbody th { font-weight: 600; }
.compare-table tbody td { background: var(--white); }
.compare-table td + td { border-inline-start: 1px solid var(--line); }
.compare-table .text-link { font-size: .95rem; }
.compare-table p + a { margin-top: .55rem; }
.compare-note, .compare-notice { margin-top: 1rem; }
.compare-note { color: var(--muted); font-size: .9rem; }
.compare-notice { color: var(--danger); }
@media (max-width: 900px) {
  .compare-controls { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .compare-controls form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare-controls button { grid-column: 1 / -1; justify-self: start; }
  .compare-table :is(th, td) { padding: .8rem .45rem; }
  .compare-table tbody th { font-size: .85rem; }
  .compare-table tbody td { font-size: .94rem; }
}
@media (max-width: 480px) {
  .compare-controls form { grid-template-columns: 1fr; }
  .compare-table, .compare-table thead, .compare-table tbody { display: block; }
  .compare-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare-table thead td { display: none; }
  .compare-table tbody th { grid-column: 1 / -1; padding-block: .55rem; }
}

/* Neighborhood guides use the shared site grid and the photographs of each city. */
.city-detail-intro { padding-block: clamp(1.75rem, 4vw, 3.75rem); }
.city-hero {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(1.6rem, 6vw, 5.5rem);
}
.city-hero-copy { min-width: 0; }
.city-hero-copy h1 { font-size: clamp(3rem, 6vw, 5.6rem); }
.city-population { margin-top: .8rem; color: var(--muted); font-size: .95rem; font-variant-numeric: tabular-nums; }
.city-population strong { color: var(--brand-navy); font-weight: 650; }
.city-population a { display: inline-block; max-width: 100%; }
.city-hero-copy .page-deck { max-width: 36rem; }
.city-back { margin-top: 1.35rem; }
.city-hero-photo { min-width: 0; }
.city-hero-photo > img {
  width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  background: var(--paper);
}
.city-hero-photo figcaption {
  margin-top: .5rem;
  font-size: .875rem; line-height: 1.55; color: var(--muted);
}
.city-method summary {
  width: fit-content; max-width: 100%; cursor: pointer; color: var(--brand-navy);
  font-weight: 650;
}
.city-method summary:hover { color: var(--menu-bronze); }
.city-method summary:focus-visible {
  outline: 2px solid var(--brand-navy); outline-offset: 3px;
}
.city-sections {
  display: flex; flex-wrap: wrap; gap: 0 clamp(1.25rem, 4vw, 3.5rem);
  padding-block: .7rem;
}
.city-sections a {
  display: inline-flex; min-height: 2.75rem; align-items: center;
  font-weight: 650; color: var(--brand-navy); line-height: 1.4;
}
.city-topic {
  display: grid; grid-template-columns: minmax(12rem, .72fr) minmax(0, 1.65fr);
  gap: .85rem clamp(1.8rem, 6vw, 6rem);
  padding-block: clamp(2.1rem, 4.6vw, 4rem); border-top: 1px solid var(--line);
}
.city-topic[id], .city-comparison[id], .guide-directory[id] { scroll-margin-top: calc(var(--header-height) + .8rem); }
.city-topic h2 { font-size: clamp(2.15rem, 4vw, 3.35rem); }
.city-topic > div { min-width: 0; max-width: 50rem; }
.city-topic h3, .city-district-table caption { font: 400 clamp(1.55rem, 3vw, 2.1rem)/1.18 var(--display); }
.city-topic h3 + p { margin-top: .3rem; }
.city-topic h3 span, .city-district-table caption span {
  display: inline-block; margin-left: .35rem; color: var(--muted); font: 500 .94rem/1.5 var(--body);
}
.city-source-list, .compare-districts { margin: 0; padding: 0; list-style: none; }
.city-source-list > li + li { margin-top: .9rem; }
.city-source-list p { margin-top: .1rem; color: var(--muted); }
.city-secondary { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-top: 1rem; }
.city-secondary:empty { display: none; }
.city-secondary .button + .text-link { display: inline-flex; align-items: center; min-height: 2.75rem; }
.city-tour-tip { margin-top: 1.25rem; padding-left: .85rem; border-left: 2px solid var(--brand-gold); color: var(--muted); }
.city-data-note { color: var(--muted); font-size: .93rem; line-height: 1.55; }
.city-district-table {
  width: 100%; margin: 1.35rem 0 .6rem; text-align: left; border-collapse: collapse; font-variant-numeric: tabular-nums;
}
.city-district-table caption { padding-bottom: .7rem; text-align: left; }
.city-district-table td, .city-district-table th { padding: .55rem .65rem .55rem 0; border-bottom: 1px solid var(--line); }
.city-district-table thead { color: var(--muted); font-size: .9rem; }
.city-district-table th { font-weight: 650; }
.city-district-table td, .city-district-table th:not(:first-child) { text-align: right; }
.city-district-table :last-child { padding-right: 0; }
.city-schools-copy .city-source-list, .city-method + .city-source-list { margin-top: 1.25rem; }
.city-rates {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 1rem; padding-block: .9rem;
  border-block: 1px solid var(--line);
}
.city-rates > div { display: flex; flex-direction: column; }
.city-rates > div + div { border-left: 1px solid var(--line); padding-left: 1.25rem; }
.city-rates dd { font: 400 clamp(2rem,4vw,2.85rem)/1.15 var(--display); color: var(--brand-navy); }
.city-rates dt { font-size: .95rem; color: var(--muted); }
.city-method summary { padding-block: .7rem; }
.city-method p { margin: .25rem 0 .8rem; }
.guide-directory.section { padding-block: clamp(1.8rem, 4vw, 3.75rem); }
.guide-group .guide-grid { gap: clamp(1.2rem, 3vw, 2.4rem); }
.city-photo-card { padding: 0 0 1rem; border: 0; border-bottom: 1px solid var(--line); background: transparent; }
.city-card-title { display: block; }
.city-card-title img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--paper); }
.city-card-title h3 { margin: .85rem 0 .35rem; }
.city-photo-card .guide-school-link { margin-top: .5rem; }
@media (max-width: 38rem) {
  .guide-directory .guide-grid { grid-template-columns: 1fr; gap: .8rem; }
  .guide-directory .city-photo-card { display: flow-root; padding: 0 0 .8rem; }
  .guide-directory .city-card-title img { float: left; width: clamp(5.4rem, 23vw, 8rem); aspect-ratio: 5 / 4; margin-right: .95rem; }
  .guide-directory .city-card-title h3 { margin: .15rem 0 0; font-size: 1.65rem; }
  .guide-directory .city-photo-card p { display: none; }
  .guide-directory .city-photo-card .guide-school-link { display: inline-flex; align-items: center; min-height: 2.75rem; margin: 0; }
}
.compare-districts li + li { margin-top: .55rem; }
.compare-districts span, .compare-rates span { display: block; }
.compare-districts, .compare-rates { font-variant-numeric: tabular-nums; }
.compare-districts + .text-link { margin-top: .65rem; }
.compare-table .city-source-list p { font-size: .96rem; }
@media (max-width: 760px) {
  .city-hero { grid-template-columns: 1fr; gap: 1.3rem; }
  .city-hero-photo > img { aspect-ratio: 16 / 10; }
  .city-topic { grid-template-columns: 1fr; }
  .city-hero-copy .page-deck { max-width: none; }
}
@media (max-width: 480px) {
  .city-sections { display: grid; grid-template-columns: 1.15fr 1fr; column-gap: .8rem; }
  .city-district-table { font-size: .94rem; line-height: 1.4; }
  .city-district-table th, .city-district-table td { padding: .6rem .4rem .6rem 0; }
  .compare-table tbody td { font-size: 1rem; }
  .compare-table .city-source-list p { font-size: .94rem; }
  .compare-table thead th { font-size: 1.45rem; }
}
.compare-context { display: block; margin-top: .28rem; color: var(--muted); font-size: .87rem; font-weight: 400; line-height: 1.45; }
.city-school-sources { margin-top: .5rem; }
.city-school-sources .city-source-list { margin-top: 0; }
