/*
 * «Табло» — the visual system of the `airports` mini-site: a dark departures
 * board, JetBrains Mono for data, Oswald for headings.
 *
 * Colour roles (one meaning each, dataviz-checked on the dark surface):
 *   red     — closed; also the worst day / busiest hour
 *   amber   — «по согласованию» only
 *   green   — the best day / quietest hour («по расписанию» on a real board)
 *   cream   — open airports on the map
 *   heat-*  — «how often», five steps from dim yellow to red (lamps, calendar)
 * The board yellow of headings and controls is chrome, it encodes no data.
 */

:root {
  --bg: #0c0d0f;
  --panel: #15171a;
  --cell: #1d2024;
  --line: #26292e;
  --chrome: #f6c343;
  --text: #ece8dd;
  --mute: #9b9a92;
  --closed: #ff5a46;
  --partial: #f6c343;
  --good: #5fd38d;
  --open: #cfc8b4;
  --bar: #4a4e55;
  --dot-off: #2b2e33;
  --heat-1: #7a6516;
  --heat-2: #d6a91c;
  --heat-3: #f08a24;
  --heat-4: #f2552c;
  --heat-5: #ff2a2a;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --cond: "Oswald", "Arial Narrow", sans-serif;
  color-scheme: dark;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--chrome);
}

a:hover {
  color: #ffd970;
}

:focus-visible {
  outline: 2px solid var(--chrome);
  outline-offset: 2px;
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.caps {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--mute);
  text-transform: uppercase;
}

/* Top bar */

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--chrome);
}

.topbar-brand {
  font-family: var(--cond);
  font-size: 15px;
  letter-spacing: 0.3em;
  color: var(--chrome);
  text-decoration: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: var(--mute);
}

.site-lang {
  display: flex;
  gap: 8px;
}

.site-lang a {
  color: var(--mute);
  text-decoration: none;
}

.site-lang a.is-active {
  color: var(--text);
}

/* Headings */

.title {
  margin: 0;
  font-family: var(--cond);
  font-weight: 600;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lead {
  margin: 10px 0 0;
  color: var(--mute);
  font-size: 16px;
  line-height: 1.65;
}

.block-title {
  margin: 0;
  font-family: var(--cond);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--chrome);
  text-transform: uppercase;
}

.note {
  margin: 0;
  color: var(--mute);
  font-size: 13px;
  line-height: 1.5;
}

.panel {
  background: var(--panel);
  border-radius: 6px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Period switch */

.period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.period button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.period button[aria-pressed="true"] {
  background: var(--chrome);
  border-color: var(--chrome);
  color: var(--bg);
  font-weight: 700;
}

.period .info {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--mute);
}

.period .info:hover,
.period .info:focus-visible {
  color: var(--text);
  border-color: var(--mute);
}

/* The reader's own days: two dates under the switch */
.period-form {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
}

.period-form[hidden] {
  display: none;
}

.period-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.period-field input {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  color-scheme: dark;
}

.period-field input:focus-visible {
  outline: 2px solid var(--chrome);
  outline-offset: 1px;
}

.period-field input {
  width: 13ch;
}

.period-field input[aria-invalid="true"] {
  border-color: var(--closed);
}

.period-form {
  position: relative;
}

