/* ════════════════════════════════════════════════════════════════
   КОДЕКС protocol — стиль юридических страниц (оферта, политика)
   Дизайн-токены унаследованы с лендинга (landing.html)
   ════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-solid:    #070604;
  --bg-2:        #0f0d0a;
  --bg-card:     #131109;
  --fg:          #f4ead8;
  --fg-dim:      #c8b696;
  --fg-muted:    #857768;
  --gold:        #d4aa52;
  --gold-light:  #edcf7e;
  --gold-dim:    #9a7830;
  --border:      #252018;
  --border-soft: #332d22;
  --maxw: 800px;
}

body.light {
  --bg-solid:    #f5f0e6;
  --bg-2:        #ede7d9;
  --bg-card:     #e8e1d2;
  --fg:          #16120c;
  --fg-dim:      #4a4236;
  --fg-muted:    #8a7d68;
  --gold:        #9a7418;
  --gold-light:  #b58c1e;
  --gold-dim:    #7a5c10;
  --border:      #d8ceba;
  --border-soft: #c8bca8;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-solid);
  color: var(--fg);
  font-family: 'Exo 2', sans-serif;
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
}

* { scrollbar-width: thin; scrollbar-color: var(--gold-dim) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 0; }
::-webkit-scrollbar-track { background: transparent; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); text-decoration: underline; }

/* ── NAV ── */
.codex-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--bg-solid) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { display: flex; align-items: center; gap: .55rem; color: var(--fg); }
.nav-logo:hover { text-decoration: none; }
.nav-logo img { height: 22px; width: auto; }
.nav-logo-text { font-family: 'Playfair Display SC', serif; font-size: .82rem; letter-spacing: .14em; }
.nav-logo-text em { font-style: normal; color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-cabinet {
  font-family: 'Exo 2', sans-serif; font-size: .76rem;
  letter-spacing: .08em; color: var(--fg-muted);
}
.nav-cabinet:hover { color: var(--fg); text-decoration: none; }
.theme-toggle {
  background: none; border: 1px solid var(--border-soft); color: var(--gold);
  width: 32px; height: 32px; border-radius: 0; cursor: pointer; font-size: 1rem;
  line-height: 1; transition: border-color .2s, color .2s;
}
.theme-toggle:hover { border-color: var(--gold-dim); color: var(--gold-light); }

/* ── DOCUMENT ── */
.doc {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 5vw, 2rem) 5rem;
}
.doc-label {
  font-family: 'Exo 2', sans-serif; font-size: .72rem;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold-dim);
  display: block; margin-bottom: 1rem;
}
.doc-title {
  font-family: 'Playfair Display SC', serif; font-weight: 500;
  font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1.15; color: var(--fg);
  margin-bottom: .75rem;
}
.doc-meta {
  font-family: 'Exo 2', sans-serif; font-size: .78rem;
  color: var(--fg-muted); margin-bottom: 2.5rem;
  padding-bottom: 1.5rem; border-bottom: 1px solid var(--border);
}
.doc h2 {
  font-family: 'Playfair Display SC', serif; font-weight: 500;
  font-size: clamp(1.4rem, 3.5vw, 1.85rem); color: var(--gold-light);
  margin: 2.6rem 0 1rem;
}
.doc h3 {
  font-weight: 600; font-size: 1.2rem; color: var(--fg);
  margin: 1.6rem 0 .6rem;
}
.doc p { font-size: 1.18rem; color: var(--fg-dim); margin: .7rem 0; }
.doc ul, .doc ol { margin: .7rem 0 .7rem 1.4rem; }
.doc li { font-size: 1.18rem; color: var(--fg-dim); margin: .4rem 0; }
.doc strong { color: var(--fg); font-weight: 600; }
.doc .num { color: var(--gold); font-family: 'Exo 2', sans-serif; font-size: .92em; }

/* requisites table */
.req {
  border: 1px solid var(--border); background: var(--bg-card);
  margin: 1.5rem 0; padding: 1.5rem clamp(1rem, 3vw, 2rem);
}
.req dl { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.5rem; }
.req dt { font-family: 'Exo 2', sans-serif; font-size: .82rem; color: var(--fg-muted); letter-spacing: .04em; }
.req dd { font-size: 1.1rem; color: var(--fg); }
@media (max-width: 540px) {
  .req dl { grid-template-columns: 1fr; gap: .15rem; }
  .req dt { margin-top: .6rem; }
}

/* ── FOOTER ── */
.doc-footer {
  border-top: 1px solid var(--border);
  padding: 2rem clamp(1.25rem, 5vw, 2rem);
  max-width: var(--maxw); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
}
.doc-footer a { font-family: 'Exo 2', sans-serif; font-size: .8rem; color: var(--fg-muted); }
.doc-footer a:hover { color: var(--gold); text-decoration: none; }
.doc-footer .copy { font-family: 'Exo 2', sans-serif; font-size: .74rem; color: var(--fg-muted); }
