/* KARDTRCKR — Design system « Cold Data / Terminal Quant »
   Dark haute densité (zinc-950) · accents émeraude/rose · chiffres monospace. */
:root {
  --ink: var(--app-bg);
  --s1: var(--app-surface-elevated);
  --s2: var(--app-card);
  --s3: var(--app-surface-elevated);
  --acc: var(--text-secondary);
  --up: var(--positive);
  --down: var(--negative);
  --warn: var(--warning);
  --txt: var(--text-primary);
  --muted: var(--text-tertiary);
  --grid: var(--ui-border);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--txt);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Chiffres : monospace tabulaire, colonnes alignées façon terminal. */
.tnum,
.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
}
.num-sm { font-size: 11.5px; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--app-card-hover); border-radius: 99px; border: 2px solid var(--ink); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.no-sb::-webkit-scrollbar { display: none; }
.no-sb { scrollbar-width: none; }

.glass { background: var(--app-surface); backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2); }
.surface-1 { background: var(--s1); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.surface-2 { background: var(--s2); }
.surface-3 { background: var(--s3); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); }
.hairline { box-shadow: inset 0 1px 0 0 var(--ui-border); }
.hair-x { box-shadow: inset 0 1px 0 0 var(--ui-border), inset 0 0 0 1px var(--ui-border); }
.shadow-soft { box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.shadow-lift { box-shadow: 0 18px 50px rgba(0,0,0,.12); }

.panel { border-radius: 16px; background: var(--s2); }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 13px 16px 7px; }
.panel-title { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.panel-body { padding: 0 16px 14px; }

.kpi { border-radius: 14px; background: var(--s2); box-shadow: inset 0 1px 0 0 var(--ui-border), inset 0 0 0 1px var(--ui-border); padding: 14px; }
.kpi-label { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.kpi-value { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; font-weight: 600; }
.kpi-note { font-size: 11px; color: var(--muted); }

.tile { transition: transform .24s cubic-bezier(.22,1,.36,1), box-shadow .24s ease, border-color .24s ease; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0,0,0,.12); }

.seg { position: relative; display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: var(--ui-hover); box-shadow: inset 0 0 0 1px var(--ui-border); }
.seg-pill { position: absolute; top: 3px; bottom: 3px; left: 3px; border-radius: 7px; background: var(--ui-hover); box-shadow: inset 0 1px 0 0 var(--ui-border); transition: transform .3s cubic-bezier(.34,1.3,.64,1), width .3s cubic-bezier(.22,1,.36,1); }
.seg button { position: relative; z-index: 1; height: 26px; padding: 0 10px; border: 0; background: none; color: var(--text-tertiary); font: inherit; font-size: 12px; font-weight: 500; border-radius: 7px; cursor: pointer; transition: color .2s; white-space: nowrap; }
.seg button:hover { color: var(--text-primary); }
.seg button[data-on="1"] { color: var(--text-primary); }

.skeleton { background: linear-gradient(90deg, var(--app-card) 25%, var(--app-card-hover) 37%, var(--app-card) 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50% } 100% { background-position: 0 50% } }

.fade { animation: fade .36s cubic-bezier(.22,1,.36,1) both; }
@keyframes fade { from { opacity: 0; transform: translateY(5px) } to { opacity: 1; transform: none } }
.fade-in { animation: fin .5s ease both; }
@keyframes fin { from { opacity: 0 } to { opacity: 1 } }

.bar-fill { transition: width .7s cubic-bezier(.22,1,.36,1); }

/* ── Nav ── */
.navitem { display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 11px; border-radius: 10px; color: var(--text-tertiary); font-size: 13px; font-weight: 500; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; transition: background .18s, color .18s; }
.navitem:hover { background: var(--ui-hover); color: var(--text-primary); }
.navitem[data-on="1"] { background: var(--ui-active); color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--ui-border-strong); }
.navitem svg { flex: 0 0 auto; }

/* ── Charts ── */
.chart-wrap { position: relative; width: 100%; }
.chart-svg { display: block; width: 100%; overflow: visible; }
.chart-cross { opacity: 0; transition: opacity .15s; pointer-events: none; }
.chart-wrap:hover .chart-cross { opacity: 1; }
.chart-tip { position: absolute; pointer-events: none; z-index: 5; transform: translate(-50%, -110%); padding: 7px 9px; border-radius: 9px; background: var(--app-surface-elevated); backdrop-filter: blur(10px); border: 1px solid var(--ui-border); box-shadow: 0 10px 30px rgba(0,0,0,.1); opacity: 0; transition: opacity .15s; white-space: nowrap; min-width: 150px; }
.chart-wrap:hover .chart-tip { opacity: 1; }
.spark { display: block; width: 100%; }

/* ── Tables (haute densité) ── */
.tablewrap { overflow: auto; }
table.k { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.k th { text-align: left; font-weight: 600; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 0 0 7px; position: sticky; top: 0; background: var(--s2); z-index: 1; white-space: nowrap; }
table.k td { padding: 7px 0; border-top: 1px solid var(--grid); white-space: nowrap; }
table.k.table-dense td { padding: 5px 0; }

.rowlink { transition: background .13s; cursor: pointer; }
.rowlink:hover { background: var(--ui-hover); }

/* ── Badges / statut ── */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.tag-up { background: var(--positive-bg); color: var(--up); }
.tag-down { background: var(--negative-bg); color: var(--down); }
.tag-acc { background: var(--ui-active); color: var(--text-secondary); }
.tag-warn { background: var(--warning-bg); color: var(--warn); }
.tag-zinc { background: var(--ui-hover); color: var(--text-tertiary); }
.tag-solid-up { background: var(--positive-bg); color: var(--positive); box-shadow: inset 0 0 0 1px var(--ui-border-strong); }

.verdict { display: flex; align-items: flex-start; gap: 12px; border-radius: 14px; padding: 14px 16px; box-shadow: inset 0 0 0 1px var(--ui-border); }
.verdict-up { background: linear-gradient(90deg, rgba(34,197,94,.12), rgba(34,197,94,.02)); }
.verdict-down { background: linear-gradient(90deg, rgba(239,68,68,.12), rgba(239,68,68,.02)); }
.verdict-warn { background: linear-gradient(90deg, rgba(245,158,11,.12), rgba(245,158,11,.02)); }

/* ── Bascule Simple / Pro ── */
.mode-toggle { position: relative; display: inline-flex; align-items: center; padding: 3px; border-radius: 12px; background: var(--ui-hover); box-shadow: inset 0 0 0 1px var(--ui-border); }
.mode-toggle button { position: relative; z-index: 1; height: 30px; padding: 0 13px; border: 0; background: none; color: var(--text-tertiary); font: inherit; font-size: 12.5px; font-weight: 600; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: color .2s; white-space: nowrap; }
.mode-toggle button:hover { color: var(--text-primary); }
.mode-toggle button[data-on="1"] { color: var(--text-primary); }
.mode-pill { position: absolute; top: 3px; bottom: 3px; left: 3px; border-radius: 9px; transition: transform .32s cubic-bezier(.34,1.3,.64,1), width .32s cubic-bezier(.22,1,.36,1), background .3s; }
.mode-toggle[data-mode="simple"] .mode-pill { background: var(--ui-active); box-shadow: inset 0 0 0 1px var(--ui-border-strong); }
.mode-toggle[data-mode="pro"] .mode-pill { background: rgb(255 149 0 / .2); box-shadow: inset 0 0 0 1px rgb(255 149 0 / .4); }
.mode-toggle .mt-full { display: none; }
@media (max-width: 640px) { .mode-toggle .mt-full { display: none; } .mode-toggle button { padding: 0 9px; font-size: 12px; } }

/* ── Infobulles pédagogiques (mode Simple) ── */
.help { position: relative; border-bottom: 1px dotted var(--ui-border); cursor: help; }
.help::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: 135%; transform: translateX(-50%) translateY(4px);
  width: max-content; max-width: 260px; padding: 8px 10px; border-radius: 9px; z-index: 30;
  background: var(--app-surface-elevated); border: 1px solid var(--ui-border); box-shadow: 0 12px 30px rgba(0,0,0,.12);
  color: var(--text-primary); font-size: 11.5px; font-weight: 400; line-height: 1.45; text-transform: none; letter-spacing: 0;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
}
.help:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Carte holographique (mode Simple) ── */
.holo { position: relative; border-radius: 12px; overflow: hidden; }
.holo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: linear-gradient(115deg, transparent 20%, rgba(0,0,0,.1) 38%, rgba(0,122,255,.12) 46%, rgba(255,59,48,.1) 54%, transparent 72%);
  background-size: 220% 220%;
}
.holo:hover::after { opacity: 1; animation: sheen 1.4s linear; }
@keyframes sheen { from { background-position: 140% 0 } to { background-position: -40% 0 } }

