/* The documents centre (owner 2026-12-01: «отдельно вкладку сделай, чтобы из нее по всем документам смотреть»):
   /legal/ and every /legal/<id>/ share one frame — the documents by group with search on the side, the document with its
   own contents beside it. legal.js switches documents without a reload. */
.legal-hub { --deep: var(--blue); --lh-top: 112px; padding: 120px 0 72px; }
.lh-shell { display: grid; grid-template-columns: 292px minmax(0, 1fr); gap: 28px; align-items: start; width: var(--wrap); margin: 0 auto; }

/* The side: all documents. */
/* The documents centre button and the search stay put; only the list scrolls. */
.lh-side { position: sticky; top: var(--lh-top); display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - var(--lh-top) - 16px); overflow: hidden; padding: 16px; border-radius: var(--r-l); background: var(--paper); box-shadow: var(--shadow); scrollbar-width: thin; animation: lh-rise .5s var(--ease) both; }
.lh-side > * { flex: none; min-width: 0; }
.lh-hub { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; color: var(--ink); font-weight: 700; text-decoration: none; transition: background-color .2s; }
.lh-hub svg, .lh-search svg, .lh-btn svg, .lh-hero-mark svg, .lh-link--out svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lh-hub:hover { background: var(--bg); }
.lh-hub[aria-current] { background: var(--inv-bg); color: var(--inv-fg); }
.lh-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--soft); transition: border-color .2s, box-shadow .2s; }
.lh-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 16%, transparent); }
.lh-search input { flex: 1; width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: 15px; }
.lh-nav { display: grid; align-content: start; gap: 14px; flex: 0 1 auto; min-height: 0; margin: 0 -10px -16px 0; padding: 0 10px 16px 0; overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.lh-nav-toggle { display: none; }
.lh-group { display: grid; gap: 2px; }
.lh-group-title { margin: 0 0 4px; padding: 0 12px; color: var(--hint); font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lh-link { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding: 7px 12px; border-radius: 11px; color: var(--soft); font-size: 14.5px; font-weight: 600; line-height: 1.3; text-decoration: none; transition: background-color .2s, color .2s; }
.lh-link:hover { background: var(--bg); color: var(--ink); }
.lh-link[aria-current] { background: color-mix(in srgb, var(--blue) 12%, var(--paper)); color: var(--ink); }
.lh-link[aria-current]::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--blue); }
.lh-link--soon { color: var(--hint); cursor: default; }
.lh-link--soon i { color: var(--hint); font-size: 11px; font-style: normal; font-weight: 700; }
.lh-link--out svg { width: 14px; height: 14px; opacity: .6; }
.lh-new { flex: none; padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); font-size: 10.5px; font-style: normal; font-weight: 800; letter-spacing: .02em; }
.lh-new--dot { width: 8px; height: 8px; margin-right: 2px; padding: 0; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 20%, transparent); }
.lh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lh-new[hidden] { display: none; }

/* The document. */
.lh-main { min-width: 0; }
.lh-doc, .lh-index { animation: lh-rise .45s var(--ease) both; }
.lh-main.is-leaving > * { opacity: 0; transform: translateY(8px); transition: opacity .16s, transform .16s; }
.lh-doc .crumbs, .lh-index .crumbs { margin-bottom: 18px; }
.lh-head { padding: 32px 34px 28px; border-radius: var(--r-xl); background: radial-gradient(90% 140% at 100% 0, color-mix(in srgb, var(--blue) 12%, transparent), transparent 62%), var(--paper); box-shadow: var(--shadow); }
.lh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: var(--hint); font-size: 14.5px; font-weight: 600; }
/* legal.js moves focus to the title of a document it opened: no focus box for that. */
.lh-main h1[tabindex="-1"]:focus { outline: none; }
.lh-head h1 { margin: 10px 0 0; font-size: clamp(30px, 3.8vw, 46px); line-height: 1.08; letter-spacing: -.03em; }
.lh-lead { max-width: 760px; margin: 14px 0 0; color: var(--soft); font-size: 17.5px; line-height: 1.6; }
.lh-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.lh-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: border-color .2s, transform .2s var(--ease); }
.lh-btn:hover { border-color: var(--soft); transform: translateY(-1px); }
.lh-btn.is-done { border-color: var(--green); color: var(--green); }
.lh-body { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 28px; align-items: start; margin-top: 22px; }
.lh-prose { grid-column: 1; grid-row: 1; margin: 0; padding: 30px 34px 36px; border: 0; border-radius: var(--r-xl); background: var(--paper); box-shadow: var(--shadow); font-size: 17px; }
.lh-prose h2 { padding-top: 6px; font-size: clamp(21px, 2.1vw, 25px); scroll-margin-top: 16px; }
.lh-prose h2:first-child { margin-top: 0; }
.lh-prose .checks li { font-size: 16.5px; }
.lh-prose h2.is-flash { animation: lh-flash 1.4s var(--ease); }
.lh-toc { grid-column: 2; grid-row: 1; position: sticky; top: var(--lh-top); max-height: calc(100vh - var(--lh-top) - 16px); overflow: auto; padding: 4px 0; scrollbar-width: thin; }
.lh-toc p { margin: 0 0 8px; padding-left: 14px; color: var(--hint); font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lh-toc ol { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--line); }
.lh-toc a { display: block; margin-left: -2px; padding: 6px 10px 6px 14px; border-left: 2px solid transparent; color: var(--soft); font-size: 13.5px; line-height: 1.35; text-decoration: none; transition: color .2s, border-color .2s, background-color .2s; }
.lh-toc a:hover { color: var(--ink); }
.lh-toc a[aria-current] { border-color: var(--blue); color: var(--ink); font-weight: 600; background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 8%, transparent), transparent); }
.lh-related { margin-top: 22px; padding: 22px 24px; border-radius: var(--r-l); background: var(--paper); box-shadow: var(--shadow); }
.lh-related > p { margin: 0 0 12px; color: var(--hint); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lh-minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.lh-mini { display: grid; gap: 4px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s var(--ease); }
.lh-mini:hover { border-color: var(--soft); transform: translateY(-2px); }
.lh-mini span { color: var(--soft); font-size: 13.5px; line-height: 1.45; }
.lh-back { display: inline-flex; margin-top: 14px; color: var(--link); font-weight: 600; }

/* The centre's first page. */
.lh-hero { position: relative; overflow: hidden; padding: 38px 38px 32px; border-radius: var(--r-xl); background: radial-gradient(80% 140% at 100% 0, color-mix(in srgb, var(--blue) 16%, transparent), transparent 60%), var(--paper); box-shadow: var(--shadow); }
.lh-hero-mark { display: grid; width: 56px; height: 56px; place-items: center; border-radius: 18px; background: var(--inv-bg); color: var(--inv-fg); }
.lh-hero-mark svg { width: 26px; height: 26px; }
.lh-hero h1 { margin: 18px 0 0; font-size: clamp(32px, 4.4vw, 54px); letter-spacing: -.03em; }
.lh-hero-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.lh-hero-facts li { padding: 7px 14px; border-radius: 999px; background: var(--bg); color: var(--ink); font-size: 13.5px; font-weight: 600; }
.lh-hub-group { margin-top: 30px; }
.lh-hub-group h2 { margin: 0; font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.02em; }
.lh-hub-group > p { margin: 6px 0 0; color: var(--soft); }
.lh-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 16px; }
.lh-card { display: grid; align-content: start; gap: 8px; padding: 20px; border-radius: var(--r-l); background: var(--paper); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .22s var(--ease), box-shadow .22s; animation: lh-rise .5s var(--ease) both; }
.lh-cards > :nth-child(2) { animation-delay: .04s; } .lh-cards > :nth-child(3) { animation-delay: .08s; } .lh-cards > :nth-child(4) { animation-delay: .12s; } .lh-cards > :nth-child(n+5) { animation-delay: .16s; }
.lh-card:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgb(29 32 43 / .06), 0 22px 40px -22px rgb(29 32 43 / .45); }
.lh-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.lh-card-top b { font-size: 17px; line-height: 1.3; }
.lh-card-text { color: var(--soft); font-size: 14.5px; line-height: 1.5; }
.lh-card small { margin-top: 4px; color: var(--hint); font-size: 12.5px; font-weight: 600; }
.lh-card--out small::after { content: " ↗"; }

