/* ПРОсрок — сайт, оформление v2 (тестовое). Только классы существующей разметки. */

/* ===== Токены ===== */
:root {
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --serif: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, 'Segoe UI Variable Display', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --border: #e7e3da;
  --border-strong: #d6d1c5;
  --text: #17160f;
  --text-2: #3c3a33;
  --muted: #6a665b;
  --accent: #1f5c43;
  --accent-text: #1a4e39;
  --accent-soft: #eaf3ee;
  --accent-line: #b9d6c6;
  --header-bg: rgba(250, 249, 246, .82);
  --shadow: 0 1px 2px rgba(23, 22, 15, .04), 0 8px 24px -12px rgba(23, 22, 15, .10);
  --radius: 18px;
  --radius-sm: 12px;
  --wrap: 1080px;
  --gutter: 32px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f0d; --surface: #161815; --surface-2: #1c1f1b; --border: #262a25; --border-strong: #353a33;
    --text: #efede6; --text-2: #cfcdc4; --muted: #9a9a8e;
    --accent: #6cc59a; --accent-text: #86d3ae; --accent-soft: #15241c; --accent-line: #2a4a39;
    --header-bg: rgba(14, 15, 13, .78);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0f0d; --surface: #161815; --surface-2: #1c1f1b; --border: #262a25; --border-strong: #353a33;
  --text: #efede6; --text-2: #cfcdc4; --muted: #9a9a8e;
  --accent: #6cc59a; --accent-text: #86d3ae; --accent-soft: #15241c; --accent-line: #2a4a39;
  --header-bg: rgba(14, 15, 13, .78);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ===== Основа ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans); background: var(--bg); color: var(--text);
  font-size: 16px; line-height: 1.65; min-height: 100vh;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
strong { font-weight: 600; }
a { color: var(--accent-text); text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip-link:focus { left: 8px; }

/* Язык: чужой язык никогда не виден */
html:not([lang="en"]) [data-lang="en"], html[lang="en"] [data-lang="ru"] { display: none !important; }

/* Эмодзи-значки убраны ради строгого вида */
.permission-icon, .security-icon, .card-icon, .contact-highlight-icon, .privacy-link-icon { display: none; }

/* ===== Шапка ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg); border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
}
.header-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); min-height: 64px;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
a.app-name {
  font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: -.03em;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.subnav { flex: 1; min-width: 0; }
.subnav-inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav a {
  padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--muted); text-decoration: none; white-space: nowrap; transition: color .15s, background .15s;
}
.subnav a:hover { color: var(--text); background: var(--surface-2); }
.subnav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.controls { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang-switch { display: flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.lang-btn {
  background: none; border: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600;
  letter-spacing: .04em; padding: 5px 12px; border-radius: 999px; color: var(--muted); line-height: 1.2;
  transition: color .15s, background .15s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

/* ===== Страница ===== */
main { max-width: var(--wrap); margin: 0 auto; padding: 72px var(--gutter) 40px; }

.hero { margin-bottom: 72px; }
.hero-eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 650; font-size: clamp(38px, 6.4vw, 64px);
  line-height: 1.05; letter-spacing: -.04em; color: var(--text); margin-bottom: 24px; max-width: 14em;
}
.hero h1 em { font-style: normal; color: var(--accent-text); }
.hero-sub { font-size: clamp(17px, 2vw, 20px); color: var(--muted); line-height: 1.55; max-width: 36em; }

/* Плитки с реквизитами */
.meta-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 40px; }
.meta-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 18px; min-width: 0;
}
.meta-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.meta-value { font-size: 15px; font-weight: 500; color: var(--text); overflow-wrap: anywhere; }

