/* Alpha Trading School: black, soft sky blue (#80B2F0) and white, with a touch of cantaloupe. */
:root {
  --bg: #ffffff;
  --bg-2: #f3f8fe;
  --panel: #ffffff;
  --panel-2: #eaf3fd;
  --line: #e1e9f4;
  --line-2: #c9d8ec;
  --text: #0b1220;
  --text-2: #334155;
  --muted: #64748b;
  --accent: #80b2f0;          /* soft sky blue */
  --accent-2: #2f74c8;        /* deeper sky blue for links and text on white */
  --accent-soft: rgba(128,178,240,.18);
  --accent-ink: #05070c;      /* text on sky-blue backgrounds */
  --gold: #e07a2f;            /* cantaloupe, deep enough to read on white */
  --gold-soft: rgba(224,122,47,.12);
  --bull: #0f9f74;
  --bear: #e0474d;
  --radius: 8px;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 12px 32px -18px rgba(15,23,42,.18);
}
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.6; }
body { font-size: 1rem; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #85a8ff; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
h3 { font-size: 1.1rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
::selection { background: rgba(128,178,240,.35); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.pos { color: var(--bull); } .neg { color: var(--bear); }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9); backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--text); font-size: 1.05rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); position: relative; flex: none; }
.brand-mark::before { content: ''; position: absolute; inset: 6px 6px 7px; background: #fff; clip-path: polygon(50% 0, 100% 100%, 72% 100%, 50% 52%, 28% 100%, 0 100%); }
.nav-links { display: flex; gap: 2px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--muted); padding: 7px 11px; border-radius: 8px; font-size: .9rem; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--panel-2); }
.nav-links .btn { margin-left: 8px; }
@media (max-width: 860px) {
  .nav .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .nav-links { margin-left: 0; width: 100%; }
  .nav-links a { padding: 6px 9px; font-size: .86rem; }
}

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 600; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .06em; }
.badge.free { background: var(--accent-soft); color: var(--accent-2); }
.badge.premium { background: var(--gold-soft); color: var(--gold); }
.badge.locked { background: var(--panel-2); color: var(--muted); }
.badge.tool { background: var(--panel-2); color: var(--text-2); }
.badge.done { background: rgba(32,201,151,.12); color: var(--bull); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 550; font-size: .92rem; border: 1px solid var(--line-2); background: transparent; color: var(--text); padding: 10px 18px; border-radius: 7px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn:hover { background: var(--panel-2); border-color: #33405a; color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: #9cc3f4; border-color: #9cc3f4; color: var(--accent-ink); }
.btn.gold { background: var(--gold); color: #1d1006 !important; border-color: var(--gold); }
.btn.gold:hover { background: #ffb37f; border-color: #ffb37f; }
.btn.bull { background: var(--bull); border-color: var(--bull); color: #03140e; }
.btn.bear { background: var(--bear); border-color: var(--bear); color: #fff; }
.btn.small { padding: 7px 12px; font-size: .84rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

/* ---------- surfaces ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
section { padding: 84px 0; }
.eyebrow { font-family: var(--mono); color: var(--accent-2); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.section-head { max-width: 640px; margin-bottom: 34px; }

/* ---------- hero ---------- */
.hero { padding: 92px 0 72px; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ''; position: absolute; inset: -40% -10% auto; height: 520px; background: radial-gradient(closest-side, rgba(128,178,240,.16), transparent); pointer-events: none; }
.hero::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(to bottom, #000 0%, transparent 85%); -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.12rem; color: var(--text-2); max-width: 33em; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.hero-art { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 10px; box-shadow: var(--shadow); }
.hero-art canvas { width: 100%; height: 320px; display: block; border-radius: 7px; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }
.feature .icon { width: 36px; height: 36px; border-radius: 6px; display: grid; place-items: center; background: var(--accent-soft); margin-bottom: 14px; color: var(--accent-2); }
.feature p { color: var(--muted); margin: 0; }

/* ---------- pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; max-width: 840px; margin: 0 auto; }
.plan { padding: 30px; }
.plan.featured { border-color: rgba(255,164,101,.45); background: linear-gradient(180deg, rgba(255,164,101,.05), transparent 40%), var(--panel); }
.plan .price { font-size: 2.8rem; font-weight: 650; letter-spacing: -0.04em; }
.plan .price small { font-size: 1rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 26px; }
.plan li { padding: 7px 0 7px 26px; position: relative; color: var(--text-2); font-size: .95rem; }
.plan li::before { content: ''; position: absolute; left: 3px; top: 14px; width: 11px; height: 6px; border-left: 1.5px solid var(--accent-2); border-bottom: 1.5px solid var(--accent-2); transform: rotate(-45deg); }
.plan.featured li::before { border-color: var(--gold); }

/* ---------- forms ---------- */
.form { max-width: 420px; margin: 64px auto; }
label { display: block; font-size: .85rem; color: var(--muted); margin: 14px 0 6px; font-weight: 500; }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 7px; padding: 11px 13px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(128,178,240,.18); }
.error { color: var(--bear); font-size: .9rem; min-height: 1.4em; margin-top: 10px; }
.notice { background: var(--accent-soft); border: 1px solid rgba(128,178,240,.3); border-radius: 7px; padding: 12px 14px; font-size: .92rem; color: var(--text-2); }
.notice.gold { background: var(--gold-soft); border-color: rgba(255,164,101,.3); }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.table th { color: var(--muted); font-weight: 500; font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; }
.table td.num, .table th.num { text-align: right; font-family: var(--mono); }
.table tr:last-child td { border-bottom: 0; }

/* ---------- lessons ---------- */
.lesson-list { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 84px; align-self: start; }
.lesson-item { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 6px; color: var(--text); border: 1px solid transparent; }
.lesson-item:hover { background: var(--panel); color: var(--text); }
.lesson-item.active { background: var(--panel-2); border-color: var(--line); }
.lesson-item .num { font-family: var(--mono); font-size: .78rem; color: var(--muted); width: 22px; }
.lesson-item .t { flex: 1; font-size: .9rem; font-weight: 500; }
.lesson-item.locked .t { color: var(--muted); }
.lesson-item .done { color: var(--bull); }
.lesson-body { max-width: 780px; }
.lesson-body h2 { margin-top: 1.7em; font-size: 1.45rem; }
.lesson-body h3 { margin-top: 1.4em; }
.lesson-body p, .lesson-body li { color: var(--text-2); }
.lesson-body ul, .lesson-body ol { padding-left: 1.3em; }
.lesson-body li { margin: .35em 0; }
.lesson-body .callout { background: var(--panel); border: 1px solid var(--line); border-left: 2px solid var(--accent); padding: 14px 16px; border-radius: 7px; margin: 1.3em 0; color: var(--text-2); }
.lesson-body .callout.warn { border-left-color: var(--gold); }
.lesson-body .video { aspect-ratio: 16/9; background: var(--panel); border: 1px dashed var(--line-2); border-radius: 8px; display: grid; place-items: center; color: var(--muted); margin: 1.2em 0; font-size: .9rem; text-align: center; padding: 20px; }
.lesson-body table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .93rem; }
.lesson-body th, .lesson-body td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; }
.lesson-body th { color: var(--muted); font-weight: 500; }
.lesson-body svg { max-width: 100%; height: auto; display: block; margin: 1.2em 0; }
.lesson-body .preview-end { border-top: 1px dashed var(--line-2); margin: 30px 0; }
.lesson-body .rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 1em 0; }
.lesson-body .rules > div { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.lesson-body .rules b { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); margin-bottom: 6px; font-weight: 600; }
.lesson-body .rules > div p { margin: 0; color: var(--text); font-size: .93rem; }
.lesson-body ul.check { list-style: none; padding-left: 0; }
.lesson-body ul.check li { padding-left: 26px; position: relative; }
.lesson-body ul.check li::before { content: ''; position: absolute; left: 4px; top: 9px; width: 11px; height: 6px; border-left: 1.5px solid var(--accent-2); border-bottom: 1.5px solid var(--accent-2); transform: rotate(-45deg); }
.lesson-body ul.x li::marker { color: var(--bear); }
.paywall { text-align: center; padding: 48px 24px; }
.paywall .lock { width: 48px; height: 48px; border-radius: 8px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; margin: 0 auto 16px; }
.locked-list { text-align: left; max-width: 420px; margin: 0 auto 22px; }
.practice { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: space-between; background: var(--panel); border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: 8px; padding: 18px; margin: 28px 0; }
.reader { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 32px; padding-top: 32px; padding-bottom: 90px; }
@media (max-width: 900px) { .reader { grid-template-columns: 1fr; } .reader aside { order: 2; } }

/* ---------- library ---------- */
.lib-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 8px; }
.pill { font: inherit; font-size: .84rem; font-weight: 500; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; }
.pill:hover { color: var(--text); }
.pill.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.lib-cat { margin-top: 38px; }
.lib-cat h2 { font-size: 1.25rem; display: flex; align-items: baseline; gap: 10px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.lcard { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--text); transition: border-color .15s, background .15s; }
.lcard:hover { border-color: var(--line-2); background: var(--panel-2); color: var(--text); }
.lcard .t { font-weight: 600; line-height: 1.3; }
.lcard .s { color: var(--muted); font-size: .86rem; flex: 1; }
.lcard .meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .76rem; color: var(--muted); }

/* ---------- lesson widgets ---------- */
.fig-cap { color: var(--muted); font-size: .84rem; margin-top: 8px; text-align: center; }
.sketch { margin: 1.4em 0; }
.examples { margin: 1.6em 0; }
.ex-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; font-size: .9rem; }
.ex-head .btn { margin-left: auto; }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.ex-card { margin: 0; background: var(--chart-bg); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; min-height: 120px; }
.ex-card figcaption { padding: 9px 12px; font-size: .8rem; border-top: 1px solid var(--line); color: var(--text-2); }
.ex-loading { height: 266px; background: linear-gradient(90deg, var(--chart-bg), var(--panel-2), var(--chart-bg)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: .84rem; }
footer .disclaimer { max-width: 760px; }

/* ---------- support chat ---------- */
.sup-btn { position: fixed; right: 20px; bottom: 20px; z-index: 80; height: 46px; padding: 0 18px 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.08); background: var(--accent); color: #fff; font: inherit; font-weight: 550; font-size: .9rem; display: flex; align-items: center; gap: 8px; cursor: pointer; box-shadow: 0 12px 30px -8px rgba(128,178,240,.55); }
.sup-btn:hover { background: #9cc3f4; }
.sup-btn { touch-action: none; user-select: none; -webkit-user-select: none; }
.sup-btn.dragging { cursor: grabbing; opacity: .92; box-shadow: 0 18px 40px -8px rgba(128,178,240,.7); }
.sup-panel { position: fixed; right: 20px; bottom: 78px; z-index: 81; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px)); background: var(--panel); border: 1px solid var(--line-2); border-radius: 7px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); display: flex; flex-direction: column; overflow: hidden; }
.sup-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.sup-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bull); box-shadow: 0 0 0 3px rgba(32,201,151,.18); }
.sup-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 8px; font-size: .9rem; line-height: 1.5; }
.msg.bot { background: var(--panel-2); color: var(--text-2); border-top-left-radius: 4px; }
.msg.me { background: var(--accent); color: var(--accent-ink); align-self: flex-end; border-top-right-radius: 4px; }
.sup-faq { display: flex; flex-direction: column; gap: 6px; }
.sup-faq button { font: inherit; font-size: .85rem; text-align: left; padding: 9px 12px; border-radius: 7px; border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer; }
.sup-faq button:hover { border-color: var(--accent); }
.sup-foot { border-top: 1px solid var(--line); padding: 12px; display: flex; gap: 8px; }
.sup-foot input { padding: 10px 12px; }
.sup-mail { font-size: .78rem; color: var(--muted); padding: 0 16px 12px; }

