/* Shared stylesheet for the Markelo legal pages.
   Design tokens mirror index.html so the documents read as part of the site.
   Fonts are the same self-hosted files the landing page already ships.
   No JavaScript anywhere — the apex CSP forbids it, deliberately. */

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/golostext-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/golostext-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}

:root {
  color-scheme: light;
  --paper: #f7f2e7;
  --card: #fffdf7;
  --ink: #241f14;
  --ink-soft: #5a523f;
  --green: #0b3d2e;
  --green-line: rgba(11, 61, 46, 0.22);
  --amber: #f0a028;
  --line: rgba(36, 31, 20, 0.16);
  --serif: "Vollkorn", Georgia, "Times New Roman", serif;
  --sans: "Golos Text", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.72 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 820px; margin: 0 auto; padding: 0 24px; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-head { border-bottom: 1px solid var(--line); background: var(--card); }
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 66px; flex-wrap: wrap; }

.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font: 800 1.35rem/1 var(--serif); color: var(--green); letter-spacing: -0.01em;
  margin-right: auto;
}
.brand svg { display: block; }

.site-head nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-head nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; }
.site-head nav a:hover, .site-head nav a[aria-current="page"] { color: var(--green); text-decoration: underline; }

/* ── Document body ──────────────────────────────────────────────────────── */

main { padding: 48px 0 72px; }

h1 {
  font: 800 clamp(1.9rem, 1.4rem + 2vw, 2.6rem)/1.15 var(--serif);
  color: var(--green);
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}

.meta {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0 0 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.meta strong { color: var(--ink); }

h2 {
  font: 700 1.45rem/1.3 var(--serif);
  color: var(--green);
  margin: 44px 0 12px;
  scroll-margin-top: 20px;
}
h3 {
  font: 700 1.08rem/1.4 var(--sans);
  color: var(--ink);
  margin: 28px 0 8px;
}

p, li { max-width: 68ch; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 8px; }

a { color: var(--green); text-underline-offset: 2px; }
a:hover { color: var(--amber); }

strong { font-weight: 700; }
abbr { text-decoration: none; border-bottom: 1px dotted var(--ink-soft); }

/* Definition-style identity block and other framed asides */
.box {
  background: var(--card);
  border: 1px solid var(--green-line);
  border-radius: 12px;
  padding: 20px 22px;
  margin: 0 0 28px;
}
.box p:last-child, .box ul:last-child, .box dl:last-child { margin-bottom: 0; }

.callout {
  background: var(--card);
  border-left: 4px solid var(--amber);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 0 0 24px;
}
.callout p:last-child { margin-bottom: 0; }

dl.ident { margin: 0; display: grid; grid-template-columns: minmax(140px, auto) 1fr; gap: 6px 18px; }
dl.ident dt { color: var(--ink-soft); }
dl.ident dd { margin: 0; }
@media (max-width: 520px) {
  dl.ident { grid-template-columns: 1fr; gap: 2px; }
  dl.ident dd { margin-bottom: 10px; }
}

/* Tables scroll inside themselves; the page never scrolls sideways */
.table-scroll { overflow-x: auto; margin: 0 0 24px; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
th { font-weight: 700; color: var(--green); background: var(--card); }
td p:last-child { margin-bottom: 0; }

/* Table of contents */
nav.toc { margin: 0 0 36px; }
nav.toc ol { columns: 2; column-gap: 32px; padding-left: 20px; }
nav.toc li { margin-bottom: 6px; break-inside: avoid; }
@media (max-width: 620px) { nav.toc ol { columns: 1; } }

/* ── Footer ─────────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 28px 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
footer a { color: var(--ink-soft); }
footer a:hover { color: var(--green); }

@media print {
  .site-head nav, .skip, footer { display: none; }
  body { background: #fff; font-size: 11pt; }
  a { color: inherit; }
}
