@font-face {
  font-family: "IBM Plex Sans";
  src: url("./fonts/ibm-plex-sans-var-roman.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
}

:root {
  --asphalt: #11191d;
  --asphalt-soft: #1d282d;
  --enamel: #1250a2;
  --enamel-dark: #0a3778;
  --sign-white: #f5f7f2;
  --zinc: #aeb8b8;
  --zinc-pale: #e7ebea;
  --rust: #b8492f;
  --road-yellow: #f0c54a;
  --ink: #11191d;
  --paper: #f5f7f2;
  --paper-deep: #e7ebea;
  --muted: #566369;
  --rule: rgba(17, 25, 29, .22);
  --red: var(--rust);
  --red-dark: #8f321f;
  --blue: var(--enamel);
  --gold: var(--road-yellow);
  --white: #fff;
  --shadow: 0 18px 0 rgba(17, 25, 29, .12);
  --radius: 6px;
  --font-sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
  background: var(--sign-white);
  font-family: var(--font-sans);
  color: var(--asphalt);
}

h1, h2, h3, .serif, .deck, .section-intro, .footer-title,
.stat-value, .measure-no {
  font-family: var(--font-sans);
}

.site-header {
  width: 100%;
  padding: 1rem max(1rem, calc((100% - var(--measure)) / 2));
  background: var(--asphalt);
  color: var(--sign-white);
  border-bottom: 1px solid rgba(255, 255, 255, .22);
}

.brand {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  font-weight: 650;
}

.brand-mark {
  border-radius: 4px;
  border-color: var(--sign-white);
  font-family: var(--font-sans);
  font-weight: 700;
}

.lang-link, .quiet-button {
  border-radius: 3px;
  border-color: rgba(255, 255, 255, .42);
  background: transparent;
  color: var(--sign-white);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .75rem;
}

.hero {
  width: 100%;
  min-height: min(760px, 82vh);
  margin: 0;
  padding: clamp(4rem, 8vw, 7rem) max(1rem, calc((100% - var(--measure)) / 2)) clamp(6rem, 10vw, 9rem);
  background:
    linear-gradient(90deg, transparent 0 49.7%, rgba(240, 197, 74, .12) 49.7% 50.3%, transparent 50.3%),
    repeating-linear-gradient(105deg, rgba(255,255,255,.018) 0 1px, transparent 1px 7px),
    var(--asphalt);
  color: var(--sign-white);
  overflow: hidden;
}

.eyebrow {
  color: var(--road-yellow);
  letter-spacing: .16em;
  font-weight: 650;
}

h1 {
  max-width: 10ch;
  font-size: clamp(4.2rem, 8vw, 8.2rem);
  line-height: .9;
  letter-spacing: -.045em;
  text-transform: uppercase;
  font-weight: 700;
}

.deck {
  color: var(--zinc-pale);
  font-family: var(--font-sans);
  max-width: 34rem;
  font-size: clamp(1.14rem, 2vw, 1.48rem);
  line-height: 1.42;
}

.hero-map-wrap {
  min-height: 32rem;
  transform: rotate(-2deg);
}

.hero-map-wrap::before {
  width: 76%;
  border-radius: 50%;
  background: rgba(18, 80, 162, .2);
  filter: none;
}

.hero-map path {
  fill: rgba(18, 80, 162, .34);
  stroke: rgba(245, 247, 242, .52);
  stroke-width: 1.25;
}

.map-word {
  min-width: max-content;
  padding: .46em .8em .4em;
  border: 3px solid var(--sign-white);
  border-radius: 5px;
  background: var(--enamel);
  color: var(--sign-white);
  box-shadow:
    0 0 0 2px var(--enamel),
    0 10px 0 rgba(0, 0, 0, .26);
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: .015em;
  line-height: 1.08;
  text-transform: uppercase;
}

.map-word::before, .map-word::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--zinc-pale);
  box-shadow: inset 0 0 0 1px #68757a;
}
.map-word::before { left: 8px; }
.map-word::after { right: 8px; }
.map-word.one { transform: rotate(3deg); }
.map-word.two { transform: rotate(-4deg); background: var(--enamel-dark); }
.map-word.three { transform: rotate(2deg); background: #184780; }

.search-stage {
  margin-top: -3.5rem;
  margin-bottom: clamp(4rem, 8vw, 7rem);
}

.search-card {
  border: 3px solid var(--asphalt);
  border-radius: 6px;
  background: var(--sign-white);
  box-shadow: 12px 12px 0 var(--zinc);
}

.search-label {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .06em;
}

#street-search, .primary-button {
  border-radius: 3px;
}

