/* Legal documents at their own address (templates/legal/_page.html), in the colors of the site.
   Inside a desktop window they use static/legal/legal.css instead. */

.lg-hero { padding-bottom: 84px; }
.lg-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; }

/* the five documents on the side, the open one is marked */
.lg-docs { position: sticky; top: calc(var(--header-h) + 28px); display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.lg-docs a {
  padding: 10px 14px;
  border-radius: 11px;
  color: var(--text);
  font: 500 15px/1.4 var(--font-head);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.lg-docs a:hover { background: var(--bg-alt); color: var(--ink); }
.lg-docs a[aria-current="page"] { background: var(--blue-soft); color: var(--blue); }

/* the text */
.lg-doc { max-width: 780px; color: var(--text); font-size: 16.5px; line-height: 1.8; }
.lg-doc > :first-child { margin-top: 0; }
.lg-doc p { margin: 0 0 14px; }
.lg-doc ul, .lg-doc ol { margin: 0 0 16px; padding-inline-start: 22px; }
.lg-doc li { margin: 6px 0; }
.lg-doc li::marker { color: var(--blue); }
.lg-doc strong { color: var(--ink); font-weight: 700; }
.lg-doc h2 {
  position: relative;
  margin: 44px 0 12px;
  padding-top: 16px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.35;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.lg-doc h2::before { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 34px; height: 4px; border-radius: 4px; background: var(--grad); }
.lg-doc h3 { margin: 26px 0 8px; font-size: 18px; font-weight: 600; }
.lg-doc a { text-underline-offset: 3px; }

/* "On this page" */
.lg-doc .lg-toc { margin: 22px 0 8px; padding: 22px 26px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-alt); }
.lg-doc .lg-toc h2 { margin: 0 0 10px; padding: 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.lg-doc .lg-toc h2::before { display: none; }
.lg-toc ol { margin: 0; padding-inline-start: 20px; columns: 2; column-gap: 32px; font-size: 15px; }
.lg-toc li { margin: 3px 0; break-inside: avoid; }
.lg-toc a { color: var(--text); text-decoration: none; }
.lg-toc a:hover { color: var(--blue); }

/* "In short" box */
.lg-doc .lg-summary { margin: 22px 0 8px; padding: 22px 26px; border: 1px solid var(--blue-line); border-radius: var(--r-md); background: var(--blue-soft); }
.lg-doc .lg-summary h2 { margin: 0 0 8px; padding: 0; font-size: 17px; }
.lg-doc .lg-summary h2::before { display: none; }
.lg-summary ul { margin: 0; }

/* warnings */
.lg-warn {
  padding: 14px 18px;
  border: 1px solid color-mix(in oklab, var(--warn) 45%, transparent);
  border-radius: 14px;
  background: color-mix(in oklab, var(--warn) 10%, transparent);
  color: var(--ink);
}

/* cookie table */
.lg-table { margin: 0 0 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.lg-table table { width: 100%; min-width: 580px; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
.lg-table th, .lg-table td { padding: 11px 14px; text-align: left; vertical-align: top; }
.lg-table th { background: var(--bg-alt); color: var(--ink); font: 600 14px/1.4 var(--font-head); }
.lg-table td { border-top: 1px solid var(--line); }
.lg-table code { color: var(--ink); font-family: var(--mono); font-size: 13px; white-space: nowrap; }

@media (max-width: 991px) {
  .lg-layout { grid-template-columns: 1fr; gap: 26px; }
  .lg-docs {
    position: static;
    display: flex;
    gap: 6px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 0 var(--gutter) 4px;
    overflow-x: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    scrollbar-width: none;
  }
  .lg-docs a { flex: none; padding: 7px 15px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14.5px; }
  .lg-docs a[aria-current="page"] { border-color: transparent; background: var(--grad); color: #fff; }
}
@media (max-width: 575px) {
  .lg-doc { font-size: 16px; }
  .lg-toc ol { columns: 1; }
  .lg-doc .lg-toc, .lg-doc .lg-summary { padding: 18px 20px; }
}
@media print {
  .lg-docs, .lg-toc { display: none; }
  .lg-layout { display: block; }
}
