:root {
    color-scheme: dark;
    --bg: #050506;
    --surface: #090a0e;
    --surface-raised: #101218;
    --surface-soft: #151821;
    --text: #f4f5f7;
    --muted: #898d98;
    --muted-strong: #b8bbc3;
    --line: #20232c;
    --line-soft: #171920;
    --accent: #ff4034;
    --accent-warm: #ff5b2b;
    --accent-soft: #2a1112;
    --graph-green: #2ebe74;
    --graph-yellow: #f5c542;
    --graph-red: #e44c55;
    --graph-plot: #111319;
    --graph-stroke: #f4f5f7;
}

* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
body {
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 82% 4%, rgba(255, 64, 52, .09), transparent 27rem),
        var(--bg);
    color: var(--text);
    font-family: "Arial Nova", "Helvetica Neue", Arial, ui-sans-serif, system-ui, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
    background-size: 64px 64px;
    content: "";
    pointer-events: none;
}
a { color: inherit; }
button, input { font: inherit; }
a[href],
button:not(:disabled),
[role="button"]:not([aria-disabled="true"]),
input[type="button"]:not(:disabled),
input[type="submit"]:not(:disabled) { cursor: pointer; }
button:disabled,
[aria-disabled="true"] { cursor: default; }
::selection { background: var(--accent); color: #fff; }

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10;
    padding: 10px 14px;
    transform: translateY(-160%);
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: rgba(5, 5, 6, .9);
    backdrop-filter: blur(18px);
}
.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: min(100% - 40px, 1240px);
    min-height: 78px;
    margin: 0 auto;
}
.brand {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 11px;
    width: fit-content;
    color: var(--text);
    text-decoration: none;
}
.brand-icon { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 10px 28px rgba(100, 22, 43, .32); }
.brand-copy { display: grid; color: #fff; font-size: .73rem; font-weight: 900; letter-spacing: -.015em; line-height: 1.1; }
.brand-copy > span { color: #fff; }
.brand-copy .brand-subline { margin-top: 0; font-size: inherit; font-weight: inherit; letter-spacing: inherit; }
.brand-subline em { color: var(--accent); font-style: normal; }
.primary-nav { display: flex; align-self: stretch; gap: 34px; }
.primary-nav a {
    position: relative;
    display: flex;
    align-items: center;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 850;
    letter-spacing: .09em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color .2s ease;
}
.primary-nav a::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    transform: scaleX(0);
    background: var(--accent);
    content: "";
    transition: transform .22s ease;
}
.primary-nav a:hover, .primary-nav a.active { color: var(--text); }
.primary-nav a.active::after { transform: scaleX(1); }
.primary-nav .download-nav { color: #ff6a61; }
.locale-switch { display: flex; justify-self: end; gap: 10px; }
.locale-switch a {
    color: #5f626d;
    font-size: .68rem;
    font-weight: 850;
    text-decoration: none;
}
.locale-switch a:hover, .locale-switch a.active { color: var(--text); }

main { width: min(100% - 40px, 1240px); min-height: calc(100dvh - 210px); margin: 0 auto; padding: 66px 0 110px; }
.hero { max-width: 860px; margin-bottom: 52px; }
.ranking-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(360px, .82fr);
    align-items: center;
    gap: 52px;
    max-width: none;
    padding-top: 12px;
}
.ranking-hero::after {
    position: absolute;
    top: -50px;
    right: -380px;
    width: 680px;
    height: 380px;
    border: 1px solid rgba(255, 64, 52, .14);
    border-radius: 50%;
    z-index: 0;
    content: "";
    transform: rotate(-18deg);
    pointer-events: none;
}
.ranking-hero > * { position: relative; z-index: 1; }
.eyebrow, .toolbar-label {
    color: var(--accent);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .17em;
    text-transform: uppercase;
}
h1, h2, h3 { text-wrap: balance; }
h1 {
    max-width: 980px;
    margin: 14px 0 20px;
    font-size: clamp(3rem, 7.2vw, 6.4rem);
    font-weight: 950;
    line-height: .98;
    letter-spacing: -.04em;
}
h1 em {
    display: block;
    width: fit-content;
    padding: 0 .055em .08em 0;
    background: linear-gradient(100deg, var(--accent), var(--accent-warm));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-style: normal;
}
h2 { margin: 0; font-size: clamp(1.55rem, 3.4vw, 2.5rem); line-height: 1.06; letter-spacing: -.04em; }
.hero > p:not(.eyebrow) { max-width: 660px; margin: 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.18rem); line-height: 1.7; text-wrap: pretty; }
.hero-copy-block > p:not(.eyebrow) { max-width: 650px; margin: 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.14rem); line-height: 1.7; text-wrap: pretty; }
.hero-copy-block h1 { font-size: 4rem; }
.graph-title {
    width: fit-content;
    padding: 0 .055em .08em 0;
    background: linear-gradient(
        112deg,
        var(--graph-green) 0%,
        var(--graph-green) 22%,
        var(--graph-yellow) 52%,
        var(--graph-red) 82%,
        var(--graph-red) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    margin-top: 0;
}

@media (forced-colors: active) {
    .graph-title {
        background: none;
        color: CanvasText;
        -webkit-text-fill-color: currentColor;
    }
}
.download-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 278px;
    margin-top: 27px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    background: linear-gradient(110deg, var(--accent), var(--accent-warm));
    color: #fff;
    text-decoration: none;
    box-shadow: 0 15px 36px rgba(255, 64, 52, .18);
    transition: transform .22s ease, box-shadow .22s ease;
}
.download-cta:hover { transform: translateY(-2px); box-shadow: 0 19px 42px rgba(255, 64, 52, .25); }
.download-cta:active { transform: scale(.98); }
.download-cta img { width: 42px; height: 42px; border-radius: 9px; }
.download-cta span { display: grid; flex: 1; }
.download-cta strong { font-size: .82rem; }
.download-cta small { margin-top: 2px; color: rgba(255,255,255,.72); font-size: .55rem; font-weight: 850; letter-spacing: .09em; }
.download-cta > b { font-size: 1.1rem; }
.app-gallery-shell { min-width: 0; }
.app-gallery-shell::after {
    position: absolute;
    top: 12px;
    right: 0;
    bottom: 22px;
    z-index: 2;
    width: 42px;
    background: linear-gradient(90deg, rgba(5,5,6,0), rgba(5,5,6,.96));
    content: "";
    pointer-events: none;
}
.app-gallery {
    display: flex;
    gap: 12px;
    max-width: 100%;
    padding: 12px 44px 22px 2px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}
