/* Quiz 2027 (master-2027). Based on prototype v8.15: dark navy + gold, Playfair Display + Montserrat. */

.quiz, .y27-body {
    --bg: #0A0D2B;
    --page: #060818;
    --gold: #E9BE57;
    --on-gold: #1a1405;
    --cream: #F4ECDC;
    --hl: #FFFFFF;
    --calm: rgba(244, 236, 220, .2);
    --soft: rgba(244, 236, 220, .08);
    --warn: #F2805C;
    --field: rgba(255, 255, 255, .06);
    --line: rgba(244, 236, 220, .28);
    --fd: "Playfair Display", Georgia, serif;
    --fb: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: dark;
}

.quiz[data-qt="light"], .y27-body[data-qt="light"] {
    --bg: #FFFFFF;
    --page: #F6F4FF;
    --gold: #4D3CB3;
    --on-gold: #FFFFFF;
    --cream: #2A2740;
    --hl: #17142B;
    --calm: #E3DEFF;
    --soft: #F1EEFF;
    --warn: #B83F2C;
    --field: #FFFFFF;
    --line: #CFC8F2;
    color-scheme: light;
}

html { -webkit-text-size-adjust: 100%; }
.y27-body { margin: 0; background: var(--page); color: var(--cream); min-height: 100vh; }
.y27-body * { box-sizing: border-box; }

.quiz {
    background: var(--page);
    color: var(--cream);
    font: 16px/1.5 var(--fb);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}
.quiz button { font-family: var(--fb); -webkit-tap-highlight-color: transparent; }
.quiz a { color: inherit; }

/* top bar */
.quiz .top { display: flex; align-items: center; gap: 10px; padding: 14px 18px 6px; max-width: 596px; width: 100%; margin: 0 auto; }
/* 44x44 tap area, 36 px visual circle */
.quiz .back { position: relative; width: 44px; height: 44px; margin: -4px; border: 0; background: transparent; color: var(--cream); font-size: 20px; line-height: 1; cursor: pointer; flex: none; border-radius: 50%; }
.quiz .back::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 1px solid var(--line); }
.quiz .back[hidden] { display: none; }
.quiz .logo { display: inline-flex; align-items: center; font: 600 13px var(--fb); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); text-decoration: none; }
.quiz .logo img { height: 22px; display: block; }

/* progress */
.quiz .prog, .quiz .prog-l { max-width: 596px; width: 100%; margin: 0 auto; }
.quiz .prog { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px 18px 0; }
.quiz .prog div { height: 4px; border-radius: 2px; background: var(--calm); }
.quiz .prog div.on { background: var(--gold); }
.quiz .prog-l { display: flex; justify-content: space-between; padding: 6px 18px 0; font-size: 11px; color: var(--cream); opacity: .7; }
.quiz .prog-l span.on { color: var(--gold); opacity: 1; font-weight: 600; }
.quiz .prog-l.cnt { justify-content: flex-end; opacity: .55; }

/* screen */
.quiz .scr { flex: 1; display: flex; flex-direction: column; padding: 22px 18px 24px; gap: 14px; max-width: 560px; width: 100%; margin: 0 auto; }
.quiz .eb { font: 600 12px var(--fb); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 0; }
.quiz .eb.base { opacity: .9; margin: 0 0 -4px; letter-spacing: .06em; text-transform: none; font-size: 13px; line-height: 1.4; }
.quiz h2.t { font: 500 26px/1.2 var(--fd); margin: 0; text-wrap: balance; color: var(--cream); }
.quiz p.s { margin: 0; font-size: 16px; opacity: .9; }
.quiz p.n { margin: 0; font-size: 13.5px; opacity: .7; }
.quiz p.err { margin: 0; font-size: 13.5px; color: var(--warn); }
.quiz p.err:empty, .quiz p.hint:empty { display: none; }
.quiz .hint { margin: 0; font-size: 13.5px; color: var(--gold); }

/* short screens: the button sits right under the content, not at the bottom of a full-height column */
.quiz .btn { display: block; width: 100%; border: 0; border-radius: 14px; padding: 15px 18px; font: 600 16px var(--fb); background: var(--gold); color: var(--on-gold); cursor: pointer; margin-top: 6px; text-align: center; min-height: 50px; }
.quiz .btn[disabled] { opacity: .45; cursor: default; }
.quiz .btn.ghost { background: transparent; color: var(--cream); border: 1px solid var(--line); margin-top: 0; }
.quiz button:focus-visible, .quiz a:focus-visible, .quiz .fld:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* long screens (priorities, email): main button pinned to the bottom of the visible area */
.quiz .stick { position: sticky; bottom: 0; z-index: 5; margin: 0 -18px; padding: 10px 18px calc(10px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to bottom, rgba(0,0,0,0), var(--page) 18px); }
.quiz .stick .btn { margin-top: 0; box-shadow: 0 -6px 18px rgba(0, 0, 0, .25); }

