/* GRAM Hub legal pages (terms / privacy, en / ru / uk). Light and dark follow the reader's system setting. */
:root {
  color-scheme: light dark;
  --bg: #ebf3fe; --bg-end: #ffffff; --surface: #ffffff; --sub: #f5f9fd; --line: rgb(219 234 254 / .8);
  --text: #0f172a; --body: #334155; --muted: #64748b; --link: #0277bd; --brand: #0098ea; --accent: #e1f1fd;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1621; --bg-end: #0e1621; --surface: #17212b; --sub: #1e2a37; --line: #2a3a4c;
    --text: #e8eef5; --body: #c4cfdb; --muted: #9aa9ba; --link: #5cbff5; --brand: #0098ea; --accent: #16384f;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); background: linear-gradient(var(--bg), var(--bg-end) 420px) no-repeat var(--bg-end);
  font: 16px/1.65 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--link); text-underline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 8px; padding: 8px 12px; border-radius: 12px; background: var(--surface); }
.skip:focus { left: 8px; z-index: 10; }

.top, .crumbs, main, .foot { max-width: 760px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; }
.brand { color: var(--text); font-weight: 800; font-size: 19px; letter-spacing: -.01em; text-decoration: none; }
.brand small { display: block; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.langs { display: flex; gap: 4px; }
.langs a { padding: 6px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: none; background: var(--surface); border: 1px solid var(--line); }
.langs a[aria-current="page"] { background: var(--brand); color: #fff; border-color: var(--brand); }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 18px auto 0; padding: 0; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; }

main { padding-top: 8px; padding-bottom: 32px; }
h1 { font-size: clamp(26px, 6vw, 32px); line-height: 1.2; margin: 12px 0 4px; letter-spacing: -.02em; }
h2 { font-size: 19px; line-height: 1.3; margin: 34px 0 8px; scroll-margin-top: 16px; }
h3 { font-size: 16px; margin: 20px 0 6px; }
p, li, td { color: var(--body); }
li { margin: 4px 0; }
.meta { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.card, .summary, .toc { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 18px 22px; box-shadow: 0 8px 30px rgb(0 136 204 / .06); }
.summary { background: var(--accent); }
.intro { margin-top: 14px; }
.summary h2, .toc h2 { margin-top: 0; font-size: 16px; }
.summary ul { margin: 0; padding-left: 20px; }
.toc { margin-top: 14px; }
.toc ol { margin: 0; padding-left: 22px; columns: 2 240px; column-gap: 24px; }
.toc li { break-inside: avoid; }

table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--surface); border-radius: 16px; overflow: hidden; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--sub); color: var(--text); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }

.foot { padding-top: 16px; padding-bottom: 48px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.foot nav { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 6px; }
.foot a[aria-current="page"] { color: var(--text); font-weight: 700; text-decoration: none; }
