/* =========================================================
   аФИН — design system
   Brand: electric violet + white. Modern fintech.
   ========================================================= */

:root {
  /* Brand */
  --brand: #6E3CFF;
  --brand-600: #5A28EB;
  --brand-700: #4A1FCC;
  --brand-50:  #F1EAFF;
  --brand-100: #E2D4FF;
  --brand-200: #C9AEFF;
  --accent:    #00E0A4;
  --accent-600:#00B98A;

  /* Neutrals */
  --ink:        #0F0F1A;
  --ink-2:      #1B1B2B;
  --muted:      #5B5B73;
  --line:       #E7E4F0;
  --line-2:     #F1EFF7;
  --bg:         #FFFFFF;
  --bg-soft:    #FAF8FF;
  --bg-violet:  #F6F1FF;

  /* States */
  --danger:  #E5484D;
  --warning: #F5A524;
  --success: #2BB673;

  /* Typography */
  --font-sans: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 36px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 15, 26, .04), 0 1px 1px rgba(15, 15, 26, .03);
  --shadow-md: 0 6px 16px rgba(15, 15, 26, .06), 0 2px 4px rgba(15, 15, 26, .04);
  --shadow-lg: 0 24px 48px -12px rgba(110, 60, 255, .18), 0 8px 16px -8px rgba(15, 15, 26, .08);
  --shadow-violet: 0 20px 40px -16px rgba(110, 60, 255, .35);

  /* Spacing */
  --container: 1200px;
  --gutter: clamp(16px, 3vw, 28px);

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur-1: 160ms;
  --dur-2: 240ms;
  --dur-3: 360ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