.softcard { border-radius: 18px; background: var(--s2); box-shadow: inset 0 1px 0 0 var(--ui-border), inset 0 0 0 1px var(--ui-border); }
.softcard:hover { box-shadow: inset 0 1px 0 0 var(--ui-border), inset 0 0 0 1px var(--ui-border), 0 16px 40px rgba(0,0,0,.08); }
.verdict-big { border-radius: 20px; padding: 22px; display: flex; gap: 16px; align-items: center; }
.verdict-big .vb-emoji { font-size: 34px; line-height: 1; }

/* ── Jauge (Fear & Hype) ── */
.gauge { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--positive) 0%, var(--warning) 52%, var(--negative) 100%); position: relative; }
.gauge::after { content: ""; position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 99px; background: var(--text-primary); border: 2px solid var(--app-surface); transform: translate(-50%, -50%); left: var(--g, 50%); box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: left .7s cubic-bezier(.22,1,.36,1); }

.pulse-dot { width: 6px; height: 6px; border-radius: 99px; background: var(--up); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1) } 50% { opacity: .35; transform: scale(.8) } }

dialog { border: 0; padding: 0; background: transparent; }
dialog::backdrop { background: var(--ui-hover); backdrop-filter: blur(7px); }
dialog[open] .sheet { animation: rise .4s cubic-bezier(.22,1,.36,1); }
@keyframes rise { from { opacity: 0; transform: translateY(20px) scale(.985) } to { opacity: 1; transform: none } }

.formula { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; color: var(--text-tertiary); background: var(--ui-hover); border-radius: 8px; padding: 8px 10px; box-shadow: inset 0 0 0 1px var(--ui-border); overflow-x: auto; }

.locked { position: relative; }
.locked::after { content: ""; position: absolute; inset: 0; backdrop-filter: blur(6px); background: var(--ui-hover); border-radius: inherit; }

select, input, button { font-family: inherit; }
select, input { outline: none; }
select option { background: var(--app-card); color: var(--text-primary); }

