/* TAGONYM 1.0 / 05.8 – Rechtliche Seiten */
body[data-page="impressum"],
body[data-page="datenschutz"],
body[data-page="widerruf"] {
  background:#FAF9F6;
  color:#25272B;
  font-family:Inter,Arial,sans-serif;
}

body[data-page] main.legal-container {
  width:100%;
  max-width:808px;
  margin:0 auto;
  padding:clamp(30px,5vw,62px) 24px 88px;
}

body[data-page] .legal-container>.legal-eyebrow {
  margin:0 0 14px;
  color:#738875;
  font-size:11px;
  letter-spacing:.13em;
  font-weight:800;
}

body[data-page] .legal-container>h1 {
  margin:0 0 32px;
  color:#25272B;
  font-size:clamp(32px,4vw,44px);
  line-height:1.14;
  letter-spacing:-.035em;
}

body[data-page] .legal-copy h2 {
  margin:36px 0 15px;
  font-size:clamp(24px,3vw,28px);
  line-height:1.3;
  letter-spacing:-.02em;
  scroll-margin-top:110px;
}

body[data-page] .legal-copy h3 {
  scroll-margin-top:110px;
}

body[data-page] .legal-copy p,
body[data-page] .legal-copy li {
  font-size:clamp(16px,1.6vw,17px);
  line-height:1.72;
  overflow-wrap:anywhere;
}

body[data-page] .legal-copy a {
  text-underline-offset:3px;
  overflow-wrap:anywhere;
}

body[data-page] .legal-copy a:focus-visible {
  outline:2px solid #25272B;
  outline-offset:3px;
}

/* Datenschutz / Widerruf: Inhaltsnavigation */
body[data-page] main.legal-container.tg10-legal-with-toc {
  max-width:1160px;
  display:grid;
  grid-template-columns:minmax(185px,225px) minmax(0,760px);
  column-gap:clamp(26px,4vw,50px);
  justify-content:center;
  align-items:start;
}

.tg10-legal-with-toc>.legal-eyebrow,
.tg10-legal-with-toc>h1 {
  grid-column:1/-1;
}

.tg10-legal-with-toc>.tg10-legal-toc {
  grid-column:1;
  grid-row:3;
  align-self:stretch;
  min-width:0;
}

.tg10-legal-with-toc>.legal-copy {
  grid-column:2;
  grid-row:3;
  min-width:0;
}

.tg10-legal-with-toc>.legal-copy>h2:first-child {
  margin-top:0;
}

.tg10-legal-with-toc>.legal-copy>.withdrawal-panel:first-child {
  margin-top:0;
}

.tg10-legal-toc-desktop {
  position:sticky;
  top:95px;
  max-height:calc(100svh - 120px);
  overflow-y:auto;
}

.tg10-legal-toc-title {
  margin:0 0 14px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  color:#25272B;
}

.tg10-legal-toc ol {
  list-style:none;
  margin:0;
  padding:0;
}

.tg10-legal-toc li {
  margin:0 0 3px;
}

.tg10-legal-toc a {
  display:block;
  padding:8px 5px;
  border-radius:7px;
  color:#67645F;
  font-size:13px;
  line-height:1.45;
  text-decoration:none;
  overflow-wrap:anywhere;
}

.tg10-legal-toc a:hover {
  color:#25272B;
  background:#EAE2D5;
}

.tg10-legal-toc a:focus-visible {
  outline:2px solid #25272B;
  outline-offset:2px;
}

.tg10-legal-toc-mobile {
  display:none;
}

/* Widerrufsformular: ausschließlich Optik */
body[data-page="widerruf"] .withdrawal-panel {
  background:#FFFFFF;
  border:1px solid #EAE2D5;
  border-radius:16px;
  padding:clamp(20px,3vw,30px);
}

body[data-page="widerruf"] .withdrawal-panel input {
  max-width:none;
  min-height:49px;
  border-color:#D8D5CF;
  border-radius:10px;
  background:#fff;
}

body[data-page="widerruf"] .withdrawal-panel input:focus {
  outline:2px solid #A7BBA8;
  outline-offset:2px;
}

