/* ==========================================================================
   RiskLens — friendly light design system
   ========================================================================== */
:root {
  --bg: #f6f7fc;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e7eaf3;
  --primary: #5b5bf6;
  --primary-2: #8b5cf6;
  --pink: #d946ef;
  --grad: linear-gradient(120deg, #5b5bf6 0%, #8b5cf6 50%, #d946ef 100%);
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --linear: #f59e0b;
  --logistic: #06b6d4;
  --tree: #8b5cf6;
  --ensemble: #10b981;
  --r: 22px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 30px 60px -20px rgba(76, 70, 229, .25);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", Consolas, ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--primary); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .88em; background: #eef0fb; color: var(--primary); padding: 1px 6px; border-radius: 6px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 20px; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.gap { gap: 12px; }
.gap-s { gap: 8px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.wrap { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }

/* soft colour blobs in the background */
.blobs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.blobs i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .45; animation: drift 22s ease-in-out infinite alternate; }
.blobs i:nth-child(1) { width: 520px; height: 520px; background: #c7d2fe; top: -160px; right: -120px; }
.blobs i:nth-child(2) { width: 460px; height: 460px; background: #fbcfe8; bottom: -180px; left: -140px; animation-delay: -7s; }
.blobs i:nth-child(3) { width: 380px; height: 380px; background: #a5f3fc; top: 40%; left: 40%; opacity: .25; animation-delay: -14s; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.1); } }

/* ---------------- navigation ---------------- */
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 24px; padding: 14px max(20px, calc((100% - 1200px) / 2));
  background: rgba(246, 247, 252, .75); backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid rgba(231, 234, 243, .7); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); letter-spacing: -.02em; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(91, 91, 246, .7); }
.logo-mark svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; }
.links { display: flex; gap: 4px; margin-left: 12px; }
.links a { padding: 8px 14px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 14px; transition: .2s; }
.links a:hover { background: #fff; color: var(--ink); }
.links a.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
.nav-cta { margin-left: auto; }
.menu { display: none; margin-left: auto; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; align-items: center; }
.menu span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------------- buttons, chips ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 14px; border: 0; cursor: pointer;
  font-weight: 700; font-size: 14.5px; transition: transform .15s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px -10px rgba(91, 91, 246, .8); }
.btn.primary:hover { box-shadow: 0 16px 30px -10px rgba(91, 91, 246, .9); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px #c7cbe0; }
.btn.white { background: #fff; color: var(--primary); }
.btn.lg { height: 54px; padding: 0 28px; font-size: 16px; border-radius: 16px; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 11px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--line); background: #fff;
  cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); transition: .15s; }
.chip:hover { border-color: #c7cbe0; transform: translateY(-1px); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 99px; background: #fff; box-shadow: var(--shadow); font-size: 13px; color: var(--muted); font-weight: 600; }
.pill b { background: var(--grad); color: #fff; padding: 3px 10px; border-radius: 99px; font-size: 12px; }

/* ---------------- cards ---------------- */
.card { background: var(--card); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); border: 1px solid rgba(231, 234, 243, .8); }
.card-h { font-size: 16.5px; font-weight: 750; letter-spacing: -.01em; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.split { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.big-emoji { font-size: 46px; line-height: 1; margin-bottom: 12px; }
.tilt { transition: transform .25s ease, box-shadow .25s; transform-style: preserve-3d; will-change: transform; }

/* ---------------- pages ---------------- */
.page { display: none; padding-bottom: 60px; }
.page.active { display: block; animation: pageIn .5s cubic-bezier(.2, .7, .2, 1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } }
.page-top { padding: 40px 0 26px; }
.page-top h1 { font-size: 40px; letter-spacing: -.035em; font-weight: 800; line-height: 1.1; }
.page-top p { color: var(--muted); font-size: 16.5px; margin-top: 8px; max-width: 720px; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- hero ---------------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; align-items: center; min-height: calc(100vh - 70px); padding: 30px 0; }
.hero h1 { font-size: clamp(42px, 6vw, 72px); line-height: 1.02; letter-spacing: -.045em; font-weight: 800; margin: 22px 0 18px; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 540px; margin-bottom: 30px; }
.stats { display: flex; gap: 26px; margin-top: 38px; flex-wrap: wrap; }
.stat b { display: block; font-size: 27px; font-weight: 800; letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: 13.5px; font-weight: 500; }
.hero-3d { position: relative; height: 560px; }
.hero-3d canvas { width: 100%; height: 100%; display: block; }
.float-tag { position: absolute; background: rgba(255, 255, 255, .85); backdrop-filter: blur(10px); padding: 9px 14px; border-radius: 14px; font-size: 13px; font-weight: 700;
  box-shadow: var(--shadow); animation: bob 5s ease-in-out infinite; pointer-events: none; }
.float-tag.t1 { top: 12%; left: 2%; }
.float-tag.t2 { top: 48%; right: 0; animation-delay: -1.6s; }
.float-tag.t3 { bottom: 10%; left: 10%; animation-delay: -3.2s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

.section { padding: 70px 0 10px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.kicker { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
.section-head h2 { font-size: 38px; letter-spacing: -.035em; font-weight: 800; margin: 8px 0; line-height: 1.15; }
.section-head p { color: var(--muted); font-size: 16px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step-card { background: #fff; border-radius: var(--r); padding: 30px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.step-card .num { position: absolute; right: 18px; top: 4px; font-size: 90px; font-weight: 800; color: #eef0fb; line-height: 1; z-index: 0; }
.step-card .emoji { font-size: 40px; position: relative; }
.step-card h3 { font-size: 19px; margin: 14px 0 6px; position: relative; letter-spacing: -.01em; }
.step-card p { color: var(--muted); position: relative; }
.models { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.model-card { background: #fff; border-radius: var(--r); padding: 28px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.model-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--c); }
.model-card .icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: color-mix(in srgb, var(--c) 14%, white); }
.model-card h3 { font-size: 20px; margin: 16px 0 2px; letter-spacing: -.02em; }
.model-card .tag { font-size: 13px; font-weight: 700; color: var(--c); }
.model-card p { color: var(--muted); margin: 12px 0 18px; }
.acc-line { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
.acc-line .bar { flex: 1; height: 8px; border-radius: 8px; background: #eef0f6; overflow: hidden; }
.acc-line .bar i { display: block; height: 100%; background: var(--c); border-radius: 8px; width: 0; transition: width 1.4s cubic-bezier(.2, .8, .2, 1); }
.acc-line b { color: var(--ink); font-size: 15px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.fact { background: #fff; border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); }
.fact .big { font-size: 38px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.fact p { color: var(--ink-2); margin-top: 10px; font-size: 14.5px; }
.cta-band { background: var(--grad); color: #fff; border-radius: 28px; padding: 44px 48px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: rgba(255, 255, 255, .12); right: -100px; top: -160px; }
.cta-band h2 { font-size: 32px; letter-spacing: -.03em; }
.cta-band p { opacity: .9; }

/* ---------------- check a loan ---------------- */
.check-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: start; }
.wizard { position: sticky; top: 86px; }
.examples { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.stepper { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 24px; }
.stepper li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #f3f4fa; color: var(--muted); font-weight: 700; font-size: 13.5px; cursor: pointer; transition: .2s; }
.stepper li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-size: 13px; flex: none; }
.stepper li.on { background: #eef0ff; color: var(--primary); }
.stepper li.on span { background: var(--grad); color: #fff; }
.stepper li.done span { background: var(--green); color: #fff; }
.wstep { display: none; animation: slideIn .4s cubic-bezier(.2, .7, .2, 1); }
.wstep.on { display: grid; gap: 22px; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } }
.q label.qt { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.q .help { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.q .val { font-size: 20px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.q .val input { width: 130px; border: 0; background: transparent; text-align: right; font-weight: 800; font-size: 20px; color: var(--primary); outline: none; border-bottom: 2px dashed transparent; }
.q .val input:focus { border-bottom-color: var(--primary); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.tiles.grades { grid-template-columns: repeat(7, 1fr); }
.tiles.two { grid-template-columns: 1fr 1fr; }
.tile { border: 2px solid var(--line); background: #fff; border-radius: 16px; padding: 12px 8px; text-align: center; cursor: pointer; transition: .18s; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.tile .e { display: block; font-size: 24px; margin-bottom: 4px; }
.tile:hover { border-color: #c7cbe0; transform: translateY(-2px); }
.tile.on { border-color: var(--primary); background: #f3f3ff; color: var(--primary); box-shadow: 0 8px 18px -10px rgba(91, 91, 246, .6); }
.tiles.grades .tile { padding: 12px 0; font-size: 17px; }
.tiles.grades .tile.on { color: #fff; border-color: transparent; }
.grade-hint { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; font-weight: 600; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 8px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, #5b5bf6, #d946ef var(--p, 50%), #e8eaf3 var(--p, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); box-shadow: 0 4px 12px rgba(91, 91, 246, .4); transition: transform .15s; }
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); }
.range-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.lti { font-size: 13px; color: var(--muted); text-align: center; }
.lti b { display: block; font-size: 16px; }

.result { display: grid; gap: 20px; }
.result-main { overflow: hidden; }
.result-empty { text-align: center; padding: 60px 20px; }
.result-empty h3 { font-size: 20px; }
.verdict-row { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: center; }
.card3d { height: 210px; position: relative; }
.card3d canvas { width: 100%; height: 100%; display: block; }
.verdict-badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; letter-spacing: .08em; padding: 7px 14px; border-radius: 99px; }
.verdict-badge.APPROVE { background: #d1fae5; color: #047857; }
.verdict-badge.REVIEW { background: #fef3c7; color: #b45309; }
.verdict-badge.DECLINE { background: #fee2e2; color: #b91c1c; }
.verdict h2 { font-size: 28px; letter-spacing: -.03em; line-height: 1.15; margin: 12px 0 8px; }
.meter { margin-top: 22px; }
.meter-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.meter-head b { font-size: 30px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.meter-bar { height: 14px; border-radius: 14px; background: linear-gradient(90deg, #10b981, #84cc16 25%, #f59e0b 45%, #f97316 60%, #ef4444); position: relative; margin-top: 8px; }
.meter-bar i { position: absolute; top: -6px; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 5px solid var(--ink); transform: translateX(-50%); left: 0;
  transition: left 1s cubic-bezier(.2, .9, .3, 1.2); box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.meter-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; font-weight: 600; }
.people { margin-top: 22px; padding: 16px; border-radius: 16px; background: #f6f7fc; }
.people .grid { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; margin-top: 10px; }
.people .grid i { aspect-ratio: 1; border-radius: 50%; background: #10b981; transition: background .4s; }
.people .grid i.bad { background: #ef4444; }
.people p { font-size: 14px; color: var(--ink-2); }
.votes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.vote { border-radius: 16px; padding: 16px; background: #f6f7fc; position: relative; overflow: hidden; }
.vote::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.vote .n { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.vote .p { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 2px 0; font-variant-numeric: tabular-nums; }
.vote .s { font-size: 13px; font-weight: 700; }
.vote .x { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.reasons { display: grid; gap: 10px; margin-top: 12px; }
.reason { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 14px; background: #f6f7fc; animation: slideIn .4s both; }
.reason .ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; }
.reason.up .ic { background: #fee2e2; color: #dc2626; }
.reason.down .ic { background: #d1fae5; color: #059669; }
.reason b { font-size: 14.5px; }
.reason small { display: block; color: var(--muted); font-size: 12.5px; }
.reason .strength { display: flex; gap: 3px; }
.reason .strength i { width: 6px; height: 16px; border-radius: 3px; background: #e5e7eb; }
.reason.up .strength i.on { background: #ef4444; }
.reason.down .strength i.on { background: #10b981; }
.tips { display: grid; gap: 10px; margin-top: 12px; }
.tip { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; border: 1.5px dashed var(--line); cursor: pointer; transition: .15s; }
.tip:hover { border-color: var(--primary); background: #f8f8ff; }
.tip .delta { font-weight: 800; color: var(--green); white-space: nowrap; }
.qa summary { list-style: none; cursor: pointer; }
.qa summary::-webkit-details-marker { display: none; }
.chat { display: grid; gap: 10px; margin-top: 14px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 14px; animation: slideIn .4s both; }
.bubble.q { background: #f3f4fa; border-bottom-left-radius: 4px; }
.bubble.a { background: var(--grad); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; font-weight: 600; }
.bubble.end { max-width: 100%; background: #fff; border: 2px solid var(--line); font-weight: 600; }
.bubble small { display: block; opacity: .7; font-size: 12px; font-weight: 500; }

/* ---------------- compare ---------------- */
.toggle { display: inline-flex; background: #fff; padding: 5px; border-radius: 14px; box-shadow: var(--shadow); margin-top: 18px; }
.toggle button { border: 0; background: none; padding: 9px 18px; border-radius: 10px; font-weight: 700; cursor: pointer; color: var(--muted); }
.toggle button.on { background: var(--ink); color: #fff; }
.winner { display: flex; align-items: center; gap: 20px; background: linear-gradient(120deg, #fff, #f5f3ff); }
.winner .trophy { font-size: 54px; animation: bob 3s ease-in-out infinite; }
.winner h3 { font-size: 22px; letter-spacing: -.02em; }
.thr-box { display: flex; align-items: center; gap: 14px; min-width: 300px; flex: 1; max-width: 460px; }
.thr-box b { font-size: 22px; min-width: 56px; text-align: right; }
.thr-hint { margin-top: 14px; padding: 12px 16px; background: #f6f7fc; border-radius: 14px; font-size: 14px; color: var(--ink-2); }
.model-cmp { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 20px; }
.mc { background: #fff; border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); border-top: 5px solid var(--c); }
.mc h4 { font-size: 16px; letter-spacing: -.01em; }
.mc .sub { font-size: 12.5px; color: var(--muted); }
.mc .metric { margin-top: 14px; }
.mc .metric .top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.mc .metric .top b { font-size: 18px; color: var(--ink); }
.waffle { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; margin-top: 6px; }
.waffle i { aspect-ratio: 1; border-radius: 3px; background: #e8eaf3; transition: background .3s; }
.mc .best-tag { float: right; font-size: 11px; font-weight: 800; background: #fef3c7; color: #b45309; padding: 3px 8px; border-radius: 99px; }
.bar3d { height: 420px; position: relative; margin-top: 8px; border-radius: 16px; background: radial-gradient(ellipse at 50% 30%, #fbfbff, #f1f2fa); cursor: grab; }
.bar3d:active { cursor: grabbing; }
.bar3d canvas { width: 100%; height: 100%; display: block; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; }
.exp { display: grid; gap: 14px; margin-top: 14px; }
.exp .ctl { display: grid; grid-template-columns: 170px 1fr 60px; gap: 12px; align-items: center; font-size: 13.5px; font-weight: 600; }
.exp .ctl b { text-align: right; }
.exp-out { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 6px; }
.exp-box { padding: 14px; border-radius: 14px; background: #f6f7fc; }
.exp-box h5 { font-size: 13px; margin-bottom: 8px; }
.exp-box .m { display: flex; justify-content: space-between; font-size: 13px; padding: 2px 0; }
.exp-box .m b { font-variant-numeric: tabular-nums; }

/* tables */
.table-wrap { overflow: auto; border-radius: 14px; border: 1px solid var(--line); margin-top: 12px; }
.table-wrap.tall { max-height: 460px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 12px 14px; background: #f8f9fd; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafaff; }
td.best { color: var(--green); font-weight: 800; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.badge.good { background: #d1fae5; color: #047857; }
.badge.warn { background: #fef3c7; color: #b45309; }
.badge.bad { background: #fee2e2; color: #b91c1c; }
.badge.info { background: #e0f2fe; color: #0369a1; }
.badge.violet { background: #ede9fe; color: #6d28d9; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.mini-stats div { padding: 12px; border-radius: 12px; background: #f6f7fc; font-size: 12px; color: var(--muted); font-weight: 600; }
.mini-stats b { display: block; font-size: 20px; color: var(--ink); }

/* charts */
.chart { width: 100%; position: relative; margin-top: 10px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11.5px; font-family: var(--font); }
.chart .axis-title { fill: var(--ink-2); font-weight: 600; }
.chart .gridline { stroke: #eef0f6; }
.chart .baseline { stroke: #cbd0e1; }
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.grow { transform-box: fill-box; transform-origin: center bottom; animation: grow .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes grow { from { transform: scaleY(0); } }
.fade-in { animation: fadeIn .8s ease both; }
@keyframes fadeIn { from { opacity: 0; } }
.chart .legend { margin-top: 10px; }
.chart .legend i { width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; display: inline-block; }
.hbars { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr 54px; gap: 12px; align-items: center; font-size: 13px; }
.hbar .lbl { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.hbar .track { height: 10px; border-radius: 10px; background: #eef0f6; overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 10px; width: 0; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.hbar .val { text-align: right; font-weight: 700; font-size: 12.5px; }
.div-bars { display: flex; flex-direction: column; gap: 9px; }
.div-row { display: grid; grid-template-columns: minmax(90px, 38%) 1fr 54px; gap: 12px; align-items: center; font-size: 13px; }
.div-head { margin: 12px 0 6px; }
.div-legend { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.div-row .lbl { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.div-row .lbl small { color: var(--muted); margin-left: 6px; }
.div-row .track { position: relative; height: 14px; }
.div-row .track::before { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1.5px; background: #d5d9e7; }
.div-row .bar { position: absolute; top: 2px; height: 10px; border-radius: 4px; transition: all .8s cubic-bezier(.2, .8, .2, 1); }
.div-row .val { text-align: right; font-weight: 700; font-size: 12.5px; }
.cm { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px; font-size: 12px; margin-top: 10px; }
.cm .h { color: var(--muted); text-align: center; font-size: 11px; font-weight: 600; }
.cm .rh { color: var(--muted); font-size: 11px; writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-weight: 600; }
.cm .cell { border-radius: 12px; padding: 12px 4px; text-align: center; }
.cm .cell b { display: block; font-size: 19px; font-weight: 800; }
.cm .cell span { font-size: 10.5px; color: var(--ink-2); font-weight: 600; }

/* tree */
.tree { font-size: 13.5px; max-height: 560px; overflow: auto; margin-top: 10px; }
.tnode { margin-left: 18px; border-left: 2px solid #eef0f6; padding-left: 12px; }
.tree > .tnode { margin-left: 0; border: 0; padding: 0; }
.trow { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; cursor: pointer; }
.trow:hover { background: #f6f7fc; }
.caret { width: 14px; color: var(--muted); transition: transform .2s; flex: none; font-size: 10px; }
.tnode.open > .trow .caret { transform: rotate(90deg); }
.tnode > .kids { display: none; }
.tnode.open > .kids { display: block; }
.branch { font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 6px; flex: none; }
.branch.yes { background: #e0f2fe; color: #0369a1; }
.branch.no { background: #ede9fe; color: #6d28d9; }
.trow .q { font-weight: 600; }
.trow .meta { margin-left: auto; display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; flex: none; }
.rate { padding: 2px 8px; border-radius: 6px; font-weight: 800; font-size: 11.5px; min-width: 46px; text-align: center; }

/* insights */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.kpi { background: #fff; border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow); }
.kpi .l { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 2px; }
.kpi .f { font-size: 12.5px; color: var(--muted); }
.insight-note { margin-top: 12px; padding: 12px 16px; border-radius: 14px; background: #f3f3ff; color: var(--ink-2); font-size: 14px; }

/* batch */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 2.5px dashed #d5d9e7; cursor: pointer; min-height: 220px; transition: .2s; }
.drop:hover, .drop.over { border-color: var(--primary); background: #f8f8ff; }
.stack { display: flex; height: 18px; border-radius: 10px; overflow: hidden; gap: 3px; margin-top: 12px; }
.stack i { display: block; height: 100%; transition: width 1s; }

/* learn */
.problem { display: flex; gap: 22px; align-items: flex-start; }
.problem h3 { font-size: 20px; margin-bottom: 6px; }
.problem p { color: var(--ink-2); }
.pipeline { display: flex; align-items: center; gap: 6px; overflow-x: auto; }
.pstep { flex: 1 1 0; min-width: 100px; text-align: center; padding: 14px 6px; border-radius: 16px; background: #f6f7fc; }
.pstep .e { font-size: 26px; }
.pstep b { display: block; font-size: 13.5px; margin-top: 4px; }
.pstep small { color: var(--muted); font-size: 11.5px; }
.parrow { color: #c7cbe0; font-weight: 800; flex: none; }
.algo { background: #fff; border-radius: var(--r); padding: 26px; box-shadow: var(--shadow); border-top: 5px solid var(--c); }
.algo h3 { font-size: 20px; margin: 10px 0 4px; }
.algo .analogy { background: #f6f7fc; border-radius: 14px; padding: 12px 14px; margin: 12px 0; font-size: 14px; color: var(--ink-2); }
.algo details { margin-top: 10px; }
.algo summary { cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--primary); }
.formula { font-family: var(--mono); font-size: 13px; background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 12px; margin-top: 10px; line-height: 1.8; }
.algo ul { list-style: none; display: grid; gap: 6px; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.algo li::before { content: "✓ "; color: var(--green); font-weight: 800; }
.gloss { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.gloss div { padding: 14px 16px; border-radius: 14px; background: #f6f7fc; font-size: 13.5px; color: var(--ink-2); }
.gloss b { display: block; color: var(--ink); font-size: 14.5px; margin-bottom: 2px; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { color: var(--ink-2); margin-top: 6px; font-size: 14px; }

.footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 30px 0 40px; border-top: 1px solid var(--line); font-size: 14px; }

#tip { position: fixed; z-index: 100; pointer-events: none; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; background: var(--ink); color: #fff;
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; max-width: 260px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4); }
#tip.show { opacity: 1; transform: none; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); z-index: 200; padding: 12px 20px; border-radius: 14px; background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 600; opacity: 0; transition: .3s; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.loader { position: fixed; inset: 0; z-index: 300; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--bg); font-weight: 700; color: var(--muted); transition: opacity .4s; }
.loader.done { opacity: 0; pointer-events: none; }
.spin { width: 44px; height: 44px; border-radius: 50%; border: 4px solid #e0e3f0; border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .check-grid { grid-template-columns: 1fr; }
  .wizard { position: static; }
  .model-cmp, .grid4, .facts, .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .links { display: none; position: absolute; top: 64px; left: 12px; right: 12px; flex-direction: column; background: #fff; padding: 10px; border-radius: 18px; box-shadow: var(--shadow-lg); margin: 0; }
  .links.open { display: flex; }
  .nav-cta { display: none; }
  .menu { display: flex; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-3d { height: 380px; order: -1; }
  .steps, .models, .grid2 { grid-template-columns: 1fr; }
  .verdict-row { grid-template-columns: 1fr; text-align: center; }
  .card3d { height: 200px; }
  .votes { grid-template-columns: 1fr; }
  .page-top h1 { font-size: 32px; }
}
@media (max-width: 560px) {
  .model-cmp, .grid4, .facts, .kpis { grid-template-columns: 1fr; }
  .tiles.grades { grid-template-columns: repeat(4, 1fr); }
  .exp .ctl { grid-template-columns: 1fr 60px; }
  .exp .ctl span { grid-column: 1 / -1; }
  .cta-band { padding: 30px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }
