/* ==========================================================================
   Kam pa kam? – Jerneja Renko: book launch page

   Design follows the book: Literata and Alegreya Sans, the coral of the
   cover (version 2), the blue-grey of the chapter titles, and the pale pink
   of the contents page.

   0. Fonts (self-hosted, SIL Open Font License, see fonts/)
   1. Tokens
   2. Base
   3. Buttons, links, ornament
   4. Header
   5. Postaje: the full-screen, sideways path of highs and lows
   6. Flip cards
   7. Sharing
   8. O knjigi and the cover
   9. Za objektivom
   10. Vprašanja in odgovori (Q&A)
   11. Prednaročilo
   12. Nakup knjige (the buy page, nakup.html)
   13. Footer
   14. Reduced motion
   ========================================================================== */

/* 0. Fonts ----------------------------------------------------------------- */
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/literata-latin-ext-standard-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/literata-latin-standard-normal.woff2") format("woff2");
  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: "Literata";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/literata-latin-ext-standard-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/literata-latin-standard-italic.woff2") format("woff2");
  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: "Alegreya Sans";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/alegreya-sans-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}
@font-face {
  font-family: "Alegreya Sans";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/alegreya-sans-latin-400-normal.woff2") format("woff2");
  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: "Alegreya Sans";
  font-weight: 500;
  font-display: swap;
  src: url("fonts/alegreya-sans-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}
@font-face {
  font-family: "Alegreya Sans";
  font-weight: 500;
  font-display: swap;
  src: url("fonts/alegreya-sans-latin-500-normal.woff2") format("woff2");
  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: "Alegreya Sans";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/alegreya-sans-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}
@font-face {
  font-family: "Alegreya Sans";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/alegreya-sans-latin-700-normal.woff2") format("woff2");
  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;
}

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* Book palette: the print files' CMYK colours as they show on screen */
  --coral:        #F37A6A;  /* titles, mottos, part names, page numbers (C0 M65 Y54 K0) */
  --coral-strong: #F1665D;  /* cover version 2: back-cover heading and spine (C0 M75 Y60 K0) */
  --coral-soft:   #F69E8E;  /* cover version 2: background, photo credit, logo (C0 M39 Y32 K0) */
  --coral-text:   #C43E3E;  /* coral for smaller text (readable on white) */
  --coral-button: #CC4444;  /* buttons with white text */
  --blush:        #FDE1D7;  /* title page and contents page (C0 M13 Y11 K0) */
  --blush-pale:   #FEF0EB;
  --slate:        #5B8196;  /* chapter titles, author on the title page, subtitle on the cover (C70 M44 Y33 K0) */
  --slate-text:   #4A6B82;  /* blue-grey for smaller text */
  --ink:          #231F20;
  --ink-soft:     #5E595A;
  --ornament:     #A8A9AD;  /* the heart mark (40 % black) */
  --paper:        #FFFFFF;

  --course: rgb(196 62 62 / 0.6);   /* dashed path between the stations: --coral-text, lighter */
  --focus: var(--slate-text);

  --font-serif: "Literata", Georgia, "Times New Roman", serif;
  --font-sans: "Alegreya Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --size-small: 0.875rem;
  --size-body:  1.125rem;
  --size-lead:  1.25rem;
  --size-h2:    clamp(1.875rem, 1.3rem + 2vw, 2.75rem);

  --radius: 3px;
  --shadow: 0 1px 0 rgb(35 31 32 / 0.06), 0 22px 34px -22px rgb(91 129 150 / 0.65);
  --page-max: 72rem;
  --header-h: 4rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }

/* No smooth scrolling for the page itself: the header links jump straight to their section.
   Moves along the stations track are smooth (.arc). */
html {
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-serif);
  font-size: var(--size-body);
  font-optical-sizing: auto;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; font-weight: 400; }
p { text-wrap: pretty; }
cite { font-style: italic; }

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

.wrap {
  width: min(100% - 2 * var(--gutter), var(--page-max));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
}
.skip-link:focus { top: 1rem; }

/* Small capitals label, as the part names in the contents ("PREBUJANJE") */
.eyebrow {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral-text);
}

/* 3. Buttons, links, ornament ---------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.6rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.button-primary { background: var(--coral-button); color: var(--paper); }
.button-primary:hover { background: #B83A3A; }

.button-dark { background: var(--ink); color: var(--paper); }
.button-dark:hover { background: #3A3536; }

.button-small { min-height: 2.5rem; padding: 0.35rem 1.1rem; font-size: 1rem; }

.text-link {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--slate-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}
.text-link:hover { text-decoration-thickness: 2px; }

/* The book's heart mark, shown under titles */
.ornament {
  display: block;
  width: 2.75rem;
  height: 1.25rem;
  color: var(--ornament);
}

