:root {
    color-scheme: dark;
    --page: #000;
    --surface: #151718;
    --surface-raised: #292b2e;
    --surface-selected: #564139;
    --border: #494c50;
    --accent: #c56249;
    --accent-light: #ef9678;
    --text: #f6f3ef;
    --muted: #aaa9a7;
    --paper: #f3ede4;
    --paper-text: #282522;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--page);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.page-shell {
    position: relative;
    width: min(100%, 820px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 18px 24px;
    background: var(--surface);
    overflow: hidden;
}

.language-switch {
    position: absolute;
    z-index: 3;
    top: 18px;
    right: 18px;
    display: flex;
    gap: 5px;
}

.language-switch a {
    padding: 5px 9px;
    border: 1px solid #3e4145;
    border-radius: 999px;
    color: #aeadab;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.language-switch a.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.statement-builder {
    position: relative;
    padding: 50px 0 24px;
}

.hero {
    text-align: center;
}

.hero p {
    overflow-wrap: anywhere;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent-light);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

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

h1 {
    margin-bottom: 8px;
    font-size: clamp(28px, 5vw, 38px);
    line-height: 1.1;
    letter-spacing: -.025em;
}

.lead {
    margin-bottom: 12px;
    color: #dedbd7;
    font-size: 16px;
}

.prompt {
    margin-bottom: 24px;
    color: var(--accent-light);
    font-size: 16px;
}

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

.identity-field {
    display: grid;
    align-content: start;
    grid-auto-rows: max-content;
    gap: 7px;
}

.identity-field > span {
    font-size: 13px;
    font-weight: 700;
}

.identity-field input {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    background: var(--surface-raised);
    color: var(--text);
}

.identity-field input:focus {
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(239, 150, 120, .12);
}

.identity-field input:not(:placeholder-shown):invalid {
    border-color: #e16f66;
}

.identity-field small {
    color: var(--muted);
    font-size: 11px;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.category-tab {
    min-height: 34px;
    padding: 7px 14px;
    border: 0;
    border-radius: 999px;
    background: #303236;
    color: #fff;
    font-size: 13px;
    transition: background .18s ease, transform .18s ease;
}

.category-tab:hover {
    background: #3a3d41;
    transform: translateY(-1px);
}

.category-tab.is-active {
    background: var(--accent);
}

.question-group {
    display: grid;
    gap: 9px;
}

.question-row {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-raised);
    transition: border-color .18s ease, background .18s ease;
}

.question-row span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.question-row:hover {
    border-color: #6a6d71;
}

.question-row:has(input:checked) {
    border-color: var(--accent-light);
    background: var(--surface-selected);
}

.question-row input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--accent-light);
}

.selection-count {
    margin: 12px 0 10px;
    color: #c6c4c1;
    font-size: 13px;
}

.declare-button {
    width: 100%;
    min-height: 42px;
    padding: 10px 18px;
    border: 0;
    border-radius: 999px;
    background: #f3f3f3;
    color: #181818;
    font-weight: 650;
    letter-spacing: .02em;
    transition: opacity .18s ease, transform .18s ease;
}

.declare-button:not(:disabled):hover {
    transform: translateY(-1px);
}

.declare-button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.privacy-note {
    margin: 12px 0 20px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.form-error {
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid #9f463e;
    border-radius: 9px;
    background: rgba(159, 70, 62, .14);
    color: #ffb3aa;
    text-align: center;
}

.declaration {
    min-height: 280px;
    padding: 24px clamp(20px, 6vw, 56px) 34px;
    border-radius: 12px;
    background: var(--paper);
    color: var(--paper-text);
    text-align: center;
}

.declaration-person {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(77, 68, 60, .16);
    text-align: left;
}

.declaration-avatar {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 1px solid rgba(197, 98, 73, .28);
    border-radius: 50%;
    background: rgba(197, 98, 73, .1);
    color: var(--accent-dark);
    font-size: 21px;
    font-weight: 800;
}

.declaration-person-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.declaration-person-copy span {
    color: #857c74;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.declaration-person-copy strong {
    overflow-wrap: anywhere;
    font-size: 19px;
}

.declaration-meta {
    display: grid;
    justify-items: end;
    gap: 3px;
    color: #756e68;
    font-size: 11px;
}

.declaration-meta span {
    color: #49423d;
    font-weight: 800;
    letter-spacing: .04em;
}

.declaration-icon {
    display: grid;
    place-items: center;
    margin-bottom: 10px;
    color: var(--accent);
}

.declaration-kicker {
    margin-bottom: 12px;
    color: #b55d47;
    font-size: 13px;
    font-weight: 750;
}

.declaration h2 {
    margin-bottom: 14px;
    font-size: 24px;
}

.declaration-list {
    display: grid;
    gap: 11px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.declaration-list li {
    line-height: 1.4;
}

.empty-declaration {
    margin-bottom: 0;
    color: #77716b;
}

.jump-button {
    position: sticky;
    bottom: 16px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin: -20px auto 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #050505;
    color: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0 8px;
    border-top: 1px solid #2c2e30;
    color: #858585;
    font-size: 12px;
}

.result-shell {
    width: min(100% - 28px, 880px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 54px 0 40px;
}

.result-heading {
    margin-bottom: 24px;
    text-align: center;
}

.result-heading h1 {
    margin-bottom: 8px;
    font-size: clamp(28px, 5vw, 40px);
}

.result-heading p:last-child {
    color: var(--muted);
}

.declaration-standalone {
    min-height: 420px;
    padding: 30px clamp(22px, 6vw, 60px) 26px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .35);
}

.declaration-signature {
    margin-top: 28px;
    padding-top: 14px;
    border-top: 1px solid rgba(77, 68, 60, .16);
    color: #8a8179;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.result-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.result-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.result-button.secondary {
    background: #292b2e;
}

[hidden] {
    display: none !important;
}

@media (max-width: 620px) {
    .page-shell {
        padding-inline: 12px;
    }

    .statement-builder {
        padding-top: 34px;
    }

    .category-tabs {
        flex-wrap: nowrap;
        margin-inline: -12px;
        padding-inline: 12px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .category-tabs::-webkit-scrollbar {
        display: none;
    }

    .category-tab {
        flex: 0 0 auto;
    }

    .identity-fields {
        grid-template-columns: 1fr;
    }

    .question-row {
        min-height: 58px;
        padding: 12px;
        font-size: 14px;
    }

    .declaration {
        padding-inline: 18px;
    }

    .declaration-person {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .declaration-avatar {
        width: 46px;
        height: 46px;
    }

    .declaration-meta {
        grid-column: 1 / -1;
        grid-template-columns: 1fr 1fr;
        justify-items: start;
        padding-left: 58px;
    }

    .site-footer {
        flex-direction: column;
        text-align: center;
    }

    .result-shell {
        width: min(100% - 20px, 880px);
        padding-top: 34px;
    }

    .declaration-standalone {
        padding-inline: 18px;
    }

    .result-actions {
        display: grid;
    }
}
