/* Destinova — Lavender theme · HTML5/CSS3 */
:root{
  --bg:#f7f4fb;
  --fg:#1f1730;
  --muted:#f1ecf7;
  --muted-fg:#6e6383;
  --card:#ffffff;
  --border:#e6dff0;
  --primary:#7a5af8;
  --primary-2:#a78bfa;
  --primary-fg:#ffffff;
  --accent:#ede4ff;
  --accent-fg:#4a2a9a;
  --destructive:#e25555;
  --success:#3fbf8f;
  --radius:14px;
  --shadow-soft:0 8px 30px -8px rgba(90,52,180,.18);
  --shadow-glow:0 20px 60px -20px rgba(122,90,248,.45);
  --gradient-hero:linear-gradient(135deg,#8b6cf8 0%,#b89bf8 100%);
  --gradient-card:linear-gradient(135deg,#ffffff 0%,#f4ecff 100%);
  --gradient-bg:radial-gradient(ellipse at top left,rgba(186,155,248,.45),transparent 50%),radial-gradient(ellipse at bottom right,rgba(167,139,250,.35),transparent 50%);
}
*{box-sizing:border-box;margin:0;padding:0;border-color:var(--border)}
html,body{height:100%}
body{
  font-family:'Inter',system-ui,sans-serif;
  background-color:var(--bg);
  background-image:var(--gradient-bg);
  background-attachment:fixed;
  color:var(--fg);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{font-family:'Space Grotesk',system-ui,sans-serif;letter-spacing:-.02em;line-height:1.15}
button{font:inherit;cursor:pointer;border:none;background:none;color:inherit}
input,select{font:inherit;color:inherit}
ul{list-style:none}

.container{max-width:1024px;margin:0 auto;padding:0 16px}
.main{padding:32px 16px 80px}
.hide-sm{display:none}
@media(min-width:640px){.hide-sm{display:inline-flex}}

/* Header */
.header{display:flex;align-items:center;justify-content:space-between;padding:24px 16px}
.logo{display:flex;align-items:center;gap:8px}
.logo-icon{display:inline-flex;width:36px;height:36px;align-items:center;justify-content:center;border-radius:12px;background:var(--gradient-hero);color:#fff;font-size:18px;box-shadow:var(--shadow-glow)}
.logo-text{font-family:'Space Grotesk',sans-serif;font-weight:700;font-size:20px}

/* Badge */
.badge{display:inline-flex;align-items:center;padding:4px 10px;border-radius:8px;font-size:12px;font-weight:600}
.badge-secondary{background:var(--muted);color:var(--muted-fg)}
.badge-primary{background:var(--gradient-hero);color:#fff;box-shadow:var(--shadow-glow)}
.badge-accent{background:var(--accent);color:var(--accent-fg)}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 18px;border-radius:9999px;font-weight:600;font-size:14px;transition:opacity .15s,transform .1s,background .15s}
.btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn-primary{background:var(--gradient-hero);color:#fff;box-shadow:var(--shadow-glow)}
.btn-primary:hover:not(:disabled){opacity:.9}
.btn-outline{border:1px solid var(--border);background:#fff;color:var(--fg)}
.btn-outline:hover{border-color:var(--primary)}
.btn-lg{padding:14px 32px;font-size:16px;height:auto}

/* Card */
.card{border:1px solid var(--border);background:var(--gradient-card);border-radius:var(--radius);box-shadow:var(--shadow-soft);padding:24px}
@media(min-width:640px){.card{padding:32px}}
.card-sm{padding:20px}

/* Landing */
.hero{text-align:center;padding-top:48px}
.hero h1{font-size:44px;font-weight:700;margin-top:12px}
@media(min-width:640px){.hero h1{font-size:64px}}
.text-gradient{background:var(--gradient-hero);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero p{margin:24px auto 0;max-width:560px;color:var(--muted-fg);font-size:18px}
.hero-cta{margin-top:32px;display:flex;justify-content:center}

.steps-grid{margin-top:80px;display:grid;gap:16px;grid-template-columns:1fr}
@media(min-width:640px){.steps-grid{grid-template-columns:repeat(3,1fr)}}
.step-icon{display:inline-flex;width:40px;height:40px;align-items:center;justify-content:center;border-radius:10px;background:rgba(122,90,248,.12);color:var(--primary);font-size:20px;margin-bottom:16px}
.step-card h3{font-size:16px;font-weight:600}
.step-card p{margin-top:4px;font-size:14px;color:var(--muted-fg)}

/* Form */
.step-header{margin-bottom:32px}
.progress{height:6px;border-radius:9999px;background:var(--muted);overflow:hidden;margin-bottom:12px}
.progress-bar{height:100%;background:var(--gradient-hero);border-radius:9999px;transition:width .4s}
.step-header p{font-size:13px;color:var(--muted-fg)}
.step-header h2{margin-top:4px;font-size:28px;font-weight:700}
@media(min-width:640px){.step-header h2{font-size:36px}}

.field-grid{display:grid;gap:24px;grid-template-columns:1fr}
@media(min-width:640px){.field-grid{grid-template-columns:1fr 1fr}}
.field label{display:block;font-size:14px;font-weight:500;margin-bottom:8px}
.field input,.field select{
  width:100%;padding:10px 14px;border:1px solid var(--border);border-radius:10px;background:#fff;outline:none;
}
.field input:focus,.field select:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(122,90,248,.15)}

.chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.chip{padding:7px 16px;border-radius:9999px;border:1px solid var(--border);background:#fff;font-size:14px;transition:all .15s}
.chip:hover{border-color:var(--primary)}
.chip.active{border-color:transparent;background:var(--gradient-hero);color:#fff;box-shadow:var(--shadow-glow)}

.section-label{display:block;font-size:14px;font-weight:500;margin:24px 0 12px}

/* Decision tiles */
.tiles{display:grid;gap:8px;grid-template-columns:1fr;margin-bottom:24px}
@media(min-width:640px){.tiles{grid-template-columns:1fr 1fr}}
.tile{padding:16px;border:1px solid var(--border);border-radius:14px;background:#fff;text-align:left;font-size:14px;font-weight:500;transition:all .15s}
.tile:hover{border-color:rgba(122,90,248,.4)}
.tile.active{border-color:var(--primary);background:rgba(122,90,248,.06);box-shadow:var(--shadow-glow)}

.actions-row{margin-top:32px;display:flex;flex-wrap:wrap;gap:12px}

/* Loading */
.loading{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:50vh;text-align:center}
.loading-orb{position:relative;width:80px;height:80px;border-radius:50%;background:var(--gradient-hero);box-shadow:var(--shadow-glow);animation:pulse 1.6s ease-in-out infinite}
.loading-orb::after{content:"✦";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;font-size:30px;animation:spin 2s linear infinite}
@keyframes pulse{50%{opacity:.6;transform:scale(1.05)}}
@keyframes spin{to{transform:rotate(360deg)}}
.loading h3{margin-top:24px;font-size:20px;font-weight:600}
.loading p{margin-top:8px;color:var(--muted-fg);font-size:14px}

/* Result */
.result-stack{display:flex;flex-direction:column;gap:24px}
.result-header{text-align:center}
.result-header h2{margin-top:16px;font-size:36px;font-weight:700}
@media(min-width:640px){.result-header h2{font-size:48px}}
.result-header p{margin-top:8px;color:var(--muted-fg)}
.result-header strong{color:var(--fg);font-weight:600}

.stat-grid{display:grid;gap:16px;grid-template-columns:1fr}
@media(min-width:640px){.stat-grid{grid-template-columns:repeat(3,1fr)}}
.stat-card p:first-child{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted-fg)}
.stat-card p:last-child{margin-top:4px;font-size:18px;font-weight:600;text-transform:capitalize}

.bars{display:flex;flex-direction:column;gap:16px}
.bar-row{display:flex;flex-direction:column;gap:6px}
.bar-row .bar-head{display:flex;justify-content:space-between;font-size:14px}
.bar-row .bar-head strong{font-weight:600}
.bar-track{height:10px;border-radius:9999px;background:var(--muted);overflow:hidden}
.bar-fill{height:100%;border-radius:9999px;transition:width .7s}
.bar-fill.income{background:var(--gradient-hero)}
.bar-fill.stress{background:var(--destructive)}
.bar-fill.growth{background:var(--success)}

.two-col{display:grid;gap:16px;grid-template-columns:1fr}
@media(min-width:640px){.two-col{grid-template-columns:1fr 1fr}}
.list{display:flex;flex-direction:column;gap:8px;font-size:14px}
.list li{display:flex;gap:8px}
.dot-red{color:var(--destructive)}
.dot-purple{color:var(--primary)}

.cert-grid{display:grid;gap:16px;grid-template-columns:1fr;margin-top:16px}
@media(min-width:640px){.cert-grid{grid-template-columns:1fr 1fr}}
.cert-block{border:1px solid var(--border);background:rgba(255,255,255,.6);border-radius:14px;padding:16px}
.cert-block .provider{font-size:14px;font-weight:600;color:var(--primary);margin-bottom:8px}
.cert-block ul{display:flex;flex-direction:column;gap:6px;font-size:14px}
.cert-block li{display:flex;gap:8px}

.section-title{display:flex;align-items:center;gap:8px;font-size:18px;font-weight:600;margin-bottom:12px}
.center-actions{display:flex;flex-direction:column;justify-content:center;gap:12px}
@media(min-width:640px){.center-actions{flex-direction:row}}

/* Sheet (chat) */
.sheet{position:fixed;inset:0;display:none;z-index:50}
.sheet[data-open="true"]{display:block}
.sheet-overlay{position:absolute;inset:0;background:rgba(20,10,40,.5);animation:fade .2s}
.sheet-panel{position:absolute;right:0;top:0;height:100%;width:100%;max-width:420px;background:#fff;display:flex;flex-direction:column;animation:slideIn .25s ease-out}
@keyframes fade{from{opacity:0}}
@keyframes slideIn{from{transform:translateX(100%)}}
.sheet-header{padding:20px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center}
.sheet-header h3{font-size:18px;font-weight:600}
.icon-btn{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--muted-fg)}
.icon-btn:hover{background:var(--muted)}
.chat-messages{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:12px}
.msg{padding:10px 14px;border-radius:14px;max-width:85%;font-size:14px;line-height:1.5;white-space:pre-wrap}
.msg.user{align-self:flex-end;background:var(--gradient-hero);color:#fff;border-bottom-right-radius:4px}
.msg.assistant{align-self:flex-start;background:var(--muted);color:var(--fg);border-bottom-left-radius:4px}
.chat-form{padding:16px 20px;border-top:1px solid var(--border);display:flex;gap:8px}
.chat-form input{flex:1;padding:10px 14px;border:1px solid var(--border);border-radius:9999px;outline:none}
.chat-form input:focus{border-color:var(--primary)}

/* Toast */
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(100px);background:#1f1730;color:#fff;padding:12px 20px;border-radius:10px;font-size:14px;opacity:0;transition:all .3s;z-index:60;pointer-events:none;box-shadow:var(--shadow-soft)}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* Fade-in */
.fade-in{animation:fadeIn .35s ease-out}
@keyframes fadeIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