/* priorities */
/* columns never wider than the container (long DE/UK labels at 360 px) */
.quiz .cards { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.quiz .card { min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--field); color: var(--cream); font: 500 14px/1.25 var(--fb); text-align: left; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; min-height: 64px; }
.quiz .card .lb { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.quiz .card .ic { font-size: 16px; color: var(--gold); flex: none; width: 20px; height: 20px; line-height: 20px; text-align: center; }
/* choice number takes the icon's place */
.quiz .card .ic.num { color: var(--on-gold); background: var(--gold); border-radius: 50%; font-size: 12px; font-weight: 700; }
.quiz .card[aria-pressed="true"] { border-color: var(--gold); background: var(--soft); box-shadow: inset 0 0 0 1px var(--gold); }
.quiz .counter { font-size: 13.5px; opacity: .85; text-align: center; margin: 0; }

/* fields */
.quiz .row { display: flex; gap: 10px; }
.quiz .row > div { min-width: 0; }
.quiz .fld { flex: none; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--field); color: var(--cream); padding: 14px; font: 500 17px var(--fb); width: 100%; outline: none; }
.quiz .fld::placeholder { color: var(--cream); opacity: .6; }
.quiz .fld:disabled { opacity: .4; }
.quiz label.fl { font-size: 12px; opacity: .75; display: block; margin-bottom: 6px; }
.quiz .sel { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--cream) 50%), linear-gradient(135deg, var(--cream) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.quiz .sel option { color: var(--cream); background: var(--bg); }
.quiz[data-lang="en"] .sel, .quiz[data-lang="de"] .sel, .quiz[data-lang="es"] .sel, .quiz[data-lang="pt"] .sel, .quiz[data-lang="fr"] .sel { font-size: 15px; }
.quiz .fld.bad, .quiz .sel.bad { border-color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.quiz .chips.bad .chip, .quiz .cards.bad .card { border-color: var(--warn); }

.quiz .chips { display: flex; gap: 10px; }
.quiz .chip { flex: 1; border: 1px solid var(--line); border-radius: 12px; background: var(--field); color: var(--cream); padding: 13px; font: 500 15px var(--fb); cursor: pointer; }
.quiz .chip[aria-pressed="true"] { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); background: var(--soft); }

.quiz .okl { font-size: 14px; color: var(--gold); margin: 0; }
.quiz .okl.warn { color: var(--warn); }
.quiz .okl:empty { display: none; }
.quiz .echo { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--gold); background: var(--soft); align-self: flex-start; }

/* place suggestions */
.quiz .placew { position: relative; }
.quiz .sug { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; margin-top: 6px; }
.quiz .sug[hidden] { display: none; }
.quiz .sug button { display: block; width: 100%; min-height: 46px; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--cream); padding: 12px 14px; font: 400 15px var(--fb); cursor: pointer; }
.quiz .sug button:last-child { border-bottom: 0; }
.quiz .sug button:hover, .quiz .sug button:focus-visible { background: var(--soft); outline: none; }
.quiz .sug .ld { padding: 11px 14px; font-size: 14px; opacity: .6; }

