/* Participant phone, v4 look (deck family). Phone first: 375 wide up, 48 px+ tap targets, 16 px+ inputs (no iOS zoom).
   Also carries the registration pages (register.html, register-admin.html), which reuse these classes. */
body { background: none; font-size: 18px; line-height: 1.35; -webkit-text-size-adjust: 100%; padding-bottom: env(safe-area-inset-bottom); overflow-x: hidden; }
/* two deck backgrounds behind everything: the curve slide for questions, the gold wave of the title slide for welcome and thank-you */
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: -1; background: #04132b center top / cover no-repeat; pointer-events: none; }
body::before { background-image: linear-gradient(180deg, rgba(0, 10, 24, 0) 30%, rgba(0, 10, 24, .55) 100%), url(img/bg-phone.jpg); }
body::after { background-image: linear-gradient(180deg, rgba(0, 10, 24, .15) 0%, rgba(0, 10, 24, .1) 55%, rgba(0, 10, 24, .6) 100%), url(img/bg-phone-wave.jpg); background-position: center; opacity: 0; transition: opacity .9s ease; }
body[data-v="wait"]::after, body[data-v="thanks"]::after { opacity: 1; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 20px; }
.top { padding: calc(16px + env(safe-area-inset-top)) 0 4px; }
.brandrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.top .kicker { font-size: 13px; letter-spacing: .04em; }
.top .kicker::after { width: 46px; height: 2px; margin-top: 6px; }
.bs { color: var(--blue); font-size: 14px; margin-top: 7px; }
.logo { display: block; height: 42px; width: auto; filter: drop-shadow(0 2px 8px rgba(0, 10, 24, .6)); }
body[data-v="wait"] .top .bt { visibility: hidden; }

main { padding-top: 14px; padding-bottom: 44px; }
h1 { font-size: 29px; line-height: 1.16; margin: 0 0 10px; font-weight: 700; letter-spacing: -.005em; overflow-wrap: anywhere; text-wrap: balance; }
h2 { font-size: 24px; line-height: 1.2; margin: 12px 0 8px; font-weight: 700; text-wrap: balance; }
.muted { color: var(--blue); margin: 0 0 14px; font-size: 18px; }
/* "Question 3 of 5": gold line of text with the short gold bar under it, as on the deck section slides */
.step { color: var(--gold2); font-weight: 700; font-size: 16px; margin: 0 0 14px; }
.step::after { content: ""; display: block; width: 56px; height: 3px; background: var(--gold); margin-top: 8px; border-radius: 1px; }

/* progress = the deck timeline: a line of light with ringed nodes, the current one glowing gold */
.trail { position: relative; display: flex; justify-content: space-between; align-items: center; margin: 6px -7px 18px; padding: 0; }
.trail::before { content: ""; position: absolute; left: 22px; right: 22px; top: 50%; height: 2px; transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(156, 196, 242, .15), rgba(191, 214, 245, .75) 50%, rgba(240, 207, 131, .55)); box-shadow: 0 0 10px rgba(156, 196, 242, .45); }
.trail .nd { position: relative; flex: 0 0 48px; width: 48px; height: 48px; padding: 0; margin: 0; border: 0; background: transparent; font: inherit; font-size: 16px; font-weight: 700; color: var(--soft);
  display: grid; place-items: center; touch-action: manipulation; -webkit-tap-highlight-color: transparent; z-index: 0; }
