/* Shared styles for /legal/* pages. Mirrors the tokens in /index.html so the
   legal pages read as part of the same site. No external fonts or scripts:
   loading nothing from third parties keeps these pages consent-free under GDPR. */

:root {
  color-scheme: light;
  --lemon: #d6ea3b;
  --lemon-dark: #b9cf2e;
  --lemon-light: #ecf7a3;
  --lemon-pale: #f4fad0;
  --coral: #ff6b6b;
  --ink: #1a1a1a;
  --ink-soft: #4a4f3d;
  --white: #ffffff;
  --blush-wash: #fbdcec;
  --line: #e7ead9;
  --radius-card: 28px;
  --radius-control: 20px;
  --nav-h: 66px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Inter, sans-serif;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ── Nav (matches the landing page) ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--nav-h);
  padding: 12px max(16px, 6vw);
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}

/* Cut-out lime mark: transparent, no frame, no shadow (founder, 2026-10-15). */
.nav-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav-cta {
  flex-shrink: 0;
  background: var(--lemon);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--lemon-dark);
  box-shadow: 2px 3px 8px rgba(185, 207, 46, 0.4);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 3px 5px 14px rgba(185, 207, 46, 0.55);
}

/* ── Layout ── */
.legal-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 48px) max(16px, 6vw) 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

@media (min-width: 980px) {
  .legal-shell {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 64px;
  }

  .legal-shell > .legal-head {
    grid-column: 1 / -1;
  }

  .legal-shell.legal-shell--single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 856px;
  }
}

.legal-head {
  max-width: 760px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--lemon-light);
  border: 1px solid var(--lemon);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(2.1rem, 6vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 14px;
}

.meta {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

/* ── Table of contents ── */
.toc {
  align-self: start;
}

@media (min-width: 980px) {
  .toc {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
    max-height: calc(100vh - var(--nav-h) - 48px);
    overflow-y: auto;
  }
}

.toc h2 {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}

.toc li a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.4;
}

.toc li a:hover {
  color: var(--ink);
  border-left-color: var(--lemon-dark);
}

/* ── Document body ── */
.legal-body {
  max-width: 760px;
  min-width: 0;
}

.legal-body section {
  scroll-margin-top: calc(var(--nav-h) + 20px);
  padding-top: 8px;
}

.legal-body h2 {
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 44px 0 14px;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.legal-body section:first-of-type h2 {
  margin-top: 8px;
}

.legal-body h3 {
  font-size: 1.08rem;
  font-weight: 800;
  margin: 28px 0 8px;
}

.legal-body p,
.legal-body li {
  font-size: 1.01rem;
}

.legal-body p {
  margin: 0 0 14px;
}

.legal-body ul,
.legal-body ol {
  padding-left: 1.3em;
  margin: 0 0 16px;
}

.legal-body li {
  margin-bottom: 6px;
}

.legal-body li::marker {
  color: var(--lemon-dark);
}

.legal-body strong {
  font-weight: 700;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--lemon-dark);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration-color: var(--ink);
}

a:focus-visible,
.nav-cta:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── Summary / callouts ── */
.summary {
  background: var(--lemon-pale);
  border: 1px solid var(--lemon-light);
  border-radius: var(--radius-card);
  padding: 26px 28px 12px;
  margin: 0 0 12px;
}

.summary h2 {
  margin: 0 0 12px !important;
  font-size: 1.15rem;
}

.summary ul {
  padding-left: 1.2em;
}

.summary .fine {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.callout {
  border-left: 5px solid var(--lemon-dark);
  background: #fbfdf0;
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  padding: 18px 22px 6px;
  margin: 18px 0 22px;
}

.callout.important {
  border-left-color: var(--coral);
  background: #fff6f6;
}

.callout h3 {
  margin-top: 0;
}

/* ── Tables ── */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 8px 0 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.5;
  min-width: 560px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--lemon-pale);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

tr:last-child td {
  border-bottom: none;
}

address {
  font-style: normal;
}

.imprint-card {
  background: var(--lemon-pale);
  border: 1px solid var(--lemon-light);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  margin: 0 0 24px;
}

.imprint-card p {
  margin: 0 0 6px;
}

/* ── Cross-links between legal pages ── */
.legal-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 48px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.legal-switch a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
}

.legal-switch a[aria-current='page'] {
  background: var(--lemon);
  border-color: var(--lemon-dark);
}

/* ── Footer (matches the landing page) ── */
footer {
  padding: 48px max(16px, 6vw) 40px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}

.foot-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 18px;
}

.foot-brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.foot-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin-bottom: 18px;
}

.foot-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
}

.foot-links a:hover {
  color: var(--ink);
}

footer p {
  margin: 0;
}

/* ── Print: legal pages get saved as PDFs ── */
@media print {
  .site-nav,
  .toc,
  .skip-link,
  .legal-switch,
  footer {
    display: none !important;
  }

  .legal-shell {
    display: block;
    padding: 0;
  }

  body {
    font-size: 10.5pt;
  }

  .summary,
  .callout,
  .imprint-card {
    break-inside: avoid;
  }

  a {
    text-decoration: none;
  }
}

/* ── Open-source licences page (generated; see scripts/generate-licenses.mjs) ── */
.licence-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  background: var(--lemon-pale);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 8px 0 22px;
}
