/* Atlante 2 — guscio e pagine nuove.
   Idea: una barra sottile con cinque luoghi, una sola barra di comando per cercare ovunque, e ogni pagina fa UNA cosa.
   I colori restano quelli di sempre (style.css): nero, ambra, verde e rosso solo per le variazioni. */

body.v2 { --rail: 76px; --topbar: 58px; --r: 14px; }
body.v2 { overflow: hidden; }

/* ===== struttura ===== */
.sh {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  grid-template-rows: var(--topbar) minmax(0, 1fr);
  height: 100vh; height: 100dvh;
}
.sh > .stage { grid-column: 2; grid-row: 2; display: block; position: relative; min-height: 0; min-width: 0; overflow: hidden; }
.sh .view { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; }
.sh .view-map { overflow: hidden; }
.sh #view-brokers .icon-btn { display: none; }
.sh #view-brokers { padding: 22px clamp(16px, 3vw, 40px) 40px; }

/* ===== barra laterale ===== */
.sh-rail {
  grid-column: 1; grid-row: 1 / -1;
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  padding: 12px 8px 14px;
  border-right: 1px solid var(--line);
  background: rgba(8, 6, 4, 0.7);
  z-index: 45;
}
.sh-brand { height: 40px; margin: 0 0 14px; border: 0; background: none; color: var(--ice); display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.sh-brand .brand-mark { width: 30px; height: 30px; }
.sh-brand:hover { background: rgba(255, 255, 255, 0.05); }
.sh-nav { display: flex; flex-direction: column; gap: 4px; }
.sh-nav button, .sh-ask {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 9px 2px 8px; border: 1px solid transparent; border-radius: 12px; background: none;
  color: var(--ink-3); font-size: 11.5px; line-height: 1.1; letter-spacing: 0.01em;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.sh-nav svg, .sh-ask svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sh-nav button:hover, .sh-ask:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.sh-nav button[aria-selected='true'] { color: #fff; background: var(--violet-soft); border-color: rgba(255, 159, 28, 0.5); }
.sh-nav button[aria-selected='true'] svg { stroke: var(--ice); }
.sh-rail-foot { margin-top: auto; }
.sh-ask { width: 100%; }

/* ===== barra in alto ===== */
.sh-top {
  grid-column: 2; grid-row: 1;
  display: flex; align-items: center; gap: 14px;
  padding: 0 clamp(14px, 2.2vw, 28px);
  border-bottom: 1px solid var(--line);
  min-width: 0; position: relative; z-index: 40;
}
.sh-back { width: 34px; height: 34px; flex: none; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(255, 255, 255, 0.04); display: flex; align-items: center; justify-content: center; }
.sh-back svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sh-back:hover { background: rgba(255, 255, 255, 0.1); }
.sh-title { font-size: 17px; font-weight: 600; letter-spacing: 0.005em; white-space: nowrap; }
.cmd-open {
  margin: 0 auto; flex: 0 1 460px; min-width: 0; height: 38px;
  display: flex; align-items: center; gap: 10px; padding: 0 10px 0 13px;
  border: 1px solid var(--line-strong); border-radius: 11px; background: rgba(14, 12, 9, 0.78);
  color: var(--ink-3); text-align: left;
}
.cmd-open:hover { border-color: rgba(255, 159, 28, 0.6); color: var(--ink-2); }
.cmd-open svg, .cmd-field svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.cmd-ph { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
kbd { font: 500 11.5px var(--font); color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; background: rgba(255, 255, 255, 0.03); }
.sh-upd { display: flex; align-items: center; gap: 10px; flex: none; min-width: 0; }
.fresh { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.fresh i { width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px rgba(53, 230, 164, 0.15); }
.fresh.stale { color: var(--amber); }
.fresh.stale i { background: var(--amber); box-shadow: 0 0 0 3px rgba(255, 181, 71, 0.18); }
.sh-upd .upd-btn { display: inline-block; width: auto; flex: none; padding: 6px 14px; font-size: 12.5px; }
.sh-upd .upd-msg { margin: 0 !important; max-width: 300px; font-size: 11.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sh-upd .upd-msg:empty { display: none; }
@media (max-width: 1280px) { .sh-upd .upd-msg { display: none; } }

/* niente interruttore laterale della vecchia struttura */
body.v2 .rail-toggle { display: none !important; }

/* ===== barra di comando ===== */
.cmd-wrap { position: fixed; inset: 0; z-index: 200; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.cmd-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(3px); }
.cmd-box { position: relative; width: 640px; max-width: 100%; max-height: 72vh; display: flex; flex-direction: column; background: #0c0a07; border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); overflow: hidden; }
.cmd-field { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 54px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.cmd-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: #fff; font-size: 16px; }
.cmd-field input::placeholder { color: var(--ink-3); }
.cmd-list { overflow-y: auto; padding: 6px 8px 8px; flex: 1; min-height: 0; }
.cmd-g { padding: 10px 10px 4px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.cmd-i { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.cmd-i[aria-selected='true'] { background: rgba(255, 159, 28, 0.18); }
.cmd-t { font-weight: 500; }
.cmd-s { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-r { font-weight: 500; font-size: 13px; }
.cmd-empty { padding: 20px 12px; color: var(--ink-3); }
.cmd-foot { display: flex; gap: 18px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.cmd-foot kbd { margin-right: 3px; }

/* ===== pagine ===== */
.v-page { max-width: 1240px; margin: 0 auto; padding: clamp(18px, 3vw, 36px) clamp(16px, 3vw, 40px) 64px; }
.v-page-wide { max-width: 1180px; }
.seg button { white-space: nowrap; }
.v-hero { margin-bottom: 28px; }
.v-hero-sm { margin-bottom: 18px; }
.v-eyebrow { font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.v-h1 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 600; line-height: 1.12; letter-spacing: -0.012em; }
.v-lede { color: var(--ink-2); font-size: 15.5px; margin-top: 8px; max-width: 70ch; }
.v-lede b { color: #fff; font-weight: 500; }
.v-warn { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-top: 16px; padding: 12px 16px; border: 1px solid rgba(255, 181, 71, 0.5); border-radius: 12px; background: rgba(255, 181, 71, 0.08); color: var(--ink-2); max-width: 760px; }
.v-warn b { color: var(--amber); font-weight: 600; }
.v-warn .btn { flex: none; }

.v-grid { align-items: start; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px; }
.v-col-7 { grid-column: span 7; } .v-col-5 { grid-column: span 5; } .v-col-12 { grid-column: 1 / -1; }
.v-sec { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px 18px; min-width: 0; }
.v-sec + .v-sec { margin-top: 18px; }
.v-grid > .v-sec + .v-sec { margin-top: 0; }
.v-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.v-sec-h h3 { font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.v-sub { font-size: 12.5px; color: var(--ink-3); }
.v-foot { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; margin-top: 12px; max-width: 72ch; }
.v-empty { color: var(--ink-3); margin: 4px 0 12px; max-width: 60ch; }
.v-prose { color: var(--ink-2); max-width: 70ch; font-size: 15px; line-height: 1.6; }
.v-prose b { color: #fff; font-weight: 500; }
.v-more { margin-top: 10px; }
.v-wide { display: block; width: 100%; margin-top: 12px; flex: none; }
.v-narrow { max-width: 760px; }
.v-btnrow { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.v-btnrow .btn { flex: 1 1 130px; }

/* anomalie */
.v-anoms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.v-anom { width: 100%; display: block; text-align: left; padding: 11px 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, 0.025); transition: border-color 0.15s, background 0.15s; }
.v-anom:hover { border-color: rgba(255, 159, 28, 0.7); background: var(--violet-soft); }
.v-anom-main { display: block; font-size: 15px; }
.v-anom-main i { color: var(--ink-3); font-style: normal; margin: 0 8px; }
.v-anom-main .ar { font-size: 9px; margin-right: 3px; vertical-align: 2px; }
.v-anom-why { display: block; color: var(--ink-2); font-size: 13px; margin-top: 3px; }
.v-anom-meta { display: block; color: var(--ink-3); font-size: 12px; margin-top: 4px; }
.ri-lvl { display: inline-block; padding: 0 7px; margin-right: 4px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 11px; color: var(--ink-2); }

/* scenari */
.v-scn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v-scn-b { text-align: left; padding: 9px 12px; font-size: 13.5px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, 0.025); font-weight: 500; }
.v-scn-b:hover { border-color: rgba(255, 159, 28, 0.7); background: var(--violet-soft); }
.v-scn-g { display: block; font-size: 11px; font-weight: 400; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1px; }

/* righe strumento */
.v-mov { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.v-mov h4 { margin: 0 0 6px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.v-mov ul, .v-fol { list-style: none; margin: 0; padding: 0; }
.v-mrow { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 44px 74px; gap: 10px; align-items: center; padding: 8px 6px; border: 0; border-radius: 9px; background: none; text-align: left; }
.v-mrow:hover { background: rgba(255, 255, 255, 0.05); }
.v-mn { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.v-mn small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); }
.v-mp { text-align: right; font-weight: 500; white-space: nowrap; }
.ar { font-size: 9px; margin-right: 4px; vertical-align: 2px; }

/* notizie */
.v-news { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 14px; }
.v-news-it { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.02); min-width: 0; }
.v-news-it .n-title { font-size: 14.5px; }
.v-news-it .n-sum { font-size: 13.5px; margin-bottom: 9px; }
.v-ex { margin-top: 18px; }
.v-ex summary { cursor: pointer; color: var(--ink-2); font-size: 13px; padding: 4px 0 12px; }
.v-ex summary small { color: var(--ink-3); }

/* stella */
.v-star { width: 34px; height: 34px; flex: none; border: 0; border-radius: 9px; background: none; display: flex; align-items: center; justify-content: center; }
.v-star svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-linejoin: round; }
.v-star:hover svg { stroke: var(--ice); }
.v-star[aria-pressed='true'] svg { fill: var(--amber); stroke: var(--amber); }

/* esplora */
.v-tools { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; position: sticky; top: 0; z-index: 5; background: linear-gradient(#000 82%, rgba(0, 0, 0, 0)); padding: 4px 0 12px; }
.v-find { position: relative; max-width: 460px; }
.v-find svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; fill: none; stroke: var(--ink-3); stroke-width: 1.6; stroke-linecap: round; pointer-events: none; }
.v-find input { width: 100%; height: 40px; padding: 0 14px 0 38px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(14, 12, 9, 0.78); color: #fff; }
.v-find input::-webkit-search-cancel-button { display: none; }
.v-tools-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.v-tools .seg button { padding: 5px 11px; font-size: 13px; }
.v-count { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }
.v-table { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.v-grp { padding: 9px 18px 7px; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); background: rgba(255, 255, 255, 0.03); border-top: 1px solid var(--line); }
.v-grp:first-child { border-top: 0; }
.v-row { display: flex; align-items: center; border-top: 1px solid rgba(255, 170, 60, 0.08); padding-right: 8px; }
.v-grp + .v-row { border-top: 0; }
.v-row-main { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 130px 72px 90px; gap: 14px; align-items: center; padding: 9px 8px 9px 18px; border: 0; background: none; text-align: left; }
.v-row:hover { background: rgba(255, 255, 255, 0.04); }
.v-r-name { min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: nowrap; overflow: hidden; }
.v-r-nm { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-r-name small { color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-r-val { text-align: right; white-space: nowrap; }
.v-r-val small { color: var(--ink-3); }
.v-r-chg { text-align: right; font-weight: 500; white-space: nowrap; }

/* fascicolo */
.v-fh { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 18px; }
.v-fh-r { text-align: right; }
.v-price { display: flex; align-items: baseline; gap: 8px; justify-content: flex-end; }
.v-price .big { font-size: clamp(28px, 3.4vw, 40px); font-weight: 500; letter-spacing: -0.01em; }
.v-price .unit { color: var(--ink-3); font-size: 14px; }
.v-chg { font-size: 16px; font-weight: 500; }
.v-chg small { font-weight: 400; color: var(--ink-3); font-size: 12.5px; margin-left: 4px; }
.v-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.v-actions .btn { flex: none; }
.btn.on { background: var(--violet-soft); border-color: rgba(255, 159, 28, 0.8); }
.v-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.v-tabs button { flex: none; padding: 10px 16px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ink-3); font-weight: 500; margin-bottom: -1px; }
.v-tabs button:hover { color: #fff; }
.v-tabs button[aria-selected='true'] { color: #fff; border-bottom-color: var(--amber); }
.v-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.v-main, .v-side { min-width: 0; }
.v-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.v-stats > div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.v-stats span { display: block; font-size: 12px; color: var(--ink-3); }
.v-stats b { font-size: 16px; font-weight: 500; }
.v-rel { display: flex; align-items: stretch; gap: 8px; margin-bottom: 8px; }
.v-rel-main { flex: 1; min-width: 0; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, 0.025); }
.v-rel-main:hover { border-color: rgba(255, 159, 28, 0.7); background: var(--violet-soft); }
.v-rel-main .cbar { display: block; }
.v-rel-main > span { display: block; }
.v-rel-main > .v-rel-top { display: flex; justify-content: space-between; gap: 10px; }
.v-rel-name { font-weight: 500; }
.v-rel-c { color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.v-rel-why { display: block; font-size: 12.5px; color: var(--ink-3); }
.v-rel-edge { flex: none; align-self: center; border: 0; background: none; color: var(--ice); font-size: 12.5px; padding: 6px; }
.v-rel-edge:hover { text-decoration: underline; }
.v-qn { list-style: none; margin: 0; padding: 0; }
.v-qn-b { width: 100%; text-align: left; padding: 7px 4px; border: 0; background: none; border-radius: 8px; }
.v-qn-b:hover { background: rgba(255, 255, 255, 0.05); }

/* etichette del quaderno (usate anche nel fascicolo) */
.qd-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; border: 1px solid var(--line-strong); color: var(--ink-2); }
.qd-tag.tesi { border-color: rgba(255, 159, 28, 0.7); color: var(--ice); }

/* ===== Quaderno ===== */
#view-quaderno { overflow: hidden; }
.qd { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: 100%; }
.qd-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: rgba(8, 6, 4, 0.5); }
.qd-side-head { padding: 16px 16px 10px; display: flex; flex-direction: column; gap: 10px; }
.qd-new { display: flex; gap: 8px; }
.qd-seg { width: 100%; }
.qd-seg button { flex: 1; font-size: 13px; padding: 5px 4px; }
.qd-search, .qd-add input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(14, 12, 9, 0.78); color: #fff; }
.qd-items { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 4px 10px 10px; }
.qd-it { display: flex; align-items: center; border-radius: 10px; }
.qd-it:hover { background: rgba(255, 255, 255, 0.04); }
.qd-it.on { background: var(--violet-soft); }
.qd-it-main { flex: 1; min-width: 0; text-align: left; padding: 9px 10px; border: 0; background: none; }
.qd-it-t { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qd-it-m { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.qd-x { width: 28px; height: 28px; flex: none; border: 0; border-radius: 50%; background: none; color: var(--ink-3); font-size: 18px; line-height: 1; }
.qd-x:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.qd-empty { padding: 18px 10px; color: var(--ink-3); }
.qd-empty strong { display: block; color: #fff; font-weight: 500; margin-bottom: 3px; }
.qd-side-foot { padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.qd-bk { display: flex; gap: 16px; }
.qd-note { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; line-height: 1.45; }
.qd-warn { font-size: 12.5px; color: var(--amber); margin-top: 8px; }
.qd-editor { min-width: 0; overflow-y: auto; padding: 22px clamp(18px, 3vw, 44px) 56px; }
.qd-editor > * { max-width: 780px; }
.qd-blank { padding-top: 6vh; }
.qd-blank h2 { font-size: 26px; font-weight: 600; margin-bottom: 10px; }
.qd-blank p { color: var(--ink-2); max-width: 60ch; margin-bottom: 8px; }
.qd-blank-act { display: flex; gap: 10px; margin-top: 18px; }
.qd-blank-act .btn { flex: none; }
.qd-ed-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.qd-back { display: none; align-items: center; gap: 4px; border: 0; background: none; color: var(--ink-2); padding: 4px 6px 4px 0; }
.qd-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qd-saved { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }
.qd-title { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; color: #fff; font-size: 24px; font-weight: 600; padding: 6px 0 10px; outline: none; margin-bottom: 18px; }
.qd-title:focus { border-bottom-color: var(--amber); }
.qd-l { display: block; font-size: 12.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); margin: 18px 0 6px; }
.qd-editor textarea, .qd-editor select { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(14, 12, 9, 0.78); color: #fff; line-height: 1.55; resize: vertical; }
.qd-editor select { height: 40px; padding: 0 10px; }
.qd-editor textarea:focus, .qd-editor select:focus, .qd-search:focus, .qd-add input:focus { outline: 2px solid var(--ice); outline-offset: 1px; }
.qd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qd-sec { margin-top: 26px; }
.qd-sec h3 { font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 10px; }
.qd-sec h3 small { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.qd-chips { margin-bottom: 10px; }
.qd-chip-n { border: 0; background: none; color: #fff; padding: 0; }
.qd-add { position: relative; max-width: 380px; }
.qd-sug { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 10; background: #0c0a07; border: 1px solid var(--line-strong); border-radius: 10px; padding: 5px; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55); }
.qd-sug li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.qd-sug li:hover, .qd-sug li[aria-selected='true'] { background: rgba(255, 159, 28, 0.2); }
.qd-sug small { color: var(--ink-3); }
.qd-sug .s-empty { color: var(--ink-3); cursor: default; }
.qd-tab { width: 100%; border-collapse: collapse; font-size: 14px; }
.qd-tab th { text-align: left; font-weight: 500; font-size: 12px; color: var(--ink-3); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.qd-tab td { padding: 8px; border-bottom: 1px solid rgba(255, 170, 60, 0.08); }
.qd-ed-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
.qd-del { border: 1px solid var(--line-strong); border-radius: 9px; background: none; color: var(--ink-2); padding: 6px 12px; }
.qd-del:hover { color: #fff; border-color: var(--down); }
.qd-del.armed { background: rgba(255, 92, 122, 0.16); border-color: var(--down); color: #fff; }

/* ===== telefono: la barra diventa un menu in basso ===== */
@media (max-width: 900px) {
  .sh { grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--topbar) minmax(0, 1fr) 62px; }
  .sh-rail { grid-column: 1; grid-row: 3; flex-direction: row; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); background: #070503; align-items: stretch; }
  .sh { grid-template-rows: var(--topbar) minmax(0, 1fr) calc(62px + env(safe-area-inset-bottom)); }
  .sh-brand { display: none; }
  .sh-nav { flex-direction: row; flex: 1; gap: 2px; }
  .sh-nav button { flex: 1; padding: 6px 0 5px; font-size: 10.5px; }
  .sh-nav svg { width: 20px; height: 20px; }
  .sh-rail-foot { margin: 0; width: 56px; }
  .sh-ask { padding: 6px 0 5px; font-size: 10.5px; }
  .sh-top { grid-column: 1; padding: 0 12px; gap: 10px; }
  .sh-title { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; }
  .cmd-open { flex: none; margin: 0 0 0 auto; width: 38px; padding: 0; justify-content: center; }
  .cmd-open .cmd-ph, .cmd-open kbd { display: none; }
  .sh-upd { gap: 8px; }
  .fresh span { display: none; }
  .sh-upd .upd-btn { padding: 5px 10px; }
  .sh > .stage { grid-column: 1; }
  .sh #view-brokers { padding: 16px 14px 32px; }
  .cmd-wrap { padding-top: 7vh; }
  .cmd-foot span:nth-child(3) { display: none; }

  .v-page { padding: 16px 14px 40px; }
  .v-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .v-col-7, .v-col-5, .v-col-12 { grid-column: 1 / -1; }
  .v-sec { padding: 15px 14px; }
  .v-mov { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .v-warn { flex-direction: column; align-items: flex-start; }
  .v-news { grid-template-columns: minmax(0, 1fr); }
  .v-row-main { grid-template-columns: minmax(0, 1fr) 72px; gap: 8px; padding-left: 12px; }
  .v-row-main .spark, .v-row-main svg.spark { display: none; }
  .v-r-val { grid-column: 1; text-align: left; font-size: 13px; color: var(--ink-2); }
  .v-r-chg { grid-column: 2; grid-row: 1 / span 2; }
  .v-tools { position: static; background: none; }
  .v-cols { grid-template-columns: minmax(0, 1fr); }
  .v-fh { align-items: flex-start; }
  .v-fh-r { text-align: left; }
  .v-price { justify-content: flex-start; }
  .v-stats { grid-template-columns: repeat(2, 1fr); }
  .v-actions .btn { flex: 1 1 calc(50% - 8px); }

  .qd { grid-template-columns: minmax(0, 1fr); }
  .qd-side { border-right: 0; }
  .qd[data-open='1'] .qd-side { display: none; }
  .qd[data-open='0'] .qd-editor { display: none; }
  .qd-back { display: inline-flex; }
  .qd-row { grid-template-columns: minmax(0, 1fr); }
  .qd-title { font-size: 21px; }
  .qd-editor { padding: 16px 14px 40px; }
}

/* etichette di strumenti legati a un appunto */
.chip-sc { border: 1px solid rgba(255, 159, 28, 0.7); border-radius: 999px; padding: 3px 4px 3px 11px; gap: 8px; font-size: 13px; }
.qd-chips { gap: 8px; }

/* ===== mappa essenziale ===== */
.mc-more > summary { cursor: pointer; list-style: none; font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); padding: 4px 0 8px; }
.mc-more > summary::-webkit-details-marker { display: none; }
.mc-more > summary::before { content: '▸'; display: inline-block; margin-right: 8px; transition: transform 0.15s; }
.mc-more[open] > summary::before { transform: rotate(90deg); }
.mc-more > .mc-sec, .mc-more > .switch { margin-top: 12px; }
body.calm .map-hint { animation: hint-out 1.2s ease 9s forwards; }
@keyframes hint-out { to { opacity: 0; visibility: hidden; } }
