/* ============================================================
   Апельсин.рф — стили (неофициальный справочник)
   Без зависимостей и сборки: один обычный CSS-файл.
   ============================================================ */

:root {
    --orange:        #ff7a00;
    --orange-dark:   #e85d00;
    --orange-soft:   #fff3e6;
    --orange-soft-2: #ffe6cc;
    --green:         #3aa856;
    --green-soft:    #e9f7ee;
    --navy:          #17324d;
    --navy-dark:     #0f2438;
    --navy-soft:     #eaf1f6;
    --teal:          #147d74;
    --ink:           #142535;
    --ink-2:         #425466;
    --muted:         #6f7f8d;
    --line:          #dfe7ec;
    --bg:            #f7fafb;
    --card:          #ffffff;
    --warn-bg:       #fff7e8;
    --warn-line:     #ffd591;
    --radius:        16px;
    --radius-sm:     10px;
    --shadow:        0 8px 28px rgba(15, 36, 56, .08);
    --shadow-lg:     0 20px 54px rgba(15, 36, 56, .16);
    --wrap:          1120px;
    --font:          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: #b74700; text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(1.8rem, 4.2vw, 2.85rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 1000;
    background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

/* ---------- Верхняя плашка о неофициальности ---------- */
.topbar {
    background: var(--navy-dark);
    color: #eaf3f8;
    font-size: .86rem;
    padding: 8px 0;
}
.topbar .wrap { display: flex; gap: 8px; align-items: center; justify-content: center; text-align: center; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.topbar__label {
    display: inline-flex; align-items: center; min-height: 26px; padding: 2px 9px;
    border-radius: 999px; background: #fff; color: var(--navy-dark); font-size: .75rem;
    text-transform: uppercase; letter-spacing: .05em;
}

/* ---------- Шапка ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(247, 250, 251, .94);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand__logo { flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-weight: 900; font-size: 1.3rem; color: var(--ink); letter-spacing: -.02em; }
.brand__zone { color: var(--teal); }
.brand__sub { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav a {
    display: block; padding: 9px 13px; border-radius: 999px;
    color: var(--ink-2); font-weight: 600; font-size: .95rem;
}
.main-nav a:hover { background: var(--navy-soft); color: var(--navy); text-decoration: none; }
.main-nav a[aria-current="page"] { background: var(--navy); color: #fff; }

.nav-toggle {
    display: none; margin-left: auto; width: 46px; height: 42px;
    background: var(--navy-soft); border: 1px solid #cedde6; border-radius: 12px;
    cursor: pointer; padding: 0; flex-direction: column; gap: 5px; align-items: center; justify-content: center;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Хлебные крошки ---------- */
.breadcrumbs { border-bottom: 1px solid var(--line); background: #fff; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 10px 0; font-size: .85rem; }
.breadcrumbs li:not(:last-child)::after { content: "›"; margin-left: 8px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs [aria-current="page"] { color: var(--ink-2); font-weight: 600; }

/* ---------- Дата проверки и официальный источник ---------- */
.source-strip { background: var(--navy-soft); border-bottom: 1px solid #d7e3ea; color: var(--ink-2); }
.source-strip__inner {
    min-height: 42px; display: flex; align-items: center; justify-content: center;
    gap: 10px 18px; flex-wrap: wrap; font-size: .82rem; text-align: center;
}
.source-strip__status { color: var(--teal); font-weight: 800; }
.source-strip a { font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Базовые блоки контента ---------- */
.main { display: block; }
.section { padding: 56px 0; }
.section--tight { padding: 40px 0; }
.section--soft { background: linear-gradient(180deg, #fff, var(--navy-soft) 240%); }
.section__head { max-width: 760px; margin-bottom: 32px; }
.section__head--center { margin-inline: auto; text-align: center; }
.lead { font-size: 1.15rem; color: var(--ink-2); }
.eyebrow {
    display: inline-block; font-size: .78rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .12em; color: var(--navy); background: var(--navy-soft);
    padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}

.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .5em; }
.prose a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 9px; justify-content: center;
    padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: 1rem;
    border: 2px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(23, 50, 77, .25); }
.btn--primary:hover { background: var(--navy-dark); }
.btn--ghost { background: #fff; color: var(--navy); border-color: #cbd9e2; }
.btn--ghost:hover { border-color: var(--navy); }
.btn--lg { padding: 16px 30px; font-size: 1.05rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(1100px 480px at 88% -8%, #dceaf0, transparent 60%),
        linear-gradient(180deg, #fff, var(--bg));
}
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding: 60px 0 70px; }
.hero h1 { margin-bottom: .35em; }
.hero__lead { font-size: 1.2rem; color: var(--ink-2); max-width: 36ch; }
.hero__points { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 10px; }
.hero__points li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; color: var(--ink); }
.hero__points svg { flex: none; margin-top: 2px; }
.hero__art { position: relative; }
.hero__art img { margin-inline: auto; filter: drop-shadow(0 26px 50px rgba(15, 36, 56, .18)); }
.hero__note { font-size: .82rem; color: var(--muted); margin-top: 14px; }

/* ---------- Сетки карточек ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px; box-shadow: var(--shadow);
}
.card--link { transition: transform .15s ease, box-shadow .2s ease; }
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.card__icon {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
    background: var(--orange-soft); margin-bottom: 16px;
}
.card__icon--green { background: var(--green-soft); }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--ink-2); margin-bottom: 0; font-size: .98rem; }
.card__more { display: inline-block; margin-top: 14px; font-weight: 700; color: #b74700; }

/* ---------- Шаги ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; padding: 0; list-style: none; }
.steps--cols { grid-template-columns: repeat(4, 1fr); }
.step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 24px; box-shadow: var(--shadow); }
.step::before {
    counter-increment: step; content: counter(step);
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
    background: var(--navy); color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 14px;
}
.step h3 { font-size: 1.1rem; margin-bottom: .35em; }
.step p { color: var(--ink-2); margin: 0; font-size: .96rem; }

/* ---------- Таблицы ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; min-width: 520px; background: #fff; }
table.data caption { text-align: left; padding: 14px 18px; font-weight: 700; color: var(--ink-2); }
table.data th, table.data td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { background: var(--navy-soft); color: var(--navy); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:nth-child(even) td { background: #fffdfa; }

/* ---------- Плашки-заметки ---------- */
.note {
    display: flex; gap: 14px; align-items: flex-start;
    border-radius: var(--radius); padding: 18px 20px; margin: 22px 0;
    background: var(--warn-bg); border: 1px solid var(--warn-line);
}
.note__icon { flex: none; font-size: 1.3rem; line-height: 1.4; }
.note p { margin: 0; font-size: .96rem; color: var(--ink-2); }
.note--info { background: var(--green-soft); border-color: #b7e3c4; }
.note strong { color: var(--ink); }

/* ---------- Статы ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow); }
.stat__num { font-size: 2rem; font-weight: 900; color: var(--navy); letter-spacing: -.02em; }
.stat__label { color: var(--ink-2); font-size: .92rem; }

/* ---------- Логотипы сетей ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
    background: #fff; border: 1px solid var(--line); font-weight: 700; color: var(--ink-2); box-shadow: var(--shadow);
}
.chip__dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }

/* ---------- FAQ / аккордеон ---------- */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow: hidden; }
.faq summary {
    cursor: pointer; list-style: none; padding: 18px 52px 18px 20px; font-weight: 700; position: relative; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
    font-size: 1.5rem; font-weight: 400; color: var(--orange); transition: transform .2s;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--navy); }
.faq__body { padding: 0 20px 18px; color: var(--ink-2); }
.faq__body p:last-child { margin-bottom: 0; }

/* ---------- CTA-полоса ---------- */
.cta {
    background: linear-gradient(120deg, var(--navy), var(--navy-dark));
    color: #fff; border-radius: 24px; padding: 44px; text-align: center; box-shadow: var(--shadow-lg);
}
.cta h2 { color: #fff; }
.cta p { color: #fff2e6; max-width: 60ch; margin-inline: auto; }
.cta .btn--primary { background: #fff; color: var(--navy); box-shadow: none; }
.cta .btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }

/* ---------- Магазины приложений ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 14px; }
.store-badge {
    display: inline-flex; align-items: center; gap: 12px; background: var(--ink); color: #fff;
    padding: 12px 20px; border-radius: 14px; min-width: 200px;
}
.store-badge:hover { text-decoration: none; background: #2c1c0f; }
.store-badge small { display: block; font-size: .7rem; opacity: .8; }
.store-badge b { font-size: 1.05rem; }

/* ---------- TL;DR блок ---------- */
.tldr { background: var(--green-soft); border: 1px solid #b7e3c4; border-radius: var(--radius); padding: 22px 24px; }
.tldr h2 { font-size: 1.1rem; margin-bottom: .6em; }
.tldr ul { margin: 0; padding-left: 1.2em; }
.tldr li { margin-bottom: .4em; color: var(--ink-2); }

/* ---------- Подвал ---------- */
.site-footer { background: var(--navy-dark); color: #d7e3ea; margin-top: 40px; }
.site-footer a { color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr; gap: 36px; padding: 50px 0 30px; }
.brand--footer .brand__name { color: #fff; }
.site-footer__about p { color: #b9c9d3; font-size: .95rem; max-width: 42ch; }
.site-footer__title { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: #9fd6d0; margin-bottom: 14px; }
.site-footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer__col a { font-size: .95rem; }
.disclaimer { border-top: 1px solid rgba(255,255,255,.1); }
.disclaimer p { font-size: .82rem; color: #aebdc7; margin: 0; padding: 18px 0 0; }
.disclaimer .wrap > p:first-child { padding-top: 22px; }
.disclaimer__meta { padding-bottom: 24px !important; }

/* ---------- Кнопка наверх ---------- */
.to-top {
    position: fixed; right: 20px; bottom: 20px; width: 48px; height: 48px; border-radius: 50%;
    border: none; background: var(--navy); color: #fff; font-size: 1.3rem; cursor: pointer;
    box-shadow: var(--shadow-lg); z-index: 90; opacity: 0; transform: translateY(12px); transition: .25s;
}
.to-top.show { opacity: 1; transform: none; }
.to-top[hidden] { display: none; }

/* ---------- Утилиты ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.source-note { margin: 20px 0 0; color: var(--muted); font-size: .88rem; text-align: center; }
.source-note a { font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.table-wrap { scrollbar-color: var(--teal) var(--navy-soft); -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 920px) {
    .hero__inner { grid-template-columns: 1fr; gap: 8px; padding: 40px 0 50px; }
    .hero__art { max-width: 340px; margin: 24px auto 0; }
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .steps--cols { grid-template-columns: repeat(2, 1fr); }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .site-footer__about { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
    body { font-size: 16px; }
    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px);
        background: #fff; box-shadow: var(--shadow-lg); padding: 84px 20px 30px;
        transform: translateX(100%); visibility: hidden;
        transition: transform .28s ease, visibility .28s; margin: 0;
    }
    .main-nav.open { transform: none; visibility: visible; }
    .main-nav ul { flex-direction: column; gap: 4px; }
    .main-nav a { padding: 13px 16px; font-size: 1.05rem; }
    body.nav-open { overflow: hidden; }
    .nav-backdrop {
        position: fixed; inset: 0; background: rgba(15,36,56,.5); z-index: 90;
        opacity: 0; visibility: hidden; pointer-events: none;
        transition: opacity .25s, visibility .25s;
    }
    .nav-backdrop.show { opacity: 1; visibility: visible; pointer-events: auto; }
    .grid--3, .grid--2 { grid-template-columns: 1fr; }
    .cta { padding: 32px 22px; }
    .section { padding: 44px 0; }
    .table-wrap::after {
        content: "Проведите вбок, чтобы увидеть всю таблицу →";
        display: block; padding: 8px 14px; background: var(--navy-soft);
        color: var(--muted); font-size: .76rem;
    }
    .no-js .site-header__inner { flex-wrap: wrap; padding-block: 10px; }
    .no-js .nav-toggle { display: none; }
    .no-js .main-nav {
        position: static; width: 100%; padding: 0; transform: none; visibility: visible;
        box-shadow: none; flex-basis: 100%; overflow-x: auto;
    }
    .no-js .main-nav ul { flex-direction: row; width: max-content; }
    .no-js .main-nav a { white-space: nowrap; }
}

@media (max-width: 420px) {
    .grid--4, .steps--cols, .stats { grid-template-columns: 1fr; }
    .brand__sub { display: none; }
    .wrap { padding-inline: 16px; }
    .btn-row { flex-direction: column; }
    .btn-row .btn { width: 100%; }
    .store-badge { width: 100%; }
    .topbar .wrap { gap: 5px 8px; }
    .source-strip__inner { padding-block: 8px; gap: 4px 12px; }
}

@media (max-width: 340px) {
    .source-strip__inner > span:not(.source-strip__status) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
