/* ═══════════════════════════════════════════════════════════
   WaldorfMinds — legal pages
   Full text on the left · plain words on the right
   Self-hosted font, no third-party requests.
   ═══════════════════════════════════════════════════════════ */

/* ─── DOCUMENT COLOURS ───────────────────────────────────── */
/* fonts, palette, reset, navigation and footer live in assets/base.css */
.doc--privacy   { --c: var(--blue); }
.doc--terms     { --c: var(--red); }
.doc--cookies   { --c: var(--amber); }
.doc--community { --c: var(--green); }
.doc--child     { --c: var(--violet); }

/* ─── DOCUMENT SWITCHER ──────────────────────────────────── */
.switcher {
  position: relative;
  z-index: 5;
  margin-top: 8px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px;
  list-style: none;
}
.switcher a {
  --c: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: background 0.2s ease, transform 0.2s ease;
}
.switcher a::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: var(--blob-a);
  background: var(--c);
}
.switcher a:hover { background: #fff; transform: translateY(-1px); }
.switcher a[aria-current="page"] { background: #fff; box-shadow: 0 4px 14px rgba(90, 62, 0, 0.14); }
.switcher .to-privacy   { --c: var(--blue); }
.switcher .to-terms     { --c: var(--red); }
.switcher .to-cookies   { --c: var(--amber); }
.switcher .to-community { --c: var(--green); }
.switcher .to-child     { --c: var(--violet); }

/* ─── HERO ───────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(28px, 5vh, 56px) 16px 28px;
  text-align: center;
}
.hero__kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(32, 26, 12, 0.7);
}
.hero__title {
  margin-top: 10px;
  font-size: clamp(34px, 6vw, 62px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 16px rgba(94, 62, 0, 0.34), 0 1px 3px rgba(94, 62, 0, 0.22);
}
.hero__lede {
  max-width: 60ch;
  margin: 18px auto 0;
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 400;
  line-height: 1.55;
}
.hero__meta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-soft);
}

/* ─── AT A GLANCE ────────────────────────────────────────── */
.glance {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 8px auto 0;
  padding: 0 16px;
}
.glance__label {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.glance__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}
.glance__item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 150px;
  padding: 26px 22px;
  color: #fff;
  text-align: center;
  background: var(--c);
  border-radius: var(--blob-a);
  box-shadow: 0 14px 26px color-mix(in srgb, var(--c) 30%, transparent);
  overflow: hidden;
}
.glance__item:nth-child(3n+2) { border-radius: var(--blob-b); }
.glance__item:nth-child(3n+3) { border-radius: var(--blob-c); }
.glance__item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.26), transparent 58%);
  pointer-events: none;
}
.glance__item strong {
  position: relative;
  display: block;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.22);
}
.glance__item span {
  position: relative;
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.95;
}

