/* GRBNK — «Инструкции и документы» (/docs). Figma «GRBNK VPN WEB» → Section «Документы»:
   L-20…22 (1440) и LM-20…22, LM-24 (390); компоненты — 00 Design System → Patterns → Docs.
   Токены, кнопки, .overline, .icon — из app.css; шапка, подвал, .ld-wrap и .ld-link — из landing.css.
   Обводки в макете входят в раскладку, поэтому border + padding = как в Figma. */

.dc h4,.dc figure{margin:0}
.dc-panel[hidden]{display:none}
.dc :target,.dc-article{scroll-margin-top:24px}
.dc a:focus-visible,.dc summary:focus-visible{outline:2px solid var(--primary-text);outline-offset:2px}

/* ── Page Head: 56 / 48, заголовок и вкладки через 24 ── */
.dc-head{display:flex;flex-direction:column;gap:24px;padding:56px 0 48px}
.dc-heading{display:flex;flex-direction:column;gap:12px}
.dc-h1{font:600 32px/40px var(--font-display);letter-spacing:-.02em;color:var(--text)}
.dc-page-lead{font-size:16px;line-height:24px;color:var(--text2)}

/* Docs Tabs: 440×56, подложка surface/default, вкладки 48 с радиусом 10 */
.dc-tabs{display:flex;gap:4px;width:440px;max-width:100%;padding:3px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card)}
.dc-tab{flex:1 1 0;min-width:0;display:flex;align-items:center;justify-content:center;gap:8px;height:48px;padding:0 20px;border:1px solid transparent;border-radius:var(--r-ctl);
  font-size:15px;line-height:20px;font-weight:600;color:var(--text2);-webkit-tap-highlight-color:transparent;
  transition:background-color .15s ease,border-color .15s ease,color .15s ease}
.dc-tab[aria-current="page"]{background:rgba(107,92,255,.14);border-color:rgba(107,92,255,.4);color:var(--primary-text)}
@media (hover:hover) and (pointer:fine){.dc-tab:not([aria-current="page"]):hover{background:var(--ctl);color:var(--text)}}
.dc-tab:not([aria-current="page"]):active{background:var(--track);color:var(--text)}

.dc-divider{height:1px;margin-block:0;padding:0;border:0;background:var(--line)}

/* ── Body: оглавление 240 (липкое) + статьи 720, gap 80; 48 / 96 ── */
.dc-body{display:flex;align-items:flex-start;gap:80px;padding:48px 0 96px}
.dc-nav{position:sticky;top:24px;flex:none;width:240px;display:flex;flex-direction:column;gap:4px}
.dc-nav-over{padding:0 12px 8px}
/* Docs Nav Item / Desktop: 40, padding 10 12, Medium 14/20; Active — primary/soft */
.dc-nav-item{display:block;padding:10px 12px;border-radius:var(--r-ctl);font-size:14px;line-height:20px;font-weight:500;color:var(--text2);
  transition:background-color .15s ease,color .15s ease}
.dc-nav-item.is-active{background:rgba(107,92,255,.14);color:var(--primary-text)}
@media (hover:hover) and (pointer:fine){.dc-nav-item:not(.is-active):hover{background:var(--ctl);color:var(--text)}}
.dc-nav-item:not(.is-active):active{background:var(--track);color:var(--text)}
.dc-content{flex:1;min-width:0;max-width:720px;display:flex;flex-direction:column;gap:56px}
.dc-sep{height:1px;margin:0;border:0;background:var(--line)}

