:root {
  color-scheme: light;
  --ink: #28204f;
  --ink-soft: #4e436f;
  --paper: #f5f3f9;
  --white: #fff;
  --line: #ddd7e9;
  --violet: #51408a;
  --amber: #ffda68;
  --map-line: #d4cbdc;
  --display: "Avenir Next", "Trebuchet MS", system-ui, sans-serif;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); line-height: 1.5; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #866300; outline-offset: 4px; }
.wrap { width: min(100% - 48px, 1140px); margin-inline: auto; }
.skip-link { position: absolute; inset: .5rem auto auto .5rem; background: var(--white); padding: .7rem 1rem; z-index: 3; transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }

.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead-inner, .masthead-actions { display: flex; align-items: center; gap: 1rem; }
.masthead-inner { min-height: 68px; justify-content: space-between; }
.brand { display: inline-flex; gap: .65rem; align-items: center; font-weight: 800; text-decoration: none; }
.masthead-actions a, .masthead-actions button { color: var(--ink); font-weight: 700; font-size: .89rem; }
.masthead-actions a { text-underline-offset: .23em; }
.masthead-actions button { min-height: 42px; padding: .3rem .75rem; border: 1px solid var(--line); background: var(--white); border-radius: .35rem; }

.hero { background: var(--ink); color: var(--white); overflow: hidden; }
.hero-inner { min-height: 325px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(2rem, 7vw, 7rem); padding-block: 2.8rem 3.7rem; }
.hero-copy h1 { font: 800 clamp(3rem, 6.9vw, 6rem)/.91 var(--display); letter-spacing: -.09em; margin: 0; }
.hero-copy p { max-width: 46ch; margin: 1.2rem 0 0; color: #eee9fa; }
.hero-copy .place { margin: 0 0 .8rem; color: var(--amber); font-weight: 700; }
.street-sign { position: relative; max-width: 465px; min-width: 0; transform: rotate(-3deg); font-family: var(--display); padding: 10px; border: 1px solid #8477ac; border-radius: 13px; background: #39305f; box-shadow: .7rem .7rem 0 #1b1537; }
.sign-current, .sign-former { padding: .72rem 1.1rem .85rem; display: grid; gap: .12rem; }
.sign-current { background: var(--amber); color: var(--ink); border-radius: 6px 6px 0 0; }
.sign-former { border-radius: 0 0 6px 6px; background: #f5f1ff; color: var(--ink); }
.street-sign span { font-size: .8rem; font-weight: 680; }
.sign-current strong { line-height: 1.04; font-size: clamp(1.35rem, 3.45vw, 2.85rem); letter-spacing: -.045em; }
.sign-former strong { font-size: clamp(.8rem, 1.65vw, 1.15rem); }
.sign-former i { display: inline-block; width: .42rem; height: .42rem; background: var(--violet); border-radius: 50%; margin: 0 .22rem .16rem; }

.lookup { padding-block: 1.6rem 3.25rem; scroll-margin-top: .6rem; }
.search-form label { display: inline-block; font-weight: 800; margin-bottom: .42rem; }
.search-field { display: flex; gap: .7rem; padding: .35rem; align-items: center; background: var(--white); border: 1px solid #bdb1d2; border-radius: .5rem; }
.search-field svg { flex: none; margin-left: .62rem; color: var(--ink-soft); }
.search-field input { width: 100%; min-width: 0; border: 0; padding: .58rem .25rem; color: var(--ink); background: transparent; }
.search-field button { flex: none; min-height: 44px; border: 0; border-radius: .3rem; color: var(--white); background: var(--violet); font-weight: 730; padding: .5rem 1.2rem; }
.search-field button:hover { background: var(--ink); }
.examples { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .72rem; }
.examples span { color: var(--ink-soft); font-size: .82rem; }
.examples button { background: transparent; border: 1px solid #cfc5e1; border-radius: 2rem; min-height: 34px; color: var(--violet); font-size: .82rem; font-weight: 700; padding: .28rem .68rem; }
.examples button:hover { background: var(--white); }
.advertise { margin-top: 1rem; }
.advertise a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  min-height: 3.25rem;
  padding: .7rem 1rem;
  border-radius: .5rem;
  color: var(--ink);
  background: var(--amber);
  text-decoration: none;
}
.advertise a:hover { background: #ffcf49; }
.advertise strong { font: 800 1.12rem/1.2 var(--display); }
.advertise span { font-size: .88rem; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }
.offline { padding: .7rem .9rem; background: var(--amber); border-radius: .3rem; color: var(--ink); }

.workspace { display: grid; grid-template-columns: minmax(15rem, .8fr) minmax(0, 1.2fr); gap: clamp(1rem, 3vw, 2.5rem); align-items: start; margin-top: 1.5rem; }
h2, h3 { font-family: var(--display); letter-spacing: -.025em; line-height: 1.18; }
.result-section h2 { font-size: 1.25rem; margin: 0; }
.result-section p { color: var(--ink-soft); margin: .35rem 0 .75rem; font-size: .91rem; }
.results { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.results li { border-bottom: 1px solid var(--line); }
.result-button { display: grid; grid-template-columns: 1fr auto; gap: .8rem; align-items: center; width: 100%; min-height: 58px; text-align: left; color: var(--ink); border: 0; border-inline-start: 4px solid transparent; background: transparent; padding: .7rem .7rem .7rem .8rem; }
.result-button:hover { background: var(--white); }
.result-button[aria-current="true"] { border-inline-start-color: var(--violet); background: #eae4f4; }
.result-button strong, .result-button small { display: block; }
.result-button strong { font-weight: 740; }
.result-button small { color: var(--ink-soft); font-size: .81rem; margin-top: .14rem; }
.result-button svg { opacity: .65; }
.more { margin-top: .75rem; color: var(--violet); background: var(--white); border: 1px solid var(--line); border-radius: .32rem; padding: .62rem .8rem; font-weight: 700; }

.detail { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: .55rem; }
.detail-header, .detail-content { padding-inline: clamp(1rem, 3vw, 1.65rem); }
.detail-header { background: #ece7f6; border-top: 4px solid var(--violet); padding-block: .95rem 1.05rem; border-radius: .5rem .5rem 0 0; }
.detail-header h2 { margin: .1rem 0; font-size: clamp(1.45rem, 3.2vw, 2.1rem); overflow-wrap: anywhere; }
.detail-header p { margin: 0; color: var(--ink-soft); font-weight: 650; font-size: .88rem; }
.detail-content { padding-block: .15rem 1.4rem; }
.detail-empty { margin: 0; padding: 1.25rem; color: var(--ink-soft); }
.detail h3 { font-size: 1.06rem; margin: 1.15rem 0 .4rem; }
.detail p { overflow-wrap: anywhere; }
.detail-content p { margin: .52rem 0; color: var(--ink-soft); font-size: .91rem; }
.alias-list { list-style: none; display: flex; flex-wrap: wrap; gap: .38rem; padding: 0; margin: .45rem 0; }
.alias-list li { padding: .25rem .55rem; border-radius: .26rem; background: #f4eff9; color: var(--ink); font-size: .86rem; font-weight: 650; }
.history { padding-inline-start: 1.2rem; margin: .4rem 0; color: var(--ink-soft); font-size: .9rem; }
.detail-map { margin: 1rem 0 0; }
.detail-map svg { display: block; background: #f0eaf4; width: 100%; height: auto; border: 1px solid var(--line); border-radius: .35rem; }
.detail-map figcaption { margin-top: .36rem; color: var(--ink-soft); font-size: .82rem; }
.map-context { fill: none; stroke: var(--map-line); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.map-selected { fill: none; stroke: var(--violet); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.map-pin { fill: var(--amber); stroke: var(--ink); stroke-width: 2.5; }
.map-historical { fill: var(--white); stroke: var(--ink); stroke-width: 2.5; stroke-dasharray: 3 2; }
.map-north { fill: var(--ink-soft); font-size: 11px; font-weight: 750; }
.provider-note { min-height: 1.5em; }
.provider-actions { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .42rem; padding: 0; margin: .6rem 0; }
.provider-actions a { display: flex; align-items: center; justify-content: space-between; gap: .35rem; min-height: 44px; background: #f4eff9; border: 1px solid #e7dff0; border-radius: .35rem; padding: .45rem .62rem; text-decoration: none; color: var(--ink); font-weight: 740; font-size: .9rem; }
.provider-actions a:hover { background: #eae4f4; border-color: #d7cbe7; }
.provider-actions svg { flex: none; }
.name-control { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .55rem; margin: .52rem 0; color: var(--ink-soft); font-size: .85rem; }
.name-control label { font-weight: 650; }
.name-control select { min-width: 0; max-width: 100%; background: var(--white); color: var(--ink); border: 1px solid #bdb1d2; border-radius: .28rem; padding: .35rem .3rem; }
.manual-search { overflow-wrap: anywhere; }
.copy-button { margin: .1rem 0 .5rem; background: var(--white); color: var(--violet); border: 1px solid #cfc5e1; border-radius: .28rem; padding: .37rem .6rem; font-weight: 700; }
.citations { list-style: none; padding: 0; margin: .4rem 0 0; font-size: .88rem; }
.citations li + li { margin-top: .25rem; }
.citations a, .sources a { text-decoration-thickness: 1px; text-underline-offset: .2em; color: var(--violet); }

.source-section { background: var(--white); border-block: 1px solid var(--line); padding-block: 1.7rem 2rem; }
.source-section h2 { margin: 0 0 .3rem; font-size: 1.4rem; }
.source-section p { color: var(--ink-soft); max-width: 74ch; margin: .32rem 0 1rem; }
.sources { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15.5rem, 100%), 1fr)); gap: .85rem 1.7rem; }
.sources li { border-left: 3px solid #d0c4e3; padding: .25rem 0 .25rem .65rem; }
.sources a { font-weight: 750; }
.sources small { display: block; color: var(--ink-soft); margin-top: .15rem; font-size: .82rem; }
.footer { padding-block: 1.25rem; display: flex; justify-content: space-between; gap: .6rem 1rem; flex-wrap: wrap; color: var(--ink-soft); font-size: .82rem; }
.footer p { margin: 0; }
.footer span { padding-inline: .3rem; }

@media (max-width: 760px) {
  .wrap { width: min(100% - 28px, 1140px); }
  .hero-inner { grid-template-columns: 1fr; min-height: 0; gap: 1.45rem; padding-block: 2.05rem 2.6rem; }
  .hero-copy h1 { font-size: clamp(2.75rem, 11vw, 4.5rem); }
  .hero-copy p { margin-top: .85rem; }
  .street-sign { width: min(100% - 17px, 355px); margin-left: 5px; box-shadow: .48rem .48rem 0 #1b1537; }
  .sign-current, .sign-former { padding: .52rem .77rem .58rem; }
  .sign-current strong { font-size: clamp(1.5rem, 6vw, 2.25rem); }
  .workspace { grid-template-columns: 1fr; margin-top: 1.25rem; }
  .lookup { padding-block: 1.25rem 2rem; }
}
@media (max-width: 390px) {
  .masthead-inner, .masthead-actions { gap: .55rem; }
  .brand { gap: .38rem; font-size: .93rem; }
  .brand img { width: 33px; height: 33px; }
  .search-field { gap: .34rem; }
  .search-field button { padding-inline: .7rem; }
}
.map-user { fill: #1478be; stroke: #fff; stroke-width: 2.5; }
.location-control { margin-top: .75rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .5rem; }
.location-control p { margin: 0; }

.saved-places { margin-top:.8rem; }
.saved-places > summary { cursor:pointer; font-weight:720; }
.saved-places #saved-list { padding-top:.45rem; }
.saved-places ul { display:flex; gap:.35rem; flex-wrap:wrap; list-style:none; margin:.35rem 0 .7rem; padding:0; }
.place-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.35rem; margin-top:.7rem; }
.place-actions > p:empty { display:none; }

.alias-origin { margin-inline-start:.42rem; color:var(--violet); font-size:.75rem; text-underline-offset:.2em; }

.search-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .6rem; }
.search-filters select { min-height: 44px; max-width: 100%; padding: .4rem .6rem; font: inherit; }
.map-poi { fill: #603da3; stroke: #fff; stroke-width: 1.2px; }

.places-overview { margin: .85rem 0; }
.places-overview summary { padding: .55rem .1rem; min-height: 44px; cursor: pointer; font-weight: 650; }
.places-overview label { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.places-overview select { min-height: 44px; max-width: 100%; font: inherit; }
.places-overview svg { display: block; margin-top: .5rem; width: 100%; background: #f2efe8; border-radius: .55rem; cursor: crosshair; }
.places-overview p { font-size: .85rem; }
.places-dot-path { fill: none; stroke: #603da3; stroke-width: 4; stroke-linecap: round; }
