/* Страницы сайта Капли (гайды, инструменты, «О Капле»): токены и кнопки те же, что у лендинга get.html и приложения
   (web/src/styles/tokens.css). Без внешних шрифтов и библиотек: Onest — свой файл из сборки веб-клиента. */
@font-face { font-family: "Onest"; src: url("/fonts/onest.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
:root {
  --c-page: #F4F4F7; --c-card: #FFFFFF; --c-brand: #6600FF; --c-brand-hover: #5700DB; --c-brand-soft: #EDE3FF;
  --c-brand-line: #D9C7FF; --c-ink: #000000; --c-muted: #5C5C66; --c-line: #E4E4E4; --c-control: #E9E9EE;
  --c-warn: #FF9500; --c-warn-soft: #FFF1DE; --c-warn-text: #9A4D00;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 10px; --r-md: 20px; --r-lg: 28px; --r-pill: 100px; --ease-out: cubic-bezier(.16, 1, .3, 1);
  --wrap: 760px; --wide: 1080px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0; background: var(--c-page); color: var(--c-ink);
  font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
a { color: var(--c-brand); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--c-brand); outline-offset: 3px;
}
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- шапка ---------- */
.top {
  display: flex; align-items: center; gap: 12px; max-width: var(--wide); margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 14px max(20px, env(safe-area-inset-left));
}
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--c-ink); font-weight: 700; font-size: 20px; text-decoration: none; }
.logo img { display: block; width: 32px; height: 32px; flex: none; border-radius: 9px; }
.top .btn { margin-left: auto; }

/* ---------- кнопки (buttons.css приложения) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px;
  border: 0; border-radius: var(--r-pill); background: var(--c-brand); color: #fff;
  font: 600 16px/1.2 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 120ms var(--ease-out), transform 120ms var(--ease-out);
}
.btn:active { transform: scale(.98); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn-ghost { background: var(--c-control); color: var(--c-ink); }
.btn-line { background: transparent; color: var(--c-brand); box-shadow: inset 0 0 0 2px var(--c-brand); }
.btn[disabled] { opacity: .5; cursor: default; }

/* ---------- страница ---------- */
.page { max-width: var(--wrap); margin: 0 auto; padding: 4px max(20px, env(safe-area-inset-right)) 32px max(20px, env(safe-area-inset-left)); }
.page-wide { max-width: var(--wide); }
.crumbs { margin: 0 0 18px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 15px; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--c-muted); }
.crumbs a { color: var(--c-muted); text-decoration: none; }
.crumbs [aria-current] { color: var(--c-muted); }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; }
h1 { font-size: 34px; }
h2 { margin-top: 44px; margin-bottom: 14px; font-size: 26px; }
h3 { margin-top: 28px; margin-bottom: 8px; font-size: 20px; letter-spacing: -.01em; }
p { margin: 0 0 14px; }
.lead { margin: 14px 0 0; font-size: 20px; line-height: 1.45; }
.updated { margin: 14px 0 0; color: var(--c-muted); font-size: 15px; }
article ul, article ol { margin: 0 0 16px; padding-left: 24px; }
article li { margin: 6px 0; }
article li::marker { color: var(--c-brand); }
strong { font-weight: 650; }

/* карточка, заметка, пример */
.card { margin: 18px 0; padding: 20px; border-radius: var(--r-md); background: var(--c-card); }
.card > :last-child, .note > :last-child, .example > :last-child { margin-bottom: 0; }
.card h3:first-child, .note h3:first-child { margin-top: 0; }
.note { margin: 18px 0; padding: 16px 20px; border-radius: var(--r-md); background: var(--c-brand-soft); }
.example { margin: 18px 0; padding: 16px 20px; border-left: 4px solid var(--c-brand); border-radius: 0 var(--r-md) var(--r-md) 0; background: var(--c-card); }
.example .label, .card .label { display: block; margin-bottom: 4px; color: var(--c-brand); font-size: 14px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.bad { border-left-color: var(--c-warn); }
.bad .label { color: var(--c-warn-text); }

/* шаги 1-2-3 */
.steps { margin: 18px 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; }
.steps > li { counter-increment: step; position: relative; margin: 0; padding: 18px 20px 18px 68px; border-radius: var(--r-md); background: var(--c-card); }
.steps > li::before {
  content: counter(step); position: absolute; left: 18px; top: 16px; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%; background: var(--c-brand-soft); color: var(--c-brand); font-weight: 700;
}
.steps h3 { margin: 0 0 4px; font-size: 18px; }
.steps p { margin: 0; }

/* таблица */
.table { margin: 18px 0; overflow-x: auto; border-radius: var(--r-md); background: var(--c-card); -webkit-overflow-scrolling: touch; }
.table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.table th, .table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--c-line); }
.table thead th { background: var(--c-brand-soft); font-weight: 650; }
.table tbody th { font-weight: 650; }
.table tr:last-child > * { border-bottom: 0; }