/* 4. Header ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  background: var(--paper);
  border-bottom: 1px solid rgb(91 129 150 / 0.18);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}

/* The book's title in letter-spaced capitals, like the running heads in the book.
   It keeps its full width; only when the screen cannot hold it and the buy button is it shortened. */
.site-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--coral-text);
  text-decoration: none;
  white-space: nowrap;
}

/*
  The menu takes the room the title leaves and sits at the right. The header must fit whatever
  the words are: when a browser translates the page they get longer ("O knjigi" becomes
  "About the book"), and so does larger text. So the menu is laid out from the right, buy button
  first, and wraps: a link that does not fit moves to a second row, which is cut off. Links drop
  out one at a time from the left, and the buy button always stays.
*/
.site-nav {
  --ring: 0.375rem;  /* room inside the cut-off edge for focus outlines */
  flex: 1 1 0;
  min-width: min-content;
  display: flex;
  flex-flow: row-reverse wrap;
  align-items: center;
  align-content: flex-start;
  gap: 1rem clamp(0.875rem, 3vw, 1.75rem);
  height: calc(2.5rem + 2 * var(--ring));  /* one row, the height of the button */
  margin: calc(-1 * var(--ring));
  padding: var(--ring);
  overflow: hidden;
  overflow: clip;  /* unlike hidden, never scrolls to a cut-off link that takes the focus */
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 500;
}
/* `order` runs from the right: 1 is the button; the highest number is leftmost and drops out first */
.site-nav a:not(.button) { order: 3; text-decoration: none; white-space: nowrap; }
.site-nav a:not(.button):hover { color: var(--coral-text); }
.site-nav .button { order: 1; }
.site-nav a.nav-faq { order: 2; }
.site-nav a.nav-chapters { order: 4; }

/* Narrower screens: the menu trims to what fits; every section can still be reached by scrolling */
@media (max-width: 36em) {
  .nav-faq { display: none; }
}
@media (max-width: 30em) {
  .nav-chapters { display: none; }
  .site-name { letter-spacing: 0.1em; }
}
@media (max-width: 23em) {
  .site-header-inner { gap: 0.625rem; }
  .site-name { letter-spacing: 0.04em; }
  .site-nav .button-small { padding-inline: 0.8rem; }
}

/* 5. Postaje --------------------------------------------------------------- */
/*
  The stations fill the first screen, and scrolling the page goes straight on down
  past them. The track moves sideways by itself: with the arrow buttons and keys
  (script.js), a sideways swipe on a trackpad or touch screen, or Shift with the
  mouse wheel. The background fades from white into the pink of the contents page,
  like the sky meeting the water on the cover.
*/
.chapters {
  background: var(--blush);
  border-bottom: 1px solid rgb(91 129 150 / 0.18);
}

/* The panel is as tall as the screen below the header. Where that is too short for the
   smallest cards (small phones, phones held sideways, short windows) the track keeps its
   smallest height (.arc), the panel grows past the screen and the page scrolls on to the rest,
   rather than the cards being cut off. */
.chapters-panel {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  background: linear-gradient(to bottom, var(--paper) 0, var(--blush-pale) 40%, var(--blush) 100%);
}

/* Title and intro share one line on wide screens, leaving the height to the cards */
.chapters-head {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 1.5rem;
  padding-top: clamp(0.75rem, 2.2vh, 1.4rem);
}

.chapters-title {
  font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.1;
  color: var(--coral);
}

.chapters-intro {
  flex: 1 1 20rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.chapters-sub {
  font-style: italic;
  color: var(--slate-text);
}

/* The track. It is also the container the cards are sized against, so they
   grow to fill whatever height the screen leaves them. The path's measures are set
   here, so that the track's smallest height (the smallest cards, uncut) can be worked out. */
.arc {
  --inset: max(var(--gutter), (100% - var(--page-max)) / 2);
  --marker: 2.375rem;   /* station heart */
  --stub: 0.875rem;     /* tie from station to photo */
  --label: 1.75rem;     /* room for the part names above the path */
  --swing: 0.075;       /* height of one level, as a share of the card's height */
  --card-min: 18rem;    /* the smallest card height */
  --pad-top: 0.75rem;
  --pad-bottom: 1.25rem;
  /* Grows from 0px, not from `auto`: with an `auto` starting size Chrome measures 100cqh inside
     the track as 0, and every card falls back to its smallest size. */
  flex: 1 0 0px;
  min-height: calc(var(--pad-top) + var(--label) + var(--marker) + var(--stub) + var(--card-min) * (1 + 4 * var(--swing)) + var(--pad-bottom));
  container-type: size;
  padding-block: var(--pad-top) var(--pad-bottom);
  overflow-x: auto;
  /* Never a scroller up and down as well, so the mouse wheel always scrolls the page */
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--inset);
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgb(91 129 150 / 0.4) transparent;
}
.arc:focus-visible { outline-offset: -3px; }