/* The calendar under the dates */
.date-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  width: 280px;
  padding: 12px;
  border: 1px solid var(--chrome);
  border-radius: 6px;
  background: var(--bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.date-pop[hidden] {
  display: none;
}

.date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.period .date-step {
  padding: 2px 10px;
  border: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.period .date-step:disabled {
  opacity: 0.25;
  cursor: default;
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.date-weekday {
  padding: 4px 0;
  color: var(--mute);
  font-size: 10px;
  text-align: center;
}

.period .date-day {
  padding: 6px 0;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  letter-spacing: 0;
  text-align: center;
}

.period .date-day:hover:not(:disabled) {
  background: var(--cell);
}

.period .date-day:disabled {
  color: var(--dot-off);
  cursor: default;
}

.period .date-day.is-today {
  box-shadow: inset 0 0 0 1px var(--line);
}

.period .date-day.is-between {
  background: color-mix(in srgb, var(--chrome) 18%, transparent);
}

.period .date-day.is-from,
.period .date-day.is-to {
  background: var(--chrome);
  color: var(--bg);
  font-weight: 700;
}

/* Split-flap digits */

.flap {
  display: flex;
  gap: 4px;
}

.flap span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 60px;
  border-radius: 4px;
  background: var(--cell);
  box-shadow: inset 0 -2px 0 #000;
  color: var(--chrome);
  font-size: 46px;
  line-height: 1;
}

.flap--closed span {
  color: var(--closed);
}

.flap--big span {
  width: 56px;
  height: 84px;
  font-size: 64px;
}

.flap--small {
  gap: 2px;
}

.flap--small span {
  width: 15px;
  height: 24px;
  font-size: 16px;
  color: var(--text);
}

/* Stat tiles */

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.kpi {
  background: var(--panel);
  border-radius: 6px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpi-name {
  font-family: var(--cond);
  font-size: 44px;
  line-height: 1;
  color: var(--chrome);
  text-transform: uppercase;
  text-decoration: none;
}

.kpi-big {
  font-family: var(--cond);
  font-size: 48px;
  line-height: 1;
}

.kpi-sub + .kpi-sub {
  margin-top: -10px;
}

.kpi-sub {
  margin: 0;
  color: var(--mute);
  font-size: 13px;
  line-height: 1.5;
}

/* Status legend */

.legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.legend-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.legend-item .lamp {
  margin-top: 5px;
}

.legend-title {
  font-size: 13px;
  letter-spacing: 0.12em;
}

.lamp {
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lamp, var(--bar));
  box-shadow: 0 0 8px var(--lamp, transparent);
}

.is-closed { --lamp: var(--closed); color: var(--closed); }
.is-partial { --lamp: var(--partial); color: var(--partial); }
.is-open { --lamp: var(--good); }
.is-off { --lamp: #5d6168; }

/* Map */

.map-wrap {
  position: relative;
}

.map {
  display: block;
  width: 100%;
  height: auto;
}

.map .spot {
  cursor: pointer;
}

.map .spot:focus {
  outline: none;
}

.map .spot:focus-visible .hit {
  stroke: var(--chrome);
  stroke-width: 2;
}

.map-tip {
  position: absolute;
  z-index: 5;
  width: 280px;
  max-width: calc(100% - 16px);
  padding: 14px 16px;
  border: 1px solid var(--chrome);
  border-radius: 6px;
  background: var(--bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-tip[hidden] {
  display: none;
}

.tip-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.tip-name {
  font-family: var(--cond);
  font-size: 24px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tip-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.tip-open {
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 4px;
  background: var(--chrome);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.tip-open:hover {
  color: var(--bg);
  background: #ffd970;
}

/* Rating board */

.board {
  list-style: none;
  margin: 0;
  padding: 0;
}

.board-head,
.board-row a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 92px 200px 180px;
  align-items: center;
  gap: 16px;
}

.board-head {
  padding-bottom: 8px;
}

.board-row a {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.board-row a:hover,
.board-row a:focus-visible {
  background: #121417;
}

.board-cells {
  display: flex;
  gap: 3px;
}

.board-cells span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 30px;
  border-radius: 3px;
  background: #1a1c20;
  box-shadow: inset 0 -1px 0 #000;
  color: var(--chrome);
}

.board-name {
  display: none;
  color: var(--chrome);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--mute);
}

.board-value {
  text-align: right;
  font-size: 22px;
}

.text-button {
  align-self: flex-start;
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

/* Bars: hour of day and months */

.keys {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
}

.key {
  display: flex;
  align-items: center;
  gap: 8px;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--sw);
}

.swatch--dashed {
  border: 1.5px dashed var(--mute);
  background: transparent;
}

.bars {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.bar-value {
  font-size: 11px;
  white-space: nowrap;
}

.bar-fill {
  width: 100%;
  max-width: 30px;
  border-radius: 3px 3px 0 0;
  background: var(--bar);
}

.bar-label {
  font-size: 11px;
  color: var(--mute);
  white-space: nowrap;
}

.bar.is-worst .bar-fill { background: var(--closed); }
.bar.is-worst .bar-value { color: var(--closed); }
.bar.is-best .bar-fill { background: var(--good); }
.bar.is-best .bar-value { color: var(--good); }

.stack {
  width: 100%;
  max-width: 34px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stack span {
  display: block;
}

.stack .seg-partial { background: var(--partial); }
.stack .seg-closed { background: var(--closed); }
.stack span:first-child { border-radius: 3px 3px 0 0; }

.stack.is-unfinished .seg-partial {
  background: rgba(246, 195, 67, 0.18);
  border: 1.5px dashed var(--partial);
}

.stack.is-unfinished .seg-closed {
  background: rgba(255, 90, 70, 0.18);
  border: 1.5px dashed var(--closed);
}

/* Weekday cards */

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.weekday {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 12px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.weekday-value {
  font-family: var(--cond);
  font-size: 34px;
  line-height: 1;
}

.weekday-value small {
  font-size: 18px;
  color: var(--mute);
}

.weekday-meter {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
}

.weekday-meter span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--bar);
}

.weekday-tag {
  min-height: 16px;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.weekday.is-worst { border-color: var(--closed); }
.weekday.is-worst .weekday-meter span { background: var(--closed); }
.weekday.is-worst .weekday-tag { color: var(--closed); }
.weekday.is-best { border-color: var(--good); }
.weekday.is-best .weekday-meter span { background: var(--good); }
.weekday.is-best .weekday-tag { color: var(--good); }

/* Lamps: weekday × hour and the day calendar */

.heat-0 { background: var(--dot-off); }
.heat-1 { background: var(--heat-1); }
.heat-2 { background: var(--heat-2); }
.heat-3 { background: var(--heat-3); }
.heat-4 { background: var(--heat-4); }
.heat-5 { background: var(--heat-5); }

.lamps {
  display: grid;
  grid-template-columns: 28px repeat(24, minmax(0, 1fr));
  gap: 5px;
  max-width: 760px;
}

.lamps .lamp-cell {
  aspect-ratio: 1;
  border-radius: 50%;
}

.lamps .tick,
.calendar .tick {
  font-size: 10px;
  color: var(--mute);
  text-align: center;
  white-space: nowrap;
}

.lamps .day {
  display: flex;
  align-items: center;
  font-size: 11px;
  color: var(--mute);
}

.lamp-scale {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--mute);
}

.lamp-scale span:not(.scale-text) {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: none;
}

.calendar-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
}

.calendar {
  display: grid;
  grid-template-rows: 14px repeat(7, 12px);
  grid-auto-flow: column;
  grid-auto-columns: 12px;
  gap: 4px;
  width: max-content;
  min-width: 100%;
  justify-content: space-between;
}

.calendar .cal {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.calendar .heat-4,
.calendar .heat-5 {
  box-shadow: none;
}

/* Latest restrictions */

.recent-head,
.recent-row {
  display: grid;
  grid-template-columns: 150px 210px 230px 130px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.recent-head {
  padding-bottom: 8px;
}

.recent-row {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.recent-time {
  display: flex;
  align-items: center;
  gap: 6px;
}

.recent-posts {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.recent-cut {
  font-size: 12px;
  color: var(--mute);
}

/* Airport header */

.back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mute);
  text-decoration: none;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.14em;
}

.back svg {
  display: block;
  flex: none;
}

.airport-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

/* The name leads; the code is a tag on its baseline, city and ICAO after it */
.airport-head-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
  min-width: 0;
}

.airport-code {
  font-size: 28px;
  letter-spacing: 0.2em;
  color: var(--chrome);
}

.airport-meta {
  color: var(--mute);
  font-size: 13px;
  letter-spacing: 0.1em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--text);
}

.status-pill.is-closed,
.status-pill.is-partial {
  border-color: currentColor;
}

/* Footer and methodology */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 13px;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--chrome);
  font: inherit;
  letter-spacing: 0.1em;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.method-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  padding: 22px 24px;
  border: 1px solid var(--chrome);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}

.method-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.method-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.method-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.method-body h3 {
  margin: 20px 0 6px;
  font-family: var(--cond);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--chrome);
}

.method-body p {
  margin: 0 0 10px;
  color: var(--mute);
  line-height: 1.6;
}

.loading {
  color: var(--mute);
}

.noscript {
  padding: 16px;
}

/* Narrow screens */

@media (max-width: 960px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* The status keeps its lamp only; its header cell stays, empty, to keep the columns */
  .board-head,
  .board-row a {
    grid-template-columns: 28px minmax(0, 1fr) 44px 16px 84px;
    gap: 10px;
  }

  .board-head .col-status {
    visibility: hidden;
  }

  .board-head {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .board-head span {
    min-width: 0;
  }

  .board-status-text {
    display: none;
  }

  .board-cells {
    display: none;
  }

  .board-name {
    display: block;
  }

  .recent-head {
    display: none;
  }

  .recent-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
  }

  .recent-posts {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .page {
    padding: 20px 16px 32px;
    gap: 20px;
  }

  .legend {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .panel {
    padding: 16px;
  }

  .weekdays {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .flap span {
    width: 30px;
    height: 46px;
    font-size: 34px;
  }

  .flap--big span {
    width: 44px;
    height: 64px;
    font-size: 48px;
  }

  .flap--small span {
    width: 13px;
    height: 21px;
    font-size: 14px;
  }

  .kpi-big {
    font-size: 32px;
  }

  /* A restriction as three lines: date and time, status and duration, posts */
  .recent-row,
  .recent-row.has-flights {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "date time"
      "status duration"
      "flights flights"
      "posts posts";
  }

  .recent-date { grid-area: date; }
  .recent-row .recent-time { grid-area: time; justify-self: end; }
  .recent-status { grid-area: status; }
  .recent-duration { grid-area: duration; justify-self: end; text-align: right; }
  .recent-flights { grid-area: flights; }
  .recent-row .recent-posts { grid-area: posts; }

  .kpi-name {
    font-size: 32px;
  }

  .bar-value {
    display: none;
  }

  .bar.is-best .bar-value,
  .bar.is-worst .bar-value,
  .bar.is-labelled .bar-value {
    display: block;
  }

  .bars {
    gap: 2px;
  }

  .board-value {
    font-size: 18px;
  }

  .lamps {
    grid-template-columns: 24px repeat(24, minmax(0, 1fr));
    gap: 2px;
  }

  .lamps .tick-minor {
    visibility: hidden;
  }

  .map-tip {
    left: 8px !important;
    right: 8px;
    width: auto;
  }
}

/* Tooltip for bars, cells and lamps */

.tooltip {
  position: fixed;
  z-index: 10;
  max-width: 260px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  font-size: 13px;
  line-height: 1.45;
  pointer-events: none;
}

.tooltip[hidden] {
  display: none;
}

.tooltip strong {
  display: block;
  color: var(--text);
}

.tooltip .tt-row {
  color: var(--mute);
}

/* Status words keep their colour inside muted rows */
.board-status.is-closed { color: var(--closed); }
.board-status.is-partial { color: var(--partial); }

/* Very narrow screens (small phones, a narrow side panel) */
@media (max-width: 360px) {
  .title {
    font-size: 32px;
    overflow-wrap: anywhere;
  }

  .kpis {
    grid-template-columns: 1fr;
  }

  .weekdays {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topbar-brand {
    letter-spacing: 0.16em;
  }
}


/* Closed for good since 2022: a red ring with a cross (map, legend, map card) */
.mark-long {
  position: relative;
  display: inline-block;
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border: 1.5px dotted var(--closed);
  border-radius: 50%;
}

.mark-long::before,
.mark-long::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 1.5px;
  background: var(--closed);
  transform: translate(-50%, -50%) rotate(45deg);
}

.mark-long::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.tip-status .mark-long {
  margin-top: 0;
}

.legend-title.is-long {
  color: var(--closed);
}

.map .spot--long {
  cursor: help;
}


/* A city's card on the map: its airports, each a link */
.tip-airports {
  display: flex;
  flex-direction: column;
  margin: 2px 0;
}

.tip-airport {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
}

.tip-airport:hover,
.tip-airport:focus-visible {
  color: var(--chrome);
}

.airport-meta a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.airport-meta a:hover {
  color: var(--chrome);
}

.panel[hidden] {
  display: none;
}

/* A pinned map card: the × shows, the name keeps clear of it */
.tip-close {
  display: none;
  position: absolute;
  top: 6px;
  right: 8px;
  padding: 2px 6px;
  border: 0;
  background: none;
  color: var(--mute);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.tip-close:hover,
.tip-close:focus-visible {
  color: var(--chrome);
}

.map-tip.is-pinned .tip-close {
  display: block;
}

.map-tip.is-pinned .tip-head {
  padding-right: 22px;
}

/*
 * Phones: the map is folded into a strip around Moscow; «Развернуть карту»
 * opens it full screen, wider than the phone, to drag around, with the card
 * as a sheet at the bottom.
 */
.map-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.map-hint,
.map-close,
.map-open {
  display: none;
}

@media (max-width: 600px) {
  .map-wrap {
    height: 220px;
    overflow: hidden;
    border-radius: 6px;
  }

  .map-open {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 0 14px;
    border: 0;
    background: linear-gradient(transparent 45%, var(--panel));
    cursor: pointer;
  }

  .map-open span {
    padding: 8px 14px;
    border-radius: 4px;
    background: var(--chrome);
    color: var(--bg);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
  }

  #map-block.is-open {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 12px;
    border-radius: 0;
  }

  #map-block.is-open #map-caption {
    display: none;
  }

  #map-block.is-open .map-hint {
    display: block;
    margin: 0;
  }

  #map-block.is-open .map-close {
    display: block;
    flex: none;
    padding: 0 4px;
    border: 0;
    background: none;
    color: var(--text);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
  }

  #map-block.is-open .map-wrap {
    flex: 1;
    height: auto;
    overflow: auto;
    overscroll-behavior: contain;
  }

  #map-block.is-open .map {
    width: 820px;
    max-width: none;
  }

  #map-block.is-open .map-open {
    display: none;
  }

  /* No hover on a phone: the sheet keeps its button */
  #map-block.is-open .map-tip .tip-open {
    display: flex;
  }

  /* The card of the tapped spot: a sheet at the bottom of the screen */
  #map-block.is-open .map-tip {
    position: fixed;
    top: auto !important;
    left: 8px !important;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
  }

  body.map-is-open {
    overflow: hidden;
  }
}

