:root {
    --bg: #06080f;
    --bg-card: #0f1419;
    --bg-elevated: #151b24;
    --bg-input: #0c1018;
    --border: #1e2a3a;
    --border-light: #2d3f54;
    --text: #f1f5f9;
    --muted: #8899ad;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --accent: #a855f7;
    --green: #10b981;
    --green-dim: rgba(16,185,129,.15);
    --red: #f43f5e;
    --red-dim: rgba(244,63,94,.15);
    --font: 'DM Sans', system-ui, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --radius: 10px;
    --shadow: 0 4px 24px rgba(0,0,0,.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; min-height: 100vh; overflow-x: hidden; }
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; transition: all .15s ease; }
input, select { font-family: inherit; }

.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }
.hidden { display: none !important; }
.empty { color: var(--muted); padding: 2rem; text-align: center; font-size: .9rem; }
.error-msg { background: var(--red-dim); border: 1px solid var(--red); color: #fecdd3; padding: .5rem .75rem; border-radius: 8px; font-size: .85rem; margin: .5rem 0; }

/* Buttons */
.btn { padding: .6rem 1.2rem; border-radius: var(--radius); border: none; font-weight: 600; font-size: .9rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--primary-dark), var(--accent)); color: #fff; box-shadow: 0 2px 12px rgba(59,130,246,.3); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(59,130,246,.4); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--border-light); background: var(--bg-elevated); }
.btn-lg { padding: .95rem 2rem; font-size: 1rem; }
.btn-sm { padding: .35rem .7rem; font-size: .78rem; }
.btn-block { width: 100%; }
.btn-buy { background: var(--green); color: #fff; }
.btn-sell { background: var(--red); color: #fff; }
.btn-icon { padding: .4rem .6rem; min-width: auto; }

/* Toasts */
.toast-box { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); font-size: .9rem; opacity: 0; transform: translateX(20px); transition: all .3s ease; pointer-events: auto; max-width: 360px; }
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { border-color: var(--green); }
.toast-error { border-color: var(--red); }
.toast-icon { font-weight: 700; width: 1.4rem; text-align: center; }

.global-loader { position: fixed; inset: 0; background: rgba(6,8,15,.7); z-index: 500; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; backdrop-filter: blur(4px); }
.loader-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Landing */
.bg-glow { position: fixed; inset: 0; pointer-events: none; z-index: 0; background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59,130,246,.18), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(168,85,247,.1), transparent); }
#app > * { position: relative; z-index: 1; }

.nav { display: flex; justify-content: space-between; align-items: center; padding: 1rem 2rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(6,8,15,.85); backdrop-filter: blur(16px); z-index: 100; }
.nav-brand { font-weight: 700; font-size: 1.25rem; display: flex; align-items: center; gap: .5rem; }
.logo { color: var(--primary); font-size: 1.5rem; filter: drop-shadow(0 0 8px rgba(59,130,246,.5)); }
.nav-links { display: flex; align-items: center; gap: 1.25rem; }
.nav-links a { color: var(--muted); font-size: .9rem; }
.nav-links a:hover { color: var(--text); }