/* Where you are on the path */
.chapters-foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 2.5rem;
  padding-bottom: clamp(0.625rem, 2vh, 1rem);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  color: var(--ink-soft);
}

.chapters-count {
  min-width: 15.5em;
  font-variant-numeric: tabular-nums;
}

.chapters-part {
  margin-right: 0.35em;
  font-family: var(--font-serif);
  font-size: 0.875em;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral-text);
}

.progress {
  position: relative;
  flex: 1;
  height: 2px;
  overflow: hidden;
  background: rgb(91 129 150 / 0.2);
}

.progress-bar {
  position: absolute;
  inset: 0;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
}

.arc-controls { display: flex; gap: 0.5rem; }

.arc-button {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1.5px solid var(--slate);
  border-radius: 50%;
  background: var(--paper);
  color: var(--slate-text);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, opacity 0.2s;
}
.arc-button svg { width: 1.25rem; height: 1.25rem; }
.arc-button:hover:not(:disabled) { background: var(--slate); color: var(--paper); }
.arc-button:disabled { opacity: 0.35; cursor: default; }

/* With a mouse or trackpad the arrow buttons and the progress line do the scrollbar's job */
@media (hover: hover) and (pointer: fine) {
  .arc { scrollbar-width: none; }
}

/* Touch screens swipe the track, so the buttons are only shown for mouse and keyboard */
.only-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .arc-controls,
  .only-pointer { display: none; }
  .only-touch { display: inline; }
  .chapters-count { min-width: 0; }
}

@media (max-width: 40em) {
  .chapters-foot { font-size: 1rem; }
  .chapters-count { min-width: 0; }
}

/*
  The path. Card size comes from the height available (100cqh), so the cards
  are as large as the screen allows. Each station sits higher or lower according
  to its data-level and draws a dashed leg to the next station: an S-curve
  (<symbol id="leg">) stretched from its heart to the next one, level at both
  ends, so the path flows through the hearts.
*/

/* The card width is worked out once, here on .course, and handed down as a plain length.
   Unregistered, 100cqh inside it would be measured again wherever it is used, and inside a
   card back (itself a size container) that gives the back's own height, not the track's. */
@property --card-w {
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}

.course {
  /* --marker, --stub, --label, --swing and --card-min come from .arc */
  --card-h: clamp(var(--card-min), (100cqh - var(--label) - var(--marker) - var(--stub)) / (1 + 4 * var(--swing)), 46rem);
  --card-w: calc(var(--card-h) * 2 / 3);
  --step: calc(var(--card-h) * var(--swing));
  --spacing: 0.42;     /* space between cards, as a share of the card's width */
  --gap: calc(var(--card-w) * var(--spacing));

  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--card-w);
  column-gap: var(--gap);
  width: max-content;
  margin: 0;
  padding: var(--label) var(--inset) 0;
  list-style: none;
}

/* Browsers without container queries (Safari before iOS 16) cannot measure the track, and the
   cards would shrink to nothing. There the card size comes from the screen height instead,
   a little smaller than the track allows, so that no card is cut off. */
@supports not (height: 1cqh) {
  .course { --card-h: clamp(var(--card-min), (100vh - 23rem) / (1 + 4 * var(--swing)), 46rem); }
}

/* On phones the next card peeks in from the edge, so it's clear there is more */
@media (max-width: 40em) {
  .arc { --swing: 0.06; }
  .course { --spacing: 0.2; }
}

/* Level line: the horizon the story rises above and sinks below */
.course::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--label) + 2 * var(--step) + var(--marker) / 2);
  border-top: 1px dotted rgb(243 122 106 / 0.45);
}

/* data-level → how high each station sits, and the level of the next one */
.course-stop { --level: 0; --next: 0; }
.course-stop[data-level="2"]  { --level: 2; }
.course-stop[data-level="1"]  { --level: 1; }
.course-stop[data-level="-1"] { --level: -1; }
.course-stop[data-level="-2"] { --level: -2; }
.course-stop:has(+ [data-level="2"])  { --next: 2; }
.course-stop:has(+ [data-level="1"])  { --next: 1; }
.course-stop:has(+ [data-level="-1"]) { --next: -1; }
.course-stop:has(+ [data-level="-2"]) { --next: -2; }

