:root {
    --color-primary: #50c878;
    --color-secondary: #7cb342;
    --color-accent: #daa520;
    --color-bg: #f0fdf4;
    --color-text: #1c2e22;
    --color-text-light: #3d5344;
    --color-border: #c5d7c0;
    --color-nav: #1c3d2a;
    --abr-header-h: 88px;
    --abr-page-w: 1120px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 28px;
    --font-head: "Figtree", "Arial", sans-serif;
    --font-body: "Noto Sans", "Arial", sans-serif;
}

@media (max-width: 768px) {
    :root { --abr-header-h: 72px; }
}

[hidden] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }

html, body {
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

html { scroll-padding-top: var(--abr-header-h); }

body {
    padding-top: var(--abr-header-h);
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(28, 46, 34, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(28, 46, 34, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
}

main { position: relative; z-index: 1; }

img, video, iframe { max-width: 100%; height: auto; }

a { color: #1f6b3a; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 0.6em; }

.abr-container {
    max-width: var(--abr-page-w);
    margin: 0 auto;
    padding: 0 20px;
}

.abr-measure {
    max-width: 760px;
}

.abr-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    min-height: var(--abr-header-h);
    background: #f0fdf4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.abr-header a,
.abr-header a:visited { color: var(--color-nav); }

.abr-header__row {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: var(--abr-header-h);
}

.abr-header__logo { display: flex; align-items: center; flex: 0 0 auto; }

.abr-header__logo img {
    width: 180px;
    height: auto;
    display: block;
}

.abr-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.abr-nav__link {
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-head);
}

.abr-nav__link--active { box-shadow: inset 0 -2px 0 var(--color-accent); }

.abr-burger,
.abr-overlay,
.abr-drawer { display: none; }

.abr-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-left: 8px;
    padding: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    cursor: pointer;
}

.abr-burger span {
    display: block;
    height: 2px;
    background: var(--color-text);
}

.abr-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
}

.abr-drawer {
    display: block;
    position: fixed;
    z-index: 210;
    background: #f0fdf4;
    overflow-y: auto;
    visibility: hidden;
    transition: transform .3s ease, opacity .3s ease, visibility .3s;
}

.abr-drawer a:not(.abr-btn) {
    display: block;
    padding: 14px 20px;
    color: var(--color-nav);
    text-decoration: none;
    font-weight: 600;
}

.abr-drawer .abr-btn {
    display: inline-flex;
    width: auto;
    margin: 8px 20px 16px;
}

.abr-drawer__close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.abr-drawer--top {
    top: var(--abr-header-h);
    left: 0;
    right: 0;
    max-height: calc(100dvh - var(--abr-header-h));
    padding: 56px 0 16px;
    transform: translateY(-16px);
    opacity: 0;
}

body.abr-nav-open { overflow: hidden; }
body.abr-nav-open .abr-overlay { opacity: 1; visibility: visible; }
body.abr-nav-open .abr-drawer { visibility: visible; }
body.abr-nav-open .abr-drawer--top { transform: translateY(0); opacity: 1; }

@media (min-width: 769px) {
    .abr-overlay { top: var(--abr-header-h); }

    .abr-drawer--top {
        left: auto;
        right: 20px;
        width: 320px;
        max-height: calc(100dvh - var(--abr-header-h) - 16px);
        border: 1px solid var(--color-border);
        box-shadow: 0 16px 32px rgba(28, 46, 34, 0.18);
    }
}

@media (max-width: 768px) {
    .abr-nav { display: none; }
    .abr-header__logo img { width: 120px; }
    .abr-header__row { justify-content: space-between; }
    .abr-burger { margin-left: auto; }
}

.abr-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 2px solid var(--color-text);
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-head);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    isolation: isolate;
}

.abr-btn--primary {
    background: var(--color-primary);
    color: #102016;
    border-color: #102016;
    box-shadow: 0 0 16px rgba(218, 165, 32, 0.65);
}

.abr-header .abr-btn--primary,
.abr-header .abr-btn--primary:visited { color: #102016; }

.abr-btn__wave {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(255, 255, 255, 0.55);
    animation: abr-wave 0.6s linear;
    pointer-events: none;
    z-index: 1;
}

@keyframes abr-wave {
    to { transform: scale(4); opacity: 0; }
}

.abr-hero {
    background:
        linear-gradient(100deg, rgba(80, 200, 120, 0.35), rgba(218, 165, 32, 0.18)),
        var(--color-bg);
    padding: 48px 0 40px;
}

.abr-hero__split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 32px;
    align-items: center;
}

.abr-hero__still {
    justify-self: end;
    max-width: 280px;
    max-height: 320px;
    object-fit: contain;
    box-shadow: 0 0 22px rgba(80, 200, 120, 0.55);
}

.abr-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

.abr-section { padding: 42px 0; }

.abr-section--band {
    background: rgba(124, 179, 66, 0.12);
}

.abr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

@media (max-width: 768px) {
    .abr-grid { grid-template-columns: repeat(2, 1fr); }
    .abr-hero__split { grid-template-columns: 1fr; }
    .abr-hero__still { justify-self: center; }
}

