/*
  Tokens of the game (cargo-companies, src/styles/tokens.css): dark only, flat, four grey steps,
  one radius scale, lime for the focus and never for money. The map scripts read the colors here.
  Layout: a bar on top, the page as a Route in a rail at the left, the country map as the hero.
*/
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #131415;
  --card: #1a1b1d;
  --sunken: #0d0e0f;
  --accent: #232527;
  --border: #2a2c30;
  --border-strong: #3a3d42;
  --input: #6b7078;
  --foreground: #ececec;
  --muted: #989ca1;
  --primary: #c6f24e;
  --primary-hover: #b4e03a;
  --primary-foreground: #141a02;
  --primary-tint: #c6f24e14;
  --primary-soft: #c6f24e66;
  --positive: #5ad18a;
  --negative: #ff6b6b;
  --warning: #ffb454;
  --ring: #ffffff;
  --map-water: #0f1f2b;
  --map-neighbor: #16171a;
  --map-earth: #1e2023;
  --map-boundary: #4a4e55;
  --map-road: #3d4147;
  --map-label: #a4a8ae;
  --pin-other: #7c8794;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --bar: 3.5rem;
  --rail: 0rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font: 400 1rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
ol,
ul,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

h1,
h2 {
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.75rem, 6.4vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.625rem;
  font-weight: 600;
}

a {
  color: inherit;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--primary);
}

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

::selection {
  background: var(--primary);
  color: var(--primary-foreground);
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.up {
  color: var(--positive);
}

.icon {
  flex: none;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.wrap {
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- Bar and buttons -------------------------------------------------------------------------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--bar);
  padding-inline: 1.25rem;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.lockup:hover {
  color: var(--foreground);
}

.lockup svg {
  width: 1.5em;
  height: 1.5em;
  color: var(--primary);
}

.lockup i {
  font-style: normal;
  font-weight: 400;
  opacity: 0.6;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding-inline: 1rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  background: none;
  color: var(--foreground);
  font: 500 0.875rem/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 120ms;
}

.button .icon {
  width: 1rem;
  height: 1rem;
}

.button.primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.button.primary:hover {
  background: var(--primary-hover);
}

.button.outline {
  border-color: var(--input);
}

.button.outline:hover,
.button.ghost:hover {
  background: var(--accent);
  color: var(--foreground);
}

.button.dark {
  background: var(--primary-foreground);
  color: var(--primary);
}

.button.dark:hover {
  background: #243004;
}

.button.large {
  height: 3rem;
  padding-inline: 1.5rem;
  font-size: 1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.note {
  font-size: 0.875rem;
  color: var(--muted);
}

/* --- Rail: the page as a Route ---------------------------------------------------------------- */

.rail {
  display: none;
}

@media (min-width: 75rem) {
  :root {
    --rail: 5rem;
  }

  .rail {
    position: fixed;
    top: var(--bar);
    bottom: 0;
    left: 0;
    z-index: 20;
    display: block;
    width: var(--rail);
    background: var(--sunken);
    border-right: 1px solid var(--border);
  }

  main,
  footer {
    margin-left: var(--rail);
  }
}

.rail-track {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding-block: 5rem 1.25rem;
}

.rail-line,
.rail-done {
  position: absolute;
  top: 28px;
  left: calc(50% - 1px);
  width: 2px;
}

.rail-line {
  bottom: 3rem;
  background: repeating-linear-gradient(var(--primary) 0 4px, transparent 4px 10px);
}

.rail-done {
  height: 0;
  background: #6a802d;
}

.rail a {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding-bottom: 0.125rem;
  background: var(--sunken);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1rem;
  text-decoration: none;
}

.rail a b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--primary);
  border-radius: 0.25rem;
  background: var(--sunken);
  color: var(--foreground);
  font-weight: 600;
}

.rail a:hover,
.rail a[aria-current] {
  color: var(--foreground);
}

.rail a[aria-current] b {
  background: var(--accent);
}

.rail .rail-end b {
  background: var(--primary);
  color: var(--primary-foreground);
}

.rail-vehicle {
  position: absolute;
  top: -14px;
  left: calc(50% - 14px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--sunken);
  border-radius: 6px;
  background: var(--foreground);
  color: var(--sunken);
  font-size: 18px;
  transform: translateY(28px);
}

/* The heading of the Vehicle: an arrowhead that looks out behind the tile. */
.rail-vehicle::after {
  content: "";
  position: absolute;
  left: calc(50% - 7px);
  bottom: -10px;
  border: 7px solid transparent;
  border-top: 9px solid var(--foreground);
  border-bottom: 0;
}

.rail-vehicle.up::after {
  top: -10px;
  bottom: auto;
  border-top: 0;
  border-bottom: 9px solid var(--foreground);
}

section {
  scroll-margin-top: var(--bar);
}

/* --- Hero: the country map -------------------------------------------------------------------- */

.hero {
  border-bottom: 1px solid var(--border);
}

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
}

.pitch {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2.5rem var(--gutter) 2rem;
}

.lead {
  max-width: 34rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
}

.hero-map {
  position: relative;
  order: 2;
  aspect-ratio: 4 / 5.4;
  overflow: hidden;
}

.hero-map canvas,
.window canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.can-pick {
  cursor: pointer;
}

.popup {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.625rem;
  background: var(--card);
  font-size: 0.875rem;
  line-height: 1.25rem;
  visibility: hidden;
}

.popup.ready {
  visibility: visible;
}

.popup .pairs,
.popup .button {
  display: none;
}

.popup-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.popup-head div {
  display: flex;
  flex-direction: column;
}

.popup-head strong {
  font-size: 1rem;
  font-weight: 600;
}

.tile {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  background: var(--accent);
  font-size: 1.25rem;
}

.tile.light {
  background: var(--foreground);
  color: var(--sunken);
  font-size: 1.5rem;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status .icon {
  font-size: 1rem;
}

.pairs {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.pairs div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.pairs dt {
  color: var(--muted);
}

.pairs dd {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.toasts {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(21rem, calc(100% - 1.5rem));
  pointer-events: none;
}

.toasts li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.5rem;
  background: var(--card);
  font-size: 0.875rem;
  line-height: 1.25rem;
  animation: enter 200ms cubic-bezier(0.2, 0, 0, 1);
}

.toasts .icon {
  color: var(--positive);
  font-size: 1rem;
}

@keyframes enter {
  from {
    opacity: 0;
  }
}

@media (min-width: 47.5rem) {
  .stage {
    justify-content: center;
    min-height: clamp(34rem, calc(100vh - var(--bar) - 5.5rem), 50rem);
  }

  .hero-map {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
  }

  .pitch {
    position: relative;
    width: min(48%, 38rem);
    padding-block: 4rem;
    pointer-events: none;
  }

  .pitch a {
    pointer-events: auto;
  }

  .popup {
    top: 0;
    right: auto;
    bottom: auto;
    left: 0;
    width: 15.5rem;
    padding: 0.875rem;
    will-change: transform;
  }

  .popup .pairs {
    display: flex;
  }

  .popup .button {
    display: inline-flex;
    height: 2rem;
  }

  .toasts {
    top: 1rem;
    right: 1rem;
  }
}

/* Between a phone and a wide screen the map is small: one toast beside the pitch, a short popup. */
@media (min-width: 47.5rem) and (max-width: 70rem) {
  .toasts {
    top: auto;
    right: auto;
    bottom: 1rem;
    left: var(--gutter);
  }

  .toasts li:nth-child(n + 2),
  .popup .pairs {
    display: none;
  }

  .popup {
    width: 14rem;
  }
}

.hud {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  background: var(--card);
  border-top: 1px solid var(--border-strong);
}

.hud div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.125rem;
  min-height: 4rem;
  padding: 0.625rem 1.25rem;
  border-left: 1px solid var(--border);
}

.hud dt {
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--muted);
}

.hud dd {
  font-size: 1.125rem;
  line-height: 1.5rem;
  font-weight: 500;
}