.app-gallery::-webkit-scrollbar { display: none; }
.gallery-card {
    position: relative;
    flex: 0 0 172px;
    overflow: hidden;
    border: 1px solid #292c35;
    border-radius: 18px;
    background: var(--surface-raised);
    box-shadow: 0 24px 54px rgba(0,0,0,.38);
    scroll-snap-align: start;
    transition: border-color .2s ease, transform .2s ease;
}
.gallery-card:hover { border-color: rgba(255,64,52,.52); transform: translateY(-3px); }
.gallery-card img { display: block; width: 100%; height: auto; }
.soc-hero { max-width: 980px; }
.soc-hero h1 { font-size: clamp(3rem, 6.5vw, 5.5rem); }
.soc-ranking-panel { margin-top: 12px; }
.soc-link {
    margin-top: 3px;
    color: #8d929e;
    font-size: .68rem;
    font-weight: 750;
    text-decoration-color: rgba(255,64,52,.55);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.soc-link:hover { color: var(--accent); }
.device-soc-link { display: inline; margin: 0; font-size: inherit; }

.ranking-panel { margin-top: 34px; }
.ranking-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.ranking-toolbar .tabs { flex: 0 1 auto; }
.tabs { display: flex; flex-wrap: wrap; gap: 9px; }
.tabs a, .pagination a, .button, .dialog-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface-raised);
    color: var(--muted-strong);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .05em;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .2s ease;
}
.tabs a { min-width: 84px; padding: 0 17px; }
.tabs a:hover, .pagination a:hover, .button:hover, .dialog-action:hover { border-color: #3c404a; color: var(--text); transform: translateY(-1px); }
.tabs a:active, .pagination a:active, .button:active, .dialog-action:active { transform: scale(.98); }
.tabs a.active, .pagination a.active, .button:not(.secondary), .dialog-action {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    box-shadow: 0 9px 24px rgba(255,64,52,.16);
}
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid rgba(255,64,52,.42); outline-offset: 3px; }
.methodology-button {
    display: inline-grid;
    flex: 0 0 44px;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #343843;
    border-radius: 50%;
    background: var(--surface-raised);
    color: var(--text);
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .2s ease;
}
.methodology-button:hover { border-color: var(--accent); background: var(--accent-soft); color: #ff766e; transform: translateY(-1px); }
.methodology-button:active { transform: scale(.96); }
.table-sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 34px;
    margin: 0 3px 9px;
    color: #666a75;
    font-size: .66rem;
    font-weight: 750;
}
.sort-reset {
    display: inline-block;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font-size: .66rem;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
    transition: color .2s ease, opacity .2s ease;
}
.sort-reset:hover { color: #ff817a; }
.sort-reset.is-disabled { color: #51545e; cursor: default; opacity: .66; }
.sort-button {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    width: 100%;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-align: inherit;
    text-transform: inherit;
    cursor: pointer;
    text-decoration: none;
}
.sort-button:visited { color: inherit; }
th:nth-child(2) .sort-button { justify-content: flex-start; }
.sort-button::after {
    width: 5px;
    height: 5px;
    border-right: 1px solid #555965;
    border-bottom: 1px solid #555965;
    content: "";
    transform: rotate(45deg) translateY(-1px);
    transition: border-color .2s ease, transform .2s ease;
}
th[aria-sort="ascending"] .sort-button, th[aria-sort="descending"] .sort-button { color: var(--text); }
th[aria-sort="ascending"] .sort-button::after { border-color: var(--accent); transform: rotate(225deg) translate(-1px, -1px); }
th[aria-sort="descending"] .sort-button::after { border-color: var(--accent); transform: rotate(45deg) translate(-1px, -1px); }

.methodology-dialog {
    width: min(calc(100% - 32px), 640px);
    max-height: min(82dvh, 760px);
    padding: 0;
    overflow: auto;
    border: 1px solid #30343e;
    border-radius: 20px;
    background: #0c0e13;
    color: var(--text);
    box-shadow: 0 35px 100px rgba(0,0,0,.7);
}
.methodology-dialog::backdrop { background: rgba(0,0,0,.74); backdrop-filter: blur(7px); }
.methodology-dialog article { padding: 30px; }
.methodology-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 22px; }
.methodology-dialog .eyebrow { margin: 0 0 8px; }
.methodology-dialog h2 { max-width: 500px; }
.methodology-dialog article > p { margin: 0; color: var(--muted-strong); line-height: 1.75; text-wrap: pretty; }
.methodology-dialog article > p + p { margin-top: 15px; }
.dialog-close {
    display: inline-grid;
    flex: 0 0 36px;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-raised);
    color: var(--muted-strong);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}