/* ── Статья ── */
.dc-article{display:flex;flex-direction:column;gap:32px}
.dc-article p,.dc-article h2,.dc-article h3{margin:0}
.dc-article a{color:var(--primary-text)}
@media (hover:hover) and (pointer:fine){.dc-article a:hover{text-decoration:underline}}
/* Docs Article Header */
.dc-ahead{display:flex;flex-direction:column;gap:12px}
.dc-over{font-size:12px;line-height:16px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.dc-title{font:600 24px/32px var(--font-display);letter-spacing:-.015em;color:var(--text)}
.dc-lead,.dc-text p,.dc-method-head p,.dc-step-body p,.dc-sec p,.dc-list{font-size:16px;line-height:24px;color:var(--text2)}
.dc-text{display:flex;flex-direction:column;gap:12px}

/* Method Head: H3 20/28 + описание через 8; у второго способа сверху ещё 16 */
.dc-method{display:flex;flex-direction:column;gap:32px}
.dc-method+.dc-method{padding-top:16px}
.dc-method-head{display:flex;flex-direction:column;gap:8px}
.dc-method-head h3,.dc-sec h3{font:600 20px/28px var(--font);letter-spacing:-.01em;color:var(--text)}

/* Docs Step: номер Mono 32/40 в колонке 48, текст через 20; скриншот — под текстом на всю ширину */
.dc-steps{display:flex;flex-direction:column;gap:32px;margin:0;padding:0;list-style:none}
.dc-step{display:grid;grid-template-columns:48px minmax(0,1fr);gap:24px 20px}
.dc-step-n{font:400 32px/40px var(--font-mono);color:var(--muted)}
.dc-step-body{display:flex;flex-direction:column;gap:6px;padding-top:6px;min-width:0}
.dc-step-body h4{font-size:16px;line-height:24px;font-weight:600;letter-spacing:-.005em;color:var(--text)}
.dc-step-body .dc-list{margin-block:2px}

/* Списки: маркер «•», отступ 44 (в шагах и врезках — 20) */
.dc-list{display:flex;flex-direction:column;gap:8px;margin:0;padding:0 0 0 20px;list-style:none}
.dc-list li{position:relative}
.dc-list li::before{content:"•";position:absolute;left:-15px;color:var(--text2)}

/* Docs Figure / Type=Desktop: подложка bg/secondary, обводка glass/border, радиус 12; подпись 12/16 */
.dc-fig{grid-column:1/-1;display:flex;flex-direction:column;gap:10px}
.dc-fig-link{display:block;border-radius:var(--r-md);cursor:zoom-in}
.dc-fig img{display:block;width:100%;height:auto;border-radius:var(--r-md);border:1px solid var(--border);background:var(--well)}
.dc-fig figcaption{font-size:12px;line-height:16px;letter-spacing:.004em;color:var(--muted)}

/* Docs Callout: surface/default, обводка border/subtle, радиус 16, padding 24, иконка 24 */
.dc-callout{display:flex;gap:16px;padding:24px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg)}
.dc-callout>.icon{width:24px;height:24px;color:var(--text2)}
.dc-callout>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:16px}
.dc-callout .dc-callout-title{margin:0;font:600 16px/24px var(--font);letter-spacing:-.005em;color:var(--text)}
.dc-callout .dc-list{font-size:14px;line-height:20px}
.dc-callout .dc-list li::before{left:-14px}
.dc-problems{display:flex;flex-direction:column;gap:16px;margin:0;padding:0;list-style:none;font-size:14px;line-height:20px;color:var(--text2)}
.dc-problems b{display:block;margin-bottom:4px;font-weight:500;color:var(--text)}

/* ── Документы: раздел H3 + пункты (номер Mono 13/20 в колонке 32) ── */
.dc-sec{display:flex;flex-direction:column;gap:12px}
.dc-clause{display:flex;gap:12px}
.dc-clause-n{flex:none;width:32px;padding-top:2px;font:400 13px/20px var(--font-mono);color:var(--muted)}
.dc-clause-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}
.dc-clause-body h4{font-size:16px;line-height:24px;font-weight:500;color:var(--text)}
.dc-sec>.dc-list,.dc-clause .dc-list{padding-left:20px}
.dc-rev{font-size:13px;line-height:18px;letter-spacing:.002em;color:var(--muted)}

/* Выбор статьи (только телефон) */
.dc-picker{display:none}

