:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1d2330;
  --muted: #677085;
  --border: #e3e6ec;
  --calm: #2e9d6a;
  --moderate: #d9a521;
  --noisy: #e2702b;
  --very_noisy: #c8323c;
  --unbearable: #6b1f72;
  --none: #b9bfca;
  --accent: #3559c7;
  --past: #4b5568;
  --future: #7b5cd6;
  --past-bg: #eef0f4;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b;
    --card: #1b2029;
    --text: #e6e9ef;
    --muted: #9aa3b5;
    --border: #2b3240;
    --none: #4a5262;
    --past: #7d879b;
    --future: #a48cf0;
    --past-bg: #20262f;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px / 1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.brand img {
  display: block;
  height: 40px;
  width: auto;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 230px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}
.slogan {
  color: var(--very_noisy);
  font-style: italic;
  font-weight: 600;
}
#search {
  position: relative;
  display: flex;
  gap: 6px;
  flex: 1;
  max-width: 460px;
  min-width: 240px;
}
#search input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
#search button {
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
#suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
#suggestions li {
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13px;
}
#suggestions li:hover {
  background: var(--bg);
}
main {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
h2,
h3 {
  margin: 0 0 8px;
}
h3 {
  font-size: 15px;
  color: var(--muted);
  font-weight: 600;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.now-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.now-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.big {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  background: var(--none);
  text-transform: capitalize;
  white-space: nowrap;
}
.badge.calm {
  background: var(--calm);
}
.badge.moderate {
  background: var(--moderate);
}
.badge.noisy {
  background: var(--noisy);
}
.badge.very_noisy {
  background: var(--very_noisy);
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.grid .card {
  margin-bottom: 0;
}
.grid {
  margin-bottom: 16px;
}
.window .badge {
  font-size: 18px;
  margin: 4px 0 8px;
}
.window .stats {
  font-variant-numeric: tabular-nums;
}
.window .detail {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.conf {
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  margin-left: 6px;
}
.flights {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  font-size: 13px;
}
.flights li {
  padding: 4px 0;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.flights b {
  min-width: 70px;
}
.timeline {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 140px;
  padding-top: 8px;
}
.timeline .bar {
  flex: 1;
  position: relative;
  min-width: 4px;
}
.timeline .bar .fill {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  border-radius: 3px 3px 0 0;
  background: var(--none);
}
.timeline .bar .fill.calm {
  background: var(--calm);
}
.timeline .bar .fill.moderate {
  background: var(--moderate);
}
.timeline .bar .fill.noisy {
  background: var(--noisy);
}
.timeline .bar .fill.very_noisy {
  background: var(--very_noisy);
}
.timeline .bar.forecast .fill {
  opacity: 0.45;
  outline: 2px dashed var(--muted);
  outline-offset: -2px;
}
.timeline .bar .lbl {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--muted);
}
.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.sw {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: -1px;
}
.sw.calm {
  background: var(--calm);
}
.sw.moderate {
  background: var(--moderate);
}
.sw.noisy {
  background: var(--noisy);
}
.sw.very_noisy {
  background: var(--very_noisy);
}
.sw.forecast {
  background: transparent;
  outline: 2px dashed var(--muted);
  outline-offset: -2px;
}
@media (max-width: 640px) {
  .grid,
  .now-grid {
    grid-template-columns: 1fr;
  }
  .timeline .bar .lbl {
    display: none;
  }
}

.detail {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 0;
}
.week {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
}
.wk-row {
  display: grid;
  grid-template-columns: 72px 1fr 48px 52px 52px;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.wk-head {
  color: var(--muted);
  font-size: 10px;
}
.wk-cells {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 2px;
}
.wk-cell {
  height: 18px;
  border: 0;
  padding: 0;
  border-radius: 2px;
  background: var(--none);
  cursor: pointer;
}
.wk-cell.none {
  background: transparent;
  outline: 1px dashed var(--border);
  outline-offset: -1px;
}
.wk-cell.calm {
  background: var(--calm);
}
.wk-cell.moderate {
  background: var(--moderate);
}
.wk-cell.noisy {
  background: var(--noisy);
}
.wk-cell.very_noisy {
  background: var(--very_noisy);
}
.wk-cell:hover,
.wk-cell:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -1px;
}
.wk-sum {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.wk-day {
  white-space: nowrap;
}
@media (max-width: 640px) {
  .wk-row {
    grid-template-columns: 52px 1fr 40px;
    gap: 4px;
  }
  .wk-flights,
  .wk-night {
    display: none;
  }
  .wk-cell {
    height: 16px;
  }
}

.months {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 8px;
}
.month h4 {
  margin: 0;
  font-size: 15px;
  text-transform: capitalize;
}
.month .detail {
  min-height: 2.9em;
}
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-top: 8px;
}
.cal-head {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
}
.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 0;
  border-radius: 4px;
  padding: 2px 0;
  font: inherit;
  font-size: 11px;
  color: #fff;
  background: var(--none);
  cursor: pointer;
}
.cal-day b {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.85;
}
.cal-day span {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cal-day.empty {
  background: transparent;
  color: var(--muted);
  outline: 1px dashed var(--border);
  outline-offset: -1px;
  cursor: default;
}
.cal-day.future {
  background: transparent;
  color: var(--muted);
  opacity: 0.5;
  cursor: default;
}
.cal-day.partial {
  background: transparent;
  color: var(--text);
  outline: 2px dashed var(--muted);
  outline-offset: -2px;
}
.cal-day.calm {
  background: var(--calm);
}
.cal-day.moderate {
  background: var(--moderate);
}
.cal-day.noisy {
  background: var(--noisy);
}
.cal-day.very_noisy {
  background: var(--very_noisy);
}
.cal-day:hover:not(.empty),
.cal-day:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -1px;
}

/* --- map --- */
[hidden] {
  display: none !important;
}
.map-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  justify-content: space-between;
}
.map-head h2 {
  margin: 0 0 8px;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tabs button {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.tabs.small button {
  padding: 3px 8px;
  font-size: 13px;
}
.tabs button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.tabs button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.map-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin-top: 8px;
}
.map-opts label {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 260px;
}
.map-opts input[type="range"] {
  flex: 1;
}
.map-opts select {
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
#map {
  height: min(70vh, 560px);
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 8px;
}
.grid-overlay {
  image-rendering: pixelated;
}
.sw.none-sw {
  background: transparent;
  border: 1px solid var(--border);
}
@media (prefers-color-scheme: dark) {
  #map .leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9);
  }
}

/* --- fifth level, small badges, language switch --- */
.badge.unbearable,
.timeline .bar .fill.unbearable,
.sw.unbearable,
.wk-cell.unbearable,
.cal-day.unbearable {
  background: var(--unbearable);
}
.badge.sm {
  padding: 1px 8px;
  font-size: 12px;
  vertical-align: 1px;
}
.wk-sum .sw {
  width: 14px;
  height: 14px;
  margin: 0;
  vertical-align: middle;
}
#lang button {
  min-width: 34px;
}

/* --- past / now / forecast ------------------------------------------------------- */
header {
  padding-top: max(14px, env(safe-area-inset-top));
}
.head-end {
  display: flex;
  gap: 8px;
  align-items: center;
}
.install {
  padding: 4px 10px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.menu-btn {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: inherit;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.menu-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
dialog.feedback {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  margin: auto;
  color: var(--text);
}
dialog.feedback::backdrop {
  background: rgb(10 14 22 / 0.55);
}
dialog.feedback h2 {
  margin-top: 0;
  padding-right: 32px;
}
.dlg-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.dlg-close:hover {
  background: var(--past-bg);
  color: var(--text);
}
.install-hint {
  margin: 0;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  text-align: center;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.lv-calm {
  --lvl: var(--calm);
}
.lv-moderate {
  --lvl: var(--moderate);
}
.lv-noisy {
  --lvl: var(--noisy);
}
.lv-very_noisy {
  --lvl: var(--very_noisy);
}
.lv-unbearable {
  --lvl: var(--unbearable);
}
.lv-none {
  --lvl: var(--none);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: 2px;
}
.tag.past {
  background: var(--past);
  color: #fff;
}
.tag.past::before {
  content: "◀";
  font-size: 8px;
}
.tag.future {
  border: 1.5px dashed var(--future);
  color: var(--future);
}
.tag.future::after {
  content: "▶";
  font-size: 8px;
}
.tag.now {
  background: var(--text);
  color: var(--card);
}
.live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff4d4f;
  animation: live 1.6s ease-in-out infinite;
}
@keyframes live {
  50% {
    opacity: 0.25;
  }
}
@media (prefers-reduced-motion: reduce) {
  .live {
    animation: none;
  }
}

.hero .loc {
  margin: 0 0 10px;
  font-weight: 600;
}
.horizons {
  display: grid;
  grid-template-columns: 2fr 1.15fr 2fr;
  gap: 10px;
  align-items: stretch;
}
.hz-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
}
.hz-group.past {
  background: var(--past-bg);
}
.hz-group.future {
  border: 2px dashed var(--future);
}
.hz-group.nowg {
  padding: 10px 0;
}
.hz-tag {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
  min-height: 22px;
}
.hz-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1;
}
.nowg .hz-tiles {
  grid-template-columns: 1fr;
}
.hz {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border-radius: 12px;
  min-height: 118px;
}
.hz.past,
.hz.now {
  background: var(--lvl);
  color: #fff;
}
.hz.now {
  box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--lvl);
}
.hz.future {
  background: repeating-linear-gradient(
    135deg,
    color-mix(in srgb, var(--lvl) 26%, var(--card)) 0 7px,
    color-mix(in srgb, var(--lvl) 10%, var(--card)) 7px 14px
  );
  border: 2px dashed var(--lvl);
  color: var(--text);
}
.hz-when {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  line-height: 1.25;
}
.hz-when span {
  font-size: 11px;
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}
.hz-level {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.15;
}
.hz.now .hz-level {
  font-size: 24px;
}
.hz-meta {
  font-size: 12px;
  opacity: 0.85;
}
.faces {
  display: flex;
  min-height: 22px;
  align-items: center;
}
.faces img {
  width: 22px;
  height: 22px;
  margin-right: -3px;
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.25));
}
.hz.now .faces img {
  width: 28px;
  height: 28px;
}
.hz.future .faces img {
  opacity: 0.8;
}

