/* Финашка — сайт finkrd.ru. Та же палитра и шрифты, что у приложения (web/web.css, Theme.kt). */

@font-face { font-family: Onest; font-weight: 400; font-display: swap; src: url("/web/assets/fonts/onest_400.ttf") format("truetype"); }
@font-face { font-family: Onest; font-weight: 500; font-display: swap; src: url("/web/assets/fonts/onest_500.ttf") format("truetype"); }
@font-face { font-family: Onest; font-weight: 600; font-display: swap; src: url("/web/assets/fonts/onest_600.ttf") format("truetype"); }
@font-face { font-family: Onest; font-weight: 700; font-display: swap; src: url("/web/assets/fonts/onest_700.ttf") format("truetype"); }
@font-face { font-family: Unbounded; font-weight: 600; font-display: swap; src: url("/web/assets/fonts/unbounded_600.ttf") format("truetype"); }
@font-face { font-family: Unbounded; font-weight: 700; font-display: swap; src: url("/web/assets/fonts/unbounded_700.ttf") format("truetype"); }

:root {
  --bg: #F3F1EC; --bg2: #ECE9E2; --card: #FFFFFF; --sep: #E4E1D9;
  --text: #17181C; --text2: #34353A; --hint: #6A6964;
  --accent: #3346D3; --on-accent: #FFFFFF; --accent-text: #3346D3; --accent-soft: #E8EAFB;
  --tg: #2AABEE;
  --lec-fg: #2458C6; --lec-bg: #E7EEFC; --pr-fg: #12753A; --pr-bg: #E2F2E7;
  --edit-fg: #A4500B; --edit-bg: #FAE9DA; --gold-fg: #8A6200; --gold-bg: #F6EDD3;
  --purple-fg: #6A3FC4; --purple-bg: #EEE8FB; --teal-fg: #0B6B61; --teal-bg: #DFF1EE;
  --shadow: 0 1px 2px rgba(23,24,28,.04), 0 8px 24px rgba(23,24,28,.06);
  --phone: #17181C;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1012; --bg2: #141518; --card: #1A1B1F; --sep: #2A2B30;
    --text: #F2F1ED; --text2: #D5D4CF; --hint: #9A9994;
    --accent: #8C98FF; --on-accent: #0D0E14; --accent-text: #A9B2FF; --accent-soft: rgba(140,152,255,.16);
    --tg: #2289C9;
    --lec-fg: #94B4FF; --lec-bg: rgba(90,140,255,.16); --pr-fg: #72D39C; --pr-bg: rgba(50,180,110,.16);
    --edit-fg: #F2A765; --edit-bg: rgba(240,140,60,.16); --gold-fg: #E8C45E; --gold-bg: rgba(220,170,40,.16);
    --purple-fg: #C3A8FF; --purple-bg: rgba(150,110,255,.16); --teal-fg: #63D0C3; --teal-bg: rgba(40,180,165,.16);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    --phone: #2A2B30;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  font: 16px/1.5 Onest, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text);
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overflow-x: hidden;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
svg { display: block; flex-shrink: 0; }
[hidden] { display: none !important; }
h1, h2 { font-family: Unbounded, Onest, sans-serif; font-weight: 700; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(30px, 5.2vw, 54px); line-height: 1.08; }
h2 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.15; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 760px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ------------------------------------------------------------------ шапка */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--sep); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 700 17px/1 Unbounded, sans-serif; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 10px; }
.links { display: none; gap: 24px; margin-left: auto; }
.links a { color: var(--text2); font-weight: 500; }
.nav .btn.small { margin-left: auto; }
@media (min-width: 820px) { .links { display: flex; } .nav .btn.small { margin-left: 0; } }

