/* Legal pages: Datenschutz, Impressum, AGB. Header is the shared .phero, the text sits in .prose. */

/* Header: date and draft note */
.lg-hero .h1 { max-width: 20ch; }
.lg-meta { display: flex; align-items: center; justify-content: center; gap: .45rem; margin-top: 1.3rem; font: 500 .78rem var(--mono); color: var(--faint); }
.lg-meta svg { width: .95rem; height: .95rem; }
.lg-draft { display: flex; align-items: flex-start; gap: .85rem; max-width: 36rem; margin: 1.5rem auto 0; padding: .9rem 1.1rem; border-radius: .6rem; background: light-dark(#FBF0D2, #2E2512); box-shadow: inset 0 0 0 1px light-dark(#EBD596, #5A4A20); text-align: left; font-size: .92rem; line-height: 1.5; color: var(--ink); }
.lg-draft > svg { flex: none; width: 2rem; height: 2rem; padding: .45rem; border-radius: .45rem; background: light-dark(#F6DE9A, #4A3B16); color: light-dark(#8A6511, #E8C66E); }
.lg-draft b { font-weight: 650; }
.lg-draft small { display: block; margin-top: .15rem; font-size: .84rem; color: var(--ink-2); }

/* Placeholders, marked yellow as the draft note says */
.todo { padding: .05em .3em; border-radius: .25em; background: light-dark(#FBE7A1, #4A3B16); color: var(--ink); font-weight: 560; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Width shared by the overview, the contents list and the text */
.lg-wide { max-width: 62rem; }

/* Datenschutz: "Auf einen Blick" tiles. AGB: summary */
.lg-glance { padding-bottom: clamp(3rem, 7vw, 4.5rem); }
.lg-glance__h { font-size: .85rem; font-weight: 600; letter-spacing: 0; color: var(--brand); }
.lg-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.1rem; }
.lg-tile { display: flex; flex-direction: column; padding: 1.2rem 1.25rem 1.1rem; border-radius: .6rem; background: var(--paper); box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(29, 27, 24, .05); transition: box-shadow .15s; }
@media (hover: hover) and (pointer: fine) { .lg-tile:hover { box-shadow: 0 0 0 1px light-dark(#C6BFB2, #9E978C), 0 12px 24px -16px rgba(29, 27, 24, .35); } }
.lg-tile .px { width: 1.6rem; height: 1.6rem; }
.lg-tile b { margin-top: .95rem; font-size: 1.05rem; font-weight: 620; letter-spacing: -.02em; line-height: 1.3; color: var(--ink); }
.lg-tile p { margin-top: .35rem; font-size: .9rem; line-height: 1.5; color: var(--muted); }
.lg-tile span { display: inline-flex; align-items: center; gap: .3rem; margin-top: auto; padding-top: 1rem; font-size: .85rem; font-weight: 560; color: var(--brand); }
.lg-tile span svg { width: .9rem; height: .9rem; }

.lg-brief { display: grid; grid-template-columns: 1fr 1.9fr; gap: 2.5rem; align-items: start; padding: 1.6rem; border-radius: .75rem; background: var(--paper); box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(29, 27, 24, .05); }
.lg-brief__head h2 { font-size: 1.4rem; font-weight: 650; line-height: 1.2; letter-spacing: -.02em; }
.lg-brief__head p { margin-top: .6rem; font-size: .92rem; line-height: 1.5; color: var(--muted); }
.lg-promises { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.lg-promise { padding: 1.1rem 1.2rem 1.2rem; border-radius: .55rem; background: light-dark(#F7F4EE, var(--dark-2)); box-shadow: inset 0 0 0 1px var(--line); }
.lg-promise h3 { font-size: .85rem; font-weight: 600; letter-spacing: 0; color: var(--brand); }
.lg-promise + .lg-promise h3 { color: light-dark(#8A6511, #E8C66E); }
.lg-promise ul { display: grid; gap: .5rem; margin-top: .8rem; }
.lg-promise li { display: grid; grid-template-columns: .5rem 1fr; gap: .65rem; font-size: .92rem; line-height: 1.45; color: var(--ink-2); }
.lg-promise li::before { content: ""; width: .45rem; height: .45rem; margin-top: .45rem; background: var(--brand); }
.lg-promise + .lg-promise li::before { background: var(--mustard); }

/* Contents list beside the text, sticky on wide screens */
.lg-body { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; padding-block: clamp(2.5rem, 6vw, 3.5rem) clamp(4.5rem, 9vw, 6.5rem); border-top: 1px solid var(--line); }
.lg-toc { position: sticky; top: 6rem; max-height: calc(100svh - 7.5rem); overflow-y: auto; font-size: .87rem; }
.lg-toc > p { margin-bottom: .75rem; font-size: .85rem; font-weight: 600; letter-spacing: 0; color: var(--brand); }
.lg-toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line-2); }
.lg-toc a { display: block; margin-left: -1px; padding: .3rem 0 .3rem .9rem; border-left: 2px solid transparent; line-height: 1.35; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .lg-toc a:hover { border-left-color: var(--brand); color: var(--ink); } }

/* The text */
.lg-doc { min-width: 0; }
.lg-sec + .lg-sec { margin-top: 2.6rem; padding-top: 2.4rem; border-top: 1px solid var(--line); }
.prose .lg-sec > h2 { display: flex; align-items: baseline; gap: .7rem; margin-top: 0; }
.lg-num { flex: none; display: inline-grid; place-items: center; min-width: 1.85rem; height: 1.6rem; padding: 0 .45rem; border-radius: .35rem; background: light-dark(#E1F1E6, #18291F); font: 600 .78rem var(--mono); letter-spacing: 0; color: light-dark(#24774A, #7CC79A); transform: translateY(-.15rem); }
.prose code { padding: .05em .35em; border-radius: .3em; background: var(--chrome); font: .86em var(--mono); color: var(--ink); overflow-wrap: anywhere; }

/* Fact boxes: purpose, legal basis, recipients ... */
.lg-facts { margin: 1rem 0 0; overflow: hidden; border-radius: .6rem; background: var(--paper); box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(29, 27, 24, .05); font-size: .92rem; line-height: 1.5; }
.lg-facts > div { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); gap: 1rem; padding: .7rem 1.1rem; border-top: 1px solid var(--line); }
.lg-facts > div:first-child { border-top: 0; }
.lg-facts dt { font-size: .82rem; line-height: 1.6; color: var(--faint); hyphens: auto; }
.lg-facts dd { margin: 0; color: var(--ink); }

/* Notes inside the text */
.lg-note { margin-top: 1.2rem; padding: 1rem 1.15rem; border-radius: .6rem; background: var(--paper); box-shadow: inset 3px 0 0 var(--mustard), 0 0 0 1px var(--line-2); }
.lg-note > b { font-weight: 620; color: var(--ink); }
.prose .lg-note p { margin-top: .35rem; }
.lg-right { margin-top: 1.4rem; padding: 1.25rem 1.35rem; border-radius: .6rem; background: var(--dark); color: var(--on-dark-2); }
.prose .lg-right h3 { margin-top: 0; color: var(--lime); }
.prose .lg-right p { margin-top: .5rem; }

/* Tables */
.lg-table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; border-radius: .6rem; background: var(--paper); box-shadow: 0 0 0 1px var(--line-2); font-size: .9rem; line-height: 1.45; }
.lg-table th, .lg-table td { padding: .65rem 1rem; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.lg-table thead th { border-top: 0; font-size: .72rem; font-weight: 600; color: var(--faint); }
.lg-table tbody th { font-weight: 560; color: var(--ink); }
.lg-table small { display: block; margin-top: .1rem; font-size: .76rem; font-weight: 400; color: var(--muted); }
.lg-table-wrap { margin-top: 1rem; overflow-x: auto; overscroll-behavior-x: contain; border-radius: .6rem; background: var(--paper); box-shadow: 0 0 0 1px var(--line-2); }
.lg-table-wrap .lg-table { border-radius: 0; box-shadow: none; }
.lg-table-caption { padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: light-dark(#FAF9F6, #171614); font-size: .78rem; text-align: left; color: var(--muted); }

/* AGB: numbered paragraphs (1), (2) ... and the price table */
.prose .lg-paras { margin-top: 1rem; padding: 0; list-style: none; counter-reset: absatz; }
.prose .lg-paras > li { position: relative; padding-left: 2.4rem; counter-increment: absatz; }
.prose .lg-paras > li + li { margin-top: .7rem; }
.lg-paras > li::before { content: "(" counter(absatz) ")"; position: absolute; left: 0; top: .2rem; font: 500 .78rem var(--mono); color: var(--faint); }
.prose .lg-paras ul { margin-top: .6rem; }
.prose .lg-paras ul b { font-weight: 620; color: var(--ink); }
.lg-paras .lg-table { margin-block: .9rem .4rem; }
.lg-paras .lg-table td, .lg-paras .lg-table thead th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.lg-paras .lg-table td { color: var(--ink); }

/* Impressum: one card like a letterhead, then the dispute note */
.lg-imp { padding-bottom: clamp(4.5rem, 9vw, 6.5rem); }
.lg-solo { margin-inline: auto; }
.lg-card { padding: clamp(1.4rem, 4vw, 2.2rem); border-radius: .75rem; background: var(--paper); box-shadow: 0 0 0 1px var(--line-2), 0 30px 60px -40px rgba(29, 27, 24, .35); }
.lg-card__head { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.lg-wordmark { font-size: 1.9rem; font-weight: 650; letter-spacing: -.05em; line-height: 1.1; color: var(--brand); }
.prose .lg-card__head > p:last-child { margin-top: 0; text-align: right; font-size: .8rem; line-height: 1.55; color: var(--muted); }
.lg-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem 2rem; margin-top: 1.6rem; }
.lg-groups > .lg-group:first-child { grid-row: span 2; }
.prose .lg-group h2 { margin-top: 0; font-size: .85rem; font-weight: 600; letter-spacing: 0; color: var(--brand); }
.prose .lg-context { margin-top: .5rem; font-size: .9rem; color: var(--muted); }
.lg-pairs { display: grid; gap: .6rem; margin: .7rem 0 0; }
.lg-pairs dt { font-size: .8rem; color: var(--faint); }
.lg-pairs dd { margin: .1rem 0 0; color: var(--ink); }
.lg-dispute { margin-top: 2.6rem; }

/* Current page in the footer */
.foot a[aria-current="page"] { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 60em) {
  .lg-body { grid-template-columns: minmax(0, 1fr); }
  .lg-toc { position: static; max-height: none; padding: 1.1rem 1.2rem; border-radius: .6rem; background: var(--paper); box-shadow: 0 0 0 1px var(--line-2); }
  .lg-toc ol { columns: 2; column-gap: 1.5rem; border-left: 0; }
  .lg-toc li { break-inside: avoid; }
  .lg-toc a { margin-left: 0; padding-left: 0; border-left: 0; }
  .lg-brief { grid-template-columns: 1fr; gap: 1.2rem; }
}

@media (max-width: 47.5em) {
  .lg-tiles { grid-template-columns: 1fr 1fr; }
  .lg-promises, .lg-groups { grid-template-columns: 1fr; }
  .lg-groups > .lg-group:first-child { grid-row: auto; }
}

@media (max-width: 37.5em) {
  .lg-tiles { grid-template-columns: 1fr; }
  .lg-toc ol { columns: 1; }
  .lg-facts > div { grid-template-columns: 1fr; gap: .1rem; }
  .lg-brief { padding: 1.2rem; }
  .lg-card__head { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .prose .lg-card__head > p:last-child { text-align: left; }
  .prose .lg-paras > li { padding-left: 2rem; }
  .lg-table th, .lg-table td { padding-inline: .75rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .lg-tile span svg { transition: transform .2s cubic-bezier(.2, .7, .2, 1); }
  @media (hover: hover) and (pointer: fine) { .lg-tile:hover span svg { transform: translateX(3px); } }
  @media (hover: hover) and (pointer: fine) { .lg-tile:hover .px { animation: hop .5s steps(2); } }
}