/* Содержание — плитки */
.toc { margin-top: 56px; }
.toc-title { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.toc ol { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc li a {
  display: flex; gap: 12px; align-items: baseline; height: 100%; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14.5px; line-height: 1.4; color: var(--text); text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.toc li a::before { content: counter(toc, decimal-leading-zero); font-family: var(--serif); font-size: 13px; color: var(--muted); flex-shrink: 0; }
.toc li a:hover { border-color: var(--accent); transform: translateY(-1px); }

/* ===== Разделы: слева заголовок, справа текст ===== */
.policy-section, .card {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); column-gap: 56px;
  padding: 56px 0; border-top: 1px solid var(--border); scroll-margin-top: 80px;
}
.section-header, .card-header { align-self: start; position: sticky; top: 96px; display: block; }
.section-num { display: block; font-family: var(--serif); font-size: 15px; color: var(--accent-text); margin-bottom: 10px; letter-spacing: .02em; }
.section-header h2, .card-header h2 {
  font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.25; letter-spacing: -.025em; color: var(--text);
}
.section-body, .card-body { min-width: 0; }

.section-body p, .card-body p { font-size: 16px; color: var(--text-2); line-height: 1.75; margin-bottom: 16px; }
.section-body p:last-child, .card-body p:last-child { margin-bottom: 0; }
.section-body h3 {
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text); margin: 36px 0 14px;
}
.section-body h3:first-child { margin-top: 0; }
.section-body ul { list-style: none; margin: 0 0 16px; }
.section-body ul li {
  position: relative; padding: 9px 0 9px 22px; font-size: 16px; line-height: 1.65; color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
.section-body ul li:last-child { border-bottom: 0; }
.section-body ul li::before { content: ''; position: absolute; left: 2px; top: 20px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.section-body a { overflow-wrap: anywhere; }
.mt-lg { margin-top: 24px; }

/* Выделенная заметка */
.highlight-block {
  background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-sm);
  padding: 16px 20px; margin: 24px 0; font-size: 15px; line-height: 1.65; color: var(--accent-text);
}
.not-collected { margin-top: 24px; padding: 20px 22px; background: var(--surface-2); border-radius: var(--radius-sm); }
.not-collected-label { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.not-collected ul { margin: 0; }
.not-collected ul li { font-size: 15px; border-color: var(--border-strong); }

/* ===== Плитки ===== */
.permission-cards, .security-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; }
.permission-card, .security-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 0;
}
.permission-card-head { padding: 18px 20px 0; }
.permission-name { font-size: 16px; font-weight: 600; color: var(--text); }
.permission-card-body { padding: 8px 20px 18px; }
.permission-card-body p { font-size: 14.5px; line-height: 1.65; margin-bottom: 8px; }
.pill {
  display: inline-block; background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent-line);
  border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; margin-right: 6px;
}
.security-item { padding: 18px 20px; }
.security-text { font-size: 14.5px; line-height: 1.65; color: var(--text-2); }
.security-text strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

.no-tracking-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 20px; }
.no-tracking-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--accent-soft);
  border: 1px solid var(--accent-line); border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--accent-text);
}
.no-tracking-item::before { content: '✓'; font-weight: 700; }

.contact-block { display: grid; gap: 10px; margin-top: 24px; }
.contact-row {
  display: flex; align-items: baseline; gap: 16px; padding: 14px 18px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.contact-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); min-width: 110px; }
.contact-value { font-size: 16px; color: var(--text); overflow-wrap: anywhere; }

/* ===== Поддержка ===== */
.faq-list { display: grid; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: border-color .15s; }
.faq-item:hover { border-color: var(--border-strong); }
.faq-q {
  width: 100%; background: none; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 20px; text-align: left; font: inherit; font-size: 16px; font-weight: 500; color: var(--text);
}
.faq-chevron { flex-shrink: 0; width: 18px; height: 18px; color: var(--muted); transition: transform .25s; }
.faq-q[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 20px 20px; font-size: 15px; line-height: 1.7; color: var(--text-2); }
.faq-a.open { display: block; animation: fade .25s ease both; }
.faq-a p { margin-bottom: 10px; font-size: 15px; }
.faq-a ol { padding-left: 20px; margin: 10px 0; }
.faq-a ol li { margin-bottom: 8px; padding-left: 4px; }
.faq-a ol li::marker { color: var(--accent-text); font-weight: 600; }

.contact-highlight {
  background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-sm);
  padding: 24px; margin-bottom: 16px;
}
.contact-highlight-text { font-size: 16px; color: var(--accent-text); line-height: 1.6; }
.contact-highlight-text strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -.02em; margin-bottom: 6px; }
.contact-highlight-text a { font-weight: 600; }
.response-badge {
  display: inline-block; background: var(--surface-2); border-radius: 999px; padding: 6px 14px;
  font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 16px;
}
.contact-note { font-size: 15px; color: var(--muted); line-height: 1.65; }
.privacy-link-block {
  display: flex; align-items: center; gap: 16px; padding: 18px 22px; margin-top: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  text-decoration: none; transition: border-color .15s, transform .15s;
}
.privacy-link-block:hover { border-color: var(--accent); transform: translateY(-1px); }
.privacy-link-text { font-size: 14px; color: var(--muted); }
.privacy-link-text strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 2px; }
.privacy-link-arrow { margin-left: auto; color: var(--accent-text); font-size: 22px; }

