/* ===========================================================================
   VITALIS — design system
   Calm clinical palette: deep teal-navy + emerald accent on soft canvas.
   =========================================================================== */
:root {
  --bg: #f4f7f6;
  --bg-soft: #ffffff;
  --ink: #0f2a2e;
  --ink-soft: #4a6168;
  --ink-faint: #8197a0;
  --line: #e2eae8;
  --line-strong: #cdd9d6;

  --teal: #0d9488;        /* primary */
  --teal-deep: #0f3d3a;   /* headings / dark surfaces */
  --emerald: #10b981;
  --mint: #d6f1ea;
  --mint-soft: #eafaf5;
  --amber: #eab308;
  --orange: #f97316;
  --red: #ef4444;

  --grad: linear-gradient(135deg, #0d9488 0%, #0f766e 45%, #115e59 100%);
  --grad-hero: radial-gradient(1200px 600px at 80% -10%, #134e4a 0%, #0c2c2a 55%, #081f1d 100%);

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px -12px rgba(13, 60, 58, .25);
  --shadow-sm: 0 4px 14px -8px rgba(13, 60, 58, .3);
  --font: "Noto Sans Thai", "IBM Plex Sans Thai", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.icon { display: inline-block; vertical-align: middle; flex: none; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 22px; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  max-width: 1060px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--teal-deep); letter-spacing: -.02em; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
  color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--ink-faint); letter-spacing: 0; }
.lang-toggle {
  display: flex; gap: 2px; border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 3px; background: #fff;
}
.lang-toggle button {
  border: 0; background: transparent; color: var(--ink-soft);
  padding: 5px 12px; border-radius: 999px; font-weight: 700; font-size: 13px;
}
.lang-toggle button.on { background: var(--teal-deep); color: #fff; }

/* ---------- hero ---------- */
.hero { background: var(--grad-hero); color: #eafaf5; padding: 64px 0 80px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 15% 110%, rgba(16,185,129,.22), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero .pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  color: #b8efe2; padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(30px, 5vw, 50px); line-height: 1.12; margin: 0 0 18px; letter-spacing: -.02em; color: #fff; font-weight: 800; }
.hero p.sub { font-size: clamp(15px, 2vw, 19px); max-width: 640px; color: #c7e9e1; margin: 0 0 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px; border: 0;
  font-weight: 800; font-size: 16px; padding: 15px 26px; border-radius: 14px;
  background: var(--emerald); color: #04201a; text-decoration: none;
  box-shadow: 0 14px 30px -10px rgba(16, 185, 129, .6); transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 20px 36px -12px rgba(16, 185, 129, .7); }
.btn.ghost { background: rgba(255,255,255,.08); color: #eafaf5; border: 1px solid rgba(255,255,255,.25); box-shadow: none; }
.btn.secondary { background: #fff; color: var(--teal-deep); box-shadow: var(--shadow-sm); }
.hero .time { margin-top: 16px; font-size: 13px; color: #8fc9bd; display: flex; align-items: center; gap: 7px; }

/* hero 2-column + demo card */
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.hero-demo { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-radius: 20px; padding: 26px 24px 22px; text-align: center; backdrop-filter: blur(6px); box-shadow: 0 24px 50px -20px rgba(0,0,0,.5); }
.demo-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8fc9bd; border: 1px solid rgba(255,255,255,.2); padding: 4px 11px; border-radius: 999px; margin-bottom: 8px; }
.demo-gauge { display: block; margin: 0 auto; }
.demo-score-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #9fd8cc; margin-top: -4px; }
.demo-pot { margin-top: 16px; color: #fff; font-weight: 800; font-size: 17px; }
.demo-pot-num { font-size: 34px; color: #34d399; }
.demo-pot .demo-pot-num + small { font-size: 15px; color: #c7e9e1; font-weight: 600; }
.demo-pot-label { font-size: 12.5px; color: #9fd8cc; margin-top: 2px; }

/* section headings (landing) */
.sec-h { text-align: center; font-size: clamp(22px, 3.2vw, 32px); color: var(--teal-deep); letter-spacing: -.01em; margin: 0 0 8px; }
.sec-sub { text-align: center; color: var(--ink-soft); margin: 0 auto 26px; max-width: 600px; }

/* steps */
.steps { padding: 52px 0 12px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.step-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px 22px; box-shadow: var(--shadow-sm); }
.step-no { position: absolute; top: -14px; left: 22px; width: 30px; height: 30px; border-radius: 9px; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.step-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--mint); color: var(--teal); display: grid; place-items: center; margin: 8px 0 12px; }
.step-card h3 { margin: 0 0 5px; font-size: 16px; color: var(--teal-deep); }
.step-card p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }

/* levers preview (how to add days) */
.levers-preview { padding: 56px 0; background: linear-gradient(180deg, #ffffff 0%, var(--mint-soft) 100%); }
.lever-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lever-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.lever-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.lever-stat .ls-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--mint); color: var(--teal); display: grid; place-items: center; margin-bottom: 12px; }
.ls-num { font-size: 34px; font-weight: 800; color: var(--teal-deep); line-height: 1; letter-spacing: -.02em; }
.ls-num span { font-size: 15px; font-weight: 700; color: var(--emerald); }
.ls-label { font-size: 15.5px; font-weight: 700; color: var(--ink); margin-top: 6px; }
.ls-src { font-size: 11.5px; color: var(--ink-faint); font-style: italic; margin-top: 3px; }
.levers-more { text-align: center; margin-top: 28px; }

/* credibility band */
.cred { background: var(--grad-hero); color: #eafaf5; padding: 50px 0; text-align: center; }
.cred h2 { font-size: clamp(20px, 3vw, 28px); color: #fff; margin: 0 0 10px; }
.cred p { color: #c7e9e1; max-width: 620px; margin: 0 auto 18px; font-size: 15px; }
.cred-sources { font-size: 13px; color: #8fc9bd; letter-spacing: .02em; }

/* final CTA band */
.cta-band { padding: 56px 0; text-align: center; }
.cta-band h2 { font-size: clamp(22px, 3.4vw, 32px); color: var(--teal-deep); margin: 0 0 8px; }
.cta-band p { color: var(--ink-soft); margin: 0 0 22px; }

/* ---------- AI / deep-research band ---------- */
.ai-band { position: relative; overflow: hidden; padding: 74px 0; text-align: center; color: #eafaf5;
  background: radial-gradient(900px 480px at 50% -15%, rgba(16,185,129,.28), transparent 60%), linear-gradient(160deg, #0b2e2a 0%, #061a18 100%); }
.ai-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(620px 320px at 88% 118%, rgba(13,148,136,.28), transparent 70%); pointer-events: none; }
.ai-band .wrap { position: relative; z-index: 1; }
.ai-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .12em; color: #6ee7c4; background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.32); padding: 7px 16px; border-radius: 999px; }
.ai-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #34d399; animation: aiPulse 2s infinite; }
@keyframes aiPulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.6); } 70% { box-shadow: 0 0 0 10px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.ai-head { font-size: clamp(26px, 4.2vw, 44px); line-height: 1.16; font-weight: 800; color: #fff; margin: 20px 0 14px; letter-spacing: -.02em; }
.ai-sub { max-width: 700px; margin: 0 auto 42px; font-size: clamp(15px, 1.8vw, 18px); color: #bfe6dd; }
.ai-flow { display: flex; align-items: stretch; justify-content: center; gap: 10px; }
.ai-step { flex: 1; min-width: 0; position: relative; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 24px 18px 20px; text-align: left; backdrop-filter: blur(6px); transition: transform .15s, border-color .15s; }
.ai-step:hover { transform: translateY(-4px); border-color: rgba(52,211,153,.5); }
.ai-step-ic { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #10b981, #0d9488); color: #04201a; display: grid; place-items: center; }
.ai-step-no { position: absolute; top: 16px; right: 18px; font-size: 13px; font-weight: 800; color: rgba(110,231,196,.45); letter-spacing: .05em; }
.ai-step h3 { margin: 14px 0 6px; font-size: 16px; color: #fff; }
.ai-step p { margin: 0; font-size: 13px; color: #9fd8cc; line-height: 1.5; }
.ai-arrow { display: flex; align-items: center; color: #34d399; flex: none; }
.ai-stats { display: flex; justify-content: center; gap: 44px; flex-wrap: wrap; margin: 40px 0 4px; }
.ai-stat-num { font-size: clamp(30px, 4vw, 42px); font-weight: 800; color: #34d399; line-height: 1; letter-spacing: -.02em; }
.ai-stat-num span { font-size: 18px; color: #bfe6dd; font-weight: 700; }
.ai-stat-label { font-size: 13px; color: #9fd8cc; margin-top: 6px; }
.ai-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }

/* ---------- auth (nav) ---------- */
.auth-slot { display: flex; align-items: center; }
.auth-signin { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line-strong); background: #fff; color: var(--teal-deep); font-weight: 700; font-size: 13.5px; padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: all .12s; }
.auth-signin:hover { border-color: var(--teal); color: var(--teal); }
.auth-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; padding: 4px 12px 4px 4px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--ink); transition: border-color .12s; }
.auth-chip:hover { border-color: var(--teal); }
.auth-av { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.auth-nm { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- my profile ---------- */
.profile-page { padding: 42px 0 70px; }
.profile-grid { display: grid; grid-template-columns: 320px 1fr; gap: 22px; margin-top: 22px; align-items: start; }
.profile-card .pf-id { display: flex; align-items: center; gap: 14px; }
.pf-av-lg { width: 54px; height: 54px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 22px; flex: none; }
.pf-name { font-weight: 800; font-size: 17px; color: var(--teal-deep); }
.pf-email { font-size: 13px; color: var(--ink-faint); }
.pf-input { width: 100%; padding: 11px 13px; font-size: 15px; font-family: inherit; border: 1.5px solid var(--line-strong); border-radius: 11px; background: #fcfefe; color: var(--ink); }
.pf-input:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 3px var(--mint); }
.pf-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.profile-signin { text-align: center; max-width: 460px; margin: 30px auto; }
.profile-signin h2 { color: var(--teal-deep); margin: 0 0 8px; }
.profile-signin p { color: var(--ink-soft); margin: 0 0 18px; }
.muted { color: var(--ink-faint); }
.spark-wrap { margin: 14px 0 18px; }
.sparkline { height: 120px; display: block; }
.hist-list { display: flex; flex-direction: column; }
.hist-hint { font-size: 12.5px; margin: 2px 0 8px; }
.hist-row { display: grid; grid-template-columns: 1fr 50px 1.1fr 1.1fr auto; align-items: center; gap: 10px; padding: 11px 4px; border-top: 1px solid var(--line); font-size: 14px; border-radius: 8px; }
.hist-row:first-child { border-top: 0; }
.hist-row.clickable { cursor: pointer; transition: background .15s; }
.hist-row.clickable:hover { background: var(--surface-2, #f1f6f5); }
.hist-row.clickable:focus-visible { outline: 2px solid var(--teal, #0d9488); outline-offset: 1px; }
.hist-date { color: var(--ink-soft); }
.hist-score { font-weight: 800; font-size: 18px; text-align: center; }
.hist-le { color: var(--ink); font-weight: 600; }
.hist-pot { color: var(--emerald); font-weight: 700; text-align: right; font-size: 13px; }
.hist-view { display: inline-flex; align-items: center; gap: 3px; color: var(--teal, #0d9488); font-weight: 700; font-size: 12px; justify-self: end; white-space: nowrap; }
.hist-view:empty { display: none; }

/* saved-report modal */
.report-modal { position: fixed; inset: 0; z-index: 1000; display: none; }
.report-modal.open { display: block; }
.report-modal-back { position: absolute; inset: 0; background: rgba(10,40,38,.5); backdrop-filter: blur(2px); }
.report-modal-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(760px, 94vw); max-height: 92vh; overflow-y: auto; background: var(--bg, #fff); border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.28); padding: 18px 20px 26px; }
.report-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: -18px; background: var(--bg, #fff); padding: 6px 0 12px; margin: -2px 0 6px; border-bottom: 1px solid var(--line); z-index: 2; }
.report-modal-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--ink); font-size: 15px; }
.report-modal-x { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface-2, #f1f6f5); color: var(--ink); border-radius: 9px; padding: 7px 12px; cursor: pointer; font-weight: 600; }
.report-modal-x:hover { background: #e7efed; }
.report-recomputed { display: flex; align-items: flex-start; gap: 7px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 10px; padding: 9px 12px; font-size: 12.5px; line-height: 1.45; margin-bottom: 14px; }
@media (max-width: 560px) { .report-modal-card { width: 96vw; padding: 14px 13px 22px; } }

/* ---------- dashboard: countdown + stats ---------- */
.countdown-card { margin: 18px 0 20px; text-align: center; color: #eafaf5; border-radius: 20px; padding: 30px 24px 26px; box-shadow: var(--shadow);
  background: radial-gradient(680px 340px at 50% -25%, rgba(16,185,129,.24), transparent 62%), linear-gradient(160deg, #0b2e2a 0%, #06201d 100%); }
.cd-label { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6ee7c4; }
.cd-label .icon { color: #34d399; }
.cd-timer { display: flex; justify-content: center; align-items: flex-end; gap: 18px; margin: 18px 0 12px; flex-wrap: wrap; }
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 62px; }
.cd-unit b { font-size: clamp(34px, 6vw, 54px); font-weight: 800; color: #fff; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 12px; color: #9fd8cc; margin-top: 7px; font-weight: 600; letter-spacing: .02em; }
.cd-total { margin-top: 6px; font-size: 16px; color: #c7e9e1; }
.cd-total b { font-size: clamp(22px, 3.6vw, 32px); font-weight: 800; color: #34d399; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.cd-sub { font-size: 13.5px; color: #bfe6dd; max-width: 560px; margin: 10px auto 0; line-height: 1.7; }
.cd-sub b { color: #6ee7c4; }
.cd-cta { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; background: rgba(16,185,129,.16); border: 1px solid rgba(16,185,129,.36); color: #6ee7c4; font-weight: 700; font-size: 12.5px; font-family: inherit; padding: 4px 12px; border-radius: 999px; cursor: pointer; vertical-align: middle; transition: background .12s; }
.cd-cta:hover { background: rgba(16,185,129,.26); }
.cd-none { font-size: 16px; color: #c7e9e1; margin-top: 14px; }

.dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.dash-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; text-align: center; box-shadow: var(--shadow-sm); }
.ds-val { font-size: 26px; font-weight: 800; line-height: 1; }
.ds-lbl { font-size: 12.5px; color: var(--ink-faint); margin-top: 7px; }
.history-card { margin-bottom: 20px; }
.dash-account { max-width: 480px; }
@media (max-width: 560px) {
  .dash-stats { grid-template-columns: 1fr; }
  .cd-timer { gap: 10px; }
  .cd-unit { min-width: 52px; }
}

/* ---------- pillars strip ---------- */
.pillars { padding: 56px 0; }
.pillars h2, .section-head h2 { text-align: center; font-size: clamp(22px, 3vw, 30px); margin: 0 0 8px; color: var(--teal-deep); letter-spacing: -.01em; }
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 34px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.pcard .ic { width: 46px; height: 46px; border-radius: 13px; background: var(--mint); color: var(--teal); display: grid; place-items: center; margin-bottom: 14px; }
.pcard h3 { margin: 0 0 6px; font-size: 16px; color: var(--teal-deep); }
.pcard p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }

/* ---------- assessment wizard ---------- */
.assess { padding: 40px 0 80px; }
.assess-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); max-width: 720px; margin: 0 auto; overflow: hidden; }
.progress { height: 6px; background: var(--mint-soft); }
.progress > span { display: block; height: 100%; background: var(--grad); transition: width .35s ease; }
.assess-body { padding: 30px 34px 34px; }
.step-meta { font-size: 13px; font-weight: 700; color: var(--teal); letter-spacing: .02em; }
.assess-body h2 { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; font-size: 23px; color: var(--teal-deep); }
.assess-body h2 .ic { color: var(--teal); }
.assess-desc { color: var(--ink-soft); font-size: 14px; margin: 0 0 22px; }

.field { margin-bottom: 22px; }
.field > label.q { display: block; font-weight: 700; font-size: 15px; margin-bottom: 4px; color: var(--ink); }
.field .help { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 10px; }
.field input[type=number] {
  width: 100%; padding: 13px 14px; font-size: 16px; font-family: inherit;
  border: 1.5px solid var(--line-strong); border-radius: 12px; background: #fcfefe; color: var(--ink);
}
.field input[type=number]:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 3px var(--mint); }

/* segmented / select buttons */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink-soft);
  padding: 10px 15px; border-radius: 11px; font-size: 14px; font-weight: 600; transition: all .12s;
}
.seg button:hover { border-color: var(--teal); color: var(--teal); }
.seg button.on { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }

select.sel {
  width: 100%; padding: 13px 14px; font-size: 15px; font-family: inherit;
  border: 1.5px solid var(--line-strong); border-radius: 12px; background: #fcfefe; color: var(--ink);
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234a6168' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
select.sel:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 3px var(--mint); }

/* slider */
.slider-row { display: flex; align-items: center; gap: 16px; }
.slider-row input[type=range] { flex: 1; accent-color: var(--teal); height: 6px; }
.slider-val { min-width: 116px; text-align: right; font-weight: 800; color: var(--teal-deep); font-size: 18px; }
.slider-val small { font-weight: 600; color: var(--ink-faint); font-size: 12px; }

.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }
.wizard-nav .btn { font-size: 15px; padding: 13px 22px; }
.btn.dark { background: var(--teal-deep); color: #fff; box-shadow: var(--shadow-sm); }
.btn.dark:hover { box-shadow: var(--shadow); }
.btn.plain { background: transparent; color: var(--ink-soft); box-shadow: none; border: 1.5px solid var(--line-strong); }

/* ---------- results ---------- */
.results { padding: 42px 0 70px; }
.section-head { text-align: center; margin-bottom: 8px; }
.section-head p { color: var(--ink-soft); margin: 4px 0 0; }

.result-top { display: grid; grid-template-columns: 320px 1fr; gap: 22px; margin-top: 28px; align-items: stretch; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px; }
.gauge-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.gauge-card .tier { margin-top: 4px; font-weight: 800; font-size: 18px; }
.gauge-card .score-label { color: var(--ink-faint); font-size: 13px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }

.le-card { display: flex; flex-direction: column; gap: 16px; }
.le-main { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.le-main .big { font-size: 56px; font-weight: 800; color: var(--teal-deep); line-height: 1; letter-spacing: -.02em; }
.le-main .unit { font-size: 18px; color: var(--ink-soft); font-weight: 600; }
.le-label { font-size: 13px; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: .04em; }
.le-sub { color: var(--ink-soft); font-size: 14px; }
.le-stats { display: flex; gap: 22px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; }
.le-stat .n { font-size: 22px; font-weight: 800; color: var(--ink); }
.le-stat .l { font-size: 12px; color: var(--ink-faint); }
.delta-badge { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; padding: 7px 13px; border-radius: 999px; }
.delta-badge.up { background: var(--mint-soft); color: #047857; }
.delta-badge.down { background: #fef2f2; color: #b91c1c; }

/* potential banner */
.potential { margin-top: 22px; background: var(--grad); color: #fff; border-radius: var(--radius); padding: 26px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; box-shadow: var(--shadow); }
.potential .txt h3 { margin: 0 0 4px; font-size: 17px; font-weight: 700; }
.potential .txt p { margin: 0; color: #cdeee7; font-size: 14px; max-width: 460px; }
.potential .num { text-align: right; }
.potential .num .big { font-size: 44px; font-weight: 800; line-height: 1; }
.potential .num .small { font-size: 13px; color: #cdeee7; }

/* breakdown radar + bars */
.breakdown { margin-top: 22px; display: grid; grid-template-columns: 360px 1fr; gap: 22px; }
.radar-wrap { display: grid; place-items: center; }
.bars { display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 42px; align-items: center; gap: 12px; }
.bar-row .nm { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); display: flex; align-items: center; gap: 7px; }
.bar-row .track { height: 9px; background: var(--mint-soft); border-radius: 999px; overflow: hidden; }
.bar-row .track > span { display: block; height: 100%; border-radius: 999px; }
.bar-row .v { text-align: right; font-weight: 800; font-size: 14px; color: var(--ink); }

/* recommendations */
.recs { margin-top: 30px; }
.rec-list { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.rec {
  display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--teal); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.rec .rank { width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--mint); color: var(--teal); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.rec .body { flex: 1; }
.rec .body .pill-tag { font-size: 11px; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: .03em; }
.rec .body .txt { font-size: 14.5px; color: var(--ink); }
.rec .gain { flex: none; text-align: center; min-width: 84px; }
.rec .gain .d { font-size: 24px; font-weight: 800; color: var(--emerald); line-height: 1; }
.rec .gain .u { font-size: 11px; color: var(--ink-faint); font-weight: 700; }
.rec .gain .plus { color: var(--emerald); }
.rec.measure { border-left-color: var(--line-strong); background: #fbfdfd; }
.rec.measure .rank { background: #eef3f2; color: var(--ink-faint); }
.measure-badge { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }

.allgood { background: var(--mint-soft); border: 1px solid var(--mint); color: #047857; padding: 22px; border-radius: var(--radius); text-align: center; font-weight: 600; margin-top: 18px; }

.result-head-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.result-head-bar h2 { font-size: clamp(22px, 3vw, 30px); color: var(--teal-deep); margin: 0; letter-spacing: -.01em; }
.btn-save-top { white-space: nowrap; }
.result-actions { display: flex; gap: 12px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.disclaimer { margin-top: 30px; font-size: 12.5px; color: var(--ink-faint); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; gap: 10px; }
.disclaimer .icon { color: var(--ink-faint); flex: none; }

/* method / references */
.method { margin-top: 18px; }
.method summary { cursor: pointer; font-weight: 700; color: var(--teal-deep); padding: 14px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
.method summary::-webkit-details-marker { display: none; }
.method .refs { font-size: 13px; color: var(--ink-soft); }
.method .refs li { margin-bottom: 6px; }

/* topbar nav */
.brand[data-home] { cursor: pointer; }
.brand-logo { height: 36px; width: auto; display: block; }
@media (max-width: 560px) { .brand-logo { height: 30px; } }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.topnav { display: flex; gap: 6px; }
.topnav a { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ink-soft); padding: 7px 12px; border-radius: 9px; text-decoration: none; transition: all .12s; }
.topnav a:hover { color: var(--teal-deep); background: var(--mint-soft); }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* mode picker (Longevity Score vs Life Score) */
.mode-pick { margin: 0 0 24px; }
.mode-pick-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8fc9bd; margin-bottom: 8px; }
.mode-seg { display: inline-flex; gap: 6px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 5px; flex-wrap: wrap; }
.mode-seg button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; background: transparent; cursor: pointer; padding: 8px 16px; border-radius: 10px; font-family: inherit; text-align: left; transition: all .14s; }
.mode-seg button b { font-size: 14.5px; font-weight: 800; color: #eafaf5; }
.mode-seg button small { font-size: 11px; color: #9fb8b2; }
.mode-seg button:hover:not(.on) { background: rgba(255,255,255,.07); }
.mode-seg button.on { background: #fff; box-shadow: 0 4px 14px -6px rgba(0,0,0,.4); }
.mode-seg button.on b { color: var(--teal-deep); }
.mode-seg button.on small { color: var(--teal); }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 26px 0; text-align: center; color: var(--ink-faint); font-size: 12.5px; }
.foot .powered { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; color: var(--ink-faint); font-size: 12px; font-weight: 600; text-decoration: none; }
.foot .powered img { height: 17px; width: auto; opacity: .92; }
.foot .powered:hover img { opacity: 1; }
.foot-links { display: flex; gap: 18px; justify-content: center; margin-bottom: 12px; }
.foot-links a { cursor: pointer; color: var(--teal); font-weight: 700; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }

/* ---------- learn / how it works ---------- */
.learn-page { padding: 44px 0 70px; }
.learn-hero { text-align: center; max-width: 720px; margin: 0 auto 8px; }
.learn-hero h1 { font-size: clamp(26px, 4vw, 38px); color: var(--teal-deep); letter-spacing: -.02em; margin: 0 0 12px; }
.learn-hero p { color: var(--ink-soft); font-size: 16px; }
.learn-group { margin-top: 36px; }
.learn-group h2 { font-size: 19px; color: var(--teal); margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.learn-group h2::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--grad); }
.lever-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.lever { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.lever-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lever-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--mint); color: var(--teal); display: grid; place-items: center; }
.lever-gain { font-weight: 800; font-size: 15px; color: var(--emerald); background: var(--mint-soft); padding: 5px 12px; border-radius: 999px; }
.lever h3 { margin: 0 0 6px; font-size: 16.5px; color: var(--teal-deep); }
.lever p { margin: 0 0 10px; font-size: 14px; color: var(--ink-soft); }
.lever-src { font-size: 11.5px; color: var(--ink-faint); font-style: italic; }

.truths { margin-top: 38px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.truth { display: flex; gap: 14px; background: var(--teal-deep); color: #eafaf5; border-radius: var(--radius); padding: 22px 24px; }
.truth .icon { color: var(--emerald); flex: none; margin-top: 2px; }
.truth h3 { margin: 0 0 8px; font-size: 16px; color: #fff; }
.truth p { margin: 0 0 8px; font-size: 14px; color: #c7e9e1; }
.truth .lever-src { color: #8fc9bd; }

.learn-cta { display: flex; gap: 12px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .lever-grid, .truths { grid-template-columns: 1fr; }
  .topnav { display: none; }
}
/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .pgrid { grid-template-columns: repeat(2, 1fr); }
  .result-top { grid-template-columns: 1fr; }
  .breakdown { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-demo { max-width: 360px; margin: 4px auto 0; width: 100%; }
  .steps-grid { grid-template-columns: 1fr; }
  .lever-stats { grid-template-columns: repeat(2, 1fr); }
  .ai-flow { flex-direction: column; align-items: stretch; }
  .ai-step { text-align: center; }
  .ai-step-ic { margin: 0 auto; }
  .ai-step-no { top: 14px; right: auto; left: 18px; }
  .ai-arrow { justify-content: center; transform: rotate(90deg); }
  .profile-grid { grid-template-columns: 1fr; }
  .topnav { display: none; }
}
@media (max-width: 560px) {
  .assess-body { padding: 24px 20px 26px; }
  .pgrid { grid-template-columns: 1fr; }
  .lever-stats { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 104px 1fr 38px; }
  .le-main .big { font-size: 46px; }
  .potential { flex-direction: column; align-items: flex-start; }
  .potential .num { text-align: left; }
}

/* print */
@media print {
  .topbar, .hero, .pillars, .wizard-nav, .result-actions, .lang-toggle, .method summary { display: none !important; }
  body { background: #fff; }
  .card, .rec, .potential { box-shadow: none; break-inside: avoid; }
}
