@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-vf.woff2") format("woff2-variations"), url("fonts/archivo-vf.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-hyperlegible-next-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-hyperlegible-next-latin-ext-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --night: #16213a;
  --night-deep: #0f1626;
  --paper: #f2efe6;
  --paper-2: #e8e3d6;
  --shade: #a3aec6;
  --rose: #b02f77;
  --massif-belledonne: #2b59c3;
  --massif-beaufortain: #1d6a78;
  --massif-reserve-myrtille: #4a2c6e;
  --on-band: #ffffff;

  --ground: var(--paper);
  --ground-2: var(--paper-2);
  --ink: var(--night);
  --ink-2: #4c566f;
  --rule: #cdc6b4;
  --live: var(--rose);
  --cover: var(--night);
  --on-cover: var(--paper);
  --on-cover-2: #b3bccd;
  --focus: var(--massif-belledonne);

  --display: "Archivo", "Arial Narrow", sans-serif;
  --text: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 68ch;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: var(--night-deep);
    --ground-2: #172036;
    --ink: var(--paper);
    --ink-2: #b3bccd;
    --rule: #2c3752;
    --live: #f08cbf;
    --cover: var(--night);
    --on-cover-2: #b3bccd;
    --focus: #9db4ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: var(--night-deep);
  --ground-2: #172036;
  --ink: var(--paper);
  --ink-2: #b3bccd;
  --rule: #2c3752;
  --live: #f08cbf;
  --cover: var(--night);
  --on-cover-2: #b3bccd;
  --focus: #9db4ff;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--text);
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
}
img,
svg {
  display: block;
  max-width: 100%;
}
::selection {
  background: var(--massif-belledonne);
  color: #fff;
}
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-thickness: 2px;
}
p a,
li a,
code {
  overflow-wrap: anywhere;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-stretch: 70%;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
  text-wrap: pretty;
}
.wrap {
  width: min(100%, 1360px);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Massif band: the spine colour of a massif, always carrying the massif name. */
.band {
  background: var(--band, var(--massif-belledonne));
  color: var(--on-band);
  font: 700 0.875rem/1 var(--text);
}
.band {
  padding-block: 6px;
}
.band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 28px;
}
.band b {
  font: 800 1.125rem/1 var(--display);
  font-stretch: 70%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.band span {
  font-weight: 400;
  opacity: 0.92;
}

/* Pastille: route number in the massif colour. */
.pastille {
  --size: 32px;
  display: inline-grid;
  place-items: center;
  inline-size: var(--size);
  block-size: var(--size);
  flex: none;
  border-radius: 50%;
  background: var(--band, var(--massif-belledonne));
  color: var(--on-band);
  font: 800 calc(var(--size) * 0.56) / 1 var(--display);
  font-stretch: 75%;
  box-shadow: 0 0 0 2px var(--paper);
}

/* Cartouche: terrain and difficulty facts, ink only, never coloured by level. */
.cartouche {
  display: inline-flex;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  font: 700 0.9375rem/1 var(--display);
  font-stretch: 78%;
  white-space: nowrap;
}
.cartouche > * {
  padding: 5px 8px 4px;
}
.cartouche > * + * {
  border-left: 1.5px solid currentColor;
}
.cartouche abbr {
  text-decoration: none;
}

/* Date label: every observation carries its date. */
.date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 7px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink-2);
  font: 400 0.8125rem/1.2 var(--text);
  white-space: nowrap;
}
.date.is-live {
  color: var(--live);
  border-color: currentColor;
  font-weight: 700;
}
.date.is-live::before {
  content: "";
  inline-size: 7px;
  block-size: 7px;
  border-radius: 50%;
  background: currentColor;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 2px solid currentColor;
  border-radius: 3px;
  font: 800 1.0625rem/1 var(--display);
  font-stretch: 78%;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.button svg {
  inline-size: 18px;
  block-size: 18px;
  transition: transform 0.3s var(--ease-out);
}
.button:hover svg {
  transform: translateX(3px);
}
.button.is-solid {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--night);
}
.button.is-solid:hover {
  background: transparent;
  color: var(--paper);
}
.button.is-ghost {
  color: var(--on-cover);
}
.button.is-ghost:hover {
  background: color-mix(in srgb, var(--paper) 12%, transparent);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.theme-toggle svg {
  inline-size: 20px;
  block-size: 20px;
}

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
