/* Steve AI Traders (/ai-traders.html, Steve 17/11/2026): tema scuro della dashboard, un colore per trader
   (oro = Forex & Gold, blu = USA Stocks, turchese = ETF Funds), viola per l'AI. Proposta A "Scoreboard". */
:root {
  --ground: #0a0e18; --surface: #111726; --raised: #161d2f; --line: #1e2637; --line-soft: #171e2d;
  --ink: #e9edf5; --dim: #8d97ac; --muted: #5c6680; --ai: #a78bfa; --bull: #3ecf8e; --bear: #f2716f; --amber: #f0b850;
  --fx: #e8b94a; --us: #5b9cff; --etf: #2dd4c8; --ftmo: #a78bfa;
  --font-text: "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-num: "IBM Plex Mono", ui-monospace, "SF Mono", "Cascadia Mono", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font: 14px/1.5 var(--font-text); }
body { background: radial-gradient(900px 420px at 85% -140px, rgba(167, 139, 250, .12), transparent 70%), var(--ground); min-height: 100vh; }
a { color: var(--etf); }
[hidden] { display: none !important; }
.t-fx { --c: var(--fx); } .t-us { --c: var(--us); } .t-etf { --c: var(--etf); } .t-ftmo { --c: var(--ftmo); }
.tx-w { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.tx-top { border-bottom: 1px solid var(--line); }
.tx-top__in { display: flex; align-items: center; gap: 12px; min-height: 58px; flex-wrap: wrap; }
.tx-brand { display: flex; align-items: center; gap: 9px; color: var(--dim); text-decoration: none; font-weight: 600; min-width: 0; }
.tx-brand svg { width: 26px; height: 26px; flex: none; }
.tx-brand b { color: var(--ink); white-space: nowrap; }
.tx-sep { color: var(--muted); }
.tx-top__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tx-tag { font-size: 11.5px; color: var(--ai); border: 1px dashed rgba(167, 139, 250, .5); border-radius: 999px; padding: 3px 10px; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.tx-tag__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bull, #3ecf8e); box-shadow: 0 0 0 3px rgba(62, 207, 142, .18); }
.tx-pub { font-size: 12.5px; color: var(--dim); text-decoration: none; white-space: nowrap; }
.tx-pub:hover { color: var(--ink); }

.tx-hero h1 { font-size: 32px; margin: 26px 0 4px; letter-spacing: -.02em; }
.tx-lead { color: var(--dim); margin: 0 0 20px; max-width: 920px; line-height: 1.55; }
.tx-lead b { color: var(--ink); font-weight: 600; }
/* testata (Steve 19/11: "evidenzia meglio e rendi più figo"): frase grande, gabbia in tre passi, motto */
.tx-hero .tx-lead { font-size: 18px; color: #c3cad8; max-width: 860px; margin: 8px 0 22px; text-wrap: pretty; }
.tx-hero .tx-lead em { font-style: normal; color: var(--fx); font-weight: 600; }
.tx-cage { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.tx-cage__s { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 22px 20px 26px; min-width: 0; }
.tx-cage__s + .tx-cage__s { border-left: 1px solid var(--line); }
.tx-cage__s + .tx-cage__s::before { content: ""; position: absolute; left: -10px; top: 21px; width: 18px; height: 18px; z-index: 1;
  background: var(--surface); border-top: 1.5px solid #3a4560; border-right: 1.5px solid #3a4560; transform: rotate(45deg); }
.tx-cage__s b { font-size: 16px; color: var(--ink); }
.tx-cage__t { color: var(--dim); font-size: 13.5px; line-height: 1.5; }
.tx-cage__s--rules { background: linear-gradient(180deg, rgba(232, 185, 74, .09), rgba(232, 185, 74, .03)); box-shadow: inset 0 0 0 1px rgba(232, 185, 74, .45); }
.tx-cage__s--rules::before { border-color: rgba(232, 185, 74, .55); }
.tx-cage__s--rules + .tx-cage__s::before { background: #17191f; border-color: rgba(232, 185, 74, .55); }
.tx-cage__s--rules b { color: var(--fx); }
.tx-cage__rules { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tx-cage__rules i { font-style: normal; font-size: 12.5px; color: #f1dca6; padding: 4px 10px; border-radius: 8px;
  border: 1px solid rgba(232, 185, 74, .35); background: rgba(232, 185, 74, .08); }
.tx-motto { margin: 0 0 28px; font-size: 26px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.tx-motto span { color: var(--fx); }
@media (max-width: 860px) {
  .tx-hero .tx-lead { font-size: 16px; }
  .tx-cage { grid-template-columns: 1fr; }
  .tx-cage__s + .tx-cage__s { border-left: 0; border-top: 1px solid var(--line); }
  .tx-cage__s + .tx-cage__s::before { left: 26px; top: -10px; transform: rotate(135deg); }
  .tx-cage__s { padding: 18px 20px 18px; }
  .tx-motto { font-size: 21px; }
}
.tx-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; min-width: 0; }
.tx-card__h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.tx-card__h h2 { font-size: 15px; margin: 0; }
.tx-sub { color: var(--muted); font-size: 12px; }
.tx-sp { flex: 1; }
.tx-num, .tx-n { font-family: var(--font-num); }
.up { color: var(--bull); } .dn { color: var(--bear); }
.tx-empty { color: var(--muted); margin: 6px 0; }

/* ---- schede in alto ---- */
.tx-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tx-tc { display: block; width: 100%; border-top: 3px solid var(--c); cursor: pointer; text-align: left; font: inherit; color: inherit; transition: border-color .15s, transform .15s; }
.tx-tc:hover { border-color: var(--c); }
.tx-tc.is-on { box-shadow: 0 0 0 1px var(--c), 0 12px 30px -16px var(--c); }
.tx-tc__h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tx-tc__h h2 { font-size: 16px; margin: 0; }
.tx-tc__b { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tx-tc__v { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tx-big { font: 700 24px var(--font-num); letter-spacing: -.01em; }
.tx-ret { font: 600 15px var(--font-num); }
.tx-off { color: var(--muted); font-size: 13px; padding: 16px 0 6px; }
.tx-badge { font-size: 10.5px; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--dim); white-space: nowrap; }
.tx-badge--real { color: #120b24; background: var(--fx); border-color: var(--fx); font-weight: 700; }
.tx-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted); }
.tx-dot.is-on { background: var(--bull); box-shadow: 0 0 0 3px rgba(62, 207, 142, .15); }
.tx-dot.is-late { background: var(--amber); box-shadow: 0 0 0 3px rgba(240, 184, 80, .15); }
.tx-kv { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; font-size: 12.5px; }
.tx-kv span { color: var(--dim); }
.tx-kv b { font: 600 12.5px var(--font-num); text-align: right; }
.tx-spark { height: 46px; margin: 4px 0 10px; overflow: hidden; }

/* ---- grafico di tutti ---- */
.tx-all { margin-top: 14px; }
.tx-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--dim); }
.tx-legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--c); }
.tx-chart { position: relative; }
.tx-chart svg { display: block; max-width: 100%; }
.tx-chart text { fill: var(--muted); font: 11px var(--font-num); }
.tx-chart__empty { color: var(--muted); font-size: 13px; padding: 30px 0; text-align: center; }
.tx-tip { position: absolute; pointer-events: none; background: #0c111e; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px;
  font: 12px var(--font-num); white-space: nowrap; transform: translate(-50%, -110%); z-index: 3; }
.tx-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 5px; }

/* ---- selettore ---- */
.tx-seg { display: flex; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 5px; margin: 22px 0 14px; overflow-x: auto; }
.tx-seg button { flex: 1; min-width: 140px; min-height: 44px; display: flex; align-items: center; gap: 8px; justify-content: center; background: transparent;
  border: 1px solid transparent; color: var(--dim); border-radius: 9px; padding: 10px 14px; font: 600 14px var(--font-text); cursor: pointer; }
.tx-seg button i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.tx-seg button:hover { color: var(--ink); }
.tx-seg button.is-on { background: var(--raised); color: var(--ink); border-color: var(--c); box-shadow: inset 0 -2px 0 var(--c); }

/* ---- dettaglio ---- */
.tx-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.tx-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tx-orig { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); cursor: pointer; }
.tx-day { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 0 8px; font-weight: 600; }
.tx-day:first-child { margin-top: 0; }
/* ---- diario: un resoconto = una scheda; l'ultimo aperto, gli altri chiusi con esito e conto ---- */
.tx-msg { border: 1px solid var(--line); border-radius: 12px; background: var(--raised); margin: 0 0 10px; overflow: hidden;
  box-shadow: inset 3px 0 0 var(--c); }
.tx-msg__h { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 14px 6px 16px; cursor: pointer; }
.tx-msg__h:focus-visible { outline: 2px solid var(--c); outline-offset: -2px; border-radius: 12px; }
.tx-slot { font: 700 12px var(--font-text); text-transform: uppercase; letter-spacing: .07em; color: var(--c); }
.tx-msg__h time { color: var(--dim); font-size: 12.5px; }
.tx-msg__st { font-size: 11px; color: var(--amber); }
.tx-msg__st--dim { color: var(--muted); }
.tx-nr { font-size: 11.5px; color: var(--muted); }
.tx-nr i { font-style: normal; }
.tx-nr .tx-n { color: var(--dim); }
.tx-chev { color: var(--muted); transition: transform .15s ease-out; }
.tx-msg.is-open .tx-chev { transform: rotate(180deg); }
.tx-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 0 14px 11px 16px; }
.tx-act { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); }
.tx-act--none { color: var(--muted); border-style: dashed; }
.tx-act--buy { color: var(--bull); border-color: rgba(62, 207, 142, .35); background: rgba(62, 207, 142, .07); }
.tx-act--stop { color: var(--amber); border-color: rgba(240, 184, 80, .35); background: rgba(240, 184, 80, .07); }
.tx-act--sell { color: var(--bear); border-color: rgba(242, 113, 111, .35); background: rgba(242, 113, 111, .07); }
.tx-acc { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.tx-acc > span { font-size: 11.5px; color: var(--dim); background: rgba(255, 255, 255, .035); border-radius: 6px; padding: 2px 7px; }
.tx-msg__b { display: none; border-top: 1px solid var(--line-soft); padding: 4px 14px 12px 16px; }
.tx-msg.is-open .tx-msg__b { display: block; }
.tx-rid { color: var(--muted); font: 10.5px var(--font-num); text-align: right; margin-top: 8px; }
.tx-blk { margin-top: 14px; }
.tx-blk h4 { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; font: 600 11.5px var(--font-text); text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); }
.tx-blk h4 i { font-style: normal; font-size: 13px; }
.tx-prose { color: #c9d0de; font-size: 13.5px; line-height: 1.6; max-width: 78ch; }
.tx-prose p { margin: 0 0 8px; }
.tx-lead2 { color: var(--ink); }
.tx-h5 { margin: 12px 0 5px; font: 600 11px var(--font-text); text-transform: uppercase; letter-spacing: .08em; color: var(--c); }
.tx-h5--tk { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--dim); }
.tx-l { margin: 0 0 8px; padding-left: 20px; }
.tx-l > li { margin: 3px 0; padding-left: 2px; }
.tx-l > li::marker { color: var(--c); font-weight: 600; }
.tx-sub-l { margin: 3px 0 4px; padding-left: 16px; color: var(--dim); }
.tx-sub-l li::marker { color: var(--muted); }
.tx-tk { display: inline-block; font: 600 .92em var(--font-text); letter-spacing: .02em; color: var(--ink);
  background: color-mix(in srgb, var(--c) 13%, transparent); border-radius: 5px; padding: 0 5px; line-height: 1.5; }