.scale {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.scale h3 {
  font-size: 13px;
}
.scale ol {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.scale li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-left: 5px solid var(--lvl);
  border-radius: 4px;
  background: color-mix(in srgb, var(--lvl) 10%, var(--card));
  font-size: 12px;
}
.scale li .faces img {
  width: 18px;
  height: 18px;
}
.scale li b {
  font-size: 13px;
}
.hero .hero-foot {
  margin: 10px 0 0;
}
.hz-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hz-group.past .hz-title {
  color: var(--past);
}
.hz-group.future .hz-title {
  color: var(--future);
  font-style: italic;
}
.sec-sub {
  font-size: 14px;
  font-weight: 400;
}

.co2-figure {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
}
.co2-figure b {
  font-size: 32px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.co2-figure .small {
  flex-basis: 100%;
}
.co2-bar {
  position: relative;
  height: 14px;
  margin: 10px 0 6px;
  border-radius: 999px;
  background: var(--past-bg);
  overflow: hidden;
}
.co2-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--noisy), var(--very_noisy) 70%, var(--unbearable));
  transition: width 0.6s ease;
}
.co2-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  margin-left: -1px;
  background: var(--text);
}
.co2-quip {
  margin: 8px 0;
  padding: 8px 12px;
  border-left: 4px solid var(--very_noisy);
  background: color-mix(in srgb, var(--very_noisy) 7%, var(--card));
  font-style: italic;
}
@media (prefers-reduced-motion: reduce) {
  .co2-fill {
    transition: none;
  }
}

