/* ===========================================================================
 * Stock page (/stocks/{slug}) — stocks/show.php and stocks/detail/*.
 *
 * Loaded only on stock pages (the view's "head" section), so none of this can
 * leak into the rest of the site. Accent colours follow the site palette
 * (--brand, --ink); gains and losses always use fixed green and red.
 * Selectors that target plain elements (h2, a, table …) carry two classes so
 * they win over the theme's "body.site-shell h2 / a" rules.
 * =========================================================================== */

.sd {
  --sd-up: #0e8641;
  --sd-up-bg: #e7f6ee;
  --sd-up-line: #c5e9d4;
  --sd-dn: #d11f42;
  --sd-dn-bg: #fdecef;
  --sd-dn-line: #f7ccd5;
  --sd-warn: #b45309;
  --sd-warn-bg: #fef3e2;
  --sd-flat: #5b6675;
  --sd-flat-bg: #f1f3f6;
  --sd-soft: #f6f8fa;
  --sd-line: #e3e8ee;
  --sd-line-2: #edf0f4;
  --sd-muted: #5d6877;
  --sd-ink: var(--ink, #0f161e);
  --sd-brand: var(--brand, #037c2f);
  --sd-brand-2: var(--brand-700, #025a22);
  --sd-brand-bg: color-mix(in srgb, var(--sd-brand) 9%, #fff);
  --sd-r: 18px;
  --sd-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 14px 34px -22px rgba(16, 24, 40, .24);
  --sd-top: calc(var(--hh, 64px) + 60px);
  --sd-ease: cubic-bezier(.2, .8, .2, 1);
  color: var(--sd-ink);
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sd-brand) 6%, #f3f6f8) 0, #f5f7f9 560px, #f5f7f9 100%);
}

html:has(.sd) { scroll-behavior: smooth }
.sd [data-sd-sec] { scroll-margin-top: var(--sd-top) }

/* ---------------------------------------------------------------- shared */
.sd .up { color: var(--sd-up) }
.sd .dn { color: var(--sd-dn) }
.sd .flat, .sd .muted { color: var(--sd-muted) }

.sd-card {
  background: #fff;
  border: 1px solid var(--sd-line);
  border-radius: var(--sd-r);
  box-shadow: var(--sd-shadow);
  padding: 24px;
  margin-bottom: 20px;
  min-width: 0;
}

.sd-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 18px;
}
.sd-head > div:first-child { min-width: 0; flex: 1 1 320px }

.sd-kicker {
  margin: 0 0 6px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sd-brand);
}

.site-shell .sd .sd-head h2 {
  margin: 0;
  font-family: var(--font, inherit);
  font-size: clamp(1.16rem, 1rem + .55vw, 1.42rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.sd-sub { margin: 6px 0 0; max-width: 760px; font-size: .88rem; line-height: 1.55; color: var(--sd-muted) }

.site-shell .sd .sd-h3 {
  margin: 24px 0 10px;
  font-family: var(--font, inherit);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--sd-muted);
}

.sd-foot { margin: 10px 0 0; font-size: .77rem; line-height: 1.55; color: var(--sd-muted) }
.sd-foot b { color: var(--sd-ink) }

.sd-badge {
  font-size: .74rem;
  font-weight: 800;
  color: var(--sd-brand-2);
  background: var(--sd-brand-bg);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}

.sd-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
}
.sd .sd-pill.up { color: #0a6b33; background: var(--sd-up-bg) }   /* --sd-up on this tint is 4.2:1, under AA */
.sd .sd-pill.dn { color: var(--sd-dn); background: var(--sd-dn-bg) }
.sd .sd-pill.flat { color: var(--sd-flat); background: var(--sd-flat-bg) }
.sd .sd-pill.warn { color: var(--sd-warn); background: var(--sd-warn-bg) }

.sd-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px }
.sd-grid-2 > .sd-card { margin-bottom: 0 }
.sd-grid-2 > :only-child { grid-column: 1 / -1 }
.sd-grid-tight { gap: 16px; margin-bottom: 16px }
.sd-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px }

.sd-box {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--sd-line-2);
  border-radius: 14px;
  background: #fbfcfd;
}
.sd-box-h { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 14px }
.sd-box-h b { font-size: .92rem; font-weight: 800 }
.sd-box-h span { font-size: .72rem; font-weight: 600; color: var(--sd-muted) }
.sd-box-h.mt { margin-top: 20px }

