/* Чекер проксі (#472): спільні стилі для /proxy-checker.html, /uk/…, /en/…
   Палітра і розміри - токени затвердженого макета «Бутик» (docs/design/variants/b-butik.html),
   --danger - з webapp/src/styles/base.css. Без зовнішніх шрифтів і CDN. */
:root {
  --bg: #f3eff5; --surface: #fff; --surface-2: #f7f3f8; --line: #e6dee9;
  --text: #2a1f2e; --text-muted: #6f6274; --text-faint: #9a8d9f;
  --brand: #5e2a63; --on-brand: #fbf3fb; --brass: #c6924a; --on-brass: #2b1c07; --brand-soft: #efe2f0;
  --ok: #2c7a58; --ok-soft: #e2f1e9; --refund: #a8621c; --refund-soft: #f8ead9;
  --danger: #b3261e; --danger-soft: #f9e3e1;
  --shadow: 0 1px 2px rgba(70, 30, 75, .06), 0 8px 24px rgba(70, 30, 75, .08);
  --accent: var(--brand); --on-accent: var(--on-brand);
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r-sm: 14px; --r-md: 20px; --r-lg: 28px; --r-pill: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 28px;
  --tap: 44px; --cta: 56px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1520; --surface: #271e2c; --surface-2: #31263a; --line: #3b2f42;
    --text: #f4ecf4; --text-muted: #bcaec0; --text-faint: #8d7f93;
    --brand: #3d1f43; --on-brand: #f8eef8; --brass: #e0b36c; --on-brass: #2b1c07; --brand-soft: #3a2741;
    --ok: #6fd3a2; --ok-soft: #1f3a2e; --refund: #f0b067; --refund-soft: #3d2c19;
    --danger: #ff8a7a; --danger-soft: #3e2224;
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 28px rgba(0, 0, 0, .25);
    --accent: var(--brass); --on-accent: var(--on-brass);
  }
}
* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font-ui); font-feature-settings: "tnum" 1 }
a { color: var(--accent) }
.wrap { max-width: 760px; margin: 0 auto; padding: var(--s5) var(--s4) 48px }

/* шапка: знак + мови */
.top { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s5); flex-wrap: wrap }
.brand { font-weight: 800; font-size: 22px; letter-spacing: -0.03em; color: var(--text); text-decoration: none; margin-right: auto }
.brand em { font-style: normal; color: var(--brass) }
.langs { display: flex; gap: 6px }
.langs a, .langs span { min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500; text-decoration: none; color: var(--text-muted); background: var(--surface); box-shadow: var(--shadow) }
.langs span { background: var(--brand); color: var(--on-brand); box-shadow: none }
@media (prefers-color-scheme: dark) { .langs span { background: var(--brass); color: var(--on-brass) } }

.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ok);
  background: var(--ok-soft); border-radius: var(--r-pill); padding: 5px 11px; margin-bottom: var(--s3) }
h1 { font-size: 30px; line-height: 1.12; font-weight: 800; letter-spacing: -0.035em; margin: 0 0 var(--s3) }
.lead { color: var(--text-muted); margin: 0 0 var(--s5); font-size: 16px }
h2 { font-size: 20px; line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; margin: var(--s6) 0 var(--s3) }
h3 { font-size: 16px; margin: 0 0 var(--s1) }

.card { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); padding: var(--s4) }

/* форма */
.field-label { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); font-weight: 600; font-size: 15px; margin-bottom: var(--s2) }
.field-label .count { flex: none; font-weight: 500; color: var(--text-muted); font-size: 14px }
.field-label .count.over { color: var(--danger) }
textarea { display: block; width: 100%; min-height: 168px; resize: vertical; padding: var(--s3) 14px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text); font: 15px/1.55 var(--font-mono) }
textarea::placeholder { color: var(--text-faint) }
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--brand-soft) }
textarea[aria-invalid="true"] { border-color: var(--danger) }
.hint { font-size: 14px; color: var(--text-muted); margin: var(--s2) 0 0 }
.hint code { font-family: var(--font-mono); font-size: 13px; background: var(--brand-soft); color: var(--text); border-radius: 6px; padding: 1px 5px; white-space: nowrap }
.field-error { font-size: 14px; color: var(--danger); margin: var(--s2) 0 0; font-weight: 500 }
.field-error:empty { display: none }

