/* FLUXBOT — Terms of Use and Privacy Policy pages (public/terms.html, public/privacy.html).
   Self-contained: these pages don't load the app's style.css, so the brand look here can't break when the app
   changes. Palette from the FLUXBOT logo: electric blue on near-black, silver chrome titles, blue (not violet)
   glows. legal.js sets <html data-theme="dark|light"> from the app's saved theme and adds body.fx-off when
   effects are turned off. Every class starts with "lg-". */

/* ---------- tokens ---------- */
:root, [data-theme="dark"] {
  --lg-bg: #02050c;
  --lg-bg-2: #050b18;
  --lg-glow-1: rgba(30, 144, 255, 0.2);
  --lg-glow-2: rgba(79, 210, 255, 0.09);
  --lg-grid: rgba(79, 210, 255, 0.045);
  --lg-card: #060e1d;
  --lg-panel: rgba(10, 20, 40, 0.72);
  --lg-edge: linear-gradient(160deg, rgba(127, 220, 255, 0.55), rgba(30, 144, 255, 0.16) 28%, rgba(30, 144, 255, 0.07) 70%, rgba(10, 60, 255, 0.45));
  --lg-border: rgba(79, 210, 255, 0.12);
  --lg-border-strong: rgba(79, 210, 255, 0.24);
  --lg-text: #e6edf7;
  --lg-muted: #a3b3c9;
  --lg-dim: #7a8ba5;
  --lg-accent: #4fd2ff;
  --lg-link: #6cc4ff;
  --lg-link-hover: #a9ddff;
  --lg-focus: #7fdcff;
  --lg-hover: rgba(79, 210, 255, 0.08);
  --lg-active: rgba(30, 144, 255, 0.16);
  --lg-row: rgba(30, 144, 255, 0.06);
  --lg-head-bg: rgba(2, 5, 12, 0.8);
  --lg-chrome: linear-gradient(180deg, #ffffff 0%, #eef3f9 30%, #aab6c6 50%, #dfe7f1 68%, #f5f8fc 100%);
  --lg-blue-text: linear-gradient(180deg, #7fdcff 0%, #36a4ff 45%, #1e7bff 100%);
  --lg-h-solid: #eef3fa;
  --lg-kicker: #7fdcff;
  --lg-callout: linear-gradient(135deg, rgba(30, 144, 255, 0.15), rgba(79, 210, 255, 0.05) 55%, rgba(10, 60, 255, 0.14));
  --lg-callout-border: rgba(79, 210, 255, 0.3);
  --lg-warn-bg: rgba(251, 191, 36, 0.07);
  --lg-warn-border: rgba(251, 191, 36, 0.42);
  --lg-warn-title: #fcd34d;
  --lg-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.3), 0 0 60px -30px rgba(30, 144, 255, 0.5);
  --lg-title-glow: drop-shadow(0 2px 16px rgba(30, 144, 255, 0.35));
  color-scheme: dark;
}
[data-theme="light"] {
  --lg-bg: #eef3f9;
  --lg-bg-2: #e3ecf7;
  --lg-glow-1: rgba(30, 144, 255, 0.14);
  --lg-glow-2: rgba(79, 210, 255, 0.12);
  --lg-grid: rgba(10, 60, 140, 0.05);
  --lg-card: #ffffff;
  --lg-panel: rgba(255, 255, 255, 0.82);
  --lg-edge: linear-gradient(160deg, rgba(30, 144, 255, 0.55), rgba(10, 20, 40, 0.1) 30%, rgba(10, 20, 40, 0.08) 70%, rgba(10, 60, 255, 0.35));
  --lg-border: rgba(10, 30, 70, 0.1);
  --lg-border-strong: rgba(10, 30, 70, 0.2);
  --lg-text: #0a1428;
  --lg-muted: #41516b;
  --lg-dim: #5d6b82;
  --lg-accent: #0a6cff;
  --lg-link: #0a5bd3;
  --lg-link-hover: #0a3cb0;
  --lg-focus: #0a5bd3;
  --lg-hover: rgba(10, 108, 255, 0.07);
  --lg-active: rgba(10, 108, 255, 0.12);
  --lg-row: rgba(10, 60, 140, 0.04);
  --lg-head-bg: rgba(243, 247, 252, 0.86);
  --lg-chrome: linear-gradient(180deg, #24344f 0%, #0d1a33 45%, #3a4d6d 70%, #14223d 100%);
  --lg-blue-text: linear-gradient(180deg, #1e7bff 0%, #0a4fe0 100%);
  --lg-h-solid: #0d1a33;
  --lg-kicker: #0a5bd3;
  --lg-callout: linear-gradient(135deg, rgba(30, 144, 255, 0.1), rgba(79, 210, 255, 0.06) 55%, rgba(10, 60, 255, 0.08));
  --lg-callout-border: rgba(10, 108, 255, 0.28);
  --lg-warn-bg: rgba(217, 119, 6, 0.07);
  --lg-warn-border: rgba(180, 83, 9, 0.35);
  --lg-warn-title: #92400e;
  --lg-shadow: 0 18px 50px -24px rgba(10, 30, 80, 0.3), 0 0 0 1px rgba(10, 30, 70, 0.04);
  --lg-title-glow: none;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body, h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
::selection { background: rgba(30, 144, 255, 0.35); }

body.lg-body {
  min-height: 100vh;
  background-color: var(--lg-bg);
  color: var(--lg-text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Backdrop: blue glows and a faint tech grid, on a fixed layer (composited once, no repaint on scroll). */
body.lg-body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 560px at 50% -220px, var(--lg-glow-1), transparent 70%),
    radial-gradient(700px 480px at 105% 10%, var(--lg-glow-2), transparent 70%),
    linear-gradient(180deg, var(--lg-bg-2), var(--lg-bg) 70%);
}
body.lg-body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(var(--lg-grid) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, var(--lg-grid) 1px, transparent 1px) 0 0 / 44px 44px;
  -webkit-mask-image: radial-gradient(900px 520px at 50% 0, #000, transparent 75%);
  mask-image: radial-gradient(900px 520px at 50% 0, #000, transparent 75%);
}

/* ---------- skip link ---------- */
.lg-skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--lg-text); color: var(--lg-bg); font-weight: 600; text-decoration: none;
  transition: top .15s;
}
.lg-skip:focus { top: 12px; }

/* ---------- top bar ---------- */
.lg-top {
  position: sticky; top: 0; z-index: 20;
  background: var(--lg-head-bg);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
}
.lg-top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(79, 210, 255, 0.5) 25%, rgba(30, 144, 255, 0.85) 50%, rgba(79, 210, 255, 0.5) 75%, transparent);
}
.lg-top-in {
  max-width: 1120px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px 12px; flex-wrap: wrap;
}
.lg-brand {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px;
  text-decoration: none; color: var(--lg-text);
}
.lg-brand img {
  width: 34px; height: 34px; flex: none;
  filter: drop-shadow(0 0 10px rgba(30, 144, 255, 0.55));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.lg-brand:hover img, .lg-brand:focus-visible img { transform: perspective(240px) rotateY(-18deg) rotateX(6deg) scale(1.06); }

/* The chrome wordmark: "FLUX" silver, "BOT" electric blue (legal.js splits the name when it is FLUXBOT). */
.lg-wm {
  font-family: 'Orbitron', 'Exo 2', 'Inter', ui-sans-serif, sans-serif;
  font-weight: 800; font-size: 17px; line-height: 1; letter-spacing: .09em; text-transform: uppercase;
  overflow-wrap: anywhere;
  background: var(--lg-chrome); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lg-wm.lg-wm-split { background: none; }
.lg-wm-flux, .lg-wm-bot { -webkit-background-clip: text; background-clip: text; color: transparent; }
.lg-wm-flux { background-image: var(--lg-chrome); }
.lg-wm-bot { background-image: var(--lg-blue-text); }

.lg-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.lg-nav a {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 13px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--lg-muted); text-decoration: none;
  transition: background .15s, color .15s;
}
.lg-nav a:hover { background: var(--lg-hover); color: var(--lg-text); }
.lg-nav a[aria-current="page"] { color: var(--lg-text); background: var(--lg-active); box-shadow: inset 0 0 0 1px var(--lg-border-strong); }
.lg-nav a.lg-back {
  gap: .3em; /* flex drops the space before the workspace name */
  color: #fff; font-weight: 600;
  background: linear-gradient(180deg, #2a86ff 0%, #1a6fe8 45%, #0a3cff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 0 0 1px rgba(127, 220, 255, 0.35), 0 8px 24px -10px rgba(30, 144, 255, 0.9);
}
.lg-nav a.lg-back:hover { filter: brightness(1.1); }

/* ---------- layout ---------- */
.lg-layout {
  max-width: 1120px; margin: 0 auto; padding: 28px 16px 56px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px;
}
.lg-pagehead { position: relative; max-width: 760px; }
.lg-kicker {
  font-family: 'Orbitron', 'Exo 2', 'Inter', sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--lg-kicker); margin-bottom: 10px;
}
.lg-pagehead h1 {
  font-family: 'Orbitron', 'Exo 2', 'Inter', ui-sans-serif, sans-serif;
  font-size: clamp(24px, 6.6vw, 44px); line-height: 1.14; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--lg-h-solid);
  background: var(--lg-chrome); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: var(--lg-title-glow);
  padding-bottom: 4px; overflow-wrap: anywhere;
}
.lg-meta { margin-top: 10px; color: var(--lg-muted); font-size: 14px; }
.lg-meta strong { color: var(--lg-text); font-weight: 600; }
.lg-lead { margin-top: 14px; color: var(--lg-muted); font-size: 16.5px; }
.lg-tools { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.lg-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--lg-border-strong); background: var(--lg-panel); color: var(--lg-text);
  font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.lg-btn:hover { background: var(--lg-hover); border-color: var(--lg-accent); }

/* The floating 3D "F" beside the title (wide screens only; the <picture> doesn't load it on phones). */
.lg-mark { display: none; }
@media (min-width: 720px) {
  .lg-pagehead { padding-right: 170px; min-height: 150px; }
  .lg-mark { display: block; position: absolute; right: 0; top: -4px; width: 150px; pointer-events: none; }
  .lg-mark img {
    display: block; width: 150px; height: auto;
    filter: drop-shadow(0 18px 28px rgba(10, 60, 255, 0.45)) drop-shadow(0 0 18px rgba(79, 210, 255, 0.25));
    transform: perspective(700px) rotateY(-20deg) rotateX(8deg);
    animation: lg-float 8s ease-in-out infinite;
    will-change: transform;
  }
  [data-theme="light"] .lg-mark img { filter: drop-shadow(0 16px 22px rgba(10, 60, 255, 0.3)); }
}
@keyframes lg-float {
  0%, 100% { transform: perspective(700px) rotateY(-20deg) rotateX(8deg) translateY(0); }
  50% { transform: perspective(700px) rotateY(-6deg) rotateX(3deg) translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .lg-mark img { animation: none !important; }
  .lg-brand img { transition: none; }
}
body.fx-off .lg-mark img { animation: none !important; }

/* ---------- table of contents ---------- */
.lg-toc {
  background: var(--lg-panel); border: 1px solid var(--lg-border-strong); border-radius: 16px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: 14.5px; line-height: 1.45;
}
.lg-toc summary {
  cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; min-height: 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 16px;
  font-family: 'Exo 2', 'Inter', sans-serif; letter-spacing: .02em;
}
.lg-toc summary::-webkit-details-marker { display: none; }
.lg-toc summary::after {
  content: ""; width: 8px; height: 8px; margin-right: 4px;
  border-right: 2px solid var(--lg-accent); border-bottom: 2px solid var(--lg-accent);
  transform: rotate(45deg); transition: transform .15s;
}
.lg-toc details[open] summary::after { transform: rotate(-135deg); }
.lg-toc ol { list-style: none; margin: 0; padding: 0 10px 12px; counter-reset: toc; }
.lg-toc li { counter-increment: toc; }
.lg-toc a {
  display: flex; gap: 8px; padding: 7px 10px; border-radius: 8px;
  color: var(--lg-muted); text-decoration: none; transition: background .15s, color .15s;
}
.lg-toc a::before {
  content: counter(toc, decimal-leading-zero); flex: none; min-width: 1.9em;
  font-family: 'Orbitron', 'Inter', sans-serif; font-size: 11px; font-weight: 700; line-height: 1.9;
  color: var(--lg-dim); font-variant-numeric: tabular-nums;
}
.lg-toc a:hover { background: var(--lg-hover); color: var(--lg-text); }
.lg-toc a.lg-current { color: var(--lg-text); background: var(--lg-active); box-shadow: inset 2px 0 0 var(--lg-accent); }
.lg-toc a.lg-current::before { color: var(--lg-accent); }

/* ---------- the document card ---------- */
.lg-doc {
  min-width: 0; max-width: 760px;
  background: linear-gradient(var(--lg-card), var(--lg-card)) padding-box, var(--lg-edge) border-box;
  border: 1px solid transparent; border-radius: 20px;
  box-shadow: var(--lg-shadow);
  padding: 22px 18px 30px;
  overflow-wrap: break-word;
}
.lg-doc > section + section { margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--lg-border); }
.lg-doc h2 {
  font-family: 'Exo 2', 'Inter', ui-sans-serif, sans-serif;
  font-size: 23px; line-height: 1.3; font-weight: 700; letter-spacing: .005em; margin-bottom: 12px;
  display: flex; gap: 12px; align-items: baseline;
  color: var(--lg-h-solid);
}
/* Chrome section titles (one chrome band per line of text, so wrapped titles stay even). */
[data-theme="dark"] .lg-doc > section:not(.lg-keypoints) > h2 {
  background: var(--lg-chrome) 0 0 / 100% 1.3em repeat-y;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.lg-doc h2 .lg-num {
  flex: none; min-width: 34px; height: 28px; padding: 0 8px; border-radius: 8px;
  display: inline-grid; place-items: center; transform: translateY(-2px);
  font-family: 'Orbitron', 'Inter', sans-serif; font-size: 13px; font-weight: 800; letter-spacing: .04em;
  color: #fff; -webkit-text-fill-color: #fff;
  background: linear-gradient(180deg, #2a86ff, #0a3cff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 0 0 1px rgba(127, 220, 255, 0.35), 0 4px 16px -6px rgba(30, 144, 255, 0.9);
}
.lg-doc h3 {
  font-family: 'Exo 2', 'Inter', ui-sans-serif, sans-serif;
  font-size: 18px; line-height: 1.4; font-weight: 600; letter-spacing: .01em; margin: 24px 0 8px; color: var(--lg-text);
}
.lg-doc p, .lg-doc ul, .lg-doc ol, .lg-doc dl, .lg-doc .lg-table-wrap, .lg-doc .lg-box { margin: 0 0 14px; }
.lg-doc p:last-child, .lg-doc ul:last-child, .lg-doc ol:last-child { margin-bottom: 0; }
.lg-doc ul, .lg-doc ol { padding-left: 1.4em; }
.lg-doc li { margin: 0 0 7px; padding-left: 2px; }
.lg-doc li::marker { color: var(--lg-accent); }
.lg-doc ol.lg-alpha { list-style: lower-alpha; }
.lg-doc li > ul, .lg-doc li > ol, .lg-doc dd > ul { margin: 6px 0 8px; }
.lg-doc li > ul:last-child, .lg-doc li > ol:last-child { margin-bottom: 4px; }
.lg-doc strong { font-weight: 600; color: var(--lg-text); }
.lg-doc a { color: var(--lg-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.lg-doc a:hover { color: var(--lg-link-hover); text-decoration-thickness: 2px; }
.lg-doc code {
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: .86em;
  padding: 1px 6px; border-radius: 6px; background: var(--lg-active); overflow-wrap: anywhere;
}
.lg-doc dl dt { font-weight: 600; margin-top: 10px; }
.lg-doc dl dd { margin: 2px 0 0; }
.lg-muted { color: var(--lg-muted); }
.lg-small { font-size: 14px; }

/* key points box */
.lg-keypoints {
  position: relative;
  background: var(--lg-callout); border: 1px solid var(--lg-callout-border); border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: inset 0 1px 0 rgba(127, 220, 255, 0.18);
}
.lg-keypoints h2 { font-size: 20px; margin-bottom: 10px; }
.lg-keypoints h2 span {
  font-family: 'Orbitron', 'Exo 2', 'Inter', sans-serif; font-size: 15px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  background: var(--lg-blue-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.lg-keypoints ul { padding-left: 1.25em; }
.lg-keypoints li { margin-bottom: 8px; }
.lg-keypoints .lg-small { margin-top: 10px; }

/* callouts */
.lg-box { border-radius: 14px; padding: 14px 16px; border: 1px solid var(--lg-border-strong); background: var(--lg-row); }
.lg-box > :last-child { margin-bottom: 0; }
.lg-box-title { font-weight: 700; margin-bottom: 6px; }
.lg-warn { background: var(--lg-warn-bg); border-color: var(--lg-warn-border); }
.lg-warn .lg-box-title { color: var(--lg-warn-title); }
/* Conspicuous legal text (warranty disclaimer, liability limit, arbitration). */
.lg-conspicuous { font-weight: 600; }

/* tables: normal on wide screens, stacked "cards" on phones */
.lg-table-wrap { border: 1px solid var(--lg-border-strong); border-radius: 14px; overflow: hidden; }
.lg-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
.lg-table caption { text-align: left; padding: 12px 14px 0; font-weight: 600; font-family: 'Exo 2', 'Inter', sans-serif; letter-spacing: .01em; }
.lg-table th, .lg-table td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--lg-border); }
.lg-table thead th {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--lg-muted); background: var(--lg-row);
}
.lg-table tbody tr:last-child > * { border-bottom: 0; }
.lg-table tbody th { font-weight: 600; }
.lg-table td ul { margin: 0; padding-left: 1.1em; }
.lg-table td li { margin-bottom: 3px; }
@media (max-width: 719px) {
  .lg-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lg-table, .lg-table tbody, .lg-table tr, .lg-table th, .lg-table td { display: block; width: 100%; }
  .lg-table caption { display: block; padding-bottom: 6px; }
  .lg-table tr { padding: 10px 0; border-bottom: 1px solid var(--lg-border-strong); }
  .lg-table tbody tr:last-child { border-bottom: 0; }
  .lg-table th, .lg-table td { border: 0; padding: 4px 14px; }
  .lg-table tbody th { font-size: 15.5px; padding-top: 6px; }
  .lg-table td[data-label]::before {
    content: attr(data-label); display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--lg-muted); margin-top: 6px;
  }
}

/* ---------- footer ---------- */
.lg-foot { position: relative; }
.lg-foot::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--lg-border-strong) 20%, rgba(30, 144, 255, 0.5) 50%, var(--lg-border-strong) 80%, transparent);
}
.lg-foot-in {
  max-width: 1120px; margin: 0 auto; padding: 20px 16px 36px;
  display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; align-items: center;
  color: var(--lg-muted); font-size: 14px;
}
.lg-foot p { margin: 0; }
.lg-foot a { color: var(--lg-link); text-underline-offset: 3px; }
.lg-foot a:hover { color: var(--lg-link-hover); }
.lg-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* ---------- focus ---------- */
.lg-body a:focus-visible, .lg-body button:focus-visible, .lg-body summary:focus-visible, .lg-layout:focus-visible {
  outline: 2px solid var(--lg-focus); outline-offset: 2px; border-radius: 8px;
}
.lg-layout:focus { outline: none; }