.tx-n { font-family: var(--font-num); font-size: .94em; color: var(--ink); }
.tx-n.up { color: var(--bull); } .tx-n.dn { color: var(--bear); }
.tx-team { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.tx-agent { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 9px 11px; }
.tx-agent b { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink); margin-bottom: 4px; }
.tx-agent b i { font-style: normal; }
.tx-agent p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tx-agent:hover p { -webkit-line-clamp: unset; }
.tx-wl { display: grid; gap: 6px; }
.tx-wl__r { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: 13px; color: #c9d0de;
  padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.tx-wl__r:last-child { border-bottom: 0; }
.tx-wl__r .tx-tk { justify-self: start; }
.tx-blk--next .tx-prose { background: rgba(255, 255, 255, .025); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px 4px; }
.tx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tx-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 4px 9px 4px 5px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line); color: var(--dim); }
.tx-chip i { font-style: normal; font-weight: 700; }
.tx-chip--up i { color: var(--bull); } .tx-chip--dn i { color: var(--bear); }
.tx-chip small { color: var(--muted); font-size: 11px; }
.tx-more2 { margin-top: 8px; }
.tx-more2 summary { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; color: var(--c); font-size: 13px; font-weight: 700;
  list-style: none; padding: 6px 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  background: color-mix(in srgb, var(--c) 14%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 8%, transparent);
  transition: background .15s ease, border-color .15s ease; user-select: none; }
