:root {
  --paper: #f7f1e3;
  --paper-deep: #e7dcc8;
  --ink: #1f2937;
  --ink-soft: #3a342c;
  --accent: #d94841;
  --accent-ink: #fff8f2;
  --line: rgba(28, 25, 22, 0.18);
  --space: clamp(1.25rem, 3vw, 2.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 125%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(90, 60, 30, 0.045) 0.7px, transparent 0.7px);
  background-size: 5px 5px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.01em;
}

.top,
.toggles,
main,
footer {
  width: min(46rem, calc(100% - 2.5rem));
  margin-left: auto;
  margin-right: auto;
}

.top {
  padding-top: clamp(2.5rem, 7vw, 4.5rem);
}

.place {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}

h1.logo {
  display: flex;
  align-items: center;
  gap: 0.35em;
  margin: 0;
  font-size: clamp(3.2rem, 10vw, 5.2rem);
  line-height: 1;
  letter-spacing: 0;
}
.word-then {
  font-family: "UnifrakturMaguntia", "Palatino Linotype", Palatino, serif;
  font-weight: 400;
}
.word-now {
  font-family: Manrope, "Segoe UI", sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  border-bottom: 0.08em solid var(--accent);
  padding-bottom: 0.02em;
}
.diamond {
  width: 0.28em;
  height: 0.28em;
  margin: 0 0.12em;
  background: var(--accent);
  transform: rotate(45deg);
  flex: 0 0 auto;
}
.logo {
  padding-bottom: 0.28em;
  border-bottom: 2px solid var(--accent);
}

.welcome {
  max-width: 28em;
  margin: 1.25rem 0 0;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--ink);
}
.welcome p {
  margin: 0.35rem 0 0;
}
.welcome p:first-child {
  margin-top: 0;
}

.toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.25rem;
  margin-bottom: 0.5rem;
}

.toggle {
  flex: 1 1 14rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 5.25rem;
  padding: 1.1rem 1.35rem;
  border: 3px solid var(--ink);
  border-radius: 0.35rem;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  text-align: left;
  cursor: pointer;
}

.toggle:focus {
  outline: none;
}

.toggle:focus-visible {
  outline: 4px solid var(--accent);
  outline-offset: 4px;
}

.toggle .mark {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  border: 3px solid currentColor;
  border-radius: 50%;
  background: transparent;
}

#btn-then {
  border-color: #1f2937;
  color: #1f2937;
}

#btn-now {
  border-color: #d94841;
  color: #d94841;
}

#btn-then.is-on {
  background: #1f2937;
  border-color: #1f2937;
  color: var(--accent-ink);
}

#btn-now.is-on {
  background: #d94841;
  border-color: #d94841;
  color: var(--accent-ink);
}

#btn-then.is-on .mark {
  background: var(--accent-ink);
  box-shadow: inset 0 0 0 4px #1f2937;
}

#btn-now.is-on .mark {
  background: var(--accent-ink);
  box-shadow: inset 0 0 0 4px #d94841;
}

.toggle-name {
  flex: 1 1 auto;
}

.toggle-state {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

main {
  padding-bottom: 2rem;
}

.panel {
  margin-top: var(--space);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: rgba(255, 252, 246, 0.72);
  border: 1px solid var(--line);
  border-top: 6px solid var(--accent);
}

.panel h2 {
  margin: 0 0 0.45rem;
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1.1;
}

.panel-note {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  color: var(--ink-soft);
}

.map-frame {
  height: clamp(22rem, 70vh, 40rem);
  margin-top: var(--space);
  border: 1px solid var(--line);
  background: var(--paper-deep);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.news {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.news li {
  margin: 0;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  font-size: 1.45rem;
  line-height: 1.4;
}

.both-off {
  margin: var(--space) 0 0;
  padding: 1.4rem 1.2rem;
  font-size: 1.45rem;
  background: var(--paper-deep);
  border: 1px solid var(--line);
}

footer {
  padding: 1.5rem 0 3rem;
}

footer p {
  margin: 0;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

[hidden] {
  display: none !important;
}

@media (max-width: 40rem) {
  html {
    font-size: 118%;
  }

  .top,
  .toggles,
  main,
  footer {
    width: min(46rem, calc(100% - 1.5rem));
  }
}

.editorial {
  width: min(46rem, calc(100% - 2.5rem));
  margin: 1.5rem auto 0;
  scroll-margin-top: 1rem;
}
.editorial h2 {
  margin: 0 0 0.4rem;
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
}
.editorial p {
  margin: 0;
  max-width: 28em;
  font-size: 1.25rem;
  line-height: 1.45;
}
@media (max-width: 40rem) {
  .editorial { width: min(46rem, calc(100% - 1.5rem)); }
}

.editorial ul.facts {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  max-width: 28em;
}
.editorial ul.facts li {
  margin: 0.2rem 0;
  font-size: 1.15rem;
  line-height: 1.4;
}

.maplibregl-popup-content .pin-photo {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 0.35rem;
}

.maplibregl-popup-content .pin-credit {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  line-height: 1.3;
}

.map-frame {
  overflow: hidden;
}

.maplibregl-popup {
  max-width: min(240px, calc(100vw - 4.5rem)) !important;
}

.maplibregl-popup-content {
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.maplibregl-popup-content strong,
.maplibregl-popup-content p,
.maplibregl-popup-content li,
.maplibregl-popup-content a {
  overflow-wrap: anywhere;
}

.maplibregl-popup-content ul {
  margin: 0.45rem 0 0.35rem;
  padding-left: 1.1rem;
}

.maplibregl-popup-content li {
  margin: 0.2rem 0;
}

.maplibregl-popup-content .pin-more {
  margin: 0.55rem 0 0;
}

.maplibregl-popup-content img {
  max-width: 100%;
  height: auto;
}

.note {
  width: min(40rem, calc(100% - 2.5rem));
  margin: 1.75rem auto 2.5rem;
}

.note h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.note p,
.note li {
  max-width: 38em;
  overflow-wrap: anywhere;
}

.note ul {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
}

.note .back {
  margin-top: 1.5rem;
}

@media (max-width: 40rem) {
  .note {
    width: min(40rem, calc(100% - 1.5rem));
  }
}
