/* =====================================================================
   Trading Live — tema escuro por defeito, claro automático ou manual
   ===================================================================== */
:root {
  --bg: #0a0e14; --bg-2: #0e131b; --panel: rgba(20, 27, 37, .72); --panel-solid: #141b25; --panel-2: #1a2330;
  --line: rgba(148, 163, 184, .12); --line-2: rgba(148, 163, 184, .2);
  --text: #e8edf3; --muted: #8b97a8; --faint: #5d6878;
  --green: #22c55e; --green-2: #4ade80; --red: #f43f5e; --red-2: #fb7185; --amber: #f59e0b; --blue: #3b82f6; --violet: #8b5cf6;
  --green-bg: rgba(34, 197, 94, .12); --red-bg: rgba(244, 63, 94, .12);
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px -12px rgba(0,0,0,.6);
  --glow-1: rgba(59, 130, 246, .16); --glow-2: rgba(34, 197, 94, .10);
  --radius: 16px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f7fb; --bg-2: #eef2f8; --panel: rgba(255,255,255,.82); --panel-solid: #fff; --panel-2: #f1f4f9;
    --line: rgba(15, 23, 42, .08); --line-2: rgba(15, 23, 42, .14);
    --text: #0f172a; --muted: #5b6577; --faint: #94a3b8;
    --green: #16a34a; --green-2: #22c55e; --red: #e11d48; --red-2: #f43f5e;
    --green-bg: rgba(22, 163, 74, .1); --red-bg: rgba(225, 29, 72, .09);
    --shadow: 0 1px 2px rgba(15,23,42,.04), 0 12px 32px -16px rgba(15,23,42,.18);
    --glow-1: rgba(59, 130, 246, .10); --glow-2: rgba(34, 197, 94, .08);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f7fb; --bg-2: #eef2f8; --panel: rgba(255,255,255,.82); --panel-solid: #fff; --panel-2: #f1f4f9;
  --line: rgba(15, 23, 42, .08); --line-2: rgba(15, 23, 42, .14);
  --text: #0f172a; --muted: #5b6577; --faint: #94a3b8;
  --green: #16a34a; --green-2: #22c55e; --red: #e11d48; --red-2: #f43f5e;
  --green-bg: rgba(22, 163, 74, .1); --red-bg: rgba(225, 29, 72, .09);
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 12px 32px -16px rgba(15,23,42,.18);
  --glow-1: rgba(59, 130, 246, .10); --glow-2: rgba(34, 197, 94, .08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-bottom: 48px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.muted { color: var(--muted); } .small { font-size: 12px; }
.pos { color: var(--green); } .neg { color: var(--red); }
h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 32px 0 12px; font-weight: 700; }
.panel h2, .panel-head h2 { margin: 0; }
.bg-glow { position: fixed; inset: -20% -10% auto -10%; height: 70vh; pointer-events: none; z-index: 0;
  background: radial-gradient(40% 50% at 20% 20%, var(--glow-1), transparent 70%), radial-gradient(35% 45% at 85% 10%, var(--glow-2), transparent 70%); }
main, nav { position: relative; z-index: 1; }

/* ---- barra de topo */
.topbar { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--text); }

.badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.badge.on { background: var(--red-bg); color: var(--red-2); border: 1px solid color-mix(in srgb, var(--red) 45%, transparent); }
.badge.off { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-2); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.on .pulse { background: var(--red); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(244,63,94,.7); } 70% { box-shadow: 0 0 0 9px rgba(244,63,94,0); } 100% { box-shadow: 0 0 0 0 rgba(244,63,94,0); } }

.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.seg.small button { padding: 4px 9px; font-size: 12px; }
.seg button.active { background: var(--blue); color: #fff; box-shadow: 0 4px 14px -4px rgba(59,130,246,.6); }

.note { margin-top: 18px; padding: 10px 14px; border-radius: 10px; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); color: var(--amber); font-size: 13px; }

