/* 
Art Direction 2026: Vermilion Contrast
Palette: Primary oklch(60% 0.18 28), BG oklch(99% 0.01 28), Neutral oklch(92% 0.02 28), Dark oklch(20% 0.04 28)
Typography: Headings/Body - system-ui, sans-serif; Numbers/Labels - ui-monospace, SF Mono, Menlo, monospace
Composition: Editorial grid with overlapping fact cards and 1px hair-lines; High-contrast Saturated Hero/Footer
Form: Sharp corners (0px), precise linear structure, 1px borders
Animation: Soft shifting background light spots via CSS keyframes
*/
:root {
    --kwpm-primary: oklch(60% 0.18 28);
    --kwpm-bg: oklch(99% 0.01 28);
    --kwpm-neutral: oklch(92% 0.02 28);
    --kwpm-dark: oklch(20% 0.04 28);
    --kwpm-white: #ffffff;
    --kwpm-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body { overflow-x: clip; margin: 0; padding: 0; background: var(--kwpm-bg); color: var(--kwpm-dark); }
[hidden] { display: none !important; }

/* Base & Typography */
body { 
    font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; 
    line-height: 1.8; 
    -webkit-font-smoothing: antialiased; 
}
.kwpm-mono { font-family: ui-monospace, SF Mono, Menlo, monospace; font-weight: 500; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; font-weight: 700; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 8vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 5vw, 2.25rem); }
p { margin-bottom: 1.5rem; overflow-wrap: anywhere; }
a { color: inherit; text-decoration: none; transition: var(--kwpm-transition); }
a:focus-visible { outline: 2px solid var(--kwpm-primary); outline-offset: 4px; }

/* Layout */
.kwpm-container { max-width: 1240px; margin: 0 auto; padding: 0 20px; width: 100%; box-sizing: border-box; }
.kwpm-prose { max-width: 800px; margin: 0 auto; }
.kwpm-table-wrap { overflow-x: auto; margin: 2rem 0; border: 1px solid var(--kwpm-neutral); position: relative; }
.kwpm-figure { margin: 2rem 0; position: relative; }
.kwpm-figure img { max-width: 100%; height: auto; display: block; }

