/* HR Mind, шрифт Montserrat: кремовий фон, темно-синій, синій океан і золото; хмара на першому екрані, рамки-вікна, бігучий рядок. */

@font-face { font-family: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/assets/fonts/montserrat-cyrillic-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/assets/fonts/montserrat-latin-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --gap: clamp(36px, 4vw, 56px);
  --paper: #F4F0E7;
  --white: #FFFFFF;
  --ink: #102747;
  --ink-2: #3B4B66;
  --muted: #5F6B80;
  --line: #E3DBCB;
  --line-2: #CEC2A9;
  --soft: #ECE5D6;
  --accent: #1D5FA8;
  --accent-dark: #174E8C;
  --sky: #8FB3DE;
  --sun: #D9B65D;
  --dark-2: #1B355C;
  --dark-line: rgba(244, 240, 231, .18);
  --on-dark: #C5D0E2;
  --rose-bg: #FDECF1;
  --rose: #A3264B;
  --wrap: 1240px;
  --display: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --font: 'Montserrat', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--ink);
  background-color: var(--paper);
}
html { scrollbar-color: var(--accent) var(--paper); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 999px; border: 3px solid var(--paper); }
::selection { background: var(--sun); color: var(--ink); }
img, svg { display: block; max-width: 100%; }
figure { margin: 0; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink-2); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nw { white-space: nowrap; }

/* усі заголовки як на першому екрані: Montserrat середньої ваги, щільно */
h1, h2 { font-family: var(--display); font-weight: 500; letter-spacing: -0.035em; margin: 0; text-wrap: balance; }
h3 { font-weight: 600; margin: 0; }
h1 { font-size: clamp(1.9rem, 5.6vw, 4.6rem); line-height: 1.04; }
h2 { font-size: clamp(1.8rem, 3.8vw, 3.2rem); line-height: 1.08; }
h3 { font-size: 1.2rem; line-height: 1.3; }
p { margin: 0 0 1em; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: 0 1.6em;
  background: var(--ink); color: var(--white);
  border: 1.5px solid var(--ink); border-radius: 8px;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .15s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--white); transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn-light { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.btn-light:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn-link { font-weight: 500; color: inherit; }

/* ---------- шапка ---------- */
.top { position: relative; z-index: 2; background: var(--paper); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.08rem; letter-spacing: -0.01em; }
.logo svg { width: 28px; height: 28px; flex: none; }
.logo:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 34px); }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .96rem; }
.nav a:not(.btn):hover { text-decoration: underline; }
.nav .btn { min-height: 42px; padding: 0 1.25em; color: var(--white); }
.nav .btn:hover { color: var(--white); }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }

/* ---------- поява першого екрана ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }

/* «Детальніше» зі стрілкою вниз */
.scroll-cue { align-self: flex-start; display: inline-flex; align-items: center; gap: 12px; padding: 0 0 clamp(20px, 4vh, 40px); color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; animation: rise .9s .4s cubic-bezier(.2, .7, .2, 1) both; }
.scroll-arrow { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--ink); border-radius: 50%; transition: background-color .2s, color .2s; }
.scroll-arrow svg { animation: bob 2.2s ease-in-out infinite; }
.scroll-cue:hover { color: var(--ink); }
.scroll-cue:hover .scroll-arrow { background: var(--ink); color: var(--paper); }
@keyframes bob { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }

/* рамка-вікно: смужка з кружечками, як у вікон на першому екрані */
.frame { background: var(--white); border: 1.5px solid var(--ink); border-radius: 16px; overflow: hidden; }
.bar { display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; background: var(--ink); color: var(--on-dark); font-size: .8rem; }
.bar i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #E07B6A; }
.bar i:nth-child(2) { background: var(--sun); }
.bar i:nth-child(3) { background: var(--sky); }
.bar i:nth-child(4) { background: #8DBE9E; }
.bar span { margin-left: 12px; padding: 2px 14px; border-radius: 6px; background: rgba(244, 240, 231, .12); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame-in { padding: clamp(26px, 3.6vw, 48px); }
@media (max-width: 400px) { .frame-in { padding: 24px 18px; } }

/* поява під час прокрутки (site.js): кожна частина виринає окремо */
.js-reveal [data-reveal] { opacity: 0; transform: translateY(48px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }
.js-reveal [data-reveal].reveal-slow { transition-duration: 1.25s; }
/* кнопка «Показати всі тести» повільно зникає */

/* ---------- секції ---------- */
/* однаковий проміжок між усіма блоками головної */
.sec { padding: var(--gap) 0 0; }
#tests { border-top: 1px solid var(--line); }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 22px 40px; margin-bottom: clamp(28px, 4vw, 52px); }
/* заголовки розділів у рамці-вікні; рамка по ширині тексту, після розкриття тестів розтягується під фільтр */
.sec-head.frame { display: block; width: fit-content; max-width: 100%; }
.sec-head-in { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 22px 40px; }
.sec-head-in p { margin-bottom: 0; }
.sec-head.frame:has(.chips:not([hidden])) { width: auto; }
.sec-head h2 { max-width: 11em; }
/* на ноутбуці заголовок тестів в один рядок */
@media (min-width: 900px) { #tests .sec-head h2 { max-width: none; white-space: nowrap; } }
.sec-head p { color: var(--ink-2); max-width: 32em; margin: 1.1em 0 0; }
/* «Що можна замовити?»: заголовок як у тестів, під ним три стопки карток, які гортаються (home.js) */
#services .sec-head.frame { width: auto; }
.stacks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 900px) { .stacks { grid-template-columns: minmax(0, 1fr); gap: 26px; } }
.stack-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.stack-cards .tile-a { height: 100%; min-height: 190px; }
.stack-cards .tile-t { font-size: clamp(1.1rem, 1.5vw, 1.3rem); }
.stack-cards .tile-m { flex-direction: row; justify-content: flex-end; }
@media (max-width: 560px) { .stack-cards .tile-a { min-height: 150px; } }
/* з JS картки лежать одна на одній: дві наступні визирають знизу, верхня відлітає ліворуч */
.stack.is-live .stack-cards { gap: 0; padding-bottom: 20px; touch-action: pan-y; }
.stack.is-live .stack-cards > li { grid-area: 1 / 1; min-width: 0; transform-origin: 50% 100%; transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .5s ease; }
.stack-cards > li[data-pos="0"] { z-index: 5; }
.stack-cards > li[data-pos="1"] { z-index: 4; transform: translateY(10px) scale(.96); }
.stack-cards > li[data-pos="2"] { z-index: 3; transform: translateY(20px) scale(.92); }
.stack-cards > li[data-pos="back"] { z-index: 1; transform: translateY(20px) scale(.92); opacity: 0; }
.stack-cards > li[data-pos="out"] { z-index: 6; transform: translateX(-30%) rotate(-5deg); opacity: 0; }
.stack-cards > li[data-pos="in"] { z-index: 6; transform: translateX(-30%) rotate(-5deg); opacity: 0; transition: none; }
.stack-cards > li[data-pos="1"] .tile-a > *, .stack-cards > li[data-pos="2"] .tile-a > *, .stack-cards > li[data-pos="back"] .tile-a > * { visibility: hidden; }
.stack-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.stack-nav[hidden] { display: none; }
.stack-btn { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--white); color: var(--ink); cursor: pointer; transition: background-color .2s, color .2s; }
.stack-btn:hover { background: var(--ink); color: var(--white); }
.stack-count { font-size: .9rem; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* фільтр */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 38px; padding: 0 16px; border: 1px solid var(--line-2); background: transparent; border-radius: 8px; font-size: .9rem; font-weight: 500; color: var(--ink); cursor: pointer; transition: border-color .2s, background-color .2s, color .2s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: var(--white); }

/* плитки тестів */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

@media (max-width: 980px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile-a {
  display: flex; flex-direction: column; height: 100%; min-height: 220px;
  padding: 22px 24px 20px; background: var(--white); border: 1.5px solid var(--ink); border-radius: 16px;
  color: var(--ink); text-decoration: none; transition: background-color .25s, color .25s, border-color .25s;
}
a.tile-a:hover { background: var(--accent); color: var(--white); border-color: var(--ink); transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--ink); }
.tile-cat { font-size: .8rem; color: var(--muted); margin-bottom: 14px; transition: color .25s; }
.tile-t { font-family: var(--display); font-weight: 500; letter-spacing: -0.025em; font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.15; }
.tile-d { font-size: .93rem; line-height: 1.5; color: var(--ink-2); margin-top: 10px; transition: color .25s; }
.tile-m { margin-top: auto; padding-top: 18px; font-family: var(--mono); font-size: .74rem; color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; gap: 10px; transition: color .25s; }
.tile-m b { font-family: var(--font); font-size: .9rem; font-weight: 600; color: var(--ink); transition: color .25s; }
a.tile-a:hover .tile-cat, a.tile-a:hover .tile-m { color: #DCE8F7; }
a.tile-a:hover .tile-d, a.tile-a:hover .tile-m b { color: var(--white); }
.tile.is-soon .tile-a { background: transparent; border-style: dashed; }
.tiles-note { margin: 22px 0 0; font-size: .88rem; color: var(--muted); }
/* телефон: після базових правил, інакше вони перекривають ці */
@media (max-width: 560px) {
  .tiles { gap: 8px; }
  .tile-a { min-height: 150px; padding: 14px 14px 13px; border-radius: 14px; }
  .tile-d { display: none; }
  .tile-t { font-size: 1.22rem; line-height: 1.05; }
  .tile-cat { font-size: .72rem; margin-bottom: 8px; }
  .tile-m { font-size: .66rem; flex-direction: column; gap: 4px; padding-top: 12px; }
  .tile-m b { font-size: .84rem; }
}

/* AI блок: темне вікно в рамці, пункти під заголовком */
.ai-win { background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); border-radius: 16px; overflow: hidden; box-shadow: 8px 8px 0 var(--accent); }
.ai-win .bar { background: var(--dark-2); }
.ai-in { padding: clamp(26px, 4.6vw, 64px); }
.ai-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 26px clamp(32px, 5vw, 80px); align-items: end; }
@media (max-width: 900px) { .ai-head { grid-template-columns: minmax(0, 1fr); } }
.ai a:not(.btn) { color: var(--paper); }
.ai-tag { display: inline-block; margin-bottom: 22px; padding: 4px 12px; border: 1px solid rgba(217, 182, 93, .55); color: var(--sun); font-size: .84rem; border-radius: 6px; }
.ai h2 { max-width: 10em; }
@media (max-width: 360px) { .ai h2 { font-size: 1.6rem; } }
.ai-lead { color: var(--on-dark); margin: 0 0 1.6em; max-width: 30em; font-size: 1.05rem; }

@media (max-width: 520px) { .ai-in { padding: 26px 18px; }   }
.ai-note { margin: clamp(28px, 3.6vw, 44px) 0 0; padding: 14px 18px; border: 1px dashed rgba(244, 240, 231, .3); border-radius: 12px; font-size: .92rem; color: var(--on-dark); }

/* фінальний заклик: великий темний блок */
.final { padding: var(--gap) 0; }
.final-box { position: relative; overflow: hidden; background: var(--accent); color: var(--white); border: 1.5px solid var(--ink); border-radius: 16px; padding: clamp(32px, 6vw, 80px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .final-box { grid-template-columns: 1fr; } }
.final-box h2 { font-size: clamp(2rem, 4.8vw, 3.8rem); max-width: 10.5em; }
.final-box p { color: #E7EEF8; margin: 1.2em 0 0; max-width: 32em; font-size: 1.05rem; }
.final-act { display: flex; flex-wrap: wrap; gap: 10px; }
.final-box .btn { background: var(--sun); border-color: var(--ink); color: var(--ink); }
.final-box .btn:hover { background: var(--white); border-color: var(--ink); color: var(--ink); }
.final-box .btn-ghost { background: var(--white); border-color: var(--ink); color: var(--ink); }
.final-box .btn-ghost:hover { background: var(--sun); border-color: var(--ink); }

/* підвал */
.foot { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: .86rem; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.foot p { margin: 0; max-width: 48em; }
.foot a { color: var(--ink); }

/* ---------- сторінка тесту ---------- */
.test { max-width: 800px; margin: 0 auto; padding: clamp(16px, 3vw, 36px) clamp(18px, 4vw, 40px) 40px; }
.crumbs { font-size: .86rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.intro-card { background: var(--white); border: 1.5px solid var(--ink); border-radius: 16px; padding: clamp(26px, 4.5vw, 52px); }
.intro-card h1 { font-size: clamp(1.8rem, 4.4vw, 3rem); line-height: 1.1; }
.intro-about { font-size: 1.08rem; color: var(--ink-2); margin: 1.2em 0 1.4em; }
.facts { list-style: none; margin: 0 0 1.8em; padding: 0; display: grid; gap: 6px; }
.facts li { position: relative; padding-left: 20px; font-size: 1rem; font-weight: 500; }
.facts li::before { content: ''; position: absolute; left: 2px; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.intro-act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.intro-act .btn { min-width: 220px; }
.btn-text { background: none; border: 0; padding: 8px 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 500; }
.method { margin: 1.8em 0 0; padding-top: 1.2em; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
.privacy { font-size: .88rem; color: var(--muted); margin: 1em 0 0; }
.care { margin: 1.4em 0 0; padding: 14px 16px; background: var(--rose-bg); color: var(--rose); font-size: .93rem; border-radius: 14px; }
.care a { color: var(--rose); font-weight: 600; }

/* опитування */
.q-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.q-back { background: none; border: 0; padding: 8px 0; color: var(--ink-2); font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.q-back:disabled { visibility: hidden; }
.q-count { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.q-bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-bottom: 18px; }
.q-bar i { display: block; height: 100%; background: var(--accent); transition: width .25s ease; }
.q-card { background: var(--white); border: 1.5px solid var(--ink); border-radius: 16px; padding: clamp(24px, 4.5vw, 46px); }
.q-prompt { color: var(--muted); font-size: .97rem; margin-bottom: .7em; }
.q-text { font-family: var(--font); text-transform: none; letter-spacing: 0; font-size: clamp(1.3rem, 2.7vw, 1.65rem); line-height: 1.32; font-weight: 600; margin-bottom: 26px; outline: none; }
.q-opts { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px;
  padding: 10px 18px; text-align: left; background: var(--white);
  border: 1px solid var(--line-2); border-radius: 16px; cursor: pointer; line-height: 1.35;
  transition: background-color .15s, border-color .15s, color .15s;
}
.opt:hover { border-color: var(--ink); }
.opt[aria-checked='true'] { background: var(--accent); color: var(--white); border-color: var(--ink); font-weight: 600; }
.opt-k { flex: none; width: 26px; height: 26px; display: grid; place-items: center; font-family: var(--mono); font-size: .74rem; color: var(--muted); border: 1px solid var(--line-2); border-radius: 50%; }
.opt[aria-checked='true'] .opt-k { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.q-opts.is-compact { grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); gap: 6px; }
.q-opts.is-compact .opt { justify-content: center; padding: 0; min-height: 52px; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
@media (max-width: 560px) { .q-opts.is-compact.is-many { grid-template-columns: repeat(5, minmax(0, 1fr)); } .q-opts.is-compact { gap: 5px; } }
.q-ends { display: flex; justify-content: space-between; gap: 16px; font-size: .85rem; color: var(--muted); margin-top: 10px; }
.q-ends span:last-child { text-align: right; }
.q-opts.is-pair { grid-template-columns: 1fr 1fr; gap: 12px; }
.q-opts.is-pair .opt { min-height: 120px; align-items: flex-start; padding: 16px 18px; font-size: 1.05rem; }
@media (max-width: 560px) { .q-opts.is-pair { grid-template-columns: 1fr; } .q-opts.is-pair .opt { min-height: 74px; } }
.q-hint { font-size: .8rem; color: var(--muted); margin: 18px 0 0; }
@media (hover: none), (max-width: 640px) { .q-card > .q-hint { display: none; } }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chk { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 10px 16px; text-align: left; background: var(--white); border: 1px solid var(--line-2); border-radius: 16px; cursor: pointer; line-height: 1.35; }
.chk:hover { border-color: var(--ink); }
.chk-box { flex: none; width: 22px; height: 22px; border: 1.5px solid var(--line-2); border-radius: 7px; background: var(--white); position: relative; }
.chk[aria-pressed='true'] { border-color: var(--ink); }
.chk[aria-pressed='true'] .chk-box { background: var(--ink); border-color: var(--ink); }
.chk[aria-pressed='true'] .chk-box::after { content: ''; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid var(--paper); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.q-nav { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.q-nav .q-hint { margin: 0; }
body.is-quiz .more { display: none; }

/* результат */
.r-head { margin: 0; }
.r-title { font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.12; outline: none; }
.r-lead { font-size: 1.08rem; color: var(--ink-2); margin: 1em 0 0; }
.r-card { background: var(--white); border: 1.5px solid var(--ink); border-radius: 16px; padding: clamp(26px, 4.5vw, 46px); }
.r-card > * + * { margin-top: 32px; }

.meter { padding-top: 8px; }
.m-score { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.m-score b { font-family: var(--display); font-size: 3.2rem; line-height: 1; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.m-score span { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.m-track { position: relative; display: flex; gap: 2px; height: 14px; }
.m-seg { display: block; height: 100%; flex-grow: 0; flex-shrink: 1; }
.m-seg:first-child { border-radius: 7px 0 0 7px; }
.m-seg:nth-last-child(2) { border-radius: 0 7px 7px 0; }
.m-pin { position: absolute; top: -7px; bottom: -7px; width: 4px; margin-left: -2px; background: var(--ink); border-radius: 2px; box-shadow: 0 0 0 2px var(--white); }
.m-labels { display: flex; gap: 2px; margin-top: 12px; font-size: .82rem; line-height: 1.3; color: var(--muted); }
.m-lab { flex-grow: 0; flex-shrink: 1; min-width: 0; padding-right: 6px; }
.m-lab span { display: block; }
.m-lab small { font-family: var(--mono); font-size: .7rem; }
.m-lab.is-on { color: var(--ink); font-weight: 600; }
@media (max-width: 520px) { .m-labels { font-size: .74rem; } .m-lab small { display: none; } }

.bars { padding-top: 8px; }
.bars-title { font-size: 1.1rem; margin-bottom: 14px; }
.bar-row { display: grid; grid-template-columns: minmax(130px, 34%) minmax(0, 1fr) 56px; align-items: center; gap: 14px; padding: 7px 0; }
.b-label { font-size: .95rem; line-height: 1.3; }
.b-label small { display: block; color: var(--muted); font-size: .8rem; }
.bar-row.is-lead .b-label { font-weight: 600; }
.bar-row.is-lead .b-label::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--ink); vertical-align: .12em; }
.b-track { position: relative; height: 10px; background: var(--soft); border-radius: 5px; }
.b-track i { display: block; height: 100%; background: #6E9BD3; border-radius: 5px; }
.b-track.is-div i { position: absolute; top: 0; border-radius: 3px; }
.bar-row.is-lead .b-track i { background: var(--accent); }
.b-mark { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--ink); }
.b-val { text-align: right; font-family: var(--mono); font-size: .85rem; font-variant-numeric: tabular-nums; }
.bars-foot { font-size: .82rem; color: var(--muted); margin: 10px 0 0; }
@media (max-width: 520px) { .bar-row { grid-template-columns: 1fr 48px; gap: 4px 12px; } .b-label { grid-column: 1 / -1; } }

.quad svg { width: 100%; max-width: 380px; margin: 4px auto 0; overflow: visible; }
.quad .qz { fill: var(--soft); }
.quad .qz.is-on { fill: #C9DAF0; }
.quad .qframe { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.quad .qt { font: 500 13px var(--font); fill: var(--muted); }
.quad .qt.is-on { fill: var(--ink); font-weight: 600; }
.quad .qa { font: 500 13px var(--font); fill: var(--ink-2); }
.quad .qdot { fill: var(--ink); stroke: var(--white); stroke-width: 3; }
.quad line { stroke: var(--line-2); }

.r-sec h3 { margin-bottom: .5em; padding-top: 8px; }
.r-sec ul { margin: 0 0 1em; padding-left: 1.2em; }
.r-sec li { margin-bottom: .45em; }
.r-sec p:last-child { margin-bottom: 0; }

.alert h3 { color: var(--rose); }
.alert-box { background: var(--rose-bg); border-radius: 14px; padding: 18px 20px; }
.alert ul { list-style: none; padding: 0; margin: .6em 0 .8em; }
.alert li a { font-weight: 600; font-size: 1.15rem; color: var(--rose); margin-right: 6px; white-space: nowrap; }
.alert p { margin: .5em 0 0; }
.alert a { color: var(--rose); }

.r-note { font-size: .86rem; color: var(--muted); }
.r-actions { padding-top: 26px; border-top: 1px solid var(--line); }
.r-share-t { font-weight: 600; margin-bottom: 10px; }
.r-share { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.share { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 500; cursor: pointer; transition: border-color .2s; }
.share:hover { border-color: var(--ink); color: var(--ink); }
.share.is-native { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.share.is-mobile { display: none; }
@media (hover: none) and (pointer: coarse) { .share.is-mobile { display: inline-flex; } }

.cta-card { margin-top: 28px; background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); border-radius: 16px; box-shadow: 8px 8px 0 var(--accent); padding: clamp(28px, 4.5vw, 48px); }
.cta-card h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.025em; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.15; }
.cta-card p { color: var(--on-dark); margin: 1em 0 1.5em; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.cta-card .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta-card .btn:hover { background: transparent; color: var(--paper); }
.cta-card .btn-link { color: var(--paper); }

/* інші тести */
.more { max-width: var(--wrap); margin: 0 auto; padding: clamp(40px, 6vw, 72px) clamp(18px, 4vw, 40px) clamp(28px, 4vw, 40px); }
.more h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.more-head { width: fit-content; max-width: 100%; margin-bottom: 24px; }
.more-head .frame-in { padding: clamp(20px, 2.6vw, 30px) clamp(24px, 3vw, 36px); }
.home-link { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px) clamp(48px, 6vw, 72px); }
body.is-quiz .home-link { padding-top: 8px; }

/* ---------- вікно заявки ---------- */
.lead {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto;
  margin: auto; padding: clamp(26px, 4vw, 38px); border: 0; border-radius: 16px;
  background: var(--paper); color: var(--ink); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .5);
}
.lead::backdrop { background: rgba(16, 39, 71, .6); }
html.lead-open { overflow: hidden; }
.lead h2 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); line-height: 1.15; padding-right: 40px; }
.lead-x {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px;
  border: 1px solid var(--line-2); border-radius: 50%; background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink);
}
.lead-x:hover { border-color: var(--ink); }
.lead-lead { color: var(--ink-2); margin: .9em 0 1.3em; font-size: .98rem; }
.lead-f { margin-bottom: 14px; }
.lead-f label { display: block; font-size: .88rem; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.lead-f input, .lead-f textarea {
  display: block; width: 100%; padding: 13px 16px; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--white); border: 1px solid var(--line-2); border-radius: 14px;
}
.lead-f textarea { resize: vertical; min-height: 104px; }
.lead-f input:focus, .lead-f textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
.lead-f ::placeholder { color: #9AA3B2; }
.lead-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lead-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 8px; }
.lead-row .btn[disabled] { opacity: .6; cursor: progress; }
.lead-msg { margin: 0; font-size: .92rem; color: var(--muted); }
.lead-msg.is-bad { color: var(--rose); }
.lead-ok { font-size: 1.05rem; margin: 1em 0 1.4em; padding: 14px 16px; background: var(--soft); border-radius: 14px; }

/* ---------- перший екран: світла хмара на яскраво-синьому тлі, заголовок і одне речення ---------- */
.top-dark { background: var(--ink); }
.top-dark .logo, .top-dark .logo:hover, .top-dark .nav a:not(.btn) { color: var(--paper); }
.top-dark .nav .btn { background: var(--sun); border-color: var(--sun); color: var(--ink); box-shadow: none; }
.top-dark .nav .btn:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.hero { position: relative; display: flex; min-height: calc(100vh - 76px); min-height: calc(100svh - 76px); padding: 0 clamp(8px, 4vw, 64px) clamp(12px, 3vh, 32px);
  background-color: var(--accent); }
.hero-cloud { position: relative; flex: 1; width: 100%; max-width: 1560px; margin: 0 auto; display: flex; background: #FBF8F2; border-radius: 48px; }
.hero-cloud.is-drawn { background: none; }
.cloud-bg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.cloud-bg path { fill: #FBF8F2; }
.hero-stage { position: relative; z-index: 1; flex: 1; display: flex; justify-content: center; padding: clamp(60px, 10vh, 110px) clamp(40px, 6vw, 96px) clamp(36px, 6vh, 64px); }
.hero-center { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 1000px; text-align: center; }
.hero-main { margin: auto 0; padding: 0 0 clamp(18px, 4vh, 40px); }
.hero h1 { font-weight: 500; letter-spacing: -0.04em; line-height: 1.04; font-size: clamp(2rem, min(6vw, 9vh), 5.6rem); max-width: 11em; margin: 0 auto; animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
@media (min-width: 600px) { .hero h1 .nw-lg { white-space: nowrap; } }
.hero-lead { margin: clamp(18px, 3.6vh, 34px) auto 0; max-width: 34em; font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--accent); font-weight: 500; text-wrap: balance; animation: rise .9s .12s cubic-bezier(.2, .7, .2, 1) both; }
.hero .scroll-cue { align-self: center; padding: 0; }
.hero .scroll-arrow { background: var(--sun); border-color: var(--ink); color: var(--ink); }
.hero .scroll-cue:hover .scroll-arrow { background: var(--ink); color: var(--white); }
/* на телефоні хмара по висоті тексту, а не на весь екран: менше порожнього кремового */
@media (max-width: 700px) {
  .hero { min-height: 0; }
  .hero-stage { padding: 64px 26px 40px; }
  .hero-main { padding-bottom: 28px; }
}

/* бігучий рядок: темно-синій фон, яскраво-синя лінія */
.marquee { overflow: hidden; background: var(--ink); color: var(--white); border-block: 1.5px solid var(--accent); }
.marquee-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee-track span { flex: none; padding: 16px 0; font-family: var(--display); font-weight: 500; font-size: clamp(1rem, 2vw, 1.45rem); letter-spacing: -0.02em; white-space: nowrap; }
.marquee-track b { color: var(--sun); font-weight: 700; margin: 0 .7em; }
@keyframes marquee { to { transform: translateX(-50%); } }

.deco { position: absolute; pointer-events: none; z-index: 0; }
.final-box > * { position: relative; z-index: 1; }
.final-box > .deco { position: absolute; z-index: 0; right: clamp(-20px, 1vw, 20px); bottom: -2px; width: clamp(110px, 16vw, 210px); }
@media (max-width: 860px) { .final-box > .deco { width: 96px; right: 14px; } .final-box { padding-bottom: 150px; } }
@media (min-width: 861px) { .final-box { padding-right: clamp(150px, 19vw, 250px); } }
.foot { background: var(--paper); }
