:root {
    --ink: #17201f;
    --ink-soft: #58615f;
    --paper: #f5f5ef;
    --surface: #ffffff;
    --line: #dfe1d9;
    --accent: #ff5c35;
    --accent-dark: #db3f1a;
    --lime: #c8f169;
    --blue: #9bd8ee;
    --yellow: #ffd66b;
    --lavender: #c9b8ff;
    --radius: 18px;
    --shadow: 0 20px 60px rgba(23, 32, 31, 0.09);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

h1,
h2,
h3,
p,
dl,
dd {
    margin-top: 0;
}

h1,
h2,
h3 {
    letter-spacing: -0.04em;
    line-height: 1.08;
}

h1 {
    font-size: clamp(2.6rem, 6vw, 5.6rem);
}

h2 {
    margin-bottom: 0;
    font-size: clamp(2rem, 4vw, 3.3rem);
}

h3 {
    font-size: 1.2rem;
}

.shell,
.shell-wide {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.shell-wide {
    width: min(1500px, calc(100% - 40px));
}

.site-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(245, 245, 239, 0.94);
    backdrop-filter: blur(14px);
}

.nav-wrap,
.nav,
.brand,
.footer-wrap,
.hero-actions,
.section-heading,
.detail-title-row,
.rate-topbar,
.card-meta,
.test-card-footer,
.reveal-card,
.reveal-card > div {
    display: flex;
    align-items: center;
}

.nav-wrap {
    min-height: 72px;
    justify-content: space-between;
}

.brand {
    gap: 11px;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 850;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.brand-mark {
    width: 18px;
    height: 18px;
    border: 5px solid var(--ink);
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 5px 5px 0 var(--accent);
}

.nav {
    gap: 24px;
}

.nav > a:not(.button) {
    color: var(--ink-soft);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.nav > a.active,
.nav > a:not(.button):hover {
    color: var(--ink);
}

.button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 24px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    color: #fff;
    background: var(--ink);
    box-shadow: 4px 4px 0 var(--accent);
    cursor: pointer;
    font-weight: 800;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
    background: #26312f;
    box-shadow: 2px 2px 0 var(--accent);
    transform: translate(2px, 2px);
}

.button-small {
    min-height: 40px;
    padding-inline: 18px;
    font-size: 0.87rem;
    box-shadow: none;
}

.button-large {
    min-height: 58px;
    padding-inline: 29px;
}

.button-full {
    width: 100%;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 88px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 24%, rgba(200, 241, 105, 0.17), transparent 22%),
        radial-gradient(circle at 70% 90%, rgba(155, 216, 238, 0.14), transparent 30%),
        var(--ink);
}

.hero::after {
    position: absolute;
    top: -135px;
    right: -110px;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    box-shadow: 0 0 0 55px rgba(255, 255, 255, 0.025), 0 0 0 110px rgba(255, 255, 255, 0.02);
    content: "";
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.7fr);
    align-items: end;
    gap: 100px;
}

.hero h1 {
    max-width: 800px;
    margin-bottom: 28px;
}

.eyebrow {
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: var(--lime);
}

.hero-copy {
    max-width: 680px;
    margin-bottom: 36px;
    color: #cdd4d2;
    font-size: clamp(1.05rem, 2vw, 1.27rem);
}

.hero-actions {
    gap: 26px;
}

.hero .button {
    color: var(--ink);
    border-color: var(--lime);
    background: var(--lime);
    box-shadow: 5px 5px 0 var(--accent);
}

.hero .button:hover {
    background: #d7fa87;
}

.text-link,
.back-link,
.skip-link {
    font-weight: 800;
    text-underline-offset: 5px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 0;
}

.stat-grid > div {
    padding: 23px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.055);
}

.stat-grid dt,
.detail-stats dt {
    color: #aeb8b5;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.stat-grid dd {
    margin-bottom: 0;
    font-size: 2rem;
    font-weight: 850;
    letter-spacing: -0.05em;
}

.section {
    padding-block: 86px;
}

.section-tinted {
    border-top: 1px solid var(--line);
    background: #eceee6;
}

.section-heading {
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 36px;
}

.section-heading > p {
    max-width: 390px;
    margin-bottom: 0;
    color: var(--ink-soft);
}