.course-stop {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: center;
  row-gap: var(--stub);
  padding-top: calc((2 - var(--level)) * var(--step));
  scroll-snap-align: center;
}

/* The leg spans from this heart to the next; a rising leg is the same curve mirrored */
.course-leg {
  --high: max(var(--level), var(--next));
  position: absolute;
  z-index: 1;
  left: 50%;
  top: calc((2 - var(--high)) * var(--step) + var(--marker) / 2);
  width: calc(var(--card-w) + var(--gap));
  height: max((var(--high) - min(var(--level), var(--next))) * var(--step), 1px);
  overflow: visible;
  fill: none;
  stroke: var(--course);
  stroke-width: 2px;
  stroke-dasharray: 10 8;
  scale: 1 calc(1 - 2 * clamp(0, var(--next) - var(--level), 1));
}
.course-stop:last-child .course-leg { display: none; }

/* Part names (PREBUJANJE, VRAČANJE K SEBI …) above the first station of each part */
.course-part {
  position: absolute;
  top: calc((2 - var(--level)) * var(--step) - var(--label) - 0.35rem);
  left: 0;
  max-width: calc(var(--card-w) + var(--gap) * 0.8);
  padding-left: 0.65rem;
  border-left: 2px solid var(--coral);
  font-family: var(--font-serif);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--coral-text);
}

/* Station number in a heart (<symbol id="heart">), in the red of the part names; its point leads down to the photo */
.waypoint {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: var(--marker);
  aspect-ratio: 1;
  padding-bottom: 0.375rem;  /* the number sits in the wide top of the heart */
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--coral-text);
}

.waypoint-heart {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: var(--paper);
  stroke: var(--coral-text);
  stroke-width: 2px;
  stroke-linejoin: round;
}

.waypoint::after {
  content: "";
  position: absolute;
  top: calc(100% + 2px);
  left: calc(50% - 1px);
  height: var(--stub);
  border-left: 2px dotted var(--course);
}

/* The path ends at the last station, in the colour of the title */
.course-stop:last-child .waypoint { color: var(--paper); }
.course-stop:last-child .waypoint-heart {
  fill: var(--coral-button);
  stroke: rgb(243 122 106 / 0.25);  /* a soft ring around the heart */
  stroke-width: 12px;
  paint-order: stroke;
}

/* 6. Flip cards ------------------------------------------------------------ */
.card {
  position: relative;
  z-index: 2;
  width: 100%;
  perspective: 1600px;
}

.card-inner {
  position: relative;
  aspect-ratio: 2 / 3;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.3, 0.7, 0.2, 1);
}

.card.is-flipped .card-inner { transform: rotateY(180deg); }

.card-face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  /* The face that is turned away is also made see-through and unclickable. Safari on iPhones
     does not reliably hide it by backface-visibility alone, and then the back of every card
     covered its photo. The switch comes when the card stands edge-on: the turn's easing
     reaches 90 degrees 0.15s into its 0.8s, so it cannot be seen. */
  transition: opacity 0s 0.15s;
}
.card-back,
.card.is-flipped .card-front { opacity: 0; pointer-events: none; }
.card.is-flipped .card-back { opacity: 1; pointer-events: auto; }

/* Front: a photographic print, the photo alone in an even white border.
   The station's name is on the back; the front names it for screen readers only. */
.card-front {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: calc(var(--card-w) * 0.035);
  border: 0;
  background: var(--paper);
  text-align: left;
  cursor: pointer;
  transform: rotateY(0deg); /* keeps Safari's backface culling reliable */
}

/* Folded corner: a hint that the print can be turned over */
.card-front::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: calc(var(--card-w) * 0.09);
  height: calc(var(--card-w) * 0.09);
  border-bottom-right-radius: var(--radius);
  background: linear-gradient(to top left, var(--blush) 50%, var(--coral) 50%);
  transition: width 0.25s, height 0.25s;
}
.card-front:hover::after,
.card-front:focus-visible::after { width: calc(var(--card-w) * 0.13); height: calc(var(--card-w) * 0.13); }

