@font-face {
  font-family: Montserrat;
  src: url("fonts/montserrat-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("fonts/montserrat-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
* { box-sizing: border-box; }
:root {
  --accent: #365edc;
  --brand-red: #d71926;
  --ink: #142f52;
  --text: #192a42;
  --muted: #536174;
  --paper: #fff;
  --page: #fff;
  --tint: #edf2ff;
  --line: #d9e2ef;
  --control: #fff;
  --map-water: #e5effb;
  --map-other: #f3f5f8;
  --map-outline: #a0b6d2;
  --map-land: #cfddf5;
  --map-region: #a8bfdf;
  --map-grid: #829bbf;
  --map-label: #29496b;
  --map-label-stroke: #eaf1fb;
  --map-dot: #365edc;
  --map-selected: #d71926;
  --map-callout: #142f52;
  font-family: Montserrat, "Segoe UI", Arial, sans-serif;
  color-scheme: only light;
  color: var(--text);
  background: var(--page);
}
body {
  margin: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  padding-top: max(env(safe-area-inset-top), var(--tg-content-safe-area-inset-top, 0px));
  padding-bottom: max(env(safe-area-inset-bottom), var(--tg-content-safe-area-inset-bottom, 0px));
}
h1, h2, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.bar, main {
  max-width: 1550px;
  margin: auto;
  padding-inline: clamp(15px, 4vw, 70px);
}
.bar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 0 0 100vmax var(--paper);
  clip-path: inset(0 -100vmax);
}
.brand { display: inline-flex; align-items: center; }
.consultation {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 6px 13px; border-radius: 16px; background: var(--tint);
  color: var(--accent); font-size: 13px; line-height: 1.25; font-weight: 600; text-decoration: none;
}
.consultation svg { width: 21px; height: 21px; flex-shrink: 0; }
.consultation:hover { box-shadow: inset 0 0 0 1px currentColor; }
@media (max-width: 760px) {
  .consultation { max-width: 174px; font-size: 12px; }
}
.brand-logo { display: block; width: auto; height: 49px; }
nav {
  display: flex;
  padding: 3px;
  border-radius: 7px;
  background: var(--tint);
}
nav button {
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  min-height: 36px;
  padding: 5px 17px;
}
nav button[aria-pressed=true] { background: #365edc; color: #fff; }
nav { border-radius: 18px; gap: 2px; }
nav button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 15px; }
nav svg { width: 20px; height: 20px; }
.nav-glyph { flex: none; fill: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  #selection-tab[aria-pressed=true] .knob-top,
  #selection-tab[aria-pressed=true] .knob-bottom {
    animation: adjust-knob .32s cubic-bezier(.2,.75,.35,1) both;
  }
  .knob-top { --knob-offset: 13%; }
  .knob-bottom { --knob-offset: -13%; }
  @keyframes adjust-knob {
    from { transform: translateX(var(--knob-offset)); }
    to { transform: translateX(0); }
  }
}
.heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(23px, 3vw, 42px) 0 23px;
}
h1 {
  font-size: clamp(33px, 4.3vw, 62px);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -.05em;
  color: var(--ink);
}
h1 span { color: var(--brand-red); }
.totals { display: flex; gap: 22px; }
.totals div { display: grid; border-left: 2px solid var(--line); padding-left: 14px; }
.totals b { font-size: clamp(22px, 2.4vw, 34px); line-height: 1; font-weight: 600; color: var(--accent); }
.totals span, .counter, .mapfoot, footer, .kicker { font-size: 12px; color: var(--muted); }
.totals span { margin-top: 5px; }
.layout { display: grid; grid-template-columns: minmax(0,1.85fr) minmax(290px,1fr); gap: 15px; align-items: stretch; }
.atlas, .results { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); overflow: hidden; }
.atlas, .results { display: flex; flex-direction: column; }
.maphead, .mapfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 17px; }
.maphead h2 { font-size: 19px; font-weight: 600; letter-spacing: -.04em; color: var(--ink); }
.picker select {
  max-width: 180px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--control);
  font-size: 13px;
}
.sheet { position: relative; flex: 1; min-height: 330px; overflow: hidden; background: var(--map-water); border-block: 1px solid var(--line); }
#map { position: absolute; inset: 0; }
#map svg { display: block; width: 100%; height: 100%; }
.city-halo { opacity: 0; transition: opacity .16s ease-out; }
.city-dot { fill: var(--map-dot); transition: fill .16s ease-out; }
[data-city][aria-pressed=true] .city-halo { opacity: .21; }
[data-city][aria-pressed=true] .city-dot { fill: var(--map-selected); }
@media (prefers-reduced-motion: reduce) {
  .city-halo, .city-dot { transition: none; }
}
.zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--control);
  box-shadow: 0 2px 8px #102b5520;
}
.zoom button { width: 38px; height: 38px; border: 0; background: transparent; color: var(--ink); font-size: 20px; }
.zoom button + button { border-left: 1px solid var(--line); }
.zoom button:hover { color: var(--accent); background: var(--tint); }
.mapfoot { font-size: 11px; }
.mapfoot i { display: inline-block; width: 8px; height: 8px; background: var(--map-dot); border-radius: 50%; margin-right: 4px; }
.results { height: clamp(465px, 61vh, 720px); }
.panelhead { padding: 18px 19px 9px; }
.kicker { font-weight: 600; letter-spacing: .055em; text-transform: uppercase; font-size: 10px; }
#location { color: var(--ink); font-size: clamp(25px, 2.6vw, 37px); font-weight: 600; letter-spacing: -.045em; line-height: 1.13; margin: 5px 0; }
.counter { font-variant-numeric: tabular-nums; }
.search { display: flex; align-items: center; gap: 7px; margin: 5px 17px 9px; border: 1px solid var(--line); background: var(--control); border-radius: 6px; padding: 7px 10px; }
.search span { font-size: 22px; line-height: 1; color: var(--muted); }
.search input { background: transparent; flex: 1; border: 0; min-width: 0; font-size: 13px; padding: 3px 2px; }
.search:focus-within { border-color: var(--accent); }
#entries { overflow: auto; padding: 0 18px 12px; scrollbar-width: thin; }
.record { padding: 14px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.record h3 { color: var(--ink); margin: 4px 0 6px; font-size: 16px; font-weight: 600; line-height: 1.34; letter-spacing: -.025em; }
.record .kicker { font-size: 10px; }
.record { display: flow-root; }
.thumbnail {
  float: right; width: 78px; height: 70px; margin: 0 0 6px 12px;
  padding: 0; border: 1px solid var(--line); border-radius: 6px;
  overflow: hidden; background: var(--page); cursor: zoom-in;
}
.thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-strip { display: flex; flex-wrap: wrap; gap: 5px; clear: both; padding-block: 7px; }
.photo-strip button { width: 48px; height: 48px; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; padding: 0; background: var(--paper); cursor: zoom-in; }
.photo-strip img { width: 100%; height: 100%; display: block; object-fit: cover; }
#photo-dialog {
  max-width: min(92vw, 900px); max-height: 92vh; padding: 10px;
  background: var(--paper); color: var(--ink); border: 0; border-radius: 10px;
}
html:has(#photo-dialog[open]) { overflow: hidden; }
#photo-dialog { overscroll-behavior: contain; max-height: 92dvh; }
#photo-dialog::backdrop { background: rgb(11 20 36 / .8); }
#large-photo { display: block; width: auto; height: auto; max-width: 100%; max-height: 74vh; max-height: 74dvh; margin: auto; object-fit: contain; }
#photo-caption { overflow-wrap: anywhere; margin: 10px 4px 2px; font-size: 13px; line-height: 1.5; }
#close-photo {
  position: absolute; top: 15px; right: 15px; width: 38px; height: 38px;
  border: 1px solid var(--line); border-radius: 50%; background: var(--paper);
  color: var(--ink); font-size: 24px; line-height: 1;
}
#load-warning { margin-bottom: 12px; color: var(--muted); font-size: 13px; }
#load-warning button { color: var(--accent); border: 0; background: none; text-decoration: underline; }
.company, .previous, .empty { font-size: 13px; line-height: 1.5; }
.product-detail { font-size: 13px; line-height: 1.5; margin-top: 7px; }
.product-detail strong { color: var(--ink); font-weight: 600; }
.previous { color: var(--muted); font-size: 12px; margin-top: 7px; }
.source { display: inline-block; color: var(--accent); text-decoration: none; font-size: 12px; font-weight: 600; margin: 8px 13px 0 0; }
.source:hover, footer a:hover { text-decoration: underline; }
.empty { padding: 20px 0; }
.selection-view .heading, .selection-view .layout, .selection-view #load-warning { display: none; }
.selection-view #selection-panel { margin-top: clamp(16px, 3vw, 36px); }
.registry .atlas { display: none; }
.registry .layout { display: block; }
.registry .results { height: auto; }
.registry #entries { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(280px,100%),1fr)); column-gap: 25px; }
.registry .search { max-width: 550px; }
.registry .record .kicker { color: var(--accent); }
#filters[hidden] { display: none; }
#filters:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 1px 18px 13px; }
.unmapped { font-size: 13px; color: var(--muted); padding-block: 5px; }
.unmapped input { accent-color: #365edc; vertical-align: middle; }
footer { display: flex; justify-content: space-between; gap: 12px; padding: 16px 2px 25px; font-size: 11px; }
footer a { color: var(--accent); }
.sr { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 760px) {
  body {
    --dock-inset: max(8px, env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px));
    padding-bottom: calc(78px + var(--dock-inset));
  }
  .bar { height: 56px; clip-path: none; box-shadow: none; }
  .bar nav {
    position: fixed; z-index: 15; inset: auto 14px var(--dock-inset);
    max-width: 430px; margin-inline: auto; justify-content: space-around;
    padding: 4px; border-radius: 24px; background: var(--paper);
    border: 1px solid var(--line); box-shadow: 0 4px 22px #142f5226;
  }
  @supports (backdrop-filter: blur(16px)) {
    .bar nav { background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(16px); }
  }
  .bar nav button { flex: 1; min-height: 48px; gap: 3px; flex-direction: column; border-radius: 20px; font-size: 11px; }
  .bar nav button[aria-pressed=true] { background: var(--tint); color: var(--accent); }
  .bar nav svg { width: 20px; height: 20px; }
  .brand-logo { height: 39px; }
  nav button { padding-inline: 12px; min-height: 32px; }
  .heading { align-items: start; padding: 20px 0 16px; flex-wrap: wrap; gap: 9px; }
  .totals { gap: 14px; }
  .totals div { display: flex; gap: 5px; align-items: baseline; padding: 0; border: 0; }
  .totals b { font-size: 16px; }
  .totals span { margin: 0; }
  .layout { grid-template-columns: 1fr; gap: 9px; }
  .sheet { min-height: clamp(210px, 34vh, 340px); min-height: clamp(210px, 34svh, 340px); }
  .maphead, .mapfoot { padding: 8px 12px; }
  .maphead h2 { font-size: 16px; }
  .mapfoot { font-size: 10px; }
  .results { height: auto; }
  .panelhead { padding: 13px 15px 5px; }
  .search { margin-inline: 14px; }
  #entries { padding-inline: 15px; max-height: none; }
  .registry #entries { max-height: none; }
  .results .search input { font-size: 16px; }
  .zoom { bottom: 6px; right: 6px; }
  .zoom button { width: 36px; height: 34px; }
  footer { flex-wrap: wrap; }
}