.hud-company dd {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.emblem {
  display: inline-grid;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  overflow: hidden;
  border-radius: 0.25rem;
  background: var(--sunken);
}

.emblem svg {
  width: 100%;
  height: 100%;
}

.emblem.big {
  width: 6rem;
  height: 6rem;
}

/* --- Bands ------------------------------------------------------------------------------------ */

.band {
  padding-block: clamp(4rem, 9vw, 7.5rem);
  border-bottom: 1px solid var(--border);
}

.intro {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 50rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.intro p {
  max-width: 41rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
  padding: 1.25rem;
  border-radius: 0.5rem;
  background: var(--card);
}

.card > header,
.ledger header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}

.card > header .muted {
  font-size: 0.875rem;
}

.hint {
  min-height: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--muted);
}

/* Sites: two chains from a Site to a Market */

.chains {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.chain {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
}

.node {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 9rem;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.node strong {
  font-size: 1.125rem;
  line-height: 1.625rem;
  font-weight: 600;
}

.node .muted {
  font-size: 0.75rem;
  line-height: 1rem;
}

.pin {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.25rem;
  border-radius: 0.65rem;
  background: var(--foreground);
  color: var(--sunken);
  font-size: 2.125rem;
}

.pin::after {
  content: "";
  position: absolute;
  top: calc(100% - 1px);
  left: calc(50% - 0.65rem);
  border: 0.65rem solid transparent;
  border-top: 0.75rem solid var(--foreground);
  border-bottom: 0;
}

.pin.own {
  background: var(--primary);
}

.pin.own::after {
  border-top-color: var(--primary);
}

/* The flow between two nodes: the Route line with the Good on it. */
.link {
  position: relative;
  height: 3px;
  margin-top: calc(1.75rem - 1.5px);
  background: repeating-linear-gradient(90deg, var(--primary) 0 6px, transparent 6px 14px);
}

.link span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.25rem;
  background: var(--accent);
  font-size: 0.8125rem;
  line-height: 1.25rem;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.link .icon {
  font-size: 1rem;
}

@media (max-width: 52rem) {
  .chain {
    grid-template-columns: 1fr;
  }

  .node {
    display: grid;
    grid-template-columns: 3.5rem 1fr;
    column-gap: 1rem;
    width: auto;
    text-align: left;
  }

  .node .pin {
    grid-row: span 3;
  }

  .link {
    width: 3px;
    height: 3.25rem;
    margin: 0 0 0.5rem calc(1.75rem - 1.5px);
    background: repeating-linear-gradient(var(--primary) 0 6px, transparent 6px 14px);
  }

  .link span {
    left: 2rem;
    transform: translateY(-50%);
  }
}

.extras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.5rem 3rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.extras li {
  display: flex;
  gap: 1rem;
}

.extras p {
  color: var(--muted);
}

.extras strong {
  color: var(--foreground);
  font-weight: 600;
}

/* Vehicles: capacity drawn to scale, one bar per ton */

.scroller {
  overflow-x: auto;
}

.fleet {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
}

.fleet th,
.fleet td {
  padding: 1.125rem 0 1.125rem 1.5rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}

.fleet thead th {
  padding-block: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}

.fleet th:first-child {
  padding-left: 0;
  text-align: left;
}

.fleet tbody th {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.fleet td {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.fleet .wide {
  width: 26rem;
  text-align: left;
}

.crates {
  display: inline-block;
  height: 1.5rem;
  margin-right: 0.875rem;
  background: repeating-linear-gradient(90deg, var(--foreground) 0 12px, transparent 12px 16px);
  vertical-align: -0.4rem;
}

.crates.n2 {
  width: 28px;
}

.crates.n6 {
  width: 92px;
}

.crates.n20 {
  width: 316px;
}

/* Routes: the Route card and the local map */

.trip,
.desk,
.league {
  display: grid;
  grid-template-columns: minmax(0, 25rem) minmax(0, 1fr);
  gap: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 1.5rem;
  padding-inline: 0.5rem;
  border-radius: 0.25rem;
  background: var(--accent);
  font-size: 0.75rem;
}

.now {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.now div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.375rem;
}

.now strong {
  font-size: 1rem;
  font-weight: 600;
}

.ring {
  flex: none;
  width: 4.5rem;
  height: 4.5rem;
  fill: none;
  stroke: var(--border);
  stroke-width: 6;
}

.ring circle + circle {
  stroke: var(--foreground);
}

.ring use {
  fill: var(--foreground);
  stroke: none;
}

.stops {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.stops li {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  column-gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  background: var(--sunken);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.stops li[data-next] {
  border-color: var(--primary-soft);
  background: linear-gradient(var(--primary-tint), var(--primary-tint)) var(--card);
}

.stops b {
  display: grid;
  grid-row: span 2;
  align-self: center;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--primary);
  border-radius: 0.25rem;
  background: var(--sunken);
  font-size: 0.75rem;
  font-weight: 600;
}

.window {
  position: relative;
  min-height: 24rem;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 0.625rem;
}

/* Markets: the price desk */

.figure {
  font-size: clamp(3.5rem, 7vw, 5.25rem);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.meter {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.track {
  height: 0.5rem;
  overflow: hidden;
  border-radius: 0.25rem;
  background: var(--border);
}

.track span {
  display: block;
  width: 20%;
  height: 100%;
  background: var(--foreground);
}

.sell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sell .button {
  flex: 1;
  padding-inline: 0.5rem;
}

#price-note {
  color: var(--warning);
}

.ledger {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.ledger h4 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}

.ledger ol {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 6rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--muted);
}

.ledger li:first-child {
  color: var(--foreground);
}

.chart {
  justify-content: center;
}

.chart svg {
  width: 100%;
  height: auto;
}

.chart .grid line {
  stroke: var(--border);
}

.chart .axis line {
  stroke: var(--border-strong);
}

.chart .ticks text {
  fill: var(--muted);
  font: 400 11px var(--mono);
}

.chart .notes text {
  fill: var(--muted);
  font: 500 12px var(--sans);
}

.chart .curve {
  stroke: var(--foreground);
  stroke-width: 2;
}

.chart .guide {
  fill: none;
  stroke: var(--muted);
  stroke-dasharray: 3 4;
}

.chart #price-marker rect {
  fill: var(--foreground);
  stroke: var(--sunken);
  stroke-width: 2;
}

.chart .sale {
  opacity: 0;
  transition: opacity 200ms;
}

.chart .sale.on {
  opacity: 1;
}

.chart .sale polygon {
  fill: var(--positive);
  fill-opacity: 0.3;
}

.chart .sale text {
  fill: var(--positive);
  font: 600 14px var(--mono);
}

.aside {
  margin-top: 1.5rem;
  color: var(--muted);
}

/* Companies: the emblem and the board */

.league {
  align-items: start;
}

.naming {
  flex-direction: row;
  align-items: center;
}

.field {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.field label {
  font-size: 0.875rem;
  font-weight: 500;
}

.field input {
  width: 100%;
  height: 2.5rem;
  padding-inline: 0.75rem;
  border: 1px solid var(--input);
  border-radius: 0.375rem;
  background: var(--sunken);
  color: var(--foreground);
  font: 400 1rem var(--sans);
}

.board {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  counter-reset: rank;
}

.board li {
  display: grid;
  grid-template-columns: 1.25rem 1.75rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  background: var(--sunken);
  counter-increment: rank;
  overflow-wrap: anywhere;
}

.board li::before {
  content: counter(rank);
  color: var(--muted);
  font: 400 0.875rem var(--mono);
}

.board .own {
  border-color: var(--primary-soft);
  background: linear-gradient(var(--primary-tint), var(--primary-tint)) var(--card);
}

@media (max-width: 58rem) {
  .trip,
  .desk,
  .league {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --- Closing and footer ----------------------------------------------------------------------- */

.closing {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4.5rem, 11vw, 9rem);
  background: var(--primary);
  color: var(--primary-foreground);
}

.closing .wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.closing h2 {
  max-width: 13em;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1;
}

.closing .note {
  color: var(--primary-foreground);
  opacity: 0.75;
}

.closing :focus-visible {
  outline-color: var(--primary-foreground);
}

.watermark {
  position: absolute;
  right: -3rem;
  bottom: -7rem;
  width: min(34rem, 70vw);
  opacity: 0.1;
}

footer {
  padding-block: 1.5rem 3rem;
  font-size: 0.875rem;
  color: var(--muted);
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}

.missing {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2rem;
  min-height: 70vh;
  padding-inline: var(--gutter);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .toasts li {
    animation: none;
  }

  .chart .sale {
    transition: none;
  }
}
