/* TWIPRO public site. Palette and type follow the approved first-block draft. */
:root {
  --bg: #F3F1EC; --paper: #FFFFFF; --ink: #16181B; --ink2: #3D4248; --muted: #6B7076;
  --line: #DEDAD1; --accent: #B23A0A; --accent-dk: #8E2D06; --dark: #16181B; --dark2: #212429;
  --sand: #E9E4D8; --ok: #2F7A4F;
  --r: 14px; --wrap: 1200px;
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
.s, .s * { box-sizing: border-box; }
body.s { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
.s a { color: inherit; }
.s a:hover { color: var(--accent); }
.s img { max-width: 100%; height: auto; display: block; }
.s h1, .s h2, .s h3, .s h4 { margin: 0; font-weight: 800; letter-spacing: -.02em; line-height: 1.12; }
.s h1 { font-size: clamp(34px, 5vw, 58px); }
.s h2 { font-size: clamp(28px, 3.6vw, 42px); }
.s h3 { font-size: 22px; letter-spacing: -.01em; }
.s p { margin: 0 0 1em; }
.s-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.s-muted { color: var(--muted); }
.s-mono { font-family: var(--mono); }
.s-accent { color: var(--accent); }
.s-eyebrow { font: 600 13px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.s-sec { padding: 88px 0; }
.s-sec-tight { padding: 56px 0; }
.s-sec-dark { background: var(--dark); color: #EDEBE6; }
.s-sec-dark .s-muted { color: #A3A7AC; }
.s-sec-white { background: var(--paper); }
.s-sec-head { max-width: 780px; margin-bottom: 44px; }
.s-sec-head p { font-size: 19px; color: var(--ink2); margin-top: 16px; }
.s-sec-dark .s-sec-head p { color: #C9CCCF; }
.s-lead { font-size: 20px; color: var(--ink2); }

/* Buttons */
.s-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 26px; border-radius: 10px; border: 0; background: var(--accent); color: #fff !important; font: 600 17px/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, transform .15s; }
.s-btn:hover { background: var(--accent-dk); }
.s-btn:active { transform: translateY(1px); }
.s-btn-sm { padding: 10px 16px; font-size: 15px; }
.s-btn-ghost { background: transparent; color: var(--ink) !important; box-shadow: inset 0 0 0 1.5px var(--ink); }
.s-btn-ghost:hover { background: var(--ink); color: #fff !important; }
.s-sec-dark .s-btn-ghost { color: #fff !important; box-shadow: inset 0 0 0 1.5px #fff; }
.s-btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.s-link { font-weight: 600; text-decoration: none; border-bottom: 1.5px solid currentColor; }

/* Header. Fits by measurement (site.js adds .no-phone / .compact only when the row really overflows). */
.s-head { position: sticky; top: 0; z-index: 50; background: rgba(243, 241, 236, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.s-head-in { display: flex; align-items: center; gap: 28px; height: 68px; max-width: 1680px; margin: 0 auto; padding: 0 32px; }
.s-logo { flex: none; font: 800 22px/1 var(--sans); letter-spacing: -.02em; text-decoration: none; color: var(--ink) !important; }
.s-logo span { color: var(--accent); }
.s-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.s-nav > a, .s-nav-drop { font: 500 15px/1 var(--sans); text-decoration: none; color: var(--ink2); white-space: nowrap; background: none; border: 0; padding: 8px 0; cursor: pointer; }
.s-nav > a:hover, .s-nav-drop:hover { color: var(--accent); }
.s-nav > a.on, .s-nav-drop.on { color: var(--accent); }
.s-nav-drop::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.s-nav-group { position: relative; }
.s-nav-sub { display: none; position: absolute; top: 100%; left: -16px; min-width: 170px; background: var(--paper); border-radius: 10px; box-shadow: 0 12px 30px rgba(22, 24, 27, .12); padding: 8px; }
.s-nav-sub a { display: block; padding: 10px 12px; border-radius: 6px; text-decoration: none; font-size: 15px; white-space: nowrap; }
.s-nav-sub a:hover { background: var(--bg); }
.s-nav-group:hover .s-nav-sub, .s-nav-group:focus-within .s-nav-sub, .s-nav-group.open .s-nav-sub { display: block; }
.s-nav-phone { display: none; }
.s-head-phone { flex: none; font: 600 15px var(--sans); text-decoration: none; white-space: nowrap; }
.s-head-in > .s-btn { flex: none; white-space: nowrap; }
.s-burger { display: none; flex: none; width: 40px; height: 40px; border: 0; background: none; padding: 9px; cursor: pointer; }
.s-burger span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }
.s-head.no-phone .s-head-phone { display: none; }
.s-head.compact .s-burger { display: block; }
.s-head.compact .s-head-phone { display: block; margin-left: auto; }
.s-head.compact .s-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 24px 20px; max-height: calc(100vh - 68px); overflow-y: auto; }
.s-head.compact .s-nav.open { display: flex; }
.s-head.compact .s-nav > a, .s-head.compact .s-nav-drop { padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--line); text-align: left; width: 100%; }
.s-head.compact .s-nav-drop::after { display: none; }
.s-head.compact .s-nav-sub { display: block; position: static; box-shadow: none; background: none; padding: 0 0 0 16px; }
.s-head.compact .s-nav-sub a { font-size: 17px; padding: 12px 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.s-head.compact .s-nav-phone { display: block; font-weight: 700; }
@media (max-width: 640px) { .s-head-in { padding: 0 16px; gap: 16px; } .s-head.compact .s-head-phone { display: none; } .s-head.compact .s-head-in > .s-btn { margin-left: auto; } }
@media (max-width: 420px) { .s-head-in > .s-btn { display: none; } .s-head.compact .s-burger { margin-left: auto; } }

.s-flash { margin-top: 16px; padding: 14px 18px; background: var(--paper); border-left: 4px solid var(--accent); border-radius: 8px; }

/* Hero */
/* Hero: the whole first block (headline, calculator, CTAs, photo, three figures) fits one screen. */
.s-hero { display: flex; flex-direction: column; justify-content: center; gap: clamp(16px, 3vh, 32px); min-height: calc(100vh - 69px); min-height: calc(100svh - 69px); padding: clamp(16px, 3.5vh, 40px) 0; }
.s-hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr); gap: clamp(24px, 3vw, 48px); align-items: center; }
.s-hero .s-eyebrow { margin-bottom: clamp(8px, 1.6vh, 16px); }
.s-hero h1 { font-size: clamp(28px, min(3.3vw, 5vh), 52px); }
.s-hero h1 em { font-style: normal; color: var(--accent); }
.s-hero-sub { font-size: clamp(16px, min(1.25vw, 2.2vh), 19px); color: var(--ink2); margin: clamp(10px, 1.8vh, 18px) 0 clamp(14px, 2.4vh, 24px); max-width: 680px; }
.s-calc { background: var(--paper); border-radius: var(--r); padding: clamp(14px, 2vh, 20px) 20px; box-shadow: 0 1px 0 var(--line); max-width: 760px; }
.s-calc-fields { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 14px; align-items: end; }
.s-calc label span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.s-calc input { width: 100%; font: 600 20px var(--mono); padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #FAF9F6; color: var(--ink); }
.s-calc-out { display: block; }
.s-calc-out span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.s-calc-out b { display: block; font: 700 clamp(24px, min(2.4vw, 4vh), 34px)/1.15 var(--mono); color: var(--accent); white-space: nowrap; }
.s-calc-note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.s-hero .s-btn-row { margin-top: clamp(14px, 2.4vh, 24px); }
.s-hero-photo { border-radius: var(--r); overflow: hidden; background: var(--sand); height: clamp(200px, 44vh, 520px); }
.s-hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 46% center; }
.s-author-card h3 { margin-top: 14px; font-size: 18px; }
.s-author-card p { font-size: 14px; line-height: 1.45; color: var(--ink2); margin: 4px 0 0; }
.s-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; }
.s-hero .s-stats { margin-top: 0; }
.s-stat { background: var(--dark); color: #EDEBE6; border-radius: var(--r); padding: 22px 24px; }
.s-hero .s-stat { padding: clamp(10px, 1.6vh, 16px) 20px; }
.s-hero .s-stat b { font-size: clamp(18px, min(1.8vw, 3.2vh), 26px); }
.s-hero .s-stat span { margin-top: 6px; font-size: 14px; }
.s-hero .s-stat small { display: inline; margin: 0; font-size: 13px; }
.s-stat b { display: block; font: 700 clamp(20px, 2vw, 28px)/1.1 var(--mono); color: #fff; white-space: nowrap; }
.s-stat span { display: block; margin-top: 10px; font-size: 15px; line-height: 1.3; }
.s-stat small { display: block; margin-top: 6px; font-size: 12px; color: #9EA2A7; }
.s-logos { margin: 0; font-size: 14px; color: var(--muted); }
.s-logos b { color: var(--ink2); font-weight: 600; }
@media (max-width: 900px) {
  .s-hero { min-height: 0; }
  .s-hero-grid { grid-template-columns: 1fr; }
  .s-hero-photo { height: auto; aspect-ratio: 16/10; }
  .s-calc-fields { grid-template-columns: 1fr 1fr; }
  .s-calc-out { grid-column: 1 / -1; }
}
@media (max-width: 760px) { .s-stats { grid-template-columns: 1fr; } }

/* Cards and grids */
.s-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.s-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.s-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .s-grid-3, .s-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .s-grid-2, .s-grid-3, .s-grid-4 { grid-template-columns: 1fr; } }
.s-card { background: var(--paper); border-radius: var(--r); padding: 26px; }
.s-card h3 { margin-bottom: 10px; }
.s-card p:last-child { margin-bottom: 0; }
.s-card-num { font: 700 14px var(--mono); color: var(--accent); margin-bottom: 14px; display: block; }
.s-sec-dark .s-card { background: var(--dark2); }
.s-quote { border-left: 4px solid var(--accent); padding: 4px 0 4px 22px; margin: 32px 0 0; font-size: 20px; font-weight: 500; max-width: 820px; }
.s-quote cite { display: block; margin-top: 10px; font-size: 15px; font-style: normal; color: var(--muted); font-weight: 400; }

/* Pains checklist */
.s-pains { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 760px) { .s-pains { grid-template-columns: 1fr; } }
.s-pain { display: flex; gap: 14px; align-items: flex-start; background: var(--paper); border-radius: 12px; padding: 18px 20px; cursor: pointer; border: 2px solid transparent; transition: border-color .15s; font-size: 17px; }
.s-pain input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin-top: 2px; }
.s-pain:has(input:checked) { border-color: var(--accent); }
.s-pains-out { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; font-size: 19px; }
.s-pains-out b { font-family: var(--mono); color: var(--accent); }

/* Triggers */
.s-trig { border-top: 2px solid var(--ink); padding-top: 18px; }
.s-trig h3 { font-size: 19px; margin-bottom: 8px; }
.s-trig p { font-size: 16px; color: var(--ink2); }

/* Cause filter */
.s-causes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.s-causes span { padding: 12px 18px; border-radius: 999px; background: var(--dark2); color: #A9ADB2; text-decoration: line-through; text-decoration-color: #6B7076; }
.s-causes span.on { background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; }

/* Steps */
.s-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: st; }
@media (max-width: 900px) { .s-steps { grid-template-columns: 1fr; } }
.s-step { background: var(--paper); border-radius: var(--r); padding: 28px; display: flex; flex-direction: column; }
.s-step .s-card-num::before { counter-increment: st; content: "Шаг " counter(st); }
.s-step p { color: var(--ink2); }
.s-step-out { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-weight: 600; }

/* Cases */
.s-case { background: var(--paper); border-radius: var(--r); padding: 26px; display: flex; flex-direction: column; text-decoration: none; color: var(--ink) !important; transition: transform .15s, box-shadow .15s; }
.s-case:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(22, 24, 27, .08); }
.s-case-ind { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.s-case h3 { font-size: 24px; margin: 6px 0 18px; }
.s-case-m { border-top: 1px solid var(--line); padding: 12px 0; }
.s-case-m b { display: block; font: 700 22px/1.15 var(--mono); color: var(--accent); }
.s-case-m span { font-size: 15px; color: var(--ink2); }
.s-case-q { margin-top: auto; padding-top: 14px; font-size: 15px; font-style: italic; color: var(--ink2); }
.s-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.s-filter button { font: 500 15px var(--sans); padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; color: var(--ink); }
.s-filter button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Case page */
.s-case-hero { padding: 48px 0 32px; }
.s-case-hero h1 { font-size: clamp(30px, 4vw, 46px); max-width: 900px; }
.s-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 32px 0; }
.s-results { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.s-results li { background: var(--paper); border-radius: 10px; padding: 14px 18px 14px 44px; position: relative; }
.s-results li::before { content: ""; position: absolute; left: 18px; top: 22px; width: 12px; height: 3px; background: var(--accent); }
.s-video { position: relative; aspect-ratio: 16/9; border-radius: var(--r); overflow: hidden; background: #000; }
.s-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Prose (articles, case bodies) */
.s-prose { max-width: 760px; font-size: 18px; line-height: 1.7; }
.s-prose h2 { font-size: 30px; margin: 1.6em 0 .6em; }
.s-prose h3 { font-size: 23px; margin: 1.4em 0 .5em; }
.s-prose img { border-radius: 10px; margin: 1.4em 0; }
.s-prose ul, .s-prose ol { padding-left: 1.3em; }
.s-prose li { margin-bottom: .4em; }
.s-prose blockquote { border-left: 4px solid var(--accent); margin: 1.4em 0; padding: 2px 0 2px 20px; font-weight: 500; }
.s-prose table { border-collapse: collapse; width: 100%; font-size: 16px; }
.s-prose td, .s-prose th { border: 1px solid var(--line); padding: 8px 10px; }
.s-prose a { color: var(--accent); }
.s-article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; }
@media (max-width: 960px) { .s-article-grid { grid-template-columns: 1fr; } }
.s-aside-cta { position: sticky; top: 96px; background: var(--dark); color: #EDEBE6; border-radius: var(--r); padding: 24px; }
.s-aside-cta h3 { font-size: 20px; margin-bottom: 10px; color: #fff; }
.s-aside-cta p { font-size: 15px; color: #C9CCCF; }

/* Article list */
.s-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .s-posts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .s-posts { grid-template-columns: 1fr; } }
.s-post { background: var(--paper); border-radius: var(--r); padding: 22px; text-decoration: none; color: var(--ink) !important; display: flex; flex-direction: column; gap: 10px; }
.s-post:hover { box-shadow: 0 10px 30px rgba(22, 24, 27, .08); }
.s-post h3 { font-size: 19px; line-height: 1.3; }
.s-post p { font-size: 15px; color: var(--ink2); margin: 0; }
.s-post small { color: var(--muted); font-size: 13px; margin-top: auto; }
.s-pager { display: flex; gap: 8px; margin-top: 32px; flex-wrap: wrap; }
.s-pager a, .s-pager span { padding: 8px 14px; border-radius: 8px; background: var(--paper); text-decoration: none; }
.s-pager .on { background: var(--ink); color: #fff; }

/* Videos */
.s-vid { background: var(--paper); border-radius: var(--r); overflow: hidden; }
.s-vid-thumb { position: relative; aspect-ratio: 16/9; background: #000 center/cover no-repeat; border: 0; width: 100%; cursor: pointer; display: block; padding: 0; }
.s-vid-thumb::after { content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(178, 58, 10, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/28px no-repeat; }
.s-vid-thumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.s-vid p { padding: 14px 18px 18px; margin: 0; font-size: 15px; font-weight: 500; }

/* Books */
.s-books { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; align-items: end; }
@media (max-width: 960px) { .s-books { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .s-books { grid-template-columns: repeat(2, 1fr); } }
.s-book img { box-shadow: 0 14px 30px rgba(22, 24, 27, .18); border-radius: 3px; margin: 0 auto; max-height: 300px; }
.s-book h4 { font-size: 16px; margin-top: 16px; line-height: 1.3; }
.s-book p { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.s-book-row { display: grid; grid-template-columns: 180px 1fr; gap: 28px; background: var(--paper); border-radius: var(--r); padding: 28px; align-items: start; }
.s-book-row img { box-shadow: 0 14px 30px rgba(22, 24, 27, .18); border-radius: 3px; }
@media (max-width: 640px) { .s-book-row { grid-template-columns: 1fr; } .s-book-row img { max-width: 180px; } }
.s-price { font: 700 22px var(--mono); }

/* Delivery / lists */
.s-list { list-style: none; padding: 0; margin: 0; }
.s-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.s-sec-dark .s-list li { border-color: #33373D; }
.s-cols { columns: 2; column-gap: 40px; }
@media (max-width: 760px) { .s-cols { columns: 1; } }
.s-anchors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.s-anchors a { padding: 8px 14px; border-radius: 999px; background: var(--paper); font-size: 15px; text-decoration: none; }
.s-cascade { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 600; margin: 24px 0; }
.s-cascade span { background: var(--paper); padding: 12px 18px; border-radius: 10px; }
.s-cascade i { font-style: normal; color: var(--accent); }
.s-tiers .s-card { display: flex; flex-direction: column; }
.s-tiers .s-card .s-muted { font-size: 15px; }
.s-tag { display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--sand); margin-bottom: 14px; }

/* Pricing */
.s-price-card { background: var(--paper); border-radius: var(--r); padding: 24px; }
.s-price-card h3 { font-size: 20px; }
.s-price-card p { font-size: 15px; color: var(--ink2); margin: 10px 0 18px; }
.s-price-card b { font-family: var(--mono); color: var(--accent); }

/* Author */
.s-author { display: grid; grid-template-columns: 360px 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .s-author { grid-template-columns: 1fr; } .s-author img { max-width: 360px; } }
.s-author img { border-radius: var(--r); }
.s-creds li { padding: 12px 0 12px 30px; border-bottom: 1px solid var(--line); position: relative; }
.s-creds li::before { content: ""; position: absolute; left: 0; top: 22px; width: 14px; height: 3px; background: var(--accent); }
.s-timeline { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; margin-top: 32px; }
@media (max-width: 860px) { .s-timeline { grid-template-columns: repeat(2, 1fr); } }
.s-timeline div { border-top: 3px solid var(--accent); padding: 14px 14px 0 0; }
.s-timeline b { display: block; font: 700 22px var(--mono); }
.s-timeline span { font-size: 15px; color: var(--ink2); }
.s-sec-dark .s-timeline span { color: #C9CCCF; }

/* FAQ */
.s-faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.s-faq summary { font-size: 20px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.s-faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent); font-size: 24px; line-height: 1; }
.s-faq details[open] summary::after { content: "−"; }
.s-faq details p { margin: 14px 0 0; color: var(--ink2); max-width: 820px; }

/* Forms */
.s-form { display: grid; gap: 14px; }
.s-form label span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.s-form label em { font-style: normal; opacity: .7; }
.s-form input, .s-form textarea, .s-form select { width: 100%; font: 400 17px var(--sans); padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #FAF9F6; color: var(--ink); }
.s-form input:focus, .s-form textarea:focus, .s-calc input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.s-form .s-btn { justify-self: start; }
.s-consent { font-size: 13px; color: var(--muted); margin: 0; }
.s-form-msg { margin: 0; font-weight: 600; }
.s-form-msg.ok { color: var(--ok); }
.s-form-msg.err { color: var(--accent); }
.s-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.s-final { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .s-final { grid-template-columns: 1fr; } }
.s-final .s-form-box { background: var(--paper); color: var(--ink); border-radius: var(--r); padding: 28px; }

/* Modal */
.s-modal { position: fixed; inset: 0; z-index: 100; background: rgba(22, 24, 27, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.s-modal[hidden] { display: none; }
.s-modal-box { position: relative; background: var(--paper); border-radius: var(--r); padding: 32px; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; }
.s-modal-box h3 { margin-bottom: 8px; padding-right: 30px; }
.s-modal-x { position: absolute; top: 14px; right: 16px; border: 0; background: none; font-size: 32px; line-height: 1; cursor: pointer; color: var(--muted); }

/* Diagnostics */
.s-diag { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
@media (max-width: 980px) { .s-diag { grid-template-columns: 1fr; } }
.s-dblock { background: var(--paper); border-radius: var(--r); padding: 26px; margin-bottom: 16px; }
.s-dblock h3 { font-size: 20px; display: flex; gap: 12px; align-items: baseline; }
.s-dblock h3 i { font: 700 15px var(--mono); font-style: normal; color: var(--accent); }
.s-dblock > p { font-size: 15px; color: var(--muted); margin: 6px 0 14px; }
.s-dtally { font-size: 14px; color: var(--muted); }
.s-q { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); font-size: 16px; }
.s-q > span:first-child { font: 600 13px var(--mono); color: var(--muted); }
.s-yn { display: flex; gap: 6px; }
.s-yn button { font: 600 14px var(--sans); padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #FAF9F6; cursor: pointer; min-width: 52px; color: var(--ink); }
.s-yn button.y[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.s-yn button.n[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (max-width: 560px) { .s-q { grid-template-columns: 24px 1fr; } .s-yn { grid-column: 2; } }
.s-opt { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; font-size: 16px; }
.s-opt input { accent-color: var(--accent); width: 18px; height: 18px; margin-top: 3px; flex: none; }
.s-dres { position: sticky; top: 92px; background: var(--dark); color: #EDEBE6; border-radius: var(--r); padding: 24px; }
.s-dres h3 { color: #fff; font-size: 18px; }
.s-dres dl { margin: 16px 0 0; display: grid; gap: 12px; }
.s-dres dt { font-size: 13px; color: #9EA2A7; }
.s-dres dd { margin: 2px 0 0; font-weight: 600; }
.s-dres .s-dloss { font: 700 26px var(--mono); color: #FF8A5B; }
.s-quad { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 16px; }
.s-quad div { font-size: 12px; padding: 10px; border-radius: 8px; background: var(--dark2); color: #9EA2A7; min-height: 56px; }
.s-quad div.on { background: var(--accent); color: #fff; font-weight: 600; }
.s-dfc { font-size: 14px; color: #C9CCCF; margin-top: 14px; }
.s-dfc b { color: #fff; }
.s-dres .s-btn { width: 100%; margin-top: 18px; }
.s-dres .s-btn-ghost { margin-top: 8px; }
.s-dcalc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .s-dcalc { grid-template-columns: 1fr; } }
.s-dcalc input, .s-dcard input { width: 100%; font: 400 16px var(--sans); padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #FAF9F6; }
.s-dcard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .s-dcard { grid-template-columns: 1fr; } }
.s-dcard label span, .s-dcalc label span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.s-report { display: none; }
@media print {
  .s-head, .s-foot, .s-modal, .s-diag, .s-noprint { display: none !important; }
  .s-report { display: block !important; font-size: 13px; }
  body.s { background: #fff; }
  .s-report table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
  .s-report td, .s-report th { border-bottom: 1px solid #ccc; padding: 5px 6px; text-align: left; vertical-align: top; }
  .s-report h1 { font-size: 22px; } .s-report h2 { font-size: 16px; margin-top: 18px; }
}

/* Camera / app pages */
.s-phone { max-width: 300px; margin: 0 auto; border-radius: 36px; border: 10px solid var(--ink); overflow: hidden; background: var(--dark); aspect-ratio: 9/19; display: flex; align-items: center; justify-content: center; color: #9EA2A7; text-align: center; padding: 24px; font-size: 15px; }
.s-get { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 32px 20px; max-width: 520px; margin: 0 auto; }
.s-get h1 { font-size: 34px; }
.s-get ol { padding-left: 1.2em; font-size: 17px; }
.s-get ol li { margin-bottom: 10px; }
.s-get .s-btn { width: 100%; padding: 20px; font-size: 19px; }

/* Footer */
.s-foot { background: var(--dark); color: #C9CCCF; padding: 56px 0 28px; margin-top: 0; }
.s-foot .s-logo { color: #fff !important; }
.s-foot a { text-decoration: none; }
.s-foot a:hover { color: #fff; }
.s-foot-grid { display: grid; grid-template-columns: 1.2fr 1.5fr 1fr; gap: 40px; }
.s-foot-grid p { font-size: 15px; margin-top: 14px; max-width: 320px; }
.s-foot-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; font-size: 15px; align-content: start; }
.s-foot-contacts { display: grid; gap: 10px; font-size: 15px; align-content: start; }
.s-foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 44px; padding-top: 22px; border-top: 1px solid #33373D; font-size: 13px; color: #8A8E93; }
@media (max-width: 860px) { .s-foot-grid { grid-template-columns: 1fr; } }

/* Legacy (auth/content default views) keep DaisyUI look inside the site chrome */
.s-legacy main { background: var(--bg); }
.s-sec-white .s-case, .s-sec-white .s-price-card, .s-sec-white .s-post { background: var(--bg); }
.s-dres .s-btn-ghost { color: #fff !important; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7); }
.s-dres .s-btn-ghost:hover { background: #fff; color: var(--ink) !important; }
@media (max-width: 520px) {
  .s h1 { font-size: 29px; hyphens: auto; overflow-wrap: anywhere; }
  .s h2 { font-size: 26px; }
  .s-sec { padding: 60px 0; }
  .s-hero-sub, .s-lead, .s-sec-head p { font-size: 17px; }
  .s-wrap { padding: 0 16px; }
}
html, body.s { overflow-x: clip; }
.s-hero > .s-wrap { width: 100%; }

/* Home: logos row, tasks, split, chain, triad, feature case */
.s-logos { display: flex; align-items: center; flex-wrap: wrap; gap: 12px clamp(18px, 3vw, 40px); margin-top: clamp(10px, 2vh, 18px); }
.s-logos span { font-size: 13px; line-height: 1.25; font-weight: 600; color: var(--ink2); }
.s-logos img { height: 30px; width: auto; max-width: 120px; object-fit: contain; mix-blend-mode: multiply; }
.s-hero h1 { font-size: clamp(30px, min(3.9vw, 6.4vh), 60px); }
.s-hero-sub { font-size: clamp(17px, min(1.4vw, 2.5vh), 21px); max-width: 720px; }
.s-hero .s-btn-row { margin-top: clamp(16px, 3vh, 30px); }
.s-task { display: flex; gap: 16px; align-items: flex-start; background: var(--bg); border-radius: var(--r); padding: 22px; }
.s-task-ico { flex: none; width: 34px; height: 34px; color: var(--accent); }
.s-task h3 { font-size: 19px; margin-bottom: 6px; }
.s-task p { font-size: 16px; color: var(--ink2); margin: 0; }
.s-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.s-split .s-pains { grid-template-columns: 1fr; }
.s-panel { background: var(--dark); color: #EDEBE6; border-radius: var(--r); padding: 30px; }
.s-panel h3 { color: #fff; font-size: 24px; margin-bottom: 14px; }
.s-panel p { color: #C9CCCF; }
.s-panel .s-quote { margin-top: 22px; font-size: 17px; color: #fff; }
.s-panel .s-quote cite { color: #9EA2A7; }
@media (max-width: 900px) { .s-split { grid-template-columns: 1fr; } }
.s-causes-light { margin: 0 0 28px; }
.s-causes-light span { background: var(--sand); color: var(--muted); }
.s-chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; counter-reset: ch; }
.s-chain li { position: relative; background: var(--paper); border-radius: var(--r); padding: 20px 18px; counter-increment: ch; }
.s-chain li::before { content: "0" counter(ch); display: block; font: 700 14px var(--mono); color: var(--accent); margin-bottom: 10px; }
.s-chain li:not(:last-child)::after { content: "→"; position: absolute; right: -18px; top: 50%; transform: translateY(-50%); color: var(--accent); font-weight: 700; }
.s-chain li:last-child { background: var(--accent); color: #fff; }
.s-chain li:last-child::before, .s-chain li:last-child span { color: #fff; }
.s-chain b { display: block; font-size: 17px; line-height: 1.25; margin-bottom: 8px; }
.s-chain span { font-size: 15px; line-height: 1.4; color: var(--ink2); }
@media (max-width: 1000px) { .s-chain { grid-template-columns: 1fr; gap: 10px; } .s-chain li:not(:last-child)::after { display: none; } }
.s-note-strong { margin: 28px 0 0; font-size: 20px; font-weight: 600; }
.s-triad .s-card, .s-sec-white .s-grid-4 .s-card { background: var(--bg); }
.s-triad-on.s-card { background: var(--accent); color: #fff; }
.s-triad-on h3 { color: #fff; }
.s-triad-on .s-tag { background: rgba(255, 255, 255, .2); color: #fff; }
.s-sub-head { margin: 48px 0 18px; font-size: 26px !important; }
.s-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; background: var(--dark); color: #EDEBE6 !important; border-radius: var(--r); padding: 30px; margin-bottom: 16px; text-decoration: none; align-items: center; }
.s-feature h3 { color: #fff; font-size: 30px; margin: 6px 0 14px; }
.s-feature .s-case-ind { color: #9EA2A7; }
.s-feature-q { margin: 0; font-size: 18px; font-weight: 500; }
.s-feature-q cite { display: block; margin-top: 8px; font-size: 14px; font-style: normal; font-weight: 400; color: #9EA2A7; }
.s-feature-m { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.s-feature-m b { display: block; font: 700 clamp(18px, 1.9vw, 24px)/1.15 var(--mono); color: #FF8A5B; }
.s-feature-m span { display: block; margin-top: 8px; font-size: 14px; color: #C9CCCF; }
@media (max-width: 860px) { .s-feature { grid-template-columns: 1fr; } .s-feature-m { grid-template-columns: 1fr; } }
.s-case-more { justify-content: center; gap: 12px; background: var(--sand) !important; }
.s-case-more p { font-size: 15px; color: var(--ink2); margin: 0; }
.s-case-more .s-link { align-self: flex-start; }
.s-step-out small { display: block; margin-top: 6px; font-weight: 400; font-size: 14px; color: var(--muted); }
.s .s-hero-sub { margin: clamp(12px, 2vh, 20px) 0 0; }
.s .s-sub-head { margin: 48px 0 18px; }
.s .s-note-strong { margin: 28px 0 0; }
.s-step h3 { margin-bottom: 10px; }
.s-sec-white .s-calc { background: var(--bg); box-shadow: none; }
.s-feature-m { grid-template-columns: 1.5fr 1fr 1fr; }
.s-feature-m b { font-size: clamp(16px, 1.55vw, 21px); white-space: nowrap; }
@media (max-width: 860px) { .s-feature-m { grid-template-columns: 1fr; } }

/* Case logos */
.s-case-brand { height: 64px; display: flex; align-items: center; margin-bottom: 10px; }
.s-case-brand img { max-height: 56px; max-width: 200px; width: auto; height: auto; object-fit: contain; object-position: left center; }
.s-case-brand h3 { font-size: 24px; margin: 0; }
.s-sec-white .s-case-brand img { mix-blend-mode: multiply; }
.s-case-logo { max-height: 64px; max-width: 240px; width: auto; height: auto; margin-bottom: 18px; }
.s-feature-logo { display: inline-flex; background: #fff; border-radius: 10px; padding: 10px 14px; margin: 10px 0 14px; }
.s-feature-logo img { height: 52px; width: auto; }
.s-case .s-case-ind { margin-bottom: 8px; }

/* Home author portrait keeps its original proportions within the text column. */
.s-author .s-author-portrait { width: 100%; max-width: 360px; height: auto; justify-self: start; }