.fb-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}
.fb-kinds legend {
  margin-bottom: 6px;
  padding: 0;
  font-size: 13px;
  color: var(--muted);
}
.form .fb-kinds label {
  flex-direction: row;
  color: var(--text);
}
.fb-kinds input {
  position: absolute;
  opacity: 0;
}
.fb-kinds span {
  padding: 5px 12px;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  cursor: pointer;
}
.fb-kinds input:checked + span {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
}
.fb-kinds input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.sec {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 17px;
  margin: 8px 0 10px;
}
.window.forecast {
  border: 2px dashed var(--future);
  background: repeating-linear-gradient(
    135deg,
    var(--card) 0 10px,
    color-mix(in srgb, var(--future) 5%, var(--card)) 10px 20px
  );
}
.now-head h2 {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.tl-sides {
  display: flex;
  justify-content: space-between;
}
.timeline .tl-now {
  position: relative;
  align-self: stretch;
  flex: 0 0 2px;
  margin-bottom: 18px;
  background: var(--text);
}
.timeline .tl-now span {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 4px;
  border-radius: 4px;
  background: var(--text);
  color: var(--card);
  font-size: 10px;
  white-space: nowrap;
}

.view-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.view-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
}
.view-group.past {
  background: var(--past-bg);
}
.view-group.future {
  border: 2px dashed var(--future);
}
.view-group .tag {
  align-self: flex-start;
}

