/* =========================================================================
   MeritX — Stock Overview page (/stock/<symbol>)
   Live per-instrument snapshot: header (price, day/52-week range, volume),
   mini-chart -> full terminal, tabbed body (Overview/Chart/Technicals/
   Financials/News). Uses the shared pages.css --mxc-* tokens.
   ========================================================================= */
.stk { max-width: 1180px; }
.stk-back { display: inline-block; font-size: 14px; font-weight: 600; color: #2708A0; text-decoration: none; margin-bottom: 14px; }
.stk-back:hover { color: var(--mxc-text); }
[data-theme="dark"] .stk-back { color: #c9a227; }

/* -------- header -------- */
.stk-head {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto minmax(210px, 264px);
  grid-template-areas: "id px mini" "ranges ranges mini" "cta cta cta";
  gap: 16px 26px; align-items: start;
  background: var(--mxc-surface); border: 1px solid var(--mxc-border);
  border-radius: 18px; padding: 20px 22px;
}
.stk-head__id { grid-area: id; display: flex; align-items: center; gap: 13px; min-width: 0; }
/* circle logos (styles.css sets a global *{border-radius:0!important} — must out-important it) */
.stk-logo { width: 46px; height: 46px; border-radius: 50% !important; flex: none; position: relative; overflow: hidden;
  display: grid; place-items: center; border: 1px solid var(--mxc-border);
  background: color-mix(in srgb, var(--mxc-accent, #6c4cf1) 11%, var(--mxc-surface)); }
.stk-logo .mx-mono { font: 800 14px/1 Inter, sans-serif; color: var(--mxc-accent, #6c4cf1); letter-spacing: .02em; }
.stk-logo__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 7px; background: #fff; }
.stk-head__idtx { min-width: 0; }
.stk-name { font-size: clamp(1.3rem, 2.4vw, 1.85rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
.stk-meta { margin-top: 4px; font-size: 12.5px; color: var(--mxc-muted); display: flex; flex-wrap: wrap; gap: 6px 9px; align-items: center; }
.stk-meta .stk-tag { font: 700 9.5px/1 "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: color-mix(in srgb, var(--mxc-accent, #6c4cf1) 13%, transparent); color: var(--mxc-accent, #6c4cf1); }

.stk-head__px { grid-area: px; text-align: right; }
.stk-px { font: 800 clamp(1.7rem, 3vw, 2.3rem)/1 "JetBrains Mono", monospace; letter-spacing: -0.01em; }
.stk-chg { margin-top: 5px; font-size: 14px; font-weight: 700; }
.stk-asof { margin-top: 3px; font-size: 11px; color: var(--mxc-muted); }
.pos { color: var(--green, #1a7d42); } .neg { color: var(--red, #c0392b); }

.stk-head__ranges { grid-area: ranges; display: flex; flex-wrap: wrap; gap: 14px 30px; padding-top: 4px; }
.stk-range { min-width: 190px; flex: 1 1 190px; }
.stk-range__lbl { font-size: 11px; font-weight: 600; color: var(--mxc-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.stk-range__track { position: relative; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--red, #c0392b), #d9a441, var(--green, #1a7d42)); opacity: .85; }
.stk-range__dot { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--mxc-text); border: 2px solid var(--mxc-surface); transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.stk-range__ends { display: flex; justify-content: space-between; margin-top: 6px; font: 500 11.5px/1 "JetBrains Mono", monospace; color: var(--mxc-muted); }
.stk-stat2 { min-width: 120px; flex: 0 1 auto; }
.stk-stat2 .stk-range__lbl { margin-bottom: 3px; }
.stk-stat2 b { font: 700 14px/1.1 "JetBrains Mono", monospace; color: var(--mxc-text); }

.stk-head__mini { grid-area: mini; grid-row: 1 / 3; align-self: stretch; text-decoration: none;
  display: flex; flex-direction: column; border: 1px solid var(--mxc-border); border-radius: 13px; overflow: hidden;
  background: color-mix(in srgb, var(--mxc-accent, #6c4cf1) 4%, var(--mxc-surface)); min-height: 118px; transition: border-color .18s ease, box-shadow .18s ease; }
.stk-head__mini:hover { border-color: var(--mxc-accent, #6c4cf1); box-shadow: 0 8px 24px -12px color-mix(in srgb, var(--mxc-accent, #6c4cf1) 55%, transparent); }
.stk-mini__spark { flex: 1 1 auto; min-height: 78px; }
.stk-mini__cta { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; font-size: 12px; font-weight: 700; color: var(--mxc-accent, #6c4cf1); border-top: 1px solid var(--mxc-border); }

.stk-head__cta { grid-area: cta; display: flex; flex-wrap: wrap; gap: 10px; }

.stk-status { margin: 16px 0 0; padding: 14px 16px; border: 1px solid var(--mxc-border); border-radius: 12px; background: var(--mxc-surface); color: var(--mxc-muted); font-size: 13.5px; }

/* -------- single-scroll sections -------- */
.stk-panel { display: block; margin-top: 34px; }
.stk-panel[hidden] { display: none; }   /* display:block would otherwise beat the hidden attribute */

/* embedded terminal (Chart section) */
.stk-embedwrap { border: 1px solid var(--mxc-border); border-radius: 16px; overflow: hidden; background: var(--mxc-surface); }
.stk-embed { display: block; width: 100%; height: 580px; border: 0; }
@media (max-width: 639px) { .stk-embed { height: 460px; } }

/* pivot levels + statements table */
.stk-pivots { width: 100%; border-collapse: collapse; font: 500 13px/1.3 "JetBrains Mono", monospace; }
.stk-pivots th, .stk-pivots td { padding: 10px 14px; text-align: right; white-space: nowrap; border-top: 1px solid var(--mxc-border); }
.stk-pivots thead th { border-top: 0; font: 700 10.5px/1 Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--mxc-muted); }
.stk-pivots th:first-child, .stk-pivots td:first-child { text-align: left; font-family: Inter, sans-serif; font-weight: 600; }
.stk-dim { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--mxc-muted); font-size: 11.5px; }

/* price performance chips */
.stk-perf__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.stk-perf__cell { border: 1px solid var(--mxc-border); border-radius: 11px; padding: 11px 12px; background: var(--mxc-surface); display: flex; flex-direction: column; gap: 4px; }
.stk-perf__cell span { font-size: 11px; font-weight: 600; color: var(--mxc-muted); text-transform: uppercase; letter-spacing: .04em; }
.stk-perf__cell b { font: 700 15px/1 "JetBrains Mono", monospace; }

/* financials layout — sticky sheet rail + blocks */
.stk-finwrap { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 639px) { .stk-finwrap { grid-template-columns: 1fr; } .stk-finnav { position: static !important; flex-direction: row !important; flex-wrap: wrap; } }
.stk-finnav { position: sticky; top: calc(var(--nav-h, 72px) + 14px); display: flex; flex-direction: column; gap: 2px;
  border: 1px solid var(--mxc-border); border-radius: 13px; padding: 10px; background: var(--mxc-surface); }
.stk-finnav__h { font: 700 10.5px/1 Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--mxc-muted); padding: 4px 10px 9px; }
.stk-finnav a { display: block; padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--mxc-muted); text-decoration: none; }
.stk-finnav a:hover { color: var(--mxc-accent, #6c4cf1); background: color-mix(in srgb, var(--mxc-accent, #6c4cf1) 8%, transparent); }
.stk-finbody { min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.stk-finblock { scroll-margin-top: calc(var(--nav-h, 72px) + 16px); }
.stk-finblock__h { font-size: 15px; font-weight: 700; margin-bottom: 11px; }
.stk-fin__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; align-items: stretch; }
.stk-fin__cards--2 { grid-template-columns: repeat(2, 1fr); }
.stk-fin__cards--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 639px) { .stk-fin__cards--2, .stk-fin__cards--3 { grid-template-columns: 1fr; } }
.stk-fintable td:first-child { color: var(--mxc-muted); }

/* corporate actions — MC-style tabbed tables */
.stk-ca__tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--mxc-border); margin-bottom: 2px; }
.stk-ca__tab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 14px; margin-bottom: -1px; cursor: pointer; font: 600 13px/1 Inter, sans-serif; color: var(--mxc-muted); }
.stk-ca__tab:hover { color: var(--mxc-text); }
.stk-ca__tab.is-on { color: var(--mxc-accent, #6c4cf1); border-bottom-color: var(--mxc-accent, #6c4cf1); }
.stk-ca__panel { display: none; }
.stk-ca__panel.is-on { display: block; }
.stk-ca__tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.stk-ca__tbl th { text-align: left; font: 700 10.5px/1 Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--mxc-muted); padding: 12px 14px 8px; border-bottom: 1px solid var(--mxc-border); }
.stk-ca__tbl td { padding: 11px 14px; border-bottom: 1px solid color-mix(in srgb, var(--mxc-border) 60%, transparent); }
.stk-ca__tbl tr:last-child td { border-bottom: 0; }
.stk-ca__tbl th.r, .stk-ca__tbl td.r { text-align: right; font-family: "JetBrains Mono", monospace; font-weight: 600; }
.stk-ca__tbl td:first-child { color: var(--mxc-muted); }

/* MC-style trend mini-bars column in statement tables */
.stk-trendh { min-width: 96px; }
.stk-trendc { vertical-align: middle; }
.stk-trend { display: flex; gap: 4px; align-items: flex-end; height: 24px; justify-content: flex-end; }
.stk-trend i { display: block; width: 9px; border-radius: 2px 2px 0 0; background: color-mix(in srgb, var(--mxc-muted) 55%, transparent); }
.stk-trend i.neg { background: color-mix(in srgb, var(--red, #c0392b) 70%, transparent); }

/* Price & Volume — MC-style side-by-side */
.stk-pv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch; }
@media (max-width: 639px) { .stk-pv { grid-template-columns: 1fr; } }
.stk-pp__row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed color-mix(in srgb, var(--mxc-border) 70%, transparent); }
.stk-pp__row:last-child { border-bottom: 0; }
.stk-pp__row .k { flex: 0 0 108px; font-size: 13px; color: var(--mxc-muted); }
.stk-pp__row .t { flex: 1 1 auto; height: 10px; border-radius: 3px; background: color-mix(in srgb, var(--mxc-muted) 10%, transparent); overflow: hidden; }
.stk-pp__row .t i { display: block; height: 100%; border-radius: 3px; }
.stk-pp__row .t i.pos { background: color-mix(in srgb, var(--green, #1a7d42) 75%, transparent); }
.stk-pp__row .t i.neg { background: color-mix(in srgb, var(--red, #c0392b) 75%, transparent); }
.stk-pp__row .t i.vol { background: color-mix(in srgb, var(--mxc-accent, #6c4cf1) 70%, transparent); }
.stk-pp__row b { flex: 0 0 84px; text-align: right; font: 700 13px/1 "JetBrains Mono", monospace; }

/* about the company */
.stk-about__sum { font-size: 14.5px; line-height: 1.7; color: var(--mxc-text); max-width: 900px; }
.stk-about__sum.is-clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.stk-about__more { margin-top: 8px; background: none; border: 0; padding: 0; cursor: pointer; font: 600 13px/1 Inter, sans-serif; color: var(--mxc-accent, #6c4cf1); }
.stk-about__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; margin-top: 18px; align-items: stretch; }
.stk-about__grid .v a { color: var(--mxc-accent, #6c4cf1); text-decoration: none; }

/* analyst rating bars */
.stk-an__badge { display: inline-block; font: 800 15px/1 Inter, sans-serif; padding: 7px 13px; border-radius: 999px; margin-bottom: 13px;
  background: color-mix(in srgb, var(--mxc-accent, #6c4cf1) 12%, transparent); }
.stk-an__badge.pos { color: var(--green, #1a7d42); background: color-mix(in srgb, var(--green, #1a7d42) 14%, transparent); }
.stk-an__badge.neg { color: var(--red, #c0392b); background: color-mix(in srgb, var(--red, #c0392b) 14%, transparent); }
.stk-an__row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 12.5px; }
.stk-an__row .k { flex: 0 0 84px; color: var(--mxc-muted); }
.stk-an__row .t { flex: 1 1 auto; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--mxc-muted) 14%, transparent); overflow: hidden; }
.stk-an__row .v { flex: 0 0 38px; text-align: right; font: 700 12px/1 "JetBrains Mono", monospace; }
.stk-an__bar { display: block; height: 100%; border-radius: 999px; }
.stk-an__bar--sb { background: var(--green, #1a7d42); }
.stk-an__bar--b { background: color-mix(in srgb, var(--green, #1a7d42) 65%, #d9d9a0); }
.stk-an__bar--h { background: var(--mxc-muted); }
.stk-an__bar--s { background: color-mix(in srgb, var(--red, #c0392b) 65%, #d9a0a0); }
.stk-an__bar--ss { background: var(--red, #c0392b); }
.stk-an__bar--vol { background: var(--mxc-accent, #6c4cf1); opacity: .8; }

/* header quote refresh */
.stk-refresh { appearance: none; border: 1px solid var(--mxc-border); background: var(--mxc-surface); cursor: pointer;
  color: var(--mxc-muted); padding: 3px 6px; border-radius: 999px !important; margin-left: 6px; vertical-align: -2px; line-height: 0; }
.stk-refresh:hover { color: var(--mxc-accent, #6c4cf1); border-color: color-mix(in srgb, var(--mxc-accent, #6c4cf1) 45%, transparent); }
.stk-refresh.is-busy svg { animation: stkspin .7s linear infinite; }
@keyframes stkspin { to { transform: rotate(360deg); } }

/* volume analysis mini axis */
.stk-pv__axis { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 6px;
  border-top: 1px solid color-mix(in srgb, var(--mxc-border) 70%, transparent);
  font: 600 10.5px/1 "JetBrains Mono", monospace; color: var(--mxc-muted); }

/* pivot D/W/M chips + benchmark select */
.stk-pv__chips { display: inline-flex; gap: 4px; margin-left: 10px; vertical-align: 1px; }
.stk-pv__chip { appearance: none; border: 1px solid var(--mxc-border); background: var(--mxc-surface); cursor: pointer;
  font: 600 11px/1 Inter, sans-serif; color: var(--mxc-muted); padding: 5px 10px; border-radius: 999px !important; }
.stk-pv__chip:hover { color: var(--mxc-text); }
.stk-pv__chip.is-on { color: #fff; background: #2708A0; border-color: #2708A0; }
[data-theme="dark"] .stk-pv__chip.is-on { background: #4969FF; border-color: #4969FF; }
/* "Open in Terminal" button: indigo #2708A0 (light) / electric blue #4969FF (dark) */
#stkTermBtn { background: #2708A0; color: #fff; }
[data-theme="dark"] #stkTermBtn { background: #4969FF; }
.stk-vs__sel { appearance: none; margin-left: 10px; border: 1px solid var(--mxc-border); background: var(--mxc-surface); color: var(--mxc-text);
  font: 600 12px/1 Inter, sans-serif; padding: 6px 26px 6px 10px; border-radius: 999px !important; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--mxc-muted) 50%), linear-gradient(135deg, var(--mxc-muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 55%, calc(100% - 10px) 55%; background-size: 4px 4px; background-repeat: no-repeat; }

/* index analytics */
/* flags FILL the circular logo (cover, no padding) — like Sharpely's index avatars */
.stk-logo__img--flag { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; padding: 0; border-radius: 50% !important; }
.stk-fact { display: inline-flex; align-items: center; gap: 5px; vertical-align: 3px; margin-left: 10px; padding: 5px 11px; border-radius: 999px;
  font: 600 11.5px/1 Inter, sans-serif; letter-spacing: .01em; color: var(--mxc-accent, #6c4cf1); text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--mxc-accent, #6c4cf1) 40%, transparent); background: color-mix(in srgb, var(--mxc-accent, #6c4cf1) 7%, transparent); }
.stk-fact:hover { background: color-mix(in srgb, var(--mxc-accent, #6c4cf1) 14%, transparent); }
.stk-idxcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 11px; margin-bottom: 8px; }
.stk-idxcard { border: 1px solid var(--mxc-border); border-radius: 13px; background: var(--mxc-surface); padding: 13px 14px; }
.stk-idxcard .k { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mxc-muted); }
.stk-idxcard b { display: block; font: 700 19px/1.2 "JetBrains Mono", monospace; margin: 6px 0 10px; }
.stk-vs { display: grid; grid-template-columns: minmax(320px, 3fr) minmax(280px, 2fr); gap: 12px; align-items: stretch; }
@media (max-width: 639px) { .stk-vs { grid-template-columns: 1fr; } }
.stk-vs__chart { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.stk-vs__chart svg { width: 100%; height: 230px; display: block; }
.stk-vs__legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12.5px; color: var(--mxc-muted); }
.stk-vs__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.stk-vs__legend b { font-family: "JetBrains Mono", monospace; color: var(--mxc-text); }
.stk-vs__tbl td:first-child { color: var(--mxc-muted); }

/* stock vitals */
.stk-vital__n { font: 800 26px/1 "JetBrains Mono", monospace; margin: 4px 0 10px; }

/* seasonality */
.stk-season { padding: 18px 20px; }
.stk-season__head { font-size: 14.5px; margin-bottom: 16px; }
.stk-season__head b { font-family: "JetBrains Mono", monospace; }
.stk-season__bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; }
.stk-season__col { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 2px; border-radius: 9px; min-width: 0; }
.stk-season__col.is-now { background: color-mix(in srgb, var(--mxc-accent, #6c4cf1) 9%, transparent); outline: 1px solid color-mix(in srgb, var(--mxc-accent, #6c4cf1) 35%, transparent); }
.stk-season__barwrap { height: 68px; display: flex; align-items: flex-end; }
.stk-season__barwrap i { display: block; width: 14px; border-radius: 4px 4px 0 0; }
.stk-season__barwrap i.pos { background: var(--green, #1a7d42); }
.stk-season__barwrap i.neg { background: var(--red, #c0392b); }
.stk-season__col span { font: 700 10.5px/1 "JetBrains Mono", monospace; color: var(--mxc-muted); }
.stk-season__col b { font: 700 10.5px/1 "JetBrains Mono", monospace; }
/* keep all 12 months on screen on phones — tighten the grid so it never clips */
@media (max-width: 639px) {
  .stk-season { padding: 16px 12px; }
  .stk-season__bars { gap: 3px; }
  .stk-season__col { padding: 6px 0; gap: 4px; }
  .stk-season__barwrap { height: 56px; }
  .stk-season__barwrap i { width: 9px; }
  .stk-season__col span, .stk-season__col b { font-size: 8.5px; }
}
@media (max-width: 639px) {
  .stk-season__col span, .stk-season__col b { font-size: 8px; }
  .stk-season__barwrap i { width: 8px; }
}

/* price target */
.stk-tgt__mean { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.stk-tgt__mean b { font: 800 22px/1 "JetBrains Mono", monospace; }
.stk-tgt__mean span { font: 700 12.5px/1 Inter, sans-serif; }
.stk-tgt__track { position: relative; height: 6px; border-radius: 999px; margin: 8px 2px 8px;
  background: linear-gradient(90deg, var(--red, #c0392b), #d9a441, var(--green, #1a7d42)); opacity: .9; }
.stk-tgt__dot { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--mxc-accent, #6c4cf1); border: 2px solid var(--mxc-surface); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.stk-tgt__dot--px { background: var(--mxc-text); }

/* revenue & profit bars */
.stk-fin__chart { grid-column: 1 / -1; }
.stk-fybars { display: flex; gap: 18px; align-items: flex-end; padding: 8px 4px 2px; min-height: 150px; }
.stk-fybar { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.stk-fybar__bars { display: flex; gap: 5px; align-items: flex-end; height: 110px; width: 100%; justify-content: center; }
.stk-fybar__bars i { display: block; width: 26%; max-width: 34px; border-radius: 5px 5px 0 0; }
.stk-fybar__bars i.rev { background: var(--mxc-accent, #6c4cf1); opacity: .85; }
.stk-fybar__bars i.ni { background: var(--green, #1a7d42); }
.stk-fybar__lbl { font: 700 11px/1 "JetBrains Mono", monospace; color: var(--mxc-muted); }
.stk-fybar__v { font: 600 11px/1 Inter, sans-serif; color: var(--mxc-text); white-space: nowrap; }
.stk-fin__legend { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--mxc-muted); }
.stk-fin__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.stk-fin__legend i.rev { background: var(--mxc-accent, #6c4cf1); opacity: .85; }
.stk-fin__legend i.ni { background: var(--green, #1a7d42); }

/* -------- key stats grid (colour-accented) -------- */
.stk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 11px; }
.stk-stat { position: relative; border: 1px solid var(--mxc-border); border-radius: 12px; padding: 13px 14px 12px; background: var(--mxc-surface); transition: transform .15s ease, box-shadow .15s ease; }
.stk-stat:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .35); }
/* MeritX brand palette (see brand colour scheme): indigo / blue / gold / purple
   / gray — replaces the earlier off-brand rainbow of stat-heading accents. */
.stk-stat:nth-child(6n+1) { --stat-c: #2708A0; }  /* brand indigo (main) */
.stk-stat:nth-child(6n+2) { --stat-c: #4969FF; }  /* brand blue (add-on) */
.stk-stat:nth-child(6n+3) { --stat-c: #C9A227; }  /* brand gold (add-on) */
.stk-stat:nth-child(6n+4) { --stat-c: #4225c3; }  /* brand purple (add-on) */
.stk-stat:nth-child(6n+5) { --stat-c: #7B7B7B; }  /* brand gray (main) */
.stk-stat:nth-child(6n+6) { --stat-c: #2708A0; }  /* brand indigo (main) */
.stk-stat__k { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--stat-c, var(--mxc-accent)) 70%, var(--mxc-muted)); }
.stk-stat__v { margin-top: 6px; font: 700 18px/1.15 "JetBrains Mono", monospace; color: var(--mxc-text); }
.stk-stat__sub { margin-top: 2px; font-size: 11px; color: var(--mxc-muted); }

/* -------- charts -------- */
.stk-chartcard { padding: 12px 14px; }
.stk-chart__toolbar { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.stk-chart__toolbar button { padding: 5px 11px; border-radius: 7px; font: 600 12px/1 Inter, sans-serif; color: var(--mxc-muted); background: transparent; border: 1px solid transparent; cursor: pointer; }
.stk-chart__toolbar button:hover { color: var(--mxc-text); background: color-mix(in srgb, var(--mxc-text) 6%, transparent); }
.stk-chart__toolbar button.on { color: #fff; background: var(--mxc-accent, #6c4cf1); }
.stk-chart { height: 300px; }
.stk-chart--big { height: 460px; }
.stk-chart svg { display: block; width: 100%; height: 100%; }
.stk-openfull { text-decoration: none; }

/* -------- technicals -------- */
.stk-tech { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(340px, 2fr); gap: 12px; align-items: stretch; }
@media (max-width: 639px) { .stk-tech { grid-template-columns: 1fr; } }
.stk-tech__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
@media (max-width: 639px) { .stk-tech__cols { grid-template-columns: 1fr; } }
.stk-tech__card { border: 1px solid var(--mxc-border); border-radius: 13px; padding: 15px 16px; background: var(--mxc-surface); }
.stk-tech__h { font-size: 12px; font-weight: 700; color: var(--mxc-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 11px; }
.stk-tech__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--mxc-border); font-size: 13px; }
.stk-tech__row:first-of-type { border-top: 0; }
.stk-tech__row .k { color: var(--mxc-muted); }
.stk-tech__row .v { font: 700 13.5px/1 "JetBrains Mono", monospace; }
.stk-pill { font: 700 10px/1 Inter, sans-serif; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; }
.stk-pill--buy { color: var(--green, #1a7d42); background: color-mix(in srgb, var(--green, #1a7d42) 16%, transparent); }
.stk-pill--sell { color: var(--red, #c0392b); background: color-mix(in srgb, var(--red, #c0392b) 16%, transparent); }
.stk-pill--neu { color: var(--mxc-muted); background: color-mix(in srgb, var(--mxc-muted) 16%, transparent); }

/* -------- financials "soon" -------- */
.stk-soon { text-align: center; padding: 40px 24px; }
.stk-soon__ic { width: 54px; height: 54px; border-radius: 14px; margin: 0 auto 14px; display: grid; place-items: center; color: var(--mxc-accent, #6c4cf1); background: color-mix(in srgb, var(--mxc-accent, #6c4cf1) 12%, transparent); }
.stk-soon h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 8px; }
.stk-soon p { max-width: 480px; margin: 0 auto 16px; color: var(--mxc-muted); font-size: 14px; line-height: 1.6; }

/* -------- news -------- */
/* news = card boxes in a grid, one combined feed newest-first */
.stk-news { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-items: stretch; }
.stk-news__item { display: flex; flex-direction: column; gap: 8px; text-decoration: none; padding: 15px 16px;
  border-radius: 14px; border: 1px solid var(--mxc-border); background: var(--mxc-surface);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.stk-news__item:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -16px rgba(0, 0, 0, .35); border-color: #c9a227; }
.stk-news__t { font-size: 13.5px; font-weight: 650; color: var(--mxc-text); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.stk-news__m { margin-top: auto; font-size: 11.5px; color: var(--mxc-muted); }
.stk-news > .mx-card, .stk-news > .mkd-loading, .stk-news > .mkd-empty { grid-column: 1 / -1; }

.stk-disc { margin: 30px 0 10px; font-size: 11.5px; color: var(--mxc-muted); text-align: center; }

@media (max-width: 639px) {
  .stk-head { grid-template-columns: 1fr; grid-template-areas: "id" "px" "ranges" "mini" "cta"; }
  .stk-head__px { text-align: left; }
  .stk-head__mini { grid-row: auto; min-height: 130px; }
}