/* ---------------------------------------------------------------- кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 16px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--on-accent); font: 600 16px/1 Onest, sans-serif;
  transition: transform .15s, filter .15s; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn.tg { background: var(--tg); color: #fff; }
.btn.tg svg { fill: currentColor; stroke: none; }
.btn.tg svg path + path { fill: none; stroke: var(--tg); stroke-width: 1.4; }
.btn.ghost { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--sep); }
.btn.small { min-height: 40px; padding: 0 16px; border-radius: 12px; font-size: 14px; }

/* ------------------------------------------------------------ главный экран */
.hero { padding: 32px 0 56px; overflow: hidden; }
.hero-in { display: grid; gap: 40px; align-items: center; }
.badge { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent-text); font-weight: 600; font-size: 13px; margin-bottom: 18px; }
.lead { font-size: 18px; color: var(--text2); margin: 18px 0 28px; max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.cta .btn { flex: 1 1 100%; }
@media (min-width: 520px) { .cta .btn { flex: 0 0 auto; } }
.stats { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; max-width: 560px; }
.stats li { display: flex; flex-direction: column; gap: 2px; }
.stats b { font: 700 clamp(20px, 3vw, 28px)/1.1 Unbounded, sans-serif; color: var(--text); }
.stats span { font-size: 13px; color: var(--hint); line-height: 1.3; }

.hero-phone { position: relative; justify-self: center; width: min(300px, 78vw); }
.phone { border-radius: 42px; padding: 10px; background: var(--phone); box-shadow: 0 30px 60px -20px rgba(23,24,28,.35); }
.phone img { border-radius: 33px; width: 100%; height: auto; aspect-ratio: 585 / 1266; object-fit: cover; object-position: top; }
.toast-card { position: absolute; left: -14%; right: -14%; top: 13%; display: flex; gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 20px; background: color-mix(in srgb, var(--card) 86%, transparent);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: var(--shadow);
  animation: drop 0.7s .4s both cubic-bezier(.2,.9,.3,1.2); }
.toast-card img { border-radius: 9px; }
.toast-card div { display: flex; flex-direction: column; min-width: 0; }
.toast-card b { font-size: 14px; font-weight: 600; }
.toast-card span { font-size: 13px; color: var(--hint); }
@keyframes drop { from { opacity: 0; transform: translateY(-24px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast-card { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 420px) { .toast-card { left: -4%; right: -4%; } }
@media (min-width: 900px) {
  .hero { padding: 56px 0 88px; }
  .hero-in { grid-template-columns: 1.15fr .85fr; gap: 56px; }
  .hero-phone { width: 320px; }
}

/* ---------------------------------------------------------------- секции */
.section { padding: 64px 0; }
.section.alt { background: var(--bg2); }
.sub { color: var(--hint); font-size: 17px; margin: 10px 0 32px; max-width: 640px; }
h2 + .grid, h2 + .tabs, h2 + details { margin-top: 28px; }
.grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .grid.two, .grid.three, .grid.four { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.four { grid-template-columns: repeat(4, 1fr); } }

.card { background: var(--card); border-radius: 22px; padding: 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px; color: var(--text); }
.card b { font-size: 18px; font-weight: 600; }
.card > span:not(.ic) { color: var(--hint); font-size: 15px; }
a.card { transition: transform .15s; }
a.card:hover { text-decoration: none; transform: translateY(-2px); }
.place em { font-style: normal; color: var(--accent-text); font-weight: 600; font-size: 15px; margin-top: auto; padding-top: 6px; }

.ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 6px; }
.ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.lec { background: var(--lec-bg); color: var(--lec-fg); }
.ic.pr { background: var(--pr-bg); color: var(--pr-fg); }
.ic.edit { background: var(--edit-bg); color: var(--edit-fg); }
.ic.gold { background: var(--gold-bg); color: var(--gold-fg); }
.ic.purple { background: var(--purple-bg); color: var(--purple-fg); }
.ic.teal { background: var(--teal-bg); color: var(--teal-fg); }

.gallery { display: flex; gap: 16px; margin: 36px -16px 0; padding: 4px 16px 12px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { margin: 0; flex: 0 0 min(220px, 58vw); scroll-snap-align: center; }
.gallery img { width: 100%; height: auto; aspect-ratio: 585 / 1266; border-radius: 26px; box-shadow: var(--shadow);
  border: 6px solid var(--phone); background: var(--card); }
.gallery figcaption { text-align: center; color: var(--hint); font-weight: 500; margin-top: 10px; }
@media (min-width: 980px) { .gallery { justify-content: center; overflow: visible; margin: 44px 0 0; padding: 0; }
  .gallery figure { flex-basis: 230px; } }

.role ul { margin: 6px 0 4px; padding-left: 20px; color: var(--text2); }
.role li { margin: 4px 0; }
.muted { color: var(--hint); font-size: 14px; margin: 4px 0 0; }

/* ---------------------------------------------------------------- установка */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); margin-bottom: 20px; }
.tabs button { font: 600 15px/1 Onest, sans-serif; color: var(--hint); background: none; border: 0; cursor: pointer;
  padding: 11px 18px; border-radius: 10px; }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.panel { background: var(--card); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); max-width: 760px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding: 2px 0 0 44px; min-height: 30px; color: var(--text2); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font: 700 14px/1 Unbounded, sans-serif; }
.panel .btn { margin-top: 18px; }
@media (max-width: 519px) { .panel .btn { width: 100%; } }

/* ----------------------------------------------------------------- вопросы */
details { max-width: 760px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 10px; }
summary { list-style: none; cursor: pointer; padding: 18px 52px 18px 20px; font-weight: 600; font-size: 17px; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--hint); border-bottom: 2px solid var(--hint); transform: rotate(45deg); transition: transform .2s; }
details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
details p { margin: 0; padding: 0 20px 18px; color: var(--text2); }