.trail .nd::before { content: ""; position: absolute; left: 7px; top: 7px; width: 34px; height: 34px; border-radius: 50%; background: #071d3d; border: 2px solid rgba(191, 214, 245, .85); z-index: -1; transition: background-color .35s ease, border-color .35s ease, box-shadow .35s ease, transform .35s var(--ease); }
.trail .nd.lock { color: var(--muted); }
.trail .nd.lock::before { border-color: rgba(132, 151, 176, .45); background: #05162f; transform: scale(.72); }
.trail .nd.lock { font-size: 13px; }
.trail .nd.done { color: var(--gold2); }
.trail .nd.done::before { border-color: var(--gold); }
.trail .nd.cur { color: var(--navy); }
.trail .nd.cur::before { background: var(--gold); border-color: var(--gold2); box-shadow: 0 0 0 5px rgba(200, 155, 60, .22), 0 0 22px rgba(240, 207, 131, .7); transform: scale(1.08); }

/* answer options = deck cards: navy panel, thin blue outline, gold when chosen */
ul.opts { list-style: none; margin: 16px 0 6px; padding: 0; display: grid; gap: 10px; }
.opt { width: 100%; min-height: 60px; display: flex; align-items: center; gap: 14px; text-align: left; font: inherit; font-size: 19px; font-weight: 700; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--edge); border-radius: 12px; padding: 11px 16px; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: border-color .2s ease, background-color .2s ease, transform .12s ease, box-shadow .25s ease, opacity .25s ease; }
.opt:active:not(:disabled) { transform: scale(.985); }
.opt .mk { flex: 0 0 28px; height: 28px; border: 2px solid rgba(191, 214, 245, .7); background: rgba(0, 10, 24, .35); border-radius: 7px; position: relative; transition: background-color .2s ease, border-color .2s ease, transform .3s var(--ease); }
.opt.single .mk { border-radius: 50%; }
.opt[aria-pressed="true"] { border-color: var(--gold); background: var(--card2); box-shadow: 0 0 0 1px var(--gold), 0 6px 22px rgba(200, 155, 60, .18); }
.opt[aria-pressed="true"] .mk { border-color: var(--gold); background: var(--gold); animation: pop .32s var(--ease); }
.opt[aria-pressed="true"] .mk::after { content: ""; position: absolute; left: 8px; top: 3px; width: 6px; height: 13px; border: solid var(--navy); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.opt.single[aria-pressed="true"] .mk::after { left: 7px; top: 7px; width: 10px; height: 10px; border: 0; background: var(--navy); border-radius: 50%; transform: none; }
.opt:disabled { opacity: .38; }
.opt .tw { display: flex; flex-direction: column; gap: 3px; min-width: 0; text-align: left; overflow-wrap: anywhere; }
.opt .ds { font-size: 15px; font-weight: 400; color: var(--blue2); line-height: 1.25; }
.count { color: var(--gold2); font-weight: 700; min-height: 26px; margin: 8px 0 4px; }

label.f { display: block; color: var(--blue2); font-weight: 700; font-size: 16px; margin: 18px 0 7px; }
input[type=text], input[type=email], input[type=password], textarea { width: 100%; font: inherit; font-size: 19px; color: var(--ink); background: rgba(0, 16, 36, .72); border: 1.5px solid var(--edge); border-radius: 12px; padding: 14px 16px;
  -webkit-appearance: none; appearance: none; transition: border-color .2s ease, box-shadow .2s ease; }
textarea { min-height: 116px; resize: vertical; display: block; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus, textarea:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 155, 60, .25); }
input:disabled { opacity: .45; }
.row { display: flex; gap: 10px; align-items: stretch; }
.row input { flex: 1; min-width: 0; }

.btn { display: block; width: 100%; min-height: 58px; margin-top: 14px; font: inherit; font-size: 20px; font-weight: 700; color: var(--navy); background: linear-gradient(180deg, #D9AE4F, var(--gold)); border: 0; border-radius: 12px; padding: 12px;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; box-shadow: 0 8px 26px rgba(200, 155, 60, .28); transition: transform .12s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { background: #1a3357; color: #7f93b0; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--edge); box-shadow: none; }
.btn.inline { width: auto; margin-top: 0; padding: 0 20px; min-height: 54px; flex: 0 0 auto; }
/* the send button stays in reach while a long list scrolls behind it */
main > .btn:not(.ghost):not(.inline) { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 3; }
main > .btn:not(.ghost):not(.inline) { box-shadow: 0 0 20px 12px rgba(2, 12, 28, .82), 0 8px 26px rgba(200, 155, 60, .28); }
main > .btn:not(.ghost):not(.inline):disabled { box-shadow: 0 0 20px 12px rgba(2, 12, 28, .82); }
.err { color: var(--bad); min-height: 24px; margin-top: 10px; font-weight: 700; }

/* what you answered: lines with the vertical gold bar the deck puts beside key statements */
.chips { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 9px; }
.chips li { background: var(--card); border: 1px solid var(--edge2); border-left: 4px solid var(--gold); padding: 12px 14px; border-radius: 4px 12px 12px 4px; overflow-wrap: anywhere; font-size: 18px; font-weight: 700; }
.chips li:empty { display: none; }

.thanks { display: flex; gap: 16px; align-items: center; background: var(--card2); border: 1.5px solid var(--gold); border-radius: 12px; padding: 16px; margin: 4px 0 14px; box-shadow: 0 10px 34px rgba(200, 155, 60, .16); }
.thanks .ok { flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--gold); position: relative; animation: pop .5s var(--ease) .15s both, halo 1.6s ease-out .3s 1 both; }
.thanks .ok::after { content: ""; position: absolute; left: 15px; top: 8px; width: 10px; height: 20px; border: solid var(--navy); border-width: 0 4px 4px 0; transform: rotate(45deg); animation: tick .35s ease-out .45s both; }
.thanks b { font-size: 19px; line-height: 1.25; }
.note { color: var(--soft); margin: 6px 0 12px; }
.note b { color: var(--ink); overflow-wrap: anywhere; }
/* answered and waiting for the next question: a calm point of light travels the line */
.thanks + .chips:last-child::after { content: ""; display: block; height: 2px; margin: 26px 12% 0; border-radius: 2px;
  background: radial-gradient(circle, #F0CF83 0, rgba(240, 207, 131, 0) 70%) 0 50% / 26% 100% no-repeat, linear-gradient(90deg, rgba(156, 196, 242, 0), rgba(156, 196, 242, .45) 50%, rgba(156, 196, 242, 0));
  animation: glide 3.2s ease-in-out infinite alternate; }

/* feedback stars */
.rates { display: grid; gap: 14px; margin: 16px 0 6px; }
.rate { background: var(--card); border: 1.5px solid var(--edge); border-radius: 12px; padding: 14px 14px 10px; }
.rate .rl { font-weight: 700; font-size: 19px; margin-bottom: 10px; line-height: 1.2; }
.rate .rv { color: var(--gold2); font-weight: 700; min-height: 24px; margin-top: 6px; font-size: 16px; }
.stars { display: flex; gap: 4px; justify-content: space-between; max-width: 340px; }
.star { width: 56px; height: 56px; padding: 0; border: 0; background: #23406a; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background-color .18s ease, transform .12s ease;
  clip-path: polygon(50% 2%, 61% 36%, 98% 36%, 68% 58%, 79% 94%, 50% 72%, 21% 94%, 32% 58%, 2% 36%, 39% 36%); }
.star:active { transform: scale(.9); }
.star.on { background: linear-gradient(160deg, #F0CF83, #C89B3C 60%); animation: pop .34s var(--ease); }

/* welcome / waiting / final thank-you */
.wait { text-align: center; padding: 30px 0 20px; }
.wait h2 { font-size: 25px; }
.wait .muted { max-width: 22em; margin-left: auto; margin-right: auto; }
.wait .ring { position: relative; width: min(240px, 70%); height: 22px; margin: 6px auto 24px;
  background: linear-gradient(90deg, rgba(156, 196, 242, 0), rgba(191, 214, 245, .8) 50%, rgba(156, 196, 242, 0)) center / 100% 2px no-repeat; }
.wait .ring::after { content: ""; position: absolute; top: 3px; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--gold2); box-shadow: 0 0 0 4px rgba(200, 155, 60, .25), 0 0 18px 4px rgba(240, 207, 131, .7);
  animation: travel 2.6s ease-in-out infinite alternate; }
.wait .ok { width: 92px; height: 92px; margin: 12px auto 26px; border-radius: 50%; background: linear-gradient(160deg, #F0CF83, #C89B3C 65%); position: relative; animation: pop .6s var(--ease) .1s both, halo 2s ease-out .35s 2 both; }
.wait .ok::after { content: ""; position: absolute; left: 33px; top: 16px; width: 20px; height: 41px; border: solid var(--navy); border-width: 0 7px 7px 0; transform: rotate(45deg); animation: tick .4s ease-out .5s both; }
/* the deck title slide, on the phone */
.hero { text-align: left; margin: 4px 0 34px; }
.hero .kicker { font-size: 14px; letter-spacing: .04em; }
.hero .kicker::after { width: 62px; height: 3px; margin-top: 8px; }
.hero .t1, .hero .t2 { font-size: clamp(46px, 14.4vw, 76px); font-weight: 700; line-height: .98; letter-spacing: -.01em; }
.hero .t1 { margin-top: 22px; }
.hero .t2 { color: var(--gold); }
.hero .t3 { color: var(--blue); font-size: clamp(20px, 5.9vw, 28px); margin-top: 16px; line-height: 1.15; }
.k-wait { padding-top: 8px; }
.k-wait h2, .k-wait .muted { text-align: left; margin-left: 0; }
.k-wait h2 { border-left: 4px solid var(--gold); padding-left: 14px; margin-bottom: 8px; }
.k-wait .muted { padding-left: 18px; color: var(--ink); }
.k-wait h2, .k-wait .muted, .hero .t3 { text-shadow: 0 1px 12px rgba(0, 10, 24, .9), 0 0 3px rgba(0, 10, 24, .7); }
.k-wait .ring { margin: 0 0 30px; width: 100%; }

.bigcount { font-size: 64px; font-weight: 700; color: var(--gold); margin: 4px 0 0; line-height: 1; font-variant-numeric: tabular-nums; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* entrance: each new screen rises into place, top to bottom */
#app > * { animation: rise .5s var(--ease) both; }
#app > *:nth-child(2) { animation-delay: .05s; } #app > *:nth-child(3) { animation-delay: .1s; } #app > *:nth-child(4) { animation-delay: .15s; }
#app > *:nth-child(5) { animation-delay: .2s; } #app > *:nth-child(n+6) { animation-delay: .25s; }
#app > .btn { animation-name: fade; }
.opts li { animation: rise .45s var(--ease) both; }
.opts li:nth-child(1) { animation-delay: .12s; } .opts li:nth-child(2) { animation-delay: .16s; } .opts li:nth-child(3) { animation-delay: .2s; } .opts li:nth-child(4) { animation-delay: .24s; }
.opts li:nth-child(5) { animation-delay: .28s; } .opts li:nth-child(6) { animation-delay: .32s; } .opts li:nth-child(7) { animation-delay: .36s; } .opts li:nth-child(n+8) { animation-delay: .4s; }
.hero > * { animation: rise .7s var(--ease) both; }
.hero > *:nth-child(2) { animation-delay: .12s; } .hero > *:nth-child(3) { animation-delay: .22s; } .hero > *:nth-child(4) { animation-delay: .38s; }
.k-wait > .ring, .k-wait > h2, .k-wait > .muted { animation: rise .6s var(--ease) .6s both; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes tick { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes halo { 0% { box-shadow: 0 0 0 0 rgba(240, 207, 131, .55); } 100% { box-shadow: 0 0 0 26px rgba(240, 207, 131, 0); } }
@keyframes travel { from { left: 0; } to { left: calc(100% - 16px); } }
@keyframes glide { from { background-position: 0 50%, 0 0; } to { background-position: 100% 50%, 0 0; } }

@media (min-width: 700px) { body::before { background-image: url(img/bg-q.jpg); } body::after { background-image: url(img/bg-title.jpg); } }
@media (max-width: 350px) { .wrap { padding: 0 14px; } .star { width: 50px; height: 50px; } h1 { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .wait .ring::after { left: calc(50% - 8px); }
}
