:root {
    --color-primary: #6b8e23;
    --color-secondary: #9acd32;
    --color-accent: #d4af37;
    --color-bg: #f7faf3;
    --color-text: #1a2e12;
    --color-muted: #4a5c3a;
    --color-border: #c5d4b0;
    --color-dark: #1e2a14;
    --color-on-primary: #f7faf3;
    --font-display: "Space Grotesk", sans-serif;
    --font-body: "DM Sans", sans-serif;
    --radius-pill: 28px;
    --radius-btn: 6px;
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1.25rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --rh-header-h: 72px;
    --rh-page-w: 1120px;
    --rh-measure: 760px;
}

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

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

[hidden] { display: none !important; }

html {
    scroll-padding-top: var(--rh-header-h);
    max-width: 100%;
    overflow-x: clip;
}

body {
    margin: 0;
    padding-top: var(--rh-header-h);
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    max-width: 100%;
    overflow-x: clip;
}

body.rh-cookie-open { padding-bottom: 96px; }

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

a { color: var(--color-primary); }
a:hover { color: var(--color-secondary); }

h1, h2, h3 {
    font-family: var(--font-display);
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-text);
}

h1 { font-size: clamp(1.75rem, 3vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }

.rh-flow > * + * { margin-top: var(--space-md); }
.rh-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
}
.rh-u-center { text-align: center; }
.rh-u-mt { margin-top: var(--space-lg); }
.rh-u-min0 { min-width: 0; }
.rh-u-eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin: 0 0 var(--space-sm);
}

.rh-container {
    width: min(100% - 2rem, var(--rh-page-w));
    margin-inline: auto;
}
.rh-container--narrow {
    width: min(100% - 2rem, var(--rh-measure));
    margin-inline: auto;
}

.rh-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    min-height: var(--rh-header-h);
    background: var(--color-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.rh-header__row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    min-height: var(--rh-header-h);
}
.rh-header__logo { flex-shrink: 0; order: 1; }
.rh-header__logo img {
    width: 180px;
    height: auto;
    display: block;
    min-height: 36px;
}
.rh-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.65rem;
    margin-left: auto;
    order: 2;
}
.rh-nav__link {
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    color: var(--color-text);
}
.rh-nav__link:visited { color: var(--color-text); }
.rh-nav__link.is-active { color: var(--color-primary); font-weight: 700; }
.rh-header__cta { order: 3; flex-shrink: 0; }
.rh-header a,
.rh-header a:visited { color: var(--color-text); }
.rh-header a.rh-btn--primary,
.rh-header a.rh-btn--primary:visited {
    color: var(--color-on-primary);
    background: var(--color-primary);
}

.rh-burger {
    display: none;
    order: 4;
    flex-shrink: 0;
}
.rh-overlay,
.rh-drawer { display: none; }

.rh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.2rem;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-btn);
    background: transparent;
    color: var(--color-primary);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
    min-height: 44px;
}
.rh-btn:visited { color: var(--color-primary); }
.rh-btn--primary,
a.rh-btn--primary,
a.rh-btn--primary:visited {
    background: var(--color-primary);
    color: var(--color-on-primary);
    border-color: var(--color-primary);
}
.rh-btn--primary:hover {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: var(--color-on-primary);
}

.rh-card {
    border-radius: var(--radius-pill);
    background: #fff;
    border: 1px solid var(--color-border);
    padding: var(--space-lg);
}

.rh-layout--split {
    display: block;
}
.rh-layout__aside {
    background: linear-gradient(165deg, #e8f2dc 0%, var(--color-bg) 55%, #eef6e4 100%);
    border-bottom: 1px solid var(--color-border);
}
.rh-aside-card {
    padding: var(--space-xl) var(--space-md);
    width: min(100% - 2rem, var(--rh-page-w));
    margin-inline: auto;
    max-height: none;
    overflow: visible;
}
.rh-layout__main { padding-bottom: var(--space-xl); }

.rh-hero__title { margin: 0 0 var(--space-md); }
.rh-hero__figures {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}
.rh-hero__figure {
    min-width: 0;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    text-align: center;
}
.rh-hero__num {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    color: var(--color-primary);
}
.rh-hero__label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-muted);
}
.rh-hero__text { color: var(--color-muted); max-width: 36rem; }
.rh-hero__actions { margin-top: var(--space-md); }
.rh-hero a.rh-btn--primary,
.rh-hero a.rh-btn--primary:visited,
.rh-aside-card a.rh-btn--primary,
.rh-aside-card a.rh-btn--primary:visited {
    color: var(--color-on-primary);
}

.rh-section { padding: var(--space-xl) 0; }
.rh-section__title { margin-top: 0; }
.rh-section__lead { color: var(--color-muted); max-width: 40rem; }
.rh-section--cta {
    background: linear-gradient(120deg, var(--color-primary), #557318);
    color: var(--color-on-primary);
}
.rh-section--cta h2,
.rh-section--cta p { color: var(--color-on-primary); }
.rh-section--cta a.rh-btn--primary,
.rh-section--cta a.rh-btn--primary:visited {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-dark);
}
.rh-cta a.rh-btn--primary,
.rh-cta a.rh-btn--primary:visited {
    color: var(--color-dark);
}