/* ------------------------------------------------------------------- подвал */
.footer { padding: 40px 0 calc(40px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--sep); }
.foot-in { display: flex; flex-direction: column; gap: 10px; }
.footer p { margin: 0; color: var(--hint); font-size: 14px; max-width: 720px; }
.footer .brand { font-size: 15px; margin-bottom: 4px; }
.footer .brand img { border-radius: 8px; }

/* Залитые значки (Apple, Android): заливка вместо контура, усики андроида — линией. */
.btn svg.solid, .ic svg.solid { fill: currentColor; stroke: none; }
.btn svg.solid .st, .ic svg.solid .st { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.btn svg.solid { width: 19px; height: 19px; margin-top: -2px; }

/* Пометка «в разработке» у Android-приложения. */
.dev { display: inline-block; margin-left: 8px; padding: 3px 8px; border-radius: 999px; vertical-align: 2px;
  background: var(--edit-bg); color: var(--edit-fg); font: 600 11px/1.2 Onest, sans-serif; letter-spacing: .02em; }
.btn .dev { margin-left: 2px; }
.tabs .dev { margin-left: 4px; font-size: 10px; padding: 2px 6px; }
.tabs button[aria-selected="true"] .dev { background: rgba(255,255,255,.22); color: inherit; }
.card b .dev { vertical-align: 3px; }
.dev-note { background: var(--edit-bg); color: var(--text); border-radius: 14px; padding: 14px 16px; margin-bottom: 18px;
  font-size: 15px; line-height: 1.45; }
.dev-note b { color: var(--edit-fg); }
.dev-note a { color: var(--edit-fg); font-weight: 600; }
.dev-note + .btn { margin-top: 0; }

/* Текстовые страницы (политика конфиденциальности). */
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 8px; }
.doc h2 { font-size: clamp(19px, 2.4vw, 23px); margin: 40px 0 12px; }
.doc h3 { font-size: 17px; font-weight: 600; margin: 22px 0 6px; }
.doc p, .doc li { color: var(--text2); }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 12px; padding-left: 22px; }
.doc li { margin: 5px 0; }
.doc .short { background: var(--accent-soft); color: var(--text); border-radius: 16px; padding: 16px 18px; margin: 20px 0 8px; }
.footer a.plain { color: var(--hint); text-decoration: underline; }
.panel .btn + .muted { margin-top: 12px; }

/* Плашка канала под «Где пользоваться». */
.card.channel { flex-direction: row; align-items: center; gap: 16px; margin-top: 14px; }
.card.channel .ic { margin-bottom: 0; flex-shrink: 0; }
.channel-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.channel-text span { color: var(--hint); font-size: 15px; }
.card.channel .btn { flex-shrink: 0; }
@media (max-width: 559px) {
  .card.channel { flex-wrap: wrap; }
  .card.channel .btn { width: 100%; }
}
.channel-text b { color: var(--text); }
.card.channel .btn { color: #fff; font-size: 14px; }

/* RuStore: кнопка в стиле магазина и блок над тестировщиками. */
.btn.rustore { background: #0077ff; color: #fff; }
.store { margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--sep); }
.store p { margin: 0; color: var(--text2); }
.store .btn { margin-top: 16px; }