/* ─── READING MODE ───────────────────────────────────────── */
.modes {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 48px auto 0;
  padding: 0 16px;
  text-align: center;
}
.modes__label { font-size: 14px; color: var(--ink-soft); }
.modes__group {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--c-tint);
  border: 1px solid var(--c-line);
}
.modes__group button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.modes__group button[aria-pressed="true"] { background: var(--c); color: #fff; }
.modes__note {
  max-width: 58ch;
  font-size: 13px;
  color: var(--ink-soft);
}
.no-js .modes { display: none; }

/* ─── LAYOUT ─────────────────────────────────────────────── */
.doc {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 40px auto 0;
  padding: 0 clamp(16px, 4vw, 40px);
}

/* contents */
.toc {
  margin-bottom: 40px;
  padding: 22px 24px;
  border-radius: var(--card);
  background: var(--c-tint);
  border: 1px solid var(--c-line);
}
.toc__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.toc__toggle::after { content: '+'; font-size: 20px; line-height: 1; letter-spacing: 0; }
.toc__toggle[aria-expanded="true"]::after { content: '\2212'; }
.toc__list {
  list-style: none;
  margin-top: 14px;
  display: grid;
  gap: 2px;
}
.toc__list[hidden] { display: none; }
.toc__list a {
  display: grid;
  grid-template-columns: 2.2em 1fr;
  gap: 4px;
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 14.5px;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.toc__list a:hover { background: rgba(255, 255, 255, 0.8); }
.toc__num { font-weight: 700; color: var(--c); font-variant-numeric: tabular-nums; }
.toc__hint { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 1px; }
.toc__list a.is-active { background: #fff; box-shadow: 0 2px 10px rgba(32, 26, 12, 0.06); }
.toc__list a.is-active .toc__title { font-weight: 700; }

@media (min-width: 1180px) {
  .doc {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
  }
  .toc {
    position: sticky;
    top: calc(var(--nav-h) + 16px);
    max-height: calc(100vh - var(--nav-h) - 32px);
    overflow-y: auto;
    margin-bottom: 0;
    padding: 18px 12px;
  }
  .toc__toggle { pointer-events: none; padding: 0 10px; }
  .toc__toggle::after { display: none; }
  .toc__list[hidden] { display: grid; }
  .toc__hint { display: none; }
}

/* ─── CLAUSES ────────────────────────────────────────────── */
.preamble {
  max-width: 68ch;
  margin-bottom: 48px;
  font-size: 19px;
  line-height: 1.6;
  font-style: italic;
  font-weight: 400;
}

.clause {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 40px 0;
  border-top: 1px solid var(--ink-faint);
}
.clause:first-of-type { border-top: 0; padding-top: 0; }

.clause__title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.clause__num {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  background: var(--c);
  border-radius: var(--blob-a);
  font-variant-numeric: tabular-nums;
}
.clause:nth-of-type(3n+2) .clause__num { border-radius: var(--blob-b); }
.clause:nth-of-type(3n+3) .clause__num { border-radius: var(--blob-c); }

.clause__text { max-width: 68ch; }
.clause__text > * + * { margin-top: 14px; }
.clause__text h3 {
  margin-top: 28px;
  font-size: 18px;
  font-weight: 700;
}
.clause__text h4 {
  margin-top: 20px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.clause__text p, .clause__text li { line-height: 1.72; }
.clause__text .lead {
  font-size: 19px;
  font-style: italic;
  line-height: 1.5;
  padding-left: 16px;
  border-left: 3px solid var(--c);
}
.clause__text ul { list-style: none; display: grid; gap: 8px; }
.clause__text li { position: relative; padding-left: 22px; }
.clause__text li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 9px;
  height: 9px;
  border-radius: var(--blob-a);
  background: var(--c);
  opacity: 0.85;
}
.clause__text strong { font-weight: 700; }
.clause__text a, .plain a {
  color: inherit;
  text-decoration-color: var(--c);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.clause__text a:hover, .plain a:hover { color: var(--c); }

.address {
  font-style: normal;
  padding: 16px 20px;
  border-left: 3px solid var(--c);
  background: rgba(32, 26, 12, 0.03);
  border-radius: 0 14px 14px 0;
  line-height: 1.7;
}

/* ─── PLAIN WORDS ────────────────────────────────────────── */
.plain {
  position: relative;
  align-self: start;
  padding: 20px 22px 22px;
  border-radius: var(--card);
  background: var(--c-tint);
  border: 1px solid var(--c-line);
  font-size: 15.5px;
  line-height: 1.6;
}
.plain__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: color-mix(in srgb, var(--c) 78%, var(--ink));
}
.plain__label::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: var(--blob-b);
  background: var(--c);
}
.plain p + p, .plain p + ul, .plain ul + p { margin-top: 8px; }
.plain ul { list-style: none; display: grid; gap: 6px; }
.plain li { position: relative; padding-left: 18px; }
.plain li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
}

@media (min-width: 860px) {
  .clause {
    grid-template-columns: minmax(0, 1fr) 300px;
    column-gap: clamp(32px, 4vw, 56px);
    row-gap: 18px;
  }
  .clause__title { grid-column: 1; grid-row: 1; }
  .clause__text  { grid-column: 1; grid-row: 2; }
  .plain {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    top: calc(var(--nav-h) + 16px);
  }
}

/* plain-words-only mode */
[data-mode="plain"] .clause__text { display: none; }
[data-mode="plain"] .clause { grid-template-columns: minmax(0, 1fr); padding: 28px 0; }
[data-mode="plain"] .plain {
  grid-column: 1;
  grid-row: auto;
  position: static;
  max-width: 64ch;
  font-size: 18px;
  padding: 24px 28px;
}
[data-mode="plain"] .preamble { display: block; }

/* full-text-only mode */
[data-mode="full"] .plain { display: none; }
[data-mode="full"] .clause { grid-template-columns: minmax(0, 1fr); }

/* ─── CLOSING NOTE ───────────────────────────────────────── */
.closing {
  margin: 24px 0 0;
  padding: 26px 28px;
  border-radius: var(--card);
  background: var(--ink);
  color: #fff;
  max-width: 68ch;
}
.closing h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.closing p { color: rgba(255, 255, 255, 0.85); }
.closing a { color: var(--gold); text-decoration-color: var(--gold); text-underline-offset: 3px; }

/* ─── HUB (all policies) ─────────────────────────────────── */
.hub {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}
.hub__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(18px, 3vw, 36px);
}
.hub__card {
  --c: var(--blue);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1 / 0.92;
  padding: 16% 15%;
  color: #fff;
  text-align: center;
  text-decoration: none;
  background: var(--c);
  border-radius: var(--blob-a);
  box-shadow: 0 18px 32px color-mix(in srgb, var(--c) 34%, transparent);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease, border-radius 1.2s ease;
  overflow: hidden;
}
.hub__card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.24), transparent 56%),
    radial-gradient(ellipse 80% 80% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.16) 100%);
  pointer-events: none;
}
.hub__list li:nth-child(2) .hub__card { border-radius: var(--blob-b); }
.hub__list li:nth-child(3) .hub__card { border-radius: var(--blob-c); }
.hub__list li:nth-child(4) .hub__card { border-radius: var(--blob-b); }
.hub__card:hover, .hub__card:focus-visible {
  transform: translateY(-10px) scale(1.02);
  border-radius: var(--blob-c);
  box-shadow: 0 30px 44px color-mix(in srgb, var(--c) 40%, transparent);
}
.hub__card > * { position: relative; }
.hub__kicker {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0.95;
}
.hub__title {
  margin-top: 6px;
  font-size: clamp(22px, 2.6vw, 27px);
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.26);
}
.hub__desc {
  margin-top: 10px;
  max-width: 28ch;
  font-size: 14px;
  line-height: 1.5;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}
