/* Investing 101 — deck styles.
   Design system is fixed (see PLAN.md §3): Wealthsimple dark mode, Jost, bento tiles. */

:root {
  --bg: #161413;
  --tile: #23211F;
  --tile-2: #2E2C2A;
  --stroke: #383532;
  --ink: #FCFCFC;
  --sub: #A6A29E;
  --green: #9CCB63;
  --steel: #B5C9DB;
  --red: #F4705F;
  --gold: #E3A35A;
  --purple: #33263A;
  --greenT: #26301F;
  --steelT: #252E38;
  --goldT: #3A2E24;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; overflow: hidden; }
body { background: var(--bg); color: var(--ink); font: 400 17px/1.45 "Jost", "Futura PT", "Futura", sans-serif; -webkit-font-smoothing: antialiased; }
#stage { position: fixed; left: 0; top: 0; transform-origin: 0 0; }
button { font: inherit; color: inherit; }
a { color: var(--ink); text-decoration-color: rgba(252, 252, 252, .35); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.022em; line-height: 1; }
h1 { font-size: 90px; }
h2 { font-size: 48px; }
h3 { font-size: 22px; letter-spacing: -.015em; line-height: 1.1; }
h4 { font-size: 17px; letter-spacing: -.01em; line-height: 1.2; }
.lab { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sub); }
.lede { font-size: 19px; color: #CFCBC6; max-width: 44em; line-height: 1.4; }
.money { font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.chip { display: inline-block; font-size: 13px; font-weight: 500; padding: 3px 9px; border-radius: 7px; background: var(--tile-2); color: #DDD9D4; white-space: nowrap; }
.chip.pos { background: rgba(156, 203, 99, .16); color: var(--green); }
.chip.neg { background: rgba(244, 112, 95, .15); color: var(--red); }
.chip.ink { background: var(--ink); color: #1B1918; }
.chip.gold { background: rgba(227, 163, 90, .16); color: var(--gold); }
.muted { color: var(--sub); }
.pos-t { color: var(--green); } .neg-t { color: var(--red); }
.tbd { display: inline-block; border: 1.5px dashed var(--gold); color: var(--gold); border-radius: 7px; padding: 0 7px; font-size: .85em; font-weight: 500; }

/* "still" mode for screenshots: no motion at all */
.still *, .still *::before, .still *::after { transition: none !important; animation: none !important; }

/* ---------- top bar ---------- */
.bar { position: absolute; z-index: 10; top: 18px; left: 50%; transform: translateX(-50%); width: min(1320px, calc(100% - 48px)); height: 58px; padding: 0 10px 0 22px; display: flex; align-items: center; gap: 22px; background: rgba(35, 33, 31, .86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--stroke); border-radius: 16px; overflow: hidden; }
.mark { font-size: 21px; font-weight: 700; letter-spacing: -.03em; white-space: nowrap; background: none; border: 0; padding: 0; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.mark .k { font-size: 11px; font-weight: 600; color: var(--sub); border: 1px solid #5A5652; border-radius: 5px; padding: 1px 6px; letter-spacing: 0; transition: color .3s, border-color .3s; }
.mark:hover .k { color: var(--ink); border-color: var(--ink); }
.tabs { display: flex; gap: 2px; flex: 1; min-width: 0; }
.tabs button { border: 0; background: none; cursor: pointer; font-size: 15px; font-weight: 500; color: var(--sub); padding: 8px 11px; border-radius: 10px; transition: color .3s, background .3s; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); background: var(--tile-2); }
.count { font-size: 14px; color: var(--sub); font-variant-numeric: tabular-nums; white-space: nowrap; }
.round { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1.5px solid #5A5652; background: none; cursor: pointer; font-size: 16px; transition: .3s var(--ease); }
.round:hover { border-color: var(--ink); transform: scale(1.06); }
.round:disabled { opacity: .3; pointer-events: none; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--ink); color: #1B1918; font-size: 15px; font-weight: 600; cursor: pointer; transition: transform .35s var(--ease), background .2s; white-space: nowrap; text-decoration: none; }
.pill:hover { transform: scale(1.04); background: #fff; }
.pill.lg { height: 54px; padding: 0 30px; font-size: 17px; }
.pill.sm { height: 34px; padding: 0 15px; font-size: 14px; }
.pill.ghost { background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px #5A5652; }
.pill.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); background: none; }
.pill:disabled { opacity: .3; pointer-events: none; }
.prog { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--ink); transition: width .8s var(--ease); }

/* ---------- deck ---------- */
.slide { position: absolute; inset: 0; padding: 94px 24px 22px; display: flex; align-items: center; justify-content: center; overflow-y: auto; opacity: 0; pointer-events: none; transform: translateX(48px); transition: opacity .4s ease, transform .7s var(--ease); }
.slide.left { transform: translateX(-48px); }
.slide.active { opacity: 1; pointer-events: auto; transform: none; }
.wrap { width: 100%; max-width: 1320px; margin: auto; }
[data-a] { opacity: 0; transform: translateY(20px) scale(.985); transition: opacity .25s ease, transform .25s ease; }
.slide.active [data-a] { opacity: 1; transform: none; transition: opacity .7s ease, transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms + 160ms); }

.tile { background: var(--tile); border-radius: 22px; padding: 22px 24px; position: relative; overflow: hidden; }
.tile.purple { background: var(--purple); } .tile.greenT { background: var(--greenT); } .tile.steelT { background: var(--steelT); } .tile.goldT { background: var(--goldT); }
.tile.raised { background: var(--tile-2); }
.head { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; margin-bottom: 18px; }
.head h2 { margin: 12px 0 12px; max-width: 22em; }
.head .lede:last-child { margin-bottom: 0; }
.bento { display: grid; grid-template-columns: 370px repeat(3, 1fr); gap: 14px; }
.bento .side { grid-row: span 2; }
.bento .wide { grid-column: span 3; }
.g2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.g5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.split { display: grid; grid-template-columns: 370px 1fr; gap: 14px; }
.stack { display: grid; gap: 14px; align-content: start; }
.fill-h { height: 100%; }
.col { display: flex; flex-direction: column; }
.col > .push { margin-top: auto; }

/* ---------- wells and illustrations ---------- */
.well { border-radius: 20px; display: grid; place-items: center; overflow: hidden; }
.well img { filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .35)); }
.w-purple { background: radial-gradient(circle at 50% 30%, #4B3A52, #2E2233); }
.w-green { background: radial-gradient(circle at 50% 30%, #3C4A30, #232C1D); }
.w-steel { background: radial-gradient(circle at 50% 30%, #3A4857, #222A33); }
.w-gold { background: radial-gradient(circle at 50% 30%, #55402F, #33271F); }
.w-rose { background: radial-gradient(circle at 50% 30%, #553443, #331F28); }
.w-teal { background: radial-gradient(circle at 50% 30%, #2F4A4A, #1C2C2C); }
.w-grey { background: radial-gradient(circle at 50% 30%, #3D3A37, #262422); }
.ill { position: absolute; pointer-events: none; filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .4)); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 20px; }
.hero h1 { margin: 0 0 24px; }
.hero h1 .with { display: block; font-size: .46em; font-weight: 500; letter-spacing: -.01em; color: var(--sub); margin-top: .35em; }
.hero .cta { display: flex; align-items: center; gap: 18px; margin-top: 30px; color: var(--sub); font-size: 14px; }
kbd { font: 600 12px "Jost", sans-serif; border: 1px solid #5A5652; border-radius: 6px; padding: 2px 7px; color: var(--ink); }
.ringbox { display: grid; place-items: center; height: 380px; }
.ringbox img { width: 420px; max-width: 100%; animation: spin 90s linear infinite; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .45)); }
@keyframes spin { to { transform: rotate(360deg); } }
.strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin-top: 26px; }
.chap { display: flex; flex-direction: column; justify-content: flex-start; text-align: left; border: 0; cursor: pointer; background: none; padding: 0; transition: opacity .4s; }
.chap .well { height: 104px; transition: transform .6s var(--ease); }
.chap .well img { height: 76px; transition: transform .7s var(--ease); }
.chap:hover .well img { transform: translateY(-5px) scale(1.07) rotate(-3deg); }
.chap .n { display: block; font-size: 12px; font-weight: 600; color: var(--sub); margin: 12px 0 4px; letter-spacing: .08em; }
.chap h3 { font-size: 18px; }
.chap p { font-size: 13.5px; color: var(--sub); line-height: 1.3; margin-top: 4px; }
.chap.dim { opacity: .35; }

/* ---------- controls ---------- */
.field { margin-top: 20px; }
.field:first-of-type { margin-top: 14px; }
.field label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; color: var(--sub); margin-bottom: 10px; }
.field output { font-size: 22px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.field.tight { margin-top: 14px; }
.field.tight label { margin-bottom: 8px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--ink) var(--p, 50%), #4A4744 var(--p, 50%)); outline: none; cursor: pointer; display: block; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 5px rgba(252, 252, 252, .12); transition: box-shadow .25s, transform .25s var(--ease); }
input[type=range]::-webkit-slider-thumb:hover, input[type=range]:active::-webkit-slider-thumb { box-shadow: 0 0 0 9px rgba(252, 252, 252, .16); transform: scale(1.08); }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--green); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--ink); }
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--tile-2); border-radius: 12px; padding: 4px; }
.seg button { position: relative; z-index: 1; border: 0; background: none; cursor: pointer; font-size: 15px; font-weight: 500; color: var(--sub); padding: 8px 4px; transition: color .3s; white-space: nowrap; }
.seg button.on { color: #1B1918; }
.seg button:hover:not(.on) { color: var(--ink); }
.seg i { position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 9px; background: var(--ink); transition: transform .5s var(--ease), width .5s var(--ease); }
.ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--sub); margin-top: 10px; }

/* tappable option tiles */
.opt { display: block; width: 100%; text-align: left; border: 0; cursor: pointer; background: var(--tile); border-radius: 18px; padding: 18px 20px; color: var(--ink); font-size: 18px; font-weight: 500; line-height: 1.25; transition: background .3s, transform .45s var(--ease), color .3s; }
.opt:hover { background: var(--tile-2); transform: translateY(-2px); }
.opt.on { background: var(--ink); color: #1B1918; }
.opt small { display: block; color: var(--sub); font-size: 14.5px; font-weight: 400; margin-top: 4px; transition: color .3s; }
.opt.on small { color: #5A5652; }
.opt .chip { margin-bottom: 8px; }
.opt.on .chip { background: #E8E4DF; color: #1B1918; }

/* master / detail list */
.mlist { display: grid; gap: 8px; align-content: start; }
.mitem { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; cursor: pointer; background: var(--tile); border-radius: 16px; padding: 14px 16px; font-size: 16.5px; font-weight: 500; color: #E2DED9; transition: background .3s, color .3s, transform .45s var(--ease); }
.mitem:hover { background: var(--tile-2); color: var(--ink); }
.mitem.on { background: var(--ink); color: #1B1918; }
.mitem .num { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--tile-2); color: var(--sub); transition: .3s; }
.mitem.on .num { background: #1B1918; color: var(--ink); }
.mitem .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-left: auto; }
.detail { animation: rise .55s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* flip cards */
.flip { display: block; width: 100%; perspective: 1400px; cursor: pointer; border: 0; background: none; padding: 0; text-align: left; color: inherit; }
.flip .in { position: relative; width: 100%; height: 100%; transition: transform .85s var(--ease); transform-style: preserve-3d; }
.flip.on .in { transform: rotateY(180deg); }
.flip .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 22px; padding: 24px; overflow: hidden; display: flex; flex-direction: column; }
.flip .back { transform: rotateY(180deg); background: var(--tile-2); }
.flip .hint { margin-top: auto; font-size: 13px; color: var(--sub); }

/* definition callout */
.def { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; border-bottom: 1.5px dotted var(--sub); line-height: 1.2; }
.def:hover { border-bottom-color: var(--ink); }
.pop { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .6s var(--ease), opacity .4s, margin .6s var(--ease); }
.pop.open { max-height: 200px; opacity: 1; margin-top: 12px; }
.pop > div { background: var(--tile-2); border-radius: 14px; padding: 14px 16px; font-size: 15px; line-height: 1.4; color: #DDD9D4; }

/* ---------- numbers & charts ---------- */
.big { font-size: 60px; margin: 4px 0 6px; }
.mid { font-size: 36px; margin-top: 6px; }
.sm-n { font-size: 26px; margin-top: 4px; }
.row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.row.c { align-items: center; }
svg { display: block; width: 100%; height: auto; overflow: visible; }
svg text { font: 500 12px "Jost", sans-serif; fill: #8C8884; }
svg text.lbl { font-size: 13px; font-weight: 600; }
.chartbox { position: relative; margin-top: 8px; }
.tip { position: absolute; top: 0; left: 0; pointer-events: none; background: var(--ink); color: #1B1918; border-radius: 12px; padding: 9px 13px; font-size: 13px; line-height: 1.4; white-space: nowrap; opacity: 0; transition: opacity .2s; z-index: 2; }
.tip b { font-size: 18px; font-weight: 700; display: block; }
.say { font-size: 16px; line-height: 1.4; color: #E6DDEA; margin-top: 8px; }
.say b { color: #fff; font-weight: 600; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--sub); flex-wrap: wrap; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.note { font-size: 12.5px; color: #77736F; margin-top: 12px; line-height: 1.4; }
.note a { color: #8E8984; }
.note.src { margin-top: 10px; }

.hbar { display: flex; gap: 3px; height: 44px; }
.hbar > div { flex: 0 0 0; min-width: 0; border-radius: 9px; transition: flex-grow .8s var(--ease), background .4s; overflow: hidden; display: flex; align-items: center; padding: 0 10px; font-size: 13px; font-weight: 600; white-space: nowrap; color: #1B1918; }
.keyrows { margin-top: 12px; }
.keyrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--stroke); font-size: 15px; }
.keyrow:last-child { border-bottom: 0; }
.keyrow i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.keyrow span { color: var(--sub); }
.keyrow b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.keyrow.total { border-top: 1px solid #5A5652; border-bottom: 0; margin-top: 2px; }
.keyrow.total span { color: var(--ink); }

.hold { display: flex; gap: 3px; height: 40px; margin-top: 12px; }
.hold div { border-radius: 8px; transition: flex-grow .8s var(--ease), opacity .4s; min-width: 0; }
.hold .st { background: var(--steel); } .hold .bd { background: #55626F; }
.holdlab { display: flex; justify-content: space-between; font-size: 14px; color: var(--sub); margin-top: 8px; }
.holdlab b { color: var(--ink); font-weight: 600; }
.list { margin-top: 16px; border-top: 1px solid var(--stroke); }
.list > div, .list > button { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 11px 0; border: 0; border-bottom: 1px solid var(--stroke); background: none; font-size: 15px; text-align: left; }
.list > button { cursor: pointer; transition: padding .3s var(--ease); }
.list > button:hover { padding-left: 6px; }
.list span { color: var(--sub); }
.rline { fill: none; stroke: #4D4946; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0s, stroke .5s, stroke-width .5s; }
.slide.active .rline { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s var(--ease) .35s, stroke .5s, stroke-width .5s; }
.rline.on { stroke: var(--green); stroke-width: 3.5; }
.rarea { opacity: 0; transition: opacity .3s; } .slide.active .rarea { opacity: 1; transition: opacity 1s ease 1.2s; }
.rdot { transition: transform .7s var(--ease); }
.arc { transition: stroke-dasharray .9s var(--ease), stroke-dashoffset .9s var(--ease), stroke .4s; }

/* ---------- buckets ---------- */
.buckets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.bucket { height: 300px; display: flex; flex-direction: column; opacity: .5; transition: opacity .5s, transform .6s var(--ease); }
.bucket.lit { opacity: 1; } .bucket.now { transform: translateY(-8px); }
.fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; transition: height .8s var(--ease); }
.bucket > * { position: relative; }
.bucket > .fill { position: absolute; }
.bucket h3 { font-size: 23px; margin: 10px 0 6px; }
.bucket p { font-size: 14px; color: #D8D4CF; line-height: 1.35; }
.bucket .amt { margin-top: auto; font-size: 24px; }
.bucket .amt .x2 { display: block; font-size: 13.5px; font-weight: 500; margin-top: 4px; opacity: .85; }
.bucket .amt small { font-size: 14px; font-weight: 500; opacity: .75; }
.bucket .chip.now-chip { position: absolute; top: 18px; right: 18px; background: var(--ink); color: #1B1918; opacity: 0; transform: translateY(6px); transition: .4s var(--ease); }
.bucket.now .chip.now-chip { opacity: 1; transform: none; }

/* ---------- roadmap ---------- */
.overlay { position: absolute; inset: 0; z-index: 30; background: rgba(22, 20, 19, .94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.overlay.open { opacity: 1; pointer-events: auto; }
.overlay > .wrap { transform: translateY(16px) scale(.99); transition: transform .6s var(--ease); }
.overlay.open > .wrap { transform: none; }
.maphead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.maphead .btns { display: flex; gap: 10px; align-items: center; }
.map { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mch { background: var(--tile); border-radius: 22px; padding: 16px 18px 12px; transition: opacity .45s, box-shadow .45s; }
.mch.hi { box-shadow: inset 0 0 0 1.5px var(--green); }
.mch.dim { opacity: .42; }
.mch .top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; width: 100%; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.mch .top img { width: 42px; height: 42px; object-fit: contain; flex: none; }
.mch .top h3 { font-size: 18px; }
.mch .top .meta { font-size: 12.5px; color: var(--sub); margin-top: 3px; }
.mch ol { list-style: none; padding: 0; margin: 0; }
.mapslide { display: flex; align-items: baseline; gap: 8px; width: calc(100% + 16px); margin: 0 -8px; text-align: left; background: none; border: 0; cursor: pointer; padding: 3.5px 8px; border-radius: 8px; font-size: 14.5px; line-height: 1.25; color: #D8D4CF; transition: background .25s, color .25s; }
.mapslide:hover { background: var(--tile-2); color: var(--ink); }
.mapslide.cur { background: var(--ink); color: #1B1918; }
.mapslide .n { width: 18px; flex: none; font-size: 12px; color: var(--sub); font-variant-numeric: tabular-nums; }
.mapslide.cur .n { color: #66615C; }
.mapslide .q { margin-left: auto; font-size: 11px; color: var(--sub); }
.mapslide.cur .q { color: #66615C; }

/* ---------- credit cards ---------- */
.cc { aspect-ratio: 1.586; border-radius: 16px; padding: 16px 18px; position: relative; color: #fff; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 22px 40px -22px rgba(0, 0, 0, .8); overflow: hidden; transition: transform .6s var(--ease); }
.cc::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 42%); pointer-events: none; }
.cc .cn { font-weight: 600; font-size: 15px; letter-spacing: -.01em; line-height: 1.15; max-width: 75%; }
.cc .cchip { width: 34px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, #EADBB0, #B89B5E); opacity: .9; }
.cc .net { position: absolute; right: 16px; bottom: 13px; font-weight: 700; font-size: 15px; font-style: italic; letter-spacing: -.01em; opacity: .9; }
.cc .iss { position: absolute; right: 16px; top: 15px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }

/* ---------- persona focus rows ---------- */
.frows { margin-top: 6px; }
.frow { display: flex; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--stroke); transition: opacity .45s; }
.frow:last-child { border-bottom: 0; }
.frow img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.frow h4 { font-size: 17px; }
.frow small { display: block; color: var(--sub); font-size: 13.5px; margin-top: 3px; }
.frow .chip { margin-left: auto; opacity: 0; transform: translateX(6px); transition: .45s var(--ease); }
.frow.hi .chip { opacity: 1; transform: none; }
.frow.dim { opacity: .38; }

/* ---------- chapter 1 components ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 16px; }
.kpi span { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--sub); }
.kpi i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.kpi b { display: block; font-size: 24px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi small { color: var(--sub); font-size: 13px; }

.prompt { position: relative; background: var(--tile-2); border-radius: 14px; padding: 14px 16px 14px 16px; font-size: 15px; line-height: 1.45; color: #E6E2DD; margin-top: 12px; }
.prompt .pill { position: absolute; right: 10px; bottom: 10px; }
.privacy { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 14px; color: #DCD3C0; background: rgba(227, 163, 90, .1); border-radius: 12px; padding: 10px 14px; }
.privacy b { color: var(--gold); font-weight: 600; white-space: nowrap; }

.tri { position: relative; height: 112px; display: flex; gap: 4px; margin-top: 16px; touch-action: none; user-select: none; }
.tri > div { border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; transition: flex-basis .6s var(--ease); flex: 0 0 auto; min-width: 0; }
.tri.dragging > div { transition: none; }
.tri .t1 { background: #3A4857; } .tri .t2 { background: #4B3A52; } .tri .t3 { background: #57793F; }
.tri .nm { font-size: 14px; font-weight: 600; white-space: nowrap; }
.tri .pc { font-size: 34px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.tri .am { font-size: 13.5px; color: rgba(255, 255, 255, .78); white-space: nowrap; }
.tri .h { position: absolute; top: -8px; bottom: -8px; width: 18px; margin-left: -9px; border-radius: 9px; border: 0; background: var(--ink); cursor: ew-resize; z-index: 2; box-shadow: 0 0 0 5px rgba(252, 252, 252, .12); transition: box-shadow .25s, left .6s var(--ease); }
.tri.dragging .h { transition: box-shadow .25s; }
.tri .h::before { content: ''; position: absolute; left: 7px; top: 50%; width: 4px; height: 26px; margin-top: -13px; border-left: 1.5px solid #8C8884; border-right: 1.5px solid #8C8884; }
.tri .h:hover, .tri .h:focus-visible { box-shadow: 0 0 0 9px rgba(252, 252, 252, .18); outline: none; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; }

.rrow { display: grid; grid-template-columns: 250px 1fr 110px; align-items: center; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--stroke); font-size: 15.5px; }
.rrow:last-child { border-bottom: 0; }
.rrow small { display: block; color: var(--sub); font-size: 12.5px; margin-top: 1px; }
.rrow .rbar { height: 10px; border-radius: 6px; background: var(--tile-2); overflow: hidden; }
.rrow .rbar i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--green); transition: width .9s var(--ease); }
.rrow b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.rrow b small { font-weight: 400; }

.verdict { font-size: 44px; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; margin-top: 6px; transition: color .4s; }
.vs { display: grid; gap: 12px; margin-top: 18px; }
.vs .vb { display: flex; align-items: center; gap: 14px; }
.vs .vb span { width: 190px; font-size: 15px; color: var(--sub); flex: none; }
.vs .vb .track { flex: 1; height: 34px; border-radius: 10px; background: var(--tile-2); overflow: hidden; }
.vs .vb .track i { display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; height: 100%; border-radius: 10px; font-style: normal; font-weight: 700; font-size: 15px; color: #1B1918; transition: width .8s var(--ease); min-width: 52px; }

/* ---------- chapter 2 components ---------- */
.ibars { display: grid; grid-template-columns: repeat(10, 1fr); gap: 10px; align-items: end; margin-top: 14px; height: 116px; }
.ibars > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; }
.ibars b { width: 100%; max-width: 44px; border-radius: 6px 6px 3px 3px; background: #7F95A8; }
.ibars b.hot { background: var(--gold); }
.ibars span { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ibars small { font-size: 12px; color: var(--sub); }

.sfc { display: flex; flex-direction: column; min-height: 372px; transition: background .4s; will-change: transform; }
.sfc.top { background: #2E2C2A; box-shadow: inset 0 0 0 1.5px var(--green); }
.sftags { display: grid; gap: 6px; margin-top: 14px; font-size: 14px; }
.sftags span { display: flex; align-items: center; gap: 8px; color: #DDD9D4; }
.sftags span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.sftags .g::before { background: var(--green); } .sftags .b::before { background: var(--gold); }
.sfend { border-top: 1px solid var(--stroke); padding-top: 12px; margin-top: 14px; }

/* ---------- chapter 3 components ---------- */
.riskdots { display: flex; gap: 6px; }
.riskdots i { width: 22px; height: 8px; border-radius: 4px; background: #4A4744; }
.riskdots i.on { background: var(--gold); }
.riskdots.sm { gap: 3px; } .riskdots.sm i { width: 10px; height: 6px; }

.panel { position: absolute; inset: 22px 24px; opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity .5s ease, transform .7s var(--ease); }
.panel.on { opacity: 1; pointer-events: auto; transform: none; }
.dcenter { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.spinslow { animation: spin 120s linear infinite; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .45)); }
.panel .rrow .rbar i { background: var(--steel); }

.fund { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; min-height: 226px; }
.fund.pick { box-shadow: inset 0 0 0 1.5px var(--green); }
.fund .tk { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.fund .spark { height: 44px; margin-top: 4px; }
.fund .spark path { fill: none; stroke: var(--green); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.fund .fmeta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--sub); }
.fund .fmeta b { color: var(--ink); font-weight: 600; }
.fund .gf { font-size: 14.5px; color: #DDD9D4; line-height: 1.35; margin-top: auto; }

.stk { display: flex; flex-direction: column; gap: 6px; text-align: left; border: 0; cursor: pointer; background: var(--tile); border-radius: 16px; padding: 13px 15px; min-height: 118px; transition: background .3s, transform .45s var(--ease), box-shadow .3s; color: var(--ink); }
.stk:hover { background: var(--tile-2); }
.stk .tk { font-size: 17px; font-weight: 600; }
.stk small { font-size: 13px; color: var(--sub); line-height: 1.3; }
.stk.on { box-shadow: inset 0 0 0 2px var(--ink); background: var(--tile-2); }
.stk .res { margin-top: auto; font-size: 13.5px; color: var(--sub); opacity: 0; transform: translateY(6px); transition: .5s var(--ease); }
.stk .res b { font-size: 19px; color: var(--ink); margin-right: 4px; }
.stk .res b.pos-t { color: var(--green); } .stk .res b.neg-t { color: var(--red); }
.stk.shown .res { opacity: 1; transform: none; }
.stk.shown small { display: none; }
.slots { display: grid; gap: 8px; margin-top: 12px; }
.slot { border: 1.5px dashed #5A5652; border-radius: 12px; padding: 12px 14px; color: var(--sub); font-size: 15px; transition: .3s; }
.slot.on { border-style: solid; border-color: var(--ink); color: var(--ink); font-weight: 600; }
.sklist { display: grid; gap: 4px; }
.sklist > div { display: grid; grid-template-columns: 112px 1fr 56px; align-items: center; gap: 10px; font-size: 13.5px; padding: 2px 6px; border-radius: 6px; }
.sklist > div.me { background: var(--tile-2); font-weight: 600; }
.sklist > div.idx { border-top: 1px solid var(--stroke); margin-top: 4px; padding-top: 6px; }
.sklist i { height: 8px; border-radius: 4px; display: block; }
.sklist b { text-align: right; font-variant-numeric: tabular-nums; }

.fcols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; height: 100%; }
.fcol { display: flex; flex-direction: column; }
.fstack { height: 226px; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; }
.fstack div { border-radius: 9px; transition: height .8s var(--ease); min-height: 0; }
.fstack .fcore { background: var(--steel); }
.fstack .ffun { background: var(--gold); }
.fcol .chip { align-self: flex-start; margin-top: 8px; }

.ask { position: absolute; left: 50%; top: 50%; width: 520px; transform: translate(-50%, -40%); background: var(--tile-2); border-radius: 20px; padding: 22px 24px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7); opacity: 0; pointer-events: none; transition: opacity .4s, transform .6s var(--ease); }
.ask.on { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.ask h3 { font-size: 20px; line-height: 1.3; }

/* ---------- chapter 4 components ---------- */
.acc { padding: 16px 16px 20px; }
.acc h2 { color: inherit; }
.acc.on .chip { background: #E8E4DF; color: #1B1918; }
.tbars { display: grid; grid-template-columns: repeat(18, 1fr); gap: 6px; align-items: end; height: 210px; margin-top: 10px; }
.tbars > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; opacity: .32; transition: opacity .5s; }
.tbars > div.on { opacity: 1; }
.tbars b { width: 100%; border-radius: 6px 6px 3px 3px; background: #4A4744; transition: background .5s; }
.tbars > div.on b { background: var(--green); }
.tbars span { font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tbars small { font-size: 11.5px; color: var(--sub); }

/* ---------- chapter 5: Wealthsimple ---------- */
.glink { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; margin-top: 6px; border-radius: 10px; background: var(--tile-2); font-size: 14.5px; text-decoration: none; transition: background .25s; }
.glink:hover { background: #3A3735; }
.glink span { color: var(--sub); }
.phone { justify-self: center; width: 300px; height: 540px; border-radius: 44px; background: #0B0A0A; padding: 14px; box-shadow: inset 0 0 0 2px #3A3735, 0 30px 60px -30px rgba(0, 0, 0, .9); position: relative; }
.phone .notch { position: absolute; left: 50%; top: 22px; width: 84px; height: 22px; border-radius: 12px; background: #000; transform: translateX(-50%); z-index: 2; }
.ms { height: 100%; border-radius: 32px; background: #F7F5F2; color: #1B1918; padding: 64px 20px 20px; overflow: hidden; font-size: 14px; }
.ms .muted { color: #77736F; }
.ms-h { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 14px; }
.ms-f { border: 1.5px solid #DDD8D2; border-radius: 12px; padding: 12px 14px; margin-top: 10px; color: #8C8884; }
.ms-btn { margin-top: 22px; background: #1B1918; color: #fff; text-align: center; border-radius: 999px; padding: 13px; font-weight: 600; }
.ms-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid #E6E1DB; }
.ms-row b { display: block; font-weight: 600; font-size: 15px; }
.ms-row small { display: block; color: #77736F; font-size: 12.5px; }
.ms-pill { background: #1B1918; color: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; }
.ms-amt { font-size: 44px; font-weight: 700; letter-spacing: -.02em; text-align: center; margin: 18px 0 8px; }
.ms-seg { display: grid; grid-template-columns: 1fr 1fr; background: #E9E5E0; border-radius: 10px; padding: 3px; font-size: 13px; text-align: center; }
.ms-seg span { padding: 6px; border-radius: 8px; color: #77736F; }
.ms-seg .on { background: #fff; color: #1B1918; font-weight: 600; }
.ms svg path { vector-effect: non-scaling-stroke; }

.paydays { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 16px; }
.pd { background: var(--tile-2); border-radius: 16px; padding: 14px 16px; }
.pd .st { display: flex; align-items: center; gap: 10px; font-size: 14.5px; padding: 7px 0; opacity: .45; animation: stepOn 3.2s var(--d, 0s) infinite; }
.pd .st i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.pd .s1 i { background: var(--steel); } .pd .s2 i { background: var(--gold); } .pd .s3 i { background: var(--green); }
.pd .s2 { animation-delay: calc(var(--d, 0s) + .25s); } .pd .s3 { animation-delay: calc(var(--d, 0s) + .5s); }
@keyframes stepOn { 0%, 100% { opacity: .45; } 15%, 55% { opacity: 1; } }
.still .pd .st { opacity: 1; }

/* ---------- chapter 6: cards ---------- */
.ccstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.ccpick { border: 0; background: none; padding: 0; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.ccpick .cc { width: 100%; padding: 11px 12px; border-radius: 11px; transition: transform .55s var(--ease), box-shadow .4s; }
.ccpick .cc .cn { font-size: 12.5px; } .ccpick .cc .iss { font-size: 8.5px; top: 10px; right: 11px; } .ccpick .cc .net { font-size: 11px; right: 11px; bottom: 9px; } .ccpick .cc .cchip { width: 22px; height: 17px; border-radius: 4px; }
.ccpick:hover .cc { transform: translateY(-4px) rotate(-1.5deg); }
.ccpick.on .cc { transform: translateY(-6px); box-shadow: 0 0 0 2.5px var(--ink), 0 22px 40px -22px rgba(0, 0, 0, .8); }
.cc.lg { width: 100%; max-width: 330px; padding: 22px 24px; border-radius: 18px; }
.cc.lg .cn { font-size: 20px; } .cc.lg .iss { font-size: 12px; top: 20px; right: 22px; } .cc.lg .net { font-size: 19px; right: 22px; bottom: 18px; } .cc.lg .cchip { width: 44px; height: 33px; }
.gad { display: grid; grid-template-columns: 330px 1fr 1fr; gap: 32px; }
.gafacts { display: grid; gap: 10px; align-content: start; }
.gafacts p:not(.lab):not(.note) { font-size: 14px; color: #DDD9D4; margin-top: 3px; line-height: 1.35; }
.cc.xs { width: 64px; padding: 0; border-radius: 6px; box-shadow: none; }
.cc.xs > * { display: none; }

.pklist { display: grid; gap: 6px; margin-top: 12px; }
.pkrow { background: var(--tile-2); border-radius: 14px; overflow: hidden; }
.pkhead { display: grid; grid-template-columns: 22px 64px 240px 1fr 86px 110px; align-items: center; gap: 14px; width: 100%; border: 0; background: none; cursor: pointer; padding: 9px 14px; text-align: left; }
.pkn { font-size: 13px; color: var(--sub); font-weight: 600; }
.pkname { font-size: 15px; font-weight: 600; line-height: 1.2; }
.pkname small { display: block; font-size: 12.5px; color: var(--sub); font-weight: 400; margin-top: 2px; }
.pkbar { height: 10px; border-radius: 6px; background: #3A3735; overflow: hidden; }
.pkbar i { display: block; height: 100%; border-radius: 6px; transition: width .8s var(--ease); }
.pkhead b { text-align: right; font-size: 18px; font-variant-numeric: tabular-nums; }
.pkm { font-size: 12.5px; color: var(--sub); text-align: right; }
.pkrow.open .pkm { color: var(--ink); }
.pkmath { display: none; flex-wrap: wrap; gap: 6px 18px; padding: 2px 14px 12px 114px; font-size: 13px; color: #CFCBC6; }
.pkrow.open .pkmath { display: flex; }

/* ---------- chapter 7: wrap-up ---------- */
.plrow { display: grid; grid-template-columns: 26px 1fr auto; gap: 16px; align-items: center; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--stroke); background: none; cursor: pointer; padding: 13px 0; }
.plrow:last-child { border-bottom: 0; }
.plrow h4 { font-size: 17px; }
.plrow p { font-size: 13.5px; color: var(--sub); margin-top: 3px; line-height: 1.35; }
.plrow b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.plrow .box { width: 24px; height: 24px; border-radius: 8px; box-shadow: inset 0 0 0 1.5px #5A5652; transition: .3s; position: relative; }
.plrow.done .box { background: var(--green); box-shadow: none; }
.plrow.done .box::after { content: ''; position: absolute; left: 8px; top: 4px; width: 6px; height: 11px; border: solid #1B1918; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.plrow.done h4, .plrow.done b { color: var(--sub); text-decoration: line-through; text-decoration-color: #5A5652; }

.audit [data-a] { transform: none !important; }
.ccpick .cc .net { display: none; }

/* Hidden slides must never take clicks, even if a child sets pointer-events (e.g. .panel.on). */
.slide:not(.active), .slide:not(.active) * { pointer-events: none !important; }

/* marker under a slider track, e.g. where the Autodesk match maxes out */
.rmark { position: relative; height: 18px; }
.rmark span { position: absolute; top: 8px; transform: translateX(-50%); font-size: 11.5px; font-weight: 600; color: var(--gold); white-space: nowrap; transition: left .5s var(--ease); }
.rmark span::before { content: ''; position: absolute; left: 50%; top: -12px; width: 2px; height: 9px; margin-left: -1px; border-radius: 1px; background: var(--gold); }

.inmark { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 2px dashed rgba(252, 252, 252, .55); transition: left .7s var(--ease); pointer-events: none; }
.inmark span { position: absolute; bottom: -24px; left: 0; transform: translateX(-50%); font-size: 12px; color: var(--sub); white-space: nowrap; }
.tiers { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tiers span { font-size: 13.5px; color: #DDD9D4; background: var(--tile-2); border-radius: 8px; padding: 5px 10px; }
.tiers b { color: var(--green); }