/* ── Телефон: LM-20…22, LM-24 ── */
@media (max-width:860px){
  .dc-head{gap:20px;padding:24px 16px 20px}
  .dc-heading{gap:8px}
  .dc-tabs{width:auto}
  .dc-tab{padding:0 12px}
  .dc-divider{display:none}
  .dc-body{display:block;padding:24px 16px 56px}
  .dc-nav{display:none}
  .dc-content{max-width:none;gap:40px}
  .dc-article,.dc-method,.dc-steps{gap:24px}
  .dc-step{gap:20px}
  .dc-fig{gap:10px}
  .dc-callout{padding:20px 16px;gap:12px}
  .dc :target,.dc-article{scroll-margin-top:96px}

  /* Article Picker · sticky: 8 / 16 на фоне bg/default, линия снизу */
  .dc-picker{display:block;position:sticky;top:0;z-index:30;padding:8px 16px;background:var(--bg);border-bottom:1px solid var(--line)}
  .dc-picker-btn{display:flex;align-items:center;gap:12px;height:56px;padding:8px 16px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-ctl);
    cursor:pointer;list-style:none;-webkit-tap-highlight-color:transparent;transition:background-color .15s ease}
  .dc-picker-btn::-webkit-details-marker{display:none}
  .dc-picker-btn:active{background:var(--track)}
  .dc-picker-btn>.icon{color:var(--text2)}
  .dc-picker-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
  .dc-picker-count{font-size:12px;line-height:16px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
  .dc-picker-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:20px;font-weight:500;color:var(--text)}

  /* Scrim (overlay/scrim + blur 8): псевдоэлемент кнопки — без JS тап по нему закрывает <details> */
  .dc-picker[open]>.dc-picker-btn::before{content:"";position:fixed;inset:0;z-index:40;background:rgba(3,4,8,.66);
    -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);cursor:default}
  /* Bottom Sheet: стекло, верх скруглён 24, 8 / 20 / 34+safe, полоска 36×4 */
  .dc-sheet{position:fixed;left:0;right:0;bottom:0;z-index:41;display:flex;flex-direction:column;gap:16px;max-height:85vh;max-height:85dvh;overflow-y:auto;
    padding:8px 20px calc(34px + var(--safe-b));border:1px solid var(--border);border-bottom:0;border-radius:24px 24px 0 0;
    background:rgba(17,20,29,.72);-webkit-backdrop-filter:blur(32px);backdrop-filter:blur(32px);
    box-shadow:0 24px 64px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,255,255,.06)}
  .dc-sheet::before{content:"";display:block;flex:none;width:36px;height:4px;margin:1px auto 0;border-radius:2px;background:var(--ctl-border-hover)}
  .dc-sheet-head{display:flex;align-items:flex-start;gap:12px}
  .dc-sheet-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
  .dc-sheet-title{margin:0;font:600 20px/28px var(--font);letter-spacing:-.01em;color:var(--text)}
  .dc-sheet-desc{margin:0;font-size:13px;line-height:18px;letter-spacing:.002em;color:var(--text2)}
  .dc-sheet-close{width:48px;height:48px;margin:-10px -8px 0 0}.dc-sheet-close .icon{width:20px;height:20px}
  .dc-sheet-list{display:flex;flex-direction:column;gap:4px;margin:0;padding:0;list-style:none}
  /* Docs Nav Item / Mobile с подписью: 14 / 12, текст 16/24, галочка у выбранного */
  .dc-sheet-item{display:flex;align-items:center;gap:12px;padding:14px 12px;border-radius:var(--r-ctl);color:var(--text2);-webkit-tap-highlight-color:transparent;
    transition:background-color .15s ease}
  .dc-sheet-item:active{background:var(--track)}
  .dc-sheet-item.is-active{background:rgba(107,92,255,.14);color:var(--primary-text)}
  .dc-sheet-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
  .dc-sheet-label{font-size:16px;line-height:24px}
  .dc-sheet-meta{font-size:12px;line-height:16px;letter-spacing:.004em;color:var(--muted)}
  .dc-check{visibility:hidden}.dc-sheet-item.is-active .dc-check{visibility:visible}

  /* С JS шторка выезжает снизу и уходит туда же (docs/animations.md: --dur-sheet / --ease-drawer) */
  .js .dc-sheet-close{display:inline-flex}
  .js .dc-picker>.dc-picker-btn::before{opacity:0;transition:opacity var(--dur-sheet-out) var(--ease-out)}
  .js .dc-picker>.dc-sheet{transform:translateY(100%);transition:transform var(--dur-sheet-out) var(--ease-out)}
  .js .dc-picker.is-in>.dc-picker-btn::before{opacity:1;transition-duration:var(--dur-sheet)}
  .js .dc-picker.is-in>.dc-sheet{transform:none;transition:transform var(--dur-sheet) var(--ease-drawer)}
}

@media (prefers-reduced-motion:reduce){
  .dc-tab,.dc-nav-item,.dc-picker-btn,.dc-sheet-item{transition:none}
  .js .dc-picker>.dc-sheet{transform:none;opacity:0;transition:opacity var(--dur-sheet-out) ease}
  .js .dc-picker.is-in>.dc-sheet{opacity:1;transition:opacity var(--dur-sheet) ease}
}