@media (max-width: 480px) {
    .abr-grid { grid-template-columns: 1fr; }
}

.abr-criteria__item,
.abr-aside-card,
.abr-note {
    border: 1px solid var(--color-border);
    background: rgba(240, 253, 244, 0.92);
    padding: 18px;
    box-shadow: 0 0 14px rgba(80, 200, 120, 0.28);
}

.abr-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--color-accent);
    color: #102016;
    font-family: var(--font-head);
    font-weight: 700;
}

.abr-rank__item {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas:
        "pos icon name still"
        "pos icon dev still"
        "pos icon desc still"
        "pos icon facts still"
        "pos icon actions still";
    gap: 6px 16px;
    align-items: start;
    padding: 18px 0;
    border-bottom: 1px solid var(--color-border);
}

.abr-rank__pos { grid-area: pos; margin: 0; }
.abr-rank__name { grid-area: name; margin: 0; }
.abr-rank__dev { grid-area: dev; margin: 0; color: var(--color-text-light); }
.abr-rank__desc { grid-area: desc; margin: 0; }
.abr-rank__facts { grid-area: facts; margin: 0; overflow-wrap: anywhere; }
.abr-rank__actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: 10px; }
.abr-rank__item .abr-app__preview { grid-area: still; }
.abr-rank__item .abr-app__icon { grid-area: icon; }

.abr-app__icon {
    width: 96px;
    height: 96px;
    border-radius: 22%;
    object-fit: contain;
    flex-shrink: 0;
    background: #fff;
}

.abr-app__preview {
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 240px;
    object-fit: contain;
}

.abr-review .abr-app__preview {
    max-width: 280px;
    max-height: 280px;
}

.abr-table-wrap { overflow-x: auto; }

.abr-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.abr-table th,
.abr-table td {
    border: 1px solid var(--color-border);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.abr-table th { background: rgba(80, 200, 120, 0.25); font-family: var(--font-head); }

.abr-band {
    height: 10px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.abr-card {
    border: 1px solid var(--color-border);
    background: rgba(240, 253, 244, 0.94);
    padding: 0 0 16px;
    box-shadow: 0 0 12px rgba(218, 165, 32, 0.28);
}

.abr-card h2,
.abr-card h3,
.abr-card p {
    margin-left: 20px;
    margin-right: 20px;
}

.abr-card h2,
.abr-card h3 {
    margin-top: 18px;
}

.abr-card .abr-btn {
    margin: 8px 20px 4px;
}

.abr-crumbs { font-size: 0.92rem; margin-bottom: 12px; }
.abr-crumbs a { color: var(--color-nav); }

.abr-factsheet {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin: 16px 0;
}

.abr-factsheet p,
.abr-factsheet li {
    overflow-wrap: anywhere;
}

.abr-factsheet ul { margin: 8px 0; padding-left: 18px; }

.abr-form { display: grid; gap: 12px; max-width: 560px; }
.abr-form label { display: grid; gap: 6px; font-weight: 600; }
.abr-form input,
.abr-form textarea {
    font: inherit;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-text);
}
.abr-form__error { color: #8a2b2b; min-height: 1.2em; }

.abr-footer {
    position: relative;
    z-index: 1;
    background: #14301f;
    color: #e7f6ea;
    padding: 36px 0 28px;
    margin-top: 20px;
}

.abr-footer a,
.abr-footer a:visited { color: #d7f5c4; }

.abr-footer__wide {
    display: grid;
    grid-template-columns: 1.1fr 1.4fr;
    gap: 24px;
}

.abr-footer__map {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 16px;
}

.abr-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    list-style: none;
    padding: 18px 0 0;
    margin: 18px 0 0;
    border-top: 1px solid rgba(215, 245, 196, 0.25);
}

.abr-footer__link {
    background: none;
    border: 0;
    padding: 0;
    color: #d7f5c4;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.abr-footer__note, .abr-footer__copy { color: #c9e6cf; }

.abr-cookie { display: none; }

.abr-cookie:not([hidden]) {
    display: flex;
    position: fixed;
    z-index: 110;
    gap: 12px;
    align-items: center;
}

.abr-cookie--corner {
    bottom: 16px;
    right: 16px;
    max-width: 360px;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    background: #14301f;
    color: #e7f6ea;
    border: 1px solid var(--color-accent);
    box-shadow: 0 0 18px rgba(218, 165, 32, 0.45);
}

.abr-cookie--corner a { color: #d7f5c4; }
.abr-cookie__actions { display: flex; }

@media (max-width: 768px) {
    .abr-rank__item {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "pos name"
            "icon dev"
            "desc desc"
            "facts facts"
            "still still"
            "actions actions";
    }
    .abr-rank__item .abr-app__preview {
        display: block;
        margin: 16px auto 0;
    }
    .abr-app__icon { width: 64px; height: 64px; }
    .abr-footer__wide,
    .abr-footer__map { grid-template-columns: 1fr; }
    .abr-cookie--corner {
        left: 12px;
        right: 12px;
        max-width: none;
    }
    .abr-cookie .abr-btn { min-height: 44px; }
}

@media (max-width: 480px) {
    .abr-hero { padding-top: 28px; }
}