/*
  Drawn stand-in, shown until the chapter's photo exists in /images:
  still water at dawn. It follows the station's level, warm and light at the
  highs and cool blue-grey at the lows.
*/
.card-photo {
  --t: calc((var(--level) + 2) / 4);
  --sky-top: color-mix(in oklab, #FDE7E2 calc(var(--t) * 100%), #8FA5B6);
  --sky-low: color-mix(in oklab, #F9B3A9 calc(var(--t) * 100%), #B5C4CE);
  --water:   color-mix(in oklab, #B9C8D2 calc(var(--t) * 100%), #4D6D84);
  --deep:    color-mix(in oklab, #8EA4B4 calc(var(--t) * 100%), #2F465A);
  --sun:     color-mix(in oklab, #FFF3EC calc(var(--t) * 100%), #E8EEF2);

  position: relative;
  flex: 1;
  display: block;
  overflow: hidden;
  border-radius: 2px;
  background:
    radial-gradient(ellipse 34% 3% at 50% 60.5%, rgb(255 255 255 / 0.55), transparent),
    linear-gradient(transparent 60%, var(--water) 60%, var(--deep)),
    radial-gradient(circle at 50% calc(52% - var(--t) * 22%), var(--sun) 0 6%, transparent 6.5%),
    linear-gradient(var(--sky-top), var(--sky-low) 60%);
}

.card-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Back: a page of the book */
.card-back {
  --focus: var(--coral-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--card-w) * 0.045);
  padding: calc(var(--card-w) * 0.08) calc(var(--card-w) * 0.075) calc(var(--card-w) * 0.065);
  overflow-y: auto;
  background: var(--paper);
  text-align: center;
  transform: rotateY(180deg);
  container: back / size;
  cursor: pointer;  /* a click anywhere on the back turns the card back (script.js) */
}

.card-part {
  font-size: clamp(0.75rem, var(--card-w) * 0.036, 0.875rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral-text);
}

.card-title {
  padding-inline: 1.75rem;
  /* As large as the card allows, but never so large that the longest title word
     (Potrpežljivost, about 6.6em wide) no longer fits between the 1.75rem side paddings */
  font-size: min(clamp(1.25rem, var(--card-w) * 0.082, 2rem), (100cqi - 3.5rem) / 6.7);
  font-style: italic;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--slate-text);
}

.card-number {
  display: block;
  margin-bottom: 0.15em;
  font-family: var(--font-sans);
  font-size: max(0.6em, 0.9375rem);
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--coral-text);
}

/* A brush-drawn heart between the title and the motto */
.card-heart {
  flex: none;
  width: calc(var(--card-w) * 0.115);
  height: calc(var(--card-w) * 0.115);
  rotate: -8deg;
  color: var(--coral-strong);
}

.card-text {
  font-size: clamp(1rem, var(--card-w) * 0.06, 1.5rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--coral-text);
}

/* The two voices: ČLOVEK upright and bold, ZAVEST in italics, with room between them */
.card-voices {
  display: grid;
  gap: 1em;
  margin-top: calc(var(--card-w) * 0.025);
  padding-top: calc(var(--card-w) * 0.065);
  border-top: 1px solid rgb(91 129 150 / 0.25);
  font-size: clamp(0.875rem, var(--card-w) * 0.05, 1.125rem);
  line-height: 1.5;
  text-align: left;
}
.voice-human { font-weight: 600; }
.voice-conscience { font-style: italic; color: var(--ink-soft); }

.card-close {
  position: absolute;
  top: calc(var(--card-w) * 0.035);
  right: calc(var(--card-w) * 0.035);
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid rgb(91 129 150 / 0.5);
  border-radius: 50%;
  background: var(--paper);
  color: var(--slate-text);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.card-close::before,
.card-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.95rem;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}
.card-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.card-close:hover { border-color: var(--slate); background: var(--slate); color: var(--paper); }

/* Laptop-size cards: no part name, and type a little smaller, still with room around it.
   Above this height the larger type grows with the card and fits again. */
@container back (max-height: 32rem) {
  .card-part,
  .card-back .share-label { display: none; }
  .card-title { font-size: min(1.5rem, (100cqi - 3.5rem) / 6.7); }
  .card-heart { width: 1.85rem; height: 1.85rem; }
  .card-text { font-size: 1rem; }
  .card-voices { gap: 1.1em; margin-top: 0; padding-top: 0.65rem; font-size: 0.9375rem; line-height: 1.45; }
  .card-back .share { gap: 0.3rem; }
  .card-back .share-link { width: 1.875rem; height: 1.875rem; }
  .card-back .share-icon { width: 1rem; height: 1rem; }
}
/* Short cards (short screens, phones): tighten the back so it all fits */
@container back (max-height: 23.5rem) {
  .card-title { font-size: min(1.25rem, (100cqi - 3.5rem) / 6.7); }
  .card-heart { width: 1.6rem; height: 1.6rem; }
  .card-text { font-size: 0.9375rem; line-height: 1.4; }
  .card-voices { gap: 0.6em; padding-top: 0.5rem; font-size: 0.8125rem; line-height: 1.4; }
}
@container back (max-height: 20rem) {
  .card-heart { display: none; }
}
@container back (max-height: 18.5rem) {
  .card-text { line-height: 1.35; }
  .card-voices { gap: 0.45em; line-height: 1.35; }
}
/* The smallest cards keep the motto and leave out the two voices */
@container back (max-height: 17.75rem) {
  .card-voices { display: none; }
}

/* 7. Sharing --------------------------------------------------------------- */
.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
}

.share-label {
  margin-right: 0.25rem;
  font-size: 1rem;
  color: var(--ink-soft);
}

/* Share buttons: round, with the network's icon, like the arrow buttons; the name is for screen
   readers and shows as a tooltip. Three fit side by side even on the smallest card. */
.share-link {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgb(91 129 150 / 0.45);
  border-radius: 50%;
  color: var(--slate-text);
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.share-link:hover { border-color: var(--slate); background: var(--slate); color: var(--paper); }
.share-icon { width: 1.3rem; height: 1.3rem; }

.card-back .share { justify-content: center; margin-top: auto; gap: 0.35rem; }
.card-back .share-label { font-size: var(--size-small); }
.card-back .share-link { width: 2.125rem; height: 2.125rem; }
.card-back .share-icon { width: 1.125rem; height: 1.125rem; }

/* A short note after sharing (what was copied or saved, and what to do next), at the foot of the
   screen, so it is still there on coming back from Instagram or Messenger */
.share-note {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 20;
  width: max-content;
  max-width: min(30rem, 100vw - 2rem);
  padding: 0.75rem 1.1rem;
  border-radius: 0.75rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 12px 30px -12px rgb(35 31 32 / 0.55);
  transform: translateX(-50%);
  transition: opacity 0.3s, visibility 0.3s;
}
.share-note:empty { visibility: hidden; opacity: 0; }

/* 8. O knjigi and the cover ------------------------------------------------ */
.about { padding-block: clamp(4rem, 9vw, 7rem); }

.about-inner {
  display: grid;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: start;
}

/* The back-cover heading, in its colour on the final jacket */
.about h2 {
  margin-top: 0.75rem;
  font-size: var(--size-h2);
  font-style: italic;
  line-height: 1.15;
  color: var(--coral-strong);
}

/* The station scene from the back cover */
.about-story {
  display: grid;
  gap: 0.6rem;
  max-width: 33em;
  margin-top: 1.75rem;
  font-size: var(--size-lead);
  line-height: 1.6;
}

.about-call {
  font-weight: 600;
  color: var(--slate-text);
}

/* The closing line of the "O knjigi" text, bold as in the author's text */
.about-close {
  margin-top: 0.5rem;
  font-size: var(--size-lead);
  font-weight: 600;
  line-height: 1.5;
  color: var(--slate-text);
}

/* The outlined heart that sits between texts on the final jacket */
.heart-mark {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  fill: none;
  stroke: var(--coral);
  stroke-width: 1.5px;
}

.about-ornament { margin: 2.25rem 0 2rem; }

.about-body {
  display: grid;
  gap: 0.9rem;
  max-width: 34em;
  color: var(--ink);
}

.voice-name { font-size: 0.9em; letter-spacing: 0.04em; }

.about-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2.25rem;
}

.about-share { margin-top: 1.75rem; }

.about-cover { margin: 0; }

.book {
  position: relative;
  width: min(78%, 19rem);
  margin-inline: auto;
  border-radius: 2px 4px 4px 2px;
  transform: perspective(1500px) rotateY(-13deg) rotateX(2deg);
  box-shadow:
    5px 3px 0 -1px var(--paper),
    5px 3px 0 0 rgb(91 129 150 / 0.25),
    26px 40px 60px -26px rgb(91 129 150 / 0.75);
}

/* Spine highlight, drawn over the cover */
.book::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgb(255 255 255 / 0.25) 0,
    rgb(0 0 0 / 0.22) 2.5%,
    transparent 7%,
    transparent 95%,
    rgb(0 0 0 / 0.1) 100%);
}