/* Topbar & Header */
.kwpm-topbar { 
    background: var(--kwpm-neutral); 
    font-size: 0.8rem; 
    padding: 8px 0; 
    border-bottom: 1px solid var(--kwpm-dark); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.kwpm-topbar .kwpm-mono { font-size: 0.75rem; }

.kwpm-header { 
    padding: 20px 0; 
    border-bottom: 1px solid var(--kwpm-neutral); 
    position: sticky; 
    top: 0; 
    background: var(--kwpm-bg); 
    z-index: 100; 
}
.kwpm-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.kwpm-logo { display: flex; flex-direction: column; text-decoration: none; color: var(--kwpm-dark); }
.kwpm-logo-brand { font-weight: 800; font-size: 1.5rem; line-height: 1; }
.kwpm-logo-domain { font-size: 0.7rem; text-transform: lowercase; opacity: 0.6; }

.kwpm-nav { display: flex; gap: 30px; align-items: center; }
.kwpm-nav a { font-size: 0.9rem; font-weight: 500; border-bottom: 1px solid transparent; }
.kwpm-nav a:hover { border-bottom-color: var(--kwpm-primary); }

.kwpm-lang-switch { display: flex; gap: 10px; font-size: 0.85rem; }
.kwpm-lang-switch a { opacity: 0.6; }
.kwpm-lang-switch a:hover { opacity: 1; }

.kwpm-menu-toggle { 
    background: none; border: 1px solid var(--kwpm-dark); padding: 8px 16px; 
    cursor: pointer; font-family: inherit; display: none; 
}

@media (max-width: 959px) {
    .kwpm-menu-toggle { display: block; }
    .kwpm-nav { 
        position: fixed; top: 0; right: 0; bottom: 0; width: 300px; 
        background: var(--kwpm-white); flex-direction: column; padding: 80px 40px; 
        border-left: 1px solid var(--kwpm-neutral); transform: translateX(100%); 
        transition: transform var(--kwpm-transition); z-index: 101; 
    }
    .kwpm-nav.kwpm-open { transform: translateX(0); }
}

/* Buttons */
.kwpm-btn { 
    display: inline-flex; align-items: center; justify-content: center; 
    padding: 12px 24px; font-weight: 600; border: 1px solid var(--kwpm-dark); 
    cursor: pointer; transition: var(--kwpm-transition); text-decoration: none;
    font-size: 0.9rem;
}
.kwpm-btn-primary { background: var(--kwpm-primary); color: var(--kwpm-white); border-color: var(--kwpm-primary); }
.kwpm-btn-primary:hover { filter: brightness(1.1); }
.kwpm-btn-outline { background: transparent; color: var(--kwpm-dark); }
.kwpm-btn-outline:hover { background: var(--kwpm-neutral); }

/* Hero & Sections */
.kwpm-hero { 
    background: var(--kwpm-primary); color: var(--kwpm-white); 
    padding: 100px 0; position: relative; overflow: hidden; 
}
.kwpm-hero h1 { color: var(--kwpm-white); margin-bottom: 1.5rem; }
.kwpm-hero-lead { font-size: clamp(1.1rem, 3vw, 1.5rem); opacity: 0.9; max-width: 700px; margin-bottom: 2rem; }

.kwpm-section { padding: 80px 0; border-bottom: 1px solid var(--kwpm-neutral); position: relative; }
.kwpm-section-dark { background: var(--kwpm-dark); color: var(--kwpm-white); }

/* Fact Cards & Overlaps */
.kwpm-facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px,100%), 1fr)); gap: 40px; margin-top: -60px; position: relative; z-index: 2; }
.kwpm-fact-card { 
    background: var(--kwpm-white); padding: 30px; border: 1px solid var(--kwpm-neutral); 
    box-shadow: 10px 10px 0 var(--kwpm-primary); 
}
.kwpm-fact-val { font-size: 2.5rem; font-weight: 800; color: var(--kwpm-primary); display: block; }

/* Services */
.kwpm-services-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px,100%), 1fr)); gap: 1px; background: var(--kwpm-neutral); border: 1px solid var(--kwpm-neutral); }
.kwpm-service-item { background: var(--kwpm-bg); padding: 40px; transition: var(--kwpm-transition); }
.kwpm-service-item:hover { background: var(--kwpm-white); }
.kwpm-service-num { font-family: ui-monospace, monospace; font-size: 0.9rem; color: var(--kwpm-primary); margin-bottom: 1rem; display: block; }

/* Process & Cards */
.kwpm-process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px,100%), 1fr)); gap: 20px; }
.kwpm-process-step { padding: 20px; border: 1px solid var(--kwpm-neutral); }

/* Tables */
.kwpm-table { width: 100%; border-collapse: collapse; text-align: left; }
.kwpm-table th, .kwpm-table td { padding: 15px; border-bottom: 1px solid var(--kwpm-neutral); }
.kwpm-table th { font-weight: 600; background: var(--kwpm-neutral); }

/* FAQ */
.kwpm-faq-group { margin-bottom: 40px; }
.kwpm-faq-item { border-bottom: 1px solid var(--kwpm-neutral); }
.kwpm-faq-item summary { 
    padding: 20px 0; cursor: pointer; font-weight: 600; list-style: none; 
    display: flex; justify-content: space-between; align-items: center; 
}
.kwpm-faq-item summary::after { content: '+'; font-family: monospace; }
.kwpm-faq-item[open] summary::after { content: '−'; }
.kwpm-faq-content { padding-bottom: 20px; opacity: 0.8; }