/* ---------- phones: the top bar wraps to two rows, so let it scroll away ---------- */
@media (max-width: 639px) {
  html { scroll-padding-top: 12px; }
  .lg-top { position: relative; }
  .lg-nav a { padding: 0 10px; }
}

/* ---------- wider screens ---------- */
@media (min-width: 640px) {
  .lg-top-in { padding: 12px 24px; }
  .lg-layout { padding: 40px 24px 72px; gap: 24px; }
  .lg-doc { padding: 34px 40px 40px; }
  .lg-keypoints { padding: 22px 24px 20px; }
  .lg-foot-in { padding: 22px 24px 40px; }
}
@media (min-width: 1100px) {
  .lg-layout {
    grid-template-columns: 250px minmax(0, 760px);
    grid-template-areas: "toc head" "toc doc";
    justify-content: center; column-gap: 40px; row-gap: 26px;
  }
  .lg-pagehead { grid-area: head; }
  .lg-doc { grid-area: doc; }
  .lg-toc {
    grid-area: toc; align-self: start;
    position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow: auto;
    background: transparent; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none;
    scrollbar-width: thin;
  }
  .lg-toc summary {
    padding: 0 10px 10px; min-height: 0; font-family: 'Orbitron', 'Inter', sans-serif; font-size: 11.5px; font-weight: 700;
    letter-spacing: .2em; text-transform: uppercase; color: var(--lg-kicker); cursor: default; pointer-events: none;
  }
  .lg-toc summary::after { display: none; }
  .lg-toc ol { padding: 0; border-left: 1px solid var(--lg-border); }
  .lg-toc a { border-radius: 0 8px 8px 0; }
}