/* Segmented control (chart range, annual / quarterly, delivery / intraday). */
.sd-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--sd-flat-bg) }
.sd-seg button {
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 7px 14px;
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--sd-muted);
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.sd-seg button:hover { color: var(--sd-ink) }
.sd-seg button.on { background: #fff; color: var(--sd-ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .14) }
.sd button:focus-visible, .sd a:focus-visible, .sd summary:focus-visible { outline: 2px solid var(--sd-brand); outline-offset: 2px }
.sd-seg-sm button { padding: 6px 12px; font-size: .76rem }

/* Horizontal bars (balance sheet, peers, returns …). */
.sd-hbars { display: flex; flex-direction: column; gap: 13px }
.sd-hbar-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; font-size: .8rem }
.sd-hbar-top span { font-weight: 700; min-width: 0 }
.sd-hbar-top b { font-weight: 800; white-space: nowrap }
.sd-hbar.me .sd-hbar-top span { color: var(--sd-brand-2); font-weight: 800 }
.sd-hbar small { display: block; margin-top: 5px; font-size: .72rem; color: var(--sd-muted) }
.sd-hbar-t { position: relative; height: 8px; border-radius: 99px; background: #ebeff4 }
.sd-hbar-t i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 99px; background: #94a3b8 }
.sd-hbar-t i.assets { background: linear-gradient(90deg, #93c5fd, #2563eb) }
.sd-hbar-t i.liab { background: linear-gradient(90deg, #d5dbe3, #94a3b8) }
.sd-hbar-t i.equity { background: linear-gradient(90deg, #86efac, #16a34a) }
.sd-hbar-t i.debt { background: linear-gradient(90deg, #fda4af, #e11d48) }
.sd-hbar-t i.cash { background: linear-gradient(90deg, #99f6e4, #0d9488) }
.sd-hbar-t i.brand { background: linear-gradient(90deg, color-mix(in srgb, var(--sd-brand) 45%, #fff), var(--sd-brand)) }
.sd-hbar-t i.soft { background: linear-gradient(90deg, #d3dae3, #9aa6b5) }
.sd-hbar-t i.up { background: linear-gradient(90deg, #86d9a9, var(--sd-up)) }
.sd-hbar-t i.dn { background: linear-gradient(90deg, #f7a6b4, var(--sd-dn)) }
.sd-div::before { content: ''; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1.5px; background: #c3cbd5; z-index: 1 }
.sd-div i.up { left: 50% }
.sd-div i.dn { left: auto; right: 50%; background: linear-gradient(270deg, #f7a6b4, var(--sd-dn)) }
.sd-mark { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--sd-ink) }

/* Range bar with a knob (today's range, 52-week range, P/E band). */
.sd-range-bar { position: relative; height: 8px; border-radius: 99px; background: linear-gradient(90deg, #f6bfc9, #e7ebf0 50%, #b9e4cb) }
.sd-range-bar i {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 3.5px solid var(--sd-brand);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(16, 24, 40, .22);
}
.sd-range-sm { height: 6px }
.sd-range-sm i { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-width: 3px }

/* Tables. */
/* overflow-y hidden: a 1px rounding overflow would otherwise show a vertical scrollbar down the table. */
.sd-table-wrap { overflow-x: auto; overflow-y: hidden; border: 1px solid var(--sd-line); border-radius: 14px; background: #fff; -webkit-overflow-scrolling: touch }
.sd-table { width: 100%; min-width: 560px; margin: 0; border-collapse: separate; border-spacing: 0; font-size: .84rem }
.site-shell .sd .sd-table th,
.site-shell .sd .sd-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--sd-line-2);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  background: #fff;
}
.site-shell .sd .sd-table thead th {
  background: #f7f9fb;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sd-muted);
}
.site-shell .sd .sd-table tbody th { font-weight: 800; color: var(--sd-ink) }
.site-shell .sd .sd-table tbody tr:last-child > * { border-bottom: 0 }
.site-shell .sd .sd-table tbody tr:hover > * { background: #fafbfc }
.site-shell .sd .sd-table .num { text-align: right }
.site-shell .sd .sd-table .strong { font-weight: 800 }
.site-shell .sd .sd-table small { font-weight: 600; font-size: .72rem }
.site-shell .sd .sd-table tr.me > * { background: color-mix(in srgb, var(--sd-brand) 6%, #fff) }
.site-shell .sd .sd-table-fin tbody th,
.site-shell .sd .sd-table-peers tbody th,
.site-shell .sd .sl-table tbody th,
.site-shell .sd .sa-table tbody th,
.site-shell .sd .sa-table thead th:first-child,
.site-shell .sd .sd-table-fin thead th:first-child,
.site-shell .sd .sd-table-peers thead th:first-child,
.site-shell .sd .sl-table thead th:first-child { position: sticky; left: 0; z-index: 1 }
.sd-dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 3px; vertical-align: 0 }

/* Expandable panel ("Full financial statements", "All key metrics"). */
.sd-more { margin-top: 18px; padding: 0 16px; border: 1px solid var(--sd-line); border-radius: 14px; background: #fff }
.sd-more[open] { padding-bottom: 16px }
.sd-more > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  font-size: .92rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.sd-more > summary::-webkit-details-marker { display: none }
.sd-more > summary::after,
.sd-calc-break > summary::after {
  content: '';
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s;
}
.sd-more[open] > summary::after,
.sd-calc-break[open] > summary::after { transform: rotate(-135deg) }
.sd-more > .sd-seg { margin-bottom: 12px }

/* ---------------------------------------------------------------- hero */
.sd-hero { padding: 22px 0 0; background: radial-gradient(900px 280px at 88% -60px, color-mix(in srgb, var(--sd-brand) 15%, transparent), transparent 70%) }

.sd-crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; font-size: .8rem; font-weight: 600; color: var(--sd-muted) }
.site-shell .sd .sd-crumbs a { color: var(--sd-muted); text-decoration: none }
.site-shell .sd .sd-crumbs a:hover { color: var(--sd-brand-2) }
.sd-crumbs [aria-current] { color: var(--sd-ink) }

.sd-hero-grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 18px 32px }
.sd-id { display: flex; align-items: flex-start; gap: 16px; flex: 1 1 440px; min-width: 0 }
.sd-id-text { min-width: 0 }
.sd-mono {
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  height: 58px;
  border-radius: 17px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(135deg, var(--sd-brand), color-mix(in srgb, var(--sd-brand) 45%, #1e3a8a));
  box-shadow: 0 12px 24px -14px color-mix(in srgb, var(--sd-brand) 90%, transparent);
}
/* A saved logo in place of the letters: a white tile so any logo colours sit well. */
.sd-mono.has-logo { padding: 6px; border: 1px solid var(--sd-line); background: #fff; box-shadow: 0 10px 22px -16px rgba(16, 24, 40, .35) }
.sd-mono.has-logo img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 10px }
.site-shell .sd .sd-hero h1 {
  margin: 2px 0 10px;
  font-family: var(--font, inherit);
  font-size: clamp(1.55rem, 1.05rem + 1.7vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.028em;
  line-height: 1.1;
}
.sd-chips { display: flex; flex-wrap: wrap; gap: 6px }
.sd-chips span,
.site-shell .sd .sd-chips a {
  padding: 4px 11px;
  border: 1px solid var(--sd-line);
  border-radius: 999px;
  background: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: #475467;
}
.sd-chips .idx { color: var(--sd-brand-2); background: var(--sd-brand-bg); border-color: color-mix(in srgb, var(--sd-brand) 28%, #fff) }
/* The sector chip is a link to the sector's page. */
.site-shell .sd .sd-chips a { text-decoration: none; transition: border-color .15s, color .15s }
.site-shell .sd .sd-chips a.sec::after { content: ' \2192'; opacity: .6 }
.site-shell .sd .sd-chips a:hover { border-color: var(--sd-brand); color: var(--sd-brand-2) }

.sd-quote { margin-left: auto; text-align: right }
.sd-quote-top { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 12px }
.sd-last { font-size: clamp(2rem, 1.35rem + 2.3vw, 3.05rem); font-weight: 800; letter-spacing: -.035em; line-height: 1 }
.sd-move { padding: 6px 12px; border-radius: 999px; font-size: .95rem; font-weight: 800; white-space: nowrap }
.sd .sd-move.up { color: var(--sd-up); background: var(--sd-up-bg) }
.sd .sd-move.dn { color: var(--sd-dn); background: var(--sd-dn-bg) }
.sd .sd-move.flat { color: var(--sd-flat); background: var(--sd-flat-bg) }
.sd-quote-meta { margin: 8px 0 0; font-size: .8rem; color: var(--sd-muted) }
.sd-quote-meta b { color: var(--sd-ink) }
.sd-status { font-weight: 700; color: var(--sd-ink) }
.sd-status i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #98a2b3; vertical-align: 1px }
.sd-status.open i { background: var(--sd-up); animation: sd-pulse 2s infinite }
@keyframes sd-pulse {
  0% { box-shadow: 0 0 0 0 rgba(14, 134, 65, .45) }
  70% { box-shadow: 0 0 0 8px rgba(14, 134, 65, 0) }
  100% { box-shadow: 0 0 0 0 rgba(14, 134, 65, 0) }
}
/* The quote card on the right of the header (_hero.php): price and move, open / previous close /
   day's high / day's low, and today's range with the open and previous close marked on it. */
.sd-qcard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-self: stretch;   /* level with the column beside it; the "Updated" line sits at the bottom */
  flex: 0 1 430px;
  min-width: 0;
  overflow: hidden;
  padding: 18px 20px 16px;
  border: 1px solid var(--sd-line);
  border-radius: var(--sd-r);
  background: #fff;
  box-shadow: var(--sd-shadow);
  text-align: left;
}
.sd-qcard::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--sd-flat) }
/* is-up / is-dn, not up / dn: ".sd .up" would turn every figure in the card green. */
.sd-qcard.is-up { background: linear-gradient(180deg, color-mix(in srgb, var(--sd-up) 7%, #fff), #fff 60%) }
.sd-qcard.is-dn { background: linear-gradient(180deg, color-mix(in srgb, var(--sd-dn) 6%, #fff), #fff 60%) }
.sd-qcard.is-up::before { background: linear-gradient(90deg, #86d9a9, var(--sd-up)) }
.sd-qcard.is-dn::before { background: linear-gradient(90deg, #f7a6b4, var(--sd-dn)) }
.sd-qcard .sd-move { padding: 5px 11px; font-size: .86rem }

/* Beside the card: name, intro, the key numbers (4 to a row) and the price trend,
   which takes whatever height is left so the column ends level with the card. */
.sd-hero-main { display: flex; flex: 1 1 440px; flex-direction: column; align-self: stretch; min-width: 0 }
.sd-hero-main > .sd-id { flex: 0 0 auto }
.sd-htrend {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 104px;
  margin-top: 16px;
  padding: 12px 18px 10px;
  border: 1px solid var(--sd-line);
  border-radius: var(--sd-r);
  background: #fff;
  box-shadow: var(--sd-shadow);
}
.sd-ht-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px }
.sd-ht-title b { font-size: .9rem; font-weight: 800 }
.sd-ht-title span { margin-left: 8px; font-size: .72rem; color: var(--sd-muted) }
.sd-ht-ret { display: flex; gap: 6px }
.sd-ht-ret span { display: flex; align-items: baseline; gap: 6px; padding: 5px 10px; border-radius: 10px; background: var(--sd-soft); font-size: .8rem }
.sd-ht-ret em { font-size: .66rem; font-style: normal; font-weight: 800; letter-spacing: .06em; color: var(--sd-muted) }
.sd-ht-ret b { font-weight: 800 }
.sd-ht-plot { position: relative; flex: 1 1 auto; min-height: 48px; margin: 10px 6px 6px 0; color: var(--sd-flat) }
.sd-htrend.is-up .sd-ht-plot { color: var(--sd-up) }
.sd-htrend.is-dn .sd-ht-plot { color: var(--sd-dn) }
.sd-ht-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible }
.sd-ht-base { stroke: #b8c2cf; stroke-width: 1; stroke-dasharray: 4 4 }
.sd-ht-dot {
  position: absolute;
  left: 100%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
}
.sd-ht-axis { display: flex; justify-content: space-between; gap: 10px; font-size: .7rem; font-weight: 600; color: var(--sd-muted) }
.sd-ht-axis b { color: var(--sd-ink) }
.sd-hero-main .sd-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: #fff }
.sd-hero-main .sd-kpis > div { outline: 1px solid var(--sd-line-2) }
.sd-qc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; font-size: .78rem }
.sd-qc-ex { padding: 3px 10px; border-radius: 999px; background: var(--sd-ink); color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .1em }
.sd-qcard .sd-quote-top { justify-content: flex-start }
.sd-qcard .sd-last { font-size: clamp(1.9rem, 1.3rem + 1.9vw, 2.6rem) }
.sd-qcard .sd-quote-meta { margin-top: 8px }
.sd-qc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 0 0;
  overflow: hidden;
  border: 1px solid var(--sd-line-2);
  border-radius: 12px;
  background: var(--sd-line-2);
}
.sd-qc-grid > div { padding: 10px 13px; background: rgba(255, 255, 255, .96) }
.sd-qc-grid > div:last-child:nth-child(odd) { grid-column: 1 / -1 }
.sd-qc-grid dt { font-size: .63rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--sd-muted) }
.sd-qc-grid dd { margin: 3px 0 0; font-size: 1rem; font-weight: 800; white-space: nowrap }
.sd-qc-range { margin-top: 16px }
.sd-qc-bar { position: relative; height: 8px; margin: 0 8px; border-radius: 99px; background: #edf0f4 }
.sd-qc-fill { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, #f4a3b1, #e9d9a8 50%, #92d8b0) }
.sd-qc-tick { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: #334155 }
.sd-qc-tick.op { background: #6366f1 }
.sd-qc-knob {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 3px solid var(--sd-brand);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(16, 24, 40, .25);
}
.sd-qc-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; font-size: .7rem; font-weight: 700; color: var(--sd-muted) }
.sd-qc-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 3px; vertical-align: -1px }
.sd-qc-legend i.fill { background: linear-gradient(90deg, #f4a3b1, #92d8b0) }
.sd-qc-legend i.pc { width: 3px; background: #334155 }
.sd-qc-legend i.op { width: 3px; background: #6366f1 }
.sd-qc-legend i.knob { width: 10px; border: 2.5px solid var(--sd-brand); border-radius: 50%; background: #fff }
.sd-qcard > :nth-last-child(2) { margin-bottom: 12px }
.sd-qc-upd { margin: auto 0 0; padding-top: 10px; border-top: 1px dashed var(--sd-line); font-size: .72rem; color: var(--sd-muted) }

.sd-lede { max-width: 860px; margin: 16px 0 0; line-height: 1.65; color: var(--sd-muted) }

.sd-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin: 22px 0 0;
  overflow: hidden;
  border: 1px solid var(--sd-line);
  border-radius: var(--sd-r);
  background: var(--sd-line-2);
  box-shadow: var(--sd-shadow);
}
.sd-kpis > div { flex: 1 1 130px; padding: 14px 16px; background: #fff }
.sd-kpis dt { font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--sd-muted) }
.sd-kpis dd { margin: 5px 0 0; font-size: 1.04rem; font-weight: 800; white-space: nowrap }

/* ---------------------------------------------------------------- section menu */
.sd-nav {
  position: sticky;
  top: var(--hh, 64px);
  z-index: 1015;
  margin-top: 20px;
  border-top: 1px solid var(--sd-line);
  border-bottom: 1px solid var(--sd-line);
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}
.sd-nav-in { position: relative; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none }
.sd-nav-in::-webkit-scrollbar { display: none }
.site-shell .sd .sd-nav a {
  flex: 0 0 auto;
  padding: 15px 12px 12px;
  border-bottom: 3px solid transparent;
  font-size: .86rem;
  font-weight: 700;
  color: var(--sd-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.site-shell .sd .sd-nav a:hover { color: var(--sd-ink) }
.site-shell .sd .sd-nav a.on { color: var(--sd-brand-2); border-bottom-color: var(--sd-brand) }

.sd-body { padding: 22px 0 6px }

/* ---------------------------------------------------------------- last 20 trading days */
.sd-days { padding: 16px 18px }
.sd-days-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px }
.site-shell .sd .sd-days-head h2 { margin: 0; font-family: var(--font, inherit); font-size: 1rem; font-weight: 800; letter-spacing: -.01em }
.sd-days-sum { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .78rem; font-weight: 700; color: var(--sd-muted) }
.sd-days-sum b { font-weight: 800 }
.sd-days-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none }
.sd-day { padding: 9px 4px; border-radius: 8px; background: #eef1f4; text-align: center; line-height: 1.45; cursor: default; transition: transform .15s, box-shadow .15s }
.sd-day:hover { transform: translateY(-2px); box-shadow: 0 8px 16px -12px rgba(16, 24, 40, .45) }
.sd-day b { display: block; font-size: .8rem; font-weight: 800; color: var(--sd-ink) }
.sd-day span { display: block; font-size: .8rem; font-weight: 600; color: #1f2937 }
.sd-day em { display: block; font-size: .74rem; font-style: normal; font-weight: 600; color: #374151 }
/* Stronger shade = bigger move: under 0.5%, under 1%, 1% or more. */
.sd-day.up.l1 { background: #dcf1e5 }
.sd-day.up.l2 { background: #b9e3cb }
.sd-day.up.l3 { background: #8fcfab }
.sd-day.dn.l1 { background: #fae1e5 }
.sd-day.dn.l2 { background: #f4c3cc }
.sd-day.dn.l3 { background: #eb9aa8 }

/* ---------------------------------------------------------------- market lists (stocks/list.php, stocks/lists/*) */
.sl-icon { color: #fff }
.sl-icon .sl-ic { width: 28px; height: 28px }
.sl .sd-kpis dd { white-space: normal; font-size: .98rem; line-height: 1.3 }

/* The four lists as tabs under the heading. */
.sl-switch { display: flex; gap: 8px; margin: 20px 0 0; padding-bottom: 2px; overflow-x: auto; scrollbar-width: none }
.sl-switch::-webkit-scrollbar { display: none }
.site-shell .sd .sl-switch a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid var(--sd-line);
  border-radius: 999px;
  background: #fff;
  font-size: .84rem;
  font-weight: 700;
  color: var(--sd-muted);
  text-decoration: none;
  transition: color .15s, border-color .15s, background .15s;
}
.site-shell .sd .sl-switch a:hover { color: var(--sd-ink); border-color: #c9d2dc }
.site-shell .sd .sl-switch a.on { color: #fff; border-color: var(--sd-brand); background: var(--sd-brand) }
.sl-switch .sl-ic { width: 16px; height: 16px }

/* Up against down, as one split bar. */
.sl-breadth { display: flex; gap: 3px; height: 12px; overflow: hidden; border-radius: 99px; background: var(--sd-flat-bg) }
.sl-breadth i { display: block; height: 100% }
.sl-breadth i.up { background: linear-gradient(90deg, #86d9a9, var(--sd-up)) }
.sl-breadth i.dn { background: linear-gradient(90deg, #f7a6b4, var(--sd-dn)) }
.sl-breadth i:first-child { border-radius: 99px 0 0 99px }
.sl-breadth i:last-child { border-radius: 0 99px 99px 0 }
.sl-breadth i:only-child { border-radius: 99px }
.sl-breadth-l { display: flex; justify-content: space-between; margin: 8px 0 18px; font-size: .8rem; font-weight: 800 }
.sl-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px }

/* A company: logo or initials, name, symbol. */
.sl-name { display: flex; align-items: center; gap: 10px; min-width: 0 }
.sl-logo {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  height: 32px;
  border-radius: 9px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(135deg, var(--sd-brand), color-mix(in srgb, var(--sd-brand) 45%, #1e3a8a));
}
.sl-logo.has-logo { padding: 3px; border: 1px solid var(--sd-line); background: #fff }
.sl-logo.has-logo img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 6px }
.sl-co { min-width: 0 }
.site-shell .sd .sl-co a,
.sl-co b { display: block; overflow: hidden; font-size: .86rem; font-weight: 800; color: var(--sd-ink); text-decoration: none; text-overflow: ellipsis; white-space: nowrap }
.site-shell .sd .sl-co a:hover { color: var(--sd-brand-2); text-decoration: underline }
.sl-co small { display: block; margin-top: 1px; font-size: .7rem; font-weight: 600; color: var(--sd-muted) }

/* Rows of bars. */
.sl-bars { display: flex; flex-direction: column; gap: 13px; margin: 0; padding: 0; list-style: none }
.sl-bar-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px }
.sl-val { flex: 0 0 auto; font-size: .88rem; font-weight: 800; text-align: right; white-space: nowrap }
.sl-val small { display: block; font-size: .7rem; font-weight: 600; color: var(--sd-muted) }
.sl-bars .sd-hbar-t { margin-left: 42px }

/* Most active: donut + volume bars. */
.sl-act { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: 28px }
.sl-act-donut { display: flex; flex-direction: column; align-items: center; gap: 14px }
.sl-act-donut .sd-legend { width: 100% }

/* 52-week highs and lows. */
.sl-hl { margin: 0; padding: 0; list-style: none }
.sl-hl li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--sd-line-2) }
.sl-hl li:last-child { border-bottom: 0; padding-bottom: 0 }
.sl-hl li:first-child { padding-top: 0 }
.sl-hl-v { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right }
.sl-hl-v b { font-size: .9rem; font-weight: 800 }
.sl-hl-v small { font-size: .7rem; color: var(--sd-muted) }

/* The table. */
.site-shell .sd .sl-table { min-width: 860px }
.site-shell .sd .sl-table tbody th { min-width: 230px; max-width: 280px; white-space: normal }
.site-shell .sd .sl-table thead th small { font-size: .62rem; letter-spacing: .04em; text-transform: none }
.sl-row-name { display: flex; align-items: center; gap: 10px }
.sl-rank { flex: 0 0 18px; font-size: .74rem; font-weight: 800; color: var(--sd-muted); text-align: right }
.sl-rng { min-width: 150px }
.sl-rng-l { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: .68rem; font-weight: 600; color: var(--sd-muted) }
.sl-trend { display: inline-flex; flex-wrap: wrap; gap: 4px }
.sl .sd-hbar-top small { display: inline; margin: 0 0 0 6px; font-weight: 600 }
.site-shell .sd .sd-hbar-top a { color: inherit; text-decoration: none }
.site-shell .sd .sd-hbar-top a:hover { color: var(--sd-brand-2); text-decoration: underline }
.sl-teaser { display: block; font-size: .8rem; font-weight: 700; line-height: 1.45; color: var(--sd-brand-2) }

/* ---------------------------------------------------------------- the /stocks page (stocks/index.php) */
/* Header: a dotted eyebrow of counts, the title with the market's state, then the pulse. */
.sa-eyebrow { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 8px; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--sd-muted) }
.sa-eyebrow span:not(:last-child)::after { content: '·'; margin: 0 9px; color: #b8c2cf }
.sa-eyebrow b { color: var(--sd-brand-2) }
.sa-titlebar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px 24px }
.site-shell .sd .sa-titlebar h1 { margin: 0; font-family: var(--font, inherit); font-size: clamp(1.7rem, 1.1rem + 2vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.08 }
.sa-live { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--sd-line); border-radius: 999px; background: #fff; font-size: .8rem; font-weight: 600; color: var(--sd-muted) }
.sa-live i { width: 8px; height: 8px; border-radius: 50%; background: #98a2b3 }
.sa-live.is-open { color: var(--sd-ink) }
.sa-live.is-open i { background: var(--sd-up); animation: sd-pulse 2s infinite }

.sa-pulse { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 22px }
.sa-pp {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--sd-line);
  border-radius: var(--sd-r);
  background: #fff;
  box-shadow: var(--sd-shadow);
}
.sa-pp-k { font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--sd-muted) }
.sa-pp-date { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em }
.sa-pp-note { margin: 0; font-size: .82rem; line-height: 1.55; color: var(--sd-muted) }
.sa-pp-move { position: relative; overflow: hidden }
.sa-pp-move::after { content: ''; position: absolute; right: -36px; bottom: -36px; width: 120px; height: 120px; border-radius: 50%; opacity: .5 }
.sa-pp-move.is-up { background: linear-gradient(160deg, #fff 45%, color-mix(in srgb, var(--sd-up) 9%, #fff)) }
.sa-pp-move.is-dn { background: linear-gradient(160deg, #fff 45%, color-mix(in srgb, var(--sd-dn) 8%, #fff)) }
.sa-pp-move.is-up::after { background: color-mix(in srgb, var(--sd-up) 14%, transparent) }
.sa-pp-move.is-dn::after { background: color-mix(in srgb, var(--sd-dn) 12%, transparent) }
.sa-pp-big { position: relative; z-index: 1; font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05 }
.sa-pp-sub { position: relative; z-index: 1; font-size: .78rem; font-weight: 600; color: var(--sd-muted) }
.sa-breadth { display: flex; align-items: center; gap: 18px }
.sa-breadth .sa-donut { flex: 0 0 auto; width: 108px; height: 108px }   /* beats .sd-donut's 230px, defined further down */
.sa-donut .sd-donut-c b { font-size: 1.15rem }
.sa-donut .sd-donut-c span { font-size: .66rem }
.sa-breadth-l { margin: 0; padding: 0; list-style: none; font-size: .86rem; line-height: 1.8 }
.sa-breadth-l b { font-weight: 800 }
.sa-breadth-l .muted { font-size: .74rem; line-height: 1.4 }
.sa-summary { display: flex; gap: 10px; align-items: flex-start; max-width: 980px; margin: 18px 0 0; font-size: .95rem; line-height: 1.65; color: #344054 }
.sa-summary svg { flex: 0 0 18px; margin-top: 4px; color: var(--sd-brand) }

.sa-movers { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px }
.sa-movers > .sd-card { margin-bottom: 0 }
.sa-mcard { padding: 18px 20px }
.sa-mhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px }
.site-shell .sd .sa-mhead h2 { margin: 0; font-family: var(--font, inherit); font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em }
.sa-mhead small { font-size: .72rem; font-weight: 600; color: var(--sd-muted) }
.site-shell .sd .sa-more-link { font-size: .8rem; font-weight: 700; color: var(--sd-brand-2); text-decoration: none; white-space: nowrap }
.site-shell .sd .sa-more-link:hover { text-decoration: underline }
.sa-mlist { margin: 0; padding: 0; list-style: none }
.sa-mlist li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--sd-line-2) }
.sa-mlist li:last-child { border-bottom: 0; padding-bottom: 0 }
.sa-mval { font-size: .86rem; text-align: right; white-space: nowrap }
.sa-mval b { display: block; font-weight: 800 }
.sa-mval small { display: block; font-size: .68rem; color: var(--sd-muted) }
.sa-mlist .sd-pill { min-width: 76px; justify-content: center }
.sa-note { margin: 10px 0 20px; font-size: .76rem; line-height: 1.55; color: var(--sd-muted) }

.sa-all { padding: 26px 24px 22px }
.sa-head { margin-bottom: 18px; padding-left: 14px; border-left: 4px solid var(--sd-brand) }
.site-shell .sd .sa-head h2 { margin: 0; font-family: var(--font, inherit); font-size: clamp(1.45rem, 1.1rem + 1vw, 1.95rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15 }
.sa-head p { margin: 6px 0 0; font-size: .9rem; color: var(--sd-muted) }
.sa-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 16px }
.sa-search { flex: 1 1 260px; max-width: 420px; padding: 11px 14px; border: 1px solid var(--sd-line); border-radius: 12px; background: #fff; font: inherit; font-size: .9rem; color: var(--sd-ink) }
.sa-search:focus { border-color: var(--sd-brand); outline: 3px solid color-mix(in srgb, var(--sd-brand) 18%, transparent) }
.sa-chips { display: flex; flex-wrap: wrap; gap: 6px }
.sa-chips button {
  padding: 9px 16px;
  border: 1px solid var(--sd-line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: .84rem;
  font-weight: 700;
  color: var(--sd-ink);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.sa-chips button:hover { border-color: #c9d2dc }
.sa-chips button.on { border-color: var(--sd-ink); background: var(--sd-ink); color: #fff }
.site-shell .sd .sa-table { min-width: 900px }
.site-shell .sd .sa-table tbody th { min-width: 230px; white-space: normal }
.site-shell .sd .sa-table tbody th a { font-weight: 800; color: var(--sd-brand-2); text-decoration: none }
.site-shell .sd .sa-table tbody th a:hover { text-decoration: underline }
.site-shell .sd .sa-table tbody th small { display: block; margin-top: 2px; font-size: .74rem; font-weight: 600; color: var(--sd-muted) }
.sa-chg { font-weight: 800; white-space: nowrap }
.site-shell .sd .sa-see { font-size: .78rem; font-weight: 700; color: var(--sd-brand-2); text-decoration: none; white-space: nowrap }
.site-shell .sd .sa-see:hover { text-decoration: underline }
/* Short bars (a fixed width, not the column's), so the table fits without scrolling. */
.sa-cap b { font-size: .86rem; font-weight: 700 }
.sa-cap-bar { display: block; width: 72px; height: 4px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: #eef1f4 }
.sa-cap-bar i { display: block; height: 100%; border-radius: 99px; background: var(--sd-brand) }
.sa-rng-bar { position: relative; display: block; width: 110px; height: 4px; border-radius: 99px; background: #e3e8ee }
.sa-rng-bar i { position: absolute; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border: 2px solid #fff; border-radius: 50%; background: var(--sd-ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .3) }
.sa-rng small { display: block; margin-top: 7px; font-size: .72rem; color: var(--sd-muted); white-space: nowrap }
.site-shell .sd .sa-asof { font-size: .78rem; font-weight: 600; color: var(--sd-muted) }
.sa-empty { margin: 18px 0 0; text-align: center }
.sa-more {
  display: block;
  margin: 18px auto 6px;
  padding: .55rem 1.5rem;
  border: 1px solid var(--sd-line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  color: var(--sd-brand-2);
  cursor: pointer;
}
.sa-more:hover { border-color: var(--sd-brand); background: var(--sd-brand-bg) }
/* Sortable headings (stock.js). */
.sa-sort { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer }
.sa-sort::after { content: '\21C5'; font-size: .9em; opacity: .4 }
th[aria-sort="ascending"] .sa-sort::after { content: '\25B2'; opacity: .85 }
th[aria-sort="descending"] .sa-sort::after { content: '\25BC'; opacity: .85 }

/* ---------------------------------------------------------------- sectors (/stocks/sectors) */
/* A sector's icon on a tile of its colour (stocks/_sector_icon). */
.ss-ic {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 30%;
  color: var(--ss-c);
  background: color-mix(in srgb, var(--ss-c) 11%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ss-c) 18%, transparent);
}
.ss-ic svg { width: 56%; height: 56% }
.site-shell .sd .ss-title { display: flex; align-items: center; gap: 14px }

/* Two boxes: the sectors on the left, the open one (or all of them) on the right. */
.ss-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); align-items: start; gap: 22px; scroll-margin-top: calc(var(--hh, 64px) + 14px) }
.ss-layout .sd-card { margin-bottom: 0 }
.ss-nav {
  position: sticky;
  top: calc(var(--hh, 64px) + 14px);
  max-height: calc(100vh - var(--hh, 64px) - 28px);
  padding: 16px 12px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.ss-nav-h { display: flex; justify-content: space-between; align-items: center; margin: 0 8px 10px }
.site-shell .sd .ss-nav-h h2 { margin: 0; font-family: var(--font, inherit); font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em }
.ss-nav-h span { padding: 2px 9px; border-radius: 999px; background: var(--sd-flat-bg); font-size: .72rem; font-weight: 800; color: var(--sd-muted) }
.ss-list { position: relative; display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none }
.site-shell .sd .ss-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 10px 7px 7px;
  border-radius: 12px;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.25;
  color: #344054;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.site-shell .sd .ss-link:hover { background: var(--sd-soft); color: var(--sd-ink) }
.site-shell .sd .ss-link.is-on { background: var(--sd-brand-bg); color: var(--sd-brand-2); box-shadow: inset 3px 0 0 var(--sd-brand) }
.ss-name { flex: 1 1 auto; min-width: 0 }
.ss-n { flex: 0 0 auto; min-width: 30px; padding: 2px 7px; border-radius: 999px; background: var(--sd-flat-bg); font-size: .72rem; font-weight: 800; color: var(--sd-muted); text-align: center }
.ss-link.is-on .ss-n { background: #fff; color: var(--sd-brand-2) }

/* All sectors at a glance. */
.ss-all { padding: 26px 24px 24px }
.ss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px }
.site-shell .sd .ss-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 14px;
  border: 1px solid var(--sd-line);
  border-radius: 16px;
  background: #fff;
  color: var(--sd-ink);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s var(--sd-ease);
}
.site-shell .sd .ss-card:hover { border-color: color-mix(in srgb, var(--sd-brand) 45%, var(--sd-line)); box-shadow: var(--sd-shadow); transform: translateY(-2px) }
.ss-card-top { display: flex; align-items: flex-start; gap: 12px }
.ss-card-t { flex: 1 1 auto; min-width: 0 }
.ss-card-t b { display: block; font-size: .95rem; font-weight: 800; line-height: 1.25 }
.ss-card-t small { display: block; margin-top: 3px; font-size: .74rem; font-weight: 600; color: var(--sd-muted) }
.ss-card .sd-pill { flex: 0 0 auto }
.ss-card .sl-breadth { height: 8px }
.sl-breadth i.flat { background: #c3cad4 }
.ss-card-b { margin-top: -4px; font-size: .74rem; font-weight: 700; color: var(--sd-muted) }
.ss-card-b em { font-style: normal; font-weight: 600 }
.ss-card-inc { font-size: .8rem; line-height: 1.5; color: #475467 }
.ss-card-go { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--sd-line); font-size: .8rem; font-weight: 800; color: var(--sd-brand-2) }
.site-shell .sd .ss-card:hover .ss-card-go span { margin-left: 3px }
.site-shell .sd .ss-pp-name { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; font-size: .98rem; font-weight: 800; color: var(--sd-ink); text-decoration: none }
.site-shell .sd .ss-pp-name:hover { color: var(--sd-brand-2) }
.ss-pp-fact .sa-pp-big { color: var(--sd-ink) }
.ss-pp-fact .sa-pp-big small { font-size: .9rem; font-weight: 700; letter-spacing: 0; color: var(--sd-muted) }
/* The stocks table beside the menu: narrower columns, the date over two lines, so all six fit on a laptop. */
.site-shell .sd .ss-main .sa-table { min-width: 700px }
.site-shell .sd .ss-main .sa-table tbody th { min-width: 170px }
.site-shell .sd .ss-main .sa-table th,
.site-shell .sd .ss-main .sa-table td { padding-left: 11px; padding-right: 11px }
.site-shell .sd .ss-main .sa-asof { min-width: 84px; white-space: normal }

/* ---------------------------------------------------------------- overview */
.sd-ranges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 36px; margin-bottom: 22px }
.sd-range-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: .82rem }
.sd-range-top span { font-weight: 800 }
.sd-range-top b { font-size: .75rem; font-weight: 700; color: var(--sd-muted) }
.sd-range-ends { display: flex; justify-content: space-between; gap: 10px; margin-top: 11px; font-size: .84rem }
.sd-range-ends b { display: block; font-weight: 800 }
.sd-range-ends span { display: block; font-size: .72rem; color: var(--sd-muted) }
.sd-range-ends > div:last-child { text-align: right }

.sd-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px }
.sd-tiles-4 { margin: 18px 0 16px }
.sd-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--sd-line-2);
  border-radius: 14px;
  background: var(--sd-soft);
  transition: transform .18s, box-shadow .18s, border-color .18s, background .18s;
}
.sd-tile:hover { transform: translateY(-2px); background: #fff; border-color: var(--sd-line); box-shadow: 0 12px 24px -18px rgba(16, 24, 40, .35) }
.sd-tile-l { font-size: .67rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sd-muted) }
.sd-tile-v { font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere }
.sd-tile-s { font-size: .76rem; color: var(--sd-muted) }

.sd-summary { margin: 20px 0 0; font-size: .95rem; line-height: 1.75 }
.sd-summary b { font-weight: 800 }
.sd-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 0;
  padding: 11px 14px;
  border-radius: 12px;
  background: #eaf5fd;
  color: #0b4a6f;
  font-size: .8rem;
  line-height: 1.55;
}
.sd-note svg { flex: none; margin-top: 2px }

/* ---------------------------------------------------------------- chart */
.sd-chart-stats { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-bottom: 12px; min-height: 42px }
.sd-cs span { display: block; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sd-muted) }
.sd-cs b { display: block; margin-top: 2px; font-size: 1rem; font-weight: 800 }
.sd-cs small { font-size: .74rem; font-weight: 600; color: var(--sd-muted) }
.sd-chart-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px }
.sd-chart-legend button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border: 1px solid var(--sd-line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: .74rem;
  font-weight: 700;
  color: var(--sd-ink);
  cursor: pointer;
}
.sd-chart-legend button i { width: 16px; height: 3px; border-radius: 2px }
.sd-chart-legend .s1 i { background: var(--sd-brand) }
.sd-chart-legend .s2 i { background: #f59e0b }
.sd-chart-legend .s3 i { background: repeating-linear-gradient(90deg, #6366f1 0 5px, transparent 5px 8px) }
.sd-chart-legend button:not(.on) { opacity: .55 }
.sd-chart-legend button:not(.on) i { background: #c3cbd5 }
.sd-chart-plot { position: relative; height: 330px }
.sd-chart-svg { display: block; width: 100%; height: 100%; overflow: visible; touch-action: pan-y }
.sd-chart-svg .g { stroke: #edf0f4 }
.sd-chart-svg .ax { font-size: 11px; font-weight: 600; fill: #7a8594 }
.sd-chart-svg .ax-r { text-anchor: start }
.sd-chart-svg .ax-x { text-anchor: middle }
/* The price line, its fill, the hover dot and the last-price tag follow the
   move over the range on screen: green when up, red when down. */
.sd-chart { --sd-c: var(--sd-brand) }
.sd-chart.is-up { --sd-c: var(--sd-up) }
.sd-chart.is-dn { --sd-c: var(--sd-dn) }
.sd-chart-svg .pl { fill: none; stroke: var(--sd-c); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round }
.sd-chart-svg .stop { stop-color: var(--sd-c) }
.sd-chart-svg .d50 { fill: none; stroke: #f59e0b; stroke-width: 1.6; stroke-linejoin: round }
.sd-chart-svg .d200 { fill: none; stroke: #6366f1; stroke-width: 1.6; stroke-dasharray: 5 4; stroke-linejoin: round }
.sd-chart-svg .cross { stroke: #94a3b8; stroke-dasharray: 3 3 }
.sd-chart-svg .dot { fill: var(--sd-c); stroke: #fff; stroke-width: 2.5 }
.sd-chart-svg .tagbg { fill: var(--sd-c) }
.sd-chart-svg .tag { font-size: 11px; font-weight: 800; fill: #fff }
.sd-chart-tip {
  position: absolute;
  z-index: 2;
  min-width: 160px;
  padding: 9px 12px;
  border-radius: 11px;
  background: #0f172a;
  color: #fff;
  font-size: .76rem;
  pointer-events: none;
  box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .55);
}
.sd-chart-tip b { display: block; margin-bottom: 5px; font-size: .72rem; font-weight: 600; color: #cbd5e1 }
.sd-chart-tip div { display: flex; justify-content: space-between; gap: 16px; line-height: 1.7 }
.sd-chart-tip i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50% }
.sd-chart-tip strong { font-weight: 800 }

/* Volume under the price, the volume legend chip, and room for eight range buttons. */
.sd-chart-legend .s4 i { width: 10px; height: 9px; border-radius: 2px; background: #94a3b8 }
.sd-chart-svg .vb.up { fill: color-mix(in srgb, var(--sd-up) 42%, #fff) }
.sd-chart-svg .vb.dn { fill: color-mix(in srgb, var(--sd-dn) 38%, #fff) }
.sd-chart-tip strong.up { color: #86efac }
.sd-chart-tip strong.dn { color: #fda4af }
.sd-seg-wrap { flex-wrap: wrap }
.sd-seg-wrap button { padding: 7px 11px }
.sd-chart-note { margin-top: 8px }

/* ---------------------------------------------------------------- financial history */
.sd-gcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px }
.sd-gcard { min-width: 0; padding: 14px 16px; border: 1px solid var(--sd-line); border-radius: 14px; background: #fff }
.sd-gcard > b { display: block; font-size: .92rem; font-weight: 800 }
.sd-gcard > small { display: block; margin-bottom: 8px; font-size: .7rem; color: var(--sd-muted) }
.sd-gcard-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 58px; align-items: center; gap: 8px; padding: 4px 0; font-size: .76rem }
.sd-gcard-row > span:first-child { font-weight: 700; color: var(--sd-muted); white-space: nowrap }
.sd-gcard-row em { font-style: normal; font-weight: 800; text-align: right; white-space: nowrap }
.sd-cols-stack .sd-col-t i { left: 16%; right: 16%; border-radius: 2px }
.sd-cols.pct .sd-col-t i { background: linear-gradient(180deg, #7dd3fc, #0284c7) }
.sd-cols.holders .sd-col-t i { background: linear-gradient(180deg, #c4b5fd, #7c3aed) }
/* Day counts are neither good nor bad by sign (a negative cash cycle is good): neutral colours. */
.sd-cols.days .sd-col-t i,
.sd-cols.days .sd-col.neg .sd-col-t i { background: linear-gradient(180deg, #a5b4fc, #6366f1) }
.sd .sd-cols.days .sd-col.neg .sd-col-v { color: var(--sd-ink) }
.sd-cols.dense { gap: 3px }
.sd-cols.dense .sd-col-v, .sd-cols.dense .sd-col-l { font-size: .57rem; letter-spacing: -.02em }
.sd-stack-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: .72rem; font-weight: 700; color: var(--sd-muted) }
.sd-stack-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; vertical-align: -1px }
.site-shell .sd .sd-table-hist tr.key > * { font-weight: 800 }
.site-shell .sd .sd-table-hist tr.key th { color: var(--sd-brand-2) }
.sd-h3-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin: 24px 0 12px }
.site-shell .sd .sd-h3-row .sd-h3 { margin: 0 }
.sd-owners-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px }
.sd-owners-chips > span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--sd-line); border-radius: 999px; background: #fff; font-size: .76rem; font-weight: 700 }
.sd-owners-chips i { width: 9px; height: 9px; border-radius: 3px }
.sd-owners-chips em { font-size: .72rem; font-style: normal; font-weight: 800 }
.sd-owners-chips small { font-size: .72rem; color: var(--sd-muted) }

/* ---------------------------------------------------------------- performance */
.sd-ret { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px }
.sd-ret-tile { position: relative; overflow: hidden; padding: 13px 10px 15px; border: 1px solid var(--sd-line); border-radius: 12px; text-align: center; background: var(--sd-soft) }
.sd .sd-ret-tile.up { background: var(--sd-up-bg); border-color: var(--sd-up-line) }
.sd .sd-ret-tile.dn { background: var(--sd-dn-bg); border-color: var(--sd-dn-line) }
.sd-ret-tile span { display: block; font-size: .72rem; font-weight: 700; color: var(--sd-muted) }
.sd-ret-tile b { display: block; margin-top: 4px; font-size: 1rem; font-weight: 800; white-space: nowrap }
.sd-ret-tile i { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--w); background: currentColor; border-radius: 0 3px 3px 0; opacity: .7 }
.sd-rel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 16px }
.sd-rel-l { margin-right: 4px; font-size: .76rem; font-weight: 700; color: var(--sd-muted) }

.sd-ma-score { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; padding: 12px 16px; border-radius: 14px; background: var(--sd-soft) }
.sd-ma-score > b { font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; line-height: 1 }
.sd-ma-score.is-up { background: var(--sd-up-bg) }
.sd-ma-score.is-up > b { color: var(--sd-up) }
.sd-ma-score.is-dn { background: var(--sd-dn-bg) }
.sd-ma-score.is-dn > b { color: var(--sd-dn) }
.sd-ma-score span { font-size: .84rem; line-height: 1.5 }
.sd-ma-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 100px; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--sd-line-2) }
.sd-ma-row:last-child { border-bottom: 0 }
.sd-ma-name span { display: block; font-size: .8rem; color: var(--sd-muted) }
.sd-ma-name b { font-size: .94rem; font-weight: 800 }
.sd-ma-row .sd-pill { justify-self: end }
.sd-ma-bar { position: relative; height: 8px; border-radius: 99px; background: var(--sd-flat-bg) }
.sd-ma-bar::before { content: ''; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1.5px; background: #c3cbd5 }
.sd-ma-bar i { position: absolute; top: 0; bottom: 0; border-radius: 99px }
.sd-ma-bar i.up { left: 50%; background: linear-gradient(90deg, #86d9a9, var(--sd-up)) }
.sd-ma-bar i.dn { right: 50%; background: linear-gradient(270deg, #f7a6b4, var(--sd-dn)) }

/* ---------------------------------------------------------------- calculator */
.sd-calc { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; gap: 20px }
.sd-calc-form { padding: 18px; border: 1px solid var(--sd-line-2); border-radius: 16px; background: #fbfcfd }
.sd-field { display: block; margin: 16px 0 0 }
.sd-field > span { display: block; margin-bottom: 6px; font-size: .76rem; font-weight: 800; color: var(--sd-muted) }
.sd-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--sd-line);
  border-radius: 11px;
  background: #fff;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--sd-ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.sd-field input:focus { border-color: var(--sd-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sd-brand) 15%, transparent) }
.sd-field[hidden] { display: none }
.sd-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px }
.sd-quick button {
  padding: 5px 10px;
  border: 1px solid var(--sd-line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: .72rem;
  font-weight: 700;
  color: var(--sd-ink);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.sd-quick button:hover { border-color: var(--sd-brand); color: var(--sd-brand-2); background: var(--sd-brand-bg) }
.sd-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }
.sd-field-row .sd-field { margin-top: 18px }

.sd-calc-out {
  position: sticky;
  top: calc(var(--sd-top) + 8px);
  padding: 20px;
  border: 1px solid var(--sd-line-2);
  border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sd-brand) 6%, #fff), #fff 45%);
}
.sd-calc-net { padding: 4px 0 16px; text-align: center }
.sd-calc-net span { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--sd-muted) }
.sd-calc-net b { display: block; margin: 4px 0; font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1 }
.sd-calc-net small { font-size: .82rem; color: var(--sd-muted) }
.sd-calc-bars > div { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 9px 0; font-size: .8rem }
.sd-calc-bars span { font-weight: 800 }
.sd-calc-bars b { font-weight: 800 }
.sd-bar { height: 10px; overflow: hidden; border-radius: 99px; background: var(--sd-flat-bg) }
.sd-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #b5bfcb, #7c8898); transition: width .35s var(--sd-ease) }
.sd-bar.get i { background: linear-gradient(90deg, #86d9a9, var(--sd-up)) }
.sd-bar.get.loss i { background: linear-gradient(90deg, #f7a6b4, var(--sd-dn)) }
.sd-calc-rows { margin: 12px 0 0 }
.sd-calc-rows > div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--sd-line-2); font-size: .85rem }
.sd-calc-rows > div:last-child { border-bottom: 0 }
.sd-calc-rows dt { font-weight: 600; color: var(--sd-muted) }
.sd-calc-rows dd { margin: 0; font-weight: 800; text-align: right }
.sd-calc-rows dt i { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 3px }
.sd-calc-break { margin-top: 12px; padding: 0 14px; border: 1px solid var(--sd-line); border-radius: 12px; background: #fff }
.sd-calc-break > summary { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-size: .88rem; font-weight: 800; cursor: pointer; list-style: none }
.sd-calc-break > summary::-webkit-details-marker { display: none }
.sd-calc-break[open] { padding-bottom: 6px }
.sd-stack { display: flex; height: 10px; overflow: hidden; margin: 2px 0 4px; border-radius: 99px; gap: 2px; background: var(--sd-flat-bg) }
.sd-stack span { display: block; height: 100% }
.sd-calc-note { margin-top: 16px }

/* ---------------------------------------------------------------- financials */
.sd-cols { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; height: 214px }
.sd-col { display: flex; flex-direction: column; min-width: 0 }
.sd-col-v { margin-bottom: 5px; font-size: .67rem; font-weight: 800; letter-spacing: -.01em; text-align: center; white-space: nowrap }
.sd-col.neg .sd-col-v { color: var(--sd-dn) }
.sd-col-t { position: relative; flex: 1; border-radius: 8px; background: #eff2f6; transition: background .15s }
.sd-col:hover .sd-col-t { background: #e5eaf0 }
.sd-col-t::after { content: ''; position: absolute; left: 0; right: 0; bottom: var(--zero, 0%); border-top: 1px dashed #b3bcc8 }
.sd-col-t i { position: absolute; left: 16%; right: 16%; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #a5b4fc, #4f46e5) }
.sd-cols.np .sd-col-t i { background: linear-gradient(180deg, #6ee7a8, #059669) }
.sd-col.neg .sd-col-t i { border-radius: 3px 3px 6px 6px; background: linear-gradient(180deg, #f87171, #dc2626) }
.sd-col-t i.gold { background: linear-gradient(180deg, #fcd34d, #d97706) }
.sd-col-l { margin-top: 6px; font-size: .66rem; font-weight: 700; text-align: center; white-space: nowrap; color: var(--sd-muted) }
.sd-cols-sm { height: 136px; margin-bottom: 4px }

/* ---------------------------------------------------------------- analysts */
.sd-an { display: grid; grid-template-columns: 290px minmax(0, 1fr); align-items: center; gap: 24px }
.sd-an-gauge { padding: 18px 16px 16px; border-radius: 16px; background: var(--sd-soft); text-align: center }
.sd-an-gauge svg { display: block; width: 100%; max-width: 240px; height: auto; margin: 0 auto }
.sd-needle { stroke: var(--sd-ink); stroke-width: 4; stroke-linecap: round }
.sd-needle-hub { fill: var(--sd-ink) }
.sd-g-end { font-size: 10px; font-weight: 800; fill: var(--sd-muted) }
.sd-an-verdict { display: inline-block; margin-top: 6px; padding: 7px 22px; border-radius: 12px; font-size: 1.3rem; font-weight: 800; color: #fff; background: #6b7684 }
.sd-an-verdict.is-up { background: linear-gradient(135deg, #34c07a, #0b7a3b) }
.sd-an-verdict.is-dn { background: linear-gradient(135deg, #f0788f, #c02643) }
.sd-an-mean { margin: 10px 0 0; font-size: .8rem; color: var(--sd-muted) }
.sd-an-mean b { color: var(--sd-ink) }
.sd-stackbar { display: flex; gap: 2px; height: 34px; overflow: hidden; border-radius: 10px; background: var(--sd-flat-bg) }
.sd-stackbar span { display: flex; align-items: center; justify-content: center; min-width: 0; font-size: .78rem; font-weight: 800; color: #fff }
.sd-stackbar-thin { height: 14px; border-radius: 99px }
.sd-an-counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 12px }
.sd-an-counts div { padding: 10px 6px; border: 1px solid var(--sd-line); border-top: 4px solid var(--c); border-radius: 12px; background: #fff; text-align: center }
.sd-an-counts b { display: block; font-size: 1.35rem; font-weight: 800; line-height: 1.2; color: var(--c) }
.sd-an-counts span { font-size: .72rem; font-weight: 700; color: var(--sd-muted) }
.sd-an-share { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px }
.sd-an-share > div { position: relative; padding: 12px 14px 18px; border: 1px solid var(--sd-line); border-radius: 12px; background: #fff }
.sd-an-share span { display: block; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sd-muted) }
.sd-an-share b { display: block; margin: 3px 0 1px; font-size: 1.3rem; font-weight: 800 }
.sd-an-share small { display: block; font-size: .72rem; color: var(--sd-muted) }
.sd-an-share i { position: absolute; left: 14px; right: 14px; bottom: 9px; height: 5px; border-radius: 99px; background: #edf1f5 }
.sd-an-share i::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 99px; background: currentColor }
.sd-an-share .flat b, .sd-an-share .flat i::after { color: #8a95a3 }

/* ---------------------------------------------------------------- peers */
.site-shell .sd .sd-table-peers a { color: var(--sd-brand-2); font-weight: 800; text-decoration: none }
.site-shell .sd .sd-table-peers a:hover { text-decoration: underline }
.sd-peer-me em { margin-left: 6px; padding: 2px 8px; border-radius: 99px; background: var(--sd-brand); color: #fff; font-size: .64rem; font-style: normal; font-weight: 800; vertical-align: 1px }
.sd-pe[style] .sd-hbar-t::after { content: ''; position: absolute; top: -5px; bottom: -5px; left: var(--sec); border-left: 2px dashed #64748b }
.sd-secmark { display: inline-block; width: 0; height: 12px; margin-right: 6px; border-left: 2px dashed #64748b; vertical-align: -1px }

/* ---------------------------------------------------------------- shareholding */
.sd-own { display: grid; grid-template-columns: 230px minmax(0, 1fr); align-items: center; gap: 30px }
.sd-donut { position: relative; width: 230px; height: 230px }
.sd-donut svg { width: 100%; height: 100%; overflow: visible }
.sd-donut-bg { fill: none; stroke: #eef1f4; stroke-width: 18 }
.sd-donut circle[stroke] { transition: stroke-width .15s }
.sd-donut circle[stroke]:hover { stroke-width: 22 }
.sd-donut-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none }
.sd-donut-c b { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em }
.sd-donut-c span { font-size: .76rem; font-weight: 700; color: var(--sd-muted) }
.sd-legend { margin: 0; padding: 0; list-style: none }
.sd-legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 96px; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--sd-line-2); font-size: .9rem }
.sd-legend li:last-child { border-bottom: 0 }
.sd-legend i { width: 12px; height: 12px; border-radius: 4px }
.sd-legend span { font-weight: 600 }
.sd-legend b { font-weight: 800; text-align: right }
.sd-legend em { font-size: .74rem; font-style: normal; font-weight: 800; text-align: right; white-space: nowrap }
.sd-qstack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px }
.sd-qstack-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 12px; font-size: .78rem; font-weight: 700; color: var(--sd-muted) }

/* ---------------------------------------------------------------- key metrics */
.sd-verdicts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px }
.sd-verdicts span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--sd-line); border-radius: 999px; background: #fff; font-size: .78rem; font-weight: 700 }
.sd-verdicts i { width: 8px; height: 8px; border-radius: 50%; background: #98a2b3 }
.sd .sd-verdicts .good { color: var(--sd-up); border-color: var(--sd-up-line) }
.sd .sd-verdicts .good i { background: var(--sd-up) }
.sd .sd-verdicts .bad { color: var(--sd-dn); border-color: var(--sd-dn-line) }
.sd .sd-verdicts .bad i { background: var(--sd-dn) }
.sd .sd-verdicts .warn { color: var(--sd-warn); border-color: #f6d9ae }
.sd .sd-verdicts .warn i { background: #f59e0b }
.sd-mc { min-width: 0; padding: 18px; border: 1px solid var(--sd-line); border-radius: 16px; background: #fff }
.sd-mc-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px }
.sd-mc-ic { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 11px; background: var(--sd-brand-bg); color: var(--sd-brand-2) }
.sd-mc-ic svg { display: block }
.sd-mc-h > div b { display: block; font-size: 1rem; font-weight: 800 }
.sd-mc-h > div span { display: block; font-size: .78rem; color: var(--sd-muted) }
.sd-explain { margin: 12px 0 0; font-size: .82rem; line-height: 1.6; color: var(--sd-muted) }
.sd-explain b { color: var(--sd-ink) }
.sd-band { margin-top: 16px }
.sd-band-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 9px; font-size: .74rem; color: var(--sd-muted) }
.sd-band-top b { color: var(--sd-ink) }
.sd-mini-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px }
.sd-mini-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) }
.sd-mini-tiles > div { min-width: 0; padding: 10px 12px; border: 1px solid var(--sd-line-2); border-radius: 11px; background: var(--sd-soft) }
.sd-mini-tiles span { display: block; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sd-muted) }
.sd-mini-tiles b { display: block; margin-top: 2px; font-size: 1.05rem; font-weight: 800 }
.sd-mini-tiles small { display: block; margin-top: 2px; font-size: .7rem; line-height: 1.35; color: var(--sd-muted) }
.sd-rings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px }
.sd-ringbox { min-width: 0; text-align: center }
.sd-ringwrap { position: relative; width: 84px; height: 84px; margin: 0 auto 6px }
.sd-ringwrap svg { width: 100%; height: 100% }
.sd-ringwrap b { position: absolute; inset: 0; display: grid; place-items: center; font-size: .9rem; font-weight: 800 }
.sd-ring-bg { fill: none; stroke: #edf0f4; stroke-width: 8 }
.sd-ring { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dasharray 1s var(--sd-ease) }
.sd-ring.brand { stroke: var(--sd-brand) }
.sd-ring.dn { stroke: var(--sd-dn) }
.sd-ringbox > span { display: block; font-size: .76rem; font-weight: 800 }
.sd-ringbox small { display: block; margin-top: 2px; font-size: .68rem; font-weight: 700 }
.sd-growth-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 90px; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--sd-line-2); font-size: .8rem }
.sd-growth-row:last-child { border-bottom: 0 }
.sd-growth-row span { font-weight: 700 }
.sd-growth-row b { font-weight: 800; text-align: right; white-space: nowrap }
.sd-scales { display: flex; flex-direction: column; gap: 17px }
.sd-scale .sd-hbar-top b { display: inline-flex; align-items: center; gap: 6px }
.sd-scale-t { position: relative; height: 8px; border-radius: 99px; background: #edf0f4 }
.sd-scale-t span { position: absolute; top: 0; bottom: 0 }
.sd-scale-t span:first-child { border-radius: 99px 0 0 99px }
.sd-scale-t span:nth-last-child(2) { border-radius: 0 99px 99px 0 }
.sd-scale-t .good { background: #c9ecd7 }
.sd-scale-t .warn { background: #fbe3bd }
.sd-scale-t .bad { background: #f8ccd4 }
.sd-scale-t i { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 3px solid #fff; border-radius: 50%; background: var(--sd-ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .3) }
.sd-scale small { display: block; margin-top: 6px; font-size: .72rem; color: var(--sd-muted) }
.sd-more-link { margin-top: 16px }
.site-shell .sd .sd-more-link a { font-weight: 800; color: var(--sd-brand-2) }

/* ---------------------------------------------------------------- metrics explorer */
/* Period colours: the same figure for different periods, told apart at a glance. */
.sd .p-ttm { --pc: var(--sd-brand) }
.sd .p-q { --pc: #8b5cf6 }
.sd .p-fy { --pc: #3b82f6 }
.sd .p-5y { --pc: #f59e0b }
.sd .p-now { --pc: #0ea5e9 }

.sd-xtabs { position: relative; display: flex; gap: 6px; margin-bottom: 14px; padding-bottom: 2px; overflow-x: auto; scrollbar-width: none }
.sd-xtabs::-webkit-scrollbar { display: none }
.sd-xtabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid var(--sd-line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  color: var(--sd-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.sd-xtabs button span { min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--sd-flat-bg); font-size: .68rem; font-weight: 800; text-align: center; color: var(--sd-muted) }
.sd-xtabs button:hover { color: var(--sd-ink); border-color: var(--sd-line-2); background: var(--sd-soft) }
.sd-xtabs button.on { background: var(--sd-ink); border-color: var(--sd-ink); color: #fff }
.sd-xtabs button.on span { background: rgba(255, 255, 255, .18); color: #fff }

.sd-plegend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 14px; font-size: .74rem; font-weight: 700; color: var(--sd-muted) }
.sd-plegend span { display: inline-flex; align-items: center; gap: 6px }
.sd-plegend i { width: 10px; height: 10px; border-radius: 3px; background: var(--pc) }

.sd-xgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px }
.sd-xbox { min-width: 0; padding: 16px 18px; border: 1px solid var(--sd-line); border-radius: 14px; background: #fff }
.sd-xrows { display: flex; flex-direction: column; gap: 12px }
.sd-xrow-l { margin-bottom: 2px; font-size: .8rem; font-weight: 700 }
.sd-xbar { display: grid; grid-template-columns: minmax(0, 1fr) 96px; align-items: center; gap: 10px; margin-top: 4px }
.sd-xbar-t { position: relative; height: 8px; overflow: hidden; border-radius: 99px; background: #eef1f5 }
.sd-xbar-t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 50%, #fff), var(--pc)) }
.sd-xbar b { font-size: .78rem; font-weight: 800; text-align: right; white-space: nowrap; color: color-mix(in srgb, var(--pc) 70%, var(--sd-ink)) }
.sd .sd-xbar.neg i { background: linear-gradient(90deg, #f7a6b4, var(--sd-dn)) }
.sd .sd-xbar.neg b { color: var(--sd-dn) }
.sd-xhead { margin: 10px 0 2px; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--sd-muted) }
.sd-xhead:first-child { margin-top: 0 }
.sd-xbox .sd-growth-row:last-child { border-bottom: 0 }
.sd-xrange { padding-top: 6px }
.sd-xtiles { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px }
/* An odd box out at the end takes the full row instead of leaving a gap. */
.sd-xgrid > .sd-xbox:last-child:nth-child(odd) { grid-column: 1 / -1 }
.sd-xdonut { display: flex; flex-direction: column }
.sd-xdonut-in { display: grid; flex: 1; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 18px }
.sd-donut-sm { width: 170px; height: 170px }
.sd-donut-sm .sd-donut-c b { font-size: 1.15rem }
.sd-legend-sm li { grid-template-columns: 10px minmax(0, 1fr) auto 48px; gap: 9px; padding: 8px 0; font-size: .8rem }
.sd-legend-sm i { width: 10px; height: 10px; border-radius: 3px }
.sd-legend-sm em { color: var(--sd-muted) }

/* ---------------------------------------------------------------- dividends & events */
.sd-divsum { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px }
.sd-divsum > div { flex: 1 1 120px; padding: 9px 12px; border: 1px solid var(--sd-line-2); border-radius: 11px; background: #fff }
.sd-divsum span { display: block; font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sd-muted) }
.sd-divsum b { display: block; margin-top: 2px; font-size: 1rem; font-weight: 800 }
.sd-timeline { position: relative; margin: 16px 0 0; padding: 0 0 0 20px; list-style: none }
.sd-timeline::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 10px; width: 2px; background: var(--sd-line) }
.sd-timeline li { position: relative; padding: 0 0 14px }
.sd-timeline li:last-child { padding-bottom: 0 }
.sd-timeline li::before { content: ''; position: absolute; left: -20px; top: 4px; width: 12px; height: 12px; border: 2.5px solid var(--sd-brand); border-radius: 50%; background: #fff }
.sd-timeline li.soon::before { background: var(--sd-brand); box-shadow: 0 0 0 4px var(--sd-brand-bg) }
.sd-tl-date { display: block; font-size: .74rem; font-weight: 600; color: var(--sd-muted) }
.sd-tl-date em,
.sd-cal-item em { margin-left: 6px; padding: 2px 7px; border-radius: 99px; background: var(--sd-brand-bg); color: var(--sd-brand-2); font-size: .62rem; font-style: normal; font-weight: 800; letter-spacing: .06em; text-transform: uppercase }
.sd-tl-date em.tag { background: #e3edff; color: #1d4ed8 }
.sd-timeline b { display: block; margin-top: 2px; font-size: .88rem; font-weight: 800; line-height: 1.4 }
.sd-cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px }
.sd-cal-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--sd-line); border-radius: 13px; background: #fff }
.sd-cal-item.soon { border-color: color-mix(in srgb, var(--sd-brand) 45%, #fff); box-shadow: 0 0 0 3px var(--sd-brand-bg) }
.sd-cal-date { flex: 0 0 52px; overflow: hidden; border: 1px solid var(--sd-line); border-radius: 10px; text-align: center; background: #fff }
.sd-cal-date span { display: block; padding: 2px 0; background: var(--sd-brand); color: #fff; font-size: .6rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase }
.sd-cal-date b { display: block; padding-top: 3px; font-size: 1.2rem; font-weight: 800; line-height: 1.15 }
.sd-cal-date small { display: block; padding-bottom: 3px; font-size: .6rem; font-weight: 600; color: var(--sd-muted) }
.sd-cal-item p { margin: 0; font-size: .82rem; font-weight: 700; line-height: 1.35 }
.sd-cal-item p em { display: inline-block; margin: 4px 0 0 }

/* ---------------------------------------------------------------- about & news */
.sd-about { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; gap: 26px }
.sd-desc p { margin: 0; font-size: .92rem; line-height: 1.75; color: #2f3a48 }
.sd-desc.is-clamped { max-height: 10.6em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent) }
.sd-link { padding: 6px 0; border: 0; background: none; font: inherit; font-size: .84rem; font-weight: 800; color: var(--sd-brand-2); cursor: pointer }
.sd-facts { margin: 0; padding: 4px 16px; border: 1px solid var(--sd-line); border-radius: 14px; background: var(--sd-soft) }
.sd-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--sd-line); font-size: .84rem }
.sd-facts > div:last-child { border-bottom: 0 }
.sd-facts dt { font-weight: 600; color: var(--sd-muted) }
.sd-facts dd { margin: 0; font-weight: 800; text-align: right; overflow-wrap: anywhere }
.sd-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none }
.sd-people li { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 10px 12px; border: 1px solid var(--sd-line-2); border-radius: 12px; background: #fff }
.sd-av { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 50%; background: var(--sd-brand-bg); color: var(--sd-brand-2); font-size: .78rem; font-weight: 800 }
.sd-people b { display: block; font-size: .86rem; font-weight: 800 }
.sd-people small { display: block; font-size: .74rem; line-height: 1.35; color: var(--sd-muted) }

.sd-news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
.site-shell .sd .sd-news-item {
  display: flex;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--sd-line);
  border-radius: 14px;
  background: #fff;
  color: var(--sd-ink);
  text-decoration: none;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.site-shell .sd .sd-news-item:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--sd-brand) 40%, #fff); box-shadow: 0 14px 26px -18px rgba(16, 24, 40, .35); color: var(--sd-ink) }
.sd-news-item img,
.sd-news-ph { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--sd-soft) }
.sd-news-ph { display: grid; place-items: center; color: var(--sd-muted) }
.sd-news-body { display: flex; flex-direction: column; gap: 4px; min-width: 0 }
.sd-news-body b { display: -webkit-box; overflow: hidden; font-size: .9rem; font-weight: 800; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical }
.sd-news-sum { display: -webkit-box; overflow: hidden; font-size: .8rem; line-height: 1.5; color: var(--sd-muted); -webkit-line-clamp: 2; -webkit-box-orient: vertical }
.sd-news-body small { font-size: .72rem; font-weight: 700; color: var(--sd-muted) }

/* Admin-written content. */
.sd-prose { font-size: .96rem; line-height: 1.75 }
.sd-prose > :first-child { margin-top: 0 }
.sd-prose > :last-child { margin-bottom: 0 }
.site-shell .sd .sd-prose h2 { margin: 1.3em 0 .5em; font-size: 1.3rem; letter-spacing: -.015em; line-height: 1.25 }
.site-shell .sd .sd-prose h3 { margin: 1.2em 0 .4em; font-size: 1.08rem; letter-spacing: -.01em; line-height: 1.3 }
.sd-prose img { max-width: 100%; height: auto; border-radius: 12px }
.sd-prose table { max-width: 100% }

/* ---------------------------------------------------------------- more stocks, FAQs, disclaimer */
/* The shared FAQ block (partials/faqs), restyled to match the cards above. */
.sd-faqs { scroll-margin-top: var(--sd-top) }
.site-shell .sd .sd-faqs .faq-section { padding: 26px 0 8px; background: transparent; border: 0 }
.site-shell .sd .sd-faqs .faq-section .col-lg-9 { flex: 0 0 100%; max-width: 100% }
.site-shell .sd .sd-faqs .section-title { font-family: var(--font, inherit); font-size: clamp(1.16rem, 1rem + .55vw, 1.42rem); font-weight: 800; letter-spacing: -.02em }
.site-shell .sd .sd-faqs .feature-ico { flex: none; width: 40px !important; height: 40px !important; margin: 0; border-radius: 12px; background: var(--sd-brand-bg); color: var(--sd-brand-2); transform: none }
.site-shell .sd .sd-faqs .faq-accordion .accordion-item {
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid var(--sd-line);
  border-radius: 14px !important;
  background: #fff;
  box-shadow: var(--sd-shadow);
}
.site-shell .sd .sd-faqs .faq-accordion .accordion-button {
  padding: 16px 20px;
  border-radius: 0 !important;
  background: #fff;
  font-family: var(--font, inherit);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.005em;
  color: var(--sd-ink);
}
.site-shell .sd .sd-faqs .faq-accordion .accordion-button:not(.collapsed) { background: var(--sd-brand-bg); color: var(--sd-brand-2); box-shadow: none }
.site-shell .sd .sd-faqs .faq-accordion .accordion-body { padding: 14px 20px 18px; font-size: .94rem; line-height: 1.7; color: #2f3a48 }
.sd-more-stocks { padding: 40px 0 30px }
.sd-stock-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px }
.site-shell .sd .sd-stock {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--sd-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--sd-shadow);
  color: var(--sd-ink);
  text-decoration: none;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.site-shell .sd .sd-stock:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--sd-brand) 40%, #fff); box-shadow: 0 18px 32px -20px rgba(16, 24, 40, .38); color: var(--sd-ink) }
.sd-stock-top { display: flex; justify-content: space-between; gap: 10px }
.sd-stock-name { min-width: 0 }
.sd-stock-name b { display: block; font-size: .95rem; font-weight: 800; line-height: 1.25 }
.sd-stock-name small { display: block; margin-top: 3px; overflow: hidden; font-size: .72rem; color: var(--sd-muted); text-overflow: ellipsis; white-space: nowrap }
.sd-stock-go { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--sd-soft); color: var(--sd-muted); font-size: .8rem; transition: background .18s, color .18s }
.sd-stock:hover .sd-stock-go { background: var(--sd-brand); color: #fff }
.sd-stock-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px }
.sd-stock-bottom b { font-size: 1.06rem; font-weight: 800 }
.sd-stock-cta { font-size: .8rem; font-weight: 700; color: var(--sd-brand-2) }
.site-shell .sd .sd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--sd-ink);
  color: #fff;
  font-size: .86rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s;
}
.site-shell .sd .sd-btn:hover { background: var(--sd-brand-2); color: #fff }
.sd-disclaimer { margin: 0; padding: 6px 0 36px; font-size: .76rem; line-height: 1.6; color: var(--sd-muted) }
.sd-waiting { display: flex; align-items: center; gap: 14px }
.sd-spinner { flex: none; width: 22px; height: 22px; border: 3px solid var(--sd-brand-bg); border-top-color: var(--sd-brand); border-radius: 50%; animation: sd-spin .8s linear infinite }
@keyframes sd-spin { to { transform: rotate(360deg) } }

/* ---------------------------------------------------------------- entrance animation (added by stock.js) */
@media (prefers-reduced-motion: no-preference) {
  .sd-anim .sd-col-t i { transform: scaleY(0); transform-origin: 50% 100%; transition: transform .9s var(--sd-ease) }
  .sd-anim .sd-col.neg .sd-col-t i { transform-origin: 50% 0 }
  .sd-anim .sd-hbar-t i,
  .sd-anim .sd-xbar-t i,
  .sd-anim .sd-ma-bar i.up,
  .sd-anim .sd-div i.up { transform: scaleX(0); transform-origin: 0 50%; transition: transform .9s var(--sd-ease) }
  .sd-anim .sd-ma-bar i.dn,
  .sd-anim .sd-div i.dn { transform: scaleX(0); transform-origin: 100% 50%; transition: transform .9s var(--sd-ease) }
  .sd-anim .sd-in .sd-col-t i,
  .sd-anim .sd-in .sd-hbar-t i,
  .sd-anim .sd-in .sd-xbar-t i,
  .sd-anim .sd-in .sd-ma-bar i { transform: none }
  .sd-anim .sd-col:nth-child(2) .sd-col-t i { transition-delay: .04s }
  .sd-anim .sd-col:nth-child(3) .sd-col-t i { transition-delay: .08s }
  .sd-anim .sd-col:nth-child(4) .sd-col-t i { transition-delay: .12s }
  .sd-anim .sd-col:nth-child(5) .sd-col-t i { transition-delay: .16s }
  .sd-anim .sd-col:nth-child(6) .sd-col-t i { transition-delay: .2s }
  .sd-anim .sd-col:nth-child(7) .sd-col-t i { transition-delay: .24s }
  .sd-anim .sd-col:nth-child(8) .sd-col-t i { transition-delay: .28s }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.sd) { scroll-behavior: auto }
  .sd-status.open i { animation: none }
}
@media print {
  .sd-anim .sd-col-t i, .sd-anim .sd-hbar-t i, .sd-anim .sd-xbar-t i, .sd-anim .sd-ma-bar i { transform: none !important }
  .sd-nav { position: static }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1199.98px) {
  .sd-an { grid-template-columns: 250px minmax(0, 1fr) }
  .ss-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 18px }
  .sd-rings { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px }
}

/* Sectors below 1100px: the menu goes above the table, as one row of pills to swipe, so the table has the full width. */
@media (max-width: 1099.98px) {
  .ss-layout { grid-template-columns: minmax(0, 1fr); gap: 16px }
  .ss-nav { position: static; max-height: none; padding: 14px 0 12px; overflow: visible }
  .ss-nav-h { margin: 0 16px 10px }
  .ss-list { flex-direction: row; gap: 8px; padding: 0 16px 4px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none }
  .ss-list::-webkit-scrollbar { display: none }
  .ss-list li { flex: 0 0 auto; scroll-snap-align: start }
  .site-shell .sd .ss-link { padding: 5px 12px 5px 5px; border: 1px solid var(--sd-line); border-radius: 999px; background: #fff; white-space: nowrap }
  .site-shell .sd .ss-link.is-on { border-color: var(--sd-brand); box-shadow: none }
  .ss-link .ss-ic { width: 26px !important; height: 26px !important }
}

@media (max-width: 991.98px) {
  .sd-grid-2, .sd-calc, .sd-about, .sd-an { grid-template-columns: minmax(0, 1fr) }
  .sd-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .sd-calc-out { position: static }
  .sd-stock-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) }
  .sd-an-gauge { max-width: 420px; width: 100%; margin: 0 auto }
  .sd-rings { grid-template-columns: repeat(4, minmax(0, 1fr)) }
  .sd-xgrid { grid-template-columns: minmax(0, 1fr) }
  .sd-gcards { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .sd-xtiles { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .sd-qcard { flex: 1 1 100%; margin-left: 0 }
  .sa-pulse { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .sa-pp-session { grid-column: 1 / -1 }
  /* Stacked: name, intro, the quote card, then the key numbers. */
  .sd-hero-main { display: contents }
  .sd-hero-main > * { flex: 1 1 100%; margin-top: 0 }
  .sd-hero-main .sd-kpis { order: 3 }
  .sd-hero-main .sd-htrend { order: 4; min-height: 190px }
  .sd-hero-main > .sd-id { flex: 1 1 100% }
  .sd-qc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) }
  .sd-qc-grid > div:last-child:nth-child(odd) { grid-column: auto }
  .sl-cols { grid-template-columns: minmax(0, 1fr) }
  .sl-act { grid-template-columns: minmax(0, 1fr) }
  .sl-act-donut { flex-direction: row; justify-content: center; flex-wrap: wrap }
  .sl-act-donut .sd-legend { width: auto; min-width: 220px }
  /* Tablets and phones: the 20 days become one row to swipe through. */
  .sd-days-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 84px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; scrollbar-width: thin }
  .sd-day { scroll-snap-align: start }
  .sd-day:hover { transform: none }
}

@media (max-width: 767.98px) {
  .sd-card { padding: 18px 16px; border-radius: 16px }
  .sd-quote { margin-left: 0; text-align: left }
  .sd-quote-top { justify-content: flex-start }
  .sd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px }
  .sd-tile { padding: 12px 13px }
  .sd-tile-v { font-size: 1.06rem }
  .sd-ranges { grid-template-columns: minmax(0, 1fr) }
  .sd-ret { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px }
  .sd-ret-tile b { font-size: .92rem }
  .sd-grid-3 { grid-template-columns: minmax(0, 1fr) }
  .sd-own { grid-template-columns: minmax(0, 1fr); justify-items: center }
  .sd-legend { width: 100% }
  .sd-rings { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .sd-mini-3 { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .sd-allm, .sd-news, .sd-people { grid-template-columns: minmax(0, 1fr) }
  .sd-stock-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .sd-ma-row { grid-template-columns: 96px minmax(0, 1fr) 92px; gap: 10px }
  .sd-chart-plot { height: 260px }
  .sd-cols { height: 190px; gap: 4px }
  .sd-col-v { font-size: .58rem }
  .sd-col-l { font-size: .6rem }
  .sd-head .sd-seg { width: 100% }
  .sd-head .sd-seg button { flex: 1 }
  .sd-days { padding: 14px }
  .site-shell .sd .sl-table tbody th { min-width: 190px }
  .sa-all { padding: 20px 16px 18px }
  .sa-pulse { grid-template-columns: minmax(0, 1fr) }
  .sa-titlebar { align-items: flex-start }
  .sa-search { max-width: none }
  .site-shell .sd .sa-table tbody th { min-width: 180px }
  .sl-hl li { flex-wrap: wrap }
  .ss-all { padding: 20px 16px 18px }
  .ss-grid { grid-template-columns: minmax(0, 1fr); gap: 12px }
  .site-shell .sd .ss-title { gap: 10px }
  .ss-title .ss-ic { width: 38px !important; height: 38px !important }
}

@media (max-width: 575.98px) {
  .sd-mono { flex-basis: 48px; height: 48px; border-radius: 14px; font-size: 1rem }
  .sd-id { gap: 12px }
  .sd-kpis > div { flex-basis: 42%; padding: 12px 14px }
  .sd-hero-main .sd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .sd-qc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .sd-qc-grid > div:last-child:nth-child(odd) { grid-column: 1 / -1 }
  .sd-field-row { grid-template-columns: minmax(0, 1fr) }
  .sd-field-row .sd-field + .sd-field { margin-top: 12px }
  .sd-an-counts { gap: 5px }
  .sd-an-counts b { font-size: 1.1rem }
  .sd-an-counts span { font-size: .62rem }
  .sd-an-share { grid-template-columns: minmax(0, 1fr) }
  .sd-legend li { grid-template-columns: 12px minmax(0, 1fr) auto 84px; gap: 10px }
  .sd-cal { grid-template-columns: minmax(0, 1fr) }
  .sd-growth-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr) 84px; gap: 8px }
  .sd-ma-row { grid-template-columns: 84px minmax(0, 1fr) auto }
  .sd-more-stocks .sd-head .sd-btn { width: 100%; justify-content: center }
  .sd-xbox { padding: 14px }
  .sd-xdonut-in { grid-template-columns: minmax(0, 1fr); justify-items: center }
  .sd-xdonut-in .sd-legend { width: 100% }
  .sd-xbar { grid-template-columns: minmax(0, 1fr) 86px; gap: 8px }
  .sd-gcards { grid-template-columns: minmax(0, 1fr) }
  /* Twelve-plus columns on a phone: label every other one so they do not collide. */
  .sd-cols.dense .sd-col:nth-child(even) .sd-col-l,
  .sd-cols.dense .sd-col:nth-child(even) .sd-col-v { visibility: hidden }
}

@media (max-width: 419.98px) {
  .sd-ret { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .sd-stock-grid { gap: 8px }
  .site-shell .sd .sd-stock { gap: 10px; padding: 12px; border-radius: 14px }
  .sd-stock-name b { font-size: .86rem }
  .sd-stock-go { display: none }
  .sd-stock-bottom { flex-wrap: wrap; gap: 4px 8px }
  .sd-stock-bottom b { font-size: .96rem }
}
