/* Віктор Мицак: Харківський авангард.
   Кожен колір має роботу: синій це лікар, жовтий лише оплата,
   зелений це самодопомога, червоний лише криза. */

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

:root {
  --paper: #e8eae6;
  --paper-2: #dcdfd9;
  --ink: #131416;
  --ink-2: #3b3e43;
  --blue: #1c3c9e;
  --blue-ink: #1c3c9e;
  --on-blue: #eef0ec;
  --on-blue-2: #c9d1ec;
  --yellow: #f0c330;
  --yellow-press: #e0b21c;
  --green: #1f7356;
  --on-green: #eef0ec;
  --red: #b8302a;
  --red-text: #9e2620;
  --green-text: #1a6249;
  --on-red: #fff6f4;
  --rule: 2px solid var(--ink);
  --hair: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);

  --gutter: clamp(20px, 3.9vw, 56px);
  --max: 1440px;
  --course: clamp(72px, 9vw, 128px);

  --t-body: clamp(17px, 0.35vw + 15.6px, 19px);
  --t-small: 15px;
  --t-h1: clamp(64px, 10.4vw, 150px);
  --t-h2: clamp(44px, 6.2vw, 92px);
  --t-h3: clamp(22px, 1.1vw + 17px, 30px);
  --t-num: clamp(36px, 3vw + 16px, 56px);

  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15171b; --paper-2: #1d2025; --ink: #e6e8e3; --ink-2: #aeb2b8;
    --blue: #2547ad; --blue-ink: #9db2f2; --on-blue-2: #cbd4f0; --green: #1f7a5b; --red: #c9413a; --red-text: #ff9a90; --green-text: #79d4ab;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #15171b; --paper-2: #1d2025; --ink: #e6e8e3; --ink-2: #aeb2b8;
  --blue: #2547ad; --blue-ink: #9db2f2; --on-blue-2: #cbd4f0; --green: #1f7a5b; --red: #c9413a; --red-text: #ff9a90; --green-text: #79d4ab;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--t-body)/1.55 "Arsenal", "Segoe UI", system-ui, sans-serif;
  font-kerning: normal; text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: .18em; }
button { font: inherit; color: inherit; }
::selection { background: var(--yellow); color: #131416; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.on-blue :focus-visible, .on-green :focus-visible, .on-red :focus-visible { outline-color: var(--on-blue); }
.num { font-variant-numeric: lining-nums tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--yellow); color: #131416; padding: 10px 16px; font-weight: 700; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.h1 { font-weight: 700; font-size: var(--t-h1); line-height: .95; letter-spacing: -.028em; text-wrap: balance; }
.h2 { font-weight: 700; font-size: var(--t-h2); line-height: .92; letter-spacing: -.024em; text-wrap: balance; }
.h3 { font-weight: 700; font-size: var(--t-h3); line-height: 1.12; letter-spacing: -.01em; }
.lede { font-size: clamp(19px, .6vw + 16px, 24px); line-height: 1.45; max-width: 34em; }
.prose p + p { margin-top: .9em; }
.prose { max-width: 38em; }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-small); line-height: 1.5; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border: var(--rule); background: transparent;
  font-weight: 700; font-size: 18px; line-height: 1.1; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color .18s var(--ease), color .18s var(--ease), transform .12s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]:hover { background: transparent; color: inherit; }