/*
  The cover: one picture of the front of the final jacket (images/cover.jpg),
  in the shape of the jacket's front panel, 151 × 210 mm.
*/
.cover {
  position: relative;
  aspect-ratio: 428 / 595.3;
  overflow: hidden;
  border-radius: inherit;
  background: #CFD9DE;
}

.cover-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 52em) {
  .about-inner { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
  .about-cover { position: sticky; top: calc(var(--header-h) + 3rem); }
  .book { width: min(100%, 21rem); transform: perspective(1500px) rotateY(-16deg) rotateX(3deg); }
}

/* Avtorice: the jacket's flaps, two biographies on each, a heart between them */
.authors { padding-bottom: clamp(3.5rem, 8vw, 6rem); }

.authors-flaps {
  display: grid;
  gap: 1.75rem clamp(2.5rem, 6vw, 5rem);
  margin-top: 1.5rem;
}

/* In one column the two flaps follow each other, so a heart goes between them too */
.authors-between { justify-self: center; }

.authors-flap {
  display: grid;
  gap: 1.75rem;
  align-content: start;
}
.authors-flap .heart-mark { justify-self: center; }

.bio {
  display: grid;
  gap: 0.75rem;
  max-width: 34em;
}

/* Each biography opens with the name, bold and coral as on the flaps */
.bio-name {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--coral-text);
}

