:root {
  --ink: #16212b;
  --ink-2: #51606d;
  --bg: #eef2f5;
  --card: #ffffff;
  --line: #d7dee4;
  --brand: #0f3d5e;
  --accent: #0e7c86;
  --accent-soft: #e3f3f4;
  --warn: #b3261e;
  --warn-soft: #fdecea;
  --ok: #1d7a3a;
  --radius: 14px;
  --font: "Noto Sans", "Noto Sans Telugu", "Noto Sans Devanagari", "Noto Sans Tamil", "Noto Sans Oriya", "Noto Sans Bengali", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e7edf2; --ink-2: #a8b6c2; --bg: #0e1620; --card: #17222e; --line: #2a3947;
    --brand: #0b2c44; --accent: #3fb6bf; --accent-soft: #143238; --warn: #ff8a80; --warn-soft: #3a1d1b; --ok: #6fd18f;
  }
}
:root[data-theme="dark"] {
  --ink: #e7edf2; --ink-2: #a8b6c2; --bg: #0e1620; --card: #17222e; --line: #2a3947;
  --brand: #0b2c44; --accent: #3fb6bf; --accent-soft: #143238; --warn: #ff8a80; --warn-soft: #3a1d1b; --ok: #6fd18f;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--font); }
[hidden] { display: none !important; }
.sr { position: absolute; left: -9999px; }

.top { background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; gap: 10px; align-items: center; min-width: 0; }
.brand .logo { font-size: 26px; }
.brand strong { display: block; font-size: 16px; line-height: 1.2; }
.brand small { display: block; opacity: .8; font-size: 13px; }
.langsw select { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 15px; }
.langsw option { color: #000; }

.wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 48px; }
.card { background: var(--card); border-radius: var(--radius); padding: 20px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.06); border: 1px solid var(--line); }
h1 { font-size: 24px; line-height: 1.3; margin: 0 0 12px; }
h2 { font-size: 22px; line-height: 1.3; margin: 4px 0 6px; }
.intro, .hint { color: var(--ink-2); font-size: 15px; }
.hint.warn { color: var(--warn); font-weight: 600; }