/* Search results. */
.lh-results { grid-column: 2; grid-row: 1; display: grid; align-content: start; gap: 12px; animation: lh-rise .3s var(--ease) both; }
.lh-results[hidden] { display: none; }
.lh-results > p { margin: 0; color: var(--soft); font-weight: 600; }
.lh-hit { display: grid; gap: 4px; padding: 16px 20px; border-radius: var(--r-l); background: var(--paper); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .2s var(--ease); }
.lh-hit:hover { transform: translateY(-2px); }
.lh-hit small { color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.lh-hit b { font-size: 16.5px; }
.lh-hit span { color: var(--soft); font-size: 14.5px; line-height: 1.5; }
.lh-hit mark { border-radius: 4px; background: color-mix(in srgb, var(--blue) 24%, transparent); color: inherit; }
.legal-hub.is-searching .lh-main { display: none; }

/* Sections come in as they scroll into view (legal.js). */
.lh-reveal { transition: opacity .55s var(--ease), transform .55s var(--ease); }
.lh-reveal.is-waiting { opacity: 0; transform: translateY(16px); }

@keyframes lh-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes lh-flash { 0% { background: color-mix(in srgb, var(--blue) 18%, transparent); } 100% { background: transparent; } }

@media (max-width: 1180px) { .lh-body { grid-template-columns: minmax(0, 1fr); } .lh-toc { display: none; } }
@media (max-width: 900px) {
  .legal-hub { padding-top: 100px; }
  .lh-shell { grid-template-columns: minmax(0, 1fr); }
  .lh-side { position: static; max-height: none; }
  .lh-nav { display: none; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 0; padding: 0; overflow: visible; }
  .lh-side.is-open .lh-nav { display: grid; animation: lh-rise .3s var(--ease) both; }
  .lh-nav-toggle { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
  .lh-nav-toggle b { padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--soft); font-size: 12.5px; }
  .lh-nav-toggle svg { width: 18px; height: 18px; margin-left: auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
  .lh-side.is-open .lh-nav-toggle svg { transform: rotate(180deg); }
  .lh-results { grid-column: 1; }
  .lh-head, .lh-hero { padding: 24px 20px 22px; }
  .lh-prose { padding: 22px 20px 26px; font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .lh-side, .lh-doc, .lh-index, .lh-card, .lh-results { animation: none; }
  .lh-reveal, .lh-reveal.is-waiting { opacity: 1; transform: none; transition: none; }
  .lh-main.is-leaving > * { transition: none; }
  .lh-prose h2.is-flash { animation: none; }
}
/* Print / PDF: the document alone. */
@media print {
  .sh, .sft, .lh-side, .lh-toc, .lh-actions, .lh-related, .crumbs, .lh-results, .support-widget, [data-support-root] { display: none !important; }
  .legal-hub { padding: 0; }
  .lh-shell, .lh-body { display: block; width: auto; }
  .lh-head, .lh-prose { padding: 0; box-shadow: none; background: none; }
  .lh-prose { margin-top: 18px; font-size: 12pt; }
  .lh-new { display: none !important; }
  body { background: #fff; color: #000; }
}