/* On a desktop the spot itself opens the airport, so the card has no button */
.map-tip .tip-open {
  display: none;
}

/* What became of the flights (AeroDataBox) */
.flights[hidden] {
  display: none;
}

.flights-figures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.flights-figure {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flap--medium span {
  width: 30px;
  height: 46px;
  font-size: 30px;
}

.flights-bar {
  display: flex;
  gap: 2px;
  height: 22px;
  border-radius: 4px;
  overflow: hidden;
}

.flights-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.flights .is-cancelled { background: var(--closed); }
.flights .is-diverted { background: #a3271b; }
.flights .is-late { background: var(--heat-3); }
.flights .is-minor { background: var(--heat-1); }
.flights .is-on-time { background: var(--bar); }

.flights-wait {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 6px;
}

.flights-wait p {
  margin: 0;
  color: var(--mute);
}

.board-head.has-flights,
.board-row a.has-flights {
  grid-template-columns: 44px minmax(0, 1fr) 92px 200px 130px 150px;
}

.board-flights {
  text-align: right;
  color: var(--closed);
}

.board-head .board-flights {
  color: var(--mute);
}

.recent-head.has-flights,
.recent-row.has-flights {
  grid-template-columns: 110px 190px 190px 110px 260px minmax(0, 1fr);
}

.recent-flights {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.is-cancelled-text {
  color: var(--closed);
}

@media (max-width: 760px) {
  .flights-figures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flap--medium span {
    width: 22px;
    height: 34px;
    font-size: 22px;
  }

  /* The phone board keeps its columns: the cancelled flights go into the map card */
  .board-head.has-flights,
  .board-row a.has-flights {
    grid-template-columns: 28px minmax(0, 1fr) 44px 16px 84px;
  }

  .board-flights {
    display: none;
  }
}