/* Lecture progressive — surfaces nettes, hiérarchie et respiration. */
:root { --muted: var(--text-tertiary); --s2: var(--app-card); --s3: var(--app-surface-elevated); }
body { background: var(--app-bg); line-height: 1.55; }
[hidden] { display: none !important; }
button, a, input, summary, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, tr:focus-visible { outline: 2px solid #007aff; outline-offset: 4px; }
button:disabled { opacity: .45; cursor: not-allowed; }
.skip-link { position: fixed; top: -80px; left: 20px; padding: 12px 20px; z-index: 100; background: var(--positive); color: #08140c; border-radius: 10px; }
.skip-link:focus { top: 10px; }
.topbar-row { min-height: 72px; }
.glass { background: var(--app-surface); backdrop-filter: none; }
.surface-3 { backdrop-filter: none; }
#view { padding-top: 28px; padding-bottom: 48px; }
body:not([data-mode="pro"]) #view { max-width: 1240px; }
.page-context { display: flex; gap: 20px; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.eyebrow { display: block; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 600; margin-bottom: 9px; }
.page-context h2 { font-size: clamp(23px, 2.4vw, 32px); line-height: 1.2; font-weight: 600; letter-spacing: -.035em; color: var(--text-primary); }
.page-context p { margin-top: 8px; color: var(--text-tertiary); font-size: 14px; }
.locale-tag { flex-shrink: 0; color: var(--text-tertiary); border: 1px solid var(--ui-border); padding: 6px 10px; border-radius: 9px; font-size: 12px; }
.data-note { padding: 12px 16px; border: 1px solid var(--ui-border); border-left: 2px solid var(--text-tertiary); border-radius: 9px; color: var(--text-tertiary); font-size: 12px; background: var(--ui-hover); margin-bottom: 26px; }
.reading-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
#view .grid > *, #view .reading-stack > *, #modalBody .grid > * { min-width: 0; }
.panel, .panel-body, .softcard, .feature-card, .disclosure { min-width: 0; }
.verdict-big > .flex-1 { min-width: 0; }
.narrow-reading { max-width: 880px; margin-inline: auto; width: 100%; }
.section-intro h3 { font-size: 19px; font-weight: 600; color: var(--text-primary); letter-spacing: -.02em; }
.section-intro p, .plain-note { font-size: 14px; color: var(--text-tertiary); margin-top: 6px; max-width: 80ch; }
.feature-card { padding: 26px; border-radius: 18px; background: var(--app-card); border: 1px solid var(--ui-border); }
.feature-card h3 { font-size: 22px; font-weight: 600; letter-spacing: -.025em; color: var(--text-primary); line-height: 1.35; }
.feature-card p { color: var(--text-tertiary); font-size: 14px; margin-top: 10px; max-width: 78ch; }
.feature-card .action-button { margin-top: 18px; }
.action-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 11px 18px; background: var(--positive); border: 1px solid transparent; border-radius: 11px; color: #08140c; font-size: 14px; font-weight: 600; text-align: center; cursor: pointer; transition: background .15s; }
.action-button:hover { background: #16a34a; }
.action-button.secondary { background: var(--ui-hover); border-color: var(--ui-border); color: var(--text-primary); }
.action-button.secondary:hover { background: var(--ui-active); }
.quick-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.field-label { display: block; color: var(--text-primary); font-size: 13px; font-weight: 500; margin-top: 12px; margin-bottom: 6px; }
.text-field { display: block; width: 100%; min-height: 46px; padding: 10px 13px; border-radius: 10px; border: 1px solid var(--ui-border); background: var(--app-surface-elevated); color: var(--text-primary); font: inherit; font-size: 14px; }
.text-field::placeholder { color: var(--text-tertiary); }
.summary-grid, .forecast-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.collection-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 22px; border: 1px solid var(--ui-border); border-radius: 14px; text-align: left; background: var(--app-card); width: 100%; }
.collection-row:hover { background: var(--app-card); }
.collection-row strong { font-size: 15px; font-weight: 500; }
.collection-row small { display: block; color: var(--text-tertiary); margin-top: 4px; font-size: 12px; }
.collection-row > .tnum { white-space: nowrap; font-size: 15px; }
.easy-price { font-size: clamp(32px, 5vw, 48px); color: var(--text-primary); font-weight: 600; letter-spacing: -.045em; font-variant-numeric: tabular-nums; margin: 8px 0; }
.modal-reading { padding: 18px 6px 8px; }
.modal-reading h2 { font-size: clamp(25px, 3vw, 34px); font-weight: 600; line-height: 1.25; letter-spacing: -.035em; }
.easy-card-detail { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 40px; align-items: start; }
.easy-art { padding: 16px; border-radius: 18px; background: var(--ui-hover); }
.easy-art img { width: 100%; border-radius: 10px; aspect-ratio: 63/88; object-fit: contain; }
.quiet-link { color: var(--text-secondary); font-size: 14px; text-align: left; text-underline-offset: 4px; }
.quiet-link:hover { text-decoration: underline; }
.favorite-card { border: 1px solid var(--ui-border); border-radius: 16px; padding: 22px; background: var(--app-card); }
.favorite-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.favorite-title strong { font-size: 16px; }
.favorite-card > p { color: var(--text-tertiary); font-size: 12px; margin-top: 4px; }
.remove-button { color: var(--text-tertiary); font-size: 12px; padding: 8px; }
.remove-button:hover { color: var(--negative); }
.favorite-prices { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 24px; margin: 18px 0; max-width: 560px; }
.favorite-prices span, .favorite-prices label { color: var(--text-tertiary); font-size: 13px; }
.favorite-prices strong { display: block; color: var(--text-primary); font-size: 20px; margin-top: 4px; }
.favorite-prices input { margin-top: 6px; }
.mode-cards, .guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mode-card { padding: 24px; border-radius: 16px; border: 1px solid var(--ui-border); text-align: left; background: var(--app-card); }
.mode-card[aria-pressed="true"] { border-color: var(--ui-border-strong); background: var(--app-card-hover); }
.mode-card > strong { display: block; font-size: 26px; font-weight: 500; }
.mode-card p { color: var(--text-tertiary); margin: 12px 0 24px; font-size: 14px; }
.mode-card > span:last-child { color: var(--text-secondary); font-size: 13px; }
.guide-grid article { padding: 24px; background: var(--app-card); border-radius: 16px; }
.guide-grid article > span { color: var(--text-secondary); font-family: monospace; font-size: 18px; }
.guide-grid h3 { font-size: 16px; font-weight: 600; margin: 14px 0 8px; }
.guide-grid p { color: var(--text-tertiary); font-size: 14px; }
.disclosure { padding: 18px 20px; border: 1px solid var(--ui-border); border-radius: 12px; background: var(--app-card); }
.disclosure summary { color: var(--text-primary); cursor: pointer; font-size: 14px; font-weight: 500; }
.disclosure[open] summary { margin-bottom: 16px; }
.disclosure p { color: var(--text-tertiary); margin: 12px 0; font-size: 14px; }
.disclosure code { overflow-wrap: anywhere; color: var(--text-secondary); font-size: 12px; }
.feature-card .disclosure { margin-top: 20px; }
.empty-state { border: 1px dashed var(--ui-border); border-radius: 16px; padding: 48px 24px; text-align: center; color: var(--text-tertiary); }
.empty-state h3 { font-size: 22px; color: var(--text-primary); margin-bottom: 10px; }
.empty-state .action-button { margin-top: 20px; }
.forecast-notice { border: 1px solid rgba(255,149,0,.16); border-radius: 14px; padding: 18px 22px; background: rgba(255,149,0,.04); }
.forecast-notice p { font-size: 14px; color: var(--warning); margin-top: 10px; }
.forecast-price { color: var(--text-primary); font-size: clamp(24px, 3vw, 34px); font-weight: 600; font-variant-numeric: tabular-nums; }
.feature-card .test-conclusion { font-size: 17px; color: var(--text-primary); }
#forecastHorizon { margin-top: 18px; }
.audit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; font-size: 13px; margin-top: 20px; }
.audit-grid dt { color: var(--text-tertiary); }
.audit-grid dd { overflow-wrap: anywhere; }
.json-report { max-height: 460px; overflow: auto; color: var(--text-tertiary); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.feature-card ul { font-size: 13px; padding-left: 18px; list-style: disc; color: var(--text-tertiary); }
.feature-card li { margin: 12px 0; }
.sidebar-note { padding: 16px 12px; border-top: 1px solid var(--ui-border); }
.sidebar-note p { font-size: 12px; margin: 12px 0; color: var(--text-tertiary); }
.sidebar-note > span:last-child { font-size: 11px; color: var(--text-tertiary); }
.site-footer { padding: 20px 24px; color: var(--text-tertiary); font-size: 11px; text-align: center; border-top: 1px solid var(--ui-border); }
.mode-toggle[data-mode="advanced"] .mode-pill { background: var(--ui-active); box-shadow: inset 0 0 0 1px var(--ui-border-strong); }
.mode-toggle button { min-height: 36px; }
.navitem { height: 42px; }
.panel { background: var(--app-card); border: 1px solid var(--ui-border); box-shadow: none; }
.panel-head { padding: 18px 20px 14px; flex-wrap: wrap; }
.panel-title { color: var(--text-primary); text-transform: none; letter-spacing: -.01em; font-size: 15px; }
.panel-body { padding: 0 20px 20px; }
table.k th { background: var(--app-card); padding: 10px 14px; }
table.k td { padding: 14px; }
table.k.table-dense td { padding: 10px 14px; }
table.k th.text-right { text-align: right; }
.tablewrap { max-width: 100%; }
.kpi { padding: 20px; box-shadow: none; border: 1px solid var(--ui-border); }
.kpi-label { text-transform: none; letter-spacing: 0; font-size: 13px; }
.kpi-note { font-size: 12px; margin-top: 10px; }
.kpi-value { overflow-wrap: anywhere; }
.softcard { background: var(--app-card); box-shadow: none; border: 1px solid var(--ui-border); }
.softcard:hover { box-shadow: none; border-color: var(--ui-border); }
.holo::after { display: none; }
.tile:hover { box-shadow: none; transform: translateY(-2px); }
body:not([data-mode="pro"]) .text-zinc-500, body:not([data-mode="pro"]) .text-zinc-600 { color: var(--text-tertiary); }
body[data-mode="simple"] .tnum { font-family: Inter, system-ui, sans-serif; }
body[data-mode="simple"] #view > .grid { gap: 28px; }
body[data-mode="simple"] .verdict-big { padding: 26px; }
.help:focus::after { opacity: 1; }
.seg { max-width: 100%; flex-wrap: wrap; }
.seg button { min-height: 30px; }
.seg-pill { display: none; }
.seg button[data-on="1"] { background: var(--ui-hover); }
@media (max-width: 767px) {
  .kpi-value { font-size: 20px; }
  .kpi { padding: 16px; }
  .kpi > .flex { flex-wrap: wrap; }
  .verdict-big { align-items: flex-start; gap: 12px; padding: 18px; }
  .verdict-big .vb-emoji { font-size: 24px; }
  .verdict-big p { overflow-wrap: anywhere; }
  .topbar-row { min-height: 108px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 10px; gap: 8px; }
  #modeToggle { order: 10; flex-basis: 100%; justify-content: center; }
  .mode-toggle .mode-pill { display: none; }
  .mode-toggle button { flex: 1; justify-content: center; }
  .mode-toggle button[data-on="1"] { background: var(--ui-hover); }
  #userChip { padding-right: 4px; }
  #userChip > span + span { display: none; }
  #view { padding-top: 22px; }
  .page-context { gap: 12px; }
  .page-context p { font-size: 13px; }
  .locale-tag { display: none; }
  .feature-card { padding: 22px; }
  .reading-stack { gap: 18px; }
  .mode-cards, .guide-grid, .forecast-cards { grid-template-columns: 1fr; }
  .easy-card-detail { grid-template-columns: 1fr; gap: 24px; }
  .easy-art { width: 200px; margin: auto; }
  .collection-row { gap: 12px; padding: 16px; }
  .collection-row > .tnum { font-size: 13px; }
  .favorite-card { padding: 18px; }
  .favorite-prices { gap: 16px; }
  .panel-head { padding: 16px; }
  .panel-body { padding: 0 16px 16px; }
  .audit-grid { grid-template-columns: 1fr; gap: 4px; }
  .audit-grid dd { margin-bottom: 10px; }
  dialog { max-width: calc(100vw - 20px) !important; }
  .modal-reading { padding-top: 30px; }
  .summary-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Une interface commune, des modes uniquement dans le Marché. */
body { background: var(--app-bg); }
.glass { background: var(--app-surface); }
#view, body:not([data-mode="pro"]) #view { max-width: 1360px; padding-top: 24px; }
.page-context { margin-bottom: 20px; }
.page-context h2, .forecast-section-heading h2 { font-size: clamp(24px, 2.2vw, 30px); font-weight: 600; letter-spacing: -.04em; text-wrap: balance; }
h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
.page-context p { max-width: 70ch; }
.page-context > .action-button { flex-shrink: 0; }
.reading-stack { gap: 18px; }
.narrow-reading { max-width: none; }
.data-note { margin-bottom: 20px; padding: 9px 13px; font-size: 12px; }
.feature-card { padding: 22px; }
.feature-card > p:first-child { margin-top: 0; }
.collection-list { border: 1px solid var(--ui-border); background: var(--app-card); border-radius: 16px; overflow: hidden; }
.collection-list .collection-row { border: 0; border-radius: 0; padding: 16px 20px; background: transparent; }
.collection-list .collection-row + .collection-row { border-top: 1px solid var(--ui-border); }
.collection-list .collection-row:hover { background: var(--ui-hover); }
.favorites-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.favorite-card { min-width: 0; padding: 20px; }
.favorite-prices { max-width: none; }
.favorite-prices strong, .forecast-price, .easy-price { white-space: nowrap; }
.grading-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 14px; }
.grading-inputs input { margin-top: 8px; }
.scenario-result { display: flex; flex-wrap: wrap; gap: 18px 36px; padding: 18px 0 4px; }
.scenario-result span { font-size: 12px; color: var(--text-tertiary); }
.scenario-result strong { display: block; margin-top: 5px; font-size: 22px; color: var(--text-primary); font-weight: 500; white-space: nowrap; }
.search-field-group .field-label { margin-top: 0; }
.learning-panel { margin-top: 22px; border: 1px solid var(--ui-border); background: linear-gradient(120deg, var(--ui-active), var(--ui-hover)); border-radius: 16px; overflow: hidden; }
.learning-intro { display: flex; gap: 12px; padding: 18px 20px 12px; }
.learning-icon { flex-shrink: 0; display: grid; place-items: center; width: 30px; height: 30px; background: var(--ui-active); color: var(--text-secondary); border-radius: 10px; }
.learning-intro h3 { font-size: 14px; font-weight: 600; letter-spacing: -.01em; color: var(--text-primary); }
.learning-intro p { margin-top: 4px; color: var(--text-tertiary); font-size: 13px; line-height: 1.6; max-width: 95ch; }
.learning-details summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px 16px 62px; list-style: none; cursor: pointer; color: var(--text-secondary); font-size: 12px; font-weight: 500; }
.learning-details summary::-webkit-details-marker { display: none; }
.learning-details summary > span { font-size: 20px; line-height: 1; transition: transform .2s; }
.learning-details[open] summary > span { transform: rotate(45deg); }
.lesson-content { padding: 20px; border-top: 1px solid var(--ui-border); }
.lexicon-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; }
.lexicon-grid dt { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.lexicon-grid dd { font-size: 13px; color: var(--text-tertiary); margin-top: 5px; line-height: 1.65; }
.calculation-list { display: grid; gap: 18px; margin-top: 24px; border-top: 1px solid var(--ui-border); padding-top: 20px; }
.calculation-list h4 { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.calculation-list p { font-size: 13px; color: var(--text-tertiary); line-height: 1.65; margin-top: 6px; }
.calculation-list .readable-formula { background: var(--ui-hover); border: 1px solid var(--ui-border); padding: 10px 12px; border-radius: 9px; color: var(--text-tertiary); font-weight: 500; }
.lesson-note { font-size: 12px; line-height: 1.65; color: var(--text-tertiary); margin-top: 22px; }
.market-forecast { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--ui-border); scroll-margin-top: 100px; }
.forecast-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.forecast-section-heading p { color: var(--text-tertiary); font-size: 13px; margin-top: 6px; }
.forecast-section-heading .eyebrow { margin-bottom: 6px; }
.forecast-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.forecast-cards .feature-card { padding: 20px; }
.forecast-cards .eyebrow { font-size: 10px; letter-spacing: .06em; text-wrap: balance; }
.forecast-cards p { font-size: 12px; }
.forecast-price { font-size: clamp(24px, 2.4vw, 32px); }
.compare-workspace { background: var(--app-card); border: 1px solid var(--ui-border); border-radius: 20px; padding: 22px; min-width: 0; }
.compare-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; }
.compare-toolbar .field-label { margin-top: 0; }
.compare-period .seg { min-height: 46px; align-items: center; }
.compare-search { min-width: 0; }
.search-results { position: absolute; z-index: 35; left: 0; right: 0; top: calc(100% + 6px); background: var(--app-card); border: 1px solid var(--ui-border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.05); overflow: hidden; }
.compare-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 24px; }
.compare-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; max-width: 100%; padding: 5px 6px 5px 10px; border-radius: 9px; background: var(--ui-hover); border: 1px solid var(--ui-border); font-size: 12px; }
.compare-chip > span:first-child, .compare-chip button { flex-shrink: 0; }
.compare-chip > span:nth-child(2) { min-width: 0; }
.compare-chip .tag { display: none; }
.chart-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 20px; border-top: 1px solid var(--ui-border); }
.chart-heading h3 { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.chart-heading p { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }
.compare-legend { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 22px 0 10px; }
.compare-legend > span { flex-wrap: wrap; }
.chart-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--ui-border); padding-top: 14px; margin-top: 16px; font-size: 11px; color: var(--text-tertiary); }
.chart-footer .quiet-link { font-size: 12px; }
.chart-tip { max-width: 100%; min-width: 0; white-space: normal; width: max-content; }
.chart-tip > div > span:first-child { flex-shrink: 0; }
.chart-tip .tnum { white-space: nowrap; }
.chart-wrap { touch-action: pan-y; }
.chart-wrap:focus-visible { outline: 2px solid #007aff; outline-offset: 3px; border-radius: 6px; }
#modeToggle .mode-pill { display: none; }
#modeToggle button[data-on="1"] { background: var(--ui-hover); box-shadow: 0 1px 5px rgba(0,0,0,.05); }
body:not([data-route="screener"]) .topbar-row { min-height: 64px; }
body[data-route="screener"] #view > .grid { gap: 20px; }
.easy-card-detail .reading-stack { gap: 14px; }
.easy-card-detail .easy-art { align-self: start; }

/* Trading desk — visuels de collection, graphiques et analyse dans un même espace. */
.desk-layout,.portfolio-workspace { display:grid; gap:24px; min-width:0; }
.market-overview { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.overview-card { position:relative; overflow:hidden; background:var(--app-card); border:1px solid var(--ui-border); border-radius:16px; padding:18px; min-width:0; }
.overview-card>span { color:var(--text-tertiary); font-size:12px; }
.overview-card>strong { display:block; font-size:28px; font-weight:500; letter-spacing:-.04em; margin:8px 0; }
.overview-card strong small { font-size:14px; color:var(--text-tertiary); font-weight:400; letter-spacing:0; }
.overview-card p { color:var(--text-tertiary); font-size:11px; max-width:30ch; line-height:1.55; }
.overview-card .quiet-link { display:inline-block; margin-top:9px; font-size:11px; }
.engine-overview { background:linear-gradient(145deg,var(--app-card),var(--app-card)); }
.mini-art-stack { position:absolute; top:20px; right:12px; display:flex; opacity:.3; pointer-events:none; }
.mini-art-stack img { height:62px; width:44px; object-fit:contain; margin-left:-26px; transform:rotate(12deg); }
.coverage-track { height:3px; background:var(--ui-hover); border-radius:4px; margin-top:15px; }
.coverage-track span { display:block; height:100%; background:var(--positive); border-radius:4px; }
.analysis-workspace { display:grid; grid-template-columns:minmax(0,1fr) 310px; background:linear-gradient(130deg,var(--app-card),var(--app-card)); border:1px solid var(--ui-border); border-radius:22px; overflow:hidden; scroll-margin-top:110px; }
.analysis-main { padding:24px; min-width:0; }
.analysis-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.analysis-heading h3 { font-size:23px; font-weight:550; letter-spacing:-.025em; }
.analysis-heading p { color:var(--text-tertiary); font-size:12px; margin-top:6px; }
.analysis-heading .eyebrow { font-size:10px; color:var(--text-tertiary); }
.engine-mark { font-size:62px; line-height:1; color:var(--col-sv03); padding:0 10px; text-shadow:0 0 30px rgba(88,86,214,.3); }
.analysis-price { display:flex; gap:16px; align-items:baseline; flex-wrap:wrap; margin:14px 0 4px; }
.analysis-price>strong { font-size:32px; font-weight:500; letter-spacing:-.04em; white-space:nowrap; }
.analysis-price>span { color:var(--text-tertiary); font-size:11px; }
.analysis-side { border-left:1px solid var(--ui-border); background:var(--ui-hover); padding:24px; display:flex; flex-direction:column; gap:20px; min-width:0; }
.analysis-side .eyebrow { color:var(--text-tertiary); font-size:10px; }
.projection-value>span:first-child,.projection-interval>span { display:block; color:var(--text-tertiary); font-size:12px; }
.projection-value>strong { display:block; font-size:36px; color:var(--text-primary); letter-spacing:-.04em; font-weight:500; margin:8px 0 12px; white-space:nowrap; }
.projection-interval>strong { display:block; font-size:14px; color:var(--text-primary); font-weight:500; margin-top:6px; }
.projection-explanation { color:var(--text-tertiary); font-size:12px; line-height:1.7; }
.projection-empty h4 { font-size:20px; font-weight:500; letter-spacing:-.03em; }
.projection-empty p { font-size:12px; color:var(--text-tertiary); line-height:1.7; margin-top:10px; }
.empty-symbol { color:var(--text-tertiary); display:block; font-size:38px; margin-bottom:12px; }
.analysis-side .action-button { font-size:12px; margin-top:auto; }
.analysis-side .quiet-link { font-size:12px; }
.market-catalog { min-width:0; }
.catalog-title { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px; margin-bottom:18px; }
.catalog-title h3 { font-size:21px; font-weight:550; letter-spacing:-.025em; }
.catalog-title .eyebrow { font-size:10px; color:var(--text-tertiary); margin-bottom:5px; }
.subtle { color:var(--text-tertiary); font-size:12px; }
.catalog-controls { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:18px; }
.catalog-controls select { width:auto; max-width:220px; min-height:40px; font-size:12px; }
.market-search { display:flex; align-items:center; gap:9px; padding:0 12px; border:1px solid var(--ui-border); background:var(--app-card); border-radius:10px; height:40px; flex:1; min-width:180px; color:var(--text-tertiary); }
.market-search input { min-width:0; width:100%; background:transparent; font-size:12px; color:var(--text-primary); }
.asset-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.asset-tile { background:var(--app-card); border:1px solid var(--ui-border); border-radius:16px; overflow:hidden; min-width:0; transition:transform .2s,border-color .2s; }
.asset-tile:hover { transform:translateY(-3px); border-color:var(--ui-border); }
.asset-select { width:100%; text-align:left; display:block; }
.product-art { position:relative; height:180px; display:grid; place-items:center; overflow:hidden; isolation:isolate; background:radial-gradient(ellipse at 50% 65%,color-mix(in srgb,var(--art) 18%,transparent),transparent 70%); }
.card-art img { height:155px; width:112px; object-fit:contain; position:relative; z-index:2; filter:drop-shadow(0 8px 12px rgba(0,0,0,.05)); transform:rotate(-5deg); transition:transform .25s; }
.asset-tile:hover .card-art img,.holding-tile:hover .card-art img { transform:rotate(0) translateY(-3px); }
.art-placeholder { position:absolute; display:grid; place-items:center; height:130px; width:94px; border:1px solid var(--ui-border); border-radius:8px; color:var(--art); background:var(--app-card); opacity:.3; transform:rotate(-5deg); }
.small-art { height:60px; width:52px; flex-shrink:0; border-radius:8px; }
.small-art img { height:54px; width:40px; }
.small-art .art-placeholder { height:48px; width:34px; }
.small-art .art-placeholder svg { width:20px; }
.box-illustration { position:relative; width:108px; height:110px; transform:rotate(-8deg) skewY(3deg); filter:drop-shadow(6px 10px 10px rgba(0,0,0,.05)); }
.box-front { position:absolute; inset:10px 16px 0 0; display:flex; flex-direction:column; align-items:center; justify-content:space-between; padding:9px 5px; overflow:hidden; background:linear-gradient(145deg,color-mix(in srgb,var(--art) 65%,#1b2240),#242740 70%); border:1px solid rgba(0,0,0,.24); }
.box-front>span:first-child { color:#f1de9b; font-size:9px; font-weight:800; letter-spacing:.12em; z-index:1; }
.box-front strong { font-size:11px; line-height:1.2; color:white; text-align:center; z-index:1; text-wrap:balance; margin:auto 0 3px; }
.box-front small { font-size:6px; color:rgba(255,255,255,.72); z-index:1; letter-spacing:.1em; }
.box-orbit { position:absolute; width:58px; height:58px; border:11px solid rgba(0,0,0,.09); border-radius:50%; top:18px; }
.box-orbit:after { content:''; position:absolute; width:22px; height:22px; border:5px solid rgba(0,0,0,.14); border-radius:50%; top:7px; left:7px; }
.box-top { position:absolute; left:0; right:16px; height:13px; top:-3px; transform:skewX(-50deg); transform-origin:bottom; background:color-mix(in srgb,var(--art) 85%,white); border:1px solid rgba(0,0,0,.2); }
.box-side { position:absolute; right:0; top:3px; bottom:7px; width:16px; transform:skewY(-40deg); background:color-mix(in srgb,var(--art) 25%,#171827); border:1px solid rgba(0,0,0,.12); }
.art-caption { position:absolute; right:10px; bottom:6px; font-size:8px; color:var(--text-tertiary); }
.small-art .box-illustration { transform:scale(.43) rotate(-8deg); }
.small-art .art-caption { display:none; }
.asset-copy { padding:14px 16px 12px; }
.asset-set { display:block; font-size:10px; color:var(--text-tertiary); line-height:1.5; margin-bottom:5px; }
.asset-copy h4,.holding-copy h4 { font-size:14px; font-weight:550; line-height:1.4; letter-spacing:-.01em; min-height:39px; }
.asset-price { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-top:12px; }
.asset-price>strong { font-size:20px; font-weight:500; letter-spacing:-.03em; white-space:nowrap; }
.source-pill { display:inline-flex; align-items:center; gap:4px; font-size:9px; color:var(--text-tertiary); white-space:nowrap; }
.source-pill i { height:4px; width:4px; background:var(--col-sv03); border-radius:50%; }
.source-live i { background:var(--positive); }
.asset-signal { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:10px; color:var(--text-tertiary); padding-top:10px; }
.asset-details { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:10px 16px; border-top:1px solid var(--ui-border); color:var(--text-tertiary); font-size:10px; text-align:left; width:100%; background:var(--ui-hover); }
.asset-details svg { flex-shrink:0; }
.desk-table { background:var(--app-card); }
.desk-table th { background:var(--app-card); }
.table-product { display:flex; align-items:center; gap:12px; text-align:left; }
.table-product strong { font-size:12px; font-weight:500; display:block; }
.table-product small { font-size:10px; color:var(--text-tertiary); display:block; margin-top:5px; }
.unavailable { color:var(--text-tertiary); font-size:11px; }
.portfolio-hero { position:relative; display:flex; justify-content:space-between; gap:20px; background:radial-gradient(ellipse at 85% 50%,var(--ui-active),transparent 60%),linear-gradient(125deg,var(--app-card),var(--app-card)); border:1px solid var(--ui-border); border-radius:22px; padding:30px; overflow:hidden; }
.portfolio-summary { position:relative; z-index:2; min-width:0; }
.portfolio-summary .eyebrow { color:var(--text-tertiary); }
.portfolio-total { font-size:clamp(32px,4vw,52px); font-weight:500; letter-spacing:-.06em; white-space:nowrap; }
.portfolio-return { display:flex; flex-wrap:wrap; align-items:center; gap:10px; font-size:12px; margin-top:8px; }
.portfolio-return>span:last-child { color:var(--text-tertiary); }
.portfolio-kpis { display:flex; flex-wrap:wrap; gap:30px; margin-top:26px; }
.portfolio-kpis span { display:block; font-size:11px; color:var(--text-tertiary); }
.portfolio-kpis strong { display:block; font-size:18px; font-weight:500; margin-top:5px; }
.portfolio-demo-note { color:var(--text-tertiary); font-size:11px; margin-top:18px; }
.tile-actions { display:flex; gap:8px; padding:10px; border-top:1px solid var(--ui-border); }
.tile-actions button { flex:1; width:auto; min-height:44px; padding:8px; font-size:12px; border:1px solid var(--ui-border); border-radius:9px; }
.asset-tile.selected { border-color:var(--ui-border-strong); box-shadow:0 0 0 1px var(--ui-border-strong); }
.undo-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid var(--ui-border); padding:14px 18px; border-radius:12px; background:var(--app-card-hover); }
.journal-panel { padding:22px; border:1px solid var(--ui-border); border-radius:16px; background:var(--app-card); min-width:0; }
.journal-panel .tablewrap { margin-top:20px; }
.lot-description { border-top:1px solid var(--ui-border); margin-top:12px; padding-top:10px; }
.lot-description p { font-size:12px; color:var(--text-tertiary); margin:5px 0; overflow-wrap:anywhere; }
.lot-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px; }
.lot-actions .action-button { font-size:12px; padding:8px; }
.lot-actions .quiet-link { grid-column:1/-1; min-height:40px; }
.version-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.add-holding-form input,.add-holding-form select { font-size:16px; }
.holding-copy .remove-button { font-size:12px; min-height:44px; }
.holding-copy>p,.asset-set,.source-pill,.asset-signal,.asset-details { font-size:12px; }
.holding-copy h4,.asset-copy h4 { font-size:15px; }
.catalog-controls select,.market-search input { font-size:14px; }
.market-search,.catalog-controls select { min-height:44px; }
@media(max-width:600px){
  .desk-layout { display:flex; flex-direction:column; }
  .market-catalog { order:0; }
  .market-overview { order:2; }
  .analysis-workspace { order:1; }
  .market-catalog:has(~ .analysis-workspace:not([hidden])) { order:0; }
  .asset-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tile-actions { flex-direction:column; }
  .holdings-grid { grid-template-columns:minmax(0,1fr); }
  .holding-tile { display:grid; grid-template-columns:110px minmax(0,1fr); align-items:start; }
  .holding-open .product-art { height:155px; }
  .holding-copy { padding:14px; }
  .holding-copy>p,.asset-set,.source-pill,.asset-signal { font-size:12px; }
  .holding-copy h4,.asset-copy h4 { font-size:14px; }
  .asset-copy h4 { min-height:40px; }
  .asset-price { align-items:flex-start; flex-direction:column; }
  .version-fields { grid-template-columns:minmax(0,1fr); }
  .journal-panel { padding:16px; }
  .holding-form-fields { grid-template-columns:minmax(0,1fr); }
}
.portfolio-collage { display:flex; align-items:center; min-width:240px; margin-right:24px; }
.portfolio-collage .product-art { overflow:visible; width:100px; margin-left:-18px; background:none; transform:rotate(10deg); }
.portfolio-collage .product-art:first-child { transform:rotate(-12deg); }
.portfolio-collage .product-art:nth-child(2) { transform:translateY(-12px); z-index:2; }
.portfolio-collage .card-art img { height:180px; width:130px; }
.portfolio-chart-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:18px; }
.portfolio-chart-panel,.portfolio-insights { background:var(--app-card); border:1px solid var(--ui-border); border-radius:18px; padding:22px; min-width:0; }
.portfolio-chart-panel .catalog-title { align-items:flex-start; }
.portfolio-chart-panel h3 { font-size:18px; }
.portfolio-chart-panel .subtle { margin-top:6px; }
.portfolio-chart-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; justify-content:space-between; margin:20px 0 8px; }
.chart-key { display:flex; align-items:center; gap:6px; font-size:11px; color:var(--text-tertiary); }
.chart-key i { width:7px; height:7px; border-radius:50%; background:var(--positive); }
.compare-check { display:flex; align-items:center; gap:7px; color:var(--text-tertiary); font-size:11px; cursor:pointer; }
.compare-check input { accent-color:var(--positive); }
.chart-footnote { font-size:11px; color:var(--text-tertiary); line-height:1.7; margin-top:12px; }
.portfolio-insights h3 { font-size:16px; font-weight:500; }
.portfolio-insights>.eyebrow { font-size:9px; }
.allocation-ring { width:132px; height:132px; display:grid; place-items:center; background:conic-gradient(var(--positive) 0 var(--part),var(--col-sv03) var(--part) 100%); border-radius:50%; margin:20px auto; }
.allocation-ring>div { width:108px; height:108px; background:var(--app-card); border-radius:50%; display:flex; align-items:center; justify-content:center; flex-direction:column; }
.allocation-ring strong { font-size:24px; font-weight:500; }
.allocation-ring span { font-size:10px; color:var(--text-tertiary); }
.allocation-legend { display:flex; flex-direction:column; gap:8px; }
.allocation-legend>span { display:flex; justify-content:space-between; gap:8px; color:var(--text-tertiary); font-size:11px; }
.allocation-legend strong { font-weight:500; color:var(--text-primary); }
.insight-note { border-top:1px solid var(--ui-border); padding-top:14px; margin-top:14px; }
.insight-note strong { font-size:12px; font-weight:500; color:var(--text-primary); }
.insight-note p { font-size:11px; color:var(--text-tertiary); margin-top:5px; line-height:1.65; }
.holdings-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-top:16px; }
.holding-tile { background:var(--app-card); border:1px solid var(--ui-border); border-radius:16px; overflow:hidden; min-width:0; }
.holding-open { display:block; position:relative; width:100%; }
.quantity-badge { position:absolute; right:12px; top:12px; font-size:11px; background:var(--ui-hover); padding:4px 8px; border-radius:7px; border:1px solid var(--ui-border); }
.holding-copy { padding:14px; }
.holding-value { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin:12px 0 5px; }
.holding-value>strong { font-size:20px; font-weight:500; white-space:nowrap; }
.holding-value>span { font-size:11px; }
.holding-copy>p { font-size:10px; color:var(--text-tertiary); min-height:30px; }
.holding-edit { display:grid; grid-template-columns:65px minmax(0,1fr); gap:10px; border-top:1px solid var(--ui-border); margin-top:12px; padding-top:12px; }
.holding-edit label { font-size:9px; color:var(--text-tertiary); }
.holding-edit input { display:block; width:100%; min-width:0; background:var(--app-card); border:1px solid var(--ui-border); border-radius:7px; padding:7px; color:var(--text-primary); font-size:11px; margin-top:4px; }
.holding-copy .remove-button { padding:10px 0 0; font-size:10px; }
.trading-detail { display:grid; grid-template-columns:minmax(180px,280px) minmax(0,1fr); align-items:start; gap:28px; padding-top:22px; }
.trading-detail>.product-art,.trading-detail>div>.product-art { height:330px; border-radius:18px; background:radial-gradient(ellipse at center,color-mix(in srgb,var(--art) 20%,transparent),var(--app-card)); }
.trading-detail .card-art img { height:290px; width:210px; }
.trading-detail .box-illustration { transform:scale(1.7) rotate(-8deg); }
.trading-detail h2 { font-size:27px; font-weight:500; letter-spacing:-.03em; line-height:1.25; }
.trading-detail .reading-stack { gap:12px; }
.trading-detail .easy-price { margin:0; }
.projection-inline { border-left:2px solid var(--col-sv03); padding:8px 14px; background:rgba(88,86,214,.03); }
.projection-inline strong { font-size:12px; font-weight:500; }
.projection-inline p { color:var(--text-tertiary); font-size:11px; margin-top:4px; }
.add-holding-form { padding:16px; background:var(--ui-hover); border:1px solid var(--ui-border); border-radius:12px; display:grid; gap:12px; }
.add-holding-form h3 { font-size:14px; font-weight:500; }
.holding-form-fields { display:grid; grid-template-columns:90px minmax(0,1fr); gap:12px; }
.add-holding-form label { font-size:11px; color:var(--text-tertiary); }
.add-holding-form .text-field { margin-top:5px; min-height:38px; padding:8px 10px; }
.add-holding-form>p { font-size:10px; color:var(--text-tertiary); }
@media(min-width:1600px) { .asset-grid,.holdings-grid { grid-template-columns:repeat(5,minmax(0,1fr)); } }
@media(max-width:1200px) { .market-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }.asset-grid,.holdings-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }.analysis-workspace { grid-template-columns:minmax(0,1fr) 280px; }.analysis-main,.analysis-side { padding:20px; }.portfolio-chart-layout { grid-template-columns:minmax(0,1fr) 270px; }.portfolio-collage { min-width:170px;margin-right:0; }.portfolio-collage .product-art { width:70px; }.portfolio-collage .card-art img { height:145px;width:105px; } }
@media(max-width:850px) { .analysis-workspace,.portfolio-chart-layout { grid-template-columns:minmax(0,1fr); }.analysis-side { border-left:0;border-top:1px solid var(--ui-border);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px; }.analysis-side>div:first-child { grid-column:1/-1; }.analysis-side .action-button { margin-top:0; }.portfolio-insights { display:grid;grid-template-columns:1fr 1fr;gap:12px 22px;align-items:start; }.portfolio-insights>.eyebrow,.portfolio-insights>h3 { grid-column:1/-1; }.portfolio-insights .allocation-ring { grid-row:3/5; }.portfolio-insights .insight-note { margin-top:0; }.portfolio-insights .allocation-legend { align-self:center; }.catalog-controls select { flex:1;max-width:none;min-width:0; } }
@media(max-width:600px) { .asset-grid,.holdings-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }.product-art { height:148px; }.card-art img { height:129px;width:92px; }.box-illustration { transform:scale(.9) rotate(-8deg); }.small-art { height:54px;width:44px; }.small-art img { height:46px;width:32px; }.small-art .box-illustration { transform:scale(.37) rotate(-8deg); }.overview-card { padding:14px; }.overview-card>strong { font-size:24px; }.overview-card>span { font-size:10px; }.overview-card p { font-size:10px; }.overview-card strong small { font-size:11px; }.mini-art-stack { display:none; }.analysis-main { padding:16px; }.analysis-heading h3 { font-size:20px; }.analysis-heading .eyebrow { font-size:9px; }.analysis-price>strong { font-size:29px; }.analysis-side { padding:16px; }.projection-value>strong { font-size:29px; }.analysis-side .projection-explanation { font-size:11px; }.analysis-side .projection-empty { grid-column:1/-1; }.analysis-side .empty-symbol { display:none; }.analysis-side .quiet-link { font-size:11px; }.asset-copy { padding:10px; }.asset-copy h4,.holding-copy h4 { font-size:12px;min-height:34px; }.asset-set { font-size:9px; }.asset-price>strong { font-size:18px; }.asset-details { font-size:9px;padding:9px 10px; }.asset-signal { flex-wrap:wrap;font-size:9px; }.portfolio-hero { padding:22px; }.portfolio-collage { position:absolute;right:-30px;top:15px;opacity:.18;min-width:0; }.portfolio-summary { width:100%; }.portfolio-total { font-size:36px; }.portfolio-kpis { gap:20px; }.portfolio-kpis strong { font-size:16px; }.portfolio-kpis span { font-size:10px; }.portfolio-chart-panel,.portfolio-insights { padding:16px; }.portfolio-insights { gap:10px; }.allocation-ring { width:108px;height:108px; }.allocation-ring>div { width:88px;height:88px; }.holding-copy { padding:10px; }.holding-value>strong { font-size:18px; }.holding-edit { grid-template-columns:48px minmax(0,1fr);gap:6px; }.holding-edit input { padding:6px 4px;font-size:10px; }.holding-copy>p { font-size:9px; }.holding-edit label { font-size:8px; }.catalog-controls .market-search { flex-basis:100%; }.catalog-title h3 { font-size:19px; }.trading-detail { grid-template-columns:minmax(0,1fr);padding-top:28px;gap:18px; }.trading-detail>div>.product-art { height:220px; }.trading-detail .card-art img { height:195px;width:140px; }.trading-detail .box-illustration { transform:scale(1.3) rotate(-8deg); }.trading-detail h2 { font-size:24px; }.analysis-workspace { scroll-margin-top:170px; } }
@media (max-width: 1100px) {
  .compare-toolbar { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .chart-footer { flex-wrap: wrap; }
}
@media (max-width: 767px) {
  #view { padding-top: 18px; }
  .page-context { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .page-context > .action-button { min-height: 36px; padding: 7px 12px; font-size: 12px; }
  .forecast-cards, .favorites-grid, .lexicon-grid { grid-template-columns: minmax(0, 1fr); }
  .forecast-cards { gap: 10px; }
  .forecast-cards .feature-card { padding: 18px; }
  .forecast-section-heading { align-items: flex-start; }
  .forecast-section-heading > .tag { display: none; }
  .market-forecast { scroll-margin-top: 165px; }
  .compare-workspace { padding: 16px; }
  .compare-period .seg { display: flex; }
  .compare-period .seg button { flex: 1; padding: 0 7px; font-size: 11px; }
  .chart-heading { align-items: flex-start; flex-direction: column; }
  .chart-heading .tag { height: auto; }
  .compare-legend { gap: 8px 14px; }
  .compare-badges { margin-bottom: 18px; }
  .collection-list .collection-row { padding: 14px; }
  .collection-row > span:first-child { min-width: 0; }
  .learning-intro { padding: 16px 16px 10px; gap: 10px; }
  .learning-details summary { padding: 0 16px 14px 56px; }
  .lesson-content { padding: 16px; }
  .learning-panel { margin-top: 18px; }
  .grading-inputs { gap: 12px; }
  .scenario-result { gap: 14px 20px; }
}
