/* GEX page (Arena look). Loaded after site.css, so rules here win ties with the
   shared .seg / .chip / .panel / .err / .gex-readout blocks, but only inside
   .gex-page: nothing here leaks into the pricer or play pages.
   Colours come from the site.css tokens; the literal fallbacks keep the page right
   if site.css is ever missing one. */

.gex-page {
  --gx-panel: var(--panel, #11161E);
  --gx-panel-2: var(--panel-2, #171E29);
  --gx-line: var(--line, #232C3A);
  --gx-text: var(--text, #EEF2F7);
  --gx-muted: var(--muted, #A9B4C4);
  --gx-up: var(--up, #16D67E);
  --gx-down: var(--down, #FF4D5E);
  --gx-amber: var(--sideways, #FFC53D);
  --gx-r: 16px;
  --gx-pad: 18px;
  position: relative;
  padding-top: 22px;
  padding-bottom: 56px;
}
/* the glow lives on the body so it fades out across the full width, not a boxed .page */
body[data-page="gex"] {
  background:
    radial-gradient(ellipse 40% 380px at 14% 0, rgba(22, 214, 126, .10), transparent 70%),
    radial-gradient(ellipse 34% 320px at 90% 60px, rgba(255, 77, 94, .07), transparent 70%),
    var(--bg, #07090D);
  background-repeat: no-repeat;
}
.gex-page .c-up { color: var(--gx-up); }
.gex-page .c-down { color: var(--gx-down); }
.gex-page .c-side { color: var(--gx-amber); }

/* ---------- header ---------- */
.gex-head { margin: 0 0 18px; }
.gex-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gx-muted);
  margin: 0 0 12px;
}
.gex-eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--gx-up); border-radius: 2px; }
.gex-head h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(34px, 4.4vw, 50px); line-height: 1.04; letter-spacing: -.035em;
  margin: 0;
}
.gex-h1-acc {
  background: linear-gradient(95deg, var(--gx-up) 10%, #7BF0B8 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gex-lede { color: var(--gx-muted); font-size: clamp(15px, 1.5vw, 17px); line-height: 1.55; margin: 10px 0 0; max-width: 70em; }

/* ---------- control bar ---------- */
.gex-controls {
  background: linear-gradient(180deg, var(--gx-panel), rgba(17, 22, 30, .8));
  border: 1px solid var(--gx-line);
  border-radius: var(--gx-r);
  padding: 16px var(--gx-pad);
  margin: 0 0 16px;
  display: flex; flex-direction: column; gap: 16px;
}
.ctl-row { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-end; }
.ctl-row-2 { padding-top: 16px; border-top: 1px solid var(--line-soft, #1A2230); }
.ctl-group { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ctl-view { margin-left: auto; }
.ctl-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ctl-label {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--gx-muted);
}

.ticker-form { display: flex; flex-direction: column; gap: 7px; }
.ticker-field { display: flex; gap: 8px; }
.gex-page .input {
  height: 44px; width: 190px; padding: 0 14px; font-size: 16px; font-weight: 600;
  letter-spacing: .02em; text-transform: uppercase;
  background: var(--bg, #07090D); border: 1px solid var(--gx-line); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.gex-page .input::placeholder { text-transform: none; font-weight: 400; letter-spacing: 0; }
.gex-page .input:focus { border-color: var(--gx-up); box-shadow: 0 0 0 3px rgba(22, 214, 126, .18); }
.gex-page .btn {
  min-height: 44px; border-radius: 12px; padding: 0 18px; font-weight: 600;
  background: var(--gx-panel-2); color: var(--gx-text);
}
.gex-page .btn:hover { border-color: rgba(22, 214, 126, .6); }
.gex-page .btn.primary { background: var(--gx-up); color: #03140A; box-shadow: 0 6px 20px -8px rgba(22, 214, 126, .7); }
.gex-page .btn.primary:hover { background: #3BE39A; border-color: #3BE39A; transform: translateY(-1px); }
.gex-page .btn:active { transform: translateY(0); }

.quick-wrap { flex: 1 1 280px; }
.quick-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.qp {
  min-height: 44px; min-width: 60px; padding: 0 16px;
  background: var(--bg, #07090D); border: 1px solid var(--gx-line); border-radius: 999px;
  color: var(--gx-muted); font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: .03em;
  cursor: pointer; transition: border-color .15s, color .15s, background .15s, transform .15s;
}
.qp:hover { color: var(--gx-text); border-color: rgba(22, 214, 126, .55); transform: translateY(-1px); }
.qp.active {
  color: var(--gx-text); border-color: var(--gx-up);
  background: rgba(22, 214, 126, .14); box-shadow: 0 0 0 3px rgba(22, 214, 126, .1);
}

/* segmented controls: a padded track with a lit thumb */
.gex-page .seg {
  background: var(--bg, #07090D); border: 1px solid var(--gx-line);
  border-radius: 12px; padding: 3px; gap: 2px; overflow: visible; align-items: stretch;
}
.gex-page .seg button {
  min-height: 38px; min-width: 52px; padding: 0 16px; border-radius: 9px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  color: var(--gx-muted); transition: color .15s, background .15s, box-shadow .15s;
}
.gex-page .seg button:hover { background: var(--gx-panel-2); color: var(--gx-text); }
.gex-page .seg button.active {
  background: rgba(22, 214, 126, .15); color: var(--gx-text);
  box-shadow: inset 0 0 0 1px rgba(22, 214, 126, .5);
}
.gex-page #viewSeg button { font-family: var(--font-ui); font-weight: 600; font-size: 14px; }
.gex-page .seg.exp-quick button { font-size: 13px; padding: 0 14px; }

/* expirations dropdown */
.gex-page .exp-toggle {
  min-height: 44px; padding: 0 14px; gap: 10px; font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  background: var(--bg, #07090D);
}
.gex-page .exp-toggle .caret { color: var(--gx-muted); }
.gex-page .exp-panel {
  top: calc(100% + 8px); border-radius: var(--gx-r); padding: 14px;
  background: var(--gx-panel-2); border-color: #2C3748;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6), 0 0 0 1px rgba(22, 214, 126, .06);
}
.gex-page .exp-panel-head { flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.gex-page .exp-panel-note { flex: 1 1 200px; }
.gex-page .exp-clear { min-height: 36px; padding: 0 14px; font-size: 12px; }
.gex-page .chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.gex-page .chip {
  min-height: 40px; padding: 0 8px; border-radius: 10px; text-align: center;
  background: var(--bg, #07090D); font-size: 12.5px;
}
.gex-page .chip:hover { color: var(--gx-text); }
.gex-page .chip.active { background: rgba(22, 214, 126, .16); color: var(--gx-text); box-shadow: inset 0 0 0 1px rgba(22, 214, 126, .35); }

/* ---------- state messages ---------- */
/* gex.js sets display:block inline, so this is an inline flow, not a flex row */
.gex-page .err {
  border-radius: 14px; padding: 11px 16px; font-size: 14px; line-height: 1.5; margin: 0 0 16px;
  background: rgba(255, 77, 94, .09); border: 1px solid rgba(255, 77, 94, .35); color: #FF8A95;
}
.gex-page .err::before { content: "!"; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; vertical-align: -5px; margin-right: 10px;
  font: 700 12px/1 var(--font-mono); background: rgba(255, 77, 94, .22); color: var(--gx-down); }
.gex-page .err.hint { background: rgba(255, 197, 61, .05); border-color: rgba(255, 197, 61, .22); color: var(--gx-muted); padding: 8px 14px; font-size: 13.5px; }
.gex-page .err.hint::before { content: "i"; background: rgba(255, 197, 61, .2); color: var(--gx-amber); }
.err-retry { margin-left: 12px; min-height: 36px; padding: 0 16px; font-size: 13px; }

/* ---------- KPI cards ---------- */
.kpis { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 12px; margin: 0 0 16px; }
.kpi {
  --k: var(--gx-muted);
  position: relative; overflow: hidden; min-width: 0;
  background: linear-gradient(165deg, var(--gx-panel-2) 0%, var(--gx-panel) 60%);
  border: 1px solid var(--gx-line); border-radius: var(--gx-r);
  padding: 16px var(--gx-pad) 15px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.kpi::before { /* the role colour, as a thin lit edge */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--k), transparent 85%); opacity: .9;
}
.kpi::after { /* soft glow behind the number */
  content: ""; position: absolute; width: 140px; height: 90px; right: -30px; top: -30px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--k), transparent); opacity: .13; pointer-events: none;
}
.kpi:hover { transform: translateY(-2px); border-color: #2F3B4D; }
.kpi-spot, .kpi-flip { --k: var(--gx-amber); }
.kpi-call { --k: var(--gx-up); }
.kpi-put { --k: var(--gx-down); }
.kpi-net[data-tone="pos"] { --k: var(--gx-up); border-color: rgba(22, 214, 126, .38); box-shadow: 0 10px 40px -18px rgba(22, 214, 126, .5); }
.kpi-net[data-tone="neg"] { --k: var(--gx-down); border-color: rgba(255, 77, 94, .38); box-shadow: 0 10px 40px -18px rgba(255, 77, 94, .5); }
.kpi-net[data-tone="pos"]::after, .kpi-net[data-tone="neg"]::after { opacity: .2; }

.gex-page .kpi-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--gx-muted); margin: 0;
}
.kpi-val { margin: 8px 0 6px; line-height: 1.05; }
.kpi .v {
  font-family: var(--font-mono); font-weight: 700; letter-spacing: -.03em;
  font-size: clamp(26px, 2.6vw, 34px); font-variant-numeric: tabular-nums; color: var(--gx-text);
}
.kpi-net .v { font-size: clamp(30px, 3.2vw, 42px); }
.kpi .v.pos { color: var(--gx-up); }
.kpi .v.neg { color: var(--gx-down); }
.kpi .v.spot-c, .kpi .v.flip-c { color: var(--gx-amber); }
.kpi-sub, .kpi-regime { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--gx-muted); }
.kpi-sub { white-space: pre-line; }
.kpi-regime { display: flex; align-items: flex-start; gap: 8px; font-weight: 500; color: var(--gx-text); }
.kpi-regime::before { content: ""; flex: none; margin-top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--k); box-shadow: 0 0 10px var(--k); }

/* first paint of a symbol: numbers shimmer instead of showing a stale dash */
.kpis.is-loading .v { color: transparent; border-radius: 8px; display: inline-block; min-width: 5.2ch;
  background: linear-gradient(90deg, var(--gx-panel-2) 0%, var(--gx-line) 50%, var(--gx-panel-2) 100%);
  background-size: 300% 100%; animation: gex-pulse 1.4s ease-in-out infinite; }
.kpis.is-loading .kpi-sub, .kpis.is-loading .kpi-regime { opacity: .55; }
@keyframes gex-pulse { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- chart panel ---------- */
.gex-chart-panel {
  background: linear-gradient(180deg, var(--gx-panel), #0E131A);
  border: 1px solid var(--gx-line); border-radius: var(--gx-r);
  padding: 16px var(--gx-pad) 14px; margin: 0 0 16px;
  box-shadow: 0 24px 60px -36px rgba(0, 0, 0, .9);
}
.chart-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; margin-bottom: 12px; }
.chart-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chart-title h2 { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; line-height: 1.15; margin: 0; }
.chart-ctx { font-family: var(--font-mono); font-size: 12px; color: var(--gx-muted); min-height: 1.2em; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; font-size: 12.5px; color: var(--gx-muted); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend li[hidden] { display: none; }
.lg-long { display: inline; }
.lg { display: inline-block; width: 14px; height: 10px; border-radius: 3px; flex: none; }
.lg-pos { background: linear-gradient(90deg, rgba(22, 214, 126, .35), var(--gx-up)); }
.lg-neg { background: linear-gradient(90deg, rgba(255, 77, 94, .35), var(--gx-down)); }
.lg-spot { height: 0; border-top: 2px dashed var(--gx-amber); border-radius: 0; width: 18px; }
.lg-flip { height: 0; border-top: 2px dotted var(--gx-amber); border-radius: 0; width: 18px; }
.lg-vol { background: linear-gradient(90deg, #1E2B2C, #6F9C8A); }

.gex-chart-panel .chart-tools { margin-bottom: 10px; gap: 12px; }
.gex-chart-panel .chart-hint { font-size: 11.5px; }
.gex-chart-panel .chart-hint .kmod { color: var(--gx-text); background: var(--gx-panel-2); }
.gex-chart-panel .zoom-tools { gap: 8px; }
.gex-chart-panel .seg.zoom-seg { padding: 2px; border-radius: 10px; }
.gex-chart-panel .seg.zoom-seg button { min-width: 38px; min-height: 34px; padding: 0 8px; font-size: 16px; border-radius: 8px; }
.gex-chart-panel .zoom-label { padding: 0 6px 0 10px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gx-muted); }
.gex-chart-panel .btn.zoom-reset { min-height: 40px; font-size: 12px; padding: 0 14px; border-radius: 10px; }

.gex-chart-panel .chart { border-radius: 12px; }
.chart-wrap { border-radius: 12px; }

/* skeleton over the chart on a symbol's first paint */
.gex-skel {
  position: absolute; inset: 0; z-index: 4; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: space-around; gap: 8px;
  padding: 56px 8% 56px; border-radius: 12px;
  background: #0C1017; border: 1px solid #1B2332;
}
.gex-skel[hidden] { display: none; }
.gex-skel::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(238, 242, 247, .06), transparent);
  transform: translateX(-100%); animation: gex-shimmer 1.4s infinite;
}
.gex-skel span { flex: 1 1 0; max-width: 26px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #1E2735, #161D28); }
@keyframes gex-shimmer { to { transform: translateX(100%); } }
.gex-chart-panel .loading-overlay { border-radius: 12px; z-index: 5; background: rgba(7, 9, 13, .6); }
.gex-vol-note { font-size: 12px; color: var(--gx-muted); text-align: center; margin: 8px 0 0; }
.gex-vol-note[hidden] { display: none; }

/* ---------- strike-row readout (card that follows the crosshair) ---------- */
.gex-page .gex-readout {
  background: rgba(14, 19, 26, .94); backdrop-filter: blur(6px);
  border: 1px solid #2C3748; border-radius: 12px; padding: 11px 13px 10px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .02);
  min-width: 170px;
}
.ro-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 6px; padding-bottom: 7px; border-bottom: 1px solid var(--gx-line); }
.ro-strike { font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--gx-text); }
.ro-strike small { font-size: 10px; font-weight: 600; letter-spacing: .12em; color: var(--gx-muted); text-transform: uppercase; margin-right: 5px; }
.ro-rel { color: var(--gx-muted); font-size: 11px; }
.ro-tag { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border: 1px solid currentColor; border-radius: 999px; padding: 0 7px; line-height: 16px; }
.ro-t { border-collapse: collapse; width: 100%; }
.ro-t td { padding: 1.5px 0; white-space: nowrap; }
.ro-t td:first-child { padding-right: 16px; color: var(--gx-muted); }
.ro-t td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.ro-t i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }
.ro-t tr.ro-net td { padding-top: 5px; border-top: 1px solid var(--gx-line); color: var(--gx-text); }
.ro-t tr.ro-net td:last-child { font-weight: 700; font-size: 13px; }
.ro-note { color: var(--gx-muted); font-size: 10.5px; }

/* ---------- info cards ---------- */
.gex-info { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.info-card { background: var(--gx-panel); border: 1px solid var(--gx-line); border-radius: var(--gx-r); overflow: hidden; transition: border-color .2s; }
.info-card[open] { border-color: #2C3748; }
.info-card summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 var(--gx-pad); font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -.01em;
  user-select: none;
}
.info-card summary::-webkit-details-marker { display: none; }
.info-card summary:hover { background: rgba(255, 255, 255, .02); }
.info-card summary:focus-visible { outline-offset: -3px; }
.info-ico {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font: 700 13px/1 var(--font-mono); color: var(--gx-up); background: rgba(22, 214, 126, .12); box-shadow: inset 0 0 0 1px rgba(22, 214, 126, .35);
}
.info-caret { margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--gx-muted); border-bottom: 2px solid var(--gx-muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s; }
.info-card[open] .info-caret { transform: rotate(-135deg) translate(-2px, -2px); }
.info-body { padding: 2px var(--gx-pad) 18px; color: var(--gx-muted); font-size: 14.5px; line-height: 1.65; }
.info-body p { margin: 0 0 10px; }
.info-body h3 { font-family: var(--font-ui); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gx-text); margin: 16px 0 6px; }
.read-list { list-style: none; display: grid; gap: 10px; margin: 0 0 14px; }
.read-list li { position: relative; padding-left: 18px; }
.read-list li::before { content: ""; position: absolute; left: 0; top: .68em; width: 6px; height: 6px; border-radius: 50%; background: var(--gx-line); box-shadow: 0 0 0 2px #0E131A, 0 0 0 3px #2C3748; }
.read-list b { font-weight: 600; }
.info-fine { font-size: 12.5px; line-height: 1.6; padding-top: 12px; border-top: 1px dashed var(--gx-line); color: var(--gx-muted); }
.info-body .kmod { font-family: var(--font-mono); font-size: 12px; border: 1px solid var(--gx-line); border-radius: 5px; padding: 0 5px; color: var(--gx-text); }

/* ---------- tablet ---------- */
/* dimmed layer behind the phone expirations sheet (phone only; tap closes it) */
.exp-backdrop { display: none; position: fixed; inset: 0; z-index: 59; background: rgba(5, 8, 13, .6); }
/* after a failed load: no empty chart under the error box. The panel keeps its width
   (so Retry can size the chart again) but takes no height. */
.gex-chart-panel.is-failed { height: 0; min-height: 0; padding: 0; margin: 0; border: 0; overflow: hidden; visibility: hidden; }

@media (max-width: 1020px) {
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .kpi-net { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 0 28px; align-items: center; }
  .kpi-net .kpi-label { grid-column: 1 / -1; }
  .kpi-net .kpi-val { margin: 6px 0 4px; }
  .gex-info { grid-template-columns: 1fr; }
  .ctl-view { margin-left: 0; }
}

/* ---------- phone ---------- */
/* a label that stays for screen readers but takes no room */
.sr-only-sm { }
@media (max-width: 700px) {
  .gex-page { --gx-pad: 14px; padding-top: 16px; padding-bottom: 40px; }
  .gex-head { margin-bottom: 14px; }
  .gex-head h1 { font-size: 32px; }
  .gex-eyebrow { font-size: 11px; margin-bottom: 8px; }
  .gex-lede { font-size: 14.5px; margin-top: 10px; }
  .gex-controls { padding: 14px; gap: 12px; }
  .ctl-row { gap: 12px; align-items: stretch; }
  .ctl-row > * { flex: 1 1 100%; min-width: 0; }
  /* labels over each control cost ~90px of the first screen: keep them for screen readers only */
  .ticker-form .ctl-label, .quick-wrap .ctl-label, .ctl-row-2 > .ctl-group:first-child .ctl-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ticker-form, .ticker-field { width: 100%; }
  .ticker-field .input { flex: 1 1 0; width: auto; min-width: 0; }
  .ticker-field .btn { flex: none; min-width: 88px; }
  /* popular symbols: one swipeable strip (scrolls inside itself, never the page) */
  .quick-picks { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 2px 14px 4px; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .quick-picks::-webkit-scrollbar { display: none; }
  .qp { flex: none; }
  .ctl-row-2 { gap: 12px; padding-top: 12px; }
  .ctl-inline { flex-wrap: nowrap; gap: 8px; }
  .gex-page .seg.exp-quick { flex: none; }
  .gex-page .seg button { min-height: 44px; }
  .gex-page .seg.exp-quick button { min-width: 46px; padding: 0 8px; }
  .gex-page .exp-pick { flex: 1; min-width: 0; }
  .gex-page .exp-toggle { width: 100%; justify-content: space-between; padding: 0 12px; gap: 6px; font-size: 12px; letter-spacing: -.02em; white-space: nowrap; }
  .ctl-view { flex-direction: row; align-items: center; justify-content: space-between; margin: 0; }
  .ctl-view .seg { flex: 1; max-width: 240px; display: flex; }
  .ctl-view .seg button { flex: 1; }
  .gex-page .exp-panel-note { flex: 1 1 100%; }
  .exp-backdrop.open { display: block; }
  .gex-page .exp-panel { position: fixed; left: 16px !important; right: 16px; top: auto; bottom: 16px; width: auto; max-height: 70vh; z-index: 60; }

  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
  .kpi { padding: 12px 14px 11px; }
  .kpi-net { display: block; }
  .kpi-val { margin: 6px 0 4px; }
  .kpi .v { font-size: 24px; }
  .kpi-net .v { font-size: 34px; }
  .kpi-sub { font-size: 12px; line-height: 1.35; }
  .kpi:hover { transform: none; }

  .gex-chart-panel { padding: 14px 10px 12px; }
  .chart-head, .gex-chart-panel .chart-tools { padding: 0 4px; }
  .chart-title h2 { font-size: 19px; }
  .legend { gap: 4px 14px; font-size: 12px; }
  .lg-long { display: none; }
  .gex-chart-panel .chart-tools { justify-content: space-between; }
  .gex-chart-panel .zoom-tools { width: 100%; justify-content: space-between; gap: 6px; }
  .gex-chart-panel .seg.zoom-seg button { min-width: 44px; min-height: 44px; padding: 0 4px; }
  .gex-chart-panel .zoom-label { padding: 0 2px 0 8px; font-size: 9.5px; }
  .gex-chart-panel .btn.zoom-reset { min-height: 48px; padding: 0 12px; }
  #gexChart { height: clamp(520px, 74svh, 640px); }
  .info-card summary { min-height: 56px; font-size: 16px; }
}
@media (max-width: 360px) {
  .gex-chart-panel .seg.zoom-seg button { min-width: 38px; }
  .gex-chart-panel .zoom-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gex-skel::after, .kpis.is-loading .v { animation: none; }
  .kpi, .qp, .info-caret, .gex-page .btn { transition: none; }
  .kpi:hover, .qp:hover { transform: none; }
}