label { display: block; font-weight: 600; margin: 14px 0 0; }
input[type=email], input[type=text], input:not([type]), select, textarea {
  display: block; width: 100%; margin-top: 6px; font: inherit; color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 14px; min-height: 52px;
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
input.code { font-size: 28px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
textarea { min-height: 96px; resize: vertical; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; padding: 13px 22px; min-height: 52px; cursor: pointer; text-decoration: none; }
.btn.big { width: 100%; margin-top: 20px; font-size: 18px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn:active { transform: translateY(1px); }
.link { background: none; border: 0; color: var(--accent); font: inherit; font-size: 15px; text-decoration: underline; padding: 8px 0; cursor: pointer; }
.row-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.alert { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 12px 14px; font-weight: 600; }
.info { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; }
.debug { background: #fff3cd; color: #6b4e00; border-radius: 10px; padding: 10px 14px; }
.verified { color: var(--ok); font-weight: 600; margin: 0; word-break: break-all; }

.steps { display: flex; gap: 10px; list-style: none; padding: 0; margin: 0 0 16px; }
.steps li { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--bg); color: var(--ink-2); border: 1.5px solid var(--line); }
.steps li.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.steps li.done { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* survey */
.progress { height: 8px; background: var(--bg); border-radius: 8px; overflow: hidden; }
.progress div { height: 100%; background: var(--accent); border-radius: 8px; }
.part { margin: 10px 0 0; color: var(--ink-2); font-size: 14px; font-weight: 600; }
fieldset.q { border: 0; border-top: 1px solid var(--line); margin: 18px 0 0; padding: 18px 0 0; min-width: 0; }
legend { padding: 0; font-weight: 600; font-size: 18px; line-height: 1.45; display: block; width: 100%; }
.opt-tag { color: var(--ink-2); font-weight: 400; font-size: 14px; margin-left: 4px; }
.listen { margin-left: 6px; background: var(--accent-soft); border: 0; border-radius: 50%; width: 36px; height: 36px; font-size: 17px; cursor: pointer; vertical-align: middle; }

.choices { display: grid; gap: 8px; margin-top: 10px; }
.ch { margin: 0; font-weight: 400; display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 52px; cursor: pointer; }
.ch input { width: 22px; height: 22px; accent-color: var(--accent); flex: 0 0 auto; margin: 0; }
.ch:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.sc { margin: 0; font-weight: 400; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 2px; cursor: pointer; min-height: 96px; }
.sc input { position: absolute; opacity: 0; pointer-events: none; }
.sc .face { font-size: 30px; line-height: 1; filter: grayscale(.4); }
.sc .sl { font-size: 12px; line-height: 1.25; color: var(--ink-2); overflow-wrap: anywhere; hyphens: auto; }
.sc:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.sc:has(input:checked) .face { filter: none; transform: scale(1.12); }
.sc:has(input:checked) .sl { color: var(--ink); font-weight: 600; }
.sc:has(input:focus-visible), .rt:has(input:focus-visible) { outline: 3px solid var(--accent); }

.rating { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; margin-top: 12px; }
.rt { margin: 0; cursor: pointer; }
.rt input { position: absolute; opacity: 0; pointer-events: none; }
.rt span { display: grid; place-items: center; height: 46px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rt:has(input:checked) span { background: var(--accent); border-color: var(--accent); color: #fff; }
.rating-ends { display: flex; justify-content: space-between; color: var(--ink-2); font-size: 13px; margin-top: 6px; }

.answer-text { margin-top: 10px; }
.rec { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 10px; }
.rec-or { color: var(--ink-2); font-size: 14px; }
.btn-rec { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--warn); color: var(--warn); background: transparent; border-radius: 999px; padding: 10px 18px; font: inherit; font-weight: 700; min-height: 48px; cursor: pointer; }
.btn-rec .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--warn); }
.btn-rec.on { background: var(--warn); color: #fff; }
.btn-rec.on .dot { background: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.rec-status { font-size: 14px; color: var(--ok); font-weight: 600; }
.rec-play { width: 100%; height: 40px; }
.other-box { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--bg); }
.support { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; font-weight: 600; margin-top: 14px; }

.nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.nav .btn { flex: 1; }
.page[data-page="1"] .back { visibility: hidden; }
.skip { margin-top: 22px; }

.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 20; padding: 16px; }
.overlay .card { text-align: center; max-width: 320px; }
.spinner { width: 42px; height: 42px; margin: 0 auto 12px; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.thanks { text-align: center; }
.big-tick { width: 72px; height: 72px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 40px; display: grid; place-items: center; margin: 8px auto 14px; }

@media (max-width: 380px) {
  body { font-size: 16px; }
  .sc .face { font-size: 26px; }
  .sc .sl { font-size: 11px; }
}
@media (max-width: 440px) {
  .rating { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
/* On phones the agree scale becomes a vertical list, so long Telugu/Tamil/Odia labels stay readable */
@media (max-width: 480px) {
  .scale { grid-template-columns: 1fr; gap: 8px; }
  .sc { flex-direction: row; justify-content: flex-start; text-align: left; gap: 12px; min-height: 52px; padding: 8px 14px; }
  .sc .face { font-size: 26px; width: 32px; text-align: center; flex: 0 0 32px; }
  .sc .sl { font-size: 16px; color: var(--ink); overflow-wrap: normal; }
}

fieldset.dob { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
fieldset.dob legend { font-weight: 600; font-size: 17px; }
.dob-row { display: grid; grid-template-columns: 0.9fr 1.2fr 1.2fr; gap: 8px; }
.dob-row select { padding-left: 10px; padding-right: 4px; }

.lead { font-size: 17px; margin: 0 0 4px; }
h1.are-you { font-size: 24px; margin: 4px 0 8px; overflow-wrap: anywhere; }
.fair { background: #fff7e0; border: 1.5px solid #e9c46a; border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; color: #3d2f00; }
.fair h2 { font-size: 18px; margin: 0 0 6px; }
.fair p { margin: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fair { background: #33290d; border-color: #7a6320; color: #f5e6b8; } }

.req-offer { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; }
.req-offer p { margin: 0 0 10px; }

/* ================= v7 look: brand header, hero intro, login card ================= */
:root { --navy: #0b2e4a; --navy-2: #134f78; --sea: #6fd3d9; --bg: #eef3f6; }
html, body { background: var(--bg); }
.top { background: var(--navy); padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.brand { gap: 12px; }
.brand .mark { width: 42px; height: 42px; flex: 0 0 42px; }
.wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.wordmark strong { font-size: 21px; font-weight: 700; letter-spacing: .22em; color: #fff; }
.wordmark span { font-size: 12.5px; letter-spacing: .06em; color: var(--sea); text-transform: uppercase; margin-top: 3px; font-weight: 600; }
.lang-te .wordmark span, .lang-hi .wordmark span, .lang-ta .wordmark span, .lang-or .wordmark span, .lang-bn .wordmark span { text-transform: none; letter-spacing: 0; font-size: 13px; }
.langsw { position: relative; display: flex; align-items: center; }
.langsw .globe { position: absolute; left: 10px; width: 18px; height: 18px; color: #cfe9ee; pointer-events: none; }
.langsw select { padding: 8px 12px 8px 34px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28); font-weight: 600; min-height: 40px; }

.hero { margin: -16px -16px 0; padding: 28px 20px 64px; color: #fff;
  background: radial-gradient(120% 90% at 100% 0%, rgba(111,211,217,.28) 0%, rgba(111,211,217,0) 55%), linear-gradient(165deg, var(--navy) 0%, var(--navy-2) 100%);
  position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 38px;
  background: var(--bg); clip-path: path("M0 20 C 60 5, 120 5, 180 20 S 300 35, 360 20 S 480 5, 540 20 S 660 35, 720 20 L 720 40 L 0 40 Z"); }
@supports not (clip-path: path("M0 0")) { .hero::after { border-radius: 50% 50% 0 0; } }
.tagline { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--navy); background: var(--sea); border-radius: 999px; padding: 4px 12px; }
.hero h1 { font-size: 27px; line-height: 1.25; margin: 14px 0 10px; color: #fff; }
.hero p { margin: 0; color: #d7e7f0; font-size: 16.5px; line-height: 1.6; }
.features { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.features li { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 10px 12px; font-size: 15px; font-weight: 600; }
.features svg { width: 26px; height: 26px; flex: 0 0 26px; fill: none; stroke: var(--sea); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.card.login { border-radius: 18px; border: 0; box-shadow: 0 10px 30px rgba(11,46,74,.10), 0 1px 3px rgba(11,46,74,.08); padding: 22px 20px 20px; position: relative; }
.card.login.lifted { margin-top: -36px; z-index: 2; }
.card-head { display: flex; justify-content: flex-start; margin-bottom: 6px; }
.card-title { font-size: 19px; line-height: 1.4; margin: 4px 0 2px; }
.card.login .steps { margin: 0 0 8px; }
.card.login .steps li { width: 28px; height: 28px; font-size: 14px; }
.card.login .btn.big { border-radius: 14px; min-height: 56px; font-size: 18px; background: linear-gradient(180deg, #129aa0, #0e7c86); box-shadow: 0 4px 12px rgba(14,124,134,.28); }
.fineprint { text-align: center; color: var(--ink-2); font-size: 13.5px; margin: 14px 0 0; }
.notice { background: #fff7e0; border: 1.5px solid #e9c46a; color: #3d2f00; border-radius: 12px; padding: 12px 14px; margin: 8px 0 12px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.facts div { background: var(--bg); border-radius: 10px; padding: 8px 12px; }
.facts span { display: block; font-size: 12.5px; color: var(--ink-2); }
.facts strong { font-size: 16px; letter-spacing: .03em; }
.row-links.center { justify-content: center; }
.avatar { width: 64px; height: 64px; border-radius: 50%; margin: 4px auto 6px; display: grid; place-items: center; font-size: 28px; font-weight: 700; color: #fff; background: linear-gradient(160deg, var(--navy-2), #129aa0); }
h1.are-you { text-align: center; }
.done-box { text-align: center; padding: 10px 0; }
.done-box p { font-size: 17px; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0e1620; }
  :root:not([data-theme="light"]) .notice { background: #33290d; border-color: #7a6320; color: #f5e6b8; }
}
@media (min-width: 560px) {
  .hero { margin: -16px 0 0; border-radius: 0 0 24px 24px; padding: 34px 28px 70px; }
  .hero h1 { font-size: 31px; }
  .features { grid-template-columns: 1fr 1fr 1fr; }
  .features li { flex-direction: column; align-items: flex-start; }
}
@media (min-width: 700px) { .top { padding-left: calc((100% - 640px) / 2 + 16px); padding-right: calc((100% - 640px) / 2 + 16px); } }

.exit-btn { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; font-weight: 600; font-size: 14.5px;
  border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.1); border-radius: 999px; padding: 8px 14px; min-height: 40px; white-space: nowrap; }
.exit-btn svg { width: 18px; height: 18px; fill: none; stroke: #cfe9ee; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 380px) { .exit-btn span { display: none; } }