.hub__card.to-privacy   { --c: var(--blue); }
.hub__card.to-terms     { --c: var(--red); }
.hub__card.to-cookies   { --c: var(--amber); }
.hub__card.to-community { --c: var(--green); }
.hub__card.to-child     { --c: var(--violet); }

/* ─── PRINT BUTTON ───────────────────────────────────────── */
.print-row { position: relative; z-index: 2; margin-top: 56px; text-align: center; }
.print-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--ink-faint);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.print-btn:hover { border-color: var(--ink-soft); }
.no-js .print-btn { display: none; }

/* ─── SECTION NAVIGATOR (small screens) ──────────────────── */
.secnav {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 50;
  display: none;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 11px 18px 11px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(32, 26, 12, 0.3);
  cursor: pointer;
  transform: translate(-50%, 140%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.secnav.is-shown { transform: translate(-50%, 0); }
.secnav__num {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 12px;
  font-weight: 800;
  background: var(--c);
  border-radius: var(--blob-a);
}
.secnav__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.secnav__more { opacity: 0.6; font-size: 12px; }

.sheet {
  margin: auto 0 0;
  width: 100%;
  max-width: 100%;
  max-height: 82vh;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 28px 28px 0 0;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 -10px 40px rgba(32, 26, 12, 0.2);
}
.sheet::backdrop { background: rgba(32, 26, 12, 0.42); }
.sheet[open] { animation: sheet-up 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet__grip {
  width: 44px;
  height: 5px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: var(--ink-faint);
}
.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding: 0 10px;
}
.sheet__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.sheet__close, .sheet__top {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--c-tint);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.sheet .toc__list { margin-top: 4px; }
.sheet .toc__list a { padding: 10px; }
.sheet .toc__hint { display: block; }
.sheet__top { display: block; width: 100%; margin-top: 12px; }

@media (min-width: 1180px) {
  .secnav, .sheet { display: none !important; }
}
@media (max-width: 1179px) {
  .secnav { display: inline-flex; }
  .doc ~ .site-footer, .print-row ~ .site-footer { padding-bottom: 110px; }
}

/* labels that change with screen size */
.lbl-narrow { display: none; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 859px) {
  .lbl-wide { display: none; }
  .lbl-narrow { display: inline; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding-top: 24px; }

  /* at a glance → a swipeable row */
  .glance__list {
    display: flex;
    gap: 12px;
    margin: 0 -16px;
    padding: 4px 16px 26px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .glance__list::-webkit-scrollbar { display: none; }
  .glance__item {
    flex: 0 0 64%;
    min-height: 136px;
    padding: 20px 18px;
    scroll-snap-align: start;
  }
  .glance__item strong { font-size: 16px; }
  .glance__item span { font-size: 12.5px; }
  .glance__label::after { content: ' · swipe \2192'; letter-spacing: 0.1em; }

  .modes { margin-top: 28px; }
  .modes__group button { padding: 9px 14px; font-size: 13.5px; }
  .doc { margin-top: 28px; }
  .toc { margin-bottom: 28px; padding: 16px 18px; }
  .clause { padding: 32px 0; gap: 16px; }
  .clause__title { font-size: 21px; gap: 12px; }
  .clause__num { width: 38px; height: 38px; font-size: 15px; }
  .clause__text h3 { font-size: 17px; }
  .clause__text .lead { font-size: 17px; }
  .plain { padding: 18px 18px 20px; font-size: 15.5px; }
  .preamble { font-size: 17px; margin-bottom: 32px; }
  .address { padding: 14px 16px; }
  .clause__text, .plain { overflow-wrap: break-word; }

  /* hub: smaller blobs, so all five fit in a couple of swipes */
  .hub { padding-top: 8px; }
  .hub__list { gap: 14px; }
  .hub__card { aspect-ratio: auto; min-height: 190px; padding: 30px 34px; }
  .hub__title { font-size: 23px; }
  .hub__desc { font-size: 13.5px; }
}

/* ─── PRINT ──────────────────────────────────────────────── */
@media print {
  .switcher, .modes, .toc, .print-row, .secnav, .sheet, .site-footer { display: none !important; }
  body { font-size: 11pt; }
  .hero__title { color: var(--ink); text-shadow: none; }
  .glance__item { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc { display: block; }
  .clause { display: block; break-inside: auto; }
  .clause__text { display: block !important; max-width: none; }
  .plain { display: block !important; position: static; margin: 10px 0; break-inside: avoid; }
}
