/* Finelo quiz — plain CSS, no framework.
   Palette is the "dark-green" token set the original funnel ships. */

:root {
    --bg-page: #111112;
    --bg-card: #2b2b2d;
    --bg-container: #1e1e1e;
    --bg-select: #2b2b2d;
    --bg-select-active: #1f2818;
    --accent: #91e245;
    --accent-soft: #d0f594;
    --accent-dark: #1f3906;
    --text: #ffffff;
    --text-2: #cfcfcf;
    --text-on-accent: #0a0a0a;
    --border: #3f3f3f;
    --border-2: #1f1f1f;
    --border-accent: #73bd2c;
    --success: #53bf65;
    --error: #db3012;
    --radius: 12px;
    --max: 400px;
}

* {
    box-sizing: border-box;
}

/* Author rules like `.overlay { display: flex }` have the same specificity as
   the browser's built-in `[hidden]` rule, and author CSS wins ties over the
   UA stylesheet — so without this, a hidden .overlay would still show up. */
[hidden] {
    display: none !important;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-page);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.text-accent,
.label-text-all-accent {
    color: var(--accent);
}

/* ---------- frame ---------- */
.shell {
    max-width: var(--max);
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 16px 32px;
}

.topbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-bottom: 2px solid var(--border-2);
    margin: 0 -16px;
    padding: 0 16px;
    flex: none;
}

.logo {
    height: 21px;
    width: auto;
}

.burger {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    padding: 6px;
    display: grid;
    gap: 4px;
}

.burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

/* ---------- progress ---------- */
.progress {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0 4px;
    flex: none;
}

.progress[hidden] {
    display: none;
}

.progress-back {
    background: none;
    border: 0;
    font-size: 26px;
    line-height: 1;
    padding: 0 4px;
    color: var(--text-2);
}

.progress-track {
    flex: 1;
    height: 4px;
    background: var(--bg-card);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: var(--accent);
    border-radius: 2px;
    transition: width .35s ease;
}

.progress-label {
    font-size: 13px;
    color: var(--text-2);
    min-width: 42px;
    text-align: right;
}

/* ---------- screen ---------- */
.screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 16px;
    animation: fade .25s ease;
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

h1,
h2 {
    margin: 0 0 8px;
    line-height: 1.15;
    text-transform: uppercase;
}

h1 {
    font-size: 30px;
    font-weight: 800;
    text-align: center;
}

h2 {
    font-size: 22px;
    font-weight: 700;
    text-transform: none;
}

.sub {
    color: var(--text-2);
    text-align: center;
    margin: 0 0 20px;
}

.spacer {
    flex: 1;
}

/* ---------- buttons ---------- */
.btn {
    display: block;
    width: 100%;
    border: 0;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--text-on-accent);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: .02em;
    text-transform: uppercase;
    padding: 18px 16px;
    margin-top: 12px;
    transition: filter .15s ease, opacity .15s ease;
}

.btn:hover:not(:disabled) {
    filter: brightness(1.07);
}

.btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.btn-row {
    display: flex;
    gap: 12px;
}

.btn-row .btn {
    flex: 1;
}

/* ---------- option lists ---------- */
.options {
    display: grid;
    gap: 12px;
    margin: 4px 0 16px;
}

.option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: var(--bg-select);
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    transition: background .15s ease, border-color .15s ease;
}

.option:hover {
    border-color: var(--border);
}

.option.selected {
    background: var(--bg-select-active);
    border-color: var(--border-accent);
}

.option img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex: none;
}

.option .check {
    margin-left: auto;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--border);
    flex: none;
    position: relative;
}

.option.selected .check {
    background: var(--accent);
    border-color: var(--accent);
}

.option.selected .check::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--text-on-accent);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.option .arrow {
    margin-left: auto;
    color: var(--text-2);
}

/* full-bleed question with background image */
.cover-question {
    position: relative;
    margin: -16px -16px 16px;
    padding: 24px 16px 20px;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-size: cover;
    background-position: center;
}

.cover-question::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 17, 18, .35) 0%, rgba(17, 17, 18, .95) 85%);
}

