/* ─── LEGAL PAGES ────────────────────────────────────
   Privacy Policy, Cookie Policy, Cookie Settings,
   User Agreement, Data Act Statement, Trade-In Terms.
   One shared template: page head → page switcher →
   long-form article.                                  */

/* ── Page head (clears the fixed nav) ── */
.lg-head {
  padding: 150px 0 56px;
  background: var(--c-bg-soft);
}
.lg-head .lg-eyebrow {
  margin: 0 0 12px;
  color: var(--c-primary);
  font-size: var(--tx-sm);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.lg-head h1 {
  margin: 0;
  color: var(--c-primary);
  letter-spacing: -.02em;
}
.lg-head .lg-updated {
  margin: 14px 0 0;
  color: var(--c-ink2);
  font-size: var(--tx-sm);
}

/* ── Page switcher ── */
.lg-tabs {
  border-bottom: 1px solid var(--c-line);
  background: var(--c-white);
}
.lg-tabs-inner {
  display: flex;
  gap: 4px 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.lg-tabs a {
  flex-shrink: 0;
  padding: 16px 0 14px;
  border-bottom: 2px solid transparent;
  color: var(--c-ink2);
  font-size: var(--tx-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.lg-tabs a:hover { color: var(--c-primary); }
.lg-tabs a.active { border-bottom-color: var(--c-primary); color: var(--c-primary); }

/* ── Article ── */
.lg-body { padding: 56px 0 var(--sp); }
.lg-article { max-width: 860px; }
.lg-article h2 {
  margin: 44px 0 14px;
  color: var(--c-primary);
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  font-weight: 600;
  scroll-margin-top: 100px;
}
.lg-article > h2:first-child { margin-top: 0; }
.lg-article p {
  margin: 0 0 16px;
  color: var(--c-ink2);
}
.lg-article ul,
.lg-article ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--c-ink2);
}
.lg-article ul { list-style: disc; }
.lg-article ol { list-style: decimal; }
.lg-article li { margin-bottom: 8px; line-height: 1.75; }
.lg-article li::marker { color: var(--c-primary); }
.lg-article a {
  color: var(--c-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lg-article a:hover { color: var(--c-accent-h); }

/* ── Tables ── */
.lg-table-wrap {
  margin: 4px 0 22px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
}
.lg-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: var(--tx-sm);
}
.lg-table th,
.lg-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  line-height: 1.65;
}
.lg-table thead th {
  background: var(--c-primary);
  color: #fff;
  font-weight: 600;
}
.lg-table tbody td {
  border-top: 1px solid var(--c-line);
  color: var(--c-ink2);
}
.lg-table tbody td:first-child { color: var(--c-ink); font-weight: 600; white-space: nowrap; }

/* ── Contact block ── */
.lg-contact {
  margin: 4px 0 22px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
}
.lg-contact > div {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 16px;
  font-size: var(--tx-sm);
  line-height: 1.65;
}
.lg-contact > div + div { border-top: 1px solid var(--c-line); }
.lg-contact dt { color: var(--c-ink); font-weight: 600; }
.lg-contact dd { margin: 0; color: var(--c-ink2); }

/* ── Cookie Settings controls ── */
.lg-prefs {
  margin: 4px 0 22px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
}
.lg-pref {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 16px;
}
.lg-pref + .lg-pref { border-top: 1px solid var(--c-line); }
.lg-pref-head {
  background: var(--c-primary);
  border-radius: 9px 9px 0 0;
  color: #fff;
  font-size: var(--tx-sm);
  font-weight: 600;
  padding-block: 12px;
}
.lg-pref-name { color: var(--c-ink); font-size: var(--tx-sm); font-weight: 600; }
.lg-pref-desc { margin: 0 !important; font-size: var(--tx-sm); }
.lg-pref-state {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 190px;
  color: var(--c-ink2);
  font-size: var(--tx-sm);
}
.lg-pref-head .lg-pref-state { color: #fff; justify-content: flex-start; }

.lg-switch { position: relative; flex-shrink: 0; width: 46px; height: 26px; }
.lg-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.lg-switch input:disabled { cursor: not-allowed; }
.lg-switch span {
  position: absolute;
  inset: 0;
  border-radius: var(--r-pill);
  background: var(--c-faint);
  transition: background .2s;
  pointer-events: none;
}
.lg-switch span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s var(--ease);
}
.lg-switch input:checked + span { background: var(--c-primary); }
.lg-switch input:checked + span::after { transform: translateX(20px); }
.lg-switch input:disabled + span { opacity: .55; }
.lg-switch input:focus-visible + span { outline: 2px solid var(--c-accent-h); outline-offset: 3px; }

/* "Reject non-essential" carries the same weight as "Accept all". */
.lg-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 14px; }
.lg-btn {
  padding: 13px 26px;
  border: 1px solid var(--c-primary);
  border-radius: var(--r-sm);
  background: var(--c-primary);
  color: #fff;
  font-size: var(--tx-sm);
  font-weight: 700;
  transition: background .2s, border-color .2s, color .2s;
}
.lg-btn:hover { background: var(--c-accent-h); border-color: var(--c-accent-h); }
.lg-btn--ghost { background: var(--c-white); color: var(--c-primary); }
.lg-btn--ghost:hover { background: var(--c-bg-soft); border-color: var(--c-primary); color: var(--c-primary); }
.lg-status { min-height: 1.75em; color: var(--c-primary) !important; font-size: var(--tx-sm); font-weight: 600; }

@media (max-width: 768px) {
  .lg-head { padding: 120px 0 40px; }
  .lg-body { padding-top: 40px; }
  .lg-contact > div { grid-template-columns: 1fr; gap: 2px; }
  .lg-pref { grid-template-columns: 1fr; gap: 8px; }
  .lg-pref-head { display: none; }
  .lg-pref-state { justify-content: flex-start; min-width: 0; }
}