/* email */
.quiz ul.bul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.quiz ul.bul li { display: flex; gap: 10px; font-size: 14.5px; opacity: .9; }
.quiz ul.bul li::before { content: "✓"; color: var(--gold); font-weight: 600; }
.quiz .priv { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0; font-size: 14px; line-height: 1.4; color: var(--cream); }
.quiz .priv .ic { flex: none; width: 20px; height: 20px; display: inline-block; }
.quiz .priv svg { width: 20px; height: 20px; display: block; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.quiz .consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.quiz .sugmail:empty { display: none; }
.quiz .sugrow { display: block; width: 100%; min-height: 44px; text-align: left; border: 1px dashed var(--gold); border-radius: 12px; background: var(--soft); color: var(--gold); padding: 10px 14px; font: 500 14px/1.35 var(--fb); cursor: pointer; }
.quiz .sugrow b { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.quiz .lnk { background: none; border: 0; padding: 0; margin: 0 2px; color: var(--gold); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* confirm */
.quiz .confirm { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.quiz .confirm > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
.quiz .confirm > div:last-child { border-bottom: 0; }
.quiz .confirm span.k { opacity: .65; font-size: 13px; }
.quiz .confirm .v { overflow-wrap: anywhere; }
.quiz .confirm > div { padding-top: 0; padding-bottom: 0; min-height: 52px; }
.quiz .confirm .v { padding: 12px 0; }
/* tap area = row height (>= 44 px) */
.quiz .confirm button.edit { align-self: stretch; min-height: 44px; min-width: 44px; padding: 0 2px 0 12px; border: 0; background: transparent; color: var(--gold); font: 500 13px var(--fb); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; flex: none; }
.quiz .btn.ghost.full { margin-top: 0; }

/* loader */
.quiz .hold { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; color: var(--cream); margin: -2px 0 2px; padding: 12px 14px; border: 1px solid var(--gold); border-radius: 12px; background: var(--soft); }
.quiz .hold .ic { flex: none; width: 22px; height: 22px; display: inline-block; color: var(--gold); }
.quiz .hold svg { width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.quiz .hold strong { font-weight: 700; color: var(--hl); }
.quiz .stages { display: grid; gap: 12px; margin-top: 6px; }
.quiz .stages div { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; opacity: .35; transition: opacity .4s; }
.quiz .stages div.on { opacity: 1; }
.quiz .stages div.done { opacity: .8; }
.quiz .stages div .d { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--gold); flex: none; margin-top: 3px; }
.quiz .stages div.done .d { background: var(--gold); }
.quiz .stages div.on .d { animation: y27pulse 1s infinite; }
@keyframes y27pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .quiz .stages div .d { animation: none; } .quiz .stages div { transition: none; } }

/* landing */
.quiz .land { gap: 22px; }
.quiz .land .hero { display: flex; flex-direction: column; gap: 12px; }
.quiz .land .hero .txt { display: flex; flex-direction: column; gap: 12px; }
.quiz .land .imgw { display: flex; flex-direction: column; gap: 6px; }
.quiz .land h2.t.big { font-size: 30px; }
.quiz .land h3.st { font: 500 20px/1.25 var(--fd); margin: 6px 0 -8px; color: var(--cream); }
.quiz .land p.under { font-size: 13px; opacity: .75; text-align: center; margin: -4px 0 0; }
.quiz .land p.proof { font-size: 12.5px; opacity: .7; text-align: center; margin: -2px 0 0; color: var(--gold); }
.quiz .land .btn { margin-top: 0; }

.quiz .land .schem { border: 1px solid var(--line); border-radius: 20px; padding: 16px 16px 14px; background: linear-gradient(180deg, var(--soft), rgba(0, 0, 0, 0) 70%), var(--bg); box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.quiz .land .schem .mt { font: 600 11px var(--fb); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin: 0 0 10px; }
.quiz .land .schem .yrs { display: grid; gap: 8px; }
.quiz .land .schem .yr { display: grid; grid-template-columns: 40px 1fr; gap: 8px; align-items: start; }
.quiz .land .schem .yr b { font: 600 12px/34px var(--fb); color: var(--gold); opacity: .9; }
.quiz .land .schem .mo { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.quiz .land .schem .mo span { height: 34px; border-radius: 8px; background: transparent; border: 1px dashed var(--line); font-size: 10.5px; letter-spacing: -.01em; display: flex; align-items: center; justify-content: center; opacity: .7; }
.quiz .land .schem .lead { font-size: 13.5px; line-height: 1.4; margin: 12px 0 2px; opacity: .95; }
.quiz .land .schem .leg { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: 12px; opacity: .85; }
.quiz .land .schem .leg > span { display: inline-flex; align-items: flex-start; gap: 6px; }
.quiz .land .schem .leg i { width: 22px; height: 22px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--field); color: var(--cream); flex: none; }
.quiz .land .schem .leg i svg { width: 14px; height: 14px; fill: currentColor; display: block; }
.quiz .land .schem .leg i.main { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.quiz .land .schem .leg i.chance { box-shadow: inset 0 0 0 2px var(--gold); color: var(--gold); }
.quiz .land .schem .leg i.calm { opacity: .7; }
.quiz .land .schem .leg span.lt { display: inline; font-size: 13px; line-height: 1.4; opacity: .95; }
.quiz .land .schem .leg .lt b { color: var(--gold); font-weight: 600; }
.quiz .land .schem .val { margin: 12px 0 0; border-left: 3px solid var(--gold); padding: 10px 12px; background: var(--soft); border-radius: 0 12px 12px 0; font-size: 14.5px; line-height: 1.45; }
.quiz .land .schem .flowwrap { margin-top: 12px; }
.quiz .land .schem .flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.quiz .land .schem .fc { border: 1px solid var(--gold); color: var(--gold); border-radius: 999px; padding: 4px 10px; font: 600 11.5px var(--fb); }
.quiz .land .schem .fa { color: var(--gold); opacity: .7; font-size: 13px; }
.quiz .land .schem .mn.basis { opacity: .5; font-size: 11px; margin: 10px 0 0; }

.quiz .land .qs { display: grid; grid-template-columns: 1fr; gap: 10px; }
.quiz .land .qs .q { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--gold); border-radius: 14px; padding: 12px; background: linear-gradient(180deg, var(--soft), rgba(0, 0, 0, 0)), var(--field); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); color: var(--cream); font: 600 14px/1.25 var(--fb); text-align: left; cursor: pointer; min-height: 58px; }
.quiz .land .qs .q:hover { background: var(--soft); }
.quiz .land .qs .q .arr { color: var(--gold); font-size: 18px; flex: none; }

.quiz .land .use { display: grid; gap: 10px; }
.quiz .land .use > div { display: flex; gap: 12px; align-items: flex-start; border-left: 3px solid var(--gold); border-radius: 0 14px 14px 0; padding: 12px 14px; background: var(--soft); }
.quiz .land .use .ic { color: var(--gold); font-size: 18px; width: 22px; flex: none; text-align: center; margin-top: 1px; }
.quiz .land .use b { display: block; font: 600 12px var(--fb); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 3px; }
.quiz .land .use .tx { font-size: 14.5px; line-height: 1.45; display: block; }
.quiz .land .use .tx strong { font-weight: 600; color: var(--hl); }
.quiz .land .use-after { font-size: 13px; line-height: 1.45; opacity: .75; margin: 10px 2px 0; }

.quiz .land .midcta { margin: 18px 0 8px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--field); text-align: center; }
.quiz .land .midcta .ml { font-size: 14.5px; line-height: 1.45; margin: 0 0 12px; opacity: .95; }

.quiz .land .learn { display: grid; gap: 10px; }
.quiz .land .learn > div { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--field); }
.quiz .land .learn .ic { color: var(--gold); font-size: 18px; width: 22px; flex: none; text-align: center; margin-top: 1px; }
.quiz .land .learn b, .quiz .land .how b { display: block; font: 600 15px/1.3 var(--fb); color: var(--cream); }
.quiz .land .learn span.tx, .quiz .land .how span.tx { font-size: 13.5px; opacity: .8; line-height: 1.4; display: block; }

.quiz .land .tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz .land .tr div { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--soft); }
.quiz .land .tr b { display: block; font: 600 22px/1.1 var(--fd); color: var(--gold); margin-bottom: 4px; }
.quiz .land .tr span { font-size: 12.5px; opacity: .8; line-height: 1.35; display: block; }

