/* Legal document — the policies in the homepage's language.
 *
 * The yellow title panel is the hero's; the cream sheet with the plum outline
 * and hard shadow is the map's cards; the section list's pills are the map's
 * region tabs. Long reading text stays calm: Aller at a comfortable measure,
 * plum headings, amber number badges.
 */

.sgl {
  background: var(--sg-page);
  padding: var(--page-gutter) 0 clamp(40px, 6vw, 72px);
  color: var(--plum);
}
.sgl.has-sec-bg { background-color: var(--sg-page) !important; }

/* the title panel --------------------------------------------------------- */

.sgl__head {
  margin-inline: var(--page-gutter);
  border-radius: var(--panel-r);
  background: var(--sec-bg, var(--yel));
  padding: clamp(40px, 6vw, 76px) 20px clamp(36px, 5vw, 60px);
  text-align: center;
}

.sgl__eyebrow {
  display: inline-flex;
  align-items: center;
  height: 28px;
  margin: 0 0 18px;
  padding: 0 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  box-shadow: 3px 3px 0 var(--line);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--plum);
}

.sgl__title {
  margin: 0 auto;
  max-width: 16ch;
  font-family: var(--f-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: clamp(40px, 7vw, 88px);
  line-height: .92;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: var(--plum);
  text-wrap: balance;
}

.sgl__date {
  margin: 18px 0 0;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--plum) 80%, transparent);
}

/* the sheet and the section list ------------------------------------------ */

.sgl__grid {
  margin: clamp(24px, 3.4vw, 44px) auto 0;
  padding-inline: calc(var(--page-gutter) + 4px);
  max-width: 1180px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

/* narrow: the fold-out list lines up with the sheet below it */
.sgl__toc { max-width: 800px; width: 100%; justify-self: center; }

@media (min-width: 1000px) {
  .sgl__grid.has-toc { grid-template-columns: 280px minmax(0, 1fr); gap: 40px; align-items: start; }
  .sgl__toc { position: sticky; top: 96px; max-width: none; }
}

.sgl__doc {
  min-width: 0;
  max-width: 800px;
  width: 100%;
  justify-self: center;
  background: var(--cream);
  border: 2px solid var(--line);
  border-radius: var(--panel-r);
  box-shadow: var(--hard);
  padding: clamp(26px, 4.4vw, 56px) clamp(20px, 4.6vw, 60px);
}

.sgl__body {
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.7;
  color: color-mix(in srgb, var(--plum) 88%, #000);
  overflow-wrap: anywhere;
}
.sgl__body > :first-child { margin-top: 0; }
.sgl__body > :last-child { margin-bottom: 0; }
.sgl__body p, .sgl__body ul, .sgl__body ol { margin: 0 0 1em; }
.sgl__body ul, .sgl__body ol { padding-left: 1.3em; }
.sgl__body li { margin: .3em 0; }
.sgl__body li::marker { color: var(--plum); font-weight: 700; }
.sgl__body strong, .sgl__body b { color: var(--plum); }

.sgl__body h2 {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 2.2em 0 .7em;
  padding-top: 1.4em;
  border-top: 2px dashed color-mix(in srgb, var(--plum) 22%, transparent);
  font-family: var(--f-body);
  font-weight: 700;
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.25;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--plum);
  scroll-margin-top: 96px;
}
.sgl__body > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.sgl__body h3 {
  margin: 1.6em 0 .5em;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--plum);
  scroll-margin-top: 96px;
}

.sgl__n {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  margin-top: -2px;
  padding: 0 6px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--amber);
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1;
}

.sgl__body a {
  color: var(--plum);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
  transition: background-color .15s ease;
}
.sgl__body a:hover { background: color-mix(in srgb, var(--amber) 35%, transparent); }

.sgl__body blockquote {
  margin: 1.4em 0;
  padding: 14px 18px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--yel) 35%, var(--cream));
}

/* the section list: a sticky card on wide screens, a fold-out on narrow ones */

.sgl__tocbox {
  background: var(--cream);
  border: 2px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--hard);
  overflow: hidden;
}

.sgl__toct {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--plum);
  cursor: pointer;
  list-style: none;
}
.sgl__toct::-webkit-details-marker { display: none; }
.sgl__toct::after {
  content: "";
  width: 9px; height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  rotate: 45deg;
  translate: 0 -3px;
  transition: rotate .2s ease, translate .2s ease;
}
.sgl__tocbox[open] .sgl__toct::after { rotate: 225deg; translate: 0 2px; }

.sgl__tocl {
  margin: 0;
  padding: 0 10px 12px;
  list-style: none;
  max-height: min(64vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.sgl__tocl a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 10px;
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.3;
  color: var(--plum);
  text-decoration: none;
  transition: background-color .15s ease;
}
.sgl__tocl a:hover { background: color-mix(in srgb, var(--yel) 45%, transparent); }
.sgl__tocl a.is-on { background: var(--amber); font-weight: 700; }

.sgl__tn {
  flex: none;
  min-width: 22px;
  font-family: var(--f-mono);
  font-size: 12px;
  line-height: 1.5;
  opacity: .75;
}

@media (min-width: 1000px) {
  /* always open beside the text; the summary becomes a plain label */
  .sgl__toct { cursor: default; pointer-events: none; }
  .sgl__toct::after { display: none; }
}

/* the other policies ------------------------------------------------------ */

.sgl__more {
  margin: clamp(32px, 4.4vw, 56px) auto 0;
  padding-inline: var(--page-gutter);
  text-align: center;
}
.sgl__morel {
  margin: 0 0 14px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--plum);
}
.sgl__more ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sgl__pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  box-shadow: 3px 3px 0 var(--line);
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--plum);
  text-decoration: none;
  transition: translate .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.sgl__pill:hover { background: var(--amber); translate: 2px 2px; box-shadow: 1px 1px 0 var(--line); }
.sgl__pill:focus-visible, .sgl__tocl a:focus-visible, .sgl__toct:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; }

@media (max-width: 767px) {
  .sgl__body { font-size: 16px; }
  .sgl__body h2 { gap: 10px; }
  .sgl__n { min-width: 26px; height: 26px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .sgl__pill, .sgl__toct::after { transition: none; }
}