.cover-question>* {
    position: relative;
    z-index: 1;
}

/* ---------- cards / info ---------- */
.info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.info-card {
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.info-card small {
    display: block;
    font-size: 10px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-2);
}

.info-card b {
    font-size: 13px;
}

.card {
    background: var(--bg-container);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.hero {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.legal {
    font-size: 12px;
    color: var(--text-2);
    text-align: center;
    margin-top: 16px;
}

.legal a {
    color: #4a98cc;
}

/* ---------- teaser overlay ---------- */
.overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-page);
    z-index: 50;
    display: flex;
    justify-content: center;
    overflow-y: auto;
    animation: fade .2s ease;
}

.overlay-inner {
    width: 100%;
    max-width: var(--max);
    padding: 24px 16px 32px;
    display: flex;
    flex-direction: column;
}

.overlay-inner img {
    border-radius: var(--radius);
    margin-bottom: 20px;
}

/* ---------- inputs ---------- */
.field {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--border-2);
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 8px;
}

.field.ok {
    border-color: var(--success);
}

.field.bad {
    border-color: var(--error);
}

.field input {
    flex: 1;
    background: none;
    border: 0;
    outline: none;
    color: var(--text);
    font-size: 16px;
}

.hint {
    font-size: 13px;
    margin: 0 0 12px;
    min-height: 18px;
}

.hint.ok {
    color: var(--success);
}

.hint.bad {
    color: var(--error);
}

.note {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--text-2);
    margin-bottom: 16px;
}

/* ---------- checkout form ---------- */
.summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.summary-line b {
    color: var(--accent);
    font-size: 20px;
}

.form {
    display: grid;
    gap: 14px;
    margin-bottom: 8px;
}

.form-row {
    display: block;
}

.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 6px;
}

.form .field {
    margin-bottom: 0;
}

.form .hint {
    display: block;
    min-height: 0;
    margin: 0;
}

.form .hint.bad {
    min-height: 18px;
    margin-top: 4px;
}

/* ---------- magic / loader ---------- */
.loader-wrap {
    text-align: center;
    padding-top: 32px;
}

/* circular percentage gauge */
.dial {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
}

.dial svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.dial circle {
    fill: none;
    stroke-width: 8;
}

.dial-track {
    stroke: var(--bg-card);
}

.dial-bar {
    stroke: var(--accent);
    stroke-linecap: round;
    transition: stroke-dashoffset .25s linear;
}

.dial-pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 800;
    color: var(--accent);
}

.review {
    background: var(--bg-container);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
    text-align: left;
}

.review b {
    display: block;
    margin-bottom: 4px;
}

.review p {
    margin: 0;
    font-size: 14px;
    color: var(--text-2);
}

.stars {
    color: var(--accent);
    font-size: 13px;
    letter-spacing: 2px;
}

/* ---------- summary meter ---------- */
.meter-title {
    text-align: center;
    color: var(--text-2);
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin: 24px 0 0;
}

.meter-level {
    text-align: center;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 4px;
}

.callout {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-container);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-2);
}

.callout img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex: none;
}

.row-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.row-label img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex: none;
}

.meter {
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg, #db3012, #ffb020, var(--accent));
    position: relative;
    margin: 12px 0 8px;
}

.meter-pin {
    position: absolute;
    top: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--bg-page);
    transform: translateX(-50%);
}

.meter-scale {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-2);
    margin-bottom: 20px;
}

.rows {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg-container);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.row span:last-child {
    color: var(--accent);
    font-weight: 700;
    text-align: right;
}

/* ---------- lists ---------- */
.bullets {
    display: grid;
    gap: 12px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.bullets li {
    display: flex;
    gap: 10px;
    font-size: 15px;
    color: var(--text-2);
}

.bullets li::before {
    content: "";
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--accent-dark);
    background-image: linear-gradient(var(--accent), var(--accent));
    background-size: 8px 8px;
    background-position: center;
    background-repeat: no-repeat;
}

.bullets li b {
    color: var(--text);
}

.compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.compare>div {
    background: var(--bg-container);
    border-radius: var(--radius);
    padding: 14px;
}

.compare ul {
    margin: 8px 0 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--text-2);
}