.quiz .land .who { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--field); }
.quiz .land .who img.av { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--gold); }
.quiz .land .who b { display: block; font: 600 15px var(--fb); }
.quiz .land .who i { font-style: normal; font-size: 13px; opacity: .75; display: block; }

.quiz .land .how { display: grid; gap: 10px; }
.quiz .land .how > div { display: flex; gap: 12px; align-items: flex-start; }
.quiz .land .how .num { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); display: flex; align-items: center; justify-content: center; font: 600 13px var(--fb); flex: none; }

.quiz .legal { font-size: 12px; opacity: .7; display: flex; gap: 6px; justify-content: center; }
.quiz .legal a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }

/* desktop */
@media (min-width: 900px) {
    .quiz { background: radial-gradient(1200px 500px at 50% -10%, var(--soft), transparent 60%), var(--page); }
    .quiz .scr { padding: 40px 24px 48px; }
    .quiz h2.t { font-size: 34px; }
    .quiz .top.wide, .quiz .land { max-width: 1000px; }
    .quiz .land h2.t.big { font-size: 40px; }
    .quiz .land .hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
    .quiz .land .learn { grid-template-columns: 1fr 1fr; }
    .quiz .land .tr { grid-template-columns: repeat(4, 1fr); }
    .quiz .land .use { grid-template-columns: 1fr 1fr 1fr; }
    .quiz .land .qs { grid-template-columns: 1fr 1fr; }
}

/* floating CTA on the landing (shown by JS via .is-on) */
.quiz .fcta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: linear-gradient(to bottom, rgba(0,0,0,0), var(--page) 18px); opacity: 0; transform: translateY(10px); visibility: hidden; pointer-events: none; transition: opacity .2s ease-out, transform .2s ease-out, visibility 0s linear .2s; }
.quiz .fcta.is-on { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.quiz .fcta .btn { max-width: 586px; margin: 0 auto; box-shadow: 0 -6px 18px rgba(0, 0, 0, .25); white-space: nowrap; }
.quiz .land.has-fcta { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
@media (prefers-reduced-motion: reduce) { .quiz .fcta { transition: none; } }
@media (min-width: 700px) { .quiz .fcta { display: none; } .quiz .land.has-fcta { padding-bottom: 0; } }

/* narrow phones: long RU titles (e.g. after a landing question) stay at 3 lines */
@media (max-width: 374px) { .quiz h2.t { font-size: 23px; } }

/* Cookiebot badge sits on the buttons and consent links on phones: hidden in the quiz (report 16.11, B8) */
@media (max-width: 768px) { #CookiebotWidget { display: none !important; } }