body[data-page="widerruf"] .withdrawal-panel button {
  border-radius:12px;
  background:#C74337;
  min-height:48px;
  padding:12px 20px;
  font-size:16px;
}

body[data-page="widerruf"]
.withdrawal-panel button:hover:not(:disabled) {
  background:#A9362B;
}

body[data-page="widerruf"]
.withdrawal-panel #withdrawalBack {
  color:#25272B;
  background:#EAE2D5;
}

body[data-page="widerruf"]
.withdrawal-panel #withdrawalBack:hover {
  background:#DDD1BF;
}

/* Tablet und Smartphone */
@media(max-width:900px) {
  body[data-page] main.legal-container.tg10-legal-with-toc {
    max-width:808px;
    display:block;
  }

  .tg10-legal-toc-desktop {
    display:none;
  }

  .tg10-legal-toc-mobile {
    display:block;
    margin:0 0 28px;
    border:1px solid #EAE2D5;
    border-radius:12px;
    background:#fff;
  }

  .tg10-legal-toc-mobile summary {
    padding:16px 18px;
    font-weight:750;
    cursor:pointer;
  }

  .tg10-legal-toc-mobile ol {
    max-height:270px;
    overflow-y:auto;
    padding:0 12px 12px;
  }

  .tg10-legal-toc-mobile a {
    padding:10px 8px;
  }
}

@media(max-width:600px) {
  body[data-page] main.legal-container {
    padding:28px 18px 60px;
  }

  body[data-page] .legal-container>h1 {
    margin-bottom:24px;
  }

  body[data-page] .legal-copy h2 {
    margin-top:30px;
  }
}

@media(prefers-reduced-motion:reduce) {
  body[data-page] * {
    scroll-behavior:auto!important;
  }
}

/* 05.8a – Vollständige, größere Inhaltsnavigation */
@media (min-width:901px) {
  body[data-page="datenschutz"]
  main.legal-container.tg10-legal-with-toc,
  body[data-page="widerruf"]
  main.legal-container.tg10-legal-with-toc {
    max-width:1200px;
    grid-template-columns:280px minmax(0,760px);
    column-gap:clamp(30px,4vw,55px);
  }

  .tg10-legal-with-toc>.tg10-legal-toc {
    align-self:start;
    height:auto;
    overflow:visible;
  }

  .tg10-legal-toc-desktop {
    position:static;
    max-height:none;
    height:auto;
    overflow:visible;
  }

  .tg10-legal-toc-title {
    font-size:14px;
    margin-bottom:18px;
  }

  .tg10-legal-toc li {
    margin-bottom:5px;
  }

  .tg10-legal-toc a {
    font-size:15px;
    line-height:1.5;
    padding:10px 8px;
  }
}


/* 05.8b – Mitwanderndes Inhaltsverzeichnis mit aktiver Markierung */
@media (min-width:901px) {
  .tg10-legal-with-toc > .tg10-legal-toc {
    align-self:stretch;
    position:relative;
    height:auto;
    overflow:visible;
  }

  .tg10-legal-toc-desktop {
    position:sticky;
    top:90px;
    height:auto;
    max-height:none;
    overflow:visible;
  }

  .tg10-legal-toc-desktop ol {
    border-left:1px solid #D8D5CF;
  }

  .tg10-legal-toc-desktop a {
    position:relative;
    margin-left:-1px;
    border-radius:0 9px 9px 0;
    border-left:3px solid transparent;
    padding:9px 12px;
    transition:background-color .16s ease,color .16s ease;
  }

  .tg10-legal-toc-desktop a.is-current {
    background:#E0E9DD;
    border-left-color:#C74337;
    color:#25272B;
    font-weight:750;
  }

  .tg10-legal-toc-desktop a:hover:not(.is-current) {
    background:#F1EDE7;
  }

  .tg10-legal-toc-title {
    color:#738875;
    letter-spacing:.10em;
    font-size:12px;
  }
}

@media (max-width:900px) {
  .tg10-legal-toc-mobile a.is-current {
    background:#E0E9DD;
    color:#25272B;
    font-weight:750;
  }
}

@media (prefers-reduced-motion:reduce) {
  .tg10-legal-toc a {
    transition:none;
  }
}