.primary-button {
  background: var(--enamel);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.example-chip, .lang-link, .quiet-button {
  border-radius: 3px;
}

.stats-strip {
  background: var(--asphalt);
  color: var(--sign-white);
  border: 0;
  border-left: 9px solid var(--road-yellow);
}

.stat {
  border-right-color: rgba(255,255,255,.2);
}
.stat-value { font-weight: 700; letter-spacing: -.045em; }
.stat-label { color: var(--zinc); text-transform: uppercase; letter-spacing: .06em; }

.section {
  border-top: 2px solid var(--asphalt);
}

.section-number {
  color: var(--enamel);
}

h2 {
  font-size: clamp(2.4rem, 4.6vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -.04em;
  text-transform: uppercase;
  line-height: .96;
}

.section-heading {
  grid-template-columns: minmax(0, 1.15fr) minmax(20rem, .85fr);
  column-gap: clamp(2.5rem, 6vw, 6rem);
  align-items: end;
}

.section-heading > div {
  min-width: 0;
}

.section-heading h2 {
  max-width: 11ch;
  text-wrap: balance;
}

.section-intro {
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 1.7vw, 1.32rem);
  line-height: 1.48;
  width: 100%;
  justify-self: end;
}

.measure-grid {
  gap: 0;
  border: 3px solid var(--asphalt);
  background: var(--asphalt);
}

.measure-card {
  min-height: 19rem;
  border: 0;
  border-right: 1px solid rgba(17,25,29,.25);
  border-radius: 0;
  background: var(--zinc-pale);
}

.measure-card:last-child { border-right: 0; }
.measure-no { color: var(--enamel); font-weight: 700; }
.measure-card h3 { font-family: var(--font-sans); font-weight: 700; text-transform: uppercase; }

.section-number, .result-kicker, .download-card .filetype {
  font-weight: 650;
}

#ranking {
  width: 100%;
  padding-left: max(1rem, calc((100% - var(--measure)) / 2));
  padding-right: max(1rem, calc((100% - var(--measure)) / 2));
  background: #fff;
}

.ranking-shell, .result-panel {
  border: 3px solid var(--asphalt);
  border-radius: 5px;
  background: #fff;
}

.ranking-tools {
  background: var(--zinc-pale);
  border-bottom: 2px solid var(--asphalt);
}

.ranking-tools input, .ranking-tools select {
  border-radius: 2px;
}

.metric-bar i { background: var(--enamel); }

.rank-cell, .result-metric strong {
  font-family: var(--font-sans);
  font-weight: 650;
}

.result-panel {
  background:
    linear-gradient(90deg, rgba(18,80,162,.08), transparent 50%),
    var(--asphalt);
  color: var(--sign-white);
}

.result-grid {
  grid-template-columns: minmax(0, .95fr) minmax(22rem, 1.05fr);
}

.result-copy {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.result-name {
  display: block;
  box-sizing: border-box;
  width: fit-content;
  /* Reserve room for the sign's outer enamel keyline at the column seam. */
  max-width: calc(100% - .8rem);
  min-width: 0;
  padding: .3em .5em;
  border: 3px solid var(--sign-white);
  border-radius: 4px;
  background: var(--enamel);
  color: var(--sign-white);
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -.025em;
  text-transform: uppercase;
  font-weight: 700;
  overflow-wrap: break-word;
  box-shadow: 0 0 0 2px var(--enamel);
}

.result-name.is-long {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.result-name.is-very-long {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.16;
  letter-spacing: -.01em;
  text-transform: none;
  overflow-wrap: anywhere;
}

.result-map {
  min-width: 0;
  z-index: 0;
}

.result-metric, .bio-card {
  border-radius: 3px;
}

.profile-source {
  margin-top: .7rem !important;
  font-size: .78rem;
  color: #b9c2bd !important;
}

.profile-source a {
  color: var(--road-yellow);
  font-weight: 650;
}

#methodology {
  width: 100%;
  padding-left: max(1rem, calc((100% - var(--measure)) / 2));
  padding-right: max(1rem, calc((100% - var(--measure)) / 2));
  background: var(--enamel);
  color: var(--sign-white);
  border: 0;
}

#methodology .section-number { color: var(--road-yellow); }
#methodology .section-intro { color: var(--zinc-pale); }
.method-grid { gap: 1px; background: rgba(255,255,255,.42); border: 1px solid rgba(255,255,255,.42); }
.method-card {
  border: 0;
  border-radius: 0;
  background: var(--enamel-dark);
}
.method-card p { color: #dce7f3; }
.warning-card { border-left: 7px solid var(--road-yellow); }

.download-card {
  border: 3px solid var(--asphalt);
  border-radius: 4px;
  box-shadow: 7px 7px 0 var(--zinc);
}

.download-card .filetype { color: var(--enamel); }

.site-footer {
  margin-top: 5rem;
  background: var(--asphalt);
}

.js .back-to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 20;
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: .65rem .8rem;
  border: 2px solid var(--sign-white);
  border-radius: 3px;
  background: var(--enamel);
  color: var(--sign-white);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  text-decoration: none;
}

.js .back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#top:focus { outline: none; }

.dialog {
  border: 3px solid var(--asphalt);
  border-radius: 5px;
}

@media (max-width: 850px) {
  .hero { min-height: 0; }
  .hero-map-wrap { min-height: 23rem; }
  .result-grid { grid-template-columns: 1fr; }
  .result-map { width: auto; }
  .measure-card { border-right: 0; border-bottom: 1px solid rgba(17,25,29,.25); }
  .measure-card:last-child { border-bottom: 0; }
}

@media (max-width: 1050px) {
  .section-heading {
    grid-template-columns: 1fr;
    row-gap: 1.25rem;
  }

  .section-heading h2 {
    max-width: 14ch;
  }

  .section-intro {
    max-width: 46rem;
    justify-self: start;
  }
}

@media (max-width: 620px) {
  h1 { font-size: clamp(3.45rem, 17vw, 5.4rem); line-height: .92; letter-spacing: -.04em; }
  .hero { padding-left: .7rem; padding-right: .7rem; }
  .hero-map-wrap { min-height: 20rem; }
  .map-word.one { left: 2%; }
  .map-word.two { right: 0; }
  .map-word.three { left: 16%; }
  .search-card { box-shadow: 6px 6px 0 var(--zinc); }
}
