/* The look of the three legal pages: terms of use, privacy policy, accessibility statement (R56, 1.12.2026).
   Rafael: these pages are not to look like plain text; icons from Flaticon in the concept of the site, muted colours at
   most, elegant and pleasant. One reading column stays; every section gets a line icon in the ink colour on a very
   muted light-blue or pink disc, and a row of jumps to the sections stands under the opening of the page.
   Loaded only by the three pages, after legal.css (which the thank-you page also uses and which is not changed).
   The icons are 24 x 24 drawings with one unit of line; the half unit of stroke added here brings them to the
   weight of the site's own icons (1.5 on 24). They take the colour of the text, so the night look needs no second set.
   The two tints are the light blue (#53c4ed) and the pink (#f24aae) of the site's glass, at a sixth of their strength. */
.legal-look {
  --legal-sky-tint: rgba(83, 196, 237, .17);
  --legal-rose-tint: rgba(242, 74, 174, .12);
  --legal-pill: rgba(243, 243, 246, .46);
  --legal-disc: 56px;
  --legal-gap: 24px;
}
[data-theme=dark] .legal-look {
  --legal-sky-tint: rgba(83, 196, 237, .2);
  --legal-rose-tint: rgba(242, 74, 174, .17);
  --legal-pill: rgba(21, 26, 34, .46);
}
.legal-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.legal-icon {
  display: block;
  flex: none;
  width: 28px;
  height: 28px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: .5;
  stroke-linejoin: round;
  stroke-linecap: round;
  overflow: visible;
}
.legal-disc {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--legal-disc);
  height: var(--legal-disc);
  border-radius: 50%;
  background: var(--legal-sky-tint);
  color: var(--ink);
}

/* ——— The name of the page, with the page's own icon ——— */
.legal-look .legal-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}
.legal-disc--page {
  --legal-disc: 52px;
  background: linear-gradient(135deg, var(--legal-sky-tint), var(--legal-rose-tint));
}
.legal-disc--page .legal-icon { width: 26px; height: 26px; }

/* ——— The row of jumps to the sections ——— */
.legal-jump { margin-top: clamp(30px, 3.4vw, 44px); }
.legal-look .legal-jump ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.legal-look .legal-jump li { max-width: none; font-size: 14px; line-height: 1.3; }
.legal-look a.legal-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  min-height: 44px;
  padding-block: 6px;
  padding-inline: 7px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--legal-pill);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .28s ease, background-color .28s ease;
}
.legal-chip .legal-disc { --legal-disc: 30px; transition: background-color .28s ease; }
.legal-chip .legal-icon { width: 17px; height: 17px; stroke-width: .55; }
.legal-jump li:nth-child(even) .legal-disc,
.legal-links li:nth-child(even) .legal-disc { background: var(--legal-rose-tint); }
.legal-look a.legal-chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .legal-look a.legal-chip:hover { border-color: var(--muted); }
  .legal-look a.legal-chip:hover .legal-disc { background: linear-gradient(135deg, var(--legal-sky-tint), var(--legal-rose-tint)); }
}

/* ——— A section: its icon beside its heading, its text under the heading ——— */
.legal-section {
  display: grid;
  grid-template-columns: var(--legal-disc) minmax(0, 1fr);
  column-gap: var(--legal-gap);
  margin-top: clamp(46px, 5vw, 70px);
  /* the site itself keeps a jump clear of the header (scroll-padding on html); this is only a little air above the icon */
  scroll-margin-top: 26px;
}
.legal-section > .legal-disc { grid-column: 1; grid-row: 1 / span 2; margin-top: -9px; }
.legal-section:nth-of-type(even) > .legal-disc { background: var(--legal-rose-tint); }
.legal-look .legal-section > h2 { grid-column: 2; margin: 0 0 14px; }
.legal-section > h2:focus { outline: none; }
.legal-section > h2:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.legal-section > .legal-body { grid-column: 2; min-width: 0; }
.legal-body > :first-child { margin-top: 0; }
.legal-body > ul + p, .legal-body > p + ul { margin-top: 14px; }

/* The two sibling pages, as the same pills as the row of jumps */
.legal-look .legal-links { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; }
.legal-look .legal-links li { max-width: none; }

/* The date line */
.legal-look .legal-updated { display: flex; align-items: center; gap: 9px; }
.legal-icon--inline { width: 18px; height: 18px; stroke-width: .5; opacity: .9; }

/* ——— The icons arrive softly, once (legal-look.js names the page ready for it) ——— */
html.legal-motion .legal-section > .legal-disc,
html.legal-motion .legal-disc--page {
  opacity: 0;
  transform: scale(.8);
  transition: opacity .7s cubic-bezier(.23, 1, .32, 1), transform .9s cubic-bezier(.23, 1, .32, 1);
}
html.legal-motion .legal-section > .legal-disc.is-seen,
html.legal-motion .legal-disc--page.is-seen { opacity: 1; transform: none; }

/* ——— Phones: the icon sits beside the heading and the text keeps the whole width ——— */
@media (max-width: 760px) {
  .legal-look { --legal-disc: 42px; --legal-gap: 14px; }
  .legal-icon { width: 22px; height: 22px; }
  .legal-icon--inline { width: 17px; height: 17px; }
  .legal-look .legal-kicker { gap: 12px; margin-bottom: 22px; }
  .legal-disc--page { --legal-disc: 46px; }
  .legal-disc--page .legal-icon { width: 23px; height: 23px; }
  .legal-section { align-items: center; margin-top: 46px; scroll-margin-top: 4px; }
  .legal-section > .legal-disc { grid-row: 1; margin-top: 0; }
  .legal-look .legal-section > h2 { margin: 0; }
  .legal-section > .legal-body { grid-column: 1 / -1; margin-top: 14px; }
  /* one row that is pulled sideways, from edge to edge of the screen */
  .legal-jump { margin-inline: calc(var(--content-gutter) * -1); }
  .legal-look .legal-jump ul {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 4px var(--content-gutter);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--content-gutter);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* the row fades out at both edges of the screen, so a pill that is cut reads as "there is more" */
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
  }
  .legal-look .legal-jump ul::-webkit-scrollbar { display: none; }
  .legal-look .legal-jump li { flex: none; scroll-snap-align: start; }
  .legal-look a.legal-chip { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  html.legal-motion .legal-section > .legal-disc,
  html.legal-motion .legal-disc--page { opacity: 1; transform: none; transition: none; }
  .legal-look a.legal-chip, .legal-chip .legal-disc { transition: none; }
}
body[data-motion-paused=true] .legal-section > .legal-disc,
body[data-motion-paused=true] .legal-disc--page { opacity: 1; transform: none; transition: none; }
@media (forced-colors: active) {
  .legal-disc { border: 1px solid CanvasText; background: none; }
  .legal-look a.legal-chip { border-color: LinkText; }
}
@media print {
  .legal-jump { display: none; }
  .legal-section { break-inside: avoid-page; }
  html.legal-motion .legal-section > .legal-disc, html.legal-motion .legal-disc--page { opacity: 1; transform: none; }
  .legal-look a.legal-chip { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
