/* Legal pages (#5): /terms, /privacy, /acceptable-use, /api-terms. Server-rendered by web/legal.py, no JS.
   The app's tokens and brand (app.css); a quiet reading column with a sticky contents list on wide screens. */

.lg-body { background: var(--canvas); }
.lg-top { position: sticky; top: 0; z-index: 10; background: rgb(255 255 255 / .9); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--sep-2); }
.lg-top-in { max-width: calc(1040px + 2 * var(--inset)); margin: 0 auto; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 max(var(--inset), env(safe-area-inset-right)) 0 max(var(--inset), env(safe-area-inset-left)); }

.lg-lang { display: flex; padding: 3px; border-radius: 999px; background: var(--cool-2); }
.lg-lang a { min-width: 44px; height: 34px; display: grid; place-items: center; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--label-3); }
.lg-lang a:hover { text-decoration: none; color: var(--label); }
.lg-lang a[aria-current] { background: var(--bg); color: var(--label); box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 2px 8px rgb(0 0 0 / .06); }

.lg { max-width: calc(1040px + 2 * var(--inset)); margin: 0 auto; padding: 28px max(var(--inset), env(safe-area-inset-right)) calc(72px + env(safe-area-inset-bottom)) max(var(--inset), env(safe-area-inset-left)); }
.lg:focus { outline: none; }

.lg-tabs { display: flex; gap: 2px; width: fit-content; max-width: 100%; padding: 4px; border-radius: 999px; background: var(--cool); overflow-x: auto; scrollbar-width: none; }
.lg-tabs::-webkit-scrollbar { display: none; }
.lg-tabs a { flex: none; padding: 9px 16px; border-radius: 999px; font-size: var(--fs-s); font-weight: 550; color: var(--label-2); white-space: nowrap; transition: color .2s, background-color .2s; }
.lg-tabs a:hover { text-decoration: none; color: var(--label); }
.lg-tabs a[aria-current="page"] { background: var(--ink-btn); color: #fff; box-shadow: 0 2px 0 var(--ink-btn-edge); }

.lg h1 { font: 700 var(--fs-l)/1.02 var(--display); letter-spacing: -.02em; margin: 40px 0 10px; color: var(--label); }
.lg-upd { color: var(--label-3); font-size: 13px; }

.lg-short { margin: 28px 0 8px; max-width: 760px; padding: 22px 26px; border-radius: var(--r-card); background: var(--cool); }
.lg-short h2 { font-size: 13px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--label-2); margin-bottom: 10px; }
.lg-short ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.lg-short li { position: relative; padding-left: 24px; font-size: 16px; line-height: 1.5; color: var(--label); }
.lg-short li::before { content: ""; position: absolute; left: 6px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-btn); }

.lg-grid { display: grid; grid-template-columns: 220px minmax(0, 680px); gap: 56px; margin-top: 44px; align-items: start; }
.lg-toc { position: sticky; top: 92px; }
.lg-toc h2 { font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--label-3); margin-bottom: 10px; }
.lg-toc ol { list-style: none; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--sep-2); }
.lg-toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: 13.5px; line-height: 1.35; color: var(--label-2); }
.lg-toc a:hover { text-decoration: none; color: var(--label); border-left-color: var(--sep); }

.lg-doc section { scroll-margin-top: 88px; padding: 0 0 26px; }
.lg-doc section + section { padding-top: 26px; border-top: 1px solid var(--sep-2); }
.lg-doc h2 { font: 600 19px/1.3 var(--font); letter-spacing: -.01em; color: var(--label); margin-bottom: 10px; }
.lg-doc p, .lg-doc li { font-size: 16px; line-height: 1.62; color: var(--label-2); }
.lg-doc b { color: var(--label); font-weight: 600; }
.lg-doc p + p, .lg-doc p + ul, .lg-doc ul + p, .lg-doc dl + p, .lg-doc p + dl { margin-top: 12px; }
.lg-doc ul { padding-left: 0; list-style: none; display: grid; gap: 8px; }
.lg-doc li { position: relative; padding-left: 20px; }
.lg-doc li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--label-3); }
.lg-doc a, .lg-foot a { text-decoration: underline; text-decoration-color: rgb(7 90 57 / .35); text-underline-offset: 3px; }
.lg-doc a:hover, .lg-foot a:hover { text-decoration-color: currentColor; }

.lg-prov { display: grid; gap: 0; border-radius: 18px; background: var(--bg); box-shadow: var(--shadow-card); overflow: hidden; }
.lg-prov-row { display: grid; grid-template-columns: 150px 1fr 1fr 130px; gap: 16px; padding: 14px 18px; align-items: baseline; }
.lg-prov-row + .lg-prov-row { border-top: 1px solid var(--sep-2); }
.lg-prov dt { font-weight: 600; font-size: 15px; color: var(--label); }
.lg-prov dd { font-size: 14px; line-height: 1.5; color: var(--label-2); }
.lg-prov .lg-k { display: none; }

.lg-foot { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--sep-2); display: grid; gap: 10px; max-width: 760px; font-size: 14px; color: var(--label-2); line-height: 1.55; }
.lg-nla { padding: 14px 18px; border-radius: var(--r-in); background: var(--cool); color: var(--label); }
.lg-back { font-weight: 600; }

@media (max-width: 900px) {
  .lg-grid { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 32px; }
  .lg-toc { display: none; }
  .lg-prov-row { grid-template-columns: 1fr; gap: 4px; }
  .lg-prov .lg-k { display: block; font-size: 12px; font-weight: 600; color: var(--label-3); }
  .lg-prov dt { margin-bottom: 2px; }
  .lg-prov dd + dd { margin-top: 4px; }
}
@media (max-width: 640px) {
  :root { --inset: 20px; }
  .lg-top-in { height: 56px; }
  .lg-top .brand-word { font-size: 23px; }
  .lg-top .brand-mark { width: 30px; height: 30px; font-size: 19px; }
  .lg { padding-top: 18px; }
  .lg-tabs { flex-wrap: wrap; gap: 6px; padding: 0; background: none; border-radius: 0; overflow: visible; }
  .lg-tabs a { background: var(--cool); padding: 8px 14px; }
  .lg h1 { margin-top: 26px; }
  .lg-short { padding: 18px 20px; border-radius: 22px; margin-top: 22px; }
  .lg-short li, .lg-doc p, .lg-doc li { font-size: 16px; }
}
@media print {
  .lg-top, .lg-tabs, .lg-toc, .lg-back { display: none; }
  .lg-grid { display: block; }
}