.btn { height: var(--cta); border-radius: var(--r-pill); font: 600 16px var(--font-ui); display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; padding: 0 22px; border: 0; cursor: pointer; text-decoration: none; width: 100% }
.btn-brand { background: var(--brand); color: var(--on-brand); margin-top: var(--s4) }
@media (prefers-color-scheme: dark) { .btn-brand { background: var(--brass); color: var(--on-brass) } }
.btn-brass { background: var(--brass); color: var(--on-brass) }
.btn-line { border: 1.5px solid var(--line); color: var(--text); background: var(--surface) }
.btn[disabled] { background: var(--brand-soft); color: var(--text-faint); cursor: not-allowed }
.btn-brand[aria-busy="true"] { background: var(--brand); color: var(--on-brand); opacity: .85; cursor: progress }
@media (prefers-color-scheme: dark) { .btn-brand[aria-busy="true"] { background: var(--brass); color: var(--on-brass) } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite }
@keyframes spin { to { transform: rotate(360deg) } }
.privacy { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-muted); margin: var(--s3) 0 0 }
.privacy svg { flex: none; margin-top: 1px; color: var(--ok) }

/* результати */
.results { margin-top: var(--s5) }
.results:empty { display: none }
.summary { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3) }
.summary h2 { margin: 0; margin-right: auto }
.summary .btn { width: auto; height: var(--tap); padding: 0 16px; font-size: 15px }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: var(--r-pill); white-space: nowrap }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor }
.b-ok { background: var(--ok-soft); color: var(--ok) }
.b-bad { background: var(--danger-soft); color: var(--danger) }
.b-warn { background: var(--refund-soft); color: var(--refund) }
.b-neutral { background: var(--brand-soft); color: var(--text-muted) }
.b-neutral::before, .b-warn.no-dot::before { display: none }

.res-list { display: grid; gap: var(--s3); margin: 0; padding: 0; list-style: none }
.res { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 14px var(--s4); border-left: 4px solid var(--ok) }
.res.dead { border-left-color: var(--danger) }
.res-head { display: flex; align-items: center; gap: var(--s2); justify-content: space-between }
.res-proxy { font-family: var(--font-mono); font-size: 14px; font-weight: 600; min-width: 0; overflow-wrap: anywhere }
.res-num { color: var(--text-faint); font-weight: 500; margin-right: 4px }
.res-line { font-family: var(--font-ui); font-weight: 600 }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s3); margin: var(--s3) 0 0 }
.facts div { min-width: 0 }
.facts dt { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em }
.facts dd { margin: 2px 0 0; font-weight: 600; font-size: 15px; overflow-wrap: anywhere }
.facts dd.mono { font-family: var(--font-mono); font-size: 14px }
.facts .wide { grid-column: 1 / -1 }
.geo-credit { margin: var(--s1) 0 0; font-size: 12px; color: var(--text-faint); text-align: right }
.geo-credit a { color: inherit; display: inline-flex; align-items: center; min-height: var(--tap) }
.geo-credit[hidden] { display: none }
.ping-fast { color: var(--ok) } .ping-mid { color: var(--refund) } .ping-slow { color: var(--danger) }
.res-why { margin: var(--s2) 0 0; font-size: 14px; color: var(--text-muted) }
.res.skeleton { border-left-color: var(--line) }
.sk { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite }
.sk + .sk { margin-top: 10px }
@keyframes sk { from { background-position: 100% 0 } to { background-position: -100% 0 } }

.alert { border-radius: var(--r-md); padding: 14px var(--s4); background: var(--danger-soft); color: var(--text) }
.alert.warn { background: var(--refund-soft) }
.alert strong { display: block; margin-bottom: 2px }
.alert p { margin: 0; color: var(--text-muted); font-size: 14px }
.alert .btn { margin-top: var(--s3); height: var(--tap); width: auto; padding: 0 18px; font-size: 15px }

