:root {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --text: #17324d;
    --muted: #5d6f80;
    --accent: #0f6f78;
    --accent-dark: #0a555d;
    --accent-soft: #e7f3f3;
    --line: #dbe3e8;
    --warning: #fff6df;
    --warning-line: #e5c976;
    --danger: #a32323;
    --shadow: 0 14px 40px rgba(23, 50, 77, 0.09);
    --radius: 20px;
}

* { box-sizing: border-box; }
html { font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
body { margin: 0; min-width: 320px; line-height: 1.55; }
button, input { font: inherit; }
a { color: inherit; }

.page-shell {
    width: min(100% - 28px, 760px);
    margin: 0 auto;
    padding: 28px 0 52px;
}
.page-shell--result { width: min(100% - 28px, 900px); }
.brand-line {
    margin-bottom: 14px;
    color: var(--accent);
    font-weight: 800;
    letter-spacing: .02em;
}
.test-card, .result-hero, .result-section, .next-step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.test-card { padding: clamp(22px, 5vw, 42px); }
.screen h1, .result-hero h1 { margin: 0 0 18px; line-height: 1.16; font-size: clamp(30px, 6vw, 46px); }
.question-title { margin: 0 0 22px; line-height: 1.25; font-size: clamp(26px, 5vw, 36px); }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: .86rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.lead, .screen-hint, .result-hero p { color: var(--muted); font-size: 1.05rem; }
.screen-hint { margin: 0 0 18px; }

.section-progress { margin-bottom: 28px; }
.section-progress__label { display: block; margin-bottom: 8px; font-size: .9rem; font-weight: 700; color: var(--muted); }
.section-progress__track { height: 8px; background: #edf1f3; border-radius: 999px; overflow: hidden; }
.section-progress__bar { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .2s ease; }

.answers { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.answer-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 52px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.answer-option:hover { border-color: #9fbac0; }
.answer-option--selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px rgba(15, 111, 120, .08); }
.answer-option input { margin: 3px 0 0; width: 20px; height: 20px; accent-color: var(--accent); flex: 0 0 auto; }
.answer-option:focus-within { outline: 3px solid rgba(15, 111, 120, .24); outline-offset: 2px; }
.form-error { min-height: 25px; margin-top: 12px; color: var(--danger); font-weight: 700; }
.form-error--visible { padding: 10px 12px; border-radius: 10px; background: #fff0f0; }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button-row--nav { justify-content: space-between; }
.button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid rgba(15, 111, 120, .28); outline-offset: 3px; }
.button--primary { background: var(--accent); color: #fff; }
.button--primary:hover:not(:disabled) { background: var(--accent-dark); }
.button--secondary { background: #fff; color: var(--text); border-color: var(--line); }
.button--wide { width: 100%; margin-top: 12px; }
.button:disabled { opacity: .55; cursor: not-allowed; }

.result-hero { padding: clamp(24px, 5vw, 44px); margin-bottom: 20px; }
.result-hero--error { text-align: left; }
.result-section { padding: clamp(22px, 4vw, 34px); margin: 20px 0; }
.result-section h2, .next-step h2 { margin: 0 0 18px; font-size: clamp(24px, 4vw, 32px); line-height: 1.25; }
.result-cards { display: grid; gap: 14px; }
.result-card { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fbfcfd; }
.result-card h3 { margin: 0 0 10px; font-size: 1.25rem; }
.result-card p { margin: 0; }
.result-card ul, .plain-list { margin: 14px 0 0; padding-left: 22px; }
.result-card li + li, .plain-list li + li { margin-top: 10px; }
.result-section--tax { border-left: 5px solid var(--accent); }
.result-section--unknown { background: #fffaf0; border-color: #ecd9ae; }
.empty-state { padding: 18px; border-radius: 14px; background: #f6f8f9; color: var(--muted); }
.guardrail { margin: 20px 0; padding: 18px 20px; border: 1px solid var(--warning-line); border-radius: 16px; background: var(--warning); }
.next-step { padding: clamp(24px, 5vw, 40px); }
.lesson-title { font-size: 1.12rem; font-weight: 700; }
.expiry-note, .integration-note { color: var(--muted); font-size: .92rem; }
.integration-note { margin-bottom: 0; }

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

@media (max-width: 520px) {
    .page-shell { width: min(100% - 20px, 760px); padding-top: 18px; }
    .test-card { padding: 20px 16px; border-radius: 16px; }
    .answer-option { padding: 14px 13px; }
    .button-row--nav { display: grid; grid-template-columns: 1fr 1.2fr; }
    .button-row--nav .button { width: 100%; }
    .next-step .button-row { display: grid; }
    .next-step .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}

/* BEGIN V1.0.1 FOOTER */
.lesson-copy {
    margin: 0 0 20px;
}

.lesson-copy p {
    margin: 0;
}

.lesson-copy p + p {
    margin-top: 12px;
}

.site-footer {
    margin-top: 46px;
    padding: 18px 4px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.site-footer__name {
    margin: 0;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.site-footer__role {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

.site-footer__lead {
    margin: 14px 0 10px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.contact-link {
    min-height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 1px solid #dce5e8;
    border-radius: 9px;
    background: var(--surface);
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
}

.contact-link:hover {
    border-color: #c6d4d8;
    background: var(--accent-soft);
}

.contact-link:focus-visible {
    outline: 3px solid rgba(15, 111, 120, .28);
    outline-offset: 3px;
}

@media (max-width: 520px) {
    .site-footer {
        margin-top: 50px;
        padding: 16px 0 0;
    }

    .contact-links {
        display: flex;
        gap: 8px;
    }

    .contact-link {
        min-height: 42px;
        width: auto;
        padding: 7px 10px;
        font-size: 14px;
        font-weight: 500;
    }
}
/* END V1.0.1 FOOTER */
/* BEGIN ADS_V1 CONSENT */
.marketing-consent {
    margin: 18px 0 6px;
}

.marketing-consent__label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
}

.marketing-consent__checkbox {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin: 2px 0 0;
    accent-color: var(--accent-dark);
}

.marketing-consent__error {
    margin: 8px 0 0;
    color: #a33a3a;
    font-size: 13px;
    line-height: 1.4;
}

.marketing-consent-submit {
    font: inherit;
}

.marketing-consent-submit:disabled {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}

@media (max-width: 520px) {
    .marketing-consent__checkbox {
        width: 20px;
        height: 20px;
    }
}
/* END ADS_V1 CONSENT */