/* ---- hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: center; margin-top: 28px; }
.hero-id { display: flex; gap: 18px; align-items: center; min-width: 0; }
.avatar { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; font-weight: 800; font-size: 26px; color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet)); box-shadow: 0 12px 30px -10px rgba(59,130,246,.6); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero p { margin: 6px 0 0; font-size: 16px; max-width: 54ch; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.chip { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.chip.demo { color: var(--amber); }
.links { display: inline-flex; gap: 8px; }
.links a { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); text-decoration: none; }
.links a:hover { border-color: var(--blue); color: var(--blue); }
.hero-num { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 20px 22px 16px; box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.hero-num .label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.big { font-size: 48px; font-weight: 700; line-height: 1.1; margin-top: 4px; }
.spark svg { width: 100%; height: 56px; display: block; margin-top: 8px; }
.now { margin-top: 10px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.now b { color: var(--text); }
.now .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.now.on .dot { background: var(--green); box-shadow: 0 0 0 4px var(--green-bg); }

/* ---- KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.kpi { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); overflow: hidden; min-height: 116px; }
.kpi .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.kpi .value { font-size: 28px; font-weight: 700; margin-top: 6px; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi.today.up { background: linear-gradient(160deg, var(--green-bg), var(--panel) 60%); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.kpi.today.down { background: linear-gradient(160deg, var(--red-bg), var(--panel) 60%); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.kpi .ring { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 64px; height: 64px; }
.kpi .ring circle { fill: none; stroke-width: 7; }
.kpi .ring .track { stroke: var(--panel-2); } .kpi .ring .bar { stroke: var(--green); stroke-linecap: round; transition: stroke-dasharray .8s ease; }
.kpi .ddbar { height: 6px; border-radius: 3px; background: var(--panel-2); margin-top: 10px; overflow: hidden; }
.kpi .ddbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--red-2)); border-radius: 3px; }
.kpis-2 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-top: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.kpis-2 > div { padding: 12px 16px; border-left: 1px solid var(--line); min-width: 0; }
.kpis-2 > div:first-child { border-left: 0; }
.kpis-2 .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.kpis-2 .value { font-size: 17px; font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpis-2 .sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- posições */
.count { color: var(--faint); }
.positions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.empty { color: var(--muted); padding: 22px; border: 1px dashed var(--line-2); border-radius: var(--radius); text-align: center; background: var(--panel); }
.empty .em { font-size: 26px; display: block; margin-bottom: 6px; }
.empty blockquote { margin: 12px auto 0; max-width: 60ch; font-style: italic; color: var(--text); }
.pcard { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); overflow: hidden; }
.pcard::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; }
.pcard.long::before { background: var(--green); } .pcard.short::before { background: var(--red); }
.pcard .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tk { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.tk b { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.tk small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tkb { font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-2); letter-spacing: .02em; }
.dir { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; letter-spacing: .06em; }
.dir.long { background: var(--green-bg); color: var(--green); } .dir.short { background: var(--red-bg); color: var(--red); }
.pcard .pl { font-size: 32px; font-weight: 700; margin: 10px 0 0; }
.pcard .pl-sub { font-size: 12px; color: var(--muted); }
.pcard .meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; font-size: 12px; }
.pcard .meta b { display: block; font-size: 14px; color: var(--text); font-weight: 600; }
.pcard .meta span { color: var(--muted); }
.flash-up { animation: flashUp .9s ease; } .flash-down { animation: flashDown .9s ease; }
@keyframes flashUp { 0% { color: var(--green-2); text-shadow: 0 0 12px var(--green); } 100% { } }
@keyframes flashDown { 0% { color: var(--red-2); text-shadow: 0 0 12px var(--red); } 100% { } }
.pcard .note-text { margin-top: 12px; font-size: 13px; color: var(--text); border-top: 1px solid var(--line); padding-top: 10px; white-space: pre-line; opacity: .85; }
.range { position: relative; height: 8px; border-radius: 4px; margin: 16px 0 6px; background: linear-gradient(90deg, var(--red), color-mix(in srgb, var(--panel-2) 80%, transparent) 45% 55%, var(--green)); opacity: .9; }
.range .mark { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--text); border-radius: 1px; opacity: .7; }
.range .mark.now { width: 14px; height: 14px; top: -3px; margin-left: -6px; border-radius: 50%; background: var(--blue); border: 2px solid var(--panel-solid); box-shadow: 0 0 0 3px rgba(59,130,246,.35); opacity: 1; transition: left .7s cubic-bezier(.2,.8,.2,1); }
.range-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-family: var(--mono); }
.orders { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.order { font-size: 12px; padding: 6px 12px; border-radius: 8px; background: var(--panel); border: 1px dashed var(--line-2); color: var(--muted); }

/* ---- painéis */
.grid2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; margin-top: 32px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; box-shadow: var(--shadow); backdrop-filter: blur(10px); min-width: 0; }
section.panel { margin-top: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.equity svg { width: 100%; height: auto; display: block; }
.equity .axis { stroke: var(--line-2); } .equity text { fill: var(--muted); font-size: 11px; font-family: var(--mono); }

/* ---- timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; max-height: 340px; overflow-y: auto; position: relative; }
.timeline li { position: relative; padding: 0 0 14px 26px; font-size: 13px; }
.timeline li::before { content: ''; position: absolute; left: 7px; top: 18px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline li:last-child::before { display: none; }
.timeline .ic { position: absolute; left: 0; top: 2px; width: 15px; height: 15px; border-radius: 50%; border: 3px solid var(--panel-solid); box-shadow: 0 0 0 1px var(--line-2); }
.ic.open { background: var(--blue); } .ic.close.win { background: var(--green); } .ic.close.loss { background: var(--red); } .ic.close { background: var(--faint); }
.ic.modify { background: var(--amber); } .ic.note, .ic.journal { background: var(--violet); } .ic.order_new, .ic.order_removed, .ic.partial { background: var(--faint); }
.timeline time { display: block; color: var(--faint); font-size: 11px; font-family: var(--mono); }
.timeline .res { display: inline-block; margin-left: 6px; font-family: var(--mono); font-weight: 700; padding: 1px 7px; border-radius: 6px; font-size: 12px; }
.res.pos { background: var(--green-bg); } .res.neg { background: var(--red-bg); }
.bubble { margin-top: 4px; padding: 8px 12px; border-radius: 4px 12px 12px 12px; background: color-mix(in srgb, var(--violet) 12%, transparent); border: 1px solid color-mix(in srgb, var(--violet) 25%, transparent); font-style: italic; }
.prov { color: var(--amber); font-size: 11px; margin-left: 6px; font-style: normal; }
.fresh { animation: fresh .8s ease; }
@keyframes fresh { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---- calendário */
.heatmap { overflow-x: auto; }
.cal { display: grid; grid-template-columns: 56px repeat(7, minmax(56px, 1fr)) minmax(64px, 1fr); gap: 6px; min-width: 560px; }
.cal .dh { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; text-align: center; padding-bottom: 2px; }
.cal .wk-l { font-size: 11px; color: var(--faint); font-family: var(--mono); align-self: center; }
.cal .cd { position: relative; min-height: 58px; border-radius: 10px; padding: 6px 8px; background: var(--panel-2); display: flex; flex-direction: column; justify-content: space-between; border: 1px solid transparent; }
.cal .cd.none { background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
.cal .cd.out { background: transparent; }
.cal .cd.is-today { border-color: var(--blue); }
.cal .dn { font-size: 11px; color: var(--muted); font-weight: 600; }
.cal .dv { font-size: 13px; font-weight: 700; }
.cal .dc { font-size: 10px; color: var(--muted); }
.cal .cd.wk { background: transparent; border: 1px dashed var(--line-2); }
.cal .cd.wk.pos .dv { color: var(--green); } .cal .cd.wk.neg .dv { color: var(--red); }
.cal .cd.g3 .dv, .cal .cd.l3 .dv, .cal .cd.g3 .dn, .cal .cd.l3 .dn, .cal .cd.g3 .dc, .cal .cd.l3 .dc { color: #fff; }
.legend { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); }
.legend span { margin: 0 4px; }
.legend i, .cal .cd { --g1: color-mix(in srgb, var(--green) 22%, transparent); --g2: color-mix(in srgb, var(--green) 45%, transparent); --g3: var(--green);
  --l1: color-mix(in srgb, var(--red) 22%, transparent); --l2: color-mix(in srgb, var(--red) 45%, transparent); --l3: var(--red); }
.legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--panel-2); }
.g1 { background: var(--g1) !important; } .g2 { background: var(--g2) !important; } .g3 { background: var(--g3) !important; }
.l1 { background: var(--l1) !important; } .l2 { background: var(--l2) !important; } .l3 { background: var(--l3) !important; }

