:root {
  --page: #f7f0e5;
  --card: #fffaf1;
  --ink: #29212a;
  --muted: #645650;
  --line: #e1d3c7;
  --red: #a52f26;
  --action: #ad332a;
  --red-pale: #f1e0d7;
  --night: #261c27;
  --night-soft: #342634;
  --night-line: #594452;
  --city-cream: #fff4df;
  --city-lime: #e2efbd;
  --city-wine: #54252c;
  --city-tomato: #f7a184;
}
:root[data-theme="dark"] {
  --page: #211b24;
  --card: #2c232d;
  --ink: #fff1df;
  --muted: #cbbbbb;
  --line: #55434f;
  --red: #ff9f87;
  --red-pale: #493037;
  --night: #19151d;
  --night-soft: #2b222d;
  --night-line: #524151;
  --amber-surface: #3b2b2b;
  --sage-surface: #2c332d;
}

.masthead { background: var(--page); }
.mast-inner { min-height: 74px; }
.masthead .brand { gap: 11px; }
.masthead .brand-mark { background-color: #a93127; }
.mast-name { display: grid; gap: 4px; }
.mast-name small { font-size: 10px; color: var(--muted); font-weight: 800; }
.masthead .header-tools .icon-btn { border-radius: 12px; }
.masthead .search-trigger {
  display: inline-flex;
  width: auto;
  min-width: 106px;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}
.search-trigger kbd { font: 700 10px/1 Manrope, sans-serif; color: var(--muted); background: var(--page); padding: 4px; border-radius: 5px; }
.masthead .passport-trigger { color: var(--red); }
.masthead .passport-trigger[aria-current="page"] { background: var(--red-pale); }
.search-suggestions { margin-block: 13px 9px; }
.search-suggestions .chip { min-height: 40px; }
.dialog-nav { gap: 0 12px; }

.edition {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,.88fr) minmax(0,1.12fr);
  min-height: clamp(374px, 35vw, 499px);
  overflow: hidden;
  isolation: isolate;
  margin-top: 20px;
  border-radius: 24px;
  background: var(--city-wine);
  color: var(--city-cream);
}
.edition-copy {
  display: flex;
  position: relative;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(25px,4.2vw,64px);
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(151deg,#a6342b, #7b272b 57%, #4a2630);
}
.edition-copy::before {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  content: "";
  width: 500px;
  height: 500px;
  inset: auto -276px -247px auto;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 20px, #ffc49d30 20.5px 21px);
}
.edition-label {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  font-size: clamp(10px,1.2vw,12px);
  font-weight: 800;
  letter-spacing: .065em;
  text-transform: uppercase;
}
.edition-label i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #ffbd92; }
.edition h1 {
  margin: 0 0 15px;
  font-size: clamp(47px,5.7vw,83px);
  line-height: .98;
  font-weight: 800;
  letter-spacing: -.088em;
}
.edition h1 span { color: #ffbf97; }
.edition-intro {
  max-width: 31ch;
  color: #fff1e1;
  font-size: clamp(16px,1.7vw,22px);
  font-weight: 650;
  line-height: 1.36;
  letter-spacing: -.02em;
}
.edition-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 25px; }
.edition-actions a { font-size: 13px; min-height: 45px; }
.edition-action { background: var(--city-lime); color: #26251d; }
.edition-action:hover { background: #f1f7d7; }
.edition-camera { border-color: #ffe3c96b; background: #371b2345; color: var(--city-cream); }
.edition-camera:hover { background: #371b238f; }
.edition-time {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: #ffe3cf;
  margin-top: clamp(28px,3vw,41px);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.edition-time svg { width: 15px; height: 15px; }
.edition-time abbr { color: #ffe0c8; font-size: 9px; text-decoration: none; }
.edition-scenes { position: relative; min-width: 0; background: var(--city-wine); }
.edition-view { overflow: hidden; position: absolute; inset: 0; isolation: isolate; margin: 0; }
.edition-view > :is(picture,img), .edition-view picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.edition-view img { object-position: center 55%; }
.edition-view[data-city-view="strelka"] img { object-position: 55% 52%; }
.edition-view::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg,#211323da 0%, transparent 42%), linear-gradient(170deg,#241a2e80,transparent 35%);
}
.edition-view figcaption { position: absolute; bottom: 23px; left: 25px; right: 25px; z-index: 1; }
.edition-view figcaption span { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 750; }
.edition-view figcaption span svg { width: 14px; height: 14px; color: #ffbd92; }
.edition-view figcaption a { display: inline-flex; align-items: center; gap: 7px; font-size: clamp(21px,3vw,42px); font-weight: 800; letter-spacing: -.052em; }
.edition-view figcaption a:hover { text-decoration: underline; text-underline-offset: 5px; }
.edition-view figcaption a svg { width: 20px; height: 20px; }
.edition-view-switch {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 3px;
  padding: 4px;
  color: #fff2dd;
  background: #271d2bde;
  border: 1px solid #fff2dd40;
  border-radius: 999px;
}
.edition-view-switch button {
  min-height: 35px;
  border: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 11px;
  font-weight: 800;
}
.edition-view-switch button:hover { background: #ffffff22; }
.edition-view-switch button[aria-pressed="true"] { background: var(--city-cream); color: #2e202b; }

.city-board { margin-top: 25px; }
.city-board-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 13px; margin-bottom: 12px; }
.city-board-head h2 { font-size: clamp(23px,3vw,36px); font-weight: 800; letter-spacing: -.065em; line-height: 1.12; }
.city-board-tabs { display: inline-flex; margin-bottom: 10px; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--card); border-radius: 999px; border: 1px solid var(--line); }
.city-board-tabs button { min-height: 35px; padding: 5px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; }
.city-board-tabs button:hover { color: var(--red); }
.city-board-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--page); }
.city-board-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.city-board-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 87px;
  padding: 14px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
}
.city-board-link:hover { border-color: var(--red); }
.city-board-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  color: var(--board-ink);
  background: var(--board-tint);
}
.city-board-icon svg { width: 21px; height: 21px; }
.board-sky { --board-ink:#2a5262; --board-tint:#d8e9ed; }
.board-gold { --board-ink:#783e1d; --board-tint:#f6e4bb; }
.board-coral { --board-ink:#8b322c; --board-tint:#f4dcd3; }
.board-green { --board-ink:#385139; --board-tint:#dfebc9; }
.board-lilac { --board-ink:#523c69; --board-tint:#eae0f2; }
.city-board-link-copy { min-width: 0; }
.city-board-link-copy strong, .city-board-link-copy small { display: block; }
.city-board-link-copy strong { font-size: clamp(13px,1.28vw,18px); line-height: 1.2; font-weight: 800; letter-spacing: -.035em; }
.city-board-link-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.city-board-link > svg { width: 15px; height: 15px; margin-left: auto; color: var(--red); }

body[data-front-page] .news.section { padding-top: 43px; }
body[data-front-page] .news-grid { gap: 12px; align-items: stretch; }
body[data-front-page] .news-card, body[data-front-page] .route-card { border-radius: 18px; }
body[data-front-page] .news-image img, .route-image img { object-position: center; }
body[data-front-page] .news-card h3 { letter-spacing: -.048em; }

:where(.landing, .directory-card, .utility-panel, .panel) { border-radius: 16px; }
.landing::after { opacity: .72; }
.mobile-nav { display: none; }
.city-dock { display: none; }

@media (min-width: 831px) and (max-width: 1090px) {
  .masthead .search-trigger { width: 40px; min-width: 40px; padding: 0; }
  .search-trigger span,.search-trigger kbd { display: none; }
  .mast-inner { gap: 10px; }
  .desktop-nav { gap: 12px; font-size: 12px; }
  .masthead .brand-name { font-size: 18px; }
  .city-board-link { padding-inline: 9px; gap: 7px; }
  .city-board-link > svg { display: none; }
}
@media (max-width: 830px) {
  .mast-inner { min-height: 61px; }
  .masthead .search-trigger { width: 42px; min-width: 42px; padding: 0; }
  .search-trigger span,.search-trigger kbd { display: none; }
  .masthead .passport-trigger, .masthead .menu-toggle { display: none; }
  .masthead .save-top { display: grid; }
  .edition { grid-template-columns: minmax(0,1fr); margin-top: 12px; min-height: 0; border-radius: 18px; }
  .edition-copy { padding: 26px 23px 21px; }
  .edition h1 { font-size: clamp(47px,10vw,76px); margin-bottom: 11px; }
  .edition-label { margin-bottom: 12px; }
  .edition-intro { font-size: 16px; }
  .edition-actions { margin-top: 17px; }
  .edition-time { margin-top: 18px; }
  .edition-scenes { min-height: clamp(185px,51vw,286px); }
  .edition-view figcaption { inset: auto 16px 12px; }
  .edition-view-switch { top: 8px; right: 9px; }
  .edition-view-switch button { min-height: 36px; }
  .city-board { margin-top: 20px; }
  .city-board-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .city-board-link { min-height: 75px; gap: 7px; padding: 9px 8px; }
  .city-board-link > svg { display: none; }
  .city-board-icon { width: 32px; height: 32px; border-radius: 9px; }
  .city-board-icon svg { width: 18px; height: 18px; }
  .city-board-tabs button { min-height: 40px; padding-inline: 11px; }
  .city-board-link-copy small { font-size: 10px; }
  .city-dock {
    z-index: 20;
    position: fixed;
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    inset: auto 8px max(env(safe-area-inset-bottom),8px);
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--card);
    box-shadow: 0 5px 27px #21182321;
  }
  .city-dock :is(a,button) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 53px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
    font-size: 10px;
  }
  .city-dock :is(a,button):hover, .city-dock [aria-current="page"] { background: var(--red-pale); color: var(--red); }
  .city-dock svg { width: 19px; height: 19px; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  html { scroll-padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  body:has(.camera-fallback-full) .city-dock { display: none; }
}
@media (max-width: 360px) {
  .edition-copy { padding-inline: 15px; }
  .edition-actions a { padding-inline: 10px; }
  .city-board-link-copy small { overflow-wrap: anywhere; }
  .city-board-head > a { font-size: 11px; }
}
@media (prefers-reduced-motion: no-preference) {
  .edition-view.is-switching img { animation: city-picture-in .32s ease-out both; }
  .city-board-grid.is-switching .city-board-link { animation: city-card-in .19s ease-out both; }
  .edition-label i { animation: city-dot 1.8s ease-out 2; }
  .city-board-link, .city-dock :is(a,button), .edition-actions a, .search-trigger {
    transition: background-color .16s, border-color .16s, color .16s;
  }
  @keyframes city-picture-in { from { opacity:.62; transform:scale(1.018); } to { opacity:1; transform:scale(1); } }
  @keyframes city-card-in { from { opacity:.6; } to { opacity:1; } }
  @keyframes city-dot { from { box-shadow:0 0 0 0 #ffbf9773; } to { box-shadow:0 0 0 6px #ffbf9700; } }
}
.district-passport-link { margin-bottom: 16px; }
@media (max-width: 830px) {
  .masthead .header-tools { gap: 5px; }
  .masthead .header-tools .icon-btn { width: 40px; min-width: 40px; }
  .masthead .brand-name { font-size: 18px; }
  .masthead .brand-mark { width: 37px; height: 37px; }
  .masthead .brand-mark::before { top: 6px; right: 10px; width: 11px; height: 11px; }
  .masthead .brand-mark::after,.masthead .brand-mark i { width: 44px; }
}
.landing h1 { font-size: clamp(30px, 5.4vw, 74px); text-wrap: balance; }
@media (max-width: 420px) {
  .city-board-tabs { border-radius: 19px; }
  .city-board-tabs button { padding-inline: 9px; }
  .edition-view-switch button { min-height: 40px; }
}

/* City directories and the environmental dashboard */
.utility-ribbon {
  border-top: 1px solid var(--line);
  background: var(--card);
}
.utility-ribbon-inner {
  display: flex;
  align-items: stretch;
  gap: clamp(6px,1.3vw,18px);
  overflow-x: auto;
  scrollbar-width: thin;
}
.utility-ribbon a {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  min-height: 41px;
  padding-inline: 6px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.utility-ribbon a:hover, .utility-ribbon a[aria-current="page"] { color: var(--red); border-bottom-color: var(--red); }
.utility-ribbon svg { width: 16px; height: 16px; }
.eco-panel {
  display: grid;
  gap: 15px;
  min-width: 0;
  padding: clamp(15px,3vw,29px);
  border-radius: 19px;
  border: 1px solid var(--sage-line);
  background: var(--sage-surface);
}
.eco-compare-head { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 11px 15px; }
.eco-compare-head h2,.eco-panel > h2 { margin: 0 0 5px; font-size: clamp(20px,3vw,32px); letter-spacing: -.04em; }
.eco-compare-head p { font-size: 13px; color: var(--muted); }
.eco-field { display: grid; gap: 4px; max-width: 100%; font-size: 12px; font-weight: 800; }
.eco-field :is(select,input) {
  max-width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--card);
  font: inherit;
  font-size: 14px;
}
.eco-compare-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 0; padding: 0; list-style: none; }
.eco-compare-row {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 3px;
  padding: 12px 13px 16px;
  overflow: hidden;
  border: 1px solid var(--sage-line);
  border-radius: 12px;
  background: var(--card);
}
.eco-compare-row > span { font-size: 13px; font-weight: 800; }
.eco-compare-row strong { color: var(--sage-ink); font-size: clamp(23px,3vw,40px); letter-spacing: -.045em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.eco-compare-row small { font-size: 11px; color: var(--muted); }
.eco-compare-row::after {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: var(--eco-share,0);
  height: 3px;
  background: var(--sage-ink);
}
.eco-meta,.eco-point-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 12px; }
.eco-meta p,.eco-meta { font-size: 12px; color: var(--muted); }
.eco-points-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.eco-point { min-width: 0; padding: 13px 14px; }
.eco-point h3 { margin-bottom: 3px; font-size: 16px; line-height: 1.2; }
.eco-point p { font-size: 13px; color: var(--muted); }
.eco-point-actions { margin-top: 8px; }
@media (max-width: 880px) { .eco-points-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 480px) {
  .eco-points-grid { grid-template-columns: minmax(0,1fr); }
  .utility-ribbon-inner { width:100%; padding-inline: 12px; }
}
@media (prefers-reduced-motion: no-preference) { .eco-compare-row::after { transition: width 240ms ease; } }