/* ---------- bigger interface on computer screens ---------- */
@media (min-width: 1280px) {
  html { font-size: 17px; }
  .wrap { max-width: 1320px; padding: 0 28px; }
  .nav .wrap { height: 70px; }
  .lesson-body { max-width: 900px; }
  .reader { grid-template-columns: 300px minmax(0, 1fr); gap: 44px; }
  .hero-art canvas { height: 380px !important; }
  .lib-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
  .ex-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
  .ex-card canvas { height: 280px !important; }
}
@media (min-width: 1680px) {
  html { font-size: 18.5px; }
  .wrap { max-width: 1520px; }
  .lesson-body { max-width: 980px; }
  .hero-art canvas { height: 440px !important; }
}

/* ---------- prize banner + account chip ---------- */
.promo { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 8px 16px; font-size: .84rem; color: var(--text-2); background: linear-gradient(90deg, rgba(128,178,240,.14), rgba(255,164,101,.10)); border-bottom: 1px solid var(--line); text-align: center; }
.promo:hover { color: var(--text); }
.promo .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(255,164,101,.2); }
.promo .mono { color: var(--muted); font-size: .78rem; }
.promo .go { color: var(--accent-2); font-weight: 600; }
.me-chip { display: inline-flex !important; align-items: center; gap: 8px; margin-left: 6px; padding: 4px 10px 4px 4px !important; border: 1px solid var(--line-2); border-radius: 999px !important; color: var(--text) !important; }
.me-chip .av { width: 26px; height: 26px; border-radius: 50%; background: var(--panel-2); display: grid; place-items: center; font-size: .78rem; font-weight: 600; overflow: hidden; }
.me-chip .av img { width: 100%; height: 100%; object-fit: cover; }
.me-chip .mono { font-size: .78rem; color: var(--accent-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--panel-2); display: inline-grid; place-items: center; font-size: .8rem; font-weight: 600; overflow: hidden; vertical-align: middle; flex: none; color: var(--muted); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Premium lock screen + nav lock */
.nav-lock { display: inline-flex; vertical-align: -1px; color: var(--gold); opacity: .85; }
.gate { padding: 56px 20px 80px; }
.gate-in { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.gate h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.08; letter-spacing: -0.03em; margin: 10px 0 14px; }
.gate-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 11px; }
.gate-list li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.gate-list li svg { flex: none; width: 18px; height: 18px; color: var(--accent-2, #6f9bff); margin-top: 2px; }
.gate-art { position: relative; border: 1px solid var(--line); border-radius: 7px; background: var(--chart-bg); overflow: hidden; aspect-ratio: 4 / 3; }
.gate-art canvas { width: 100%; height: 100%; display: block; filter: blur(1.5px) saturate(.9); opacity: .75; }
.gate-badge { position: absolute; inset: auto 16px 16px auto; display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 7px; background: rgba(5, 7, 12, .82); border: 1px solid rgba(255, 164, 101, .35); color: var(--gold); font-weight: 600; font-size: .85rem; backdrop-filter: blur(6px); }
.gate-badge svg { width: 16px; height: 16px; }
@media (max-width: 860px) { .gate { padding: 28px 16px 56px; } .gate-in { grid-template-columns: 1fr; gap: 28px; } }

/* ---- v6 polish: quieter, more editorial look */
.eyebrow { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: .86rem; font-weight: 550; color: var(--accent-2); margin-bottom: 10px; }
.hero::after { display: none; }
.hero::before { opacity: .55; }
.hero { padding: 84px 0 64px; }
h1 { font-weight: 650; letter-spacing: -0.04em; }
.btn { border-radius: 6px; }
.promo { background: #eaf3fd; }
.promo .dot { box-shadow: none; }
.live-card { padding: 0; overflow: hidden; }
.live-card canvas { border-radius: 0 !important; }
.lc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.lc-px { display: flex; align-items: center; gap: 10px; }
.lc-px .mono { font-size: .9rem; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 600; color: var(--bull); text-transform: uppercase; letter-spacing: .06em; }
.live-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--bull); animation: ldot 1.6s infinite; }
@keyframes ldot { 50% { opacity: .3; } }
.tickers { border-bottom: 1px solid var(--line); background: var(--bg-2); }
.tickers .wrap { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
.tickers .wrap::-webkit-scrollbar { display: none; }
.tk { display: grid; grid-template-columns: auto auto; gap: 0 10px; padding: 14px 22px; border-right: 1px solid var(--line); color: var(--text); white-space: nowrap; flex: 1 0 auto; }
.tk:first-child { padding-left: 0; }
.tk:last-child { border-right: 0; }
.tk:hover { color: var(--text); background: var(--panel-2); }
.tk .n { grid-column: 1 / -1; font-size: .76rem; color: var(--muted); }
.tk .p { font-size: .95rem; font-weight: 600; }
.tk .c { font-size: .8rem; align-self: end; }
.rv-stars { display: flex; gap: 4px; margin: 10px 0; }
.rv-stars button { font-size: 1.5rem; line-height: 1; background: none; border: 0; padding: 2px; cursor: pointer; color: var(--line-2); transition: color .1s; }
.rv-stars button.on, .rv-stars:hover button { color: var(--gold); }
.rv-stars button:hover ~ button { color: var(--line-2); }
.rv-note { margin-top: 10px; padding: 10px 12px; border-radius: 7px; background: rgba(255,164,101,.07); border: 1px solid rgba(255,164,101,.22); font-size: .84rem; color: var(--text-2); }
.rv-note b { color: var(--gold); margin-right: 6px; }

/* ---- phone layout */
.nav-m { display: none; align-items: center; gap: 8px; margin-left: auto; }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 7px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 4px; padding: 0; }
.menu-btn span { width: 17px; height: 1.6px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav.open .menu-btn span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.nav.open .menu-btn span:nth-child(2) { opacity: 0; }
.nav.open .menu-btn span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }
.promo .ps { display: none; }
@media (max-width: 860px) {
  .nav .wrap { height: 58px; padding-top: 0; padding-bottom: 0; flex-wrap: nowrap; gap: 10px; }
  .nav-m { display: flex; }
  .menu-btn { display: flex; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 16px 18px; background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: 0 30px 60px rgba(15,23,42,.12); max-height: calc(100vh - 58px); overflow-y: auto; }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 12px 12px; font-size: 1rem; }
  .nav-links .me-chip { display: none !important; }
  .nav-links .btn { margin: 8px 0 0; }
  .nav-links .badge { align-self: flex-start; margin: 8px 0 0 12px !important; }
  .brand { font-size: .98rem; min-width: 0; }
  .brand span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .promo { gap: 10px; padding: 7px 12px; font-size: .78rem; flex-wrap: nowrap; }
  .promo .pl, .promo .go, .promo .dot { display: none; }
  .promo .ps { display: inline; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .promo .mono { white-space: nowrap; font-size: .72rem; }
  .sup-btn { width: 48px; height: 48px; padding: 0; justify-content: center; right: 14px; bottom: 14px; }
  .sup-btn span { display: none; }
  .hero { padding: 40px 0 36px; }
  section { padding-top: 56px; padding-bottom: 56px; }
}
@media (max-width: 380px) { .nav-m .me-chip .mono { display: none; } .nav-m .me-chip { padding: 3px !important; } }
/* ---- indicator picker (tabs) */
.ip-search { padding: 10px 12px; font-size: .9rem; }
.ip-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
@media (max-width: 600px) { .ip-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-right: -18px; padding-right: 18px; } }
.ip-tabs::-webkit-scrollbar { display: none; }
.ip-tabs.dim { opacity: .45; }
.ip-tabs button { flex: none; font: inherit; font-size: .82rem; font-weight: 500; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.ip-tabs button span { font-family: var(--mono); font-size: .7rem; color: var(--muted); opacity: .8; }
.ip-tabs button:hover { color: var(--text); border-color: var(--line-2); }
.ip-tabs button.on { background: var(--accent-soft); color: var(--text); border-color: rgba(128,178,240,.5); }
.ip-tabs button.on span { color: var(--accent-2); opacity: 1; }
.ip-note { margin-top: 10px; font-size: .84rem; }
.ip-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 8px; border-radius: 7px; cursor: pointer; }
.ip-item:hover { background: var(--panel-2); }
.ip-item.on { background: rgba(128,178,240,.07); }
.ip-item input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.ip-lock { color: var(--gold); margin-top: 1px; flex: none; display: inline-flex; }
.ip-txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ip-nm { font-weight: 600; font-size: .92rem; }
.ip-ds { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.ip-ls { font-size: .78rem; white-space: nowrap; margin-top: 2px; }
.ip-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.ip-star { font: inherit; font-size: 1.15rem; line-height: 1; background: none; border: 0; padding: 0 2px; cursor: pointer; color: var(--muted); }
.ip-star:hover { color: var(--gold); }
.ip-star.on { color: var(--gold); }
.upd-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; border-radius: 8px; background: var(--panel-2); border: 1px solid rgba(128,178,240,.5); box-shadow: 0 20px 50px rgba(0,0,0,.6); font-size: .9rem; max-width: calc(100vw - 32px); }
@media (max-width: 600px) { .upd-bar { bottom: 74px; font-size: .84rem; } }
.nav-login { color: var(--text-2); font-size: .92rem; font-weight: 550; padding: 8px 6px; }

