/* LifeLens AI — theme
   Dark "tech" aesthetic, blue -> purple gradient brand. */
:root {
  color-scheme: dark;

  --bg:        #080b1e;
  --bg-2:      #0a0e26;
  --panel:     #0d1230;
  --card:      #141a3e;
  --card-2:    #171e48;
  --card-hi:   #1b2352;

  --line:      rgba(124,142,222,0.14);
  --line-2:    rgba(124,142,222,0.28);

  --text:      #eef1ff;
  --muted:     #9aa4cc;
  --faint:     #6b74a0;

  --blue:      #4f8cff;
  --sky:       #38bdf8;
  --violet:    #8b5cf6;
  --purple:    #a855f7;
  --green:     #34d399;
  --amber:     #fbbf24;

  --grad:      linear-gradient(135deg, #4f7bff 0%, #8b5cf6 55%, #a855f7 100%);
  --grad-soft: linear-gradient(135deg, rgba(79,123,255,0.18), rgba(168,85,247,0.18));
  --grad-text: linear-gradient(120deg, #6aa0ff 0%, #a855f7 100%);
  --grad-gauge:linear-gradient(90deg, #4f7bff, #22d3ee, #34d399);

  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 18px 50px -20px rgba(0,0,0,0.7);
  --sidebar-w: 264px;

  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
::selection { background: rgba(139,92,246,0.4); }

/* Ambient background glows */
.bg-glows { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-glows::before, .bg-glows::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.5;
}
.bg-glows::before { width: 620px; height: 620px; top: -220px; left: -160px;
  background: radial-gradient(circle, rgba(59,130,246,0.5), transparent 70%); }
.bg-glows::after  { width: 720px; height: 720px; bottom: -280px; right: -180px;
  background: radial-gradient(circle, rgba(168,85,247,0.45), transparent 70%); }

/* ---------- Brand mark ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark { width: 46px; height: 46px; flex: 0 0 auto; }
.brand .mark.sm { width: 34px; height: 34px; }
.brand .name { font-weight: 700; font-size: 24px; letter-spacing: -0.02em; line-height: 1; }
.brand .name .ai { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .tag { color: var(--sky); font-size: 13px; font-weight: 500; margin-top: 3px; }

.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--text);
  padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14px;
  transition: transform .12s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--line-2); background: var(--card-2); }
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  border: none; color: #fff; background: var(--grad);
  box-shadow: 0 10px 26px -10px rgba(120,80,255,0.75);
}
.btn-primary:hover { box-shadow: 0 14px 30px -8px rgba(120,80,255,0.9); }
.btn-ghost { background: transparent; border-color: var(--line-2); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 10px; }
.btn-danger { color: #fca5a5; border-color: rgba(248,113,113,0.35); background: rgba(248,113,113,0.08); }
.btn-danger:hover { background: rgba(248,113,113,0.16); }

/* ---------- Chips / pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; background: var(--grad-soft); color: #cbd5ff;
  border: 1px solid var(--line-2);
}
.pill.grad { background: var(--grad); color: #fff; border: none; }
.pill svg { width: 13px; height: 13px; }
.badge { font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; letter-spacing: .02em; }
.badge.analyzed { color: #6ee7b7; background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.3); }
.badge.draft    { color: #fcd34d; background: rgba(251,191,36,0.10); border: 1px solid rgba(251,191,36,0.3); }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow);
}
.card-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-hd h3 { margin: 0; font-size: 17px; font-weight: 700; }
.eyebrow { color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

/* =====================================================================
   LOGIN PAGE
   ===================================================================== */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 0.95fr; }
.auth-hero { padding: 56px clamp(40px, 5vw, 84px); display: flex; flex-direction: column; justify-content: center; gap: 30px; }
.auth-hero .headline { font-size: clamp(38px, 4.6vw, 60px); line-height: 1.04; font-weight: 700; letter-spacing: -0.03em; margin: 6px 0 0; }
.auth-hero .sub { color: var(--muted); font-size: 17px; max-width: 460px; line-height: 1.6; }
.feature-list { display: grid; gap: 16px; margin-top: 4px; }
.feature-list .f { display: flex; align-items: center; gap: 14px; }
.feature-list .f .ic {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--line-2); color: #c4b5fd; flex: 0 0 auto;
}
.feature-list .f .ic svg { width: 22px; height: 22px; }
.feature-list .f .t { font-weight: 600; }
.feature-list .f .d { color: var(--faint); font-size: 13px; }

.auth-panel { display: grid; place-items: center; padding: 40px; background: rgba(10,14,38,0.5); border-left: 1px solid var(--line); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { margin: 0 0 4px; font-size: 24px; }
.auth-card .muted { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.tabs { display: flex; gap: 6px; background: var(--bg-2); border: 1px solid var(--line); padding: 5px; border-radius: 12px; margin-bottom: 22px; }
.tabs button { flex: 1; border: none; background: transparent; color: var(--muted); padding: 10px; border-radius: 9px; font-weight: 600; }
.tabs button.active { background: var(--grad); color: #fff; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.field input {
  width: 100%; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text); font-size: 14.5px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79,140,255,0.18); }
.hint { font-size: 12.5px; color: var(--faint); text-align: center; margin-top: 16px; }
.hint b { color: var(--sky); }
.form-error { background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.35); color: #fecaca;
  padding: 10px 13px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; display: none; }
.form-error.show { display: block; }

/* =====================================================================
   APP SHELL
   ===================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  border-right: 1px solid var(--line); padding: 24px 18px; display: flex; flex-direction: column; gap: 26px;
  position: sticky; top: 0; height: 100vh; background: rgba(11,15,42,0.55);
}
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 12px;
  color: var(--muted); font-weight: 500; font-size: 14.5px; transition: background .18s, color .18s;
}
.nav a svg { width: 20px; height: 20px; }
.nav a:hover { background: var(--card); color: var(--text); }
.nav a.active { color: #fff; background: var(--grad-soft); border: 1px solid var(--line-2); position: relative; }
.nav a.active::before { content: ""; position: absolute; left: -18px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--grad); }
.sidebar .spacer { flex: 1; }
.userbox { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--grad); flex: 0 0 auto; }
.userbox .u { font-size: 14px; font-weight: 600; line-height: 1.1; }
.userbox .e { font-size: 11.5px; color: var(--faint); }

.main { padding: 26px clamp(20px, 3vw, 40px) 60px; min-width: 0; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.topbar h1 { margin: 0; font-size: 27px; font-weight: 700; letter-spacing: -0.02em; }
.topbar .sub { color: var(--muted); font-size: 14.5px; margin-top: 4px; }

.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stack { display: grid; gap: 20px; }
.row { display: flex; align-items: center; gap: 12px; }

/* Decide input */
.decide {
  background: linear-gradient(120deg, rgba(79,123,255,0.14), rgba(168,85,247,0.14));
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 20px 22px;
  display: flex; align-items: center; gap: 18px;
}
.decide .txt { flex: 1; min-width: 0; }
.decide .txt .q { font-size: 18px; font-weight: 700; }
.decide .txt .ph { color: var(--muted); font-size: 14px; margin-top: 3px; }
.decide .go {
  width: 52px; height: 52px; border-radius: 50%; border: none; flex: 0 0 auto;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 26px -8px rgba(120,80,255,0.8);
}
.decide .go svg { width: 22px; height: 22px; }

/* Recent decision row */
.recent { display: flex; align-items: center; gap: 16px; }
.thumb { width: 92px; height: 66px; border-radius: 12px; flex: 0 0 auto; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #f59e0b, #b45309); display: grid; place-items: center; }
.thumb .screen { position: absolute; inset: 8px 10px 16px; border-radius: 4px; background: linear-gradient(160deg,#fdba74,#c2410c); }
.thumb .base { position: absolute; left: 6px; right: 6px; bottom: 8px; height: 6px; border-radius: 3px; background: #1f2937; }
.recent .meta { display: flex; gap: 16px; color: var(--muted); font-size: 13px; margin-top: 7px; flex-wrap: wrap; }
.recent .meta span { display: inline-flex; align-items: center; gap: 6px; }
.recent .meta svg { width: 15px; height: 15px; opacity: .8; }

/* Recommendation */
.reco { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
.reco .pick { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.reco .pick .opt { font-size: 24px; font-weight: 700; }
.reco .pick .desc { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.gauge { position: relative; width: 150px; height: 150px; margin-top: 6px; }
.gauge svg { transform: rotate(-90deg); }
.gauge .val { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.gauge .val .n { font-size: 40px; font-weight: 700; line-height: 1; }
.gauge .val .d { font-size: 12px; color: var(--muted); }
.reasons h4 { margin: 0 0 12px; font-size: 15px; }
.reasons ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.reasons li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: #dbe1ff; }
.check { width: 20px; height: 20px; border-radius: 6px; flex: 0 0 auto; display: grid; place-items: center;
  background: rgba(52,211,153,0.15); color: var(--green); margin-top: 1px; }
.check svg { width: 13px; height: 13px; }
.confidence { margin-top: 18px; }
.confidence .lab { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.bar-track { height: 9px; border-radius: 999px; background: var(--bg-2); overflow: hidden; border: 1px solid var(--line); }
.bar-fill { height: 100%; border-radius: 999px; background: var(--grad-gauge); transition: width .9s cubic-bezier(.2,.7,.2,1); }

/* Comparison bars */
.bars { display: flex; align-items: flex-end; justify-content: space-around; gap: 14px; height: 210px; padding-top: 10px; }
.bars .bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; flex: 1; height: 100%; }
.bars .bar .v { font-size: 17px; font-weight: 700; }
.bars .bar .col { width: 46px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--blue), #3355cc);
  transition: height .5s cubic-bezier(.2,.7,.2,1); min-height: 6px; }
.bars .bar.win .col { background: linear-gradient(180deg, #a855f7, #6d28d9); box-shadow: 0 0 24px -6px rgba(168,85,247,0.7); }
.bars .bar .lab { font-size: 12.5px; color: var(--muted); text-align: center; }

/* Challenge banner */
.challenge-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(120deg, rgba(139,92,246,0.14), rgba(79,123,255,0.10));
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 20px 22px;
}
.challenge-banner .t { font-size: 17px; font-weight: 700; }
.challenge-banner .d { color: var(--muted); font-size: 13.5px; margin-top: 3px; }

/* Decisions grid / list */
.dcard { cursor: pointer; transition: transform .14s, border-color .2s; }
.dcard:hover { transform: translateY(-3px); border-color: var(--line-2); }
.dcard .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.dcard h3 { font-size: 16.5px; margin: 12px 0 4px; }
.dcard .q { color: var(--muted); font-size: 13px; line-height: 1.45; min-height: 36px; }
.dcard .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.dcard .win { font-size: 13.5px; } .dcard .win b { color: var(--text); }
.mini-gauge { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.dot.mid { background: var(--amber); }

/* Matrix table */
.table-wrap { overflow-x: auto; }
table.matrix { width: 100%; border-collapse: collapse; font-size: 14px; }
table.matrix th, table.matrix td { padding: 12px 14px; text-align: center; border-bottom: 1px solid var(--line); }
table.matrix th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
table.matrix td.opt, table.matrix th.opt { text-align: left; font-weight: 600; }
table.matrix tr.win td { background: rgba(168,85,247,0.07); }
table.matrix .score-num { font-weight: 700; color: var(--text); }
table.matrix .wt { color: var(--faint); font-size: 11px; display: block; font-weight: 500; }

/* Stats */
.stat { background: linear-gradient(180deg, var(--card), var(--card-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat .k { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.stat .k svg { width: 16px; height: 16px; color: var(--violet); }
.stat .n { font-size: 34px; font-weight: 700; margin-top: 10px; letter-spacing: -0.02em; }
.stat .n small { font-size: 15px; color: var(--faint); font-weight: 600; }

/* Empty state */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .ic { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 18px;
  background: var(--grad-soft); border: 1px solid var(--line-2); color: #c4b5fd; }
.empty .ic svg { width: 30px; height: 30px; }
.empty h3 { margin: 0 0 6px; color: var(--text); }

/* Evidence list */
.ev { display: flex; align-items: flex-start; gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.ev .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-soft); color: #c4b5fd; flex: 0 0 auto; }
.ev .ic svg { width: 18px; height: 18px; }
.ev .t { font-weight: 600; font-size: 14.5px; }
.ev .c { color: var(--muted); font-size: 13px; margin-top: 3px; line-height: 1.45; word-break: break-word; }
.ev .d { color: var(--faint); font-size: 11.5px; margin-top: 5px; }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(4,6,18,0.72); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 24px; z-index: 100; opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal { width: 100%; max-width: 760px; max-height: 90vh; overflow: auto; background: linear-gradient(180deg, #101641, #0d1234);
  border: 1px solid var(--line-2); border-radius: 20px; padding: 26px; box-shadow: 0 40px 90px -30px #000; }
.modal-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-hd h2 { margin: 0; font-size: 21px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  color: var(--muted); display: grid; place-items: center; }
.icon-btn:hover { color: var(--text); background: var(--card-2); }
.icon-btn svg { width: 18px; height: 18px; }
.section-title { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin: 20px 0 10px; }
.chip-input { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.chip-input input[type=text] { flex: 1; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); outline: none; }
.chip-input input[type=text]:focus { border-color: var(--blue); }
.chip-input input.w { width: 92px; flex: 0 0 auto; }
.chip-input input[type=number], table.matrix input[type=number] {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text); outline: none; font-family: inherit; font-size: 14px;
}
.chip-input input[type=number]:focus, table.matrix input[type=number]:focus { border-color: var(--blue); }
table.matrix input[type=number] { padding: 7px 6px; text-align: center; }
.mini-x { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--faint); display: grid; place-items: center; flex: 0 0 auto; }
.mini-x:hover { color: #fca5a5; border-color: rgba(248,113,113,0.4); }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; accent-color: var(--purple); }
.range-row .rv { width: 44px; text-align: right; font-weight: 700; }

textarea.ta { width: 100%; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); outline: none; resize: vertical; min-height: 84px; font-size: 14px; }
select.sel { padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); outline: none; }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: #151b44; border: 1px solid var(--line-2); color: var(--text); padding: 13px 20px; border-radius: 12px;
  box-shadow: var(--shadow); z-index: 200; transition: opacity .25s, transform .25s; font-size: 14px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: rgba(248,113,113,0.5); }

.loading { display: grid; place-items: center; padding: 80px; color: var(--muted); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--purple); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 1080px) {
  .grid-2 { grid-template-columns: 1fr; }
  .reco { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; transform: translateX(-100%); transition: transform .25s; width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .grid-3 { grid-template-columns: 1fr; }
}
.menu-btn { display: none; }
@media (max-width: 860px) { .menu-btn { display: grid; } }

/* =====================================================================
   LOGIN — cinematic split with sliding "blade" (VERSO-style, LifeLens brand)
   ===================================================================== */
.auth-body {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  background: #05070f; padding: clamp(0px, 2.5vw, 32px); overflow-x: hidden;
}

/* The rounded "screen" that holds the whole scene */
.auth-shell {
  position: relative; width: min(1120px, 100%); height: min(720px, 94vh);
  border-radius: 26px; overflow: hidden; background: #0a0e26;
  box-shadow: 0 60px 140px -50px rgba(0,0,0,0.85), inset 0 0 0 1px var(--line);
}

/* ---- Cinematic backdrop layers (inside the shell) ---- */
.aurora { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.aurora .a { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; mix-blend-mode: screen; }
.aurora .a1 { width: 62%; height: 74%; left: -12%; top: -18%; background: radial-gradient(circle, #4f7bff, transparent 70%); animation: drift1 22s ease-in-out infinite; }
.aurora .a2 { width: 58%; height: 68%; right: -10%; top: 6%;   background: radial-gradient(circle, #a855f7, transparent 70%); animation: drift2 27s ease-in-out infinite; }
.aurora .a3 { width: 54%; height: 62%; left: 22%;  bottom: -22%; background: radial-gradient(circle, #38bdf8, transparent 70%); animation: drift3 31s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(14%,12%) scale(1.16); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1.05); } 50% { transform: translate(-12%,8%) scale(1.22); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(8%,-12%) scale(1.12); } }
.scene-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; }
.scene-veil { position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(130% 120% at 50% 28%, transparent 42%, rgba(5,7,15,0.5) 100%); }

/* ---- HERO side (occupies the half the blade isn't covering) ---- */
.hero-side {
  position: absolute; top: 0; bottom: 0; left: 0; width: 45%; z-index: 3;
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
  padding: clamp(34px, 4.4vw, 64px);
  transition: transform .8s cubic-bezier(.76,0,.24,1);
}
.mode-login .hero-side    { transform: translateX(122.2%); }
.mode-register .hero-side { transform: translateX(0); }
.hero-side .brand .name { font-size: 22px; }
.hero-copy { display: flex; flex-direction: column; gap: 16px; }
.display {
  font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 600;
  font-size: clamp(40px, 4.8vw, 64px); line-height: 1.0; letter-spacing: -0.015em;
  margin: 4px 0 0; text-shadow: 0 2px 30px rgba(0,0,0,0.4);
}
.display em { font-style: italic; font-weight: 600; }
.hero-sub { color: var(--muted); font-size: clamp(15px, 1.4vw, 17px); line-height: 1.6; max-width: 430px; text-shadow: 0 1px 16px rgba(0,0,0,0.35); }
.hero-foot { color: var(--faint); font-size: 12px; letter-spacing: .02em; }
.feature-row { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 4px; }
.fr { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.fr-ic { display: inline-grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; background: var(--grad-soft); border: 1px solid var(--line-2); color: #c4b5fd; }
.fr-ic svg { width: 15px; height: 15px; }

.eyebrow-chip {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 14px; border-radius: 999px; background: rgba(139,92,246,0.15);
  border: 1px solid var(--line-2); color: #cdd8ff; font-size: 13px; font-weight: 500;
  min-height: 36px; line-height: 1.2; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: 0 0 auto; box-shadow: 0 0 0 0 rgba(52,211,153,0.55); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.caret { display: inline-block; width: 2px; height: 1.05em; background: var(--sky); margin-left: 2px; vertical-align: -2px; overflow: hidden; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---- The sliding BLADE (form panel) ---- */
.blade {
  position: absolute; top: 0; bottom: 0; left: 0; width: 55%; z-index: 4;
  display: flex; flex-direction: column; overflow-y: auto;
  background: linear-gradient(180deg, rgba(15,20,52,0.92), rgba(9,13,36,0.95));
  -webkit-backdrop-filter: blur(14px) saturate(120%); backdrop-filter: blur(14px) saturate(120%);
  box-shadow: 0 0 90px -20px rgba(0,0,0,0.6);
  transition: transform .8s cubic-bezier(.76,0,.24,1), clip-path .8s cubic-bezier(.76,0,.24,1);
}
.mode-login .blade    { transform: translateX(0);     clip-path: polygon(0 0, 100% 0, calc(100% - 78px) 100%, 0 100%); }
.mode-register .blade { transform: translateX(81.8%); clip-path: polygon(78px 0, 100% 0, 100% 100%, 0 100%); }
.form-inner { width: 100%; max-width: 384px; margin: auto; padding: clamp(30px, 4vw, 52px); }
.brand.brand-sm { margin-bottom: 22px; }
.form-title { font-size: 26px; font-weight: 700; margin: 0 0 18px; letter-spacing: -0.02em; }

/* Underline inputs */
.uline { margin-bottom: 18px; }
.uline > label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px; letter-spacing: .02em; }
.uline > label .opt { color: var(--faint); }
.uline-in { position: relative; display: flex; align-items: center; }
.uline-in input {
  width: 100%; background: transparent; border: none; border-bottom: 1.6px solid var(--line-2);
  border-radius: 0; color: var(--text); font-size: 15px; padding: 9px 32px 10px 2px; outline: none;
  transition: border-color .2s;
}
.uline-in input::placeholder { color: var(--faint); }
.uline-in::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.4,0,.2,1); }
.uline-in:focus-within::after { transform: scaleX(1); }
.uline-ic { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: grid; place-items: center; color: var(--faint); background: transparent; border: none; }
button.uline-ic.eye { cursor: pointer; border-radius: 8px; transition: color .18s; }
button.uline-ic.eye:hover { color: var(--text); }
button.uline-ic.eye.on { color: var(--sky); }

/* Strength meter */
.strength { display: flex; align-items: center; gap: 11px; margin-top: 12px; }
.strength-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.strength-bar i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .3s ease, background .3s ease; }
.strength-label { font-size: 12px; font-weight: 600; min-width: 62px; text-align: right; }
.strength-bar i.weak,  .strength-label.weak  { background: #f87171; color: #f87171; }
.strength-bar i.fair,  .strength-label.fair  { background: var(--amber); color: var(--amber); }
.strength-bar i.good,  .strength-label.good  { background: var(--blue);  color: var(--blue); }
.strength-bar i.strong,.strength-label.strong{ background: var(--green); color: var(--green); }

/* Meta row + links */
.form-meta { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 20px; font-size: 13px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; user-select: none; }
.checkbox input { width: 15px; height: 15px; accent-color: var(--violet); }
.link-muted { background: none; border: none; color: var(--sky); font-weight: 600; font-size: 13px; padding: 0; }
.link-muted:hover { text-decoration: underline; }

/* Buttons + divider + switch */
.btn-pill { border-radius: 999px; }
.btn-demo { background: rgba(139,92,246,0.12); border: 1px solid var(--line-2); color: var(--text); }
.btn-demo:hover { background: rgba(139,92,246,0.2); }
.btn-demo .demo-ic { display: inline-flex; align-items: center; color: var(--purple); }
.btn-demo .demo-ic svg { width: 16px; height: 16px; }
.btn.loading { opacity: .7; cursor: progress; }
.divider { display: flex; align-items: center; gap: 14px; margin: 16px 0; color: var(--faint); font-size: 12px; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.switch { text-align: center; margin-top: 18px; color: var(--muted); font-size: 13.5px; }
.switch button { background: none; border: none; color: var(--text); font-weight: 600; font-size: 13.5px; padding: 0 0 1px; border-bottom: 1.6px solid var(--line-2); margin-left: 4px; transition: border-color .2s; }
.switch button:hover { border-color: var(--blue); }

/* Google Sign-In slot */
.g-slot { margin: 14px 0 4px; }
.g-btn { display: flex; justify-content: center; min-height: 4px; }
.g-btn > div { color-scheme: light; }
.g-setup { display: flex; gap: 9px; align-items: flex-start; padding: 11px 13px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); background: rgba(124,142,222,0.06); color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.g-setup b { color: var(--text); font-weight: 600; }
.g-setup-ic { display: inline-flex; flex: 0 0 auto; margin-top: 1px; color: var(--purple); }
.g-setup-ic svg { width: 15px; height: 15px; }

/* Working "Continue with Google" button (styled like Google's own). Shown when
   no real OAuth Client ID is set; a click signs into the demo account. */
.g-real {
  display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  width: 100%; min-height: 46px; padding: 12px 18px;
  background: #fff; color: #3c4043;
  border: 1px solid #dadce0; border-radius: 999px;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-weight: 600; font-size: 14.5px; letter-spacing: .1px;
  cursor: pointer;
  transition: box-shadow .18s ease, background .18s ease, border-color .18s ease, transform .06s ease;
}
.g-real:hover { background: #f7faff; border-color: #c9d3e6; box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 2px 12px rgba(66,133,244,.18); }
.g-real:active { transform: translateY(1px); }
.g-real:disabled, .g-real.loading { opacity: .7; cursor: progress; }
.g-real svg { flex: 0 0 auto; }

/* ============================================================
   Signature "DEBATE" panel — LifeLens arguing with itself.
   Used in the app decision detail and the shared read-only view.
   ============================================================ */
.debate .hd-ic { display: inline-flex; vertical-align: -3px; margin-right: 6px; color: var(--violet); }
.dbt-intro { margin: 2px 0 18px; color: var(--muted); font-size: 14px; }
.dbt-arena { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .dbt-arena { grid-template-columns: 1fr; } }

.dbt-side { position: relative; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 16px 8px; }
.dbt-side.pro { border-color: rgba(79,124,255,0.30); background: linear-gradient(180deg, rgba(79,124,255,0.09), transparent); }
.dbt-side.con { border-color: rgba(251,191,36,0.28); background: linear-gradient(180deg, rgba(251,191,36,0.08), transparent); }

.dbt-who { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.dbt-ava { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 11px; flex: 0 0 auto; }
.pro .dbt-ava { background: rgba(79,124,255,0.16); color: #8fb4ff; }
.con .dbt-ava { background: rgba(251,191,36,0.16); color: #fbbf24; }
.dbt-name { display: flex; flex-direction: column; line-height: 1.15; }
.dbt-name b { font-size: 14.5px; }
.dbt-name span { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

.dbt-line { display: flex; gap: 10px; padding: 8px 0; align-items: flex-start; animation: dbtIn 0.5s both; animation-delay: calc(var(--i) * 0.1s); }
.dbt-line p { margin: 0; font-size: 13.6px; line-height: 1.55; color: var(--text); }
.dbt-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; }
.pro .dbt-dot { background: var(--blue); box-shadow: 0 0 0 3px rgba(79,124,255,0.14); }
.con .dbt-dot { background: var(--amber); box-shadow: 0 0 0 3px rgba(251,191,36,0.14); }

.dbt-verdict { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--grad-soft); border: 1px solid var(--line-2); animation: dbtIn 0.6s both; animation-delay: calc(var(--i) * 0.1s); }
.dbt-gavel { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 13px; background: var(--grad); color: #fff; box-shadow: 0 8px 20px -8px rgba(139,92,246,0.7); }
.dbt-vbody { flex: 1 1 auto; min-width: 0; }
.dbt-vlab { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--violet); font-weight: 600; margin-bottom: 3px; }
.dbt-vline { font-size: 14px; line-height: 1.5; color: var(--text); }
.dbt-vpick { text-align: right; flex: 0 0 auto; }
.dbt-vname { font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 600; font-size: 20px; line-height: 1; }
.dbt-vscore { font-size: 13px; color: var(--muted); margin-top: 5px; }
.dbt-vscore small { color: var(--faint); }
@media (max-width: 560px) { .dbt-verdict { flex-wrap: wrap; } .dbt-vpick { text-align: left; } }

@keyframes dbtIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dbt-line, .dbt-verdict { animation: none; } }

/* Theme toggle */
.theme-toggle {
  position: fixed; top: 20px; right: 20px; z-index: 40; width: 42px; height: 42px;
  border-radius: 12px; display: grid; place-items: center; color: var(--muted);
  background: rgba(13,18,48,0.6); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: color .2s, transform .2s, background .2s;
}
.theme-toggle:hover { color: var(--text); transform: translateY(-1px); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle.floating { top: auto; bottom: 22px; right: 22px; background: var(--card); box-shadow: var(--shadow); }

/* Motion: entrance + hero swap */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal .7s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: var(--d, 0s); }
@keyframes reveal { to { opacity: 1; transform: none; } }
.hero-copy.swap { animation: swapIn .6s cubic-bezier(.2,.7,.2,1); }
@keyframes swapIn { from { opacity: .25; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Focus visibility */
.eye:focus-visible, .theme-toggle:focus-visible, .btn:focus-visible,
.switch button:focus-visible, .link-muted:focus-visible, .uline-in input:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }

/* =====================================================================
   LIGHT THEME (login + app)
   ===================================================================== */
[data-theme="light"] {
  color-scheme: light;
  --bg: #e9edfa; --bg-2: #f4f6ff; --panel: #ffffff; --card: #ffffff; --card-2: #f6f8ff; --card-hi: #eaefff;
  --line: rgba(60,80,160,0.14); --line-2: rgba(60,80,160,0.26);
  --text: #101638; --muted: #4c5688; --faint: #838bb6;
  --shadow: 0 18px 50px -24px rgba(40,55,130,0.35);
  --grad-soft: linear-gradient(135deg, rgba(79,123,255,0.12), rgba(168,85,247,0.12));
}
[data-theme="light"] .auth-body { background: #dfe4f5; }
[data-theme="light"] .auth-shell { background: #eef1fb; }
[data-theme="light"] .blade { background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(246,248,255,0.92)); }
[data-theme="light"] .scene-veil { background: radial-gradient(130% 120% at 50% 28%, transparent 45%, rgba(210,218,242,0.55) 100%); }
[data-theme="light"] .aurora .a { opacity: 0.4; }
[data-theme="light"] .display, [data-theme="light"] .hero-sub { text-shadow: none; }
[data-theme="light"] .eyebrow-chip { color: #414c8c; background: rgba(139,92,246,0.1); }
[data-theme="light"] .theme-toggle { background: rgba(255,255,255,0.82); }
[data-theme="light"] .sidebar { background: rgba(255,255,255,0.72); }
[data-theme="light"] .nav a:hover { background: #eef1fb; }
[data-theme="light"] .modal { background: linear-gradient(180deg, #ffffff, #f5f7ff); }
[data-theme="light"] .toast { background: #ffffff; }
[data-theme="light"] .reco .pick, [data-theme="light"] .bar-track, [data-theme="light"] .strength-bar { background: #eef1fb; }

/* =====================================================================
   LOGIN RESPONSIVE (stack on small screens — no blade slide)
   ===================================================================== */
@media (max-width: 860px) {
  .auth-body { padding: 0; align-items: stretch; }
  .auth-shell { width: 100%; height: auto; min-height: 100vh; min-height: 100dvh; border-radius: 0; display: block; }
  .hero-side, .blade {
    position: relative; top: auto; bottom: auto; left: auto; right: auto; width: 100%;
    transform: none !important; clip-path: none !important; transition: none;
  }
  .hero-side { padding: 44px 22px 6px; gap: 16px; justify-content: flex-start; z-index: 3; }
  .blade { z-index: 3; padding: 8px 18px 40px; background: transparent; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none; overflow: visible; }
  .form-inner {
    margin: 0 auto; padding: 24px 22px; border-radius: 20px; border: 1px solid var(--line-2);
    background: linear-gradient(180deg, rgba(15,20,52,0.94), rgba(9,13,36,0.96));
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  .display { font-size: 34px; }
  .feature-row, .hero-foot { display: none; }
}
[data-theme="light"] .form-inner { }
@media (max-width: 860px) {
  [data-theme="light"] .form-inner { background: linear-gradient(180deg, #ffffff, #f5f7ff); }
}

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  .aurora .a { animation: none !important; }
  .reveal { animation: none !important; opacity: 1 !important; transform: none !important; }
  .hero-copy.swap { animation: none !important; }
  .caret, .pulse-dot { animation: none !important; }
  .blade, .hero-side { transition: none !important; }
  .btn, .theme-toggle, .strength-bar i, .uline-in::after { transition: none !important; }
}

/* =====================================================================
   LANDING / PITCH PAGE  (lp-* )
   A cinematic hero with a live "decision verdict" card, a numbered
   decision pipeline, the weighted matrix, the self-challenge feature,
   a use-case grid, and a closing CTA. Reuses .aurora/.scene-canvas/
   .scene-veil/.eyebrow-chip/.grad-text/.btn from above.
   ===================================================================== */
html { scroll-behavior: smooth; }
body.landing { overflow-x: hidden; }

/* Shared reveal-on-scroll */
.reveal-up { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); will-change: opacity, transform; }
.reveal-up.in { opacity: 1; transform: none; }

.tick { display: inline-grid; place-items: center; color: var(--green); vertical-align: -2px; }
.tick svg { display: block; }
.trophy { font-size: 1em; line-height: 1; filter: drop-shadow(0 2px 6px rgba(251,191,36,.4)); }

/* ---------- NAV ---------- */
.lp-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; gap: 22px;
  padding: 15px clamp(18px, 5vw, 42px);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease, padding .3s ease;
  border-bottom: 1px solid transparent;
}
.lp-nav.scrolled {
  background: rgba(8,11,30,0.72); -webkit-backdrop-filter: blur(14px) saturate(130%); backdrop-filter: blur(14px) saturate(130%);
  border-bottom: 1px solid var(--line); box-shadow: 0 12px 40px -28px #000; padding-top: 11px; padding-bottom: 11px;
}
.lp-brand { display: inline-flex; align-items: center; }
.lp-brand svg { display: block; }
.lp-links { display: flex; gap: 4px; margin-left: 8px; }
.lp-links a { color: var(--muted); font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 10px; transition: color .18s, background .18s; }
.lp-links a:hover { color: var(--text); background: rgba(124,142,222,0.10); }
.lp-nav-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- HERO ---------- */
.lp-hero {
  position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden;
  display: flex; align-items: center;
  padding: clamp(104px, 15vh, 150px) clamp(20px, 5vw, 42px) clamp(56px, 8vh, 90px);
  background: radial-gradient(120% 90% at 80% 0%, #0c1234 0%, var(--bg) 60%);
}
.lp-hero .scene-canvas, .lp-hero .aurora, .lp-hero .scene-veil { position: absolute; }
.lp-hero .scene-veil { background: radial-gradient(135% 120% at 70% 22%, transparent 40%, rgba(6,9,22,0.72) 100%); }
.lp-hero-inner {
  position: relative; z-index: 3; width: 100%; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.02fr 0.98fr; gap: clamp(30px, 5vw, 68px); align-items: center;
}
.lp-hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.lp-display {
  font-family: "Fraunces", Georgia, serif; font-weight: 600;
  font-size: clamp(42px, 6.2vw, 78px); line-height: 0.98; letter-spacing: -0.02em; margin: 0;
  text-shadow: 0 2px 40px rgba(0,0,0,0.45);
}
.lp-display em { font-style: italic; font-weight: 600; }
.lp-lead { color: #c3cbf0; font-size: clamp(15px, 1.6vw, 18.5px); line-height: 1.62; max-width: 540px; margin: 0; text-shadow: 0 1px 18px rgba(0,0,0,0.35); }
.lp-lead b { color: #fff; font-weight: 600; }
.lp-cta-row { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 4px; }
.lp-cta-row.center { justify-content: center; }
.lp-trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.lp-trust > span { display: inline-flex; align-items: center; gap: 8px; }

/* Scroll cue */
.lp-scroll-cue { position: absolute; z-index: 3; left: 50%; bottom: 22px; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid var(--line-2); border-radius: 14px; display: grid; justify-items: center; padding-top: 7px; opacity: .7; transition: opacity .2s; }
.lp-scroll-cue:hover { opacity: 1; }
.lp-scroll-cue span { width: 4px; height: 8px; border-radius: 3px; background: var(--sky); animation: cue 1.7s ease-in-out infinite; }
@keyframes cue { 0%,100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(11px); opacity: .1; } }

/* ---------- SIGNATURE: verdict card (3D flip) ---------- */
.lp-verdict { width: min(452px, 100%); margin-inline: auto; perspective: 1600px; }
.lp-verdict-flip { position: relative; transition: transform .8s cubic-bezier(.76,0,.24,1); transform-style: preserve-3d; }
.lp-verdict-flip.flipped { transform: rotateY(180deg); }
.vf {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line-2); border-radius: 22px; padding: 24px;
  box-shadow: 0 40px 90px -40px rgba(0,0,0,0.9), 0 0 0 1px rgba(124,142,222,0.06) inset;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.vf-front { position: relative; }
.vf-back { position: absolute; inset: 0; transform: rotateY(180deg); display: flex; flex-direction: column; justify-content: center; gap: 14px; }

.vf-q { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; font-weight: 600; line-height: 1.4; padding-bottom: 16px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.vf-q-ic { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid var(--line-2); color: #ffd98a; }

/* Analyzing overlay (masks the result during the "thinking" beat) */
.vf-analyzing { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 12px;
  border-radius: 22px; background: linear-gradient(180deg, var(--card), var(--card-2)); color: var(--muted); font-size: 14px; font-weight: 500;
  transition: opacity .34s ease; }
.vf-analyzing.gone { opacity: 0; }
.vf-analyzing .dots { display: inline-flex; gap: 5px; }
.vf-analyzing .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--purple); animation: vdot 1.1s ease-in-out infinite; }
.vf-analyzing .dots i:nth-child(2) { animation-delay: .15s; background: var(--blue); }
.vf-analyzing .dots i:nth-child(3) { animation-delay: .3s; background: var(--sky); }
@keyframes vdot { 0%,100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-6px); opacity: 1; } }

.vf-result { opacity: 0; transition: opacity .5s ease; }
.vf-result.show { opacity: 1; }
.vf-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .05em;
  padding: 6px 12px; border-radius: 999px; color: #ffe08a; background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.32); }
.vf-badge.alt { color: #d8c7ff; background: rgba(139,92,246,0.16); border-color: var(--line-2); }
.vf-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 14px 0 6px; }
.vf-pick-wrap { min-width: 0; }
.vf-pick { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 34px; line-height: 1; letter-spacing: -0.01em; }
.vf-note { color: var(--muted); font-size: 13px; margin-top: 6px; }
.vf-gauge { position: relative; width: 88px; height: 88px; flex: 0 0 auto; }
.vf-gauge svg { display: block; }
.vf-ring { transform: rotate(-90deg); transform-origin: 48px 48px; transition: stroke-dashoffset 1.1s cubic-bezier(.3,.8,.3,1); }
.vf-gauge-val { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1; }
.vf-gauge-val b { font-size: 24px; font-weight: 700; }
.vf-gauge-val small { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }

.vf-bars { display: flex; align-items: flex-end; justify-content: space-around; gap: 12px; height: 96px; margin: 12px 0 4px; padding: 0 4px; }
.vf-bar { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; }
.vf-bar .s { font-size: 13px; font-weight: 700; color: var(--muted); }
.vf-bar i { display: block; width: 100%; max-width: 34px; height: 0; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--blue), #3355cc); transition: height .9s cubic-bezier(.2,.7,.2,1); }
.vf-bar.win .s { color: var(--text); }
.vf-bar.win i { background: linear-gradient(180deg, #a855f7, #6d28d9); box-shadow: 0 0 22px -6px rgba(168,85,247,0.75); }
.vf-bar .l { font-size: 12px; color: var(--faint); font-weight: 600; }

.vf-reasons { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 9px; }
.vf-reasons li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: #dbe1ff; }
.vf-trade { display: flex; align-items: flex-start; gap: 9px; margin: 14px 0 16px; padding: 11px 13px; border-radius: 12px; font-size: 13px; color: #f2d9a8;
  background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.22); }
.vf-trade .warn { color: var(--amber); flex: 0 0 auto; margin-top: 1px; }
.vf-trade b { color: #ffe4b0; }
.vf-challenge { color: #d8c7ff; }

.vf-back-title { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 25px; line-height: 1.15; margin: 4px 0 0; }
.vf-back-body { color: #c8cff2; font-size: 14px; line-height: 1.6; margin: 0; }
.vf-back-body b { color: #fff; }
.vf-back-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 2px 0; }
.vf-back-cell { padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.vf-back-cell .k { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.vf-back-cell .v { font-size: 13px; font-weight: 600; margin-top: 5px; }
.flip-back-ic { display: inline-flex; transform: scaleX(-1); }

.lp-verdict-cap { text-align: center; color: var(--faint); font-size: 12.5px; margin-top: 16px; }
.lp-verdict-cap b { color: var(--muted); }

/* ---------- SECTIONS (shared) ---------- */
.lp-section { max-width: 1180px; margin: 0 auto; padding: clamp(72px, 11vh, 132px) clamp(20px, 5vw, 42px); }
.lp-sec-head { max-width: 720px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; gap: 14px; }
.lp-sec-head .eyebrow { color: var(--sky); }
.lp-h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: clamp(30px, 4vw, 48px); line-height: 1.06; letter-spacing: -0.015em; margin: 0; }
.lp-h2 em { font-style: italic; }
.lp-sec-sub { color: var(--muted); font-size: clamp(15px, 1.4vw, 17px); line-height: 1.65; margin: 0; }
.lp-sec-head .lp-sec-sub { margin-inline: auto; }

/* ---------- HOW IT WORKS (pipeline) ---------- */
.lp-pipeline { list-style: none; margin: clamp(40px, 6vh, 64px) 0 0; padding: 0; display: flex; align-items: stretch; gap: 10px; }
.lp-step { position: relative; flex: 1 1 0; display: flex; flex-direction: column; gap: 8px; padding: 22px 20px; border-radius: 18px;
  background: linear-gradient(180deg, var(--card), var(--card-2)); border: 1px solid var(--line); overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.lp-step:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 24px 50px -30px rgba(0,0,0,.8); }
.lp-step-n { font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 600; font-size: 15px;
  position: absolute; top: 14px; right: 16px; color: transparent; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; opacity: .6; }
.lp-step-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #c9b6ff; background: var(--grad-soft); border: 1px solid var(--line-2); }
.lp-step h3 { margin: 8px 0 0; font-size: 16.5px; font-weight: 700; }
.lp-step p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.lp-step-final { background: linear-gradient(180deg, rgba(79,123,255,0.16), rgba(168,85,247,0.14)); border-color: var(--line-2); }
.lp-step-final .lp-step-ic { color: #fff; background: var(--grad); border: none; }
.lp-arrow { flex: 0 0 auto; align-self: center; display: grid; place-items: center; color: var(--faint); }
.lp-arrow svg { display: block; }

/* ---------- DECISION MATRIX ---------- */
.lp-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
.lp-split-copy { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.lp-split-copy .lp-h2, .lp-split-copy .lp-sec-sub { text-align: left; }
.lp-check-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 13px; }
.lp-check-list li { display: flex; align-items: flex-start; gap: 11px; font-size: 14.5px; color: #d3d9f7; line-height: 1.5; }
.lp-check-list .tick { margin-top: 2px; }
.lp-check-list b { color: #fff; }

.lp-matrix-card { padding: 24px; }
.lp-mc-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 16px; margin-bottom: 20px; }
.lp-mc-tag { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.lp-crit { margin-bottom: 16px; }
.lp-crit-row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.lp-crit-row .w { font-weight: 700; color: var(--text); }
.lp-crit-bar { height: 9px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.lp-crit-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--grad); transition: width 1.1s cubic-bezier(.2,.7,.2,1); }
.reveal-up.in .lp-crit-bar i { width: var(--w); }
.lp-mc-out { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.lp-mc-arrow { color: var(--faint); display: grid; place-items: center; }
.lp-mc-verdict { display: inline-flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 600; }
.lp-mc-verdict b { font-size: 24px; font-weight: 700; }

/* ---------- CHALLENGE ---------- */
.lp-challenge-sec { max-width: 900px; }
.lp-challenge-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: clamp(34px, 5vw, 60px); border-radius: 26px; position: relative; overflow: hidden;
  background: radial-gradient(120% 130% at 50% 0%, rgba(139,92,246,0.18), rgba(20,26,62,0.6) 60%);
  border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.lp-challenge-card .eyebrow { color: var(--sky); }
.lp-quote { position: relative; margin: 6px 0; max-width: 640px; font-family: "Fraunces", Georgia, serif; font-style: italic;
  font-size: clamp(18px, 2.4vw, 26px); line-height: 1.4; color: #eef1ff; }
.lp-quote-mark { color: var(--purple); font-size: 1.4em; font-weight: 700; margin-right: 4px; vertical-align: -0.15em; }

/* ---------- USE CASES ---------- */
.lp-case-grid { margin-top: clamp(40px, 6vh, 62px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-case { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: 18px;
  background: linear-gradient(180deg, var(--card), var(--card-2)); border: 1px solid var(--line);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.lp-case:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 24px 50px -30px rgba(0,0,0,.8); }
.lp-case-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #c9b6ff; background: var(--grad-soft); border: 1px solid var(--line-2); }
.lp-case h3 { margin: 6px 0 0; font-size: 16px; font-weight: 700; }
.lp-case p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* ---------- WHAT IS LIFELENS (plain-English steps) ---------- */
.lp-eli { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: clamp(34px, 5vh, 54px); }
.lp-eli-step { display: inline-flex; align-items: center; gap: 11px; padding: 12px 20px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 14.5px; font-weight: 500; color: var(--text); }
.lp-eli-n { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.lp-eli-arrow { display: inline-flex; color: var(--faint); }

/* ---------- WHY LIFELENS (benefit grid) ---------- */
.lp-why-grid { margin-top: clamp(40px, 6vh, 62px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

/* ---------- CLOSING CTA ---------- */
.lp-cta-band { position: relative; overflow: hidden; padding: clamp(72px, 12vh, 130px) clamp(20px, 5vw, 42px);
  background: radial-gradient(110% 140% at 50% 120%, rgba(168,85,247,0.22), transparent 60%), linear-gradient(180deg, var(--bg), #0a0f2a); border-top: 1px solid var(--line); }
.lp-cta-inner { max-width: 720px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.lp-cta-brand svg { display: block; }
.lp-cta-title { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: clamp(30px, 4.4vw, 52px); line-height: 1.05; letter-spacing: -0.015em; margin: 0; }
.lp-cta-title em { font-style: italic; }
.lp-cta-hint { color: var(--faint); font-size: 13px; margin-top: 2px; }
.lp-cta-hint b { color: var(--sky); }

/* ---------- FOOTER ---------- */
.lp-foot { border-top: 1px solid var(--line); padding: 30px clamp(20px, 5vw, 42px); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1180px; margin: 0 auto; }
.lp-foot-brand svg { display: block; }
.lp-foot-meta { color: var(--faint); font-size: 13px; }
.lp-foot-meta b { color: var(--muted); }

/* ---------- LANDING — LIGHT THEME ---------- */
[data-theme="light"] .lp-hero { background: radial-gradient(120% 90% at 80% 0%, #dfe6fb 0%, var(--bg) 60%); }
[data-theme="light"] .lp-hero .scene-veil { background: radial-gradient(135% 120% at 70% 22%, transparent 42%, rgba(214,222,245,0.7) 100%); }
[data-theme="light"] .lp-display, [data-theme="light"] .lp-lead { text-shadow: none; }
[data-theme="light"] .lp-lead { color: #333c66; }
[data-theme="light"] .lp-lead b { color: var(--text); }
[data-theme="light"] .lp-links a:hover { background: rgba(60,80,160,0.08); }
[data-theme="light"] .lp-nav.scrolled { background: rgba(244,246,255,0.8); }
[data-theme="light"] .vf-analyzing { background: linear-gradient(180deg, #ffffff, #f6f8ff); }
[data-theme="light"] .vf-bar .s { color: var(--muted); }
[data-theme="light"] .lp-check-list li, [data-theme="light"] .lp-reasons li { color: #2b335c; }
[data-theme="light"] .vf-reasons li { color: #2b335c; }
[data-theme="light"] .vf-back-body { color: #333c66; }
[data-theme="light"] .lp-quote { color: var(--text); }
[data-theme="light"] .lp-cta-band { background: radial-gradient(110% 140% at 50% 120%, rgba(168,85,247,0.16), transparent 60%), linear-gradient(180deg, var(--bg), #e2e8fb); }

/* ---------- LANDING — RESPONSIVE ---------- */
@media (max-width: 960px) {
  .lp-hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .lp-hero-copy { align-items: center; text-align: center; }
  .lp-hero-copy .lp-lead { margin-inline: auto; }
  .lp-cta-row, .lp-trust { justify-content: center; }
  .lp-split { grid-template-columns: 1fr; }
  .lp-split-copy { align-items: center; text-align: center; }
  .lp-split-copy .lp-h2, .lp-split-copy .lp-sec-sub { text-align: center; }
  .lp-split-copy .lp-check-list { text-align: left; }
  .lp-pipeline { flex-direction: column; }
  .lp-arrow { transform: rotate(90deg); }
  .lp-case-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-why-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .lp-links { display: none; }
  .lp-case-grid { grid-template-columns: 1fr; }
  .lp-why-grid { grid-template-columns: 1fr; }
  .vf-back-grid { grid-template-columns: 1fr; }
  .lp-scroll-cue { display: none; }
}

/* ---------- LANDING — REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-up { opacity: 1 !important; transform: none !important; transition: none !important; }
  .lp-verdict-flip, .vf-ring, .vf-bar i, .vf-result, .vf-analyzing, .lp-crit-bar i, .lp-step, .lp-case { transition: none !important; }
  .lp-scroll-cue span, .vf-analyzing .dots i { animation: none !important; }
}

/* =====================================================================
   APP POLISH — bring the six app screens up to the cinematic quality
   of the login/landing (editorial serif accents, drifting aurora,
   showpiece recommendation card, richer sidebar/cards/modals).
   Additive only — every id/class the app JS relies on is untouched.
   ===================================================================== */

/* Drifting ambient aurora behind the whole app (was static) */
.bg-glows { background: radial-gradient(60% 45% at 50% 8%, rgba(79,123,255,0.07), transparent 70%); }
.bg-glows::before { animation: appGlowA 32s ease-in-out infinite; }
.bg-glows::after  { animation: appGlowB 38s ease-in-out infinite; }
@keyframes appGlowA { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(70px,46px) scale(1.08); } }
@keyframes appGlowB { 0%,100% { transform: translate(0,0) scale(1.04); } 50% { transform: translate(-56px,-34px) scale(1.12); } }

/* Editorial serif accents (Poppins stays for UI chrome) */
.topbar h1 { font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 600; letter-spacing: -0.02em; }
.gauge .val .n { font-family: "Fraunces", Georgia, serif; font-weight: 600; }
.stat .n { font-family: "Fraunces", Georgia, serif; font-weight: 600; }
.reco .pick .opt { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -0.01em; }

/* Sidebar refinements */
.sidebar { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sidebar .brand { padding: 2px 6px 4px; }
.nav a { position: relative; }
.nav a svg { transition: transform .18s ease; }
.nav a:hover svg { transform: translateX(1px) scale(1.05); }
.nav a.active { box-shadow: 0 8px 26px -16px rgba(120,80,255,0.9); }
.userbox { transition: border-color .2s ease; }
.userbox:hover { border-color: var(--line-2); }
#new-decision { box-shadow: 0 12px 30px -14px rgba(120,80,255,0.85); }

/* Interactive cards get a gentle lift + brighter border on hover */
.stat, .ev { transition: transform .16s ease, border-color .2s ease, box-shadow .2s ease; }
.stat:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 22px 46px -30px rgba(0,0,0,.8); }
.ev:hover { border-color: var(--line-2); }
.stat .k svg { transition: transform .18s ease; }
.stat:hover .k svg { transform: scale(1.12); }

/* The primary "decide" prompt — more presence + hover */
.decide { transition: transform .16s ease, border-color .2s ease, box-shadow .2s ease; cursor: pointer; position: relative; overflow: hidden; }
.decide::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(168,85,247,0.16), transparent 70%); pointer-events: none; }
.decide:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 24px 50px -30px rgba(0,0,0,.8); }
.decide .go { transition: transform .16s ease, box-shadow .2s ease; }
.decide:hover .go { transform: translateX(2px) scale(1.04); }

/* Recent-decision card hover */
.recent { transition: transform .16s ease, border-color .2s ease, box-shadow .2s ease; }
.recent:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 22px 46px -30px rgba(0,0,0,.8); }

/* ---- Recommendation card = showpiece ---- */
.reco-card { position: relative; overflow: hidden; }
.reco-card::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(90% 70% at 100% 0%, rgba(139,92,246,0.12), transparent 55%); }
.reco .pick { position: relative; overflow: hidden;
  background: radial-gradient(120% 85% at 50% -10%, rgba(139,92,246,0.20), var(--bg-2) 70%); border-color: var(--line-2); }
.reco-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  padding: 6px 12px; border-radius: 999px; color: #ffe08a; background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.32); margin-bottom: 2px; }
.reco-concern { display: flex; align-items: flex-start; gap: 9px; margin-top: 16px; padding: 11px 13px; border-radius: 12px; font-size: 13px;
  color: #f2d9a8; background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.22); line-height: 1.45; }
.reco-concern .warn-ic { color: var(--amber); flex: 0 0 auto; margin-top: 1px; display: grid; place-items: center; }
.reco-concern b { color: #ffe4b0; }

/* Comparison winning bar gets a soft pulse the first time it lands */
.bars .bar.win .col { position: relative; }

/* Challenge banner — decorative sparkle glow */
.challenge-banner { position: relative; overflow: hidden; }
.challenge-banner::after { content: ""; position: absolute; right: -30px; bottom: -50px; width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.20), transparent 70%); pointer-events: none; }
.challenge-banner .t { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -0.01em; }
.challenge-banner .btn { position: relative; z-index: 1; }

/* Demo "make your own" nudge — shown only on the seeded sample account's dashboard */
.demo-nudge {
  display: flex; align-items: center; gap: 15px;
  background: linear-gradient(120deg, rgba(79,140,255,0.16), rgba(168,85,247,0.12));
  border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 15px 18px; position: relative; overflow: hidden;
}
.demo-nudge::after {
  content: ""; position: absolute; right: -40px; top: -70px; width: 210px; height: 210px; border-radius: 50%;
  background: radial-gradient(circle, rgba(79,140,255,0.22), transparent 70%); pointer-events: none;
}
.demo-nudge .dn-ic {
  flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--purple)); color: #fff;
  position: relative; z-index: 1; box-shadow: 0 6px 18px rgba(79,140,255,0.35);
}
.demo-nudge .dn-txt { flex: 1; min-width: 0; position: relative; z-index: 1; }
.demo-nudge .dn-txt .t { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 16.5px; letter-spacing: -0.01em; }
.demo-nudge .dn-txt .d { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 3px; }
.demo-nudge .dn-cta { flex: none; position: relative; z-index: 1; white-space: nowrap; }
.demo-nudge .dn-x { flex: none; position: relative; z-index: 1; align-self: flex-start; }
@media (max-width: 720px) {
  .demo-nudge { flex-wrap: wrap; }
  .demo-nudge .dn-ic { order: 1; }
  .demo-nudge .dn-x { order: 1; margin-left: auto; }
  .demo-nudge .dn-txt { order: 2; flex: 1 1 100%; }
  .demo-nudge .dn-cta { order: 3; flex: 1 1 100%; justify-content: center; }
}

/* Comparisons + insights section headings a touch more editorial */
.card-hd h3 { letter-spacing: -0.01em; }

/* Matrix winning row a bit richer */
table.matrix tr.win td { background: linear-gradient(90deg, rgba(168,85,247,0.10), rgba(79,123,255,0.05)); }

/* Modal heading */
.modal-hd h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -0.01em; }

/* Empty-state icon float */
.empty .ic { animation: emptyFloat 4.5s ease-in-out infinite; }
@keyframes emptyFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  .bg-glows::before, .bg-glows::after, .empty .ic { animation: none !important; }
  .stat, .ev, .decide, .recent, .nav a svg, .decide .go, .stat .k svg { transition: none !important; }
}

/* =====================================================================
   NEW FEATURES (2026-08-21)
   1) Wizard quick-start templates   2) What-if weight sliders
   3) Print / PDF decision report.  Additive only.
   ===================================================================== */

/* ---- 1. Wizard quick-start template chips ---- */
.section-title .opt { text-transform: none; letter-spacing: 0; color: var(--faint); font-weight: 500; font-size: 12px; }
.wiz-tpl { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 4px; }
.tpl-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--muted); background: var(--bg-2); border: 1px solid var(--line-2);
  transition: transform .14s ease, border-color .2s ease, color .2s ease, background .2s ease, box-shadow .2s ease;
}
.tpl-chip svg { width: 15px; height: 15px; opacity: .9; }
.tpl-chip:hover {
  transform: translateY(-2px); color: var(--text); border-color: var(--blue);
  background: var(--grad-soft); box-shadow: 0 10px 24px -16px rgba(120,80,255,0.9);
}

/* ---- 2. What-if weight sliders (live sensitivity) ---- */
.whatif .wi-hint { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: -4px 0 18px; }
.whatif .wi-hint b { color: var(--text); }
.wi-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px; align-items: start; }
.wi-sliders { display: grid; gap: 16px; }
.wi-row { display: grid; gap: 7px; }
.wi-lab { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; }
.wi-lab span { color: var(--text); font-weight: 500; }
.wi-lab b { font-family: "Fraunces", Georgia, serif; font-weight: 600; color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.wi-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px;
  background: var(--line-2); outline: none; cursor: pointer;
}
.wi-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--grad); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(120,80,255,0.55); cursor: pointer;
}
.wi-range::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: #7c5cff; border: 2px solid #fff; cursor: pointer;
}
.wi-range:focus-visible { box-shadow: 0 0 0 3px rgba(79,140,255,0.35); }
.wi-out { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.wi-flip, .wi-stable {
  display: flex; align-items: center; gap: 9px; font-size: 13.5px; line-height: 1.45;
  padding: 10px 12px; border-radius: 11px; margin-bottom: 14px;
}
.wi-flip svg, .wi-stable svg { flex: 0 0 auto; }
.wi-flip { color: #ffe08a; background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.3); }
.wi-flip b { color: #fff; }
.wi-stable { color: #6ee7b7; background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.28); }
.wi-stable b { color: #fff; }
.wi-board { display: grid; gap: 11px; }
.wi-item { display: grid; gap: 5px; }
.wi-item-top { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); }
.wi-item.win .wi-item-top span { color: var(--text); font-weight: 600; }
.wi-item-top b { color: var(--text); font-variant-numeric: tabular-nums; }
.wi-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.wi-bar i { display: block; height: 100%; border-radius: 999px; background: var(--line-2); transition: width .35s ease; }
.wi-item.win .wi-bar i { background: var(--grad-gauge); }
@media (max-width: 760px) { .wi-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .wi-bar i { transition: none !important; } }

/* ---- 3. Print / PDF decision report (hidden on screen) ---- */
#print-report { display: none; }
#print-report .pr-doc { color: #10132b; font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; max-width: 720px; margin: 0 auto; }
#print-report .pr-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid #e6e9f5; padding-bottom: 12px; margin-bottom: 20px; }
#print-report .pr-brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
#print-report .pr-brand svg { width: 30px; height: 30px; }
#print-report .pr-brand b { background: linear-gradient(120deg,#4f7bff,#a855f7); -webkit-background-clip: text; background-clip: text; color: transparent; }
#print-report .pr-meta { font-size: 12px; color: #6b74a0; }
#print-report .pr-title { font-family: "Fraunces", Georgia, serif; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 6px; color: #10132b; }
#print-report .pr-q { font-size: 14px; color: #4a5480; margin: 0 0 20px; }
#print-report .pr-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 14px; background: linear-gradient(120deg, rgba(79,123,255,0.12), rgba(168,85,247,0.12)); border: 1px solid #d9def2; margin-bottom: 8px; }
#print-report .pr-v-badge { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #a86a00; background: #fff3d6; border: 1px solid #f0d089; padding: 5px 10px; border-radius: 999px; }
#print-report .pr-v-name { font-family: "Fraunces", Georgia, serif; font-size: 22px; font-weight: 600; color: #10132b; }
#print-report .pr-v-num { margin-left: auto; font-size: 14px; color: #4a5480; }
#print-report .pr-v-num b { font-family: "Fraunces", Georgia, serif; font-size: 24px; color: #5b34e0; }
#print-report .pr-h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #6b74a0; margin: 22px 0 10px; font-weight: 700; }
#print-report .pr-reasons { margin: 0; padding-left: 20px; }
#print-report .pr-reasons li { font-size: 13.5px; line-height: 1.6; margin-bottom: 5px; color: #22284a; }
#print-report .pr-matrix { width: 100%; border-collapse: collapse; font-size: 12.5px; }
#print-report .pr-matrix th, #print-report .pr-matrix td { border: 1px solid #e0e4f2; padding: 8px 10px; text-align: center; }
#print-report .pr-matrix th { background: #f4f6fc; color: #4a5480; font-weight: 600; }
#print-report .pr-matrix th span { display: block; font-size: 10px; color: #9aa0bd; font-weight: 500; }
#print-report .pr-matrix td.opt, #print-report .pr-matrix th.opt { text-align: left; font-weight: 600; color: #10132b; }
#print-report .pr-matrix tr.win td { background: #f1ecff; }
#print-report .pr-matrix td.sc { font-weight: 700; }
#print-report .pr-chal { font-size: 13.5px; line-height: 1.65; color: #22284a; background: #faf7ff; border: 1px solid #ece4fb; border-left: 3px solid #a855f7; padding: 12px 14px; border-radius: 8px; margin: 0; }
#print-report .pr-foot { margin-top: 26px; padding-top: 12px; border-top: 1px solid #e6e9f5; font-size: 11px; color: #8a90ad; text-align: center; }

@media print {
  @page { margin: 14mm; }
  html, body { background: #fff !important; }
  body * { visibility: hidden !important; }
  #print-report, #print-report * { visibility: visible !important; }
  #print-report {
    display: block !important; position: absolute; left: 0; top: 0; width: 100%;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}

/* ===========================================================================
   4. Upgrades — NL draft button · share modal · data backup · shared viewer
   =========================================================================== */

/* ---- "Draft from this" natural-language button (wizard) ---- */
.btn-nl {
  margin-top: 10px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 600;
  color: var(--text);
  background: var(--grad-soft);
  border: 1px solid var(--line-2);
  transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn-nl svg { width: 15px; height: 15px; }
.btn-nl:hover { transform: translateY(-1px); border-color: rgba(168,85,247,0.55); box-shadow: 0 10px 24px -14px rgba(120,80,255,0.9); }

/* ---- Share modal ---- */
.share-peek {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--muted);
  background: var(--grad-soft); border: 1px solid var(--line);
  padding: 12px 14px; border-radius: 12px; margin-bottom: 16px;
}
.share-peek b { color: var(--text); }
.share-row { display: flex; gap: 10px; align-items: stretch; }
.share-row input {
  flex: 1 1 auto; min-width: 0;
  padding: 12px 14px; border-radius: 11px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
  font-size: 13px; font-family: "SFMono-Regular", ui-monospace, "Menlo", monospace;
  outline: none;
}
.share-row input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79,140,255,0.18); }
.share-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.share-note { font-size: 12.5px; color: var(--faint); display: inline-flex; align-items: center; gap: 6px; }
.share-note svg { width: 13px; height: 13px; }
.share-warn {
  margin-top: 14px; font-size: 12.5px; line-height: 1.5; color: #ffe08a;
  background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.3);
  padding: 10px 12px; border-radius: 10px;
}

/* ---- Settings: data & backup note ---- */
.data-note { font-size: 12.5px; color: var(--faint); line-height: 1.55; margin-top: 12px; }

/* ===========================================================================
   Shared read-only decision viewer (view.html)
   =========================================================================== */
body.viewer { min-height: 100%; }
.vw-nav {
  max-width: 960px; margin: 0 auto; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.vw-brand { display: inline-flex; align-items: center; gap: 10px; }
.vw-brand svg { width: 30px; height: 30px; }
.vw-brand-tx { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.vw-brand-tx b { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vw-arrow { display: inline-flex; }
.vw-arrow svg { width: 15px; height: 15px; }

.vw-wrap { max-width: 960px; margin: 0 auto; padding: 10px 24px 60px; display: grid; gap: 20px; }

.vw-hero { padding: 14px 2px 6px; }
.vw-hero .eyebrow { margin-bottom: 12px; }
.vw-title {
  font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(26px, 4.4vw, 38px); line-height: 1.12; margin: 0 0 10px;
}
.vw-q { font-size: 16px; line-height: 1.55; color: var(--muted); margin: 0 0 14px; max-width: 680px; }
.vw-ro {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--faint);
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 6px 11px; border-radius: 999px;
}
.vw-ro svg { width: 13px; height: 13px; opacity: .85; }

.vw-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; }

.vw-chal { border-left: 3px solid var(--purple); }
.vw-chal-note { font-size: 14.5px; line-height: 1.65; color: var(--text); margin: 0 0 14px; }
.vw-vulns { display: grid; gap: 10px; }
.vw-vuln { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--muted); }
.vw-vuln b { color: var(--text); }

.vw-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 22px 24px; border-radius: var(--radius);
  background: var(--grad-soft); border: 1px solid var(--line-2);
}
.vw-cta .t { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.vw-cta .d { font-size: 13.5px; color: var(--muted); margin-top: 4px; max-width: 520px; line-height: 1.5; }

.vw-foot { max-width: 960px; margin: 0 auto; padding: 26px 24px 40px; text-align: center; font-size: 12.5px; color: var(--faint); border-top: 1px solid var(--line); }
.vw-foot b { color: var(--muted); }

@media (max-width: 760px) {
  .vw-grid { grid-template-columns: 1fr; }
  .vw-cta { flex-direction: column; align-items: flex-start; }
}