/* Legal & Articles */
.kwpm-kicker { font-family: ui-monospace, monospace; text-transform: uppercase; font-size: 0.75rem; color: var(--kwpm-primary); display: block; margin-bottom: 0.5rem; }
.kwpm-reading-time { font-size: 0.8rem; opacity: 0.6; margin-bottom: 2rem; display: block; }
.kwpm-toc { border: 1px solid var(--kwpm-neutral); padding: 20px; margin-bottom: 2rem; }
.kwpm-toc ul { list-style: none; padding: 0; margin: 0; }
.kwpm-toc a { font-size: 0.9rem; display: block; padding: 5px 0; }
.kwpm-legal-note { font-size: 0.85rem; border-left: 3px solid var(--kwpm-primary); padding-left: 15px; margin: 2rem 0; }

/* Form */
.kwpm-form { display: grid; gap: 20px; max-width: 600px; }
.kwpm-form-group { display: flex; flex-direction: column; gap: 8px; }
.kwpm-form-group label { font-size: 0.9rem; font-weight: 600; }
.kwpm-form-group input, .kwpm-form-group textarea { 
    padding: 12px; border: 1px solid var(--kwpm-neutral); font-family: inherit; font-size: 1rem;
}
.kwpm-honey { position: absolute; clip: rect(1px, 1px, 1px, 1px); padding: 0; border: 0; height: 1px; width: 1px; overflow: hidden; }

/* Footer */
.kwpm-footer { background: var(--kwpm-primary); color: var(--kwpm-white); padding: 60px 0 30px; }
.kwpm-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px,100%), 1fr)); gap: 40px; margin-bottom: 60px; }
.kwpm-footer-col h4 { color: var(--kwpm-white); font-size: 1rem; margin-bottom: 20px; text-transform: uppercase; }
.kwpm-footer-col ul { list-style: none; padding: 0; margin: 0; }
.kwpm-footer-col a { color: var(--kwpm-white); opacity: 0.8; font-size: 0.9rem; display: block; margin-bottom: 10px; }
.kwpm-footer-col a:hover { opacity: 1; }
.kwpm-footer-bottom { border-top: 1px solid rgba(255,255,255,0.2); padding-top: 30px; font-size: 0.8rem; opacity: 0.7; }
.kwpm-footer-bottom div { margin-bottom: 10px; }

/* Cookie Banner */
.kwpm-cookie-banner { 
    position: fixed; bottom: 20px; left: 20px; right: 20px; background: var(--kwpm-white); 
    border: 1px solid var(--kwpm-dark); padding: 30px; z-index: 1000; max-width: 600px; 
    margin: 0 auto; box-shadow: 0 20px 40px rgba(0,0,0,0.1); 
}
.kwpm-cookie-banner h2 { font-size: 1.25rem; margin-bottom: 10px; }
.kwpm-cookie-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.kwpm-cookie-panel { 
    margin-top: 20px; border-top: 1px solid var(--kwpm-neutral); padding-top: 20px; 
    display: grid; gap: 10px; 
}
.kwpm-cookie-panel label { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; cursor: pointer; }

/* SVG Badge */
.kwpm-badge { 
    position: absolute; width: 120px; height: 120px; animation: kwpm-rotate 20s linear infinite; 
    pointer-events: none; opacity: 0.5;
}
@keyframes kwpm-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Lights */
.kwpm-light { 
    position: absolute; width: 40vw; height: 40vw; background: radial-gradient(circle, var(--kwpm-neutral) 0%, transparent 70%); 
    filter: blur(60px); z-index: -1; animation: kwpm-drift 15s ease-in-out infinite alternate; 
}
@keyframes kwpm-drift { from { transform: translate(-10%, -10%); } to { transform: translate(10%, 10%); } }

/* Accessibility */
.kwpm-skip-link { 
    position: absolute; top: -100px; left: 0; background: var(--kwpm-primary); color: var(--kwpm-white); 
    padding: 10px; z-index: 1000; transition: top 0.2s; }
.kwpm-skip-link:focus { top: 0; }

@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after { animation-delay: -1ms !important; animation-duration: 1ms !important; transition-duration: 0 !important; }
}