/* ---- v9: sky-blue theme details, sharper look, logo, iPhone install tip */
.sup-btn { color: var(--accent-ink) !important; }
.sup-btn:hover { background: #9cc3f4 !important; }
.brand-mark { background: var(--accent); border-radius: 7px; display: grid; place-items: center; }
.brand-mark::before { display: none; }
.brand-mark svg { width: 18px; height: 18px; }
.card { border-radius: var(--radius); }
.btn { border-radius: 6px; }
.ios-tip { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 95; background: #f4f8fe; color: #05070c; border-radius: 12px; padding: 14px 16px 14px 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 20px 50px rgba(0,0,0,.55); font-size: .9rem; line-height: 1.45; }
.ios-tip img { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.ios-tip b { display: block; }
.ios-tip .x { background: none; border: 0; font-size: 1.3rem; color: #4a5568; cursor: pointer; padding: 4px; margin-left: auto; align-self: flex-start; }
.ios-share { display: inline-block; width: 14px; height: 16px; vertical-align: -2px; }
/* collapse the menu earlier so it never wraps (tablets, small laptops) */
@media (max-width: 1480px) {
  .nav .wrap { height: 58px; padding-top: 0; padding-bottom: 0; flex-wrap: nowrap; gap: 10px; }
  .nav-m { display: flex; }
  .menu-btn { display: flex; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 16px 18px; background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: 0 30px 60px rgba(15,23,42,.12); max-height: calc(100vh - 58px); overflow-y: auto; }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 12px; font-size: 1rem; }
  .nav-links .me-chip { display: none !important; }
  .nav-links .btn { margin: 8px 0 0; }
  .nav-links .badge { align-self: flex-start; margin: 8px 0 0 12px !important; }
}
@media (min-width: 1481px) { .nav-links { flex-wrap: nowrap; } .nav-links a { white-space: nowrap; } }
.optin { display: flex !important; gap: 10px; align-items: flex-start; margin: 14px 0 4px !important; font-size: .86rem; color: var(--text-2); font-weight: 400 !important; cursor: pointer; }
.optin input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.ref-box { display: flex; gap: 8px; margin-top: 10px; }
.ref-box input { font-family: var(--mono); font-size: .85rem; }
/* ---- upcoming events */
.ev-day { font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 18px 4px 6px; border-bottom: 1px solid var(--line); }
.ev-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.ev-time { font-size: .8rem; color: var(--muted); }
.ev-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.ev-title { font-weight: 550; }
.ev-extra { font-size: .8rem; color: var(--muted); width: 100%; }
.ev-tag { font-family: var(--mono); font-size: .7rem; font-weight: 600; padding: 2px 6px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text-2); }
.ev-tag.earn { background: var(--accent-soft); border-color: rgba(128,178,240,.35); color: var(--accent-2); }
.ev-imp { font-size: .7rem; font-weight: 600; padding: 3px 7px; border-radius: 4px; white-space: nowrap; }
.ev-imp.hi { background: rgba(242,84,91,.12); color: #ff8a8f; }
.ev-imp.md { background: rgba(255,164,101,.1); color: var(--gold); }
@media (max-width: 600px) { .ev-row { grid-template-columns: 1fr auto; } .ev-time { grid-column: 1 / -1; } }
/* ---- lesson quiz */
.lq { margin-top: 34px; padding: 22px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); }
.lq-q { margin-top: 16px; }
.lq-t { font-weight: 600; margin-bottom: 8px; }
.lq-o { display: block; width: 100%; text-align: left; font: inherit; font-size: .9rem; padding: 10px 12px; margin: 6px 0; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text-2); cursor: pointer; line-height: 1.45; }
.lq-o:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.lq-o.ok { border-color: var(--bull); background: rgba(32,201,151,.1); color: var(--text); }
.lq-o.bad { border-color: var(--bear); background: rgba(242,84,91,.1); }
.lq-o.dim { opacity: .5; }
.lq-res { margin-top: 14px; font-size: .95rem; }
.ch-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.ch-bar { height: 5px; background: var(--panel-2); border-radius: 3px; overflow: hidden; margin-top: 5px; }
.ch-bar div { height: 100%; background: var(--accent); }
.ch-row.done .ch-bar div { background: var(--bull); }
@media (max-width: 600px) {
  .ex-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .lesson-body .sketch svg { border-radius: 6px; }
}
a.stat-link { color: var(--text); display: block; transition: border-color .15s, background .15s; }
a.stat-link:hover { border-color: var(--accent); background: var(--panel-2); color: var(--text); }
.optin.reward { background: rgba(255,164,101,.07); border: 1px solid rgba(255,164,101,.3); border-radius: 7px; padding: 10px 12px; }
.optin.reward b { color: var(--gold); }

/* ---- v10: light theme (white + light sky blue, black text). Charts stay on dark panels like TradingView's dark charts. */
html { background: #ffffff; }
body { background: linear-gradient(180deg, #cfe3fb 0px, #e6f1fd 320px, #f5f9ff 720px, #ffffff 1100px) no-repeat, #ffffff; }
.card { box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.hero::before { background: radial-gradient(closest-side, rgba(128,178,240,.28), transparent) !important; opacity: 1 !important; }
.hero { background: transparent; }
.tickers { background: rgba(255,255,255,.6); }
.btn { background: #ffffff; }
.btn:hover { border-color: var(--accent); background: var(--panel-2); color: var(--text); }
.btn.primary, .btn.primary:hover { color: #0b1220; }
.btn.gold { color: #ffffff; background: var(--gold); border-color: var(--gold); }
.btn.gold:hover { background: #c96a23; border-color: #c96a23; color: #fff; }
.btn.bull { color: #ffffff; }
input, select, textarea { background: #ffffff; color: var(--text); border-color: var(--line-2); }
.nav-links a:hover, .nav-links a.active { background: var(--panel-2); color: var(--text); }
.me-chip { background: #ffffff; }
.menu-btn { background: #ffffff; }
.menu-btn span { background: var(--text); }
.promo { color: var(--text-2); border-bottom: 1px solid var(--line); }
.notice { color: var(--text); }
.upd-bar { background: #ffffff; box-shadow: 0 20px 50px rgba(15,23,42,.2); }
dialog { box-shadow: 0 30px 80px rgba(15,23,42,.25); }
dialog::backdrop { background: rgba(15,23,42,.45) !important; }
.sup-panel { box-shadow: 0 30px 80px -20px rgba(15,23,42,.35); }
table.table th { color: var(--muted); }
.badge.premium { background: var(--gold-soft); color: var(--gold); }
.badge.free { background: var(--accent-soft); color: var(--accent-2); }
.pos { color: var(--bull); } .neg { color: var(--bear); }
/* chart panels follow the theme */
:root { --chart-bg: #ffffff; --chart-line: #e1e9f4; }
.live-card, .hero-art.live-card { background: var(--chart-bg) !important; border-color: var(--chart-line) !important; color: var(--text); }
.chart-wrap, .ex-card, .gate-art { background: var(--chart-bg) !important; border-color: var(--chart-line) !important; }

/* theme toggle */
.theme-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none; }
.theme-btn:hover { border-color: var(--accent); }
.theme-btn svg { width: 17px; height: 17px; }

/* ---- dark mode */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #05070c; --bg-2: #090c13; --panel: #0c1018; --panel-2: #121722;
  --line: #1a2130; --line-2: #262f42;
  --text: #eef2f8; --text-2: #c4cbd8; --muted: #8790a3;
  --accent-2: #a9cbf5; --accent-soft: rgba(128,178,240,.12);
  --gold: #ffa465; --gold-soft: rgba(255,164,101,.12);
  --bull: #20c997; --bear: #f2545b;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 20px 50px -20px rgba(0,0,0,.6);
  --chart-bg: #080b12; --chart-line: #1a2130;
  background: #05070c;
}
html[data-theme="dark"] body { background: linear-gradient(180deg, #0c1a2e 0px, #08101c 360px, #05070c 900px) no-repeat, #05070c; }
html[data-theme="dark"] .nav { background: rgba(5,7,12,.82); }
html[data-theme="dark"] .tickers { background: rgba(9,12,19,.7); }
html[data-theme="dark"] .card { box-shadow: none; }
html[data-theme="dark"] .btn:not(.primary):not(.gold):not(.bull):not(.bear) { background: var(--panel); }
html[data-theme="dark"] .btn.primary, html[data-theme="dark"] .btn.primary:hover { color: #05070c; }
html[data-theme="dark"] .btn.gold, html[data-theme="dark"] .btn.gold:hover { color: #1a1205; }
html[data-theme="dark"] .btn.gold:hover { background: #ffb37f; border-color: #ffb37f; }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: var(--panel-2); }
html[data-theme="dark"] .me-chip, html[data-theme="dark"] .menu-btn { background: var(--panel); }
html[data-theme="dark"] .promo { background: #0a0e17; }
html[data-theme="dark"] .upd-bar { background: var(--panel); box-shadow: 0 20px 50px rgba(0,0,0,.6); }
html[data-theme="dark"] dialog { box-shadow: 0 30px 80px rgba(0,0,0,.6); }
html[data-theme="dark"] dialog::backdrop { background: rgba(0,0,0,.6) !important; }
html[data-theme="dark"] .sup-panel { box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); }
html[data-theme="dark"] .nav-links { box-shadow: 0 30px 60px rgba(0,0,0,.6); }
html[data-theme="dark"] .hero::before { background: radial-gradient(closest-side, rgba(128,178,240,.14), transparent) !important; }

/* prize banner: link + close button */
.promo { position: relative; padding-left: 40px; padding-right: 40px; }
.promo-in { display: flex; align-items: center; justify-content: center; gap: inherit; flex-wrap: inherit; color: inherit; min-width: 0; text-decoration: none; }
.promo-in:hover { color: var(--text); }
.promo-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 1.15rem; line-height: 1; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; }
.promo-x:hover { background: var(--accent-soft); color: var(--text); }
@media (max-width: 860px) { .promo { padding-left: 12px; padding-right: 38px; justify-content: flex-start; } .promo-in { justify-content: flex-start; } }

/* live numbers keep their width so the page never shifts */
.mono, .tk .p, .tk .c, #px, #chg, .kv span, .big { font-variant-numeric: tabular-nums; }
.tk .p, .tk .c { white-space: nowrap; }
/* theme button on desktop: show the small right-hand group with only the toggle */
@media (min-width: 1481px) {
  .nav-m { display: flex; order: 5; margin-left: 10px; }
  .nav-m .me-chip, .nav-m .nav-login, .nav-m .menu-btn { display: none !important; }
}

.trial-cta { margin-top: 18px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--gold); background: var(--gold-soft); font-size: .92rem; line-height: 1.5; color: var(--text); }

/* Premium crown on the avatar */
.me-chip .av, .nav .av { position: relative; overflow: visible !important; }
.av-crown { position: absolute; top: -9px; left: 50%; transform: translateX(-50%) rotate(-8deg); width: 15px; height: 15px; color: #e7a51b; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); pointer-events: none; }
.av-crown svg { width: 100%; height: 100%; display: block; }
.me-chip .av img, .nav .av img { border-radius: 50%; }
/* brand name always on one line */
.brand { white-space: nowrap; flex: none; }
.brand span:last-child { white-space: nowrap; }
@media (max-width: 860px) { .brand { flex: 0 1 auto; min-width: 0; } }
@media (max-width: 400px) { .brand { font-size: .92rem; gap: 8px; } .brand-mark { width: 30px !important; height: 30px !important; } .nav-m { gap: 6px; } .nav-m .me-chip .mono { display: none; } .nav-m .me-chip { padding: 3px !important; } }
@media (max-width: 340px) { .brand { font-size: .84rem; } }
/* lesson reader on phones: same side margins as every other page */
@media (max-width: 900px) { .reader { padding-top: 18px; } .lesson-body { font-size: 1rem; } .lesson-body .sketch, .lesson-body .examples { margin-left: 0; margin-right: 0; } }
/* very small phones: the theme toggle moves into the ☰ menu so the brand name fits */
.menu-theme { display: none; }
@media (max-width: 370px) { .nav-m .theme-btn { display: none; } .nav-links .menu-theme { display: flex; } }

/* ===== v12 navigation: tabs always on top, no ☰ menu ===== */
.menu-btn, .nav-m .theme-btn { display: none !important; }
.nav-links .menu-theme { display: inline-flex !important; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0 !important; margin-left: 6px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 1rem !important; color: var(--text-2); flex: none; }
.nav-links .menu-theme:hover { border-color: var(--accent); color: var(--text); background: transparent; }
@media (min-width: 1481px) { .nav-m { display: none !important; } }
@media (max-width: 1480px) {
  .nav .wrap { height: auto !important; flex-wrap: wrap !important; padding-top: 8px !important; padding-bottom: 0 !important; row-gap: 4px; }
  .nav-m { display: flex !important; margin-left: auto; }
  .nav-links, .nav.open .nav-links {
    display: flex !important; order: 10; position: static !important; width: 100%; margin: 0 !important; flex-direction: row !important; flex-wrap: nowrap !important;
    align-items: center !important; gap: 2px !important; overflow-x: auto; overflow-y: hidden; max-height: none !important; padding: 2px 0 8px !important;
    background: transparent !important; border: 0 !important; box-shadow: none !important; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent);
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { padding: 7px 11px !important; font-size: .88rem !important; white-space: nowrap; flex: none; }
  .nav-links .me-chip { display: none !important; }
  .nav-links .btn { margin: 0 0 0 6px !important; flex: none; }
  .nav-links .badge { margin: 0 0 0 6px !important; align-self: center !important; flex: none; }
}
@media (max-width: 600px) { .nav .wrap { padding-top: 6px !important; } .nav-links a { padding: 6px 10px !important; font-size: .86rem !important; } }

/* ===== v13 top bar: logo left · tabs centred · account right ===== */
.nav .wrap.nav3 { display: grid !important; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: 16px; row-gap: 0; height: 64px !important; padding-top: 0 !important; padding-bottom: 0 !important; flex-wrap: nowrap !important; }
.nav3 .brand { justify-self: start; }
.nav3 .nav-links, .nav.open .nav3 .nav-links { justify-self: center; margin: 0 !important; display: flex !important; flex-wrap: nowrap !important; position: static !important; flex-direction: row !important; align-items: center !important; gap: 2px !important; padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; max-height: none !important; overflow: visible; -webkit-mask-image: none; mask-image: none; width: auto; order: 0; }
.nav3 .nav-links a { white-space: nowrap; flex: none; padding: 7px 11px !important; font-size: .9rem !important; }
.nav-r { justify-self: end; display: flex; align-items: center; gap: 8px; min-width: 0; }
.nav-r .nav-cta { margin: 0 !important; white-space: nowrap; }
.nav-r .nav-login { color: var(--text-2); font-size: .9rem; padding: 6px 8px; white-space: nowrap; }
.theme-ic { width: 34px; height: 34px; flex: none; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text-2); font-size: 1rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.theme-ic:hover { border-color: var(--accent); color: var(--text); }
/* narrower screens: tabs move to a centred second row that scrolls sideways when needed */
@media (max-width: 1700px) {
  .nav .wrap.nav3 { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand right" "tabs tabs"; height: auto !important; padding-top: 8px !important; }
  .nav3 .brand { grid-area: brand; }
  .nav3 .nav-r { grid-area: right; }
  .nav3 .nav-links, .nav.open .nav3 .nav-links { grid-area: tabs; justify-self: stretch; width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 4px 0 8px !important; }
  .nav3 .nav-links::-webkit-scrollbar { display: none; }
  .nav3 .nav-links > :first-child { margin-left: auto !important; }   /* centred when it fits, scrollable from the start when it doesn't */
  .nav3 .nav-links > :last-child { margin-right: auto !important; }
  .nav3 .nav-links a { font-size: .88rem !important; }
}
@media (max-width: 600px) {
  .nav .wrap.nav3 { padding-top: 6px !important; column-gap: 8px; }
  .nav3 .nav-links a { padding: 6px 9px !important; font-size: .85rem !important; }
  .nav-r { gap: 6px; }
  .nav-r .badge.nav-cta { display: none; }
  .nav-r .btn.nav-cta { padding: 6px 9px; font-size: .76rem; }
  .nav-r .me-chip .mono { display: none; }
  .nav-r .me-chip { padding: 3px !important; }
}
@media (max-width: 380px) { .nav-r .btn.nav-cta { display: none; } .theme-ic { width: 30px; height: 30px; } }

/* phones: logo and account buttons share the top row without overlapping */
.cta-s { display: none; }
.nav3 .brand { min-width: 0; overflow: hidden; }
.nav3 .brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav3 .brand-mark { flex: none; }
@media (max-width: 600px) { .cta-l { display: none; } .cta-s { display: inline; } .nav-r .btn { white-space: nowrap; flex: none; } }
@media (max-width: 480px) { .nav-r .theme-ic { display: none; } .nav-r .nav-login { padding: 6px 4px; } }
@media (max-width: 380px) { .nav-r .btn.nav-cta { display: inline-flex !important; padding: 5px 8px; font-size: .72rem; } .nav3 .brand { font-size: .86rem; gap: 7px; } .nav3 .brand-mark { width: 28px !important; height: 28px !important; } }
.nav3 .brand { max-width: 100%; } .nav3 .brand span:last-child { min-width: 0; }
@media (max-width: 380px) { .nav-r .nav-login { display: none; } .nav3 .brand { font-size: .82rem; } .nav-r .btn { padding: 5px 9px; font-size: .74rem; } }
@media (max-width: 360px) { .nav-r { gap: 4px; } .nav-r .btn.nav-cta { padding: 4px 7px !important; font-size: .7rem !important; } .nav3 .brand { gap: 6px; font-size: .8rem; } .nav3 .brand-mark { width: 26px !important; height: 26px !important; } .nav .wrap.nav3 { column-gap: 6px; padding-left: 14px !important; padding-right: 14px !important; } }