/* ---------- print: plain black on white, no chrome ---------- */
@media print {
  :root, [data-theme] { color-scheme: light; }
  @page { margin: 18mm 16mm; }
  html { scroll-behavior: auto; }
  body.lg-body { background: #fff !important; color: #000 !important; font-size: 11pt; line-height: 1.5; }
  body.lg-body::before, body.lg-body::after { display: none !important; }
  .lg-skip, .lg-top, .lg-toc, .lg-tools, .lg-mark, .lg-foot ul { display: none !important; }
  .lg-layout { display: block; max-width: none; padding: 0; }
  .lg-pagehead { padding: 0 !important; min-height: 0 !important; }
  .lg-pagehead h1, .lg-doc h2, .lg-keypoints h2 span, .lg-wm, .lg-wm-flux, .lg-wm-bot {
    background: none !important; color: #000 !important; -webkit-text-fill-color: #000 !important; filter: none !important; text-shadow: none !important;
  }
  .lg-pagehead h1 { font-size: 20pt; letter-spacing: .02em; }
  .lg-kicker, .lg-meta, .lg-lead, .lg-muted, .lg-meta strong, .lg-doc strong, .lg-doc h3 { color: #000 !important; }
  .lg-doc { background: #fff !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; max-width: none; color: #000; }
  .lg-doc h2 .lg-num { background: none !important; box-shadow: none !important; color: #000 !important; -webkit-text-fill-color: #000 !important; padding: 0; min-width: 0; height: auto; transform: none; }
  .lg-keypoints, .lg-box, .lg-table-wrap { background: #fff !important; border: 1px solid #000 !important; box-shadow: none !important; }
  .lg-warn .lg-box-title, .lg-doc a, .lg-doc dt, .lg-doc dd, .lg-foot a, .lg-table thead th, .lg-table td[data-label]::before { color: #000 !important; }
  .lg-table thead th { background: #fff !important; }
  .lg-doc li::marker { color: #000; }
  .lg-doc code { background: none !important; }
  .lg-doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; overflow-wrap: anywhere; }
  .lg-doc h2, .lg-doc h3 { break-after: avoid; page-break-after: avoid; }
  .lg-table tr, .lg-box, .lg-keypoints { break-inside: avoid; page-break-inside: avoid; }
  .lg-doc > section + section { border-top: 1px solid #999; }
  .lg-foot::before { background: #999 !important; }
  .lg-foot-in { color: #000; padding: 10px 0 0; }
}