/* ---- por índice */
.by-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ix { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: color-mix(in srgb, var(--panel-2) 50%, transparent); cursor: pointer; transition: border-color .2s, transform .2s; }
.ix:hover { border-color: var(--blue); transform: translateY(-1px); }
.ix .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ix .top b { font-weight: 800; }
.ix .contrib { font-family: var(--mono); font-weight: 700; }
.ix .row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.ix .bar { height: 5px; border-radius: 3px; background: var(--panel-2); margin-top: 8px; overflow: hidden; position: relative; }
.ix .bar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }

/* ---- semana */
.week-hi { display: grid; gap: 10px; }
.hi { border-radius: 14px; padding: 14px 16px; border: 1px solid var(--line); }
.hi.best { background: linear-gradient(140deg, var(--green-bg), transparent 70%); }
.hi.worst { background: linear-gradient(140deg, var(--red-bg), transparent 70%); }
.hi .lab { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--muted); }
.hi .val { font-size: 26px; font-weight: 700; margin-top: 4px; }
.hi .det { font-size: 12px; color: var(--muted); margin-top: 2px; }
.week-sum { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); padding: 2px 2px 0; }
.week-sum b { color: var(--text); font-family: var(--mono); }

/* ---- histórico */
.hist-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.idx-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.idx-chips button { font: inherit; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; font-family: var(--mono); }
.idx-chips button.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.hist-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 12px 0 6px; min-height: 32px; }
.hist-nav { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.hist-nav[hidden] { display: none; }
.hist-nav button, .pager button { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; }
.hist-nav button:disabled, .pager button:disabled { opacity: .35; cursor: default; }
.hist-summary { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.hist-summary b { color: var(--text); font-family: var(--mono); }
.hist-summary .pos b { color: var(--green); } .hist-summary .neg b { color: var(--red); }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td.num, td .mono { font-family: var(--mono); }
th { color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: color-mix(in srgb, var(--panel-2) 70%, transparent); }
.num { text-align: right; }
.money-hidden .money { display: none; }
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.pager[hidden] { display: none; }
.pager span { padding: 0 8px; }

/* ---- sobre + regras */
.about { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; margin-top: 32px; }
.kicker { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.about-card { position: relative; overflow: hidden; border-radius: 22px; padding: 26px 28px; border: 1px solid var(--line);
  background: radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--violet) 18%, transparent), transparent 60%),
              radial-gradient(90% 70% at 0% 100%, color-mix(in srgb, var(--blue) 14%, transparent), transparent 60%), var(--panel);
  box-shadow: var(--shadow); }
