/* Base layout for legal pages */
.legal-hero{padding:clamp(28px,5vw,54px) 0 var(--space-6)}
.legal-hero h1{font-family:Fraunces,serif;font-weight:900;font-size:clamp(28px,3.8vw,44px);line-height:1.05;color:var(--kiln);margin-bottom:6px}
.legal-meta{color:#6a5f57}

.legal-toc{margin-top:10px;background:var(--paper);border-radius:14px;box-shadow:var(--shadow-1);padding:12px}
.legal-toc ol{display:flex;flex-wrap:wrap;gap:10px;margin:0}
.legal-toc a{display:inline-block;padding:6px 10px;border-radius:999px;border:2px solid color-mix(in oklab, var(--foam) 70%, transparent)}
.legal-toc a:focus-visible{outline:3px solid color-mix(in oklab, var(--leaf) 65%, transparent);outline-offset:2px}

.legal-sec{padding:var(--space-6) 0;border-top:1px dashed color-mix(in oklab, var(--foam) 65%, transparent)}
.legal-sec h2{color:var(--kiln)}
.legal-list{display:grid;gap:6px;margin:8px 0}

.legal .cra-footer{margin-top:var(--space-7)}
/* === Legal TOC: no numbers + pill chips === */
.legal-toc ol{
  list-style: none;           /* убираем 1., 2., 3. */
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}
.legal-toc li{ list-style: none; }

.legal-toc a{
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 2px solid color-mix(in oklab, var(--foam) 70%, transparent);
  background: color-mix(in oklab, var(--foam) 22%, transparent);
  color: var(--kiln);                     /* убираем синий */
  font-weight: 700;
  line-height: 1;
  transition: background .18s, border-color .18s, box-shadow .18s, transform .06s, color .18s;
}
.legal-toc a:hover{
  background: color-mix(in oklab, var(--foam) 32%, transparent);
}
.legal-toc a:focus-visible{
  outline: 3px solid color-mix(in oklab, var(--leaf) 65%, transparent);
  outline-offset: 2px;
}
.legal-toc a:active{ transform: translateY(1px); }
.legal-toc a:is(:visited){ color: var(--kiln); }   /* фикс «фиолетового» */
.legal-toc a.is-active{
  background: var(--leaf);
  border-color: color-mix(in oklab, var(--leaf) 70%, transparent);
  color: var(--on-accent);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
