/* ExpertAdvision — carta millimetrata e inchiostro cobalto.
   Un'unica famiglia (Archivo) usata sull'asse della larghezza:
   espanso per i titoli, normale per il testo, condensato per i dati. */

@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/static/fonts/archivo-latin-wdth-normal.woff2) format("woff2-variations"), url(/static/fonts/archivo-latin-wdth-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/static/fonts/archivo-latin-ext-wdth-normal.woff2) format("woff2-variations"), url(/static/fonts/archivo-latin-ext-wdth-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root {
  --paper: #edf1f5;
  --sheet: #ffffff;
  --ink: #14233a;
  --muted: #5b6a7f;
  --line: #d3dce6;
  --grid: rgba(20, 35, 58, 0.045);
  --cobalt: #2d4cf0;
  --cobalt-ink: #ffffff;
  --cobalt-soft: rgba(45, 76, 240, 0.09);
  --up: #0b9a82;
  --down: #de4b3a;
  --amber: #c98a00;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1525;
    --sheet: #131f33;
    --ink: #e6ecf5;
    --muted: #8c9ab0;
    --line: #26354d;
    --grid: rgba(230, 236, 245, 0.035);
    --cobalt: #7c93ff;
    --cobalt-ink: #0c1525;
    --cobalt-soft: rgba(124, 147, 255, 0.12);
    --up: #31c7a8;
    --down: #ff6a55;
    --amber: #f2b632;
    color-scheme: dark;
  }
}
/* tema scelto con il pulsante sole/luna */
:root[data-theme="dark"] {
  --paper: #0c1525;
  --sheet: #131f33;
  --ink: #e6ecf5;
  --muted: #8c9ab0;
  --line: #26354d;
  --grid: rgba(230, 236, 245, 0.035);
  --cobalt: #7c93ff;
  --cobalt-ink: #0c1525;
  --cobalt-soft: rgba(124, 147, 255, 0.12);
  --up: #31c7a8;
  --down: #ff6a55;
  --amber: #f2b632;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 15.5px/1.6 var(--font);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.wide { font-stretch: 125%; font-variation-settings: "wdth" 125; }
.narrow { font-stretch: 75%; font-variation-settings: "wdth" 75; }

/* carta millimetrata */
.graph {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ------------------------------------------------------------------ marchio */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.wordmark {
  font-weight: 650; font-size: 17px; letter-spacing: -0.01em;
  font-stretch: 125%; font-variation-settings: "wdth" 125;
}

/* ------------------------------------------------------------------ login */
.login {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}
.login-side {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 40px 48px;
  border-right: 1px solid var(--line);
}
.login-side h1 {
  margin: 0 0 14px; max-width: 13ch;
  font-size: clamp(38px, 5.2vw, 68px); line-height: 1.02; font-weight: 700; letter-spacing: -0.025em;
  font-stretch: 125%; font-variation-settings: "wdth" 125;
}
.login-side p { margin: 0; max-width: 42ch; color: var(--muted); font-size: 17px; }
.horizon { display: block; width: 100%; height: 170px; margin-top: 28px; }
.login-main { display: grid; place-items: center; padding: 32px 24px; background: var(--sheet); }
.login-form { width: 100%; max-width: 340px; }
.login-form h2 { margin: 0 0 6px; font-size: 24px; font-weight: 650; font-stretch: 125%; font-variation-settings: "wdth" 125; }
.login-form .sub { margin: 0 0 26px; color: var(--muted); font-size: 14.5px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 13.5px; font-weight: 550; margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
}
.field input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
.btn-primary {
  width: 100%; padding: 13px; margin-top: 6px; border: 0; border-radius: 10px;
  background: var(--cobalt); color: var(--cobalt-ink); font-weight: 650; font-size: 15.5px;
}
.btn-primary:hover { filter: brightness(1.06); }
.error { color: var(--down); background: color-mix(in srgb, var(--down) 10%, transparent);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 16px; }
.login-foot { margin-top: 28px; font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------------ app */
.app { height: 100%; display: flex; flex-direction: column; }
header {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; background: var(--sheet); border-bottom: 1px solid var(--line);
}
header .spacer { flex: 1; }
.model { font-size: 12.5px; color: var(--muted); white-space: nowrap;
  font-stretch: 75%; font-variation-settings: "wdth" 75; }
.ghost { background: transparent; border: 1px solid var(--line); padding: 6px 12px; border-radius: 8px; font-size: 14px; }
.ghost:hover { border-color: var(--muted); }

.modes[hidden], .model[hidden] { display: none !important; }
.modes { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.modes button { border: 0; background: transparent; color: var(--muted); padding: 5px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 550; white-space: nowrap; }
.modes button.active { background: var(--ink); color: var(--paper); }
.modes button.off:not(.active) { opacity: 0.5; }

main { flex: 1; overflow-y: auto; }
.thread { max-width: 860px; margin: 0 auto; padding: 28px 20px 48px; }

/* stato vuoto */
.empty { padding-top: 4vh; }
.empty h2 {
  margin: 0; font-size: clamp(34px, 5vw, 56px); line-height: 1.04; font-weight: 700; letter-spacing: -0.025em;
  font-stretch: 125%; font-variation-settings: "wdth" 125;
}
.empty .lede { margin: 12px 0 0; color: var(--muted); max-width: 56ch; font-size: 16.5px; }
.empty .horizon { height: 120px; margin: 22px 0 18px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.quick button {
  display: inline-flex; align-items: baseline; gap: 8px;
  background: var(--sheet); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
  font-size: 14px; font-weight: 550;
}
.quick button small { color: var(--muted); font-weight: 400; font-size: 12.5px;
  font-stretch: 75%; font-variation-settings: "wdth" 75; }
.quick button:hover { border-color: var(--cobalt); color: var(--cobalt); }
.suggestions { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.suggestions button {
  text-align: left; background: none; border: 0; border-top: 1px solid var(--line);
  padding: 13px 0 14px; font-size: 15px;
}
.suggestions button small { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 2px;
  font-stretch: 75%; font-variation-settings: "wdth" 75; }
.suggestions button:hover span { color: var(--cobalt); }
.mode-hint {
  margin: 0 0 24px; padding: 12px 16px; font-size: 14px; max-width: 64ch;
  background: var(--cobalt-soft); border-left: 3px solid var(--cobalt); border-radius: 0 10px 10px 0;
}
.mode-hint code { font: 600 13px var(--font); font-stretch: 75%; font-variation-settings: "wdth" 75; }

/* messaggi */
.msg { margin-bottom: 26px; }
.msg.user { display: flex; justify-content: flex-end; }
.msg.user .bubble {
  max-width: 82%; padding: 10px 16px; white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--cobalt); color: var(--cobalt-ink); border-radius: 18px 18px 4px 18px; font-weight: 500;
}
.msg.assistant {
  background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px 8px;
}
.content { overflow-wrap: anywhere; }
.content p { margin: 0 0 12px; }
.content h1, .content h2, .content h3 { line-height: 1.2; letter-spacing: -0.01em; }
.content h1, .content h2 { font-size: 21px; margin: 4px 0 12px; font-weight: 700;
  font-stretch: 125%; font-variation-settings: "wdth" 125; }
.content h3 { font-size: 15.5px; margin: 20px 0 8px; font-weight: 650; }
.content ul, .content ol { padding-left: 20px; margin: 0 0 12px; }
.content li { margin-bottom: 4px; }
.content code { font: 600 13.5px var(--font); background: var(--cobalt-soft); padding: 1px 6px; border-radius: 5px; }
.content pre { background: var(--paper); padding: 12px; border-radius: 10px; overflow-x: auto; }
.content table {
  border-collapse: collapse; margin: 4px 0 16px; font-size: 14px; display: block; overflow-x: auto; max-width: 100%;
  font-variant-numeric: tabular-nums;
}
.content th, .content td { padding: 7px 16px 7px 0; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.content th { font-size: 12.5px; font-weight: 600; color: var(--muted); font-stretch: 75%; font-variation-settings: "wdth" 75; }
.content strong { font-weight: 650; }
.content em { color: var(--muted); }
.content a { color: var(--cobalt); }
.content blockquote { margin: 0 0 12px; padding: 2px 14px; border-left: 3px solid var(--cobalt); color: var(--muted); }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

.tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tool {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  font-size: 12.5px; color: var(--muted); background: var(--paper); border-radius: 999px; padding: 3px 11px;
  font-stretch: 75%; font-variation-settings: "wdth" 75;
}
.tool .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cobalt); flex: none; animation: pulse 1s ease-in-out infinite; }
.tool.ok .dot { background: var(--up); animation: none; }
.tool.err .dot { background: var(--down); animation: none; }
.tool .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes pulse { 50% { opacity: 0.25; } }

.chart-card { margin: 4px 0 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.chart-head .t { font-weight: 700; font-size: 16px; font-stretch: 125%; font-variation-settings: "wdth" 125; }
.chart-head .s { color: var(--muted); font-size: 12px; text-align: right; font-stretch: 75%; font-variation-settings: "wdth" 75; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 6px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 5px; border-radius: 1px; }
.chart { height: 380px; }

.typing { color: var(--muted); font-size: 14.5px; padding-bottom: 10px; }
.typing::after { content: ""; display: inline-block; width: 22px; height: 10px; margin-left: 6px; vertical-align: middle;
  background: linear-gradient(90deg, var(--cobalt) 0 4px, transparent 4px 9px, var(--cobalt) 9px 13px, transparent 13px 18px, var(--cobalt) 18px 22px);
  animation: pulse 1s ease-in-out infinite; }

/* barra di scrittura */
footer { padding: 12px 20px 10px; background: var(--sheet); border-top: 1px solid var(--line); }
.composer { max-width: 860px; margin: 0 auto; display: flex; gap: 10px; align-items: flex-end; }
.composer textarea {
  flex: 1; resize: none; min-height: 50px; max-height: 200px; padding: 13px 16px;
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 14px;
}
.composer textarea:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
.send { height: 50px; padding: 0 22px; border: 0; border-radius: 14px; background: var(--cobalt); color: var(--cobalt-ink); font-weight: 650; }
.send:disabled { opacity: 0.45; cursor: default; }
.disclaimer { max-width: 860px; margin: 7px auto 0; text-align: center; font-size: 11.5px; color: var(--muted); }

/* animazione dell'orizzonte: un solo momento, al caricamento */
.horizon .c { opacity: 0; animation: rise 0.5s ease-out forwards; }
.horizon .trend { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s 0.35s ease-out forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .horizon .c, .horizon .trend { animation: none; opacity: 1; stroke-dashoffset: 0; }
  .tool .dot, .typing::after { animation: none; }
}



/* ingresso suggerito sul grafico */
.chart-card { position: relative; }
.sig-holder { position: absolute; top: 74px; left: 8px; z-index: 5; }
.sig {
  width: 236px; padding: 12px 14px 10px; border-radius: 14px; background: var(--sheet);
  border: 1px solid var(--line); border-top: 4px solid var(--cobalt);
  box-shadow: 0 14px 34px rgba(12, 21, 37, 0.18); position: relative; animation: pop 0.25s ease-out;
}
.sig.buy { border-top-color: var(--up); }
.sig.sell { border-top-color: var(--down); }
.sig[hidden], .sig-chip[hidden] { display: none; }
.sig-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: var(--paper); font-size: 16px; line-height: 1; }
.sig-head { display: flex; align-items: baseline; gap: 8px; }
.sig-side { font-weight: 800; font-size: 20px; letter-spacing: 0.02em; font-stretch: 125%; font-variation-settings: "wdth" 125; }
.sig.buy .sig-side { color: var(--up); }
.sig.sell .sig-side { color: var(--down); }
.sig-how { color: var(--muted); font-size: 13px; }
.sig-price { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0 8px; }
.sig-rows { display: grid; grid-template-columns: auto 1fr auto; column-gap: 10px; row-gap: 3px; margin: 0; font-size: 13.5px; }
.sig-rows dt { color: var(--muted); }
.sig-rows dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.sig-rows .sig-rr { color: var(--muted); font-weight: 500; font-size: 12px; font-stretch: 75%; font-variation-settings: "wdth" 75; align-self: center; }
.sig-valid { display: flex; align-items: center; gap: 7px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; }
.sig-clock { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--cobalt); position: relative; flex: none; }
.sig-clock::after { content: ""; position: absolute; left: 3px; top: 1px; width: 1.5px; height: 4px; background: var(--cobalt); box-shadow: 1px 3px 0 -0.2px var(--cobalt); }
.sig-zone { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sig.expired { border-top-color: var(--muted); }
.sig.expired .sig-side, .sig.expired .sig-price, .sig.expired dd { color: var(--muted); }
.sig.expired .sig-price { text-decoration: line-through; }
.sig.expired .sig-clock { border-color: var(--down); }
.sig.expired .v-valid { color: var(--down); }
.sig-chip.expired { background: var(--muted); }
.sig-note { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }
.sig-chip { border: 0; border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 13px; color: #fff;
  box-shadow: 0 6px 16px rgba(12, 21, 37, 0.18); font-variant-numeric: tabular-nums; }
.sig-chip.buy { background: var(--up); }
.sig-chip.sell { background: var(--down); }
@media (max-width: 640px) {
  .sig-holder { position: static; margin: 8px 0 4px; }
  .sig { width: auto; box-shadow: none; }
}


/* ------------------------------------------------------------------ storico dei segnali */
a.ghost { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; }
a.brand { text-decoration: none; }
.hist { max-width: 1180px; margin: 0 auto; padding: 28px 20px 48px; }
.hist h1 { margin: 0; font-size: clamp(30px, 4.4vw, 48px); line-height: 1.05; font-weight: 700; letter-spacing: -0.025em;
  font-stretch: 125%; font-variation-settings: "wdth" 125; }
.hist .lede { margin: 10px 0 22px; color: var(--muted); max-width: 70ch; font-size: 16px; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; background: var(--sheet);
  border: 1px solid var(--line); border-radius: 16px; margin-bottom: 20px; }
.kpi { padding: 14px 18px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.kpi:first-child { border-left: 0; }
.kpi-v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; font-stretch: 125%; font-variation-settings: "wdth" 125; }
.kpi-v.up { color: var(--up); } .kpi-v.down { color: var(--down); }
.kpi-l { font-size: 13px; color: var(--muted); }
.hist-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.hist-bar .filters { margin: 0; }
.hist-upd { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.hist-list { background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.hist-empty { margin: 0; padding: 28px 20px; color: var(--muted); text-align: center; }
.hrow {
  display: grid; grid-template-columns: 92px 1.3fr 76px 1fr 1fr 1fr 92px 1.4fr 1fr; gap: 10px; align-items: center;
  padding: 11px 16px; border-top: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums;
}
.hrow:first-child { border-top: 0; }
.hrow small { display: block; color: var(--muted); font-size: 12px; font-stretch: 75%; font-variation-settings: "wdth" 75; }
.hhead { font-size: 12.5px; color: var(--muted); font-weight: 600; background: var(--paper); padding-top: 9px; padding-bottom: 9px;
  font-stretch: 75%; font-variation-settings: "wdth" 75; }
.side { font-style: normal; font-weight: 800; font-size: 13px; letter-spacing: 0.02em; }
.side.buy { color: var(--up); } .side.sell { color: var(--down); }
.badge { font-style: normal; display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.badge.win { background: color-mix(in srgb, var(--up) 14%, transparent); color: var(--up); }
.badge.loss { background: color-mix(in srgb, var(--down) 14%, transparent); color: var(--down); }
.badge.flat { background: var(--paper); color: var(--muted); }
.badge.open { background: var(--cobalt-soft); color: var(--cobalt); }
.res b { font-weight: 700; } .res b.up { color: var(--up); } .res b.down { color: var(--down); }
.hist-how { margin-top: 18px; font-size: 14px; color: var(--muted); }
.hist-how summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.hist-how ul { padding-left: 20px; max-width: 80ch; }
@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { border-left: 0; border-top: 1px solid var(--line); }
  .kpi:nth-child(-n+2) { border-top: 0; }
  .kpi:nth-child(2n) { border-left: 1px solid var(--line); }
  .kpi:last-child { grid-column: 1 / -1; border-left: 0; }
  .hist-bar { flex-direction: column; align-items: flex-start; }
  .hist-bar .filters { max-width: 100%; }
  .hhead { display: none; }
  .hrow { grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 14px 16px; }
  .hrow > span::before { content: attr(data-l); display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 1px; }
  .hrow > span[data-l="Strumento"] { grid-column: 1 / -1; font-size: 16px; order: -1; }
  .hrow > span[data-l="Strumento"]::before { display: none; }
}

/* ------------------------------------------------------------------ ruota dei mercati */
.markets { max-width: 860px; margin: 0 auto; padding: 28px 20px 8px; --row: 68px; }
.markets-intro h2 {
  margin: 0; font-size: clamp(32px, 5vw, 56px); line-height: 1.04; font-weight: 700; letter-spacing: -0.025em;
  font-stretch: 125%; font-variation-settings: "wdth" 125;
}
.markets-intro .lede { margin: 12px 0 0; color: var(--muted); max-width: 56ch; font-size: 16.5px; }
.markets-bar { display: none; }
.filters { display: flex; gap: 6px; margin: 22px 0 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filters::-webkit-scrollbar { display: none; }
.filters button {
  flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--sheet);
  font-size: 14px; font-weight: 550; white-space: nowrap;
}
.filters button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.wheel-wrap {
  position: relative; max-width: 620px; margin: 0 auto;
  background: var(--sheet); border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
}
.wheel-band {
  position: absolute; left: 10px; right: 10px; top: 50%; height: var(--row); transform: translateY(-50%);
  background: var(--cobalt-soft); border-radius: 14px; pointer-events: none;
}
.wheel-band::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 2px; background: var(--cobalt);
}
.wheel {
  position: relative; list-style: none; margin: 0; padding: 0;
  height: calc(var(--row) * 5); overflow: hidden; outline: none;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(transparent, #000 20%, #000 80%, transparent);
          mask-image: linear-gradient(transparent, #000 20%, #000 80%, transparent);
}
.wheel:active { cursor: grabbing; }
.wheel-wrap:focus-within { box-shadow: 0 0 0 3px var(--cobalt-soft); }
.spoke {
  position: absolute; left: 0; right: 0; top: calc(50% - var(--row) / 2); height: var(--row);
  display: grid; grid-template-columns: 1fr auto; align-content: center; column-gap: 16px;
  padding: 0 30px; transform-origin: center; will-change: transform, opacity; backface-visibility: hidden;
  cursor: pointer;
}
.sp-name { font-size: 19px; font-weight: 600; color: var(--muted); transition: color 0.15s; }
.sp-price { font-size: 17px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.sp-sym, .sp-chg { font-size: 12.5px; color: var(--muted); font-stretch: 75%; font-variation-settings: "wdth" 75; }
.sp-chg { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.sp-chg.up { color: var(--up); }
.sp-chg.down { color: var(--down); }
.spoke.active .sp-name { color: var(--ink); font-weight: 700; font-stretch: 125%; font-variation-settings: "wdth" 125; }
.spoke.active .sp-price { color: var(--ink); }
.spoke:hover .sp-name { color: var(--ink); }
.wheel-status { text-align: center; color: var(--muted); font-size: 13px; margin: 10px 0 0; }

.thread .more { margin: 8px 0 4px; font-size: 15px; font-weight: 650; }

/* durante la conversazione la ruota sparisce: si torna alla ruota con "Nuova chat" */
body.chatting .markets { display: none; }

@media (prefers-reduced-motion: reduce) {
  .wheel { scroll-behavior: auto; }
}

/* ------------------------------------------------------------------ scelta del contesto */
.ctx {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0;
  border: 1px solid var(--line); border-radius: 18px; background: var(--sheet); color: var(--ink);
  box-shadow: 0 24px 60px rgba(12, 21, 37, 0.28);
}
.ctx::backdrop { background: rgba(12, 21, 37, 0.45); backdrop-filter: blur(2px); }
.ctx[open] { animation: pop 0.18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.ctx form { padding: 22px 24px 20px; }
.ctx-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.ctx-head h3 { margin: 0; font-size: 26px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em;
  font-stretch: 125%; font-variation-settings: "wdth" 125; }
.ctx-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.ctx-close { border: 0; background: var(--paper); width: 34px; height: 34px; border-radius: 50%; font-size: 20px; line-height: 1; flex: none; }
.ctx fieldset { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.ctx legend { padding: 0; margin-bottom: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.ctx-kinds label { display: block; cursor: pointer; }
.ctx-kinds label[hidden] { display: none; }
.ctx-kinds input, .seg input { position: absolute; opacity: 0; pointer-events: none; }
.ctx-kinds span {
  display: block; padding: 10px 14px 10px 40px; margin-bottom: 6px; position: relative;
  border: 1px solid var(--line); border-radius: 12px;
}
.ctx-kinds span::before {
  content: ""; position: absolute; left: 14px; top: 14px; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--line); box-sizing: border-box;
}
.ctx-kinds b { display: block; font-weight: 600; font-size: 15px; }
.ctx-kinds small { display: block; color: var(--muted); font-size: 13px; }
.ctx-kinds input:checked + span { border-color: var(--cobalt); background: var(--cobalt-soft); }
.ctx-kinds input:checked + span::before { border: 4px solid var(--cobalt); }
.ctx-kinds input:focus-visible + span { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { cursor: pointer; }
.seg span { display: inline-block; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 550; }
.seg input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.ctx-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.ctx-actions .btn-primary { width: auto; margin: 0; padding: 11px 22px; }
.ctx-actions .ghost { padding: 10px 16px; }

@media (min-width: 900px) {
  .markets-intro { text-align: center; }
  .markets-intro .lede { margin-inline: auto; }
  .filters { justify-content: center; }
}
@media (min-width: 1200px) {
  .markets { --row: 74px; }
  .sp-name { font-size: 21px; }
}
@media (max-width: 640px) {
  .markets { padding: 18px 14px 4px; --row: 60px; }
  .markets-intro .lede { font-size: 15.5px; }
  .filters { margin: 16px -14px 10px; padding: 0 14px 2px; }
  .wheel-wrap { border-radius: 18px; }
  .spoke { padding: 0 20px; column-gap: 10px; }
  .sp-name { font-size: 17px; }
  .sp-price { font-size: 15.5px; }
  /* su telefono la finestra di scelta sale dal basso */
  .ctx {
    width: 100%; max-width: 100%; margin: auto 0 0; max-height: 92vh;
    border-radius: 22px 22px 0 0; border-bottom: 0;
  }
  .ctx[open] { animation: sheet 0.22s ease-out; }
  .ctx form { padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
  .ctx-head h3 { font-size: 22px; }
  .ctx-actions { position: sticky; bottom: 0; background: var(--sheet); padding-top: 10px; }
  .ctx-actions .btn-primary { flex: 1; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
@media (max-height: 560px) and (orientation: landscape) {
  .markets { --row: 52px; padding-top: 12px; }
  .markets-intro h2 { font-size: 26px; }
  .markets-intro .lede, .disclaimer { display: none; }
  .filters { margin: 10px 0 8px; }
  .composer textarea, .send { min-height: 44px; height: 44px; }
}

/* ------------------------------------------------------------------ mobile */
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-side { border-right: 0; border-bottom: 1px solid var(--line); padding: 22px 20px 0; gap: 34px; }
  .login-side .horizon { height: 110px; }
  .login-main { padding: 32px 20px 40px; }
}
@media (max-width: 640px) {
  header { padding: 10px 12px; gap: 8px; }
  header .wordmark, .model { display: none; }
  .modes button { padding: 5px 10px; font-size: 13px; }
  .ghost { padding: 6px 10px; }
  .thread { padding: 18px 14px 36px; }
  .suggestions { grid-template-columns: 1fr; }
  .msg.assistant { padding: 14px 14px 4px; border-radius: 14px; }
  .chart { height: 290px; }
  .chart-head { flex-direction: column; gap: 2px; }
  .chart-head .s { text-align: left; }
  footer { padding: 10px 12px 8px; }
  .send { padding: 0 16px; }
}

/* ------------------------------------------------------------------ accessi e privacy */
.login-privacy { margin: 18px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.login-privacy a, .hist-how a, .legal a { color: var(--cobalt); }
.login-privacy + .login-foot { margin-top: 10px; }
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.acc-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; margin-bottom: 22px; }
.acc-card { background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; min-width: 0; }
.acc-card h2, .acc-h { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.acc-h { margin: 0; }
.acc-card .hist-empty { padding: 14px 0; }
.dev-ico { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--paper); color: var(--ink); }
.dev-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dev-ico.phone { background: var(--cobalt-soft); color: var(--cobalt); }
.dev-ico.other { color: var(--amber); }
.bd-row { display: grid; grid-template-columns: 32px minmax(0, 1.2fr) 1fr 34px; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.bd-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-bar { height: 8px; border-radius: 99px; background: var(--paper); overflow: hidden; }
.bd-bar i { display: block; height: 100%; border-radius: inherit; background: var(--cobalt); }
.bd-n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.ss-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.ss-row:first-child { border-top: 0; }
.ss-row > span:nth-child(2) { flex: 1; min-width: 0; }
.ss-row small, .dev small { display: block; color: var(--muted); font-size: 12px; }
.ss-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.ss-meta .badge { font-size: 11.5px; padding: 2px 8px; }
.dot-on { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--up); display: inline-flex; align-items: center; gap: 6px; }
.dot-on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 22%, transparent); }
.hrow.arow { grid-template-columns: 110px 150px minmax(0, 2fr) 1fr 1fr; }
.dev { display: flex; align-items: center; gap: 10px; min-width: 0; }
.legal { max-width: 760px; }
.legal h2 { font-size: 18px; margin: 26px 0 6px; }
.legal p, .legal li { font-size: 15.5px; line-height: 1.6; }
.legal ul { padding-left: 20px; }
.legal-upd { color: var(--muted); font-size: 13px !important; margin-top: 28px; }
@media (max-width: 900px) {
  .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.k4 .kpi:last-child { grid-column: auto; border-left: 1px solid var(--line); }
  .acc-grid { grid-template-columns: 1fr; }
  .hrow.arow { grid-template-columns: 1fr 1fr; }
  .hrow.arow > span[data-l="Dispositivo"] { grid-column: 1 / -1; order: -1; }
  .hrow.arow > span[data-l="Dispositivo"]::before { display: none; }
}
a[data-admin][hidden] { display: none !important; }

/* ------------------------------------------------------------------ gestione utenti */
.sm { display: none; }
.ghost.on { border-color: var(--ink); }
.users-grid { grid-template-columns: 1.5fr 1fr; align-items: start; }
.field select { width: 100%; padding: 12px 14px; font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 10px; }
.field select:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
.uform .field { margin-bottom: 12px; }
.uerr { margin: 4px 0 8px; padding: 9px 12px; border-radius: 9px; font-size: 13.5px; color: var(--down);
  background: color-mix(in srgb, var(--down) 10%, transparent); }
.uerr[hidden] { display: none; }
.uhint { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.urow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.urow:first-child { border-top: 0; }
.uavatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: var(--paper); color: var(--ink); }
.uavatar.admin { background: var(--cobalt); color: var(--cobalt-ink); }
.uinfo { flex: 1; min-width: 150px; }
.uinfo b { display: block; font-size: 15px; }
.uinfo small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.uinfo .badge { font-size: 11.5px; padding: 2px 8px; }
.uacts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.uacts .ghost { font-size: 13px; padding: 5px 10px; color: var(--ink); }
.ghost.danger { color: var(--down) !important; }
.ghost.danger:hover { border-color: var(--down); }
.umain { color: var(--muted); font-size: 12.5px; }
.udlg { border: 1px solid var(--line); border-radius: 16px; padding: 22px; width: min(420px, calc(100vw - 32px));
  background: var(--sheet); color: var(--ink); }
.udlg::backdrop { background: rgb(10 20 40 / 0.45); }
.udlg h2 { margin: 0 0 14px; font-size: 18px; }
.udlg p { color: var(--muted); font-size: 14.5px; }
.udlg-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.udlg-actions .btn-primary, .udlg-actions .btn-danger { width: auto; margin: 0; padding: 10px 18px; font-size: 14.5px; }
.btn-danger { border: 0; border-radius: 10px; background: var(--down); color: #fff; font-weight: 650; }
@media (max-width: 900px) {
  .users-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  header .ghost { font-size: 13px; padding: 6px 8px; white-space: nowrap; }
  header { gap: 6px; }
  header .lg { display: none; }
  header .sm { display: inline; }
  .uacts { width: 100%; justify-content: flex-start; padding-left: 48px; }
}

/* ------------------------------------------------------------------ nuova analisi a segnale scaduto */
.msg-head { display: flex; align-items: flex-start; gap: 10px; }
.msg-head .tools { flex: 1; min-width: 0; }
.msg-head:has(.tools[hidden]):has(.again[hidden]) { display: none; }
.again {
  flex: none; margin: -3px 0 14px auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px 6px 11px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--cobalt); color: var(--cobalt-ink); font: inherit; font-size: 13.5px; font-weight: 650;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--cobalt) 45%, transparent); animation: again-in 0.35s ease-out, again-pulse 2.4s ease-out 0.35s 3;
}
.again[hidden] { display: none; }
.again:hover { filter: brightness(1.08); }
.again:disabled { opacity: 0.55; cursor: default; }
.again svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes again-in { from { opacity: 0; transform: translateY(-3px) scale(0.96); } }
@keyframes again-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--cobalt) 45%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
@media (prefers-reduced-motion: reduce) { .again { animation: none; } }
.sig-chip.expired.buy, .sig-chip.expired.sell { background: var(--muted); }

/* ------------------------------------------------------------------ utente collegato */
.who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding-left: 14px; margin-left: 2px;
  border-left: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink); }
.who[hidden] { display: none; }
.who-av { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.who.admin .who-av { background: var(--cobalt); color: var(--cobalt-ink); border-color: transparent; }
.who-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
@media (max-width: 640px) {
  .who { padding-left: 8px; margin-left: 0; gap: 0; }
  .who-name { display: none; }
}
header { position: relative; }
.hnav { display: flex; align-items: center; gap: 12px; }
.hmenu { display: none; }
@media (max-width: 640px) {
  .who { gap: 7px; }
  .who-name { display: inline; max-width: 120px; }
  .hmenu { display: inline-grid; place-items: center; padding: 6px 8px; }
  .hmenu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .hnav { display: none; position: absolute; top: calc(100% + 6px); right: 12px; z-index: 50; min-width: 200px;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 8px; background: var(--sheet);
    border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px rgb(10 20 40 / 0.16); }
  header.menu-open .hnav { display: flex; }
  header.menu-open .hmenu { border-color: var(--ink); }
  .hnav .ghost, .hnav form, .hnav form .ghost { width: 100%; }
  .hnav .ghost { justify-content: flex-start; text-align: left; font-size: 15px; padding: 10px 12px; border-color: transparent; }
  .hnav .ghost:hover, .hnav .ghost.on { background: var(--paper); border-color: transparent; }
  .hnav .ghost[hidden] { display: none !important; }
  header .hnav .lg { display: inline; }
  header .hnav .sm { display: none; }
}

/* ------------------------------------------------------------------ cambio timeframe sul grafico */
.tfbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 10px 0 4px; }
.tfs { display: inline-flex; gap: 2px; padding: 3px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.tfs button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600;
  padding: 5px 11px; border-radius: 7px; cursor: pointer; font-variant-numeric: tabular-nums; position: relative; }
.tfs button:hover { color: var(--ink); }
.tfs button.on { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 3px rgb(10 20 40 / 0.12); }
.tfs button.base::after { content: ""; position: absolute; left: 50%; bottom: 1px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--cobalt); }
.tfnote { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--muted); }
.tfnote[hidden] { display: none; }
.tfgo { border: 1px solid var(--cobalt); background: transparent; color: var(--cobalt); font: inherit; font-size: 12.5px;
  font-weight: 650; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.tfgo:hover { background: var(--cobalt); color: var(--cobalt-ink); }
.tferr { color: var(--down); }
.chart-card .chart { transition: opacity 0.15s; }
.chart-card.loading .chart { opacity: 0.45; }
.chart-card:has(.tfbar) .sig-holder { top: 116px; }
@media (max-width: 640px) {
  .tfs { width: 100%; justify-content: space-between; }
  .tfs button { flex: 1; padding: 6px 0; }
  .chart-card:has(.tfbar) .sig-holder { top: 124px; }
}

/* ------------------------------------------------------------------ prezzi in tempo reale sulla ruota */
.sp-price { border-radius: 6px; padding: 0 4px; margin-right: -4px; }
.sp-price.tick-up { animation: tick-up 0.6s ease-out; }
.sp-price.tick-down { animation: tick-down 0.6s ease-out; }
@keyframes tick-up { 0% { background: color-mix(in srgb, var(--up) 28%, transparent); color: var(--up); } 100% { background: transparent; } }
@keyframes tick-down { 0% { background: color-mix(in srgb, var(--down) 28%, transparent); color: var(--down); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .sp-price.tick-up, .sp-price.tick-down { animation: none; } }
.filters button[hidden] { display: none; }

/* ------------------------------------------------------------------ popup del segnale spostabile */
.sig-holder.glide { transition: left 0.25s ease; }
.sig-holder.dragging .sig { box-shadow: 0 20px 44px rgba(12, 21, 37, 0.26); }
.sig-head { cursor: grab; touch-action: none; user-select: none; padding-right: 58px; }
.sig-holder.dragging .sig-head { cursor: grabbing; }
.sig-grip { align-self: center; width: 8px; height: 14px; flex: none; opacity: 0.45;
  background-image: radial-gradient(circle, var(--muted) 1.2px, transparent 1.4px); background-size: 4px 4px; }
.sig-swap { position: absolute; top: 6px; right: 36px; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: var(--paper); color: var(--ink); font-size: 14px; line-height: 1; cursor: pointer; }
.sig-swap:hover, .sig-x:hover { background: var(--line); }
@media (max-width: 640px) {
  .sig-swap, .sig-grip { display: none; }
  .sig-head { cursor: default; padding-right: 30px; }
}

/* ------------------------------------------------------------------ pulsante "Seguilo" nella popup del segnale */
.sig-follow { margin-top: 9px; }
.sig-go { width: 100%; padding: 8px 12px; border: 0; border-radius: 9px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 700;
  background: var(--cobalt); color: var(--cobalt-ink); }
.sig-go:hover:not(:disabled) { filter: brightness(1.08); }
.sig.buy .sig-go:not(:disabled) { background: var(--up); color: #fff; }
.sig.sell .sig-go:not(:disabled) { background: var(--down); color: #fff; }
.sig-go:disabled { cursor: default; background: var(--paper); color: var(--muted); }
.sig-go.done { background: color-mix(in srgb, var(--up) 14%, transparent); color: var(--up); }
.sig-fmsg { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.sig-fmsg a { color: var(--cobalt); }

/* ------------------------------------------------------------------ pulsante tema (sole / luna / automatico) */
.theme-btn { flex: none; width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 0; margin-left: 2px;
  border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.theme-btn:hover { border-color: var(--muted); }
.theme-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) { .theme-btn { width: 30px; height: 30px; margin-left: 4px; } }

/* ------------------------------------------------------------------ avviso scorrevole (weekend) */
.ticker { flex: none; overflow: hidden; white-space: nowrap; border-bottom: 1px solid color-mix(in srgb, var(--down) 35%, transparent);
  background: color-mix(in srgb, var(--down) 12%, var(--sheet)); color: var(--down); font-size: 13.5px; font-weight: 650; }
.ticker-track { display: inline-flex; animation: ticker 40s linear infinite; padding: 7px 0; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-group { display: inline-flex; }
.ticker-group span { padding: 0 48px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker { white-space: normal; text-align: center; }
  .ticker-group:last-child, .ticker-group span:not(:first-child) { display: none; }
}
@media (max-width: 640px) { .ticker { font-size: 12.5px; } .ticker-group span { padding: 0 32px; } }
/* avviso dentro la barra in alto, al centro */
header .spacer { min-width: 0; display: flex; justify-content: center; }
.ticker.in-header { width: 100%; max-width: 720px; margin: 0 18px; border: 1px solid color-mix(in srgb, var(--down) 35%, transparent);
  border-radius: 999px; font-size: 13px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker.in-header .ticker-track { padding: 6px 0; }