@media (min-width: 52em) {
  .authors-flaps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .authors-between { display: none; }
}

/* 9. Za objektivom --------------------------------------------------------- */
.lens {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  background: var(--blush);
}

.lens-inner {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.lens-photo {
  margin: 0;
  max-width: 22rem;
}
.lens-photo img {
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  border: 0.6rem solid var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lens-quote {
  margin: 1rem 0 0;
  font-size: clamp(1.375rem, 1rem + 1.4vw, 2rem);
  font-style: italic;
  line-height: 1.4;
  color: var(--ink);
}

/* Signed like Urška's note in the book: coral italics */
.lens-credit {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  font-style: italic;
  color: var(--coral-text);
}

@media (min-width: 48em) {
  .lens-inner { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); }
}

/* 10. Vprašanja in odgovori ------------------------------------------------ */
/* Set like the book's conversations: the question upright and bold, as ČLOVEK speaks,
   the answer in italics, as ZAVEST does. */
.faq { padding-block: clamp(3.5rem, 8vw, 6rem); }

.faq-inner {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.faq h2 {
  margin-top: 0.75rem;
  font-size: var(--size-h2);
  font-style: italic;
  line-height: 1.15;
  color: var(--coral-strong);
}
.faq .ornament { margin-top: 1.1rem; }

.faq-list { border-top: 1px dotted rgb(91 129 150 / 0.4); }

.faq-item {
  padding-block: 1.25rem;
  border-bottom: 1px dotted rgb(91 129 150 / 0.4);
}

.faq-q {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.4;
}

.faq-a {
  margin-top: 0.45rem;
  max-width: 36em;
  font-style: italic;
  color: var(--ink-soft);
}

@media (min-width: 52em) {
  .faq-inner { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); }
}

/* 11. Prednaročilo --------------------------------------------------------- */
.preorder {
  --focus: var(--ink);
  padding-block: clamp(4rem, 9vw, 6.5rem);
  background: var(--coral-soft);
  color: var(--ink);
}

.preorder-inner {
  display: grid;
  gap: 2rem;
}

.preorder h2 {
  font-size: clamp(2rem, 1.3rem + 2.8vw, 3.25rem);
  font-style: italic;
  line-height: 1.1;
}

.preorder-note {
  margin-top: 0.85rem;
  max-width: 30em;
  font-size: var(--size-lead);
}

.retailers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}

