/* SmartFix VPN — документы (/terms/, /privacy/), ред. № 4, 16.11.2026, legal4h CSS. Дополняет .prose/.doc-layout из site.css. */
.page-legal .doc-meta span{color:var(--text-2)}
.page-legal .doc-switch{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}
/* DS7: active tab uses ice accent; inactive is quieter. Same padding/height/weight — no layout jump. */
.page-legal .doc-switch .btn{
  color:var(--muted);
  background:transparent;
  border-color:var(--line);
}
.page-legal .doc-switch .btn:hover{
  color:var(--text);
  background:var(--surface-2);
  border-color:var(--line-3);
}
.page-legal .doc-switch .btn[aria-current=page]{
  color:var(--ice);
  background:var(--ice-soft);
  border-color:var(--ice);
}
.page-legal .doc-switch .btn[aria-current=page]:hover{
  color:var(--ice);
  background:var(--ice-soft);
  border-color:var(--ice);
}
/* DS1: 38em (~66ch) at every width, not only ≥901px. On narrow screens the box is smaller than 38em, so no effect. */
.page-legal .legal-text{max-width:38em;margin-inline:auto;overflow-wrap:break-word;hyphens:manual;-webkit-hyphens:manual;text-wrap:pretty}

/* DS5: .page-hero h1 has min 30px (site.css clamp(30px,4vw,50px)). The word «конфиденциальности» is 308px at 30px, but the 320px column is 284px. Scale only below 360px; from 360px the original size is unchanged. overflow-wrap is a safety net — the chosen size must keep the word intact. */
.page-legal .page-hero h1{max-width:100%;overflow-wrap:anywhere;hyphens:none;-webkit-hyphens:none}
@media (max-width:359px){
  .page-legal .page-hero h1{font-size:clamp(24px,8.25vw,30px)}
}

/* Breadcrumbs: one line on 320–340. Last crumb ellipsizes; HTML text unchanged. */
@media (max-width:359px){
  .page-legal .crumbs{flex-wrap:nowrap;min-width:0;width:100%;font:500 11px/1 var(--f-mono);letter-spacing:.03em;gap:6px}
  .page-legal .crumbs>span:last-child{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  /* keep the «Главная» hit area ≥44px after the 11px type (16+16+11=43) */
  .page-legal .crumbs a{padding-block:17px;margin-block:-17px}
}

/* DS8: hit areas — 44px on mobile (already on tabs/toc-mobile/crumbs), 40–44px on desktop for header links and side contents, via padding + compensating negative margin, typography unchanged. Inline .legal-text links stay inline. */
@media (min-width:1024px){
  .page-legal .site-header .nav a{
    min-height:44px;
    display:inline-flex;
    align-items:center;
  }
}
@media (min-width:901px){
  .page-legal .toc a{
    position:relative;
    display:flex;
    align-items:center;
    min-height:44px;
    margin-block:-4px;
  }
  .page-legal .toc a.toc-sub{padding-left:22px}
}

.legal-text h2{counter-reset:none}
.legal-text h3{font:600 18px/1.3 var(--f-text);color:var(--text);margin:28px 0 10px;scroll-margin-top:calc(var(--header-offset) + 24px)}
.legal-text [id]{scroll-margin-top:calc(var(--header-offset) + 24px)}
/* DB9: one bullet «•» for every list, CSS marker (not in the text) */
.legal-text ul.marks,.legal-text ul.plain,.legal-text ul.dot{list-style:none;padding-left:0}
.legal-text ul.marks li,.legal-text ul.plain li,.legal-text ul.dot li{position:relative;padding-left:22px}
.legal-text ul.marks li::before,.legal-text ul.plain li::before,.legal-text ul.dot li::before{content:"•";position:absolute;left:6px;top:0;color:var(--muted);font-weight:700}

@media (min-width:901px){
  .page-legal .doc-layout{
    grid-template-columns:220px minmax(0,38em);
    justify-content:center;
    gap:clamp(32px,4vw,56px);
  }
}

.page-legal .toc-mobile{display:none}
.page-legal .toc a.toc-sub{padding-left:22px;font-size:13px}

@media (max-width:900px){
  .page-legal .toc-mobile{
    display:block;
    margin:0 0 22px;
    border:1px solid var(--line);
    border-radius:var(--r-sm);
    background:var(--surface);
  }
  .page-legal .toc-mobile summary{
    display:flex;
    align-items:center;
    gap:10px;
    min-height:44px;
    padding:10px 14px;
    cursor:pointer;
    font:600 15px/1.25 var(--f-text);
    color:var(--text);
    list-style:none;
  }
  .page-legal .toc-mobile summary::-webkit-details-marker{display:none}
  .page-legal .toc-mobile summary::marker{content:""}
  .page-legal .toc-mobile summary::before{
    content:"";
    flex:0 0 auto;
    width:8px;
    height:8px;
    border-right:2px solid var(--muted);
    border-bottom:2px solid var(--muted);
    transform:rotate(-45deg);
    margin-top:-2px;
  }
  .page-legal .toc-mobile[open] summary::before{
    transform:rotate(45deg);
    margin-top:-4px;
  }
  .page-legal .toc-mobile nav{display:flex;flex-direction:column;padding:4px 8px 8px}
  .page-legal .toc-mobile a{
    display:flex;
    align-items:center;
    min-height:44px;
    padding:10px 12px;
    border-radius:10px;
    color:var(--text-2);
  }
  .page-legal .toc-mobile a.toc-sub{padding-left:24px}
  .page-legal .toc-mobile a:hover,
  .page-legal .toc-mobile a:focus-visible{background:var(--surface-2);color:var(--text)}
}

@media (max-width:560px){
  .legal-text{font-size:16px;line-height:1.7}
  .page-legal .doc-switch .btn{flex:1 1 100%;justify-content:center}
}
@media print{
  .page-legal .doc-switch,
  .page-legal .toc,
  .page-legal .toc-mobile,
  .page-legal .crumbs{display:none}
  .legal-text,.legal-text h2,.legal-text h3,.legal-text strong{color:#000}
  /* DS6: print destinations next to word-links; skip hash-only anchors. Break at normal opportunities (spaces, '/'), not mid-token; overflow-wrap is a last resort. */
  .page-legal .legal-text a[href^="http"]::after,
  .page-legal .legal-text a[href^="/"]::after{
    font-weight:400;
    word-break:normal;
    overflow-wrap:anywhere;
  }
  .page-legal .legal-text a[href^="http"]::after{
    content:" (" attr(href) ")";
  }
  .page-legal .legal-text a[href^="/"]::after{
    content:" (https://smartfixnet.org" attr(href) ")";
  }
}