/* скриншоты приложения */
.shots { display: flex; gap: 14px; margin: 18px -20px; padding: 4px 20px 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.shots figure { flex: 0 0 auto; width: 220px; margin: 0; scroll-snap-align: start; }
.shots img { display: block; width: 220px; height: auto; aspect-ratio: 9 / 16; border-radius: var(--r-md); background: var(--c-brand-soft); }
.shots figcaption { margin-top: 8px; font-size: 15px; line-height: 1.35; }
.shot { float: right; width: 220px; margin: 4px 0 16px 24px; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: var(--r-md); background: var(--c-brand-soft); }

/* FAQ */
.faq { margin: 18px 0; display: grid; gap: 10px; }
.faq details { border-radius: var(--r-md); background: var(--c-card); }
.faq summary { position: relative; padding: 16px 52px 16px 20px; font-weight: 650; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--c-brand); border-bottom: 2px solid var(--c-brand); transform: rotate(45deg);
  transition: transform 160ms var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details > div { padding: 0 20px 16px; }
.faq details > div > :last-child { margin-bottom: 0; }

/* призыв скачать */
.cta {
  display: grid; gap: 16px; align-items: center; margin: 40px 0 8px; padding: 24px; border-radius: var(--r-lg);
  background: var(--c-brand); color: #fff;
}
.cta h2 { margin: 0; font-size: 24px; color: #fff; }
.cta p { margin: 6px 0 0; color: #F1EAFF; }
.cta .btn { background: #fff; color: var(--c-brand); justify-self: start; }
.cta .kaplya { width: 72px; height: 72px; }
.cta .kp-body { fill: #fff; stroke: #fff; }

/* ещё по теме */
.related { margin: 40px 0 0; }
.related h2 { margin-top: 0; font-size: 22px; }
.related ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.related a {
  display: block; padding: 16px 20px; border-radius: var(--r-md); background: var(--c-card); color: var(--c-ink);
  text-decoration: none; font-weight: 600;
}
.related a span { display: block; margin-top: 2px; color: var(--c-muted); font-size: 15px; font-weight: 400; }

/* ---------- подвал ---------- */
.foot { max-width: var(--wide); margin: 24px auto 0; padding: 28px max(20px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); border-top: 1px solid var(--c-line); font-size: 15px; }
.foot nav { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.foot .foot-h { margin: 0 0 6px; font-weight: 700; }
.foot ul { margin: 0; padding: 0; list-style: none; }
.foot li { margin: 4px 0; }
.foot a { color: var(--c-ink); text-decoration: none; }
.foot .copy { margin: 20px 0 0; color: var(--c-muted); }

/* ---------- маскот (web/src/ui/Mascot.tsx) ---------- */
.kaplya { display: inline-block; flex: none; line-height: 0; }
.kaplya svg { width: 100%; height: 100%; overflow: visible; }
.kp-body { fill: #fff; stroke: #000; }
.kp-line { stroke: #000; }
.kp-face { stroke: #000; }
.kp-fill-face { fill: #000; }
.kp-cheek { fill: #FFB8D9; }
.cta .kp-line { stroke: #fff; }

@media (hover: hover) {
  .btn:hover { background: var(--c-brand-hover); }
  .btn-ghost:hover { background: #DDDDE4; }
  .btn-line:hover, .cta .btn:hover { background: var(--c-brand-soft); }
  .related a:hover { box-shadow: inset 0 0 0 2px var(--c-brand-line); }
  .foot a:hover, .crumbs a:hover { text-decoration: underline; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media (max-width: 559px) {
  .shot { float: none; width: 200px; margin: 18px auto; }
}
@media (min-width: 760px) {
  h1 { font-size: 46px; }
  h2 { font-size: 30px; }
  .lead { font-size: 22px; }
  .cta { grid-template-columns: auto 1fr auto; padding: 28px 32px; }
  .cta .btn { justify-self: end; }
  .related ul { grid-template-columns: 1fr 1fr; }
}
@media print {
  .top, .cta, .related, .foot, .shots { display: none; }
  body { background: #fff; }
}
