/* Legal pages: policies overview, Terms of Service, Privacy Policy. Layout only; the legal text is unchanged.
   Loads after chromatic.css and brand.css. */
.lg-page { --lg-gutter: max(var(--pi-page-gutter), calc((100vw - var(--pi-page-max)) / 2)); background: #fafaf8; }
.lg-page main, .lg-page .app-shell > main { background: transparent; }

/* Hero */
.lg-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 40px var(--lg-gutter) 44px; border-bottom: 1px solid #ececea; background: #fff;
}
.lg-hero::before {
  content: ""; position: absolute; z-index: -1; right: -120px; top: -200px; width: min(560px, 100vw); height: 460px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(216,255,62,0.28), rgba(123,224,166,0.10) 60%, transparent);
}
.lg-hero header { display: grid; gap: 12px; max-width: 760px; margin-top: 36px; }
.lg-hero .eyebrow { color: #55554f; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; }
.lg-hero h1 { margin: 0; color: #0b0b0b; font-size: 52px; font-weight: 400; line-height: 1.08; letter-spacing: -0.02em; }
.lg-meta { display: inline-flex; justify-self: start; align-items: center; gap: 8px; margin: 4px 0 0; padding: 6px 12px; border: 1px solid #e3e3df; border-radius: 999px; background: #fff; color: #55554f; font-size: 13px; }
.lg-meta::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: #2d8a4a; }
.lg-draft {
  max-width: 680px; margin: 4px 0 0; padding: 12px 16px 12px 42px; position: relative;
  border: 1px solid #f3dcb8; border-radius: 14px; background: #fff8ee; color: #6b4a12; font-size: 14px; line-height: 21px;
}
.lg-draft::before {
  content: "!"; position: absolute; left: 14px; top: 12px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: #e5a23a; color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
}

/* Document tabs */
.lg-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid #e3e3df; border-radius: 999px; background: #f6f6f3; }
.lg-tabs a { padding: 8px 16px; border-radius: 999px; color: #55554f; font-size: 14px; font-weight: 500; text-decoration: none; transition: background 0.2s, color 0.2s; }
.lg-tabs a:hover { color: #0b0b0b; background: #fff; }
.lg-tabs a[aria-current="page"] { background: #0b0b0b; color: #fff; }

/* Body: contents rail + document */
.lg-shell {
  display: grid; grid-template-columns: 240px minmax(0, 780px); justify-content: start; gap: 56px;
  padding: 48px var(--lg-gutter) 96px;
}
.lg-shell--single { grid-template-columns: minmax(0, 1fr); }
.lg-page .policy-document { width: auto; margin: 0; padding: 0; overflow-wrap: anywhere; }

.lg-toc { position: sticky; top: 96px; align-self: start; display: grid; gap: 10px; max-height: calc(100vh - 120px); overflow: auto; }
.lg-toc > span { color: #6d6d68; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; }
.lg-toc ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.lg-toc a {
  display: block; padding: 7px 12px; border-radius: 10px; color: #55554f; font-size: 13.5px; line-height: 18px; text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.lg-toc a:hover { background: #f1f1ee; color: #0b0b0b; }
.lg-toc a.active { background: #0b0b0b; color: #fff; font-weight: 600; }
.lg-toc details { display: none; }

.lg-page .policy-document section { padding: 36px 0; border-bottom: 1px solid #e6e6e2; scroll-margin-top: 90px; }
.lg-page .policy-document section:first-of-type { padding-top: 0; }
.lg-page .policy-document section h2 { margin: 0 0 16px; color: #0b0b0b; font-size: 26px; font-weight: 500; line-height: 32px; letter-spacing: -0.01em; }
.lg-page .policy-document section p { margin: 0 0 14px; color: #3a3a37; font-size: 15.5px; line-height: 26px; }
.lg-page .policy-document section p:last-child { margin-bottom: 0; }
.lg-page .policy-document section strong { color: #0b0b0b; }
.lg-page .policy-document section a { color: #0b0b0b; text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.lg-page .policy-document ul, .lg-page .policy-document ol { margin: 0 0 14px; padding-left: 20px; color: #3a3a37; font-size: 15.5px; line-height: 26px; }
.lg-page .policy-table-wrap { margin-top: 22px; border: 1px solid #e3e3df; border-radius: 16px; background: #fff; }
.lg-page .policy-table th { background: #f6f6f3; color: #0b0b0b; font-size: 12.5px; }
.lg-page .policy-table th, .lg-page .policy-table td { border-color: #ececea; }
.lg-page .policy-table td { color: #3a3a37; }
.lg-page .policy-document > .button { margin-top: 36px; border: 1px solid #d9d9d5; border-radius: 999px; background: #fff; }

/* Overview page: sections as cards */
.lg-shell--single .policy-document { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.lg-shell--single .policy-document section,
.lg-shell--single .policy-document section:first-of-type {
  display: flex; flex-direction: column; gap: 0; padding: 26px; border: 1px solid #e3e3df; border-radius: 22px; background: #fff;
}
.lg-shell--single .policy-document section h2 { font-size: 22px; line-height: 28px; }
.lg-shell--single .policy-document section p { font-size: 14.5px; line-height: 23px; }
.lg-shell--single .policy-document section p:has(> a:only-child) { margin-top: auto; padding-top: 18px; }
.lg-shell--single .policy-document section p > a:only-child {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px; background: #0b0b0b; color: #fff;
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.lg-shell--single .policy-document section p > a:only-child::after { content: "→"; }
.lg-shell--single .policy-document #acceptable-use {
  grid-column: 1 / -1; position: relative; overflow: hidden; isolation: isolate; border-color: #0b0b0b; background: #0b0b0b;
}
.lg-shell--single .policy-document #acceptable-use::before {
  content: ""; position: absolute; z-index: -1; right: -140px; top: -180px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(216,255,62,0.22), transparent);
}
.lg-shell--single .policy-document #acceptable-use h2 { color: #fff; }
.lg-shell--single .policy-document #acceptable-use p { max-width: 820px; color: #d9d9d5; }
.lg-shell--single .policy-document > .button { grid-column: 1 / -1; justify-self: start; margin-top: 8px; }

@media (max-width: 1000px) {
  .lg-shell { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
  .lg-shell--single { padding-top: 32px; }
  .lg-shell--single .policy-document { grid-template-columns: minmax(0, 1fr); }
  /* The contents rail becomes a collapsible "On this page" bar under the hero. */
  .lg-toc { position: relative; top: 0; max-height: none; overflow: visible; margin: 0 0 28px; }
  .lg-toc > span, .lg-toc > ol { display: none; }
  .lg-toc details { display: block; border: 1px solid #e3e3df; border-radius: 16px; background: #fff; margin-top: 20px; }
  .lg-toc summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; color: #0b0b0b; font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
  .lg-toc summary::-webkit-details-marker { display: none; }
  .lg-toc summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid #0b0b0b; border-bottom: 2px solid #0b0b0b; transform: rotate(45deg) translateY(-3px); transition: transform 0.2s; }
  .lg-toc details[open] summary::after { transform: rotate(225deg) translate(-2px, -1px); }
  .lg-toc details ol { display: grid; gap: 2px; padding: 0 8px 10px; margin: 0; list-style: none; }
}
@media (max-width: 620px) {
  .lg-hero { padding-top: 24px; padding-bottom: 32px; }
  .lg-hero header { margin-top: 26px; }
  .lg-hero h1 { font-size: 36px; }
  .lg-tabs { display: flex; width: 100%; }
  .lg-tabs a { flex: 1 1 0; padding: 8px 10px; font-size: 14px; text-align: center; }
  .lg-long { display: none; }
  .lg-meta { border-radius: 12px; line-height: 19px; }
  .lg-page .policy-document section h2 { font-size: 22px; line-height: 28px; }
  .lg-page .policy-document section p { font-size: 15px; line-height: 25px; }
  .lg-shell--single .policy-document section { padding: 22px 18px; }
}
@media print {
  .lg-tabs, .lg-toc, .lg-hero::before { display: none; }
  .lg-shell { display: block; padding: 0; }
}
