:root {
  --bg: #050506;
  --bg2: #0a0a0c;
  --panel: #0f0f12;
  --panel2: #15151a;
  --line: #1f1f26;
  --line2: #2a2a33;
  --text: #f2eee4;
  --muted: #a3a3ab;
  --dim: #6e6e78;
  --gold: #f2b632;
  --gold-l: #ffd66e;
  --gold-d: #b07a12;
  --fx: #2f7bff;
  --fx-l: #8fb6ff;
  --st: #ff2e3b;
  --st-l: #ff9ea4;
  --cp: #2fd07a;
  --cp-l: #9ff0c4;
  --up: #30a46c;
  --down: #e5484d;
  --r: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --head: "Montserrat", system-ui, sans-serif;
  --body: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--head); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
img { display: block; max-width: 100%; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-pitch { position: relative; overflow: hidden; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); background: radial-gradient(900px 500px at 15% 0%, rgba(242,182,50,0.12), transparent 60%), var(--bg2); }
.login-pitch .logo { width: 190px; mix-blend-mode: lighten; }
.login-pitch h1 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; font-weight: 800; max-width: 14ch; margin: 40px 0 16px; }
.login-pitch h1 span { color: var(--muted); }
.login-pitch .lead { color: var(--muted); max-width: 46ch; font-size: 16px; }
.lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 36px; max-width: 560px; }
.line-card { border: 1px solid var(--line); background: rgba(15,15,18,0.7); border-radius: 12px; padding: 14px 16px; }
.line-card b { font-family: var(--head); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.line-card span { color: var(--muted); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--gold)); box-shadow: 0 0 10px var(--c, var(--gold)); flex: none; }
.login-foot { color: var(--dim); font-size: 12px; margin-top: 32px; max-width: 60ch; }
.login-form { display: grid; place-items: center; padding: 40px 24px; }
.card-auth { width: 100%; max-width: 400px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 24px; }
.seg button { border: 0; background: none; padding: 10px; border-radius: 9px; color: var(--muted); font-weight: 500; }
.seg button.on { background: var(--panel2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field select { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--text); font: inherit; outline: none; transition: border-color .2s; }
.field input:focus, .field select:focus { border-color: var(--gold-d); }
.check { display: flex; gap: 10px; font-size: 13px; color: var(--muted); margin: 6px 0 18px; align-items: flex-start; }
.check input { accent-color: var(--gold); margin-top: 3px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line2); background: var(--panel2); padding: 10px 16px; border-radius: 10px; font-weight: 500; text-decoration: none; transition: transform .15s var(--ease), background .2s, border-color .2s; white-space: nowrap; }
.btn:hover { border-color: #3a3a46; }
.btn:active { transform: scale(0.98); }
.btn-gold { background: linear-gradient(180deg, var(--gold-l), var(--gold)); color: #120d02; border-color: transparent; font-weight: 600; }
.btn-gold:hover { border-color: transparent; filter: brightness(1.05); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; padding: 13px; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg2); padding: 18px 14px; overflow-y: auto; }
.side .brand { display: block; padding: 6px 8px 18px; }
.side .brand img { width: 150px; mix-blend-mode: lighten; }
.nav-group { margin-top: 14px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding: 0 10px 6px; font-weight: 500; }
.nav a, .nav button.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: 14px; transition: background .15s, color .15s; }
.nav a:hover, .nav button.nav-item:hover { background: var(--panel); color: var(--text); }
.nav a.on { background: var(--panel2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.nav a.on .ic { color: var(--c, var(--gold)); }
.ic { width: 18px; height: 18px; flex: none; }
.nav .lock { margin-left: auto; width: 14px; height: 14px; color: var(--dim); }
.nav .chev { margin-left: auto; width: 14px; height: 14px; transition: transform .25s var(--ease); }
.nav .open > .nav-item .chev { transform: rotate(180deg); }
.subnav { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
.open > .subnav { grid-template-rows: 1fr; }
.subnav > div { overflow: hidden; padding-left: 20px; }
.subnav a { font-size: 13.5px; padding: 7px 10px; }
.subnav a .dot { width: 6px; height: 6px; box-shadow: none; }
.tag { font-size: 10.5px; font-family: var(--mono); padding: 2px 6px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line2); color: var(--muted); margin-left: auto; }
.tag.gold { color: var(--gold-l); border-color: rgba(242,182,50,0.35); background: rgba(242,182,50,0.08); }
.side-foot { margin-top: auto; padding-top: 18px; display: grid; gap: 10px; }
.viewas { border: 1px dashed var(--line2); border-radius: 12px; padding: 10px; }
.viewas .nav-label { padding: 0 2px 6px; }
.viewas select { width: 100%; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px; font: inherit; font-size: 13px; }
.viewas .reset { background: none; border: 0; color: var(--dim); font-size: 12px; padding: 6px 2px 0; text-decoration: underline; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 13px; background: linear-gradient(135deg, #2a2a33, #15151a); border: 1px solid var(--line2); color: var(--gold-l); flex: none; }
.me b { display: block; font-size: 13.5px; font-weight: 600; }
.me span { font-size: 12px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: rgba(5,5,6,0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.top .burger { display: none; border: 1px solid var(--line); background: var(--panel); border-radius: 9px; padding: 7px; }
.crumb { font-size: 13px; color: var(--muted); }
.crumb b { color: var(--text); font-weight: 500; }
.sessions { margin-left: auto; display: flex; gap: 6px; }
.sess { font-size: 12px; font-family: var(--mono); padding: 5px 9px; border-radius: 8px; border: 1px solid var(--line); color: var(--dim); display: flex; align-items: center; gap: 6px; }
.sess.live { color: var(--text); }
.sess .dot { width: 6px; height: 6px; background: var(--dim); box-shadow: none; }
.sess.live .dot { background: var(--up); box-shadow: 0 0 8px var(--up); }
.view { padding: 28px 32px 48px; max-width: 1240px; width: 100%; animation: in .45s var(--ease); }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 62ch; }
.eyebrow { font-family: var(--mono); font-size: 12px; color: var(--c, var(--gold)); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }

/* ---------- Panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }

/* Hero home */
.hello { position: relative; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); padding: 28px; background: radial-gradient(600px 260px at 100% 0%, rgba(242,182,50,0.14), transparent 70%), var(--panel); display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; }
.hello h1 { font-size: 30px; }
.hello p { color: var(--muted); margin-top: 8px; max-width: 48ch; }
.status { border: 1px solid var(--line2); border-radius: 14px; padding: 16px 18px; background: rgba(5,5,6,0.5); display: grid; gap: 10px; }
.status-row { display: flex; justify-content: space-between; font-size: 13.5px; gap: 10px; }
.status-row span { color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line2); font-weight: 500; white-space: nowrap; }
.pill.ok { color: #7ee2a8; border-color: rgba(48,164,108,0.4); background: rgba(48,164,108,0.1); }
.pill.wait { color: var(--gold-l); border-color: rgba(242,182,50,0.4); background: rgba(242,182,50,0.08); }
.pill.no { color: #ff9a9d; border-color: rgba(229,72,77,0.4); background: rgba(229,72,77,0.1); }
.pill.mute { color: var(--muted); }

/* Area tiles */
.area { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; min-height: 178px; padding: 20px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); text-decoration: none; transition: border-color .25s, transform .25s var(--ease); }
.area::before { content: ""; position: absolute; inset: auto -40% -60% auto; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 30%, transparent), transparent); opacity: .5; transition: opacity .3s; pointer-events: none; }
.area:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); transform: translateY(-2px); }
.area:hover::before { opacity: .9; }
.area .ic-wrap { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.area h3 { font-size: 16px; }
.area p { color: var(--muted); font-size: 13.5px; }
.area .go { margin-top: auto; font-size: 13px; color: var(--c); display: flex; align-items: center; gap: 6px; }
.area.locked { filter: saturate(0.4); }
.area.locked .go { color: var(--dim); }

/* Lessons */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs button { border: 1px solid var(--line); background: var(--panel); color: var(--muted); padding: 7px 13px; border-radius: 999px; font-size: 13px; transition: all .2s; }
.tabs button.on { color: var(--text); border-color: color-mix(in srgb, var(--c) 55%, var(--line)); background: color-mix(in srgb, var(--c) 12%, var(--panel)); }
.tabs button .n { font-family: var(--mono); color: var(--dim); margin-left: 4px; font-size: 12px; }
.lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.lesson { border: 0; background: none; padding: 0; text-align: left; display: grid; gap: 8px; }
.lesson .thumb { position: relative; aspect-ratio: 9 / 14; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.lesson .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s var(--ease); }
.lesson:hover .thumb img { transform: scale(1.04); }
.lesson .play { position: absolute; inset: auto 8px 8px auto; width: 30px; height: 30px; border-radius: 50%; background: rgba(5,5,6,0.75); display: grid; place-items: center; border: 1px solid var(--line2); }
.lesson .done { position: absolute; top: 8px; left: 8px; }
.lesson b { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.lesson span { font-size: 12px; color: var(--dim); font-family: var(--mono); }
.progress { height: 6px; background: var(--panel2); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--c, var(--gold)); border-radius: 99px; transition: width .6s var(--ease); }

/* Rooms */
.room { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.room-logo { width: 56px; height: 56px; border-radius: 50%; flex: none; object-fit: cover; box-shadow: 0 0 18px color-mix(in srgb, var(--c, var(--gold)) 35%, transparent); }
.room-logo-lg { width: 96px; height: 96px; display: block; margin: 0 auto 14px; }
.room-mini { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.room-mkt { display: inline-block; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--c); margin-bottom: 4px; }
.room .ic-wrap { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(47,123,255,0.12); color: var(--fx-l); border: 1px solid rgba(47,123,255,0.3); flex: none; }
.room h3 { margin-bottom: 2px; }
.room p { color: var(--muted); font-size: 13.5px; }
.room .btn { margin-left: auto; }

/* Copy */
.copy-card { display: grid; gap: 14px; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kv div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg2); }
.kv span { display: block; font-size: 11.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.kv b { font-size: 14px; font-weight: 600; }
.bt-kv b { font-family: var(--mono, ui-monospace, monospace); font-size: 16px; }

/* Locked */
.locked-view { display: grid; place-items: center; text-align: center; padding: 64px 24px; border: 1px dashed var(--line2); border-radius: 18px; background: radial-gradient(500px 220px at 50% 0%, rgba(242,182,50,0.08), transparent 70%), var(--panel); }
.locked-view .ic-lock { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(242,182,50,0.1); color: var(--gold); border: 1px solid rgba(242,182,50,0.3); margin: 0 auto 18px; }
.locked-view p { color: var(--muted); max-width: 46ch; margin: 8px auto 22px; }

/* Steps */
.steps { display: grid; gap: 0; counter-reset: s; }
.step { display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step .num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 13px; border: 1px solid var(--line2); color: var(--muted); }
.step.ok .num { background: rgba(48,164,108,0.15); border-color: rgba(48,164,108,0.5); color: #7ee2a8; }
.step.cur .num { background: rgba(242,182,50,0.12); border-color: rgba(242,182,50,0.5); color: var(--gold-l); }
.step b { display: block; font-weight: 600; font-size: 14px; }
.step span { font-size: 13px; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-weight: 500; color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 12px 16px; background: var(--bg2); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255,255,255,0.015); }

/* Stats */
.stat { padding: 16px 18px; }
.stat span { display: block; font-size: 12px; color: var(--muted); }
.stat b { font-family: var(--mono); font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.stat small { display: block; font-size: 12px; color: var(--dim); margin-top: 2px; }

/* Rebate */
.calc { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; }
.range { display: grid; gap: 8px; margin-bottom: 18px; }
.range-top { display: flex; justify-content: space-between; font-size: 13.5px; }
.range-top b { font-family: var(--mono); font-weight: 500; color: var(--gold-l); }
input[type=range] { width: 100%; accent-color: var(--gold); }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 180px; margin-top: 10px; }
.bars div { position: relative; background: linear-gradient(180deg, var(--gold), rgba(242,182,50,0.25)); border-radius: 6px 6px 2px 2px; min-height: 4px; transition: height .5s var(--ease); }
.bars div.mk { background: linear-gradient(180deg, var(--gold-l), var(--gold)); box-shadow: 0 0 14px rgba(242,182,50,0.35); }
.bars-x { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; font-size: 11px; color: var(--dim); font-family: var(--mono); text-align: center; margin-top: 6px; }
.proj { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.proj div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg2); }
.proj span { font-size: 12px; color: var(--muted); display: block; }
.proj b { font-family: var(--mono); font-size: 20px; font-weight: 500; }
.proj small { display: block; font-size: 11.5px; color: var(--dim); }

.copybox { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 12px; background: var(--bg2); }
.copybox code { font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; color: var(--gold-l); }

.doc { display: flex; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.doc .ic-wrap { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: rgba(242,182,50,0.1); color: var(--gold); flex: none; border: 1px solid rgba(242,182,50,0.25); }
.doc b { display: block; font-size: 14px; font-weight: 600; }
.doc span { font-size: 12.5px; color: var(--muted); }
.doc .btn { margin-left: auto; }
.video-ph { aspect-ratio: 16 / 9; border-radius: 12px; border: 1px solid var(--line); background: radial-gradient(400px 200px at 50% 40%, rgba(242,182,50,0.15), transparent 70%), #000; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 13px; }
.video-ph .playbig { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: rgba(242,182,50,0.15); border: 1px solid rgba(242,182,50,0.4); color: var(--gold-l); margin: 0 auto 10px; }

.note { font-size: 12.5px; color: var(--dim); }
.risk { margin-top: 28px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; font-size: 12.5px; color: var(--dim); background: var(--bg2); }
.risk b { color: var(--muted); font-weight: 500; }
.empty { text-align: center; color: var(--muted); padding: 28px; font-size: 14px; }

/* Modal + toast */
.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,0.65); display: grid; place-items: center; padding: 16px; animation: fade .2s ease; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; padding: 24px; animation: in .35s var(--ease); max-height: 90vh; overflow: auto; }
.modal h2 { margin-bottom: 8px; }
.modal p { color: var(--muted); }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.modal-lesson { max-width: 380px; padding: 16px; }
.modal-lesson img { width: 100%; border-radius: 12px; border: 1px solid var(--line); }
#toast { position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--panel2); border: 1px solid var(--line2); padding: 11px 16px; border-radius: 12px; font-size: 13.5px; transition: all .3s var(--ease); max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.scrim { display: none; }

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-pitch { padding: 28px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-pitch h1 { margin-top: 24px; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .3s var(--ease); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,0.6); }
  .top { padding: 12px 16px; }
  .top .burger { display: grid; }
  .view { padding: 20px 16px 40px; }
  .hello { grid-template-columns: 1fr; padding: 20px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .sessions .sess:not(.live) { display: none; }
}
@media (max-width: 560px) {
  .g4 { grid-template-columns: 1fr; }
  .lines { grid-template-columns: 1fr; }
  .lessons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kv, .proj { grid-template-columns: 1fr; }
  .room { flex-wrap: wrap; }
  .room .btn { margin-left: 0; width: 100%; }
  .doc { flex-wrap: wrap; }
  .doc .btn { margin-left: 0; width: 100%; }
  .step { grid-template-columns: 36px 1fr; }
  .step > :nth-child(3) { grid-column: 2; justify-self: start; }
  h1 { font-size: 23px; }
  .hello h1 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Trade Hunter ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.th-hero { position: relative; overflow: hidden; border: 1px solid rgba(47,123,255,0.25); border-radius: var(--r); padding: 40px 40px 34px; background: radial-gradient(700px 320px at 85% 10%, rgba(47,123,255,0.22), transparent 65%), radial-gradient(500px 260px at 0% 100%, rgba(29,79,176,0.18), transparent 70%), #05080f; }
.th-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(143,182,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(143,182,255,0.06) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%); pointer-events: none; }
.th-hero-copy { position: relative; max-width: 620px; }
.th-logo { width: min(360px, 80%); height: auto; display: block; filter: drop-shadow(0 0 28px rgba(47,123,255,0.45)); animation: thIn .8s cubic-bezier(.2,.8,.2,1) both; }
.th-lead { font-size: 17px; line-height: 1.55; color: #c9d4e8; margin-top: 18px; }
.th-cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.btn-th { background: linear-gradient(180deg, #4f8fff, #2f7bff); color: #fff; border-color: #2f7bff; box-shadow: 0 0 0 1px rgba(143,182,255,0.25) inset, 0 8px 28px rgba(47,123,255,0.35); }
.btn-th:hover { background: linear-gradient(180deg, #6aa1ff, #3d86ff); }
.th-facts { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(143,182,255,0.14); font-size: 13px; color: var(--muted); }
.th-facts b { font-family: var(--mono); color: #8fb6ff; font-size: 17px; margin-right: 6px; font-weight: 500; }
.th-glow { position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(47,123,255,0.35), transparent 65%); filter: blur(10px); animation: thPulse 6s ease-in-out infinite; pointer-events: none; }
.th-show { margin-top: 28px; }
.th-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.th-tab { height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color .2s, background-color .2s, border-color .2s; }
.th-tab:hover { color: var(--fg, #f2eee4); }
.th-tab.on { color: #fff; border-color: rgba(47,123,255,0.6); background: rgba(47,123,255,0.14); }
.th-frame { margin: 12px 0 0; border: 1px solid var(--line2, #2a2a2a); border-radius: 14px; overflow: hidden; background: #0b0f17; box-shadow: 0 30px 80px -30px rgba(47,123,255,0.35); }
.th-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.th-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2a2f3a; }
.th-bar span { margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.th-frame img { display: block; width: 100%; height: auto; aspect-ratio: 1440/900; object-fit: cover; object-position: top left; transition: opacity .18s ease, transform .35s cubic-bezier(.2,.8,.2,1); }
.th-frame img.swap { opacity: 0; transform: scale(1.012); }
.th-frame figcaption { padding: 12px 16px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); }
.th-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin-top: 32px; }
.th-grid h2 { font-size: 22px; margin-bottom: 12px; }
.th-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.th-list li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.th-list .mono { color: #8fb6ff; font-size: 13px; padding-top: 2px; }
.th-list h3 { font-size: 16px; }
.th-list p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.th-mode { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: start; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: var(--panel); }
.th-mode img { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line2, #2a2a2a); }
.th-mode h3 { font-size: 15px; color: #8fb6ff; }
.th-mode ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
@keyframes thIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes thPulse { 0%,100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@media (max-width: 900px) { .th-grid { grid-template-columns: 1fr; } .th-hero { padding: 28px 20px 24px; } }
@media (max-width: 560px) { .th-mode { grid-template-columns: 1fr; } .th-mode img { max-width: 200px; } }
@media (prefers-reduced-motion: reduce) { .th-logo, .th-glow { animation: none; } .th-frame img { transition: none; } }

/* ---------- Effetti globali ---------- */
.rise { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.panel, .room, .area, .lesson, .bt-tile { position: relative; }
@media (hover: hover) {
  .panel::after, .room::after, .area::after, .bt-tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s ease;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c, var(--gold)) 13%, transparent), transparent 70%); }
  .panel:hover::after, .room:hover::after, .area:hover::after, .bt-tile:hover::after { opacity: 1; }
  .room, .area { transition: transform .22s cubic-bezier(.2,.8,.2,1), border-color .22s; }
  .room:hover, .area:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c, var(--gold)) 40%, var(--line)); }
  .lesson .thumb img { transition: transform .35s cubic-bezier(.2,.8,.2,1); }
  .lesson:hover .thumb img { transform: scale(1.04); }
}
.sess.live .dot { animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(48,164,108,.6); } 50% { box-shadow: 0 0 0 5px rgba(48,164,108,0); } }
.room-logo { transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s; }
.room:hover .room-logo { transform: rotate(-6deg) scale(1.06); box-shadow: 0 0 26px color-mix(in srgb, var(--c) 60%, transparent); }

/* ---------- Backtest ---------- */
.bt { --c: var(--cp); overflow: hidden; background: radial-gradient(600px 240px at 100% 0%, rgba(47,208,122,0.08), transparent 70%), var(--panel); }
.bt-top { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px; align-items: center; margin-top: 14px; }
.bt-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.bt-profit { display: block; font-family: var(--mono); font-size: clamp(30px, 4.4vw, 46px); font-weight: 600; color: var(--cp); letter-spacing: -0.02em; margin: 4px 0 6px; text-shadow: 0 0 30px rgba(47,208,122,0.25); font-variant-numeric: tabular-nums; }
.bt-sub { color: var(--muted); font-size: 14px; }
.bt-sub span { font-family: var(--mono); color: var(--fg, #f2eee4); }
.bt-ring { position: relative; width: 150px; height: 150px; }
.bt-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.bt-ring circle { fill: none; stroke-width: 10; }
.bt-ring-bg { stroke: rgba(229,72,77,0.28); }
.bt-ring-fg { stroke: var(--up); stroke-linecap: round; stroke-dasharray: var(--C); stroke-dashoffset: var(--C); transition: stroke-dashoffset 1.6s cubic-bezier(.2,.8,.2,1) .15s; filter: drop-shadow(0 0 6px rgba(48,164,108,.5)); }
.bt-ring.in .bt-ring-fg { stroke-dashoffset: var(--off); }
.bt-ring-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.bt-ring-txt b { font-family: var(--mono); font-size: 22px; font-variant-numeric: tabular-nums; }
.bt-ring-txt span { font-size: 11px; color: var(--muted); line-height: 1.25; }
.bt-split { margin-top: 18px; }
.bt-split-bar { display: flex; gap: 3px; height: 12px; border-radius: 6px; overflow: hidden; background: #15151a; }
.bt-split-bar i { display: block; height: 100%; width: var(--w); transform: scaleX(0); transition: transform 1.3s cubic-bezier(.2,.8,.2,1); }
.bt-split-bar .w { background: linear-gradient(90deg, #1f7a4f, var(--up)); transform-origin: left; }
.bt-split-bar .l { background: linear-gradient(90deg, var(--down), #8f2a2e); transform-origin: right; }
.bt-split.in i { transform: scaleX(1); }
.bt-split-leg { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.bt-split-leg span { display: inline-flex; align-items: center; gap: 8px; }
.bt-split-leg span span, .bt-avg b span { font-family: var(--mono); color: var(--fg, #f2eee4); }
.bt-tiles { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.bt-tile { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--bg2); opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i) * 60ms); }
.bt-tile.in { opacity: 1; transform: none; }
.bt-tile > span { display: block; font-size: 11.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.bt-tile b { font-family: var(--mono); font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bt-avg { display: grid; gap: 12px; margin-top: 18px; }
.bt-avg > div { display: grid; grid-template-columns: 210px 1fr 80px; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); }
.bt-avg b { text-align: right; }
.bt-hbar { height: 8px; border-radius: 4px; background: #15151a; overflow: hidden; }
.bt-hbar i { display: block; height: 100%; width: var(--w); transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(.2,.8,.2,1) .2s; border-radius: 4px; }
.bt-hbar .up { background: var(--up); } .bt-hbar .down { background: var(--down); }
.bt-avg.in .bt-hbar i { transform: scaleX(1); }
@media (max-width: 700px) {
  .bt-top { grid-template-columns: 1fr; justify-items: start; }
  .bt-tiles { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .bt-avg > div { grid-template-columns: 1fr 80px; } .bt-avg .bt-hbar { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .rise, .sess.live .dot { animation: none; }
  .bt-ring-fg, .bt-split-bar i, .bt-tile, .bt-hbar i { transition: none; }
}

.grid > * { min-width: 0; }

.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demo-enter { border-color: rgba(242,182,50,0.45); color: var(--gold); }
.demo-enter:hover { background: rgba(242,182,50,0.08); }