.dialog-close:hover { border-color: var(--accent); color: var(--text); }
.dialog-action { min-width: 118px; margin-top: 24px; padding: 0 18px; }

.table-wrap {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(9,10,14,.86);
    box-shadow: 0 30px 80px rgba(0,0,0,.28);
}
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 19px 20px; border-bottom: 1px solid var(--line-soft); text-align: right; }
th {
    height: 64px;
    color: #666a74;
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}
th:first-child, td:first-child { width: 78px; text-align: center; }
th:nth-child(2), td:nth-child(2) { text-align: left; }
.leaderboard-table:not(.soc-table) th:nth-child(3),
.leaderboard-table:not(.soc-table) td:nth-child(3) { width: 190px; text-align: left; }
tbody tr { transition: background-color .2s ease; }
tbody tr:hover { background: #0e1015; }
tbody tr.top-rank { background: linear-gradient(90deg, rgba(255,64,52,.105), rgba(255,64,52,.018) 64%, transparent); }
tbody tr:last-child td { border-bottom: 0; }
.rank span {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: var(--surface-soft);
    color: #9da1ac;
    font-size: .78rem;
    font-weight: 900;
}
.top-rank .rank span { background: var(--accent); color: #fff; box-shadow: 0 7px 18px rgba(255,64,52,.24); }
.device-cell { display: flex; align-items: center; }
.device-copy { display: grid; justify-items: start; min-width: 0; }
.device-link { color: var(--text); text-decoration: none; }
.device-link strong { font-size: .96rem; letter-spacing: -.015em; }
.device-link:hover { color: var(--accent); }
.device-copy small { margin-top: 3px; color: #656a75; font-size: .68rem; font-weight: 700; }
.soc-cell { color: var(--muted-strong); }
.soc-cell .soc-link { font-size: .78rem; overflow-wrap: anywhere; }
.badge {
    margin-top: 7px;
    padding: 3px 6px;
    border: 1px solid rgba(255,64,52,.26);
    border-radius: 4px;
    background: rgba(255,64,52,.08);
    color: #ff766e;
    font-size: .55rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.metric strong { display: block; color: var(--accent); font-size: 1.12rem; font-style: italic; font-weight: 950; letter-spacing: -.02em; }
.metric small { color: #6e727c; font-size: .58rem; font-weight: 800; letter-spacing: .1em; }
.pagination { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.pagination a { min-width: 42px; padding: 0 12px; }

.empty {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 200px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
}
.empty-index, .method-index { color: var(--accent); font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 950; font-style: italic; letter-spacing: -.06em; }
.empty h2 { margin-bottom: 8px; }
.empty p { max-width: 580px; margin: 0; color: var(--muted); }
.method {
    display: grid;
    grid-template-columns: 170px minmax(0, 690px);
    gap: 40px;
    margin-top: 72px;
    padding-top: 38px;
    border-top: 1px solid var(--line);
}
.method .eyebrow { margin: 0 0 8px; }
.method h2 { margin-bottom: 14px; }
.method p:last-child { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.75; }

.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 38px; color: var(--muted); font-size: .78rem; font-weight: 800; text-decoration: none; transition: color .2s ease, transform .2s ease; }
.back-link:hover { color: var(--text); transform: translateX(-3px); }
.device-hero { max-width: 1040px; margin-bottom: 30px; }
.device-hero h1 { font-size: clamp(3rem, 7vw, 6rem); }
.device-hero > p:not(.eyebrow) { color: var(--muted); }
.device-hero .badge { display: inline-block; margin: 0 0 0 8px; vertical-align: middle; }
.device-stats, .stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 28px 0 56px; font-variant-numeric: tabular-nums; }
.stats-grid > div {
    min-height: 130px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface-raised);
}
.stats-grid > div:first-child { border-color: rgba(255,64,52,.35); background: linear-gradient(145deg, rgba(255,64,52,.12), var(--surface-raised) 68%); }
.stats-grid span { display: block; color: #727681; font-size: .62rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.stats-grid strong { display: block; margin-top: 12px; font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 950; letter-spacing: -.035em; }
.stats-grid small { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; }
.curve-section { margin-top: 22px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.section-heading .eyebrow { margin: 0 0 7px; }
.section-heading > span { color: var(--muted); font-size: .72rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.graph {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    padding: 16px;
}
.graph svg { display: block; width: 100%; height: auto; }
.public-graph { padding: 18px 18px 8px; }
.public-graph .plot-background { fill: var(--graph-plot); }
.public-graph .grid-line { stroke: var(--muted); stroke-opacity: .24; stroke-width: 1; vector-effect: non-scaling-stroke; }
.public-graph .axis-label { fill: var(--muted); font: 13px ui-sans-serif, system-ui, sans-serif; }
.public-graph .performance-bars { opacity: .84; }
.public-graph .performance-bars-green { fill: var(--graph-green); }
.public-graph .performance-bars-yellow { fill: var(--graph-yellow); }
.public-graph .performance-bars-red { fill: var(--graph-red); }
.public-graph .performance-line { fill: none; stroke: var(--graph-stroke); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.curve-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 13px 4px 0; color: var(--muted); font-size: .72rem; font-weight: 800; }
.curve-legend span { display: inline-flex; align-items: center; gap: 6px; }
.curve-legend i { width: 9px; height: 9px; border-radius: 2px; }
.curve-legend .legend-green { background: var(--graph-green); }
.curve-legend .legend-yellow { background: var(--graph-yellow); }
.curve-legend .legend-red { background: var(--graph-red); }
.curve-note { max-width: 880px; margin: 16px 4px 0; color: var(--muted); font-size: .9rem; line-height: 1.7; }
.detail-method { margin-top: 66px; }

.hero.narrow { max-width: 940px; }
.copy {
    max-width: 900px;
    padding: 38px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
}
.copy h2 { margin-top: 42px; font-size: 1.55rem; }
.copy h2:first-child { margin-top: 0; }
.copy p, .copy li { color: var(--muted-strong); line-height: 1.75; }
.copy li + li { margin-top: 8px; }
.copy li::marker { color: var(--accent); }
.button { padding: 0 18px; }

footer { border-top: 1px solid var(--line); background: rgba(5,5,6,.72); }
.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 42px;
    width: min(100% - 40px, 1240px);
    min-height: 128px;
    margin: 0 auto;
}
.footer-inner > div { display: grid; gap: 5px; }
.footer-inner strong { font-size: .74rem; letter-spacing: .08em; }
.footer-inner > div span { color: #616570; font-size: .65rem; }
.footer-inner nav { display: flex; gap: 24px; }
.footer-inner nav a, .footer-analytics-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 750;
    text-align: left;
    text-decoration: none;
}
.footer-inner nav a:hover, .footer-analytics-button:hover { color: var(--text); }
.analytics-consent {
    position: fixed;
    right: max(18px, calc((100vw - 1240px) / 2));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 8;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
    width: min(calc(100% - 36px), 460px);
    padding: 16px 17px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    background: rgba(16,18,24,.96);
    box-shadow: 0 24px 70px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.04);
    backdrop-filter: blur(18px);
}
.analytics-consent[hidden] { display: none; }
.analytics-consent-copy h2 { margin: 0 0 4px; font-size: .96rem; letter-spacing: -.015em; }
.analytics-consent-copy p { margin: 0; color: var(--muted-strong); font-size: .72rem; line-height: 1.45; }
.analytics-consent-copy a { color: #ff766e; font-weight: 800; }
.analytics-consent-actions { display: flex; gap: 8px; }
.analytics-consent-actions button {
    min-height: 34px;
    padding: 0 13px;
    border-radius: 8px;
    font-size: .68rem;
    font-weight: 850;
    transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}
.analytics-consent-actions button:active { transform: scale(.98); }
.analytics-consent-accept { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.analytics-consent-accept:hover { background: #ff5b51; }
.analytics-consent-decline { border: 1px solid #353944; background: transparent; color: var(--muted-strong); }
.analytics-consent-decline:hover { border-color: #5a5f6d; color: var(--text); }
@media (max-width: 900px) {
    .header-inner { grid-template-columns: 1fr auto auto; }
    .primary-nav { gap: 20px; }
    .ranking-hero { display: block; }
    .ranking-hero::after { display: none; }
    .app-gallery-shell { max-width: 760px; margin-top: 32px; }
    .ranking-toolbar { align-items: center; flex-direction: row; }
    .device-stats, .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-inner { grid-template-columns: 1fr auto; padding: 28px 0; }
}

@media (max-width: 680px) {
    .header-inner, main, .footer-inner { width: min(100% - 32px, 1240px); }
    .header-inner { min-height: 68px; gap: 13px; }
    .brand-icon { width: 32px; height: 32px; border-radius: 8px; }
    .brand-copy { font-size: .64rem; }
    .primary-nav { gap: 11px; }
    .primary-nav a { font-size: .57rem; letter-spacing: .025em; }
    .locale-switch { display: none; }
    main { padding: 42px 0 80px; }
    .ranking-hero { padding-top: 8px; }
    .ranking-hero::after { display: none; }
    h1 { margin-top: 12px; font-size: clamp(2.7rem, 13.5vw, 4.5rem); }
    html[lang="ru"] .ranking-hero h1 { font-size: clamp(2.25rem, 9.2vw, 3.5rem); }
    html[lang="ru"] .hero.narrow h1 { font-size: clamp(2.25rem, 9.2vw, 3.5rem); }
    .hero { margin-bottom: 42px; }
    .download-cta { width: 100%; }
    .app-gallery-shell { width: calc(100% + 16px); margin-top: 28px; margin-right: -16px; }
    .app-gallery-shell::after { right: 0; }
    .gallery-card { flex-basis: 145px; border-radius: 14px; }
    .ranking-toolbar { gap: 10px; }
    .tabs { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
    .ranking-toolbar .tabs { flex: 1; width: auto; }
    .tabs a { min-width: 0; padding: 0 10px; }
    .table-sort-bar { align-items: flex-end; }
    .table-sort-bar > span { max-width: 170px; }
    .table-wrap { border-radius: 14px; }
    th, td { padding: 15px 11px; }
    .leaderboard-table:not(.soc-table) th:nth-child(n+5),
    .leaderboard-table:not(.soc-table) td:nth-child(n+5) { display: none; }
    .soc-table th:nth-child(n+4), .soc-table td:nth-child(n+4) { display: none; }
    .leaderboard-table th:first-child, .leaderboard-table td:first-child { width: 46px; padding-right: 4px; }
    .leaderboard-table:not(.soc-table) th:nth-child(2),
    .leaderboard-table:not(.soc-table) td:nth-child(2) { padding-right: 7px; padding-left: 7px; }
    .leaderboard-table:not(.soc-table) th:nth-child(3),
    .leaderboard-table:not(.soc-table) td:nth-child(3) { width: 76px; padding-right: 5px; padding-left: 5px; }
    .leaderboard-table:not(.soc-table) th:nth-child(4),
    .leaderboard-table:not(.soc-table) td:nth-child(4),
    .soc-table th:nth-child(3), .soc-table td:nth-child(3) { width: 96px; }
    .device-link strong { font-size: .78rem; }
    .device-copy small { max-width: 140px; overflow: hidden; font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
    .soc-cell .soc-link { font-size: .62rem; line-height: 1.3; }
    .badge { font-size: .49rem; }
    .metric strong { font-size: .91rem; }
    .rank span { width: 27px; height: 27px; }
    .method { grid-template-columns: 64px minmax(0, 1fr); gap: 20px; margin-top: 54px; }
    .method-index { font-size: 2.6rem; }
    .empty { align-items: flex-start; padding: 25px 20px; }
    .empty-index { font-size: 2.8rem; }
    .back-link { margin-bottom: 28px; }
    .device-hero h1 { font-size: clamp(2.65rem, 13vw, 4rem); }
    .device-stats, .stats-grid { margin-bottom: 44px; }
    .stats-grid > div { min-height: 112px; padding: 17px; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
    .public-graph { margin-inline: -8px; padding-inline: 4px; }
    .public-graph .axis-label { font-size: 32px; }
    .copy { padding: 25px 20px; }
    .methodology-dialog article { padding: 23px 20px; }
    .methodology-dialog header { gap: 12px; }
    .footer-inner { grid-template-columns: 1fr; gap: 20px; }
    .footer-inner nav { flex-direction: column; gap: 8px; }
    .analytics-consent {
        right: 16px;
        bottom: max(16px, env(safe-area-inset-bottom));
        width: calc(100% - 32px);
    }
}

@media (max-width: 390px) {
    .primary-nav { gap: 8px; }
    .primary-nav a { font-size: .53rem; }
    .leaderboard-table:not(.soc-table) th:first-child,
    .leaderboard-table:not(.soc-table) td:first-child { width: 40px; padding-left: 4px; }
    .leaderboard-table:not(.soc-table) th:nth-child(3),
    .leaderboard-table:not(.soc-table) td:nth-child(3) { width: 68px; }
    .leaderboard-table:not(.soc-table) th:nth-child(4),
    .leaderboard-table:not(.soc-table) td:nth-child(4),
    .soc-table th:nth-child(3), .soc-table td:nth-child(3) { width: 88px; padding-left: 5px; }
    .analytics-consent { padding: 14px; }
    .analytics-consent-actions button { flex: 1 1 0; }
}

@media (max-width: 330px) {
    .brand-copy { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
