/* 
Art Direction 2026: Dark Indigo Graphite
Palette: OKLCH (Primary: oklch(45% 0.18 275), BG: oklch(18% 0.02 275), Accents: oklch(75% 0.12 275))
Typography: Monospace for metrics/numbers (SF Mono, Menlo); System Sans for prose.
Composition: Vertical section labels in margins, "Score-sheet" horizontal hair-lines (1px).
Form: High radius (20px+), pill-shaped buttons, graphite surfaces with radial glows.
Animation: Link underlines expanding left-to-right; subtle radial pulse for accents.
*/
:root {
    --bsql-primary: oklch(45% 0.18 275);
    --bsql-primary-light: oklch(65% 0.15 275);
    --bsql-bg: oklch(18% 0.02 275);
    --bsql-bg-alt: oklch(22% 0.03 275);
    --bsql-text: oklch(92% 0.01 275);
    --bsql-text-muted: oklch(70% 0.02 275);
    --bsql-accent: oklch(75% 0.12 275);
    --bsql-border: oklch(35% 0.05 275);
    --bsql-radius: 24px;
    --bsql-mono: ui-monospace, SF Mono, Menlo, monospace;
    --bsql-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html, body { overflow-x: clip; background: var(--bsql-bg); color: var(--bsql-text); font-family: var(--bsql-sans); line-height: 1.6; margin: 0; }
[hidden] { display: none !important; }
.bsql-container { max-width: 1240px; margin: 0 auto; padding: 0 20px; position: relative; min-width: 0; }

/* Typography & Base */
h1, h2, h3, h4 { line-height: 1.15; margin: 0; font-weight: 700; overflow-wrap: anywhere; word-break: normal; hyphens: auto; }
h1 { font-size: clamp(2.2rem, 8vw, 4rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.5rem); }
.bsql-prose { font-size: clamp(1rem, 2vw, 1.125rem); }
.bsql-prose p { margin-bottom: 1.5rem; overflow-wrap: anywhere; }
.bsql-mono { font-family: var(--bsql-mono); font-size: 0.9em; }

/* Layout Components */
.bsql-skip-link { position: absolute; top: -100px; left: 0; background: var(--bsql-primary); color: #fff; padding: 1rem; z-index: 1000; transition: top 0.2s; text-decoration: none; }
.bsql-skip-link:focus { top: 0; }

.bsql-topbar { background: var(--bsql-bg-alt); border-bottom: 1px solid var(--bsql-border); padding: 8px 0; font-size: 0.85rem; display: flex; justify-content: space-between; align-items: center; }
.bsql-topbar-left, .bsql-topbar-right { display: flex; gap: 15px; align-items: center; }

.bsql-header { padding: 20px 0; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; background: rgba(28, 28, 35, 0.8); backdrop-filter: blur(10px); }
.bsql-logo { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.bsql-logo-brand { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.bsql-logo-domain { font-size: 0.7rem; opacity: 0.6; font-family: var(--bsql-mono); }

.bsql-nav { display: flex; gap: 25px; align-items: center; }
.bsql-nav-link { text-decoration: none; color: var(--bsql-text); position: relative; padding: 4px 0; transition: color 0.3s; }
.bsql-nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--bsql-primary-light); transition: width 0.3s ease; }
.bsql-nav-link:hover::after { width: 100%; }

.bsql-menu-toggle { display: none; background: none; border: 1px solid var(--bsql-border); color: #fff; padding: 8px 16px; border-radius: 50px; cursor: pointer; font-family: var(--bsql-mono); }

.bsql-btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: 50px; text-decoration: none; font-weight: 600; transition: all 0.3s; cursor: pointer; border: none; font-family: inherit; }
.bsql-btn-primary { background: var(--bsql-primary); color: #fff; }
.bsql-btn-primary:hover { background: var(--bsql-primary-light); transform: translateY(-2px); }

/* Hero & Sections */
.bsql-hero { padding: 100px 0; position: relative; overflow: hidden; }
.bsql-hero-glow { position: absolute; width: 40vw; height: 40vw; background: radial-gradient(circle, var(--bsql-primary) 0%, transparent 70%); opacity: 0.2; pointer-events: none; z-index: -1; border-radius: 50%; }

.bsql-section { padding: 80px 0; border-top: 1px solid var(--bsql-border); position: relative; }
.bsql-section-label { position: absolute; left: -40px; top: 100px; transform: rotate(-90deg); font-family: var(--bsql-mono); font-size: 0.75rem; text-transform: uppercase; color: var(--bsql-text-muted); letter-spacing: 2px; white-space: nowrap; pointer-events: none; }

.bsql-facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin: 40px 0; }
.bsql-fact-card { background: var(--bsql-bg-alt); padding: 30px; border-radius: var(--bsql-radius); border: 1px solid var(--bsql-border); }
.bsql-fact-val { display: block; font-family: var(--bsql-mono); font-size: 2.5rem; color: var(--bsql-primary-light); line-height: 1; margin-bottom: 10px; }

.bsql-services-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.bsql-service-item { background: var(--bsql-bg-alt); padding: 40px; border-radius: var(--bsql-radius); transition: 0.3s; border: 1px solid transparent; text-decoration: none; color: inherit; display: block; }
.bsql-service-item:hover { border-color: var(--bsql-primary); background: oklch(25% 0.03 275); }
.bsql-service-num { display: block; font-family: var(--bsql-mono); font-size: 1.2rem; color: var(--bsql-primary-light); margin-bottom: 15px; }

.bsql-steps { display: grid; gap: 40px; margin: 60px 0; }
.bsql-step { display: grid; grid-template-columns: 80px 1fr; gap: 20px; align-items: start; }
.bsql-step-num { font-family: var(--bsql-mono); font-size: 2rem; color: var(--bsql-border); }

.bsql-table-wrap { overflow-x: auto; border-radius: var(--bsql-radius); border: 1px solid var(--bsql-border); margin: 30px 0; -webkit-overflow-scrolling: touch; }
.bsql-table { width: 100%; border-collapse: collapse; text-align: left; min-width: 500px; }
.bsql-table th, .bsql-table td { padding: 15px 20px; border-bottom: 1px solid var(--bsql-border); }
.bsql-table th { background: var(--bsql-bg-alt); font-family: var(--bsql-mono); font-size: 0.85rem; }

.bsql-faq-item { margin-bottom: 15px; background: var(--bsql-bg-alt); border-radius: var(--bsql-radius); overflow: hidden; }
.bsql-faq-item summary { padding: 20px; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.bsql-faq-item summary::-webkit-details-marker { display: none; }
.bsql-faq-item .bsql-faq-content { padding: 0 20px 20px; color: var(--bsql-text-muted); }

.bsql-guide-card { background: var(--bsql-bg-alt); padding: 30px; border-radius: var(--bsql-radius); text-decoration: none; color: inherit; display: block; border: 1px solid var(--bsql-border); }
.bsql-guide-kicker { font-family: var(--bsql-mono); font-size: 0.75rem; color: var(--bsql-primary-light); text-transform: uppercase; }
.bsql-guide-meta { font-family: var(--bsql-mono); font-size: 0.75rem; opacity: 0.5; margin-top: 15px; }

.bsql-legal-toc { margin-bottom: 40px; padding: 20px; background: var(--bsql-bg-alt); border-radius: var(--bsql-radius); }
.bsql-legal-toc a { display: block; color: var(--bsql-primary-light); text-decoration: none; margin-bottom: 8px; font-size: 0.9rem; }
.bsql-legal-note { font-size: 0.85rem; color: var(--bsql-text-muted); border-left: 3px solid var(--bsql-primary); padding-left: 15px; margin: 20px 0; }

.bsql-form { display: grid; gap: 20px; max-width: 600px; }
.bsql-form-group { display: grid; gap: 8px; }
.bsql-form-group label { font-size: 0.9rem; font-family: var(--bsql-mono); }
.bsql-form-group input, .bsql-form-group textarea { background: var(--bsql-bg-alt); border: 1px solid var(--bsql-border); color: #fff; padding: 12px; border-radius: 12px; font-family: inherit; width: 100%; box-sizing: border-box; }
.bsql-honey { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; overflow: hidden; }

.bsql-footer { padding: 60px 0 30px; background: oklch(14% 0.02 275); border-top: 1px solid var(--bsql-border); }
.bsql-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.bsql-footer-col h4 { font-family: var(--bsql-mono); font-size: 0.85rem; color: var(--bsql-primary-light); margin-bottom: 20px; }
.bsql-footer-col a { display: block; color: var(--bsql-text-muted); text-decoration: none; margin-bottom: 8px; font-size: 0.9rem; }
.bsql-footer-bottom { padding-top: 30px; border-top: 1px solid var(--bsql-border); font-size: 0.8rem; color: var(--bsql-text-muted); line-height: 2; }

.bsql-cookie-banner { position: fixed; bottom: 20px; left: 20px; right: 20px; background: var(--bsql-bg-alt); border: 1px solid var(--bsql-border); padding: 30px; border-radius: var(--bsql-radius); z-index: 1000; box-shadow: 0 20px 50px rgba(0,0,0,0.5); max-width: 600px; margin: 0 auto; }
.bsql-cookie-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 20px; }
.bsql-cookie-panel { display: grid; gap: 15px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--bsql-border); }
.bsql-cookie-cat { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 0.9rem; }

.bsql-badge { position: fixed; bottom: 30px; right: 30px; width: 100px; height: 100px; animation: bsql-rotate 20s linear infinite; z-index: 90; pointer-events: none; }
@keyframes bsql-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 959px) {
    .bsql-menu-toggle { display: block; }
    .bsql-nav { position: fixed; top: 0; right: -100%; width: 80%; height: 100vh; background: var(--bsql-bg-alt); flex-direction: column; justify-content: center; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); padding: 40px; box-sizing: border-box; }
    .bsql-nav.bsql-open { right: 0; }
    .bsql-section-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

:focus-visible { outline: 2px solid var(--bsql-primary-light); outline-offset: 4px; }

/* сборка: защита от переполнения и служебные правила (промпт, разделы 6-7) */
[hidden]{display:none!important}
html,body{overflow-x:clip}
img,video{max-width:100%;height:auto}
:where(main,header,footer) :where(div,section,article,aside,ul,ol,li,figure,details,form,fieldset,nav){min-width:0}
:where(main,footer) :where(h1,h2,h3,h4,p,li,td,th,dd,dt,summary,figcaption,a){overflow-wrap:anywhere;word-break:normal;hyphens:auto}
.bsql-table-wrap{overflow-x:auto;max-width:100%}
.bsql-honey{position:absolute!important;left:auto!important;right:auto!important;top:auto!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;border:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;opacity:0!important}
:where(a){color:inherit;text-underline-offset:.2em}
:where(main) :where(section,article,div,li,figure){position:relative}
@media (max-width:959px){html.js :where(#bsql-menu):not(.bsql-open){display:none!important}:where(header):has(#bsql-menu){position:relative}:where(#bsql-menu).bsql-open{display:flex!important;flex-direction:column;align-items:stretch;gap:.25rem;position:absolute;left:0;right:0;top:100%;z-index:90;max-height:calc(100vh - 4rem);overflow-y:auto;padding:1rem clamp(16px,4vw,32px) 1.5rem;box-sizing:border-box;visibility:visible!important;opacity:1!important;transform:none!important;background:var(--bsql-bg,Canvas);color:var(--bsql-text,CanvasText);box-shadow:0 12px 24px rgb(0 0 0 / .25)}:where(#bsql-menu).bsql-open a{min-height:44px;display:flex;align-items:center}}
html:not(.js) #bsql-menu{display:flex!important;flex-wrap:wrap;position:static!important;transform:none!important;visibility:visible!important;opacity:1!important}
.bsql-breadcrumbs{font-size:.875rem;padding-block:1rem}.bsql-breadcrumbs ol{display:flex;flex-wrap:wrap;gap:.25rem .5rem;list-style:none;margin:0;padding:0}.bsql-breadcrumbs li+li::before{content:"/";margin-right:.5rem;opacity:.5}
.bsql-figure{margin:2rem 0}.bsql-figure img{display:block;width:100%;height:auto}
.bsql-sitemap ul{columns:2 16rem;padding-left:1.1rem}


/* сборка: прижать к краю - проверка ловила за краем экрана */
@media (max-width:1439px){.bsql-section-label{position:static!important;left:auto!important;right:auto!important;transform:none!important;margin-left:0!important;margin-right:0!important;max-width:100%!important}}