.blind-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    padding: 9px 14px;
    border: 1px solid #d5c997;
    border-radius: 999px;
    color: #665a2c;
    background: #fff7cf;
    font-size: 0.82rem;
    font-weight: 750;
}

.blind-note.revealed {
    color: #355421;
    border-color: #b8cf9d;
    background: #edf8df;
}

.table-card {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 19px 20px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

th {
    color: #707977;
    background: #fafaf7;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

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

tbody tr {
    transition: background 150ms ease;
}

tbody tr:hover {
    background: #fbfcf6;
}

.rank {
    width: 72px;
    color: var(--ink-soft);
    font-weight: 850;
}

.model-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    text-decoration: none;
}

.model-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.model-dot {
    width: 12px;
    height: 12px;
    border: 2px solid var(--ink);
    border-radius: 50%;
}

.model-dot-1 { background: var(--accent); }
.model-dot-2 { background: var(--lime); }
.model-dot-3 { background: var(--blue); }
.model-dot-4 { background: var(--yellow); }
.model-dot-5 { background: var(--lavender); }
.model-dot-6 { background: #ff9fc9; }

.score-cell strong,
.score-cell meter {
    display: block;
}

.score-meter {
    width: 110px;
    height: 8px;
    margin-top: 6px;
    border: 0;
    border-radius: 10px;
    background: #e8e9e3;
}

.score-meter::-webkit-meter-bar {
    border: 0;
    border-radius: 10px;
    background: #e8e9e3;
}

.score-meter::-webkit-meter-optimum-value {
    border-radius: 10px;
    background: var(--accent);
}

.score-meter::-moz-meter-bar {
    border-radius: 10px;
    background: var(--accent);
}

.muted {
    color: #8b9391;
}

.row-arrow {
    color: var(--accent);
    font-size: 1.25rem;
}

.test-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.test-card {
    display: flex;
    min-height: 235px;
    flex-direction: column;
    padding: 24px;
    border: 1px solid #d5d8cf;
    border-radius: var(--radius);
    background: var(--surface);
    text-decoration: none;
    transition: border 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.test-card:hover {
    border-color: var(--ink);
    box-shadow: 5px 5px 0 var(--yellow);
    transform: translate(-2px, -2px);
}

.test-number {
    color: var(--accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.77rem;
    font-weight: 800;
}

.test-card h3 {
    max-width: 280px;
    margin: 27px 0 10px;
    font-size: 1.3rem;
}

.test-card p {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.test-card-footer {
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
    font-weight: 800;
}

.site-footer {
    color: #d6dcda;
    background: var(--ink);
}

.footer-wrap {
    min-height: 115px;
    justify-content: space-between;
}

.footer-wrap p {
    margin-bottom: 0;
}

.footer-wrap a {
    color: var(--lime);
    font-weight: 800;
}

.empty-state {
    padding: 70px 30px;
    border: 1px dashed #bbc0b8;
    border-radius: var(--radius);
    text-align: center;
    background: rgba(255, 255, 255, 0.55);
}

.empty-state h1,
.empty-state h3 {
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--ink-soft);
}

.completion-state {
    max-width: 720px;
    margin: 80px auto;
    background: #fff;
}

.completion-mark {
    display: inline-grid;
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--lime);
    font-size: 1.7rem;
    font-weight: 900;
}

/* Rating screen */
.rate-section {
    padding-block: 42px 70px;
}

.rate-topbar {
    min-height: 78px;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 20px;
}

.rate-topbar h1 {
    margin-bottom: 0;
    font-size: clamp(1.7rem, 3vw, 2.7rem);
}

.rate-topbar .eyebrow {
    margin-bottom: 6px;
}

.skip-link {
    flex: 0 0 auto;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.rate-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    align-items: start;
    gap: 24px;
}

.browser-frame {
    overflow: hidden;
    border: 1px solid #bec3bb;
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow);
}

.browser-bar {
    display: flex;
    height: 42px;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
    border-bottom: 1px solid #d9ddd5;
    background: #eceeea;
}

.browser-bar > span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #b8bdb5;
}

.browser-bar > span:first-child { background: #ff796a; }
.browser-bar > span:nth-child(2) { background: #ffd36b; }
.browser-bar > span:nth-child(3) { background: #8ad68e; }

.browser-bar div {
    width: min(420px, 55%);
    margin-inline: auto;
    padding: 5px 15px;
    border: 1px solid #d5d8d2;
    border-radius: 6px;
    color: #7f8784;
    background: #f8f9f6;
    font-size: 0.67rem;
    text-align: center;
}

.browser-frame > iframe {
    display: block;
    width: 100%;
    height: max(690px, calc(100vh - 205px));
    border: 0;
    background: #fff;
}

.rating-panel {
    position: sticky;
    top: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 15px 45px rgba(23, 32, 31, 0.07);
}

.blind-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 20px;
    padding: 7px 10px;
    border: 1px solid #e7d890;
    border-radius: 6px;
    color: #6c5c18;
    background: #fff8d7;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.rating-panel h2 {
    margin-bottom: 10px;
    font-size: 1.65rem;
}

.panel-copy {
    margin-bottom: 22px;
    color: var(--ink-soft);
    font-size: 0.91rem;
}

.rating-form fieldset {
    padding: 0;
    border: 0;
}

.rating-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 18px;
}

.rating-option {
    cursor: pointer;
    text-align: center;
}

.rating-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.rating-option > span {
    display: block;
    color: var(--ink-soft);
    font-size: 0.65rem;
    font-weight: 750;
}

.rating-option .rating-number {
    display: grid;
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 5px;
    place-items: center;
    border: 1px solid #d5d9d1;
    border-radius: 10px;
    color: var(--ink);
    background: #fafbf8;
    font-size: 1rem;
    font-weight: 900;
    transition: border 120ms ease, background 120ms ease, transform 120ms ease;
}

.rating-option:hover .rating-number {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.rating-option input:checked + .rating-number {
    color: #fff;
    border-color: var(--ink);
    background: var(--ink);
    box-shadow: 3px 3px 0 var(--accent);
}

.rating-option input:focus-visible + .rating-number {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

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

.prompt-card summary,
.hero-prompt summary {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 850;
}

.prompt-copy {
    max-height: 260px;
    overflow-y: auto;
    margin-top: 13px;
    padding: 14px;
    border-radius: 10px;
    color: #414a48;
    background: #f3f4ef;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
    line-height: 1.65;
}

.rubric {
    margin-top: 20px;
}

.rubric h3 {
    margin-bottom: 8px;
    font-size: 0.83rem;
    letter-spacing: 0;
}

.rubric ul {
    margin: 0;
    padding-left: 20px;
    color: var(--ink-soft);
    font-size: 0.78rem;
}

.reveal-card {
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    padding: 18px 20px;
    border: 1px solid #b5d48e;
    border-radius: 14px;
    background: #eff9e3;
}

.reveal-card > div {
    gap: 14px;
}

.reveal-card p {
    margin-bottom: 2px;
}

.reveal-card p + p {
    color: #4d6540;
    font-size: 0.88rem;
}

.reveal-check {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--lime);
    font-weight: 900;
}

.reveal-card .button {
    min-height: 43px;
    flex: 0 0 auto;
    box-shadow: none;
    font-size: 0.84rem;
}

.result-summary {
    padding: 23px;
    border-radius: 13px;
    text-align: center;
    background: var(--ink);
}

.result-summary .eyebrow {
    color: var(--lime);
}

.big-score {
    color: #fff;
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: -0.08em;
    line-height: 1;
}

.result-summary > p:last-child {
    margin: 6px 0 0;
    color: #b7c0bd;
    font-size: 0.8rem;
}

.alert {
    margin-bottom: 18px;
    padding: 12px 15px;
    border-radius: 9px;
    font-weight: 700;
}

.error-alert {
    color: #7a251d;
    border: 1px solid #efb5ae;
    background: #ffebe8;
}

/* Model and test details */
.detail-hero {
    padding: 55px 0 48px;
    color: #fff;
    background: var(--ink);
}

.back-link {
    display: inline-block;
    margin-bottom: 44px;
    color: #b9c2bf;
    font-size: 0.86rem;
}

.detail-title-row {
    justify-content: space-between;
    gap: 50px;
}

.detail-title-row h1 {
    max-width: 780px;
    margin-bottom: 10px;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.detail-title-row .blind-note {
    margin-top: 12px;
}

.detail-stats {
    display: flex;
    flex: 0 0 auto;
    gap: 34px;
    margin-bottom: 0;
}

.detail-stats > div {
    min-width: 80px;
}

.detail-stats dd {
    margin-bottom: 0;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero-prompt {
    max-width: 900px;
    margin-top: 36px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.055);
}

.hero-prompt > div {
    margin-top: 14px;
    color: #c9d0ce;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.79rem;
    line-height: 1.65;
}

.design-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.design-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 12px 35px rgba(23, 32, 31, 0.06);
    transition: box-shadow 160ms ease, transform 160ms ease;
}

.design-card:hover {
    box-shadow: 0 18px 45px rgba(23, 32, 31, 0.12);
    transform: translateY(-3px);
}

.mini-preview {
    position: relative;
    display: block;
    height: 255px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #e7e9e3;
}

.mini-preview iframe {
    width: 333.333%;
    height: 850px;
    border: 0;
    pointer-events: none;
    transform: scale(0.3);
    transform-origin: left top;
}

.preview-overlay {
    position: absolute;
    right: 15px;
    bottom: 15px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #fff;
    background: var(--ink);
    box-shadow: 3px 3px 0 var(--accent);
    font-size: 0.72rem;
    font-weight: 850;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 150ms ease, transform 150ms ease;
}

.mini-preview:hover .preview-overlay,
.mini-preview:focus-visible .preview-overlay {
    opacity: 1;
    transform: translateY(0);
}

.design-card-body {
    padding: 21px;
}

.card-kicker {
    margin-bottom: 8px;
    color: var(--accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.design-card h3 {
    min-height: 2.5em;
    margin-bottom: 20px;
}

.design-card h3 a {
    text-decoration: none;
}

.design-card h3 a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.card-meta {
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 750;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 1050px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 55px;
    }

    .stat-grid {
        max-width: 680px;
        grid-template-columns: repeat(4, 1fr);
    }

    .rate-layout {
        grid-template-columns: minmax(0, 1fr) 350px;
    }

    .design-grid,
    .test-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-title-row {
        align-items: flex-end;
    }
}

@media (max-width: 820px) {
    .section {
        padding-block: 65px;
    }

    .rate-layout {
        display: flex;
        flex-direction: column;
    }

    .preview-column,
    .rating-panel {
        width: 100%;
    }

    .rating-panel {
        position: static;
        order: -1;
    }

    .browser-frame > iframe {
        height: 650px;
    }

    .detail-title-row {
        display: block;
    }

    .detail-stats {
        margin-top: 30px;
    }
}

@media (max-width: 640px) {
    .shell,
    .shell-wide {
        width: min(100% - 26px, 1180px);
    }

    .nav-wrap {
        min-height: 64px;
    }

    .nav > a:not(.button) {
        display: none;
    }

    .button-small {
        min-height: 38px;
        padding-inline: 14px;
    }

    .hero {
        padding: 70px 0 65px;
    }

    .hero h1 {
        font-size: 2.75rem;
    }

    .hero-actions,
    .section-heading,
    .rate-topbar,
    .reveal-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-grid > div {
        padding: 17px;
    }

    .stat-grid dd {
        font-size: 1.6rem;
    }

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

    th,
    td {
        padding: 15px 14px;
    }

    .test-grid,
    .design-grid {
        grid-template-columns: 1fr;
    }

    .rate-section {
        padding-top: 25px;
    }

    .rate-topbar {
        gap: 12px;
    }

    .rating-panel {
        padding: 20px;
    }

    .rating-option > span:last-child {
        font-size: 0.57rem;
    }

    .browser-frame > iframe {
        height: 570px;
    }

    .reveal-card .button {
        width: 100%;
    }

    .detail-hero {
        padding: 38px 0;
    }

    .back-link {
        margin-bottom: 30px;
    }

    .detail-stats {
        gap: 18px;
    }

    .detail-stats > div {
        min-width: 0;
    }

    .detail-stats dd {
        font-size: 1.55rem;
    }

    .footer-wrap {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
    }
}