.rh-rank { gap: var(--space-lg); }
.rh-rank__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    grid-template-areas:
        "pos still"
        "head still"
        "desc still"
        "tags still"
        "facts still"
        "note still"
        "actions actions";
    gap: var(--space-md) var(--space-lg);
    align-items: start;
    min-width: 0;
}
.rh-rank__item .rh-rank__pos { grid-area: pos; }
.rh-rank__item .rh-rank__head { grid-area: head; }
.rh-rank__item .rh-rank__desc { grid-area: desc; }
.rh-rank__item .rh-rank__tags { grid-area: tags; }
.rh-rank__item .rh-rank__facts { grid-area: facts; }
.rh-rank__item .rh-rank__note { grid-area: note; }
.rh-rank__item .rh-duo { grid-area: still; justify-self: end; }
.rh-rank__item .rh-rank__actions { grid-area: actions; }
.rh-rank__item .rh-app__icon { grid-area: unset; }
.rh-rank__pos {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--color-accent);
}
.rh-rank__name { margin: 0; font-size: 1.35rem; }
.rh-rank__dev { margin: 0; color: var(--color-muted); font-size: 0.95rem; }
.rh-rank__desc { margin: 0; }
.rh-rank__facts {
    margin: 0;
    font-size: 0.92rem;
    color: var(--color-muted);
    overflow-wrap: anywhere;
}
.rh-rank__note {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-muted);
    font-style: italic;
}
.rh-rank__head { align-items: flex-start; }
.rh-tag {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: #e8f2dc;
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 600;
}

.rh-app__icon {
    width: 96px;
    height: 96px;
    border-radius: 22%;
    object-fit: contain;
    flex-shrink: 0;
    background: #eef4e6;
}
.rh-duo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 240px;
    padding: 8px;
    background: #eef4e6;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-sizing: border-box;
    line-height: 0;
    overflow: hidden;
}
.rh-app__preview {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
}
.rh-review .rh-duo {
    width: 220px;
    height: 260px;
}
.rh-review .rh-app__preview {
    width: 100%;
    height: 100%;
}
.rh-app__facts {
    margin: var(--space-md) 0;
    padding-left: 1.2rem;
}
.rh-app__checked { font-size: 0.9rem; color: var(--color-muted); }
.rh-app__note { font-size: 0.9rem; color: var(--color-muted); font-style: italic; }

.rh-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: #fff;
}
.rh-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}
.rh-table th,
.rh-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    min-width: 0;
}
.rh-table th {
    background: #e8f2dc;
    font-family: var(--font-display);
}

.rh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}
.rh-brief-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    padding: 0;
    min-width: 0;
}
.rh-brief-card__band {
    height: 72px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}
.rh-brief-card__band--alt {
    background: linear-gradient(135deg, #557318, var(--color-primary));
}
.rh-brief-card__band--gold {
    background: linear-gradient(135deg, var(--color-accent), #e8c76a);
}
.rh-brief-card__band--deep {
    background: linear-gradient(135deg, #3d5a1a, var(--color-primary));
}
.rh-brief-card__title,
.rh-brief-card__excerpt,
.rh-brief-card__meta {
    padding: 0 var(--space-md);
}
.rh-brief-card__title { margin: var(--space-md) 0 var(--space-xs); font-size: 1.15rem; }
.rh-brief-card__excerpt { margin: 0 0 var(--space-sm); color: var(--color-muted); flex: 1; }
.rh-brief-card__meta {
    margin: 0 0 var(--space-md);
    font-size: 0.85rem;
    color: var(--color-muted);
}

.rh-crumbs { margin-bottom: var(--space-md); }
.rh-crumbs__list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.88rem;
    color: var(--color-muted);
}
.rh-crumbs__item:not(:last-child)::after {
    content: "/";
    margin-left: 0.5rem;
    margin-right: 0.15rem;
    opacity: 0.6;
}

.rh-qa__item {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border);
}
.rh-qa__item h2 { font-size: 1.2rem; margin: 0 0 var(--space-sm); }

.rh-contact-card__name { margin-top: 0; }
.rh-contact-card__line { margin: 0.35rem 0; overflow-wrap: anywhere; }
.rh-contact-card__note { margin-top: var(--space-md); color: var(--color-muted); }

.rh-az a {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e8f2dc;
    text-decoration: none;
    font-weight: 700;
}
.rh-glossary dt {
    font-family: var(--font-display);
    font-weight: 700;
    margin-top: var(--space-md);
}
.rh-glossary dd { margin: 0.25rem 0 0; color: var(--color-muted); }

.rh-sitemap { list-style: none; padding: 0; }
.rh-sitemap ul { margin: 0.4rem 0 0.4rem 1.2rem; padding: 0; list-style: disc; }

.rh-steps {
    list-style: none;
    counter-reset: rh-step;
    padding: 0;
}
.rh-steps > li {
    counter-increment: rh-step;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--color-border);
}
.rh-steps h2 { margin-top: 0; }
.rh-review__facts { margin: var(--space-lg) 0; }
.rh-review__intro { font-size: 1.1rem; color: var(--color-muted); }
.rh-review__close { margin-top: var(--space-xl); }