@media (min-width: 52em) {
  .preorder-inner { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .retailers { justify-content: flex-end; }
}

/* 12. Nakup knjige --------------------------------------------------------- */
/* The buy page: the cover beside the price, the number of copies and the button to the
   payment provider's page. The background fades into the pink of the contents page,
   as on the stations panel. */
.buy {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(4rem, 9vw, 7rem);
  background: linear-gradient(to bottom, var(--paper) 0, var(--blush-pale) 55%, var(--blush) 100%);
}

.buy-inner {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.buy-cover { margin: 0; }

.buy-title {
  margin-top: 0.5rem;
  font-size: clamp(2.5rem, 1.6rem + 3.5vw, 3.75rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.05;
  color: var(--coral);
}

.buy-sub {
  margin-top: 0.4rem;
  font-size: var(--size-lead);
  font-style: italic;
  color: var(--slate-text);
}

.buy-byline {
  margin-top: 0.75rem;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  color: var(--ink-soft);
}

.buy .ornament { margin-top: 1.4rem; }

.buy-box {
  max-width: 26rem;
  margin-top: 1.75rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.buy-price {
  font-size: 2.25rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.buy-price-note {
  margin-top: 0.3rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.buy-pay {
  width: 100%;
  margin-top: 1.25rem;
  /* The label may wrap: with large text, or translated, it would otherwise push the page wider than a phone */
  white-space: normal;
  text-align: center;
}
/* No payment link yet: the button is shown, but switched off */
.buy-pay[aria-disabled="true"],
.buy-pay[aria-disabled="true"]:hover {
  background: rgb(35 31 32 / 0.1);
  color: var(--ink-soft);
  cursor: not-allowed;
}

.buy-safe {
  margin-top: 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.buy-notice {
  margin-top: 0.75rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid rgb(243 122 106 / 0.6);
  border-radius: var(--radius);
  background: var(--blush-pale);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--ink);
}

@media (min-width: 52em) {
  .buy-inner { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
}

/* 13. Footer --------------------------------------------------------------- */
.site-footer {
  padding-block: 3rem 2rem;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  color: var(--ink-soft);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem 3rem;
}

.footer-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--ink);
}
.footer-title cite { color: var(--coral-text); }
.footer-book a { color: var(--slate-text); text-underline-offset: 0.2em; }

.footer-credits {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 0.5rem 2.5rem;
}
.footer-credits dt {
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate-text);
}
.footer-credits dd { margin: 0; color: var(--ink); }
/* The two columns need about 15rem; where the screen is narrower than that with its margins
   (large text, or a zoomed-in phone) the credits go one under the other. In em, so it follows
   the reader's text size; at normal text it only applies below 280px. */
@media (max-width: 17.5em) {
  .footer-credits { grid-template-columns: auto; }
}

.footer-legal {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(91 129 150 / 0.2);
  font-size: var(--size-small);
}

/* 14. Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html, .arc { scroll-behavior: auto; }
  .card-inner,
  .card-face,
  .card-front::after { transition: none; }
}

/* Legal pages: Impressum, Pogoji in pravila poslovanja, Izjava o zasebnosti (11 Nov) */
.legal {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem);
  background: linear-gradient(to bottom, var(--paper) 0, var(--blush-pale) 100%);
}
.legal-inner { max-width: 46rem; }
.legal-title {
  margin-top: 0.5rem;
  font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.1rem);
  font-style: italic;
  line-height: 1.1;
  color: var(--coral);
}
.legal .ornament { margin-top: 1.1rem; }
.legal-text { margin-top: 1.75rem; font-size: 1.0625rem; line-height: 1.65; }
.legal-text p, .legal-text ul { margin-top: 0.9rem; }
.legal-text ul { padding-left: 1.3rem; }
.legal-text li + li { margin-top: 0.35rem; }
.legal-text li > ul { margin-top: 0.4rem; list-style: circle; }
.legal-text li::marker { color: var(--coral-text); }
.legal-text h2 {
  margin-top: 2.4rem;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--slate-text);
}
.legal-text h3 {
  margin-top: 1.6rem;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
}
.legal-text h2 + p, .legal-text h3 + p, .legal-text h3 + ul { margin-top: 0.5rem; }
.legal-text a { color: var(--coral-text); text-underline-offset: 0.15em; overflow-wrap: anywhere; }
.legal-sub { font-family: var(--font-sans); font-weight: 700; letter-spacing: 0.04em; color: var(--ink-soft); }
.legal-date { margin-top: 2.2rem !important; font-style: italic; color: var(--ink-soft); }
.legal-dl { display: grid; gap: 1.1rem; }
.legal-dl > div { display: grid; gap: 0.15rem; }
.legal-dl dt { font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.04em; color: var(--slate-text); }
.legal-dl dd { margin: 0; }
@media (min-width: 40em) {
  .legal-dl > div { grid-template-columns: 15rem minmax(0, 1fr); gap: 1.25rem; }
}

/* Footer: links to the legal pages */
.footer-legal { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; }
.footer-links a { color: var(--ink-soft); text-underline-offset: 0.15em; }
.footer-links a:hover, .footer-links a[aria-current="page"] { color: var(--coral-text); }

/* Buy page: where to read the terms */
.buy-legal { margin-top: 0.6rem; font-family: var(--font-sans); font-size: 0.9375rem; line-height: 1.45; color: var(--ink-soft); }
.buy-legal a { color: var(--coral-text); text-underline-offset: 0.15em; }