.compare ul li {
    margin-bottom: 6px;
}

.compare .good {
    border: 1px solid var(--border-accent);
}

.shots {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.shots img {
    border-radius: var(--radius);
}

/* ---------- prize wheel ---------- */
.wheel-wrap {
    position: relative;
    width: min(320px, 84vw);
    margin: 12px auto 24px;
    aspect-ratio: 1;
}

.wheel-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wheel-sectors {
    transition: transform 4.5s cubic-bezier(.17, .67, .12, .99);
}

.wheel-wrap .wheel-arrow {
    z-index: 2;
    inset: auto;
    top: -3%;
    left: 50%;
    width: 13%;
    height: auto;
    transform: translateX(-50%);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5));
}

/* ---------- offers ---------- */
.offer {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: var(--bg-container);
    border: 2px solid var(--border-2);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
}

.offer.selected {
    border-color: var(--accent);
    background: var(--bg-select-active);
}

.offer .radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex: none;
}

.offer.selected .radio {
    border-color: var(--accent);
    background: radial-gradient(circle, var(--accent) 0 45%, transparent 46%);
}

.offer-name {
    font-weight: 700;
}

.offer-old {
    color: var(--text-2);
    text-decoration: line-through;
    font-size: 13px;
}

.offer-price {
    margin-left: auto;
    text-align: right;
}

.offer-price b {
    font-size: 26px;
    color: var(--accent);
}

.offer-price small {
    display: block;
    font-size: 11px;
    color: var(--text-2);
}

.badge {
    position: absolute;
    top: -10px;
    right: 12px;
    background: var(--accent);
    color: var(--text-on-accent);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.done {
    text-align: center;
    padding: 40px 0;
}

.done .tick {
    font-size: 56px;
    color: var(--accent);
}

/* ---------------------------------------------------------------------------
 * Wider screens. The funnel is phone-first; from tablet up it gets a roomier
 * column, larger type and two-up option/plan grids instead of a stretched
 * 400px strip.
 * ------------------------------------------------------------------------- */
@media (min-width: 720px) {
    :root {
        --max: 640px;
    }

    .shell {
        padding-bottom: 48px;
    }

    .topbar {
        height: 64px;
    }

    .logo {
        height: 26px;
    }

    h1 {
        font-size: 40px;
    }

    h2 {
        font-size: 28px;
    }

    .sub {
        font-size: 17px;
    }

    .screen {
        padding-top: 24px;
    }

    .btn {
        font-size: 18px;
        padding: 20px 16px;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .btn-row {
        max-width: 420px;
        margin: 0 auto;
    }

    .btn-row .btn {
        max-width: none;
    }

    /* answers side by side when they are short enough to read that way */
    .options {
        grid-template-columns: 1fr 1fr;
    }

    .options:has(> :nth-child(7)) {
        grid-template-columns: 1fr;
    }

    /* The artwork is framed for a phone-width column, so stretching it across a
       desktop panel crops it to a floating head. Keep the panel at its intended
       width and centre it instead. */
    .cover-question {
        width: 100%;
        max-width: 420px;
        margin: 0 auto 24px;
        padding: 24px 20px 20px;
        min-height: 300px;
        border-radius: var(--radius);
        overflow: hidden;
    }

    .dial {
        width: 220px;
        height: 220px;
    }

    .dial-pct {
        font-size: 52px;
    }

    .shots {
        grid-template-columns: 1fr 1fr;
    }

    .offer {
        padding: 20px;
    }

    /* first / last name pair up once there is room */
    .form {
        grid-template-columns: 1fr 1fr;
    }

    .form-row[data-key="phone"],
    .form-row[data-key="email"] {
        grid-column: 1 / -1;
    }

    /* the submit button (and the spacer before it) are direct children of
       the same grid, so without this they'd land in the right-hand column
       instead of spanning full width */
    .form > .spacer,
    .form > .btn {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    :root {
        --max: 720px;
    }

    .compare {
        gap: 20px;
    }
}

/* keep the phone layout usable on very short/small screens too */
@media (max-width: 360px) {
    .info-row {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 26px;
    }
}
