/* Legal pages (privacy.html, terms.html) — same visual system as the landing */
:root {
  --bg: #EFEDE4;
  --paper: #F8F7F2;
  --white: #FFFFFF;
  --ink: #1E3631;
  --ink-2: #2C4A43;
  --muted: #5B6B66;
  --faint: #8A9792;
  --line: #E1DED2;
  --lime: #E3EDAE;
  --sky: #CADDE4;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { background: var(--bg); color: var(--ink); font-family: "Onest", system-ui, sans-serif; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 3px solid #9BC24A; outline-offset: 3px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Top bar */
.lg-top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
.lg-top-in { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lg-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.03em; text-decoration: none; }
.lg-logo svg { width: 30px; height: 30px; }
.lg-actions { display: flex; gap: 8px; }
.lg-pill { height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font: 600 14px "Onest", sans-serif; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; cursor: pointer; transition: background .15s; }
.lg-pill:hover { background: var(--white); }

/* Layout */
.lg-wrap { max-width: 1120px; margin: 0 auto; padding: 16px 24px 80px; }
.lg-hero { background: var(--lime); border-radius: 36px; padding: 44px 48px; margin-bottom: 24px; position: relative; overflow: hidden; }
.lg-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; background: var(--white); border: 1.5px solid var(--ink); border-radius: 999px; padding: 5px 14px; }
.lg-eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: #9BC24A; }
.lg-hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.02; margin: 18px 0 14px; max-width: 760px; }
.lg-date { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.lg-date svg { width: 16px; height: 16px; }
.lg-hero-mark { position: absolute; right: 40px; bottom: -30px; width: 170px; opacity: .9; }

.lg-grid { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.lg-toc { position: sticky; top: 96px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 26px; padding: 20px; }
.lg-toc b { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.lg-toc ol { list-style: none; display: grid; gap: 2px; }
.lg-toc a { display: block; padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.35; color: var(--muted); text-decoration: none; transition: background .15s, color .15s; }
.lg-toc a:hover { background: var(--white); color: var(--ink); }
.lg-toc a.on { background: var(--ink); color: var(--lime); font-weight: 600; }

/* Document body (existing markup inside .container) */
.container { background: var(--white); border-radius: 32px; padding: 44px 48px; }
.container > p:first-of-type { font-size: 17px; color: var(--ink-2); }
.container h2 { font-size: 23px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; margin: 38px 0 12px; padding-top: 4px; }
.container h2:first-of-type { margin-top: 30px; }
.container p { color: var(--muted); font-size: 15.5px; margin-bottom: 14px; }
.container p b, .container li b { color: var(--ink); }
.container ul { list-style: none; display: grid; gap: 10px; margin: 6px 0 18px; }
.container li { position: relative; padding-left: 32px; color: var(--muted); font-size: 15.5px; }
.container li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E3631' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/13px no-repeat;
}
.container code { font-size: 13px; background: var(--bg); border-radius: 6px; padding: 2px 6px; }
.container a { color: var(--ink); text-decoration-color: #B5D25C; text-underline-offset: 3px; }

.lg-foot { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-top: 40px; padding-top: 24px; border-top: 1.5px solid var(--line); }
.lg-foot .lg-pill { border-color: var(--line); }
.lg-foot .lg-pill:hover { border-color: var(--ink); }
.lg-foot .lg-pill-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.lg-foot .lg-pill-dark:hover { background: var(--ink-2); }

@media (max-width: 900px) {
  .lg-grid { grid-template-columns: 1fr; }
  .lg-toc { position: static; }
  .lg-hero-mark { display: none; }
}
@media (max-width: 600px) {
  .lg-top-in, .lg-wrap { padding-left: 16px; padding-right: 16px; }
  .lg-hero { padding: 30px 24px; border-radius: 28px; }
  .container { padding: 28px 22px; border-radius: 26px; }
  .lg-pill { padding: 0 12px; }
  .lg-pill .lg-hide-sm { display: none; }
}

/* UA/EN switch (static/js/i18n.js), same as .lang-switch in landing/v2 */
.lang-switch { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none; transition: background .15s; }
.lang-switch:hover { background: var(--white); }
.lang-switch svg { width: 16px; height: 16px; }