.thx-who {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.thx-who button {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.thx-who button.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
}
.thx-who img {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
}
.thx-who span {
  display: flex;
  flex-direction: column;
  flex: 1;
  line-height: 1.25;
}
.thx-who small {
  color: var(--muted);
}
.thx-n {
  font-size: 12px;
  font-style: normal;
  color: var(--muted);
  white-space: nowrap;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
#thx-form[hidden] {
  display: none;
}
.form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}
.form textarea,
.form input {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.form .hp {
  position: absolute;
  left: -9999px;
}
.thx-to {
  margin: 0;
}
.thx-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.thx-actions button[type="submit"] {
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.thx-actions button:disabled {
  opacity: 0.6;
}
button.link {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.thx-status:empty {
  display: none;
}

@media (max-width: 760px) {
  .horizons,
  .split {
    grid-template-columns: 1fr;
  }
  .hz {
    min-height: 0;
  }
  .nowg .hz {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .nowg .hz .faces {
    grid-column: 2;
    grid-row: 1 / span 3;
  }
  .hz-group.nowg {
    padding: 4px 4px;
  }
  .scale ol {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .scale li {
    display: grid;
    grid-template-columns: 112px 1fr;
    grid-template-rows: auto auto;
    column-gap: 8px;
    padding: 3px 8px;
  }
  .scale li .faces {
    grid-row: span 2;
  }
}
@media (max-width: 640px) {
  header {
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .brand-text {
    max-width: 170px;
    font-size: 11px;
  }
  .brand-text > span {
    display: none;
  }
  .brand {
    margin-right: auto;
  }
  .brand img {
    height: 30px;
  }
  .head-end {
    gap: 6px;
  }
  .install,
  .menu-btn {
    padding: 3px 7px;
    font-size: 12px;
  }
  #lang button {
    min-width: 0;
    padding: 3px 6px;
  }
  #search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    min-width: 0;
  }
  main {
    padding: 12px;
  }
  .card {
    padding: 12px;
  }
}

/* Methodology page */
.method {
  max-width: 760px;
}
.method h1 {
  margin: 4px 0 12px;
  font-size: 26px;
}
.method h2 {
  margin: 26px 0 8px;
  font-size: 18px;
  scroll-margin-top: 12px;
}
.method .lead {
  font-size: 16px;
}
.method li {
  margin-bottom: 4px;
}
.method table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.method th,
.method td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.method th {
  color: var(--muted);
  font-weight: 600;
}
.method a,
.hero-foot a,
.foot-links a {
  color: var(--accent);
}
.method .sources {
  margin-top: 0;
  font-size: 13px;
}
.co2-scope {
  display: inline-block;
  margin: -2px 0 8px;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--past-bg);
  font-size: 13px;
  font-weight: 600;
}