.hero { text-align: center; padding: 4rem 2rem 3rem; max-width: 960px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: .4rem; background: rgba(59,130,246,.12); border: 1px solid rgba(59,130,246,.25); color: #93c5fd; padding: .4rem 1rem; border-radius: 999px; font-size: .82rem; font-weight: 600; margin-bottom: 1.5rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; line-height: 1.12; margin-bottom: 1rem; letter-spacing: -.02em; }
.hero h1 span { background: linear-gradient(135deg, #60a5fa, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { color: var(--muted); font-size: 1.1rem; max-width: 580px; margin: 0 auto 2rem; line-height: 1.65; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; max-width: 700px; margin: 0 auto; }
.hero-stats > div { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.hero-stats strong { display: block; font-size: 1.75rem; font-family: var(--mono); color: var(--primary); }
.hero-stats span { font-size: .8rem; color: var(--muted); }

/* Terminal preview mockup */
.preview-section { padding: 2rem; max-width: 1100px; margin: 0 auto 4rem; }
.preview-section h2 { text-align: center; margin-bottom: 1.5rem; font-size: 1.5rem; }
.terminal-preview { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.03) inset; }
.preview-bar { display: flex; gap: .4rem; padding: .75rem 1rem; background: var(--bg-elevated); border-bottom: 1px solid var(--border); }
.preview-dot { width: 10px; height: 10px; border-radius: 50%; }
.preview-dot.r { background: #f43f5e; }
.preview-dot.y { background: #fbbf24; }
.preview-dot.g { background: #10b981; }
.preview-body { display: grid; grid-template-columns: 180px 1fr 200px; min-height: 280px; font-size: .75rem; }
.preview-wl { padding: .75rem; border-right: 1px solid var(--border); }
.preview-chart { padding: 1rem; display: flex; flex-direction: column; justify-content: flex-end; }
.preview-chart .bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.preview-chart .bar { flex: 1; background: linear-gradient(180deg, var(--green), transparent); border-radius: 2px 2px 0 0; min-height: 4px; }
.preview-chart .bar.down { background: linear-gradient(180deg, var(--red), transparent); }
.preview-order { padding: .75rem; border-left: 1px solid var(--border); }
.preview-order .buy-btn { background: var(--green); color: #fff; padding: .5rem; border-radius: 6px; text-align: center; margin-top: .5rem; font-weight: 600; }

.features { padding: 4rem 2rem; max-width: 1100px; margin: 0 auto; }
.features h2 { text-align: center; font-size: 2rem; margin-bottom: 2.5rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.feature-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem; transition: all .2s; }
.feature-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-icon { font-size: 2rem; margin-bottom: .75rem; }
.feature-card h3 { margin-bottom: .4rem; font-size: 1.05rem; }
.feature-card p { color: var(--muted); font-size: .88rem; line-height: 1.6; }

.cta-section { text-align: center; padding: 4rem 2rem; background: linear-gradient(180deg, transparent, rgba(59,130,246,.06)); }
.footer { text-align: center; padding: 2rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--border); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.75); backdrop-filter: blur(4px); }
.modal-content { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 2rem; width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.modal-sm { max-width: 360px; }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--muted); font-size: 1.5rem; line-height: 1; }
.modal-content h2 { margin-bottom: 1rem; font-size: 1.25rem; }
.modal-content input { width: 100%; padding: .8rem 1rem; margin-bottom: .75rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
.modal-content input:focus { outline: none; border-color: var(--primary); }
.modal-switch { text-align: center; margin-top: 1rem; font-size: .9rem; color: var(--muted); }
.confirm-msg { color: var(--muted); margin-bottom: 1.25rem; }
.confirm-actions { display: flex; gap: .75rem; justify-content: flex-end; }

/* Search dropdown */
.search-wrap { position: relative; flex: 1; max-width: 280px; }
.search-wrap input { width: 100%; padding: .45rem .75rem .45rem 2rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-family: var(--mono); font-weight: 600; font-size: .9rem; }
.search-wrap::before { content: '⌕'; position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9rem; }
.search-dropdown { position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; max-height: 240px; overflow-y: auto; z-index: 50; box-shadow: var(--shadow); }
.search-item { padding: .6rem .75rem; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; gap: .5rem .75rem; align-items: center; border-bottom: 1px solid var(--border); font-size: .85rem; }
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--bg-elevated); }
.search-item strong { font-family: var(--mono); color: var(--primary); }
.search-item span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-item em { font-size: .7rem; text-transform: uppercase; color: var(--accent); font-style: normal; }

.symbol-prompt-wrap { position: relative; }
.symbol-prompt-wrap input { width: 100%; margin-bottom: 0; }

/* Terminal */
.terminal { display: flex; flex-direction: column; height: 100vh; overflow: hidden; background: var(--bg); }
.terminal-header { display: flex; align-items: center; justify-content: space-between; padding: .5rem 1rem; background: var(--bg-card); border-bottom: 1px solid var(--border); gap: .75rem; flex-wrap: wrap; }
.th-left { display: flex; align-items: center; gap: .75rem; flex: 1; min-width: 200px; }
.brand { font-weight: 700; white-space: nowrap; }
.live-badge { font-size: .65rem; background: var(--green-dim); color: var(--green); padding: .15rem .45rem; border-radius: 4px; font-weight: 600; animation: pulse 2s infinite; font-family: var(--mono); }
@keyframes pulse { 50% { opacity: .6; } }
.price-flash-up { animation: flashUp .5s ease; color: var(--green) !important; }
.price-flash-down { animation: flashDown .5s ease; color: var(--red) !important; }
@keyframes flashUp { 0% { background: var(--green-dim); } 100% { background: transparent; } }
@keyframes flashDown { 0% { background: var(--red-dim); } 100% { background: transparent; } }
.search-dropdown { max-height: 320px; }
.search-wrap input { min-width: 200px; }

/* Market status bar */
.market-status-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    align-items: center;
    padding: .45rem 1rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    font-size: .78rem;
}
.ms-block { display: flex; align-items: center; gap: .4rem .6rem; flex-wrap: wrap; }
.ms-block strong { font-weight: 600; }
.ms-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.session-open .ms-dot, .session-open .ms-label { color: var(--green); }
.session-open .ms-dot { background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2s infinite; }
.session-pre .ms-dot, .session-pre .ms-label { color: #fbbf24; }
.session-pre .ms-dot { background: #fbbf24; }
.session-post .ms-dot, .session-post .ms-label { color: #a78bfa; }
.session-post .ms-dot { background: #a78bfa; }
.session-closed .ms-dot, .session-closed .ms-label { color: var(--red); }
.session-closed .ms-dot { background: var(--red); }
.ms-label { font-weight: 700; font-family: var(--mono); font-size: .72rem; }
.ms-desc, .ms-muted { color: var(--muted); }
.ms-time { font-family: var(--mono); color: var(--primary); font-weight: 600; }
.ms-provider { margin-left: auto; }
.ms-provider a { font-size: .75rem; color: var(--accent); }
.th-stats { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.stat label { display: block; font-size: .65rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat span { font-family: var(--mono); font-weight: 600; font-size: .9rem; }
.th-right { display: flex; gap: .35rem; flex-wrap: wrap; }

.terminal-body { display: grid; grid-template-columns: 240px 1fr 300px; flex: 1; overflow: hidden; }
.sidebar-left { background: var(--bg-card); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.sidebar-section { padding: .75rem; border-bottom: 1px solid var(--border); }
.sidebar-section h3 { font-size: .7rem; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; margin-bottom: .6rem; }
.equity-chart-wrap { height: 70px; margin-top: .25rem; }
.equity-chart-wrap canvas { width: 100% !important; height: 70px !important; }
.watchlist { flex: 1; overflow-y: auto; padding: 0 .5rem .5rem; }
.wl-item { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; padding: .55rem .6rem; border-radius: 8px; cursor: pointer; gap: 0 .4rem; margin-bottom: 2px; transition: background .15s; }
.wl-item:hover, .wl-item.active { background: var(--bg-elevated); }
.wl-item.active { border-left: 2px solid var(--primary); }
.wl-sym { font-weight: 600; font-size: .82rem; font-family: var(--mono); }
.wl-price { font-family: var(--mono); font-size: .78rem; text-align: right; }
.wl-chg { grid-column: 2; font-size: .72rem; text-align: right; font-family: var(--mono); }

.main-chart { display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.quote-bar { display: flex; align-items: center; gap: .75rem 1.25rem; padding: .6rem 1rem; background: var(--bg-card); border-bottom: 1px solid var(--border); flex-wrap: wrap; font-size: .88rem; }
.qb-symbol { font-weight: 700; font-family: var(--mono); font-size: 1.15rem; }
.qb-type { font-size: .65rem; text-transform: uppercase; background: var(--bg-elevated); padding: .15rem .4rem; border-radius: 4px; color: var(--muted); }
.qb-name { color: var(--muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-price { font-family: var(--mono); font-weight: 700; font-size: 1.35rem; }
.qb-change { font-family: var(--mono); font-weight: 600; padding: .2rem .5rem; border-radius: 6px; font-size: .85rem; }
.qb-change.positive { background: var(--green-dim); }
.qb-change.negative { background: var(--red-dim); }
.qb-session { font-size: .7rem; font-weight: 700; padding: .15rem .45rem; border-radius: 4px; background: var(--bg-elevated); font-family: var(--mono); }
.qb-meta { color: var(--muted); font-size: .78rem; margin-left: auto; font-family: var(--mono); }
.chart-toolbar { display: flex; align-items: center; justify-content: space-between; padding: .35rem 1rem; gap: .5rem; flex-wrap: wrap; }
.chart-controls { display: flex; gap: .2rem; }
.range-btn { padding: .3rem .65rem; background: transparent; border: 1px solid transparent; border-radius: 6px; color: var(--muted); font-size: .75rem; font-weight: 500; }
.range-btn.active { background: var(--primary); color: #fff; }
.range-btn:hover:not(.active) { background: var(--bg-elevated); color: var(--text); }
.chart-type-btns { display: flex; gap: .2rem; }
.chart-container { flex: 1; min-height: 320px; position: relative; min-height: 0; }
.tv-chart-wrap { height: 100%; width: 100%; display: flex; flex-direction: column; position: relative; }
.tv-chart-wrap .tradingview-widget-container { flex: 1; min-height: 300px; }
.tv-badge, .tv-chart-label { position: absolute; top: 8px; left: 8px; z-index: 5; font-size: .7rem; color: var(--muted); display: flex; align-items: center; gap: .35rem; background: rgba(6,8,15,.85); padding: .2rem .5rem; border-radius: 4px; pointer-events: none; }
.tv-chart-label { position: static; margin-left: auto; padding: .35rem .6rem; }
.chart-toolbar { display: flex; align-items: center; justify-content: space-between; padding: .35rem 1rem; gap: .5rem; flex-wrap: wrap; }
.stack-pills { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; margin: -1rem 0 1.5rem; }
.stack-pills span { font-size: .75rem; font-weight: 700; padding: .35rem .75rem; border-radius: 6px; background: var(--bg-card); border: 1px solid var(--border); color: var(--primary); font-family: var(--mono); }
.stack-pills span:nth-child(2) { color: #a78bfa; }
.stack-pills span:nth-child(3) { color: #fbbf24; }
.stack-pills span:nth-child(4) { color: #10b981; }
.bottom-tabs { display: flex; border-top: 1px solid var(--border); background: var(--bg-card); }
.bottom-tabs button { padding: .55rem 1.1rem; background: none; border: none; color: var(--muted); font-size: .8rem; font-weight: 500; border-bottom: 2px solid transparent; }
.bottom-tabs button.active { color: var(--text); border-bottom-color: var(--primary); }
.bottom-panel { height: 200px; overflow: auto; background: var(--bg); }

.sidebar-right { background: var(--bg-card); border-left: 1px solid var(--border); overflow-y: auto; }
.order-panel { padding: 1rem; }
.order-panel h3 { font-size: .95rem; margin-bottom: .75rem; display: flex; align-items: center; justify-content: space-between; }
.position-badge { font-size: .72rem; color: var(--muted); font-weight: 400; }
.order-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; margin-bottom: 1rem; }
.order-tabs button { padding: .55rem; border: none; background: var(--bg-input); color: var(--muted); border-radius: 8px; font-weight: 600; }
.order-tabs button.active.buy { background: var(--green); color: #fff; }
.order-tabs button.active.sell { background: var(--red); color: #fff; }
.order-panel label { display: block; font-size: .72rem; color: var(--muted); margin: .6rem 0 .25rem; text-transform: uppercase; letter-spacing: .03em; }
.order-panel input, .order-panel select { width: 100%; padding: .65rem .75rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-family: var(--mono); font-size: .9rem; }
.order-panel input:focus, .order-panel select:focus { outline: none; border-color: var(--primary); }
.qty-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; margin-top: .35rem; }
.qty-presets button { padding: .35rem; font-size: .72rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 6px; color: var(--muted); }
.qty-presets button:hover { border-color: var(--primary); color: var(--text); }
.order-estimate { margin-top: 1rem; padding: .75rem; background: var(--bg-input); border-radius: 8px; font-size: .8rem; }
.order-estimate .row { display: flex; justify-content: space-between; margin-bottom: .25rem; color: var(--muted); }
.order-estimate .row.total { color: var(--text); font-weight: 600; margin-top: .35rem; padding-top: .35rem; border-top: 1px solid var(--border); font-family: var(--mono); }

.data-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.data-table th { text-align: left; padding: .55rem .75rem; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); z-index: 1; }
.data-table td { padding: .45rem .75rem; border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: .76rem; }
.data-table tr:hover td { background: var(--bg-card); }
.data-table .side-buy { color: var(--green); }
.data-table .side-sell { color: var(--red); }
.data-table button { padding: .2rem .5rem; font-size: .7rem; background: var(--red-dim); border: 1px solid var(--red); color: var(--red); border-radius: 4px; }

.overlay-panel { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 300; display: flex; align-items: center; justify-content: center; padding: 1.5rem; backdrop-filter: blur(6px); }
.overlay-panel.hidden { display: none; }
.overlay-content { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 1.75rem; max-width: 860px; width: 100%; max-height: 85vh; overflow-y: auto; position: relative; animation: fadeUp .25s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } }
.overlay-close { position: absolute; top: 1rem; right: 1rem; background: var(--bg-elevated); border: 1px solid var(--border); color: var(--muted); width: 32px; height: 32px; border-radius: 8px; font-size: 1.1rem; }
.overlay-content h2 { margin-bottom: 1.25rem; padding-right: 2rem; }

.rank-podium { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; }
.rank-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; text-align: center; min-width: 120px; }
.rank-card.gold { border-color: #fbbf24; }
.rank-card .rank-num { font-size: 1.5rem; font-weight: 700; }
.rank-card .rank-user { font-weight: 600; margin: .25rem 0; }
.rank-card .rank-pnl { font-family: var(--mono); font-size: .85rem; }

.achievements-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.achievement-card { padding: 1rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: 10px; opacity: .5; }
.achievement-card.earned { opacity: 1; border-color: var(--primary); }
.achievement-card h4 { font-size: .9rem; margin-bottom: .25rem; }
.achievement-card p { font-size: .78rem; color: var(--muted); }
.achievement-card .xp { font-size: .72rem; color: var(--accent); margin-top: .35rem; }

.lessons-list { display: flex; flex-direction: column; gap: .5rem; }
.lesson-item { padding: 1rem 1.25rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; display: flex; align-items: center; gap: 1rem; transition: border-color .15s; }
.lesson-item:hover { border-color: var(--primary); }
.lesson-diff { font-size: .68rem; padding: .2rem .5rem; border-radius: 4px; text-transform: uppercase; font-weight: 600; flex-shrink: 0; }
.lesson-diff.beginner { background: var(--green-dim); color: var(--green); }
.lesson-diff.intermediate { background: rgba(59,130,246,.15); color: var(--primary); }
.lesson-diff.advanced { background: rgba(168,85,247,.15); color: var(--accent); }
.lesson-body { margin: 1.5rem 0; line-height: 1.75; color: #cbd5e1; }
.lesson-body h2, .lesson-body h3 { margin: 1.25rem 0 .5rem; color: var(--text); }

/* Mobile */
.mobile-menu-btn { display: none; }
@media (max-width: 1024px) {
    .terminal-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
    .sidebar-left { max-height: 160px; flex-direction: row; flex-wrap: wrap; }
    .sidebar-left .sidebar-section { flex: 1; min-width: 140px; }
    .preview-body { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav-links a:not(.btn) { display: none; }
    .th-stats { display: none; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .sidebar-right { max-height: 320px; }
}