.about-card h3 { margin: 8px 0 10px; font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.about-card p { margin: 0; color: var(--text); opacity: .85; font-size: 15px; max-width: 60ch; }
.about-facts { margin-top: 20px; display: grid; gap: 14px; }
.about-facts .lab { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; }
.instr { display: flex; flex-wrap: wrap; gap: 8px; }
.instr .tk { padding: 5px 10px 5px 5px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.facts-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--green-bg); color: var(--green); }
.fact + .fact { background: var(--panel-2); color: var(--muted); }
.fact:empty { display: none; }
.rules-wrap { border-radius: 22px; padding: 26px 24px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); }
.rules { margin: 14px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rules li { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--panel-2) 60%, transparent); border: 1px solid var(--line); transition: transform .2s, border-color .2s; }
.rules li:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--blue) 40%, transparent); }
.rules .ri { flex: 0 0 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; font-weight: 800; font-family: var(--mono);
  background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 22%, transparent), color-mix(in srgb, var(--violet) 22%, transparent)); color: var(--blue); }
.rules b { display: block; font-size: 14px; margin-top: 1px; }
.rules .rt { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.45; }

footer { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 16px; }
footer p { margin: 0 0 6px; }

/* ---- animação de entrada */
.reveal { animation: reveal .6s cubic-bezier(.2,.8,.2,1) both; }
.reveal:nth-of-type(2) { animation-delay: .05s; } .reveal:nth-of-type(3) { animation-delay: .1s; } .reveal:nth-of-type(4) { animation-delay: .15s; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---- responsivo */
@media (max-width: 980px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis-2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis-2 > div:nth-child(4) { border-left: 0; }
  .kpis-2 > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .grid2, .hero, .about { grid-template-columns: 1fr; }
  .rules { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  h1 { font-size: 24px; }
  .big { font-size: 40px; }
  .avatar { flex-basis: 56px; width: 56px; height: 56px; font-size: 20px; border-radius: 18px; }
  .kpi .value { font-size: 24px; }
  .kpi .ring { width: 52px; height: 52px; }
  .kpis-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis-2 > div { border-left: 0 !important; border-top: 1px solid var(--line); }
  .kpis-2 > div:nth-child(-n+2) { border-top: 0; }
  .kpis-2 > div:nth-child(even) { border-left: 1px solid var(--line) !important; }
  .by-index { grid-template-columns: 1fr; }
  .brand span { display: none; }
  .panel { padding: 16px; }
}

/* calendário compacto no telemóvel */
@media (max-width: 560px) {
  .cal { min-width: 0; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(0, 1.1fr); gap: 3px; }
  .cal > .wk-h:first-child, .cal .wk-l { display: none; }
  .cal .cd { min-height: 42px; padding: 4px 5px; border-radius: 7px; }
  .cal .dh { font-size: 9px; letter-spacing: .02em; }
  .cal .dn { font-size: 10px; }
  .cal .dv { font-size: 10px; letter-spacing: -.04em; }
  .cal .dc { display: none; }
}

/* estilo + números de day trading */
.style-chips { display: inline-flex; gap: 8px; }
.chip.style { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); border-color: color-mix(in srgb, var(--blue) 30%, transparent); }
.day-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.day-stats:empty { display: none; }
.ds { padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--panel-solid) 65%, transparent); border: 1px solid var(--line); }
.ds .lab { display: block; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.ds b { display: block; font-size: 22px; margin-top: 2px; }
.ds small { font-size: 11px; color: var(--muted); }
@media (max-width: 560px) { .day-stats { grid-template-columns: 1fr 1fr; } }

/* dias positivos no topo */
.hero-green { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.hero-green:empty { display: none; }
.hg-txt { font-size: 14px; margin-top: 8px; }
.hg-txt b { font-size: 20px; margin-right: 2px; }
.hg-bar { height: 8px; border-radius: 4px; background: var(--red-bg); overflow: hidden; }
.hg-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--green), var(--green-2)); transition: width .8s ease; }

