:root {
    --bg: #0b0d12;
    --panel: #121620;
    --panel-2: #171c27;
    --text: #f4f7fb;
    --muted: #98a2b3;
    --line: #252c39;
    --accent: #79a7ff;
    --accent-strong: #a8c6ff;
    --shadow: 0 18px 50px rgba(0, 0, 0, .18);
    --max: 1180px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
    margin: 0;
    background:
        radial-gradient(circle at 15% 0%, rgba(82, 119, 255, .12), transparent 33rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a { color: var(--accent-strong); text-decoration: none; }
a:hover { color: white; }

a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 3px;
}

.shell {
    width: min(calc(100% - 32px), var(--max));
    margin: 0 auto;
}

.site-header {
    border-bottom: 1px solid var(--line);
    background: rgba(11, 13, 18, .82);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
}

.brand-mark {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 9px;
}

nav { display: flex; align-items: center; justify-content: flex-end; gap: 18px; flex-wrap: wrap; }
nav a { color: #c8d0dc; font-weight: 600; }

.hero {
    padding: 100px 0 60px;
}

.eyebrow {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .78rem;
    font-weight: 800;
}

h1 {
    margin: 12px 0 18px;
    font-size: clamp(2.5rem, 6vw, 5.2rem);
    line-height: .98;
    letter-spacing: -.05em;
}

.hero-copy, .page-heading p {
    color: #b4bdca;
    max-width: 720px;
    font-size: 1.15rem;
}

.hero-copy { max-width: 1024px; }

.hero-actions { margin-top: 30px; display: flex; gap: 10px; flex-wrap: wrap; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 11px;
    font-weight: 800;
}

.button.primary {
    color: #08101f;
    background: #a9c7ff;
}

.button.secondary {
    color: #dbe7ff;
    border: 1px solid #33405a;
    background: rgba(21, 28, 42, .72);
}

.stats-grid, .details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.stat-card, .detail-card, .compare-card {
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.stat-label {
    color: var(--muted);
    font-size: .83rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
}

.stat-label.top-device-heading {
    color: var(--text);
    font-size: 1.5rem;
}

.stat-value {
    margin-top: 6px;
    font-size: 2rem;
    font-weight: 850;
    letter-spacing: -.04em;
}

.stat-unit, .muted { color: var(--muted); }

.section { padding: 66px 0 20px; }

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 5px 0 0;
    font-size: 1.8rem;
}

.table-card {
    border: 1px solid var(--line);
    background: rgba(18, 22, 32, .86);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th, td {
    text-align: left;
    vertical-align: top;
    padding: 15px 16px;
    border-bottom: 1px solid var(--line);
}

th {
    color: #939dad;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .07em;
}

tbody tr:last-child td { border-bottom: 0; }

tbody tr:hover { background: rgba(255, 255, 255, .018); }

.device-link { color: #eef4ff; font-weight: 750; }

.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border: 1px solid #33405a;
    border-radius: 999px;
    color: #bbd0ff;
    background: #151c2a;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.rank {
    font-weight: 850;
    color: #dce7fb;
}

.page-heading {
    padding: 70px 0 28px;
}

.page-heading h1 {
    font-size: clamp(2.4rem, 5vw, 4.5rem);
}

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 18px;
}

.filters a {
    padding: 7px 12px;
    border-radius: 999px;
    color: #aab4c2;
    border: 1px solid var(--line);
}

.filters a.active {
    color: #071020;
    background: #aac7ff;
    border-color: #aac7ff;
    font-weight: 800;
}

.result-hero {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(76, 117, 255, .14), rgba(138, 87, 255, .06));
}

.giant-number {
    margin-top: 4px;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: .95;
    font-weight: 900;
    letter-spacing: -.055em;
}

.giant-unit {
    color: #b8c3d3;
    font-size: 1.15rem;
}

.rank-number {
    font-size: 2.7rem;
    font-weight: 900;
}

@media (min-width: 769px) {
    .rank-number {
        text-align: right;
    }
}

.details-grid { margin-top: 14px; }

.privacy-grid {
    grid-template-columns: 1fr;
}

.device-stats-grid {
    margin-bottom: 14px;
}

.device-stats-grid .detail-card {
    padding: 16px 18px;
}

.detail-card strong {
    display: block;
    margin-top: 7px;
    font-size: 1.2rem;
}

.compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.compare-card h2 { margin: 18px 0 10px; }

.compare-rate {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -.04em;
}

.relative {
    margin: 18px 0;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: #c3ccda;
}

dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 7px 16px;
    margin: 0;
}

dt { color: var(--muted); }
dd { margin: 0; text-align: right; }

.empty, .empty-panel {
    color: var(--muted);
    text-align: center;
    padding: 34px;
}

.empty-state {
    padding: 44px 28px;
    border: 1px dashed #354055;
    border-radius: 16px;
    background: rgba(18, 22, 32, .62);
    text-align: center;
}

.empty-state h2, .empty-state h3 {
    margin: 0 0 8px;
}

.empty-state p {
    max-width: 560px;
    margin: 0 auto 20px;
    color: var(--muted);
}

.compact-empty {
    padding: 32px 24px;
}

.status-page {
    max-width: 720px;
    padding: 110px 0 70px;
}

.status-page h1 {
    margin-bottom: 16px;
}

.status-page p {
    max-width: 560px;
    margin: 0 0 28px;
    color: #b4bdca;
    font-size: 1.1rem;
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    padding: 28px 0 45px;
    font-size: .9rem;
}

