:root {
    --bg: #f0ede8;
    --surface: #ffffff;
    --surface2: #f7f5f2;
    --border: #ddd9d3;
    --border2: #ccc8c2;
    --text: #1a1916;
    --muted: #7a756e;
    --dim: #aaa8a3;
    --accent: #C8401A;
    --accent2: #a83515;
    --accent-light: rgba(200, 64, 26, 0.07);
    --c1: #b94040;
    --c2: #c97040;
    --c3: #c8a020;
    --c4: #4a9458;
    --c5: #2d7a42;
    --display: 'Syne', sans-serif;
    --mono: 'Space Mono', monospace;
    --sans: 'DM Sans', sans-serif;
    --r: 6px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.6;
}

/* ── HEADER */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    position: sticky;
    top: 0;
    z-index: 200;
}

.logo-mark {
    width: 22px;
    height: 22px;
    background: var(--accent);
    clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-wordmark {
    font-family: var(--display);
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

.header-back {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
}

.header-back:hover {
    color: var(--accent);
}

/* ── LAYOUT */
.outer {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* ── INTRO */
.intro {
    margin-bottom: 40px;
}

.intro-eyebrow {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.intro-title {
    font-family: var(--display);
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.1;
}

.intro-sub {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
    max-width: 560px;
}

/* ── PROGRESS */
.progress-wrap {
    margin-bottom: 32px;
}

.progress-bar-bg {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    transition: width .4s;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--mono);
    font-size: 9px;
    color: var(--dim);
    letter-spacing: 0.06em;
}

/* ── DOMAIN BLOCK */
.domain-block {
    display: none;
}

.domain-block.active {
    display: block;
}

.domain-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--accent);
}

.domain-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.domain-title {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
}

.domain-num {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dim);
    margin-top: 2px;
}

/* ── QUESTION */
.question-block {
    margin-bottom: 28px;
}

.question-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 14px;
    line-height: 1.5;
}

/* ── LEVEL OPTIONS */
.level-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.level-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.level-option input[type=radio] {
    display: none;
}

.level-btn {
    width: 100%;
    padding: 11px 16px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: var(--surface);
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: border-color .15s, background .15s;
    text-align: left;
}

.level-btn:hover {
    border-color: var(--border2);
    background: var(--surface2);
}

.level-option input:checked+.level-btn {
    border-color: var(--accent);
    background: var(--accent-light);
}

.level-num {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--dim);
    flex-shrink: 0;
    margin-top: 2px;
    min-width: 16px;
}

.level-option input:checked+.level-btn .level-num {
    color: var(--accent);
}

.level-text {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    flex: 1;
}

.level-option input:checked+.level-btn .level-text {
    color: var(--text);
}

/* Colour dots per level */
.level-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}

/* ── NAVIGATION BUTTONS */
.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 32px;
    gap: 12px;
}

.btn-prev {
    padding: 10px 20px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--r);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    transition: all .15s;
}

.btn-prev:hover {
    border-color: var(--border2);
    color: var(--text);
}

.btn-next {
    padding: 10px 24px;
    background: var(--accent);
    border: none;
    border-radius: var(--r);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: white;
    cursor: pointer;
    transition: background .15s;
}

.btn-next:hover {
    background: var(--accent2);
}

.btn-next:disabled {
    background: var(--dim);
    cursor: not-allowed;
}

.incomplete-msg {
    font-size: 11px;
    color: var(--c1);
    font-family: var(--mono);
    display: none;
}

/* ── RESULTS */
#results {
    display: none;
}

.results-header {
    margin-bottom: 32px;
}

.results-title {
    font-family: var(--display);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.results-intro {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
}

/* Domain result card */
.result-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.result-card-top {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.result-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.result-domain-name {
    font-family: var(--display);
    font-size: 16px;
    font-weight: 700;
    flex: 1;
}

.result-score-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--display);
    font-size: 18px;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.result-level-label {
    font-family: var(--mono);
    font-size: 9px;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Score bar */
.result-bar-wrap {
    padding: 12px 24px 0;
}

.result-bar-bg {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
}

.result-bar-fill {
    height: 6px;
    border-radius: 3px;
    transition: width .6s;
}

/* Result body */
.result-body {
    padding: 16px 24px 20px;
}

.result-conclusion {
    font-size: 13px;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 12px;
}

.result-advice {
    background: var(--surface2);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--r) var(--r) 0;
    padding: 10px 14px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.65;
}

.result-advice strong {
    color: var(--text);
    font-weight: 600;
}

/* Total score */
.total-score-card {
    background: var(--text);
    color: white;
    border-radius: var(--r);
    padding: 24px 28px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: var(--shadow);
}

.total-num {
    font-family: var(--display);
    font-size: 52px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    flex-shrink: 0;
}

.total-label {
    font-family: var(--display);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.total-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

/* Restart */
.btn-restart {
    margin-top: 24px;
    padding: 10px 24px;
    background: none;
    border: 1px solid var(--border2);
    border-radius: var(--r);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    transition: all .15s;
}

.btn-restart:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── FOOTER */
footer {
    border-top: 1px solid var(--border);
    padding: 16px 32px;
    font-family: var(--mono);
    font-size: 9px;
    color: var(--dim);
    letter-spacing: 0.04em;
    text-align: center;
}

footer a {
    color: var(--dim);
    text-decoration: none;
}

footer a:hover {
    color: var(--accent);
}

/* ── CITY INPUT */
.city-input-wrap {
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.city-input-label {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.city-input {
    padding: 10px 14px;
    border: 1px solid var(--border2);
    border-radius: var(--r);
    font-family: var(--sans);
    font-size: 14px;
    color: var(--text);
    background: white;
    outline: none;
    max-width: 320px;
    transition: border-color .15s;
}

.city-input:focus {
    border-color: var(--accent);
}

/* ── PDF BUTTON */
.btn-pdf {
    margin-top: 8px;
    margin-bottom: 24px;
    padding: 11px 28px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--r);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .15s;
}

.btn-pdf:hover {
    background: #a33210;
}

/* ── PRINT */
@media print {

    header,
    footer,
    .progress-wrap,
    .domain-block,
    .intro,
    .btn-restart,
    .btn-pdf,
    .city-input-wrap,
    .header-back {
        display: none !important;
    }

    #results {
        display: block !important;
    }

    .outer {
        padding: 0;
        max-width: 100%;
    }

    .print-header {
        display: block !important;
        margin-bottom: 28px;
        padding-bottom: 16px;
        border-bottom: 2px solid #1a2f4a;
    }

    body {
        background: white;
    }

    .result-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .total-score-card {
        break-inside: avoid;
        box-shadow: none;
    }
}

.print-header {
    display: none;
    font-family: var(--display);
}

.print-header-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.print-header-meta {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.lang-switcher {
    display: flex;
    gap: 4px
}

.lang-btn {
    padding: 3px 7px;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    background: none;
    cursor: pointer;
    transition: all .15s
}

.lang-btn:hover {
    border-color: var(--accent);
    color: var(--accent)
}

.lang-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white
}