/* сборка: защита от переполнения и служебные правила (промпт, разделы 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}
.kwpm-table-wrap{overflow-x:auto;max-width:100%}
.kwpm-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:479px){.kwpm-btn,:where(button,[type=submit],[type=button]){white-space:normal!important;max-width:100%;box-sizing:border-box}:where(input,select,textarea){max-width:100%!important;box-sizing:border-box}:where(header) :where(div,nav,ul,ol){column-gap:min(1rem,3vw)!important}:where(header) a.kwpm-btn:not([aria-controls]){display:none!important}}
@media (max-width:959px){html.js :where(#kwpm-menu):not(.kwpm-open){display:none!important}:where(header):has(#kwpm-menu){position:relative}:where(#kwpm-menu).kwpm-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(--kwpm-bg,Canvas);color:var(--kwpm-text,CanvasText);box-shadow:0 12px 24px rgb(0 0 0 / .25)}:where(#kwpm-menu).kwpm-open a{min-height:44px;display:flex;align-items:center}}
html:not(.js) #kwpm-menu{display:flex!important;flex-wrap:wrap;position:static!important;transform:none!important;visibility:visible!important;opacity:1!important}
.kwpm-breadcrumbs{font-size:.875rem;padding-block:1rem}.kwpm-breadcrumbs ol{display:flex;flex-wrap:wrap;gap:.25rem .5rem;list-style:none;margin:0;padding:0}.kwpm-breadcrumbs li+li::before{content:"/";margin-right:.5rem;opacity:.5}
.kwpm-sitemap ul{columns:2 16rem;padding-left:1.1rem}


/* сборка: прижать к краю - проверка ловила за краем экрана */
.kwpm-btn{position:static!important;left:auto!important;right:auto!important;transform:none!important;margin-left:0!important;margin-right:0!important;max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere}.kwpm-cookie-btns{flex-wrap:wrap!important}

/* сборка: контраст - текст был цвета фона */
.kwpm-footer > .kwpm-container > .kwpm-footer-bottom > div:not(:hover):not(:focus-visible){color:rgb(17 17 17)!important;-webkit-text-fill-color:rgb(17 17 17)!important}
.kwpm-footer > .kwpm-container > .kwpm-footer-bottom > div > .kwpm-btn.kwpm-btn-outline:not(:hover):not(:focus-visible){color:rgb(17 17 17)!important;-webkit-text-fill-color:rgb(17 17 17)!important;border-color:rgb(17 17 17)!important}
.kwpm-table > thead > tr > th:not(:hover):not(:focus-visible){color:rgb(37 14 12)!important;-webkit-text-fill-color:rgb(37 14 12)!important}
.kwpm-section.kwpm-section-dark > .kwpm-container > .kwpm-prose > .kwpm-btn-outline:not(:hover):not(:focus-visible){color:rgb(255 249 248)!important;-webkit-text-fill-color:rgb(255 249 248)!important}
.kwpm-hero > .kwpm-container > .kwpm-kicker:not(:hover):not(:focus-visible){color:rgb(17 17 17)!important;-webkit-text-fill-color:rgb(17 17 17)!important}
.kwpm-hero > .kwpm-container > .kwpm-reading-time:not(:hover):not(:focus-visible){color:rgb(17 17 17)!important;-webkit-text-fill-color:rgb(17 17 17)!important;opacity:1!important}
.kwpm-hero > .kwpm-container > .kwpm-prose > .kwpm-kicker:not(:hover):not(:focus-visible){color:rgb(17 17 17)!important;-webkit-text-fill-color:rgb(17 17 17)!important}
.kwpm-hero > .kwpm-container > .kwpm-prose > .kwpm-reading-time:not(:hover):not(:focus-visible){color:rgb(17 17 17)!important;-webkit-text-fill-color:rgb(17 17 17)!important;opacity:1!important}
.kwpm-section.kwpm-section-dark > .kwpm-container > .kwpm-prose > .kwpm-process-grid > .kwpm-process-step > .kwpm-btn.kwpm-btn-outline:not(:hover):not(:focus-visible){color:rgb(255 249 248)!important;-webkit-text-fill-color:rgb(255 249 248)!important;border-color:rgb(255 249 248)!important}