/* Printed cover and application chrome */
:root {

  --cover: #fff;
  --cover-ink: #101a2a;
  --cover-rule: #bac1c9;
  --cover-grid: #a4adbf24;
  --print-blue: #214bd8;
}
.bar { gap: 12px; border-bottom: 1px solid var(--cover-rule); }
.bar nav { background: #fff; border: 1px solid #c7d2df; border-radius: 14px 4px 14px 4px; }
.bar nav button { border-radius: 10px 2px 10px 2px; }
.bar nav button, .consultation { transition: background .18s, box-shadow .18s, color .18s; }
.bar .consultation { border: 1px solid #bccfe6; background: #fff; color: #153e74; border-radius: 8px 2px 8px 2px; }
.bar .consultation:hover { box-shadow: inset 0 -3px var(--brand-red); }
.press-cover {
  position: relative; isolation: isolate; overflow: hidden;
  display: block; padding: 0; margin: clamp(12px, 1.8vw, 25px) 0 16px;
  border: 1px solid var(--cover-rule); border-radius: 3px;
  background-color: var(--cover);
  background-image: linear-gradient(var(--cover-grid) 1px, transparent 1px), linear-gradient(90deg, var(--cover-grid) 1px, transparent 1px);
  background-size: 32px 32px;
}
.press-cover::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px; z-index: 2;
  background: linear-gradient(90deg, #284de0 0 12%, #e21e34 12% 16%, transparent 16%);
}
.press-cover::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 72px; height: 4px;
  background: repeating-linear-gradient(125deg, #203954 0 5px, transparent 5px 8px);
  pointer-events: none;
}
.press-copy { position: relative; pointer-events: none; padding: clamp(18px, 2.2vw, 34px) clamp(18px, 3vw, 48px); }
.press-cover h1 {
  color: var(--cover-ink); font: 800 clamp(38px, 5.6vw, 86px)/.91 Montserrat, "Segoe UI", sans-serif;
  text-transform: uppercase; letter-spacing: -.071em;
}
.press-cover h1 strong { display: block; color: var(--print-blue); font-weight: inherit; }
.press-cover h1 strong span { color: var(--brand-red); }
.press-art {
  position: absolute; inset: 0 0 0 43%; background: #1a3290;
  clip-path: polygon(20% 0,100% 0,100% 100%,0 100%);
}
.press-art img { width: 100%; height: 100%; display: block; object-fit: cover; }
.press-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(116deg, transparent 12%, #edf2ff 12% 12.6%, transparent 12.6% 13.7%, #fa3448 13.7% 14.5%, transparent 14.5%);
}
.press-cover .totals { display: flex; gap: clamp(14px, 2.4vw, 36px); margin-top: clamp(16px, 2vw, 30px); }
.press-cover .totals div { display: grid; gap: 2px; border: 0; padding: 0; }
.press-cover .totals b { font: 600 clamp(19px, 2.1vw, 32px)/1 Consolas, monospace; color: var(--cover-ink); }
.press-cover .totals span { margin: 0; color: var(--muted); font-size: 11px; }
footer { border-top: 1px solid var(--line); margin-top: 18px; }
.registry .press-cover { display: none; }
.registry .layout { margin-top: 18px; }
@media (max-width: 760px) {
  .press-art { left: 49%; clip-path: polygon(45% 0,100% 0,100% 100%,0 100%); }
  .press-cover h1 { font-size: clamp(24px, 7.8vw, 53px); }
  .press-cover .totals { gap: 12px; align-items: start; }
  .press-cover .totals span { max-width: 62px; font-size: 10px; }
  .press-cover { margin-bottom: 11px; }
  .bar nav button[aria-pressed=true] { background: #2048ce; color: white; }
}
@media (prefers-reduced-motion: no-preference) {
  .press-copy { animation: print-arrive .38s ease-out both; }
  .press-art img { animation: print-reveal .6s ease-out both; }
  @keyframes print-arrive { from { opacity: 0; transform: translateY(6px); } }
  @keyframes print-reveal { from { opacity: .5; transform: scale(1.025); } }
}
@media (prefers-reduced-motion: reduce) {
  .bar nav button, .consultation { transition: none; }
}

/* Home screen */
.home-view .layout, .map-view #promotions, #dashboard[hidden], #work-showcase[hidden] { display: none; }
#dashboard { display: grid; gap: 14px; min-width: 0; padding-block: 4px 12px; }
#home-search { display: flex; align-items: center; padding: 3px 6px 3px 16px; border-radius: 18px; background: var(--paper); }
#home-search:focus-within { outline: 2px solid var(--accent); }
#home-search input { min-width: 0; flex: 1; background: transparent; border: 0; color: var(--ink); font-size: 15px; }
#home-search input:focus { outline: none; }
#home-search input::placeholder { color: var(--muted); opacity: 1; }
#home-search button, .work-heading button { min-height: 44px; border: 0; background: transparent; color: var(--highlight-text); }
#home-search button { width: 44px; display: grid; place-items: center; }
.home-ticket { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: 180px; border-radius: 24px; background: var(--paper); }
.ticket-art { position: absolute; z-index: -2; right: 0; top: 0; width: 61%; height: 100%; object-fit: cover; object-position: 56% center; }
.home-ticket::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(98deg,var(--paper) 28%,color-mix(in srgb,var(--paper) 97%, transparent) 38%,transparent 77%); }
.ticket-copy { width: 65%; padding: clamp(19px,2.6vw,39px); }
.ticket-copy h1 { max-width: 12ch; margin: 0 0 11px; color: var(--ink); text-transform: none; font-weight: 600; letter-spacing: -.055em; font-size: clamp(30px,4vw,59px); line-height: 1; overflow-wrap: anywhere; }
.ticket-stats { display: flex; flex-wrap: wrap; gap: 5px 11px; color: var(--text); font-size: 11px; }
.ticket-stats b { color: var(--accent); }
#home-open-map { border: 0; border-radius: 12px; margin-top: 16px; padding: 9px 13px; min-height: 41px; font-size: 13px; font-weight: 600; background: var(--highlight); color: var(--on-highlight,#131512); }
#home-open-map span { margin-left: 7px; }
.festive .home-ticket::after { content: "✧"; position: absolute; top: 10px; right: 16px; pointer-events: none; font: 30px/1 Georgia,serif; color: white; text-shadow: 15px 14px 1px var(--accent), -13px 9px 2px var(--highlight); }
.work-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.work-heading h2 { color: var(--ink); margin: 0; font-size: clamp(18px,2vw,27px); letter-spacing: -.035em; }
.work-heading button { flex-shrink: 0; padding-inline: 3px; font-size: 12px; font-weight: 600; }
.work-rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(142px,40%,242px); gap: 12px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; scrollbar-width: thin; padding-bottom: 7px; }
.work-rail button { scroll-snap-align: start; display: grid; align-content: start; gap: 8px; text-align: left; padding: 0; border: 0; background: transparent; color: var(--text); font-size: 14px; font-weight: 600; }
.work-rail img { width: 100%; aspect-ratio: 1.55; object-fit: cover; border-radius: 17px; background: var(--paper); }
@media (pointer: coarse), (max-width: 760px) {
  .work-rail, #city-tools .ct-tabs { scrollbar-width: none; }
}
#work-showcase { min-width: 0; }
@media (min-width: 850px) {
  #dashboard { grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); align-items: stretch; gap: 16px 20px; }
  #home-search, #city-tools { grid-column: 1; }
  .home-ticket { grid-column: 2; grid-row: 1 / 3; }
  #work-showcase { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: no-preference) {
  .work-rail button img, #home-open-map { transition: transform .2s ease; }
  .work-rail button:active img, #home-open-map:active { transform: scale(.97); }
}
