/* ─────────────────────────────────────────────────────────
   legal.css — reusable styles for the legal/secondary pages
   (privacy.html, impressum, cookies, terms, etc.)
   Two-column with sticky TOC sidebar. Editorial typography.
   ───────────────────────────────────────────────────────── */

.page-legal { background: var(--paper); }

/* Masthead ─────────────────────────────────────────────── */
.lg-masthead-section {
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--rule);
}
.lg-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.2rem;
  margin-bottom: clamp(2rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--ink);
  flex-wrap: wrap;
  gap: 1rem;
}
.lg-mast-num {
  font-family: var(--mono);
  font-size: var(--tiny);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
.lg-mast-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--mono);
  font-size: var(--tiny);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.lg-mast-meta .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--ochre);
  display: inline-block;
}

.lg-title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.012em;
  margin: 0 0 1.5rem;
}
.lg-lede {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.1rem, 1.4vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 2rem;
  max-width: 62ch;
}

/* Document switcher (sub-nav for legal pages) */
.lg-doc-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-top: 1.5rem;
}
.lg-doc-switch a {
  flex: 1 1 auto;
  min-width: 140px;
  padding: 0.9rem 1.1rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  border-right: 1px solid var(--rule);
  transition: background 0.15s, color 0.15s;
}
.lg-doc-switch a:last-child { border-right: 0; }
.lg-doc-switch a:hover { color: var(--ochre); }
.lg-doc-switch a.is-active {
  background: var(--ink);
  color: var(--paper);
}

/* Body grid ──────────────────────────────────────────── */
.lg-body {
  padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem);
}
.lg-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 900px) {
  .lg-grid { grid-template-columns: 1fr; }
}

/* Sticky TOC ───────────────────────────────────────── */
.lg-toc {
  position: sticky;
  top: 2rem;
}
@media (max-width: 900px) {
  .lg-toc { position: static; }
}
.lg-toc-inner {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 1.2rem 1rem 1rem;
}
.lg-toc-head {
  display: block;
  font-family: var(--mono);
  font-size: var(--tiny);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0.6rem;
}
.lg-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.lg-toc-list a {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.3;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 0.15s;
}
.lg-toc-list li:last-child a { border-bottom: 0; }
.lg-toc-list a:hover { color: var(--ochre); }
.lg-toc-list .n {
  font-family: var(--mono);
  font-size: var(--tiny);
  letter-spacing: 0.12em;
  color: var(--ink-3);
}
.lg-toc-foot {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.lg-toc-foot .caps {
  font-family: var(--mono);
  font-size: var(--tiny);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.lg-toc-foot .v {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-2);
}

/* Content ─────────────────────────────────────────── */
.lg-content {
  max-width: 70ch;
  scroll-margin-top: 2rem;
}
.lg-section {
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 2rem;
}
.lg-section:first-child { padding-top: 0; }
.lg-section:last-child { border-bottom: 0; }

.lg-sh {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 1.2rem;
}
.lg-sh .num {
  font-family: var(--mono);
  font-size: var(--tiny);
  letter-spacing: 0.16em;
  color: var(--ochre);
  padding-top: 0.4rem;
}
.lg-sh h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--ink);
}

.lg-section p {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 1rem;
  max-width: 62ch;
  text-wrap: pretty;
}
.lg-section .lg-lede-prose {
  font-size: 1.15rem;
  color: var(--ink);
}
.lg-section a {
  color: var(--ink);
  border-bottom: 1px solid var(--ochre);
  text-decoration: none;
}
.lg-section a:hover { color: var(--ochre); }

.lg-section strong { font-weight: 600; }

/* Bullets / numbered */
.lg-bullets,
.lg-numbered {
  margin: 0.8rem 0 1rem;
  padding-left: 1.2rem;
}
.lg-bullets li,
.lg-numbered li {
  font-family: var(--display);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.lg-bullets { list-style: none; padding-left: 0; }
.lg-bullets li {
  position: relative;
  padding-left: 1.3rem;
}
.lg-bullets li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ochre);
  font-family: var(--mono);
}

/* Tables (key/value rows) ───────────────────────────── */
.lg-table {
  margin: 1rem 0 1.5rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-family: var(--sans);
}
.lg-row {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1.2fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.92rem;
  line-height: 1.5;
  align-items: baseline;
}
.lg-row:last-child { border-bottom: 0; }
.lg-row > div {
  color: var(--ink-2);
}
.lg-row > div:first-child { color: var(--ink); }
.lg-row-head {
  font-family: var(--mono);
  font-size: var(--tiny);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.6rem;
}
.lg-row-head > div { color: var(--ink-3); }
@media (max-width: 700px) {
  .lg-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    padding: 0.9rem 0;
  }
  .lg-row > div:first-child {
    font-family: var(--mono);
    font-size: var(--tiny);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
  }
  .lg-row-head { display: none; }
}

.lg-aside-note {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-2) !important;
  font-size: 0.95rem !important;
  border-left: 2px solid var(--ochre);
  padding: 0.6rem 0 0.6rem 1rem !important;
  margin: 1rem 0 0.5rem !important;
  max-width: 56ch !important;
}

/* Change log */
.lg-changelog {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
.lg-changelog h4 {
  font-family: var(--mono);
  font-size: var(--tiny);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.6rem;
}
.lg-changelog ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.lg-changelog li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.8rem;
  padding: 0.4rem 0;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.lg-changelog .d { color: var(--ink-3); letter-spacing: 0.04em; }
.lg-changelog .t { color: var(--ink); }

/* Contact box ─────────────────────────────────────── */
.lg-contact-box {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 1rem 0 1.5rem;
}
.lg-contact-box > div {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.85rem;
  align-items: baseline;
}
.lg-contact-box > div:last-child { border-bottom: 0; }
.lg-contact-box .k {
  font-family: var(--mono);
  font-size: var(--tiny);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.lg-contact-box .v { color: var(--ink-2); }
.lg-contact-box a {
  color: var(--ink);
  border-bottom: 1px solid var(--ochre);
  text-decoration: none;
}

.lg-back {
  display: inline-block;
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ochre);
  padding-bottom: 2px;
  text-decoration: none;
}
.lg-back:hover { color: var(--ochre); }