/* ===== Подвал ===== */
footer {
  max-width: var(--wrap); margin: 0 auto; padding: 32px var(--gutter) 56px; border-top: 1px solid var(--border);
  font-size: 13.5px; color: var(--muted); line-height: 1.6;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }
.vk-ico { width: 1.65em; height: .9em; vertical-align: -.12em; margin-right: .25em; }

@keyframes fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ===== Адаптив ===== */
@media (max-width: 1000px) {
  .meta-grid { grid-template-columns: repeat(2, 1fr); }
  .toc ol { grid-template-columns: repeat(2, 1fr); }
  .policy-section, .card { grid-template-columns: 1fr; padding: 44px 0; }
  .section-header, .card-header { position: static; margin-bottom: 24px; }
  .section-header { display: flex; align-items: baseline; gap: 14px; }
  .section-num { margin-bottom: 0; }
}
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .header-inner { gap: 6px 12px; padding-top: 10px; padding-bottom: 6px; }
  .subnav { order: 3; flex-basis: 100%; margin: 0 -6px; }
  .controls { margin-left: auto; }
  main { padding-top: 44px; }
  .hero { margin-bottom: 48px; }
  .toc ol, .permission-cards, .security-list { grid-template-columns: 1fr; }
  .section-header h2, .card-header h2 { font-size: 21px; }
  .section-body p, .section-body ul li { font-size: 15.5px; }
  .contact-label { min-width: 0; flex-basis: 100%; }
}
@media (max-width: 380px) {
  .meta-grid { grid-template-columns: 1fr; }
  .lang-btn { padding: 5px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
@media print {
  .site-header, .toc, .skip-link, .controls { display: none; }
  body { background: #fff; color: #000; }
  .policy-section, .card { break-inside: avoid; grid-template-columns: 1fr; }
  .section-header, .card-header { position: static; }
  .faq-a { display: block; }
}

/* ===== Страница 404 ===== */
:root { --danger: #d90f23; --danger-soft: rgba(217, 15, 35, .10); --laser-core: #ffe3e5; --stamp-bg: rgba(253, 232, 234, .72); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --danger: #ff3d4d; --danger-soft: rgba(255, 61, 77, .14); --stamp-bg: rgba(40, 6, 12, .66); } }
:root[data-theme="dark"] { --danger: #ff3d4d; --danger-soft: rgba(255, 61, 77, .14); --stamp-bg: rgba(40, 6, 12, .66); }

.nf { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 72px; align-items: center; min-height: calc(100vh - 220px); padding-top: 56px; }
.nf-label {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 26px 22px; box-shadow: var(--shadow); transform: rotate(-2deg); animation: nf-hit .5s ease-out 1.6s both, nf-float 6s ease-in-out 2.2s infinite;
}
.nf-label-top { display: flex; align-items: baseline; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.nf-date { margin-left: auto; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 15px; letter-spacing: .02em; color: var(--text); text-transform: none; animation: nf-date 1.6s steps(1) both; }
.nf-code { position: relative; height: 120px; color: var(--text); }
.nf-code svg { display: block; width: 100%; height: 100%; }
.nf-scan {
  position: absolute; left: -16px; right: -16px; top: -4px; height: 8px; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, var(--danger-soft) 25%, var(--danger) 42%, var(--laser-core) 50%, var(--danger) 58%, var(--danger-soft) 75%, transparent 100%);
  filter: drop-shadow(0 0 3px var(--danger)) drop-shadow(0 0 8px var(--danger));
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  animation: nf-scan 2.4s ease-in-out infinite alternate;
}
.nf-stamp {
  position: absolute; right: -14px; bottom: 34px; padding: 8px 20px; border: 3px solid var(--danger); border-radius: 10px;
  color: var(--danger); font-size: 28px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--stamp-bg);
  -webkit-backdrop-filter: blur(3px) saturate(120%); backdrop-filter: blur(3px) saturate(120%); transform: rotate(-12deg); animation: nf-stamp .45s cubic-bezier(.2, 1.6, .4, 1) 1.5s both;
}
.nf-text .hero-eyebrow { color: var(--danger); }
.nf-text h1 { font-family: var(--serif); font-weight: 650; font-size: clamp(34px, 5vw, 56px); line-height: 1.08; letter-spacing: -.04em; margin-bottom: 20px; }
.nf-text .hero-sub { max-width: 30em; }
.nf-text .hero-eyebrow { margin-bottom: 16px; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--text); color: var(--bg);
  font-size: 15px; font-weight: 600; text-decoration: none; transition: opacity .15s, transform .15s;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }

@keyframes nf-scan { from { top: -4px; } to { top: calc(100% - 4px); } }
@keyframes nf-stamp { from { opacity: 0; transform: rotate(-12deg) scale(2.6); } to { opacity: 1; transform: rotate(-12deg) scale(1); } }
@keyframes nf-hit { 0% { transform: rotate(-2deg); } 30% { transform: rotate(-2deg) translateY(5px) scale(.985); } 100% { transform: rotate(-2deg); } }
@keyframes nf-float { 0%, 100% { transform: rotate(-2deg) translateY(0); } 50% { transform: rotate(-1.4deg) translateY(-6px); } }
@keyframes nf-date { 0% { opacity: .2; } 20% { opacity: 1; } 40% { opacity: .3; } 60% { opacity: 1; } 80% { opacity: .3; } 100% { opacity: 1; } }

@media (max-width: 860px) { .nf { grid-template-columns: 1fr; gap: 48px; min-height: 0; } .nf-label { max-width: 380px; } .nf-stamp { right: -6px; font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { .nf-scan { top: calc(50% - 4px); } .nf-stamp { opacity: 1; } }
.nf-text .hero-eyebrow { font-family: var(--serif); font-size: clamp(88px, 13vw, 160px); font-weight: 700; line-height: .9; letter-spacing: -.05em; margin-bottom: 20px; }

/* Нажатие на карточку 404 (анимация — в site-v2.js) */
.nf-label { cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* Цифры под штрих-кодом — как на упаковке */

/* штамп привязан к верху карточки, чтобы блок двоичного кода его не сдвигал */
.nf-stamp { top: 142px; bottom: auto; }

/* Название знаками Брайля под штрих-кодом */
.nf-num { margin-top: 10px; font-family: system-ui, sans-serif; font-size: 26px; line-height: 1.2; letter-spacing: .14em; text-align: center; color: var(--text); white-space: nowrap; overflow: hidden; }

.nf-num { cursor: pointer; transition: color .3s; }
.nf-num.nf-scr { color: var(--danger); }
/* расшифрованное название — тем же моноширинным шрифтом, что и дата на карточке */
.nf-num { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.nf-num[data-state="text"] { font-size: 24px; font-weight: 700; letter-spacing: .14em; }

/* ===== Главная ===== */
.home { padding-top: 40px; overflow-x: clip; }
.home-hero { position: relative; text-align: center; padding: 64px 0 72px; }
.home-hero::before {
  content: ''; position: absolute; left: 50%; top: -40px; width: min(760px, 120%); height: 460px; transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--accent-soft), transparent); z-index: -1; pointer-events: none;
}
.home-icon-wrap { position: relative; display: inline-block; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.home-icon { display: block; width: 144px; height: 144px; margin-bottom: 36px; filter: drop-shadow(0 20px 22px rgba(31, 92, 67, .30)); animation: nf-float 7s ease-in-out infinite; }
.home-hero h1 { font-family: var(--serif); font-weight: 650; font-size: clamp(44px, 8vw, 84px); line-height: 1; letter-spacing: -.045em; margin-bottom: 20px; }
.home-hero .hero-sub { margin: 0 auto; }
.home-cta { justify-content: center; margin-top: 36px; }
.home-ver { margin-top: 6px; font-size: 13px; color: var(--muted); }
.home-ver[hidden] { display: none; }
.home-ver b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.home-note { margin-top: 18px; font-size: 13px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 24px 28px; transition: border-color .2s, transform .2s; }
.tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile-n { display: block; font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--accent-text); margin-bottom: 40px; }
.tile h3 { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; margin-bottom: 10px; }
.tile p { font-size: 15px; line-height: 1.65; color: var(--muted); }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .tiles { grid-template-columns: 1fr; } .tile-n { margin-bottom: 20px; } .home-hero { padding: 40px 0 52px; } .home-icon { width: 120px; height: 120px; } }

.home-disclaimer { margin-top: 32px; text-align: center; font-size: 13px; color: var(--muted); }

/* Официальный значок App Store: чёрный на светлой теме, белый на тёмной (файлы Apple без изменений) */
.badge { display: inline-block; line-height: 0; border-radius: 10px; transition: opacity .15s, transform .15s; }
.badge:hover { opacity: .88; transform: translateY(-1px); }
.badge img { height: 52px; width: auto; display: block; }
.badge img.badge-w { display: none; }
:root[data-theme="dark"] .badge-w { display: block; }
:root[data-theme="dark"] .badge-b { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge-w { display: block; }
  :root:not([data-theme="light"]) .badge-b { display: none; }
}
.home-cta { align-items: center; }

/* Число товаров в базе – в плитке «Данные по штрих-коду» на главной */
.tile-stat { display: flex; align-items: center; gap: 9px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.tile-stat[hidden] { display: none; }
.tile-stat b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.tile-stat i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: stat-pulse 2.4s ease-out infinite; }
@keyframes stat-pulse { 0% { box-shadow: 0 0 0 0 var(--accent-line); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }

/* ===== Анимации главной ===== */
/* Номер плитки при наведении превращается в штрих-код, который «считывается» слева направо */
.tile-n { position: relative; transition: color .2s; }
.tile-n::after {
  content: ''; position: absolute; left: 0; top: 0; width: 58px; height: 14px; opacity: 0; clip-path: inset(0 100% 0 0);
  background: repeating-linear-gradient(90deg, var(--accent-text) 0 2px, transparent 2px 4px, var(--accent-text) 4px 5px, transparent 5px 8px, var(--accent-text) 8px 11px, transparent 11px 12px, var(--accent-text) 12px 13px, transparent 13px 15px);
  transition: clip-path .45s cubic-bezier(.3, .7, .2, 1), opacity .2s;
}
@media (hover: hover) {
  .tile:hover .tile-n { color: transparent; }
  .tile:hover .tile-n::after { opacity: 1; clip-path: inset(0 0 0 0); }
}

/* Пасхалка: пять нажатий на иконку */
.hs {
  position: absolute; left: 50%; top: 42%; z-index: 2; padding: 6px 16px; border: 3px solid var(--danger); border-radius: 10px; white-space: nowrap; pointer-events: none;
  color: var(--danger); font-size: 22px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--stamp-bg);
  -webkit-backdrop-filter: blur(3px) saturate(120%); backdrop-filter: blur(3px) saturate(120%); transform: translate(-50%, -50%) rotate(-12deg);
}
.hs.fresh { color: var(--accent-text); border-color: var(--accent); background: var(--surface); }
.rain { position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden; }
.rain span { position: absolute; top: 0; font-size: 30px; line-height: 1; will-change: transform; }

/* Кнопка «Поддержать» в шапке */
.donate {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px 7px 12px; border: 1px solid var(--accent-line); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: border-color .15s, transform .15s;
}
.donate:hover { border-color: var(--accent); transform: translateY(-1px); }
.donate svg { width: 16px; height: 16px; flex: none; }
@media (max-width: 368px) { .donate { width: 34px; height: 34px; padding: 0; gap: 0; justify-content: center; } .donate [data-lang] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
@media print { .donate { display: none; } }

/* Шестерёнка: язык и тема */
.settings { position: relative; }
.settings-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--muted); cursor: pointer; transition: color .15s, background .15s;
}
.settings-btn:hover, .settings-btn[aria-expanded="true"] { color: var(--text); }
.settings-btn svg { width: 17px; height: 17px; }
.settings-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 272px; padding: 14px; display: grid; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .22);
}
.settings-pop[hidden] { display: none; }
.settings-row { display: grid; gap: 7px; }
.settings-h { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.settings-pop .lang-switch { width: 100%; }
.settings-pop .lang-btn { flex: 1; text-align: center; }
@media (max-width: 380px) { .settings-pop { width: min(272px, calc(100vw - 32px)); } }

/* Меню страниц – по центру свободного места шапки (на совсем узких экранах прокрутка с начала) */
@media (min-width: 330px) {
  .subnav-inner { justify-content: center; }
}

/* Тексты «с версии N»: скрыты, пока скрипт не увидит в App Store нужную версию (data-since); data-until — наоборот */
[data-since]:not(.since-on), .until-off { display: none !important; }

/* Переключатель языка на английских страницах (/en/…): «RU» – ссылка на русскую версию, «EN» – неактивная кнопка текущего языка */
a.lang-btn { display: inline-block; text-decoration: none; }
.lang-btn:disabled { cursor: default; opacity: 1; }

/* Без горизонтальной прокрутки: приложение раньше само ставило это на страницу политики скриптом, теперь страница защищена сама
   (clip, а не hidden: шапка с position: sticky продолжает работать) */
html, body { overflow-x: clip; max-width: 100%; }

/* Номера плиток главной считает CSS: плитка, скрытая до выхода версии (data-since), не занимает номер */
.tiles { counter-reset: tile; }
.tile { counter-increment: tile; }
.tile-n::before { content: counter(tile, decimal-leading-zero); }
