/* Помощь YaKassa. Сначала телефон: кассир читает справку с телефона рядом с терминалом.
   Цвета - как на yakassa.kg и в приложении (тёмно-синяя шапка кассы, синий и красный бренда). */
@font-face {
  font-family: "Google Sans App";
  src: url(font.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  --bg: #F5F6F8; --surface: #FFFFFF; --ink: #29242E; --muted: #66656B; --line: #E2E4E9;
  --navy: #1E2B55; --brand: #1268CD; --brand-ink: #FFFFFF; --brand-soft: #E8F1FB;
  --red: #E31B08; --red-soft: #FCEDEB; --warn: #9A6200; --warn-soft: #FDF4E2; --mark: #E31B08;
  --hero-ink: #FFFFFF; --hero-muted: #C5CDE3;
  --shadow: 0 1px 2px rgba(30, 43, 85, .06), 0 6px 18px rgba(30, 43, 85, .06);
  --font: "Google Sans App", "Roboto", "Segoe UI", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161C; --surface: #1E2129; --ink: #EEEFF2; --muted: #A4A7B1; --line: #32363F;
    --brand: #6AA8F0; --brand-ink: #10182B; --brand-soft: #1C2B42;
    --red: #FF6F60; --red-soft: #3A201E; --warn: #E9B45C; --warn-soft: #352A17; --mark: #FF5A48;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 22px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14161C; --surface: #1E2129; --ink: #EEEFF2; --muted: #A4A7B1; --line: #32363F;
  --brand: #6AA8F0; --brand-ink: #10182B; --brand-soft: #1C2B42;
  --red: #FF6F60; --red-soft: #3A201E; --warn: #E9B45C; --warn-soft: #352A17; --mark: #FF5A48;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 22px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0; }
a { color: var(--brand); }
img, video { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }
kbd { display: inline-block; min-width: 1.6em; padding: 0 6px; border-radius: 6px; text-align: center; font: inherit; font-weight: 700; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.ico { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 8px 14px; border-radius: 8px; background: var(--surface); }
.skip:focus { top: 8px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 20px 16px 48px; }

/* Шапка */
.bar { position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff; }
.bar-in { max-width: 1120px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 12px; min-height: 56px; }
.logo { display: inline-flex; align-items: baseline; flex: none; text-decoration: none; color: #fff; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.logo .ya { color: #fff; }
.logo .ka { color: #FF5B4A; }
.logo-help { margin-left: 8px; font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--hero-muted); }

/* Поиск */
.search { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; margin-left: auto; max-width: 480px; }
.search .ico { position: absolute; left: 10px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 40px; padding: 0 12px 0 38px; border: 0; border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 16px; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--muted); }
.search.big { max-width: none; margin: 0; }
.search.big input { height: 54px; padding-left: 48px; border-radius: 14px; font-size: 17px; box-shadow: 0 6px 22px rgba(0, 0, 0, .22); }
.search.big .ico { left: 15px; width: 24px; height: 24px; }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 25; max-height: 70vh; overflow: auto; border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 12px 40px rgba(0, 0, 0, .28); }
.results a { display: block; padding: 11px 14px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); }
.results a:last-child { border-bottom: 0; }
.results a[aria-selected="true"], .results a:hover { background: var(--brand-soft); }
.results b { display: block; font-weight: 600; }
.results span { display: block; font-size: 14px; color: var(--muted); }
.results mark { background: none; color: var(--brand); font-weight: 700; }
.results .none { padding: 14px; font-size: 15px; }

/* Главная */
.hero { background: var(--navy); color: var(--hero-ink); }
.hero-in { max-width: 720px; margin: 0 auto; padding: 28px 16px 34px; display: grid; gap: 14px; }
.hero h1 { font-size: 34px; }
.hero p { color: var(--hero-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { padding: 6px 12px; border-radius: 999px; font-size: 14px; text-decoration: none; color: #fff; background: rgba(255, 255, 255, .13); }
.chips a:hover { background: rgba(255, 255, 255, .24); }
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.card { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); color: inherit; text-decoration: none; }
.card .ico { color: var(--brand); grid-row: 1 / 3; }
.card h2 { font-size: 18px; }
.card p { grid-column: 2 / 4; font-size: 15px; color: var(--muted); }
.card .count { grid-column: 3; grid-row: 1; font-size: 13px; color: var(--muted); white-space: nowrap; }
a.card:hover { box-shadow: 0 0 0 2px var(--brand); }
.card.off { box-shadow: none; opacity: .62; background: transparent; outline: 1px dashed var(--line); outline-offset: -1px; }

/* Раздел */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 10px; font-size: 14px; }
.crumbs a { color: var(--muted); }
.crumbs a + a::before { content: "›"; display: inline-block; margin-right: 8px; color: var(--muted); }
.lead { margin-top: 8px; font-size: 18px; color: var(--muted); }
.index { display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.index a { display: grid; gap: 2px; padding: 13px 16px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); text-decoration: none; color: inherit; }
.index a:hover { box-shadow: 0 0 0 2px var(--brand); }
.index b { font-weight: 600; }
.index span { font-size: 15px; color: var(--muted); }

/* Статья */
.article h2 { margin-top: 32px; }
.article h3 { margin-top: 22px; }
.article > p { margin-top: 12px; max-width: 66ch; }
.article h2 .anchor { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-left: 2px; vertical-align: middle; border-radius: 8px; color: var(--muted); opacity: .55; }
.article h2 .anchor:hover { opacity: 1; color: var(--brand); }
.anchor svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.steps { counter-reset: step; list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 22px; }
.steps > li { counter-increment: step; position: relative; padding-left: 40px; display: grid; gap: 12px; min-width: 0; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: 15px; font-weight: 700; }
.step-text { padding-top: 1px; max-width: 60ch; }
.list { margin: 12px 0 0; padding-left: 1.2em; display: grid; gap: 6px; max-width: 66ch; }
.note { margin-top: 16px; padding: 12px 14px; border-radius: 12px; font-size: 16px; background: var(--brand-soft); max-width: 66ch; }
.note b { display: block; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; color: var(--brand); }
.note.warn { background: var(--red-soft); }
.note.warn b { color: var(--red); }
.note.only { background: var(--warn-soft); }
.note.only b { color: var(--warn); }
.table { margin-top: 14px; overflow-x: auto; border-radius: 12px; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 16px; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-size: 14px; color: var(--muted); }
tr:last-child td { border-bottom: 0; }

/* Снимки и ролики: рамка телефона, ширина как у экрана кассы в руке */
.shot, .clip { position: relative; margin: 0; width: 100%; max-width: 270px; }
.article > .shot, .article > .clip { margin-top: 16px; }
.zoom { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 20px; }
.shot img, .clip video { width: 100%; border-radius: 20px; background: #10131b; box-shadow: 0 0 0 5px #20232c, var(--shadow); }
.clip video { cursor: pointer; }
.clip figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.mark { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--mark); color: #fff; font: 700 14px/1 var(--font); box-shadow: 0 0 0 3px #fff, 0 2px 6px rgba(0, 0, 0, .35); pointer-events: none; }
.mark.tap { width: 44px; height: 44px; background: rgba(227, 27, 8, .14); box-shadow: 0 0 0 3px var(--mark), 0 0 0 5px rgba(255, 255, 255, .8); animation: tap 1.8s ease-out infinite; }
@keyframes tap { 0%, 60%, 100% { transform: translate(-50%, -50%) scale(1); } 30% { transform: translate(-50%, -50%) scale(1.14); } }
.missing { display: grid; place-items: center; min-height: 200px; border-radius: 20px; font-size: 14px; color: var(--muted); outline: 2px dashed var(--line); outline-offset: -2px; }

.lightbox { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(10, 12, 18, .88); cursor: zoom-out; }
.lightbox img { max-height: 92vh; width: auto; border-radius: 16px; }

.see { margin-top: 32px; }
.see ul { margin: 10px 0 0; padding-left: 1.2em; display: grid; gap: 4px; }
.pager { display: grid; gap: 10px; margin-top: 28px; }
.pager a { display: block; padding: 11px 14px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); text-decoration: none; font-weight: 600; }
.pager a span { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.pager .next { text-align: right; }
.help { display: grid; gap: 12px; margin-top: 28px; padding: 16px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.help p { font-size: 15px; color: var(--muted); }
.help-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-weight: 600; text-decoration: none; }
.btn .ico { width: 20px; height: 20px; }
.btn.ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.side { display: none; }
.foot { color: var(--muted); font-size: 14px; }
.foot-in { max-width: 1120px; margin: 0 auto; padding: 0 16px 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.toast { position: fixed; left: 0; right: 0; bottom: 20px; z-index: 50; width: max-content; max-width: calc(100% - 32px); margin: 0 auto; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 15px; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 420px) {
  .logo-help { display: none; }
}
@media (min-width: 620px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { grid-template-columns: 24px minmax(0, 1fr); align-content: start; padding: 18px; }
  .card p { grid-column: 2; }
  .card .count { grid-column: 2; grid-row: auto; margin-top: 6px; }
  .pager { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pager .next:first-child { grid-column: 2; }
  .help { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .hero-in { padding: 44px 16px 48px; gap: 16px; }
  .hero h1 { font-size: 42px; }
  h1 { font-size: 36px; }
  h2 { font-size: 24px; }
}
@media (min-width: 760px) {
  /* шаг: текст слева, снимок справа */
  .steps > li.has-shot { grid-template-columns: minmax(0, 1fr) 250px; gap: 24px; align-items: start; }
}
@media (min-width: 980px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
  .side { display: block; position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; font-size: 15px; }
  .side-title { display: block; margin-bottom: 8px; font-weight: 700; color: var(--ink); text-decoration: none; }
  .side ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
  .side li a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; }
  .side li a:hover { color: var(--ink); background: var(--surface); }
  .side li a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
}
@media (prefers-reduced-motion: reduce) {
  .mark.tap { animation: none; }
  .toast { transition: none; }
}
@media print {
  .bar, .side, .pager, .help, .foot, .search, .anchor, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .steps > li { break-inside: avoid; }
}
