/* home page only - shared pieces live in style.css */

/* fact strip under the header */
.fact-strip { border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.fact-strip .wrap { display: flex; gap: 32px; justify-content: center; overflow-x: auto; white-space: nowrap; padding-top: 9px; padding-bottom: 9px; scrollbar-width: none; }
.fact-strip .wrap::-webkit-scrollbar { display: none; }
.fact-strip b { color: var(--ink); font-weight: 600; margin-left: 6px; font-variant-numeric: tabular-nums; }

/* hero */
.h-hero { position: relative; isolation: isolate; text-align: center; padding-top: 56px; }
.h-hero::before { content: ""; position: absolute; z-index: -1; left: 50%; top: -40px; width: min(1400px, 140vw); height: 820px; transform: translateX(-50%); pointer-events: none;
  background:
    radial-gradient(38% 42% at 22% 28%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%),
    radial-gradient(32% 40% at 80% 22%, color-mix(in srgb, #4f7cff 15%, transparent), transparent 70%),
    radial-gradient(30% 36% at 55% 78%, color-mix(in srgb, #f5a524 11%, transparent), transparent 70%); }
.tool-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 26px; }
.tool-chips a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 9px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; backdrop-filter: blur(6px); transition: border-color .15s, transform .15s; }
.tool-chips a:hover { border-color: var(--accent); transform: translateY(-1px); }
.tool-chips svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.h-hero h1 { font: 750 clamp(40px, 6.4vw, 74px)/1.03 var(--display); letter-spacing: -2.2px; margin: 0 auto 18px; max-width: 14ch; }
.h-hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), #2fb5a0 60%, #4f7cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-hero .lede { color: var(--muted); font-size: clamp(17px, 2vw, 20px); max-width: 50ch; margin: 0 auto 30px; }
.h-hero .btns { justify-content: center; }
.pill .arr { transition: transform .15s; }
.pill:hover .arr { transform: translateY(2px); }

/* hero demo: an app window replaying a sample day */
.demo { max-width: 1000px; margin: 52px auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; text-align: left; box-shadow: 0 50px 90px -45px rgba(10, 60, 45, .45), 0 2px 8px rgba(20, 30, 50, .05); }
.demo-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg-soft); font-size: 13px; }
.demo-bar .dots { display: flex; gap: 6px; margin-right: 4px; }
.demo-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.demo-title { font-weight: 600; }
.demo-badge { font-size: 11px; font-weight: 700; letter-spacing: .6px; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 3px 9px; }
.demo-clock { margin-left: auto; font: 700 16px/1 var(--mono); font-variant-numeric: tabular-nums; }
.demo-btn { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); cursor: pointer; display: grid; place-items: center; font-size: 11px; }
.demo-btn[hidden] { display: none; }
.demo-body { display: grid; grid-template-columns: 1fr 290px; }
.demo-chart { padding: 14px 16px 10px; border-right: 1px solid var(--line); min-width: 0; }
.demo-chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; margin-bottom: 4px; }
.demo-chart-head b { font-size: 15px; }
.demo-chart-head .up, .demo-chart-head .dn { font-weight: 700; font-variant-numeric: tabular-nums; }
.demo-side { display: flex; flex-direction: column; min-width: 0; }
.demo-panel { padding: 12px 14px; border-bottom: 1px solid var(--line); flex: 1; }
.demo-panel:last-child { border-bottom: 0; }
.demo-panel h4 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); display: flex; justify-content: space-between; }
.d-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; animation: pop .35s ease-out both; }
.d-row b { display: block; font-size: 13px; }
.d-row span { font-size: 11px; color: var(--muted); }
.d-row em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.d-row .open { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; }
.d-empty { font-size: 12px; color: var(--muted); padding: 4px 0; }
.demo-track { height: 4px; background: var(--line); }
.demo-fill { height: 100%; width: 0; background: var(--accent); transition: width .25s linear; }
.demo-note { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* candles (hero demo + chart tool) */
.candles { display: block; width: 100%; height: auto; overflow: visible; }
.candles .cu { fill: var(--up); } .candles .cuw { stroke: var(--up); stroke-width: 1.4; }
.candles .cd { fill: var(--down); } .candles .cdw { stroke: var(--down); stroke-width: 1.4; }
.candles .vw { fill: none; stroke: #e0a100; stroke-width: 1.8; stroke-dasharray: 5 3; }
.candles .mk-sig, .candles .mk-buy { fill: var(--ink); }
.candles .mk-ex { fill: none; stroke: var(--ink); stroke-width: 2; }
.candles .gl { stroke: var(--line); stroke-width: 1; }

/* big numbers */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1000px; margin: 64px auto 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.stat { padding: 22px 16px; text-align: center; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font: 750 34px/1.1 var(--display); letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }

/* sections */
.h-section { padding: 104px 0 0; }
.h2c { text-align: center; font: 750 clamp(30px, 4.2vw, 46px)/1.12 var(--display); letter-spacing: -1.2px; margin: 0 0 12px; }
.subc { text-align: center; color: var(--muted); font-size: 18px; margin: 0 auto 28px; max-width: 54ch; }
.badge { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.badge::before, .badge::after { content: ""; height: 1px; width: 80px; background: var(--line); }

/* what's inside: tabs + panels */
.tour-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 30px 0 22px; }
.tour-tab { position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px; padding: 10px 16px 10px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 14px/1 var(--sans); cursor: pointer; transition: border-color .15s; }
.tour-tab:hover { border-color: var(--muted); }
.tour-tab .n { width: 24px; height: 24px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.tour-tab[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tour-tab[aria-selected="true"] .n { background: var(--accent); color: var(--on-accent); }
.tour-tab .bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--accent); }
.tour.auto .tour-tab[aria-selected="true"] .bar { animation: tabfill 11s linear forwards; }
@keyframes tabfill { to { width: 100%; } }
.tour-panel { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 32px; min-height: 470px; }
.tour-panel[hidden] { display: none; }
.tour-panel.show { animation: fadein .4s ease-out; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tp-visual { border-radius: 18px; padding: 28px; display: grid; place-items: center; min-height: 400px; background: radial-gradient(80% 90% at 30% 20%, var(--accent-soft), transparent 70%), var(--bg-soft); }
.tp-visual > * { width: 100%; max-width: 460px; box-shadow: 0 30px 60px -36px rgba(20, 40, 35, .35); }
.tp-text .eyebrow { margin-bottom: 10px; }
.tp-text h3 { font: 750 32px/1.12 var(--display); letter-spacing: -.9px; margin: 0 0 12px; }
.tp-text p { color: var(--muted); font-size: 17px; margin: 0 0 18px; }
.tp-text .pill { margin-top: 22px; }
.ticks { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.ticks li { padding-left: 26px; position: relative; margin-bottom: 9px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 11px; display: grid; place-items: center; margin-top: 2px; }
.w-tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; font-weight: 400; }
.up { color: var(--up); } .dn { color: var(--down); }

/* tool mock-ups */
.win { border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 10px; background: var(--surface); text-align: left; }
.win-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.w-name { font-weight: 600; font-size: 14px; }
.w-name small { color: var(--muted); font-weight: 400; }
.w-chips { display: flex; gap: 5px; }
.w-chips i { font-style: normal; font-size: 11px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; color: var(--muted); }
.win-legend { display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 6px; }
.win-legend .w-tag { margin-left: auto; }
.lg-sig::before { content: "●"; color: var(--ink); margin-right: 5px; }
.lg-ex::before { content: "◇"; color: var(--ink); margin-right: 5px; font-weight: 700; }
.lg-vw::before { content: "- -"; color: #e0a100; margin-right: 5px; font-weight: 700; }

.phone { border: 1px solid var(--line); border-radius: 22px; padding: 14px 14px 6px; background: var(--surface); text-align: left; }
.phone::before { content: ""; display: block; width: 46px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 12px; }
.ph-title { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.rule-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.rule-chips i { font-style: normal; font-size: 11px; border: 1px dashed var(--muted); border-radius: 7px; padding: 2px 7px; }
.ph-row { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.ph-row i { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font: 700 12px/1 var(--sans); font-style: normal; }
.ph-row div { flex: 1; }
.ph-row b, .bk-row b { display: block; font-size: 13px; line-height: 1.35; }
.ph-row span, .bk-row span { font-size: 11px; color: var(--muted); }
.ph-row em, .bk-row em { font-style: normal; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }

.book { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 10px; background: var(--surface); text-align: left; }
.bk-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.bk-row u { text-decoration: none; color: var(--accent); font-weight: 600; }
.bk-foot { margin: 6px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }

.replay { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--surface); text-align: left; }
.rp-time { font: 700 34px/1 var(--mono); letter-spacing: -1px; display: flex; align-items: baseline; gap: 10px; }
.rp-time small { font: 400 12px/1 var(--sans); color: var(--muted); letter-spacing: 0; }
.rp-track { position: relative; height: 6px; border-radius: 6px; background: var(--line); margin: 16px 0 6px; }
.rp-fill { position: absolute; inset: 0 auto 0 0; width: 18%; border-radius: 6px; background: var(--accent); }
.rp-knob { position: absolute; left: 18%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.rp-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.rp-ctrl { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.rp-ctrl i { font-style: normal; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; }
.rp-ctrl .rp-play { background: var(--accent); border-color: var(--accent); color: var(--on-accent); width: 38px; height: 38px; }
.rp-speed { margin-left: auto; display: flex; gap: 4px; }
.rp-speed b { font-size: 11px; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; color: var(--muted); }
.rp-speed b.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.rp-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }

.builder { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: var(--surface); text-align: left; }
.bd-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.bd-k { width: 48px; flex: none; font-size: 12px; color: var(--muted); font-weight: 600; }
.bd-v { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bd-v i { font-style: normal; font-size: 13px; border: 1px dashed var(--muted); border-radius: 8px; padding: 4px 10px; color: var(--ink); background: var(--bg-soft); }
.bd-v b { font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; }
.bd-run { display: block; text-align: center; margin: 10px 0 12px; padding: 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 14px; }
.bd-res { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.bd-res small { display: block; font-size: 11px; color: var(--muted); }
.bd-res b { font-size: 15px; font-variant-numeric: tabular-nums; }
.bd-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

/* calculator */
.h-calc { padding-top: 112px; }
.calc-stage { position: relative; padding: 24px 16px 72px; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; background-position: center top; }
.calc-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 30%, var(--bg) 78%); }
.calc-card { position: relative; z-index: 1; max-width: 460px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: 0 30px 60px -30px rgba(20, 30, 50, .28); }
.calc-card label, .calc-card .lbl { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.calc-card input[type=number] { width: 100%; font: 600 22px/1.2 var(--display); color: var(--ink); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-variant-numeric: tabular-nums; }
.calc-card input[type=number]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.calc-field { margin-bottom: 16px; }
.presets, .seg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.presets button, .seg button { font: 500 13px/1 var(--sans); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.presets button:hover, .seg button:hover { border-color: var(--muted); }
.seg button[aria-pressed="true"], .presets button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bill { width: 100%; border-collapse: collapse; margin: 18px 0 0; font-size: 14px; }
.bill td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.bill td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bill td small { color: var(--muted); }
.bill tr.sum td { font-weight: 700; border-bottom: 0; padding-top: 10px; }
.be { margin-top: 14px; border-radius: 14px; background: var(--accent-soft); padding: 14px 16px; }
.be .be-num { font: 700 30px/1.1 var(--display); color: var(--accent); font-variant-numeric: tabular-nums; }
.be p { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.calc-fine { font-size: 12px; color: var(--muted); margin: 14px 0 0; line-height: 1.5; }

/* dark band */
.h-dark { background: #0b0d10; color: #e9eaee; padding: 96px 0; margin-top: 40px; }
.h-dark .h2c { color: #fff; }
.h-dark .subc { color: #9aa0ab; }
.dark-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; margin-top: 48px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 4px 14px; padding: 16px 0; border-bottom: 1px solid #23272f; }
.steps li:last-child { border-bottom: 0; }
.steps li::before { content: counter(s); grid-row: span 2; width: 32px; height: 32px; border-radius: 10px; background: #15302a; color: #3cc49c; display: grid; place-items: center; font: 700 14px/1 var(--sans); }
.steps b { font-size: 17px; color: #fff; }
.steps span { font-size: 14px; color: #9aa0ab; }
.terminal { background: #15181d; border: 1px solid #262a32; border-radius: 16px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid #262a32; font-size: 12px; color: #7d8390; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2c3038; }
.term-bar span { margin-left: 8px; }
.terminal pre { margin: 0; padding: 18px 20px 22px; font: 13.5px/1.75 var(--mono); color: #c9cdd6; overflow-x: auto; }
.terminal .c { color: #6f7581; } .terminal .g { color: #3cc49c; } .terminal .r { color: #f07b7b; } .terminal .w { color: #fff; }

/* write-ups + sign-in band */
.h-posts { padding: 104px 0 0; }
.h-posts .cards { margin-top: 36px; }
.h-cta { padding: 96px 0; }
.cta-box { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-radius: 28px; padding: 44px 48px; color: #fff;
  background: radial-gradient(60% 120% at 90% 10%, rgba(79, 124, 255, .45), transparent 60%), radial-gradient(70% 120% at 0% 100%, rgba(60, 196, 156, .55), transparent 60%), #0d2b24; }
.cta-box h2 { margin: 0 0 8px; font: 750 32px/1.15 var(--display); letter-spacing: -0.8px; }
.cta-box p { margin: 0; color: rgba(255, 255, 255, .78); max-width: 54ch; }
.cta-box .pill { background: #fff; color: #0d2b24; border-color: #fff; }
.cta-box .pill.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }

/* scroll-in */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .d-row, .tour-panel.show { animation: none; }
  .tour.auto .tour-tab[aria-selected="true"] .bar { animation: none; }
}

@media (max-width: 900px) {
  .fact-strip .wrap { justify-content: flex-start; }
  .demo-body { grid-template-columns: 1fr; }
  .demo-chart { border-right: 0; border-bottom: 1px solid var(--line); }
  .demo-side { flex-direction: row; }
  .demo-panel { border-bottom: 0; border-left: 1px solid var(--line); }
  .demo-panel:first-child { border-left: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tour-panel { grid-template-columns: 1fr; gap: 28px; padding: 22px; min-height: 0; }
  .tp-visual { min-height: 0; padding: 20px; }
  .dark-grid { grid-template-columns: 1fr; gap: 32px; }
  .h-section, .h-posts { padding-top: 80px; }
  .h-calc { padding-top: 88px; }
}

@media (max-width: 560px) {
  .h-hero { padding-top: 36px; }
  .h-hero h1 { letter-spacing: -1.4px; }
  .tool-chips { gap: 6px; margin-bottom: 20px; }
  .tool-chips a { font-size: 12px; padding: 6px 10px 6px 8px; }
  .demo { margin-top: 36px; border-radius: 16px; }
  .demo-title { display: none; }
  .demo-side { flex-direction: column; }
  .demo-panel { border-left: 0; border-top: 1px solid var(--line); }
  .demo-chart { border-bottom: 0; }
  .stat b { font-size: 28px; }
  .tour-tabs { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .tour-tabs::-webkit-scrollbar { display: none; }
  .tour-tab { flex: none; }
  .tp-text h3 { font-size: 26px; }
  .w-chips:not(.toggles) { display: none; }
  .bd-res { grid-template-columns: repeat(2, 1fr); }
  .calc-card { padding: 18px; }
  .calc-stage { padding: 16px 16px 56px; }
  .h-dark { padding: 72px 0; }
  .terminal pre { font-size: 12px; padding: 14px; }
  .cta-box { padding: 30px 22px; }
  .badge::before, .badge::after { width: 28px; }
}

/* AI chart review */
:root { --ai: #6d5dfc; --ai-grad: linear-gradient(120deg, #3cc49c, #4f7cff 50%, #a46bff); }
@media (prefers-color-scheme: dark) { :root { --ai: #9b8cff; } }
.tool-chips a.ai { position: relative; border: 0; padding: 8px 14px 8px 10px; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--ai-grad) border-box; border: 1.5px solid transparent; box-shadow: 0 6px 20px -8px rgba(109, 93, 252, .55); }
.tool-chips a.ai svg { color: var(--ai); }
.tool-chips a.ai sup { font-size: 10px; font-weight: 700; color: #fff; background: var(--ai-grad); border-radius: 999px; padding: 2px 6px; margin-left: 2px; vertical-align: 1px; }
.ai-badge { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 14px; font-weight: 600; color: var(--ai); }
.ai-badge span { color: #fff; background: var(--ai-grad); border-radius: 999px; padding: 4px 10px; font-size: 12px; letter-spacing: .3px; }
.h-ai .h2c { background: linear-gradient(90deg, var(--ink) 30%, var(--ai)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ai-card { position: relative; margin-top: 36px; border-radius: 26px; padding: 1.5px; background: var(--ai-grad); box-shadow: 0 50px 110px -50px rgba(79, 124, 255, .6), 0 20px 60px -40px rgba(60, 196, 156, .5); }
.ai-inner { display: grid; grid-template-columns: 1.35fr 1fr; background: var(--surface); border-radius: 24.5px; overflow: hidden; }
.ai-chart { padding: 18px 18px 14px; min-width: 0; }
.lg-pin::before { content: "1"; display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--ai); color: #fff; font-size: 9px; font-weight: 700; margin-right: 5px; vertical-align: 1px; }
.pin { transform-box: fill-box; transform-origin: center; }
.pin circle { fill: var(--surface); stroke: var(--ai); stroke-width: 2; transition: fill .3s; }
.pin text { font: 700 11px/1 var(--sans); fill: var(--ai); text-anchor: middle; dominant-baseline: central; transition: fill .3s; }
.pin line { stroke: var(--ai); stroke-width: 1.2; stroke-dasharray: 2 2; }
.pin.lit circle { fill: var(--ai); }
.pin.lit text { fill: #fff; }
.pin.pulse { animation: pinpulse .9s ease-out 1; }
@keyframes pinpulse { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.ai-chat { display: flex; flex-direction: column; border-left: 1px solid var(--line); min-width: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--ai) 5%, var(--surface)), var(--surface) 40%); }
.ai-head { display: flex; gap: 9px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ai-head .w-tag { margin-left: auto; }
.ai-dot { width: 26px; height: 26px; border-radius: 8px; background: var(--ai-grad); color: #fff; display: grid; place-items: center; font-size: 13px; }
.ai-log { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 330px; }
.msg { max-width: 94%; font-size: 14px; line-height: 1.55; border-radius: 16px; padding: 10px 13px; }
.msg.me { align-self: flex-end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; box-shadow: 0 10px 30px -22px rgba(30, 40, 80, .4); }
.msg.ai:empty { display: none; }
.msg.ai p { margin: 0 0 7px; }
.msg.ai p:last-child { margin: 0; }
.msg.ai .n { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ai); color: #fff; font-size: 10px; font-weight: 700; margin-right: 6px; vertical-align: 1px; }
.msg.ai .tm { font-weight: 700; margin-right: 4px; }
.msg.ai .typing::after { content: "▍"; color: var(--ai); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.ai-chips button { font: 500 13px/1 var(--sans); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .15s, color .15s; }
.ai-chips button:hover, .ai-chips button[aria-pressed="true"] { border-color: var(--ai); color: var(--ai); }
.ai-cta { justify-content: center; margin-top: 18px; }
.ai-pill { background: var(--ai-grad); border: 0; color: #fff; box-shadow: 0 12px 30px -12px rgba(109, 93, 252, .6); }
.h-ai .demo-note { text-align: center; }
.tour-tab .new { font-size: 10px; font-weight: 700; color: #fff; background: var(--ai-grad); border-radius: 999px; padding: 2px 6px; }
.chat-mock { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.chat-mock .msg { max-width: 100%; }

@media (max-width: 900px) {
  .ai-inner { grid-template-columns: 1fr; }
  .ai-chat { border-left: 0; border-top: 1px solid var(--line); }
  .ai-log { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pin.pulse, .msg.ai .typing::after { animation: none; }
}
.chat-mock .ai-head { padding: 0 0 10px; }

/* live previews in "What's inside" */
.pop { animation: pop .35s ease-out both; }
.w-chips button { font: 500 11px/1 var(--sans); border: 1px solid var(--line); border-radius: 6px; padding: 4px 7px; background: var(--surface); color: var(--muted); cursor: pointer; }
.w-chips button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.lc-wrap { position: relative; }
.lc-wrap svg { cursor: crosshair; touch-action: pan-y; }
.candles .ema { fill: none; stroke: #4f7cff; stroke-width: 1.6; }
.candles .xh { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.lg-ema::before { content: "—"; color: #4f7cff; margin-right: 5px; font-weight: 700; }
.lc-tip { position: absolute; transform: translate(-50%, calc(-100% - 12px)); background: #111418; color: #fff; font-size: 11px; padding: 5px 8px; border-radius: 7px; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .5); }
.lc-tip .up { color: #5ee0b5; } .lc-tip .dn { color: #ff9a9a; }
.live-screen #ls-list { min-height: 230px; }
.ls-foot { margin: 6px 0 4px; font-size: 11px; color: var(--muted); text-align: center; }
.live-book #lp-rows { min-height: 170px; }
.lp-total { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0 2px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.lp-total b { font-size: 18px; font-variant-numeric: tabular-nums; }
.live-replay .rp-time span { font-variant-numeric: tabular-nums; }
.lr-chart { margin: 12px 0 0; }
.rp-track { cursor: pointer; }
.rp-ctrl button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; background: var(--surface); color: var(--ink); cursor: pointer; padding: 0; }
.rp-ctrl button.rp-play { background: var(--accent); border-color: var(--accent); color: var(--on-accent); width: 38px; height: 38px; }
.rp-speed button { width: auto; height: auto; border-radius: 999px; font: 600 11px/1 var(--sans); padding: 4px 8px; color: var(--muted); }
.rp-speed button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
button.bd-run { width: 100%; border: 0; cursor: pointer; font-family: var(--sans); }
button.bd-run:disabled { opacity: .75; cursor: default; }
.bd-prog { margin: -2px 0 12px; }
.bd-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.bd-bar span { display: block; height: 100%; width: 0; background: var(--accent); }
.bd-prog small { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bd-res.done b { animation: pop .4s ease-out both; }
.chat-mock #ai-tab-a { min-height: 90px; }
@media (prefers-reduced-motion: reduce) { .pop, .bd-res.done b { animation: none; } }

/* AI review: replay bar, trade markers, entry card */
.ai-rp { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; }
.ai-rp-btn { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 0; background: var(--ai-grad); color: #fff; cursor: pointer; font-size: 11px; display: grid; place-items: center; }
.ai-rp-clock { font: 700 15px/1 var(--mono); font-variant-numeric: tabular-nums; min-width: 48px; }
.ai-rp-track { flex: 1; height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; }
.ai-rp-track span { display: block; height: 100%; width: 0; background: var(--ai-grad); }
.ai-rp-again { flex: none; font: 600 12px/1 var(--sans); border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 11px; cursor: pointer; }
.ai-rp-again:hover { border-color: var(--ai); color: var(--ai); }
.candles .mk-alert { fill: #f5a524; }
.candles .mk-label { font: 600 10.5px/1 var(--sans); fill: var(--ink); dominant-baseline: middle; }
.candles .mk-label.mid { text-anchor: middle; fill: #d48c00; }
.candles .mk-better { fill: none; stroke: var(--up); stroke-width: 2; stroke-dasharray: 3 2; transform-box: fill-box; transform-origin: center; }
.candles .better-label { fill: var(--up); }
.better.pulse .mk-better { animation: pinpulse .9s ease-out 2; }
.lg-alert::before { content: "▼"; color: #f5a524; margin-right: 5px; font-size: 10px; }
.lg-better::before { content: "◌"; color: var(--up); margin-right: 5px; font-weight: 700; }
.ai-chart .win-legend { flex-wrap: wrap; row-gap: 4px; }
.entry-card { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--bg-soft); }
.ec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 13px; }
.ec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ec-table th, .ec-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ec-table th:first-child, .ec-table td:first-child { text-align: left; padding-left: 0; white-space: normal; color: var(--muted); }
.ec-table th { font-size: 11px; letter-spacing: .5px; }
.ec-table th.better, .ec-table td.better { color: var(--up); }
.ec-table td small { display: block; font-size: 10.5px; color: var(--muted); }
.ec-table tr.sum td { font-weight: 700; border-bottom: 0; }
.ec-note { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .better.pulse .mk-better { animation: none; } }

/* live entry card + AI entry */
.ai-rp-px { font: 600 13px/1 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.candles .mk-better { stroke: var(--ai); }
.candles .better-label { fill: var(--ai); font-weight: 700; }
.lg-better::before { content: "✦"; color: var(--ai); font-weight: 700; }
.ec-table th.ai-col { background: var(--ai-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.ec-table td.ai-col { color: var(--ai); font-weight: 600; }
.ec-table td.up { color: var(--up); }
.ec-table td.dn { color: var(--down); }
.ec-note { background: color-mix(in srgb, var(--ai) 12%, transparent); }
.ai-rp-again.nudge { animation: nudge 1.6s ease-out 3; border-color: var(--ai); color: var(--ai); }
@keyframes nudge { 0% { box-shadow: 0 0 0 0 rgba(109, 93, 252, .55); } 100% { box-shadow: 0 0 0 12px rgba(109, 93, 252, 0); } }
@media (max-width: 560px) { .ai-rp-px { display: none; } }
@media (prefers-reduced-motion: reduce) { .ai-rp-again.nudge { animation: none; } }

/* phones: keep the hero glow from widening the page; bigger tap targets and badge text */
main { overflow-x: hidden; overflow-x: clip; }
.tool-chips a.ai sup, .tour-tab .new { font-size: 11px; }
@media (max-width: 900px) {
  .tool-chips a { padding: 9px 13px 9px 10px; }
  .w-chips button { padding: 9px 11px; }
  .demo-btn { width: 36px; height: 36px; }
  .ai-rp-btn { width: 38px; height: 38px; }
  .ai-rp-again { padding: 11px 13px; }
  .rp-ctrl button { width: 40px; height: 40px; }
  .rp-ctrl button.rp-play { width: 46px; height: 46px; }
  .rp-speed button { padding: 10px 11px; }
  .presets button, .seg button { padding: 11px 14px; }
  .ai-chips button { padding: 11px 14px; }
  button.bd-run { padding: 13px; }
}
.win-legend { flex-wrap: wrap; row-gap: 4px; }
.win-legend span { white-space: nowrap; }