.rh-footer__band--accent {
    background: var(--color-secondary);
    padding: var(--space-md) 0;
}
.rh-footer__band--accent a,
.rh-footer__band--accent button {
    color: var(--color-dark);
    font-weight: 600;
}
.rh-footer__band--dark {
    background: var(--color-dark);
    color: #dce8cf;
    padding: var(--space-lg) 0;
}
.rh-footer__links {
    justify-content: center;
}
.rh-footer__link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}
.rh-footer__legal { margin: 0 0 var(--space-sm); font-size: 0.92rem; }
.rh-footer__copy { margin: 0; font-size: 0.88rem; opacity: 0.85; }

.rh-cookie { display: none; }
.rh-cookie:not([hidden]) {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 110;
    background: #fff;
    border-top: 2px solid var(--color-primary);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: var(--space-md) 0;
}
.rh-cookie__inner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    align-items: center;
    justify-content: space-between;
    width: min(100% - 2rem, var(--rh-page-w));
}
.rh-cookie__actions { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.rh-cookie .rh-btn { box-shadow: none; }

@media (min-width: 1024px) {
    .rh-layout--split {
        display: grid;
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
        align-items: start;
    }
    .rh-layout__aside {
        position: relative;
        border-bottom: none;
        border-right: 1px solid var(--color-border);
        align-self: stretch;
    }
    .rh-aside-card {
        width: auto;
        max-width: none;
        margin: 0;
        padding: var(--space-xl);
        position: sticky;
        top: calc(var(--rh-header-h) + 16px);
        max-height: none;
        overflow: visible;
    }
    .rh-layout__main .rh-container {
        width: min(100% - 2.5rem, 680px);
        margin-left: var(--space-lg);
        margin-right: auto;
    }
    .rh-layout__main .rh-container--narrow {
        width: min(100% - 2.5rem, 640px);
    }
}

@media (max-width: 1100px) {
    .rh-nav,
    .rh-header__cta { display: none; }
    .rh-burger {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        margin-left: auto;
        border: 0;
        background: transparent;
        cursor: pointer;
        padding: 10px;
        order: 4;
    }
    .rh-burger span {
        display: block;
        width: 22px;
        height: 2px;
        margin: 3px 0;
        background: var(--color-text);
    }
    .rh-header__row { justify-content: flex-start; }
    .rh-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 200;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .25s, visibility .25s;
    }
    .rh-drawer {
        display: block;
        position: fixed;
        z-index: 210;
        background: var(--color-bg);
        overflow-y: auto;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .3s ease, visibility .3s;
    }
    .rh-drawer a {
        display: block;
        padding: 14px 8px;
        text-decoration: none;
        color: var(--color-text);
        font-size: 1.35rem;
        font-family: var(--font-display);
        font-weight: 600;
    }
    .rh-drawer .rh-btn {
        display: inline-flex;
        margin: 20px 0 0;
        width: 100%;
        max-width: 280px;
        font-size: 1rem;
    }
    .rh-drawer__close {
        position: absolute;
        top: 12px;
        right: 16px;
        width: 44px;
        height: 44px;
        border: 0;
        background: transparent;
        font-size: 2rem;
        line-height: 1;
        cursor: pointer;
        color: var(--color-text);
    }
    .rh-drawer--sheet {
        inset: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        padding: 72px 28px 40px;
        opacity: 0;
    }
    body.nav-open { overflow: hidden; }
    body.nav-open .rh-drawer--sheet {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    body.nav-open .rh-overlay {
        display: none;
    }
}

@media (max-width: 768px) {
    .rh-header__logo img {
        width: 120px;
        min-height: 28px;
    }
    .rh-hero__figures { grid-template-columns: 1fr; }
    .rh-hero__actions .rh-btn { width: 100%; }
    .rh-rank__item {
        grid-template-columns: 1fr;
        grid-template-areas:
            "pos"
            "head"
            "desc"
            "tags"
            "facts"
            "note"
            "still"
            "actions";
    }
    .rh-rank__item .rh-duo {
        justify-self: center;
        margin-top: 4px;
    }
    .rh-grid { grid-template-columns: repeat(2, 1fr); }
    .rh-cookie__inner { flex-direction: column; align-items: stretch; }
    .rh-cookie__actions .rh-btn { min-height: 44px; flex: 1; }
}

@media (max-width: 520px) {
    .rh-rank__head { flex-direction: column; }
    .rh-app__icon { width: 72px; height: 72px; }
}

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

@media (prefers-reduced-motion: no-preference) {
    [data-stagger].is-in > * {
        animation: rh-k-up .4s ease both;
        animation-delay: calc(var(--i, 0) * 70ms);
    }
}

@keyframes rh-k-up {
    from { opacity: 0; transform: translateY(12px); }
}