.tx-more2 summary:hover { background: color-mix(in srgb, var(--c) 24%, transparent); border-color: var(--c); }
.tx-more2 summary:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.tx-more2:not([open]) summary { animation: tx-blink 1.6s ease-in-out infinite; }
.tx-more2:not([open]) summary:hover { animation-play-state: paused; }
@keyframes tx-blink {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 8%, transparent); border-color: color-mix(in srgb, var(--c) 55%, transparent);
    background: color-mix(in srgb, var(--c) 14%, transparent); }
  50% { box-shadow: 0 0 14px 4px color-mix(in srgb, var(--c) 45%, transparent); border-color: var(--c);
    background: color-mix(in srgb, var(--c) 30%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .tx-more2:not([open]) summary { animation: none; } }
.tx-more2 summary::-webkit-details-marker { display: none; }
.tx-more2 summary::before { content: "＋ "; }
.tx-more2[open] summary::before { content: "－ "; }
.tx-more2 > .tx-prose { margin-top: 10px; }
.tx-stat { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--ink); }
.tx-stat i { font-style: normal; }
.tx-mini { border-collapse: collapse; font-size: 12.5px; min-width: 260px; }
.tx-mini td { padding: 4px 12px 4px 0; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.tx-mini__bar { width: 120px; }
.tx-mini__bar i { display: block; height: 5px; border-radius: 3px; background: var(--c); opacity: .8; }
.tx-chart--eq { min-height: 140px; }
.tx-pos { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.tx-pos:last-child { border-bottom: 0; }
.tx-pos__s { font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; }
.tx-pos__s small { color: var(--muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-side { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; text-transform: uppercase; }
.tx-side--buy { color: var(--bull); background: rgba(62, 207, 142, .1); } .tx-side--sell { color: var(--bear); background: rgba(242, 113, 111, .1); }
.tx-pos__m { grid-column: 1 / -1; color: var(--muted); font: 11.5px var(--font-num); display: flex; gap: 10px; flex-wrap: wrap; }
.tx-wbar { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .06); overflow: hidden; margin-top: 3px; }
.tx-wbar i { display: block; height: 100%; background: var(--c); }
.tx-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tx-stats div { background: var(--raised); border-radius: 10px; padding: 10px; }
.tx-stats span { display: block; color: var(--muted); font-size: 11.5px; }
.tx-stats b { font: 600 16px var(--font-num); }
.tx-tbl-w { overflow-x: auto; }
.tx-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tx-tbl th { color: var(--muted); font-weight: 500; text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tx-tbl td { padding: 7px 8px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.tx-tbl .r { text-align: right; }
.tx-more { background: var(--raised); border: 1px solid var(--line); color: var(--dim); border-radius: 8px; padding: 4px 10px; font: 600 12px var(--font-text); cursor: pointer; }
.tx-more:hover { color: var(--ink); }
.tx-foot { margin: 26px 0 40px; color: var(--muted); font-size: 12px; }
.tx-gate { text-align: center; padding-top: 80px; color: var(--dim); }
.tx-gate h1 { color: var(--ink); }

@media (max-width: 900px) {
  .tx-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .tx-w { padding: 0 16px; }
  .tx-hero h1 { font-size: 26px; }
  .tx-cards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .tx-tc { scroll-snap-align: start; }
  .tx-seg button { min-width: 0; padding: 10px 8px; font-size: 13px; }
  .tx-top__right .tx-pub { display: none; }
}
