.agb-page {
  --agb-bg: #f3f1ed;
  --agb-paper: #fffdfa;
  --agb-ink: #2b2a27;
  --agb-copy: #50534f;
  --agb-muted: #6d736e;
  --agb-line: #dddfd8;
  --agb-accent: #287b61;
  background: var(--agb-bg);
  color: var(--agb-ink);
}

.agb-page main {
  background: var(--agb-bg);
  color: var(--agb-ink);
}

.agb-shell {
  width: min(100% - 44px, 1240px);
  margin-inline: auto;
}

.agb-hero {
  padding: clamp(120px, 12vw, 176px) 0 clamp(48px, 7vw, 88px);
  background: radial-gradient(circle at 85% 10%, rgba(62, 166, 130, .16), transparent 36%), var(--agb-bg);
}

.agb-eyebrow,
.agb-sidebar__label {
  color: var(--agb-accent);
  font-family: var(--font-dm-sans), system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.agb-eyebrow span {
  padding-inline: 8px;
  opacity: .5;
}

.agb-hero h1 {
  max-width: 980px;
  margin-top: 18px;
  font-family: var(--font-cormorant), Georgia, serif;
  font-size: clamp(48px, 6.5vw, 88px);
  font-weight: 500;
  line-height: 1.01;
  letter-spacing: -.025em;
}

.agb-hero__subtitle {
  margin-top: 22px;
  color: var(--agb-copy);
  font-family: var(--font-dm-sans), system-ui, sans-serif;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
}

.agb-hero__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 980px;
  margin-top: clamp(38px, 5vw, 66px);
  padding-top: 25px;
  border-top: 1px solid var(--agb-line);
  font-family: var(--font-dm-sans), system-ui, sans-serif;
}

.agb-hero__meta span {
  display: block;
  margin-bottom: 8px;
  color: var(--agb-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.agb-hero__meta strong,
.agb-hero__meta a {
  color: var(--agb-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.agb-layout {
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  gap: clamp(38px, 5vw, 84px);
  align-items: start;
  padding-bottom: clamp(80px, 10vw, 140px);
}

.agb-sidebar__inner {
  position: sticky;
  top: 30px;
  max-height: calc(100vh - 60px);
  padding: 22px 22px 22px 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.agb-sidebar__label {
  margin-bottom: 16px;
}

.agb-sidebar nav,
.agb-mobile-toc nav {
  display: grid;
}

.agb-sidebar a {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 0;
  color: var(--agb-copy);
  font-family: var(--font-dm-sans), system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
}

.agb-sidebar a span {
  color: var(--agb-accent);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.agb-sidebar a:hover,
.agb-sidebar a:focus-visible,
.agb-mobile-toc a:hover,
.agb-mobile-toc a:focus-visible {
  color: var(--agb-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.agb-mobile-toc {
  display: none;
}

.agb-document {
  min-width: 0;
}

.agb-section {
  padding: clamp(28px, 3.5vw, 46px);
  margin-bottom: 16px;
  scroll-margin-top: 32px;
  border: 1px solid var(--agb-line);
  border-radius: 22px;
  background: var(--agb-paper);
  box-shadow: 0 12px 36px rgba(43, 42, 39, .035);
}

.agb-section__heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--agb-line);
}

.agb-section__heading > span {
  padding-top: 6px;
  color: var(--agb-accent);
  font-family: var(--font-dm-sans), system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.agb-section h2 {
  font-family: var(--font-cormorant), Georgia, serif;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 600;
  line-height: 1.13;
}

.agb-section__body {
  padding-left: 50px;
  color: var(--agb-copy);
  font-family: var(--font-dm-sans), system-ui, sans-serif;
  font-size: 15.5px;
  line-height: 1.72;
}

.agb-section__body p,
.agb-section__body ul {
  margin-top: 18px;
}

.agb-section__body h3 {
  margin-top: 28px;
  color: var(--agb-ink);
  font-size: 17px;
  font-weight: 700;
}

.agb-section__body ul {
  padding-left: 22px;
  list-style: disc;
}

.agb-section__body li + li {
  margin-top: 8px;
}

.agb-endnote {
  padding: 22px 0 0;
  color: var(--agb-muted);
  font-family: var(--font-dm-sans), system-ui, sans-serif;
  font-size: 13px;
  text-align: right;
}

html[data-theme="dark"] .agb-page {
  --agb-bg: #181d20;
  --agb-paper: #22292b;
  --agb-ink: #f5f2eb;
  --agb-copy: #d2d2cb;
  --agb-muted: #acb5ae;
  --agb-line: #3c4845;
  --agb-accent: #8ad0b0;
}

html[data-accessibility="on"] .agb-page {
  --agb-bg: #fff;
  --agb-paper: #fff;
  --agb-ink: #111;
  --agb-copy: #202020;
  --agb-muted: #333;
  --agb-line: #555;
  --agb-accent: #005d43;
}

html[data-accessibility="on"] .agb-hero {
  background: var(--agb-bg);
}

@media (max-width: 860px) {
  .agb-layout {
    display: block;
  }

  .agb-sidebar {
    display: none;
  }

  .agb-mobile-toc {
    display: block;
    margin-bottom: 22px;
    border: 1px solid var(--agb-line);
    border-radius: 16px;
    background: var(--agb-paper);
    font-family: var(--font-dm-sans), system-ui, sans-serif;
  }

  .agb-mobile-toc summary {
    display: flex;
    justify-content: space-between;
    padding: 18px 20px;
    color: var(--agb-ink);
    cursor: pointer;
    font-weight: 700;
    list-style: none;
  }

  .agb-mobile-toc summary::-webkit-details-marker {
    display: none;
  }

  .agb-mobile-toc[open] summary span {
    transform: rotate(45deg);
  }

  .agb-mobile-toc nav {
    max-height: 50vh;
    padding: 4px 20px 18px;
    overflow-y: auto;
  }

  .agb-mobile-toc a {
    padding: 9px 0;
    color: var(--agb-copy);
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
  }
}

@media (max-width: 600px) {
  .agb-shell {
    width: min(100% - 32px, 1240px);
  }

  .agb-hero {
    padding-top: 116px;
  }

  .agb-hero h1 {
    font-size: clamp(39px, 10.5vw, 52px);
  }

  .agb-hero__subtitle {
    max-width: calc(100% - 56px);
  }

  .agb-hero__meta {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .agb-section {
    padding: 24px 20px;
    border-radius: 16px;
  }

  .agb-section__heading {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .agb-section__body {
    padding-left: 0;
    font-size: 15px;
  }
}
