/* Quiet document surface for the final OBVEO legal pages. */

:is(.obveo-editorial-page--datenschutz, .obveo-editorial-page--daten-loeschen, .obveo-editorial-page--impressum, .obveo-editorial-page--agb) {
  --legal-ink: #0b2a23;
  --legal-text: #3f5951;
  --legal-muted: #678078;
  --legal-accent: #08775e;
  --legal-line: #bfd0c9;
  min-width: 0;
  color: var(--legal-ink);
  background: #eef4ef;
}

.obv-legal-hero {
  padding: clamp(9rem, 13vw, 12rem) 0 clamp(3.5rem, 6vw, 5.5rem);
  border-bottom: 1px solid var(--legal-line);
  background: #e4eee8;
}

.obv-legal-hero__inner {
  max-width: 78rem;
}

.obv-legal-eyebrow,
.obv-legal-toc > p {
  margin: 0 0 1.25rem;
  color: var(--legal-accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.obv-legal-hero h1 {
  max-width: 12ch;
  margin: 0;
  color: var(--legal-ink);
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.obv-legal-hero__lead {
  max-width: 46rem;
  margin: 1.6rem 0 0;
  color: var(--legal-text);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.7;
}

.obv-legal-layout {
  max-width: 78rem;
  padding-block: clamp(3.5rem, 6vw, 6.5rem);
  display: grid;
  grid-template-columns: minmax(12rem, 17rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(3rem, 7vw, 7rem);
}

.obv-legal-toc {
  position: sticky;
  top: 7rem;
  min-width: 0;
}

.obv-legal-toc ol {
  max-height: calc(100vh - 10rem);
  margin: 0;
  padding: 0 0.25rem 0 0;
  overflow: auto;
  list-style: none;
}

.obv-legal-toc li {
  border-top: 1px solid var(--legal-line);
}

.obv-legal-toc li:last-child {
  border-bottom: 1px solid var(--legal-line);
}

.obv-legal-toc a {
  padding: 0.78rem 0;
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 0.55rem;
  color: var(--legal-text);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: break-word;
}

.obv-legal-toc a span {
  color: var(--legal-accent);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
}

.obv-legal-toc a:hover {
  color: var(--legal-accent);
}

.obv-legal-toc a:focus-visible,
.obv-legal-document a:focus-visible {
  outline: 3px solid #08775e;
  outline-offset: 4px;
}

.obv-legal-document {
  min-width: 0;
}

.obv-legal-section {
  padding: 0 0 clamp(3.2rem, 5vw, 5rem);
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.2rem);
  scroll-margin-top: 7rem;
}

.obv-legal-section + .obv-legal-section {
  padding-top: clamp(3.2rem, 5vw, 5rem);
  border-top: 1px solid var(--legal-line);
}

.obv-legal-section__number {
  padding-top: 0.6rem;
  color: var(--legal-accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.obv-legal-section__content {
  min-width: 0;
}

.obv-legal-section h2 {
  margin: 0 0 1.75rem;
  color: var(--legal-ink);
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
  overflow-wrap: break-word;
  hyphens: auto;
}

.obv-legal-section p,
.obv-legal-section address,
.obv-legal-section li,
.obv-legal-details {
  color: var(--legal-text);
  font-size: clamp(1rem, 1.35vw, 1.08rem);
  line-height: 1.75;
}

.obv-legal-section p {
  max-width: 50rem;
  margin: 0 0 1rem;
}

.obv-legal-section address {
  margin: 1.4rem 0;
  padding-left: 1.25rem;
  display: grid;
  border-left: 3px solid var(--legal-accent);
  font-style: normal;
}

.obv-legal-section address span:first-child {
  color: var(--legal-ink);
  font-weight: 800;
}

.obv-legal-section ul {
  max-width: 46rem;
  margin: 1rem 0 1.4rem;
  padding-left: 1.25rem;
}

.obv-legal-section li {
  padding-left: 0.35rem;
}

.obv-legal-section li::marker {
  color: var(--legal-accent);
}

.obv-legal-details {
  max-width: 46rem;
  margin: 1.4rem 0;
}

.obv-legal-details > div {
  padding: 0.75rem 0;
  display: grid;
  grid-template-columns: minmax(9rem, 0.4fr) minmax(0, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--legal-line);
}

.obv-legal-details > div:last-child {
  border-bottom: 1px solid var(--legal-line);
}

.obv-legal-details dt {
  color: var(--legal-muted);
  font-weight: 650;
}

.obv-legal-details dd {
  min-width: 0;
  margin: 0;
  color: var(--legal-ink);
  font-weight: 750;
  overflow-wrap: break-word;
}

.obv-legal-document a {
  color: var(--legal-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: break-word;
}

.obv-legal-action {
  margin-top: 1.75rem !important;
}

.obv-legal-cta {
  min-height: 3.25rem;
  padding: 0.8rem 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: 2px solid var(--legal-accent);
  border-radius: 0.45rem;
  color: #ffffff !important;
  background: var(--legal-accent);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.obv-legal-cta:hover {
  color: var(--legal-ink) !important;
  background: transparent;
}

.obv-legal-cta span {
  font-size: 1.2em;
}

.obv-legal-value {
  color: var(--legal-ink) !important;
  font-size: clamp(1.3rem, 2vw, 1.7rem) !important;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.obv-legal-section--emphasis {
  margin: 0 0 clamp(3.2rem, 5vw, 5rem);
  padding: clamp(2rem, 4vw, 3rem);
  grid-template-columns: 3.5rem minmax(0, 1fr);
  border: 2px solid #08775e !important;
  background: #e0eee7;
}

.obv-legal-updated {
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--legal-line);
  color: var(--legal-muted);
  font-size: 0.9rem;
  font-weight: 750;
}

:is(.obveo-editorial-page--datenschutz, .obveo-editorial-page--daten-loeschen, .obveo-editorial-page--impressum, .obveo-editorial-page--agb) + .obv-footer .obv-footer-reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

.obveo-editorial-page--agb {
  --legal-anchor-offset: calc(var(--obveo-header-height, 5rem) + var(--wp-admin--admin-bar--height, 0px) + 1rem);
}

.obveo-editorial-page--agb .obv-legal-hero h1 {
  max-width: 100%;
  font-size: clamp(2.05rem, 5.2vw, 5.25rem);
  line-height: 1.04;
  overflow-wrap: break-word;
  hyphens: manual;
}

.obveo-editorial-page--agb .obv-legal-toc {
  top: var(--legal-anchor-offset);
}

.obveo-editorial-page--agb .obv-legal-toc a {
  min-height: 44px;
  padding: 0.5rem 0.25rem;
  align-items: center;
  font-size: 0.9375rem;
}

.obveo-editorial-page--agb .obv-legal-toc a span {
  font-size: inherit;
}

.obveo-editorial-page--agb .obv-legal-toc a:focus-visible {
  outline-offset: -3px;
}

.obveo-editorial-page--agb .obv-legal-section {
  scroll-margin-top: var(--legal-anchor-offset);
}

.obveo-editorial-page--agb .obv-legal-updated {
  color: var(--legal-text);
}

.obv-legal-clauses {
  max-width: 50rem;
  margin: 0;
  padding-inline-start: 2rem;
}

.obv-legal-clauses > li {
  margin-block-end: 1rem;
  overflow-wrap: break-word;
}

.obv-legal-clauses > li:last-child {
  margin-block-end: 0;
}

.obv-legal-clauses > li::marker {
  content: "(" counter(list-item) ") ";
  font-weight: 700;
}

@media (min-width: 901px) {
  .obveo-editorial-page--agb .obv-legal-toc {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--legal-anchor-offset) - 1rem);
  }

  .obveo-editorial-page--agb .obv-legal-toc ol {
    min-height: 0;
    max-height: none;
  }
}

@media (max-width: 900px) {
  .obv-legal-layout {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .obv-legal-toc {
    position: static;
  }

  .obv-legal-toc ol {
    max-height: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
  }
}

@media (max-width: 560px) {
  .obv-legal-hero {
    padding-top: 8.5rem;
  }

  .obveo-editorial-page--daten-loeschen .obv-legal-hero h1 {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .obveo-editorial-page--agb .obv-legal-hero h1 {
    font-size: clamp(1.75rem, 7vw, 2.05rem);
  }

  .obv-legal-toc ol {
    grid-template-columns: 1fr;
  }

  .obv-legal-section,
  .obv-legal-section--emphasis {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .obv-legal-section__number {
    padding-top: 0;
  }

  .obv-legal-details > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(.obveo-editorial-page--datenschutz, .obveo-editorial-page--daten-loeschen, .obveo-editorial-page--impressum, .obveo-editorial-page--agb) *,
  :is(.obveo-editorial-page--datenschutz, .obveo-editorial-page--daten-loeschen, .obveo-editorial-page--impressum, .obveo-editorial-page--agb) + .obv-footer * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