/* реклама під результатом */
.promo { background: var(--brand); color: var(--on-brand); border-radius: var(--r-lg); padding: 22px; margin-top: var(--s5) }
@media (prefers-color-scheme: dark) { .promo { background: var(--brand); box-shadow: inset 0 0 0 1px var(--line) } }
.promo h2 { margin: 0 0 6px; color: var(--on-brand) }
.promo p { margin: 0; opacity: .85; font-size: 15px }
.promo ul { list-style: none; padding: 0; margin: var(--s3) 0 var(--s4); display: grid; gap: 6px; font-size: 15px }
.promo li { display: flex; gap: 8px; align-items: flex-start }
.promo li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--brass);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/14px no-repeat, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude }
.promo-prices { list-style: none; padding: 0; margin: 0 0 var(--s4); display: grid; gap: 8px }
.promo-prices .pp { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 2px; align-items: baseline; padding: 10px 14px;
  border-radius: var(--r-sm); background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14) }
.promo-prices .pp::before { content: none }
.pp-geo { font-weight: 600; font-size: 15px }
.pp-price { font-weight: 700; font-size: 17px; color: var(--brass); white-space: nowrap }
.pp-meta { grid-column: 1 / -1; font-size: 13px; opacity: .75 }
.promo .btn { margin-top: 0 }
.promo .sub { font-size: 13px; opacity: .7; margin-top: var(--s2); text-align: center }

/* SEO-текст */
.tiles { display: grid; grid-template-columns: 1fr; gap: var(--s3) }
.tile { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 14px; display: grid; grid-template-columns: 40px 1fr; gap: 2px var(--s3); align-items: start }
.tile .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; grid-row: span 2 }
@media (prefers-color-scheme: dark) { .tile .ic { color: var(--brass) } }
.tile p { margin: 0; font-size: 14px; color: var(--text-muted) }
.levels { display: grid; gap: var(--s2) }
.level { display: flex; gap: var(--s3); align-items: flex-start; background: var(--surface); border-radius: var(--r-sm); box-shadow: var(--shadow); padding: var(--s3) 14px }
.level p { margin: 0; font-size: 14px; color: var(--text-muted) }
.level .badge { margin-top: 1px; min-width: 104px; justify-content: center }
.prose p { margin: 0 0 var(--s3); color: var(--text-muted) }
.prose code { font-family: var(--font-mono); font-size: 14px; color: var(--text) }
.faq { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 2px var(--s4) }
.faq details { border-top: 1px solid var(--line) }
.faq details:first-child { border-top: 0 }
.faq summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); cursor: pointer;
  font-weight: 600; list-style: none; padding: var(--s2) 0 }
.faq summary::-webkit-details-marker { display: none }
.faq summary::after { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 20px; font-weight: 500; line-height: 1 }
.faq details[open] summary::after { content: "–" }
.faq details p { margin: 0 0 var(--s4); color: var(--text-muted); font-size: 15px }

footer { margin-top: 40px; padding-top: var(--s5); border-top: 1px solid var(--line); font-size: 14px; color: var(--text-muted) }
footer nav { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-bottom: var(--s2) }
footer a { color: var(--text); text-decoration: none; font-weight: 500; min-height: var(--tap); display: inline-flex; align-items: center }
footer p { margin: 0 }

@media (min-width: 900px) {
  .wrap { max-width: 1040px; padding: 32px 32px 64px }
  .hero { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: start }
  h1 { font-size: 42px; margin-top: var(--s4) }
  .lead { font-size: 18px }
  .res-list { grid-template-columns: 1fr 1fr }
  .facts { grid-template-columns: repeat(3, auto) }
  .facts .wide { grid-column: auto }
  .tiles { grid-template-columns: repeat(4, 1fr) }
  .tile { display: block }
  .tile .ic { margin-bottom: var(--s2) }
  .levels { grid-template-columns: repeat(3, 1fr) }
  .level { flex-direction: column }
  .seo { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px }
  .seo > .full { grid-column: 1 / -1 }
  .promo { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; padding: 28px 32px }
  .promo ul { margin-bottom: 0 }
}
@media (prefers-reduced-motion: reduce) { .spinner, .sk { animation: none } }