a { color: var(--brand); text-decoration: none; transition: color var(--dur-1) var(--ease); }
a:hover { color: var(--brand-700); }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.03em; }
h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; }
h3 { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.2; }
h4 { font-size: 18px; line-height: 1.3; }
p { margin: 0 0 1em; }
small { font-size: 13px; color: var(--muted); }
hr { border: none; border-top: 1px solid var(--line); margin: 32px 0; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--tight { padding: clamp(40px, 6vw, 64px) 0; }
.section--violet { background: linear-gradient(180deg, var(--bg-violet) 0%, var(--bg) 100%); }
.section--ink { background: var(--ink); color: #fff; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-50); color: var(--brand-700);
  padding: 6px 12px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 4px rgba(110,60,255,.18);
}
.lede { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 60ch; }
.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 24px;
  font-weight: 600; font-size: 16px;
  border-radius: var(--r-pill);
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease), background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
  white-space: nowrap; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-600) 100%);
  color: #fff;
  box-shadow: var(--shadow-violet);
}
.btn--primary:hover { background: linear-gradient(180deg, var(--brand-600) 0%, var(--brand-700) 100%); color: #fff; box-shadow: 0 24px 40px -14px rgba(110,60,255,.5); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--bg-violet); border-color: var(--brand-100); color: var(--ink); }
.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { background: var(--brand-50); color: var(--brand-700); }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: var(--accent-600); color: #fff; }
.btn--lg { height: 60px; padding: 0 32px; font-size: 17px; }
.btn--sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.header__row { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; color: var(--ink); letter-spacing: -0.02em; }
.logo:hover { color: var(--ink); }
.logo__mark {
  width: 36px; height: 36px; flex-shrink: 0;
  background: image-set(
    url("/assets/img/logo-mark-64.webp") type("image/webp") 1x,
    url("/assets/img/logo-mark-64.png") type("image/png") 1x
  ) center/contain no-repeat;
  background: -webkit-image-set(
    url("/assets/img/logo-mark-64.webp") 1x,
    url("/assets/img/logo-mark-64.png") 1x
  ) center/contain no-repeat;
}
.nav { display: flex; align-items: center; gap: 4px; margin-left: 16px; }
.nav a {
  color: var(--ink-2); padding: 8px 10px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.nav a:hover { background: var(--bg-violet); color: var(--brand-700); }
.header__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px; background: #fff; }
.lang a {
  padding: 5px 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600;
  color: var(--muted);
}
.lang a.is-active { background: var(--ink); color: #fff; }
.lang a:hover:not(.is-active) { color: var(--ink); }
.burger { display: none; width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center; border: 1px solid var(--line); }
.burger span, .burger span::before, .burger span::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative;
}
.burger span::before { position: absolute; top: -6px; }
.burger span::after { position: absolute; top: 6px; }
@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 12px; background: #fff; border-bottom: 1px solid var(--line); margin: 0; }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 12px; border-radius: var(--r-sm); }
  .burger { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(48px, 8vw, 88px) 0 clamp(64px, 9vw, 112px);
  background: radial-gradient(1200px 600px at 90% -10%, rgba(110,60,255,.18), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(0,224,164,.12), transparent 60%),
              linear-gradient(180deg, #FBFAFF 0%, #fff 100%);
}
.hero__inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (max-width: 980px) { .hero__inner { grid-template-columns: 1fr; } }
.hero h1 .accent { background: linear-gradient(90deg, var(--brand) 0%, #B392FF 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__bullets { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 22px 0 28px; padding: 0; list-style: none; }
.hero__bullets li { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink-2); font-weight: 500; }
.hero__bullets li::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand-50) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236E3CFF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='3 8 6.5 11.5 13 5'/></svg>") center/12px no-repeat;
  flex-shrink: 0;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__trust { display: flex; align-items: center; gap: 18px; margin-top: 28px; padding-top: 20px; border-top: 1px dashed var(--line); }
.hero__trust-item { display: flex; flex-direction: column; }
.hero__trust-item b { font-size: 22px; color: var(--ink); font-family: var(--font-display); letter-spacing: -0.02em; }
.hero__trust-item span { font-size: 13px; color: var(--muted); }

/* ---------- Calculator card ---------- */
.calc {
  background: #fff;
  border-radius: var(--r-2xl);
  padding: clamp(20px, 2.5vw, 32px);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line-2);
  position: relative;
}
.calc::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(160deg, rgba(110,60,255,.45), transparent 50%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.calc__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.calc__head h3 { margin: 0; font-size: 20px; }
.calc__head .calc__zero {
  background: var(--accent); color: var(--ink); font-weight: 700; font-size: 12px;
  padding: 6px 10px; border-radius: var(--r-pill); letter-spacing: .02em;
}
.calc__row { margin-bottom: 18px; }
.calc__label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.calc__label span { font-size: 14px; color: var(--muted); font-weight: 500; }
.calc__label b { font-size: 22px; font-family: var(--font-display); letter-spacing: -0.02em; }
.calc__label b small { font-weight: 500; color: var(--muted); font-size: 14px; }

input[type="range"].slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 10px; background: var(--line-2); border-radius: var(--r-pill);
  outline: none; cursor: pointer;
  background-image: linear-gradient(90deg, var(--brand), var(--brand));
  background-repeat: no-repeat;
}
input[type="range"].slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(110,60,255,.25), 0 0 0 6px rgba(110,60,255,.18), inset 0 0 0 2px var(--brand);
  cursor: grab;
  transition: transform var(--dur-1) var(--ease);
}
input[type="range"].slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.06); }
input[type="range"].slider::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand);
  box-shadow: 0 2px 6px rgba(110,60,255,.25), 0 0 0 6px rgba(110,60,255,.18);
}
.calc__minmax { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.calc__summary {
  background: var(--bg-violet); border-radius: var(--r-md);
  padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0;
}
.calc__summary div { display: flex; flex-direction: column; }
.calc__summary span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.calc__summary b { font-size: 20px; font-family: var(--font-display); margin-top: 2px; }
.calc__legal { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 14px; }
.calc__legal a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Feature cards ---------- */
.feature {
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: 24px; transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--brand-100); }
.feature__icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(160deg, var(--brand-50), #fff);
  border: 1px solid var(--brand-100);
  display: grid; place-items: center; color: var(--brand);
  margin-bottom: 14px;
}
.feature h3 { font-size: 18px; margin-bottom: 6px; }
.feature p { font-size: 15px; color: var(--muted); margin: 0; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative; padding: 24px; border-radius: var(--r-lg);
  background: #fff; border: 1px solid var(--line-2);
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -18px; left: 20px;
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(180deg, var(--brand), var(--brand-600)); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 16px;
  box-shadow: var(--shadow-violet);
}
.step h4 { margin: 6px 0 6px; }
.step p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- Requirements list ---------- */
.req-list { display: grid; gap: 12px; padding: 0; list-style: none; margin: 0; }
.req-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; background: #fff;
  border: 1px solid var(--line-2); border-radius: var(--r-md);
}
.req-list .ico {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: var(--brand-50); color: var(--brand);
  display: grid; place-items: center;
}
.req-list b { display: block; margin-bottom: 2px; font-size: 15px; }
.req-list span { color: var(--muted); font-size: 14px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details {
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 4px 0; transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.faq details[open] { border-color: var(--brand-100); box-shadow: var(--shadow-sm); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 18px 56px 18px 20px;
  font-weight: 600; font-size: 16px; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand-50); color: var(--brand);
  display: grid; place-items: center; font-size: 18px; font-weight: 700;
  transition: transform var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.faq details[open] summary::after { content: "−"; background: var(--brand); color: #fff; transform: translateY(-50%) rotate(180deg); }
.faq details > div { padding: 0 20px 20px; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden;
  background: radial-gradient(800px 400px at 80% 20%, rgba(255,255,255,.16), transparent 60%), linear-gradient(135deg, var(--brand-700) 0%, var(--brand) 60%, #8B5BFF 100%);
  color: #fff; border-radius: var(--r-2xl);
  padding: clamp(36px, 5vw, 64px);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); margin: 0; max-width: 50ch; }
.cta-band .btn { box-shadow: 0 18px 40px -14px rgba(0,0,0,.35); }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; text-align: center; } }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink); color: #C9C7D8; padding: 64px 0 28px; margin-top: 64px;
}
.footer a { color: #C9C7D8; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid #25253A; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand .logo { color: #fff; }
.footer__brand p { font-size: 14px; color: #9694AA; margin-top: 12px; max-width: 40ch; }
.footer__col h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; }
.footer__legal { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; padding-top: 24px; font-size: 12px; color: #6E6C84; }
.footer__legal p { margin: 0; max-width: 80ch; line-height: 1.6; }
.footer__placeholder { background: #25253A; color: #A09EB6; padding: 2px 6px; border-radius: 4px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; }

/* ---------- Breadcrumbs ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); padding: 18px 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs span { color: var(--ink-2); }

/* ---------- Page hero (для внутренних страниц) ---------- */
.page-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); background: linear-gradient(180deg, var(--bg-violet) 0%, #fff 100%); border-bottom: 1px solid var(--line-2); }
.page-hero h1 { margin-bottom: 12px; }
.page-hero .lede { font-size: clamp(16px, 1.4vw, 18px); }

/* ---------- Article / prose ---------- */
.prose { max-width: 72ch; font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .35em; }
.prose blockquote { border-left: 4px solid var(--brand); padding: 8px 18px; margin: 1.4em 0; background: var(--bg-violet); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; }
.prose th, .prose td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { background: var(--bg-violet); font-weight: 600; }

/* ---------- Misc ---------- */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.divider { height: 1px; background: var(--line); margin: 48px 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-50); color: var(--brand-700); border-radius: var(--r-pill); padding: 4px 10px; font-size: 12px; font-weight: 600; }
.badge--accent { background: rgba(0,224,164,.15); color: var(--accent-600); }
.badge--ink { background: var(--ink); color: #fff; }

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  display: none;
  max-width: 720px;
  margin-inline: auto;
}
.cookie-banner.is-visible { display: block; animation: cookieIn .4s var(--ease) both; }
@keyframes cookieIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.cookie-banner__title { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.cookie-banner__text { font-size: 14px; color: var(--ink-2); line-height: 1.5; margin: 0 0 14px; }
.cookie-banner__text a { font-weight: 600; }
.cookie-banner__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-banner__actions .btn { height: 42px; font-size: 14px; padding: 0 18px; }
@media (max-width: 560px) {
  .cookie-banner { padding: 16px; }
  .cookie-banner__actions .btn { flex: 1; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Accessibility ---------- */
/* Skip-to-content link — visible on focus, off-screen otherwise */
.skip-link {
  position: absolute; top: -40px; left: 8px; z-index: 100;
  background: var(--brand); color: #fff;
  padding: 10px 16px; border-radius: var(--r-sm);
  font-weight: 600; font-size: 14px;
  text-decoration: none;
  transition: top var(--dur-1) var(--ease);
}
.skip-link:focus { top: 8px; color: #fff; outline: 3px solid #fff; outline-offset: 2px; }

/* Visible focus state — applied to all interactive elements via :focus-visible */
*:focus { outline: none; }
*:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}
.btn--primary:focus-visible {
  outline-color: var(--brand-700);
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--brand);
}
.nav a:focus-visible { outline-offset: -2px; }
input[type="range"]:focus-visible { outline-offset: 4px; }
.lang a:focus-visible { outline-offset: 1px; }
.faq summary:focus-visible { outline-offset: -2px; border-radius: var(--r-md); }

/* Visually-hidden but accessible to screen readers */
.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;
}

/* Stronger contrast for muted text on key surfaces (WCAG AA 4.5:1) */
@media (prefers-contrast: more) {
  :root {
    --muted: #3F3F50;
    --line: #B9B5C8;
  }
}