.btn-pay { background: var(--yellow); border-color: #131416; color: #131416; }
.btn-pay:hover { background: var(--yellow-press); color: #131416; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ink); color: var(--paper); opacity: .88; }
.btn-paper { border-color: var(--on-blue); color: var(--on-blue); }
.btn-paper:hover { background: var(--on-blue); color: #131416; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 16px; }
.btn svg { flex: none; }
.link { font-weight: 700; text-decoration: underline; cursor: pointer; background: none; border: 0; padding: 0; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: var(--rule); }
.site-head .wrap { display: flex; align-items: center; gap: clamp(16px, 2.3vw, 34px); min-height: 68px; }
.brand { font-weight: 700; font-size: 25px; line-height: 1; text-decoration: none; margin-right: auto; letter-spacing: -.01em; white-space: nowrap; }
.brand small { display: block; font-weight: 400; font-size: 14px; color: var(--ink-2); margin-top: 3px; letter-spacing: 0; }
.nav { display: flex; gap: clamp(16px, 2.2vw, 32px); }
.nav a { text-decoration: none; font-size: 18px; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"], .nav a.is-active { border-bottom-color: currentColor; }
.icon-btn { width: 48px; height: 48px; display: inline-grid; place-items: center; border: var(--rule); background: transparent; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--ink); color: var(--paper); }
.theme-dark-ico { display: none; }
[data-theme="dark"] .theme-dark-ico { display: block; } [data-theme="dark"] .theme-light-ico { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-dark-ico { display: block; } :root:not([data-theme="light"]) .theme-light-ico { display: none; } }
.menu-btn { display: none; }
.mobile-nav { display: none; }
@media (max-width: 1080px) {
  .site-head .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .mobile-nav { border-top: var(--rule); }
  .mobile-nav[data-open] { display: block; }
  .mobile-nav a { display: block; padding: 16px var(--gutter); font-size: 22px; font-weight: 700; text-decoration: none; border-bottom: var(--hair); }
}
@media (max-width: 560px) {
  .site-head .head-pay .long { display: none; }
  .brand small { display: none; }
  .site-head .wrap { gap: 10px; }
  .theme-btn { display: none; }
}
@media (min-width: 561px) { .head-pay .short { display: none; } }

/* ---------- planes ---------- */
.on-blue { background: var(--blue); color: var(--on-blue); }
.on-green { background: var(--green); color: var(--on-green); }
.on-red { background: var(--red); color: var(--on-red); }
.on-blue .muted { color: var(--on-blue-2); }
.on-green .muted, .on-red .muted { color: color-mix(in srgb, currentColor 82%, transparent); }

/* ---------- courses ---------- */
.course { padding: var(--course) 0; }
.course + .course { border-top: var(--rule); }
.course-head { display: grid; gap: 20px; margin-bottom: clamp(36px, 4.4vw, 64px); }

/* ---------- ledger (price rows) ---------- */
.ledger { border-bottom: var(--rule); }
.ledger-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center;
  gap: 8px 24px; border-top: var(--rule); padding: 16px 0; min-height: 84px;
}
.ledger-name { font-weight: 700; font-size: clamp(20px, .5vw + 18px, 24px); line-height: 1.2; }
.ledger-name small { display: block; font-weight: 400; font-size: 16px; color: var(--ink-2); margin-top: 4px; line-height: 1.4; }
.ledger-price { font-weight: 700; font-size: var(--t-num); line-height: 1; text-align: right; white-space: nowrap; }
.ledger-price span { font-size: max(15px, .38em); font-weight: 400; margin-left: .2em; letter-spacing: 0; }
.ledger-row .btn { min-width: 150px; }
@media (max-width: 560px) {
  .ledger-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ledger-row .btn { grid-column: 1 / -1; width: 100%; }
}

/* ---------- dialog ---------- */
.dlg {
  width: min(760px, calc(100vw - 24px)); max-height: min(88vh, 900px); padding: 0; border: var(--rule);
  background: var(--paper); color: var(--ink); overflow: hidden;
}
.dlg[open] { display: flex; flex-direction: column; }
.dlg::backdrop { background: color-mix(in srgb, #0c1a4a 62%, transparent); }
.dlg-head { display: flex; align-items: flex-start; gap: 16px; padding: 22px 24px; border-bottom: var(--rule); }
.dlg-titles { flex: 1; min-width: 0; }
.dlg-sub { display: block; font-weight: 400; font-size: 16px; color: var(--ink-2); margin-top: 4px; letter-spacing: 0; }
.dlg-body { padding: 24px; overflow-y: auto; overscroll-behavior: contain; }
.dlg-body h3 { font-weight: 700; font-size: 22px; margin: 1.2em 0 .4em; }
.dlg-body h3:first-child { margin-top: 0; }
.dlg-body p + p { margin-top: .7em; }
.dlg-body .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.dlg.is-image { width: min(980px, calc(100vw - 24px)); background: var(--paper-2); }
.dlg.is-image img { max-height: 76vh; width: auto; margin: 0 auto; }
@media (prefers-reduced-motion: no-preference) {
  .dlg[open] { animation: dlg-in .32s var(--ease); }
  .dlg[open]::backdrop { animation: fade-in .25s ease-out; }
}
@keyframes dlg-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fade-in { from { opacity: 0; } }
@media (max-width: 560px) {
  .dlg { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-width: 2px 0 0; }
}

/* ---------- requisites ---------- */
.req { display: grid; gap: 0; }
.req-row { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 4px 24px; padding: 14px 0; border-top: var(--hair); align-items: center; }
.req-row:first-child { border-top: 0; }
.req-label { color: var(--ink-2); font-size: 16px; }
.req-value { font-weight: 700; overflow-wrap: anywhere; }
.copy { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.copy code { font: 700 clamp(17px, .4vw + 15px, 20px)/1.3 "Arsenal", sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; overflow-wrap: anywhere; }
.copy .btn { min-height: 40px; padding: 0 14px; font-size: 15px; }
.copy .btn[data-done] { background: var(--ink); color: var(--paper); }
@media (max-width: 640px) { .req-row { grid-template-columns: 1fr; } }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field span { font-weight: 700; font-size: 16px; }
.field input { font: inherit; min-height: 52px; padding: 0 14px; border: var(--rule); background: var(--paper); color: var(--ink); border-radius: 0; }
.field input::placeholder { color: var(--ink-2); opacity: 1; }
.field input:focus-visible { outline-offset: 0; }
.field .err { color: var(--red-text); font-size: 15px; min-height: 0; }
.check { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; margin: 8px 0 16px; font-size: 16px; line-height: 1.45; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--ink); }
.status { font-size: 16px; margin-top: 12px; min-height: 1.5em; }
.status[data-tone="ok"] { color: var(--green-text); font-weight: 700; }
.status[data-tone="err"] { color: var(--red-text); font-weight: 700; }

/* ---------- crisis ---------- */
.crisis { padding: 22px 0; }
.crisis .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: space-between; }
.crisis b { font-size: clamp(19px, .6vw + 16px, 24px); }
.crisis a, .mobile-crisis a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 64px; padding: 0 12px; border: 2px solid currentColor; font-weight: 700; text-decoration: none; white-space: nowrap; margin: 2px 0; }
.crisis a:hover { background: var(--on-red); color: var(--red); }
.mobile-crisis { padding: 12px var(--gutter); background: var(--red); color: var(--on-red); font-size: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.mobile-nav .mobile-crisis a { display: inline-flex; padding: 0 12px; font-size: 18px; border: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.msg-tpl { border: var(--rule); padding: 14px 16px; margin-top: 12px; display: grid; gap: 12px; justify-items: start; }
.msg-tpl p { font-style: italic; }
.crisis-note { border-left: 0; background: color-mix(in srgb, var(--red) 12%, var(--paper)); padding: 14px 16px; font-size: 16px; margin-top: 20px; }
.crisis-note b { color: var(--red-text); }
.btn-call { background: var(--on-red); color: var(--red); border-color: var(--on-red); flex: 1 1 200px; min-height: 56px; font-size: 20px; }
.btn-call:hover { background: transparent; color: var(--on-red); }
.foot-title { margin-bottom: clamp(28px, 3vw, 44px); }

/* ---------- footer ---------- */
.site-foot { border-top: var(--rule); padding: clamp(48px, 6vw, 88px) 0 32px; }
.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-top: var(--rule); }
.contacts a { display: block; padding: 18px 0 20px; border-bottom: var(--hair); text-decoration: none; font-weight: 700; font-size: clamp(22px, 1vw + 17px, 30px); line-height: 1.15; }
.contacts a small { display: block; font-weight: 400; font-size: 16px; color: var(--ink-2); margin-bottom: 4px; }
.contacts a:hover { text-decoration: underline; }
@media (min-width: 700px) { .contacts a { padding-right: 24px; } }
.protocols { margin-top: 40px; max-width: 46em; }
.protocols img { height: 30px; width: auto; filter: grayscale(1); opacity: .85; }
[data-theme="dark"] .protocols img { filter: grayscale(1) invert(1) brightness(1.4); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .protocols img { filter: grayscale(1) invert(1) brightness(1.4); } }
.foot-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; font-size: 15px; color: var(--ink-2); }