/* comunidade e apoio */
.icon-btn.discord { color: #5865f2; text-decoration: none; }
.icon-btn[hidden], .coffee-btn[hidden] { display: none; }
.coffee-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; background: #ffdd00; color: #1a1a1a;
  font-weight: 700; font-size: 13px; text-decoration: none; white-space: nowrap; box-shadow: 0 4px 14px -6px rgba(255,221,0,.7); }
.coffee-btn:hover { filter: brightness(1.05); }
.cta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.cta { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 20px; text-decoration: none; color: var(--text);
  border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s, border-color .2s; }
.cta:hover { transform: translateY(-3px); }
.cta[hidden] { display: none; }
.cta-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; margin-bottom: 6px; }
.cta b { font-size: 18px; letter-spacing: -.02em; }
.cta p { margin: 0; font-size: 14px; color: var(--muted); flex: 1; }
.cta-btn { align-self: flex-start; margin-top: 10px; padding: 9px 16px; border-radius: 11px; font-weight: 700; font-size: 14px; }
.cta.discord { background: radial-gradient(120% 90% at 100% 0%, rgba(88,101,242,.22), transparent 60%), var(--panel); }
.cta.discord:hover { border-color: rgba(88,101,242,.6); }
.cta.discord .cta-ic { background: rgba(88,101,242,.16); color: #5865f2; }
.cta.discord .cta-ic svg { width: 24px; height: 24px; }
.cta.discord .cta-btn { background: #5865f2; color: #fff; }
.cta.coffee { background: radial-gradient(120% 90% at 100% 0%, rgba(255,221,0,.2), transparent 60%), var(--panel); }
.cta.coffee:hover { border-color: rgba(234,179,8,.6); }
.cta.coffee .cta-ic { background: rgba(255,221,0,.2); }
.cta.coffee .cta-btn { background: #ffdd00; color: #1a1a1a; }
.cta.broker { background: radial-gradient(120% 90% at 100% 0%, var(--green-bg), transparent 60%), var(--panel); }
.cta.broker:hover { border-color: color-mix(in srgb, var(--green) 50%, transparent); }
.cta.broker .cta-ic { background: var(--green-bg); }
.cta.broker .cta-btn { background: var(--green); color: #fff; }
.cta .aff { font-size: 10.5px; color: var(--faint); line-height: 1.4; margin-top: 8px; }
@media (max-width: 560px) { .coffee-btn span { display: none; } .coffee-btn { padding: 0 10px; } }

/* cartão Discord com ações */
div.cta:hover { transform: none; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cta-actions .cta-btn { margin-top: 0; text-decoration: none; border: 0; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.cta-actions .cta-btn[hidden] { display: none; }
.cta.discord .cta-btn.ghost { background: transparent; color: var(--text); border: 1px solid color-mix(in srgb, #5865f2 45%, transparent); display: inline-flex; gap: 10px; align-items: center; }
.cta.discord .cta-btn.ghost .cp { font-size: 12px; color: #5865f2; font-weight: 700; }

/* SEO: título da secção Sobre passou a h2 */
.about-card h2.about-h { margin: 8px 0 10px; font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; color: var(--text); text-transform: none; }
/* FAQ */
.faq { margin-top: 32px !important; }
.faq h2 { margin: 0 0 12px !important; }
.faq details { border-top: 1px solid var(--line); }
.faq details:first-child { border-top: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 14px 32px 14px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq summary h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.faq details p { margin: 0 0 16px; color: var(--muted); max-width: 80ch; }