@media (max-width: 760px) {
    .hero { padding-top: 66px; }
    .stats-grid, .details-grid { grid-template-columns: 1fr; }
    .result-hero { align-items: start; flex-direction: column; }
    .section-heading { align-items: start; flex-direction: column; }
}

.select-col {
    width: 76px;
    text-align: center;
}

.select-col input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.compare-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 14px;
}

button.button {
    border: 0;
    cursor: pointer;
    font: inherit;
}

@media (max-width: 760px) {
    .compare-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}


.page-actions {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.card-action {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.device-details-grid {
    margin-bottom: 4px;
}

@media (max-width: 620px) {
    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 12px 0;
    }
}


.nav-benchmark {
    padding: 8px 13px;
    border-radius: 9px;
    background: #a9c7ff;
    color: #08101f;
    font-weight: 850;
}

.nav-benchmark:hover {
    color: #08101f;
    background: #c2d7ff;
}

.benchmark-start-heading {
    padding-bottom: 18px;
}

.benchmark-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.benchmark-option {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 26px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
}

.benchmark-option h2 {
    margin: 20px 0 8px;
    font-size: 2rem;
}

.benchmark-option p {
    color: #b4bdca;
    margin: 0 0 26px;
}


.benchmark-support-note {
    margin: -14px 0 26px;
    color: var(--muted);
    font-size: .86rem;
}

.benchmark-option .button {
    margin-top: auto;
}

.benchmark-option.disabled {
    opacity: .58;
}

.benchmark-option-top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.benchmark-option-type {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.muted-pill {
    color: #aab4c2;
    background: #141923;
}

.disabled-button {
    color: #8d97a7;
    border: 1px solid #303746;
    background: #151922;
    cursor: not-allowed;
}

.instruction-card {
    max-width: 760px;
    padding: 28px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
}

.instruction-card h2 {
    margin: 8px 0 10px;
}

pre {
    overflow-x: auto;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #0a0d13;
    color: #dce7fb;
}

@media (max-width: 760px) {
    .benchmark-option-grid {
        grid-template-columns: 1fr;
    }
}

.score-meta, .result-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 650;
}

.result-meta {
    margin-top: 10px;
    font-size: .88rem;
}

.compare-score-meta {
    margin-top: 8px;
}

.release-card {
    max-width: 720px;
}

.site-footer .shell {
    display: flex;
    align-items: center;
    min-height: 44px;
}

@media (max-width: 760px) {
    nav {
        width: 100%;
        justify-content: flex-start;
        gap: 10px 14px;
    }

    .nav-benchmark {
        margin-left: auto;
    }

    .page-heading {
        padding-top: 52px;
    }
}

@media (max-width: 520px) {
    .shell { width: min(calc(100% - 22px), var(--max)); }
    .hero { padding-top: 52px; }
    .nav-benchmark { margin-left: 0; }
    .button { width: 100%; }
    .hero-actions { align-items: stretch; }
}


@media (max-width: 760px) {
    table {
        min-width: 680px;
    }

    th, td {
        padding: 12px 13px;
    }

    .table-card {
        border-radius: 13px;
    }

    .result-hero {
        padding: 24px;
    }

    .status-page {
        padding-top: 72px;
    }
}

@media (max-width: 520px) {
    .page-heading h1 {
        overflow-wrap: anywhere;
    }

    .empty-state {
        padding: 34px 18px;
    }
}

/* Quick / Sustained benchmark presentation */
.benchmark-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.benchmark-type-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
}

.benchmark-type-card h2 {
    margin: 8px 0 10px;
    font-size: 1.55rem;
}

.benchmark-type-card p {
    color: #b4bdca;
}

.benchmark-timing-note {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 0 0 26px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(18, 22, 32, .58);
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.6;
    text-align: center;
}

/* Keep hardware filters on the left and benchmark type on the right. */
.filter-groups {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.filter-groups .filters {
    margin-bottom: 0;
}

.benchmark-type-filters {
    margin-left: auto;
}

.benchmark-type-filters a {
    min-width: 96px;
    text-align: center;
}

/* Override the generic .detail-card strong rule for the benchmark score. */
.detail-card .device-best-score {
    display: block;
    margin-top: 0.45rem;
    font-size: 4rem;
    line-height: 1;
    letter-spacing: -0.04em;
}

.detail-card .device-best-unit {
    margin-top: 0.35rem;
    color: #b8c3d3;
    font-size: 1.5rem;
    font-weight: 600;
}

.detail-card .device-best-rank {
    margin-top: 0.8rem;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.15;
}

@media (max-width: 760px) {
    .benchmark-type-grid {
        grid-template-columns: 1fr;
    }

    .filter-groups {
        flex-direction: column;
        align-items: stretch;
    }

    .benchmark-type-filters {
        margin-left: 0;
    }
}

/* Contact and bug report forms */
.public-form-card { max-width: 680px; margin-bottom: 48px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 700; margin-bottom: 6px; }
.form-field input, .form-field textarea {
    display: block; width: 100%; padding: 12px 13px;
    border: 1px solid #374357; border-radius: 9px;
    background: #0c121e; color: var(--text); font: inherit;
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-error { color: #ffb4b4; margin: 8px 0; }
.form-hint { color: var(--muted); font-size: .86rem; }
.form-submit { margin-top: 18px; border: 0; cursor: pointer; }
.site-footer .shell { flex-wrap: wrap; gap: 4px; }
