:root {
  --stock-ink: #171412;
  --stock-muted: #6b625d;
  --stock-line: #e5dfda;
  --stock-paper: #fffdfb;
  --stock-soft: #f5f1ed;
  --stock-accent: #d71920;
  --stock-accent-dark: #981b1f;
  --stock-positive: #087a4b;
  --stock-negative: #c22c35;
  --stock-warning: #9a5b08;
}

.stock-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 2%, rgba(215, 25, 32, 0.08), transparent 28rem),
    linear-gradient(180deg, #f7f3ef 0, #fffdfb 30rem, #fff 100%);
  color: var(--stock-ink);
}

.investment-currency-bar {
  position: relative;
  z-index: 20;
  display: grid;
  width: 100%;
  grid-template-columns: minmax(260px, 1fr) minmax(240px, 390px) minmax(300px, 1.1fr);
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid #ded7d2;
  background: rgba(255, 255, 255, 0.96);
  padding: 0.75rem clamp(1rem, 3vw, 3rem);
  box-shadow: 0 8px 30px rgba(45, 31, 22, 0.05);
  backdrop-filter: blur(16px);
}

.investment-currency-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.7rem;
}

.investment-currency-icon {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 0.62rem;
  background: var(--stock-accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 900;
}

.investment-currency-copy > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.08rem;
}

.investment-currency-copy strong { font-size: 0.78rem; }
.investment-currency-copy div span { overflow: hidden; color: var(--stock-muted); font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }

.investment-currency-bar label { min-width: 0; }
.investment-currency-bar select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d5ccc6;
  border-radius: 0.72rem;
  outline: none;
  background: #fff;
  padding: 0.55rem 2.4rem 0.55rem 0.8rem;
  color: var(--stock-ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 750;
}
.investment-currency-bar select:focus { border-color: rgba(215, 25, 32, 0.6); box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.1); }
.investment-currency-bar > p { margin: 0; color: var(--stock-muted); font-size: 0.66rem; line-height: 1.45; }

.stock-hero {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding: clamp(2.25rem, 5vw, 5rem) clamp(1rem, 3vw, 3rem) 2rem;
}

.stock-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.stock-eyebrow,
.table-kicker,
.analysis-eyebrow {
  margin: 0 0 0.6rem;
  color: var(--stock-accent-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.stock-title-row h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.35rem, 5.6vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.94;
}

.stock-intro {
  max-width: 760px;
  margin: 1.15rem 0 0;
  color: var(--stock-muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.65;
}

.compact-investment-hero { padding-bottom: 1rem; }

.investment-vehicle-nav {
  position: relative;
  z-index: 25;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #211d1b;
}

.investment-vehicle-list {
  display: grid;
  width: min(100%, 1600px);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0 auto;
  padding: 0.55rem clamp(1rem, 3vw, 3rem) 0;
  list-style: none;
}

.investment-vehicle-list li { min-width: 0; }

.investment-vehicle-link {
  display: grid;
  min-height: 58px;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 0.05rem 0.65rem;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 0.8rem 0.8rem 0 0;
  padding: 0.65rem 0.85rem 0.75rem;
  color: #e6ded8;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.investment-vehicle-link > span {
  grid-row: 1 / 3;
  color: #d4c6bd;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.investment-vehicle-link strong { font-size: 0.88rem; }
.investment-vehicle-link small {
  overflow: hidden;
  color: #b9aaa1;
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.investment-vehicle-link:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.investment-vehicle-link[aria-current="page"] {
  border-color: #e4dcd6;
  background: #fffdfb;
  box-shadow: inset 0 -3px 0 var(--stock-accent);
  color: var(--stock-ink);
}

.investment-vehicle-link[aria-current="page"] > span { color: var(--stock-accent-dark); }
.investment-vehicle-link[aria-current="page"] small { color: var(--stock-muted); }
.investment-vehicle-link:focus-visible {
  outline: 3px solid #ff7479;
  outline-offset: -3px;
}

.market-safety-note {
  display: flex;
  min-width: 180px;
  flex-direction: column;
  gap: 0.25rem;
  border-left: 3px solid var(--stock-accent);
  padding: 0.65rem 0 0.65rem 1rem;
}

.market-safety-note strong {
  font-size: 0.9rem;
}

.market-safety-note span {
  color: var(--stock-muted);
  font-size: 0.78rem;
}

.stock-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1.15fr) minmax(250px, 1fr) 100px auto auto;
  gap: 0.75rem;
  align-items: end;
  margin-top: clamp(2rem, 5vw, 4rem);
  padding: 1rem;
  border: 1px solid rgba(72, 61, 54, 0.12);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 22px 70px rgba(54, 37, 28, 0.08);
  backdrop-filter: blur(18px);
}

.stock-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.45rem;
}

.stock-field > span {
  color: #514943;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stock-field select,
.stock-field input {
  width: 100%;
  height: 44px;
  border: 1px solid #d8d0ca;
  border-radius: 0.72rem;
  outline: none;
  background: #fff;
  color: var(--stock-ink);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.stock-field select {
  padding: 0 2.25rem 0 0.8rem;
}

.stock-field input {
  padding: 0 0.8rem 0 2.5rem;
}

.stock-field select:focus,
.stock-field input:focus {
  border-color: rgba(215, 25, 32, 0.65);
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.1);
}

.stock-search-wrap {
  position: relative;
}

.stock-search-wrap svg {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  width: 1rem;
  height: 1rem;
  transform: translateY(-50%);
  fill: none;
  stroke: #7a706a;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.stock-control-button {
  display: inline-flex;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid #d8d0ca;
  border-radius: 0.72rem;
  background: #fff;
  padding: 0 0.85rem;
  color: #3d3733;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.stock-control-button:hover {
  border-color: #b9ada4;
  background: #faf8f6;
}

.stock-control-button:active {
  transform: translateY(1px);
}

.stock-control-button svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.stock-control-button strong {
  min-width: 1.3rem;
  border-radius: 999px;
  background: var(--stock-soft);
  padding: 0.15rem 0.35rem;
  font-size: 0.68rem;
}

.stock-control-button[aria-pressed="true"] {
  border-color: rgba(215, 25, 32, 0.35);
  background: rgba(215, 25, 32, 0.07);
  color: var(--stock-accent-dark);
}

.stock-control-button[aria-pressed="true"] svg {
  fill: currentColor;
}

.stock-refresh-button.is-refreshing svg {
  animation: stock-spin 800ms linear infinite;
}

@keyframes stock-spin {
  to { transform: rotate(360deg); }
}

.stock-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 1.25rem;
  border-top: 1px solid var(--stock-line);
  border-bottom: 1px solid var(--stock-line);
}

.stock-stats > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.1rem 1.25rem;
  border-left: 1px solid var(--stock-line);
}

.stock-stats > div:first-child {
  border-left: 0;
  padding-left: 0;
}

.stock-stats strong {
  overflow: hidden;
  font-size: 1.25rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-stats span {
  color: var(--stock-muted);
  font-size: 0.74rem;
}

.market-screeners {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 1.5rem clamp(0.5rem, 1.2vw, 1.5rem) 3rem;
  scroll-margin-top: 5rem;
}

.investment-market-section {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 1.5rem clamp(0.5rem, 1.2vw, 1.5rem) 3rem;
  scroll-margin-top: 5rem;
}

.investment-standalone-hero { padding-bottom: 0.75rem; }
.investment-standalone-section { padding-top: 0.75rem; }

.screeners-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.25rem;
}

.screeners-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.3vw, 2.8rem);
  font-weight: 850;
  letter-spacing: -0.045em;
}

.screeners-heading > p {
  max-width: 520px;
  margin: 0 0 0.2rem;
  color: var(--stock-muted);
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: right;
}

.market-screener-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.canonical-country-grid {
  gap: clamp(2rem, 5vw, 4rem);
}

.canonical-country-tables .stock-catalog {
  padding-right: 0;
  padding-left: 0;
}

.canonical-country-tables .stock-catalog + .stock-catalog {
  border-top: 1px solid var(--stock-line);
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

.india-ranking-check {
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(320px, 1.5fr) auto;
  align-items: center;
  gap: 1.2rem;
  margin: 1.25rem 0;
  border: 1px solid #e5d8cf;
  border-left: 4px solid var(--stock-accent);
  border-radius: 0.9rem;
  background: linear-gradient(110deg, #fff7f3, #fff);
  padding: 1rem 1.1rem;
  box-shadow: 0 12px 30px rgba(75, 45, 30, 0.06);
}
.india-ranking-check p { margin: 0; color: #625952; font-size: 0.75rem; line-height: 1.55; }
.india-ranking-check > div > strong { display: block; margin-top: 0.2rem; color: #271f1b; font-size: 0.9rem; line-height: 1.35; }
.india-ranking-check a {
  justify-self: end;
  color: var(--stock-accent-dark);
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.india-ranking-check a:hover { text-decoration: underline; }

.country-table-policy {
  margin-top: 1rem;
  border-left: 3px solid var(--stock-accent);
  background: #f8f5f2;
  padding: 0.9rem 1rem;
}

.country-table-policy strong { font-size: 0.8rem; }
.country-table-policy p {
  max-width: 920px;
  margin: 0.25rem 0 0;
  color: var(--stock-muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.market-screener-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #ddd6d1;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 20px 60px rgba(45, 31, 22, 0.07);
}

.market-screener-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0;
}

.market-country {
  color: var(--stock-accent-dark);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.market-screener-header h3 {
  margin: 0.2rem 0 0;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
}

.feed-pill {
  flex: none;
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  font-size: 0.65rem;
  font-weight: 800;
}

.feed-delayed {
  background: rgba(154, 91, 8, 0.09);
  color: var(--stock-warning);
}

.feed-eod {
  background: #f0ece9;
  color: #655c56;
}

.feed-live {
  background: rgba(8, 122, 75, 0.09);
  color: var(--stock-positive);
}

.market-screener-explainer {
  margin: 0;
  padding: 0.65rem 1rem 0.8rem;
  color: var(--stock-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.market-page-link {
  display: inline-flex;
  width: fit-content;
  margin: 0 1rem 0.8rem;
  color: var(--stock-accent-dark);
  font-size: 0.7rem;
  font-weight: 800;
  text-decoration: none;
}

.market-page-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.china-ticker-help {
  margin: 0 1rem 1rem;
  border: 1px solid #e4ddd8;
  border-radius: 0.8rem;
  background: #faf8f6;
  padding: 0.85rem;
}

.china-ticker-help-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.china-ticker-help-copy strong {
  font-size: 0.78rem;
}

.china-ticker-help-copy span {
  color: var(--stock-muted);
  font-size: 0.7rem;
}

.china-name-guide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.china-name-guide a {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.1rem;
  border: 1px solid #e7e1dc;
  border-radius: 0.55rem;
  background: #fff;
  padding: 0.5rem 0.6rem;
  color: var(--stock-ink);
  text-decoration: none;
}

.china-name-guide a:hover {
  border-color: #c8bbb2;
  box-shadow: 0 5px 16px rgba(45, 31, 22, 0.07);
}

.china-name-guide span {
  color: var(--stock-accent-dark);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.china-name-guide strong {
  overflow: hidden;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-market-explorer {
  margin-top: 0.35rem;
}

.global-market-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  align-items: end;
  gap: 1rem;
  padding: 0.8rem 1rem 0.2rem;
}

.global-market-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.global-market-toolbar label > span {
  color: var(--stock-muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.global-market-toolbar select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d9d1cb;
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.55rem 2.2rem 0.55rem 0.7rem;
  color: var(--stock-ink);
  font: inherit;
  font-size: 0.82rem;
}

.global-market-toolbar p {
  margin: 0 0 0.25rem;
  color: var(--stock-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.global-market-toolbar .market-page-link { margin: 0.45rem 0 0.2rem; }

.global-market-coverage-note {
  margin: 0;
  border-top: 1px solid #ece7e3;
  background: #faf8f6;
  padding: 0.8rem 1rem;
  color: var(--stock-muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.stock-screener-widget {
  height: 650px;
  border-top: 1px solid #ece7e3;
}

.stock-screener-widget .tradingview-widget-container__widget {
  height: 620px;
}

.investment-widget {
  height: 650px;
  border-top: 1px solid #ece7e3;
}

.investment-widget .tradingview-widget-container__widget {
  height: 620px;
}

.investment-dataset-section { padding-top: 0.75rem; }

.commodity-market-table { border-top: 1px solid #ece7e3; padding: 0.85rem; }
.commodity-market-table .catalog-status { margin-bottom: 0.65rem; }
.commodity-table-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 240px) minmax(220px, auto);
  align-items: end;
  gap: 0.6rem;
  border: 1px solid #ded7d2;
  border-bottom: 0;
  border-radius: 0.9rem 0.9rem 0 0;
  background: #fff;
  padding: 0.75rem;
}
.commodity-table-toolbar > p { margin: 0 0 0.8rem; color: var(--stock-muted); font-size: 0.7rem; text-align: right; }
.commodity-table-shell { max-height: 780px; }
.commodity-table { min-width: 1420px; }
.commodity-asset-cell { min-width: 220px; }
.commodity-asset-cell a {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  color: var(--stock-ink);
  text-decoration: none;
}
.commodity-asset-cell a:hover strong { color: var(--stock-accent-dark); text-decoration: underline; text-underline-offset: 2px; }
.commodity-asset-cell span { color: var(--stock-muted); font-size: 0.64rem; }

.global-instrument-table { border-top: 1px solid #ece7e3; padding: 0.85rem; }
.global-instrument-table .catalog-status { margin-bottom: 0.65rem; }
.instrument-table-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(210px, 0.7fr) 90px auto;
  align-items: end;
  gap: 0.6rem;
  border: 1px solid #ded7d2;
  border-bottom: 0;
  border-radius: 0.9rem 0.9rem 0 0;
  background: #fff;
  padding: 0.75rem;
}
.instrument-table-toolbar-lazy {
  grid-template-columns: minmax(260px, 1.2fr) minmax(210px, 0.7fr) auto;
}
.instrument-table-meta { border-right: 1px solid #ded7d2; border-left: 1px solid #ded7d2; }
.instrument-order-note { border-right: 1px solid #ded7d2; border-left: 1px solid #ded7d2; }
.instrument-table-shell { max-height: 780px; border-radius: 0 0 0.9rem 0.9rem; }
.instrument-table-shell-lazy {
  max-height: none;
  border-radius: 0;
}
.instrument-lazy-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 0.8rem;
  min-height: 52px;
  border: 1px solid #d8d0ca;
  border-top: 0;
  border-radius: 0 0 0.9rem 0.9rem;
  background: #faf8f6;
  color: var(--stock-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.instrument-load-more {
  appearance: none;
  border: 1px solid rgba(215, 25, 32, 0.28);
  border-radius: 999px;
  background: #fff;
  color: var(--stock-accent-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0.35rem 0.8rem;
}
.instrument-load-more:hover { border-color: rgba(215, 25, 32, 0.5); }
.instrument-lazy-status.is-loading::before {
  content: '';
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.45rem;
  border: 2px solid #d8d0ca;
  border-top-color: var(--stock-accent-dark);
  border-radius: 50%;
  animation: instrument-lazy-spin 0.7s linear infinite;
}
@keyframes instrument-lazy-spin {
  to { transform: rotate(360deg); }
}
.instrument-table { min-width: 2240px; }
.instrument-table th:first-child,
.instrument-table td:first-child { min-width: 58px; }
.instrument-table .company-cell { min-width: 280px; }
.instrument-table .ticker-cell { min-width: 120px; }
.instrument-table th:nth-last-child(n + 3),
.instrument-table td:nth-last-child(n + 3) { min-width: 118px; }
.instrument-rank { color: var(--stock-muted); }
.instrument-range-cell { min-width: 180px; }
.instrument-range-cell strong,
.instrument-range-cell span { display: block; }
.instrument-range-cell span { margin-top: 0.1rem; color: var(--stock-muted); font-size: 0.64rem; }
.instrument-table .roi-primary { background: rgba(8, 122, 75, 0.035); }
.instrument-method-note {
  margin: 0;
  border-top: 1px solid #ece7e3;
  background: #faf8f6;
  padding: 0.85rem 1rem;
  color: var(--stock-muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

.crypto-market-table { border-top: 1px solid #ece7e3; padding: 0.85rem; }
.crypto-market-table .catalog-status { margin-bottom: 0.65rem; }
.crypto-table-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 90px minmax(220px, auto);
  align-items: end;
  gap: 0.6rem;
  border: 1px solid #ded7d2;
  border-bottom: 0;
  border-radius: 0.9rem 0.9rem 0 0;
  background: #fff;
  padding: 0.75rem;
}
.crypto-table-toolbar > p { margin: 0 0 0.8rem; color: var(--stock-muted); font-size: 0.7rem; text-align: right; }
.crypto-table-shell { max-height: 780px; }
.crypto-table { min-width: 1660px; }
.crypto-table th:first-child,
.crypto-table td:first-child { min-width: 58px; }
.crypto-asset-cell {
  min-width: 210px;
}
.crypto-asset-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--stock-ink);
  text-decoration: none;
}
.crypto-asset-link:hover strong { color: var(--stock-accent-dark); text-decoration: underline; text-underline-offset: 2px; }
.crypto-asset-link:focus-visible { border-radius: 0.3rem; outline: 2px solid var(--stock-accent); outline-offset: 3px; }
.crypto-asset-link img { width: 1.75rem; height: 1.75rem; flex: none; border-radius: 999px; object-fit: cover; }
.crypto-asset-link > div { display: flex; min-width: 0; flex-direction: column; gap: 0.08rem; }
.crypto-asset-cell strong { overflow: hidden; max-width: 190px; text-overflow: ellipsis; white-space: nowrap; }
.crypto-asset-cell span,
.crypto-range-cell span { color: var(--stock-muted); font-size: 0.64rem; }
.crypto-range-cell strong,
.crypto-range-cell span { display: block; }
.crypto-rank { color: var(--stock-muted); }
.crypto-provider-attribution { margin: 0; border-top: 1px solid #ece7e3; padding: 0.7rem; color: var(--stock-muted); font-size: 0.66rem; text-align: center; }
.crypto-provider-attribution a { color: #33745a; }

.tradingview-widget-copyright {
  padding: 0.35rem 0.7rem;
  font-size: 0.68rem;
}

.tradingview-widget-copyright a {
  color: #2962ff;
  text-decoration: none;
}

.screener-freshness-note {
  margin: 1rem 0 0;
  border-left: 3px solid var(--stock-accent);
  background: rgba(215, 25, 32, 0.045);
  padding: 0.8rem 1rem;
  color: #574e49;
  font-size: 0.76rem;
  line-height: 1.55;
}

.stock-table-section {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 clamp(0.5rem, 1.2vw, 1.5rem) 5rem;
}

.connection-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin: 0 clamp(0.5rem, 1vw, 1rem) 1.5rem;
  border: 1px solid #ded7d2;
  border-radius: 0.8rem;
  background: #f8f6f4;
  padding: 0.85rem 1rem;
}

.connection-banner > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.connection-banner strong {
  font-size: 0.82rem;
}

.connection-banner span:not(.connection-dot) {
  color: var(--stock-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.connection-dot {
  width: 0.55rem;
  height: 0.55rem;
  flex: none;
  margin-top: 0.25rem;
  border-radius: 999px;
  background: #948b85;
  box-shadow: 0 0 0 4px rgba(148, 139, 133, 0.12);
}

.connection-connected {
  border-color: rgba(8, 122, 75, 0.22);
  background: rgba(8, 122, 75, 0.05);
}

.connection-connected .connection-dot {
  background: var(--stock-positive);
  box-shadow: 0 0 0 4px rgba(8, 122, 75, 0.12);
}

.connection-preview {
  border-color: rgba(154, 91, 8, 0.25);
  background: rgba(154, 91, 8, 0.06);
}

.connection-preview .connection-dot {
  background: var(--stock-warning);
  box-shadow: 0 0 0 4px rgba(154, 91, 8, 0.12);
}

.connection-degraded {
  border-color: rgba(194, 44, 53, 0.24);
  background: rgba(194, 44, 53, 0.05);
}

.connection-degraded .connection-dot {
  background: var(--stock-negative);
  box-shadow: 0 0 0 4px rgba(194, 44, 53, 0.11);
}

.table-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem 1rem;
}

.table-heading-row h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 850;
  letter-spacing: -0.04em;
}

.table-result-summary {
  margin: 0 0 0.15rem;
  color: var(--stock-muted);
  font-size: 0.78rem;
  text-align: right;
}

.stock-table-shell {
  overflow-x: auto;
  border: 1px solid #ddd6d1;
  border-radius: 1rem;
  background: var(--stock-paper);
  box-shadow: 0 20px 60px rgba(45, 31, 22, 0.07);
}

.stock-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8rem;
}

.stock-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  border-bottom: 1px solid #dcd4ce;
  background: #f3efeb;
  padding: 0.8rem 0.7rem;
  color: #605750;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.stock-table td {
  height: 64px;
  border-bottom: 1px solid #ece7e3;
  padding: 0.65rem 0.7rem;
  color: #39332f;
  vertical-align: middle;
}

.stock-table tbody tr:last-child td {
  border-bottom: 0;
}

.stock-table tbody tr {
  transition: background 130ms ease;
}

.stock-table tbody tr:hover {
  background: #faf7f4;
}

.stock-table .watch-column {
  width: 42px;
  padding-right: 0.2rem;
  text-align: center;
}

.numeric-column,
.numeric-cell {
  font-variant-numeric: tabular-nums;
  text-align: right !important;
}

.company-cell {
  min-width: 230px;
}

.company-cell strong {
  display: block;
  max-width: 280px;
  overflow: hidden;
  color: #201c19;
  font-size: 0.84rem;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-cell span,
.ticker-cell span,
.updated-cell span {
  display: block;
  margin-top: 0.2rem;
  color: #82776f;
  font-size: 0.67rem;
}

.ticker-cell strong {
  color: #201c19;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.price-cell strong {
  font-size: 0.84rem;
  font-weight: 850;
}

.change-value {
  display: inline-flex;
  min-width: 64px;
  justify-content: flex-end;
  font-size: 0.78rem;
  font-weight: 800;
}

.change-positive { color: var(--stock-positive); }
.change-negative { color: var(--stock-negative); }
.change-neutral { color: #6f6761; }

.week-range {
  display: grid;
  min-width: 135px;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.5rem;
  align-items: center;
}

.week-range-track {
  position: relative;
  height: 4px;
  overflow: visible;
  border-radius: 999px;
  background: #ded8d3;
}

.week-range-track::after {
  position: absolute;
  top: 50%;
  left: var(--week-position, 50%);
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--stock-accent);
  box-shadow: 0 0 0 1px rgba(52, 43, 37, 0.18);
  content: '';
  transform: translate(-50%, -50%);
}

.week-range-value {
  color: #4f4742;
  font-size: 0.68rem;
  font-weight: 750;
}

.week-range-labels {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  color: #958a83;
  font-size: 0.58rem;
}

.market-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  background: #f0ece9;
  padding: 0.3rem 0.55rem;
  color: #655c56;
  font-size: 0.66rem;
  font-weight: 750;
  white-space: nowrap;
}

.market-status::before {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: #948b85;
  content: '';
}

.market-status.is-open {
  background: rgba(8, 122, 75, 0.09);
  color: var(--stock-positive);
}

.market-status.is-open::before { background: var(--stock-positive); }

.watch-button,
.analyze-button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.watch-button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: transparent;
  color: #a79c95;
}

.watch-button:hover { background: #f0ece8; color: #615852; }
.watch-button[aria-pressed="true"] { color: #ce8c0b; }

.watch-button svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.watch-button[aria-pressed="true"] svg { fill: currentColor; }

.analyze-button {
  border: 1px solid #d7cfc9;
  border-radius: 0.55rem;
  background: #fff;
  padding: 0.42rem 0.65rem;
  color: #4a423d;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.analyze-button:hover {
  border-color: rgba(215, 25, 32, 0.35);
  color: var(--stock-accent-dark);
}

.empty-table-cell {
  padding: 4rem 1rem !important;
  color: var(--stock-muted) !important;
  text-align: center;
}

.empty-table-cell strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--stock-ink);
  font-size: 1rem;
}

.skeleton-row span {
  display: block;
  width: 82%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eee9e5 25%, #f8f5f2 50%, #eee9e5 75%);
  background-size: 200% 100%;
  animation: stock-shimmer 1.4s infinite;
}

@keyframes stock-shimmer {
  to { background-position: -200% 0; }
}

.stock-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem 0;
}

.stock-pagination button {
  border: 1px solid #d9d1cb;
  border-radius: 0.6rem;
  background: #fff;
  padding: 0.55rem 0.8rem;
  color: #4b433e;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 750;
  cursor: pointer;
}

.stock-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.stock-pagination span {
  min-width: 90px;
  color: var(--stock-muted);
  font-size: 0.73rem;
  text-align: center;
}

.stock-methodology {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 1rem 0;
}

.stock-methodology > div {
  border-top: 2px solid #2f2925;
  padding-top: 0.85rem;
}

.stock-methodology h3 {
  margin: 0;
  font-size: 0.86rem;
}

.stock-methodology p,
.stock-source-note {
  color: var(--stock-muted);
  font-size: 0.74rem;
  line-height: 1.65;
}

.stock-methodology p { margin: 0.4rem 0 0; }

.stock-source-note {
  margin: 1.5rem 1rem 0;
  border-top: 1px solid var(--stock-line);
  padding-top: 1rem;
}

.stock-source-note a,
.analysis-footer a {
  color: var(--stock-accent-dark);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.analysis-dialog {
  width: min(920px, calc(100vw - 2rem));
  max-height: min(86vh, 920px);
  overflow: hidden;
  border: 0;
  border-radius: 1.25rem;
  background: #fff;
  padding: 0;
  box-shadow: 0 28px 100px rgba(20, 14, 11, 0.3);
}

.analysis-dialog::backdrop {
  background: rgba(23, 20, 18, 0.68);
  backdrop-filter: blur(4px);
}

.analysis-dialog-inner {
  display: flex;
  max-height: min(86vh, 920px);
  flex-direction: column;
}

.analysis-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--stock-line);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.analysis-header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  letter-spacing: -0.04em;
}

.analysis-header p:last-child {
  margin: 0.4rem 0 0;
  color: var(--stock-muted);
  font-size: 0.78rem;
}

.analysis-close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border: 1px solid #ddd5cf;
  border-radius: 999px;
  background: #fff;
  color: #5e554f;
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.analysis-body {
  overflow-y: auto;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.analysis-loading {
  display: flex;
  min-height: 240px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  color: var(--stock-muted);
}

.analysis-loading span {
  width: 28px;
  height: 28px;
  border: 3px solid #e4ddd8;
  border-top-color: var(--stock-accent);
  border-radius: 999px;
  animation: stock-spin 800ms linear infinite;
}

.analysis-loading p { margin: 0; font-size: 0.82rem; }

.analysis-error {
  min-height: 220px;
  border: 1px solid rgba(154, 91, 8, 0.22);
  border-radius: 0.9rem;
  background: rgba(154, 91, 8, 0.05);
  padding: 2rem;
  color: #704407;
}

.analysis-error h3 { margin: 0 0 0.5rem; color: #4f3107; }
.analysis-error p { margin: 0; font-size: 0.82rem; line-height: 1.6; }

.analysis-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.analysis-group {
  border: 1px solid var(--stock-line);
  border-radius: 0.9rem;
  background: #fdfbf9;
  padding: 1rem;
}

.analysis-group h3 {
  margin: 0 0 0.8rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.analysis-metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid #ebe5e1;
  padding: 0.62rem 0;
}

.analysis-metric:first-of-type { border-top: 0; padding-top: 0; }
.analysis-metric:last-child { padding-bottom: 0; }
.analysis-metric span { color: var(--stock-muted); font-size: 0.74rem; }
.analysis-metric strong { font-size: 0.83rem; font-variant-numeric: tabular-nums; text-align: right; }

.analysis-context {
  margin: 1rem 0 0;
  border-left: 3px solid var(--stock-accent);
  background: #f7f3ef;
  padding: 0.8rem 1rem;
  color: var(--stock-muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.analysis-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--stock-line);
  background: #f6f2ef;
  padding: 0.85rem clamp(1.25rem, 3vw, 2rem);
  color: var(--stock-muted);
  font-size: 0.68rem;
}

.analysis-footer strong { color: #4a423d; }

.sr-only,
.stock-table .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 1100px) {
  .stock-controls {
    grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr) 90px;
  }

  .stock-control-button { width: 100%; }
}

@media (max-width: 900px) {
  .investment-currency-bar { grid-template-columns: minmax(0, 1fr); gap: 0.55rem; padding: 0.7rem 1rem; }
  .investment-currency-bar > p { display: none; }
  .investment-currency-copy div span { white-space: normal; }
}

@media (max-width: 760px) {
  .investment-currency-bar { grid-template-columns: minmax(0, 1fr); gap: 0.55rem; padding: 0.7rem 1rem; }
  .investment-currency-bar > p { display: none; }
  .investment-currency-copy div span { white-space: normal; }
  .stock-hero { padding-top: 2rem; }
  .stock-title-row { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .market-safety-note { min-width: 0; }

  .investment-vehicle-list {
    display: flex;
    overflow-x: auto;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .investment-vehicle-list::-webkit-scrollbar { display: none; }
  .investment-vehicle-list li { min-width: min(72vw, 220px); flex: 1 0 min(72vw, 220px); scroll-snap-align: start; }
  .investment-vehicle-link { min-height: 56px; }

  .stock-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 0.8rem;
  }

  .stock-field-market,
  .stock-field-search { grid-column: 1 / -1; }
  .stock-field-rows { grid-column: 1 / 2; }
  .stock-refresh-button { grid-column: 2 / 3; }

  .stock-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stock-stats > div { border-bottom: 1px solid var(--stock-line); }
  .stock-stats > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stock-stats > div:nth-last-child(-n + 2) { border-bottom: 0; }

  .screeners-heading { align-items: flex-start; flex-direction: column; gap: 0.65rem; }
  .screeners-heading > p { text-align: left; }
  .market-screener-grid { grid-template-columns: 1fr; }
  .india-ranking-check { grid-template-columns: 1fr; gap: 0.65rem; }
  .india-ranking-check a { justify-self: start; white-space: normal; }
  .china-ticker-help-copy { align-items: flex-start; flex-direction: column; gap: 0.25rem; }
  .china-name-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-market-toolbar { grid-template-columns: minmax(0, 1fr); }
  .commodity-table-toolbar { grid-template-columns: minmax(0, 1fr); }
  .commodity-table-toolbar > p { margin: 0; text-align: left; }
  .instrument-table-toolbar,
  .instrument-table-toolbar-lazy { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .instrument-table-toolbar .catalog-reset-button { min-height: 42px; }
  .crypto-table-toolbar { grid-template-columns: minmax(0, 1fr) 80px; }
  .crypto-table-toolbar > p { grid-column: 1 / -1; margin: 0; text-align: left; }

  .table-heading-row { align-items: flex-start; flex-direction: column; }
  .table-result-summary { text-align: left; }
  .stock-methodology { grid-template-columns: 1fr; margin-inline: 0.5rem; }
  .stock-source-note { margin-inline: 0.5rem; }
  .analysis-groups { grid-template-columns: 1fr; }
  .analysis-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 440px) {
  .stock-controls { grid-template-columns: 1fr; }
  .instrument-table-toolbar,
  .instrument-table-toolbar-lazy { grid-template-columns: 1fr; }
  .stock-field-market,
  .stock-field-search,
  .stock-field-rows,
  .stock-refresh-button { grid-column: auto; }
  .stock-stats strong { font-size: 1rem; }
  .stock-stats > div { padding-right: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .stock-refresh-button.is-refreshing svg,
  .analysis-loading span,
  .skeleton-row span { animation: none; }
}

/* First-party global and country catalogue */
.stock-catalog {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(1.25rem, 2.5vw, 2.5rem) clamp(0.5rem, 1.2vw, 1.5rem) 3rem;
  scroll-margin-top: 5rem;
}

.catalog-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1rem;
}

.catalog-heading-row h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.8vw, 3.4rem);
  font-weight: 880;
  letter-spacing: -0.055em;
  line-height: 1;
}

.catalog-heading-row > div:first-child > p:last-child {
  max-width: 920px;
  margin: 0.75rem 0 0;
  color: var(--stock-muted);
  font-size: 0.83rem;
  line-height: 1.6;
}

.catalog-scope-badge {
  display: flex;
  min-width: 210px;
  flex-direction: column;
  gap: 0.25rem;
  border-left: 3px solid var(--stock-accent);
  padding: 0.35rem 0 0.35rem 0.85rem;
}

.catalog-scope-badge span {
  color: var(--stock-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog-scope-badge strong { font-size: 0.78rem; }

.catalog-status {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  border: 1px solid #ded7d2;
  border-radius: 0.8rem;
  background: #f8f6f4;
  padding: 0.8rem 0.9rem;
}

.catalog-status > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.catalog-status strong { font-size: 0.78rem; }
.catalog-status div span { color: var(--stock-muted); font-size: 0.7rem; line-height: 1.45; }

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 90px auto auto;
  gap: 0.6rem;
  align-items: end;
  border: 1px solid #ded7d2;
  border-bottom: 0;
  border-radius: 0.9rem 0.9rem 0 0;
  background: #fff;
  padding: 0.75rem;
}

.catalog-search-field,
.catalog-toolbar-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.35rem;
}

.catalog-search-field > span,
.catalog-toolbar-field > span {
  color: #514943;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.catalog-search-field > div { position: relative; }

.catalog-search-field svg {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  width: 0.95rem;
  height: 0.95rem;
  transform: translateY(-50%);
  fill: none;
  stroke: #7a706a;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.catalog-search-field input,
.catalog-toolbar-field select,
.catalog-column-picker summary,
.catalog-reset-button {
  min-height: 42px;
  border: 1px solid #d8d0ca;
  border-radius: 0.62rem;
  background: #fff;
  color: var(--stock-ink);
  font: inherit;
  font-size: 0.78rem;
}

.catalog-search-field input {
  width: 100%;
  padding: 0 2.25rem 0 2.25rem;
}

.catalog-search-field button {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  display: none;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #786e67;
  font-size: 1.1rem;
  cursor: pointer;
}

.catalog-search-field button.is-visible { display: block; }
.catalog-toolbar-field select { width: 100%; padding: 0 0.55rem; }

.catalog-column-picker { position: relative; }
.catalog-column-picker summary {
  display: flex;
  min-width: 110px;
  align-items: center;
  justify-content: center;
  padding: 0 0.8rem;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}
.catalog-column-picker summary::-webkit-details-marker { display: none; }
.catalog-column-picker[open] summary { border-color: rgba(215, 25, 32, 0.35); color: var(--stock-accent-dark); }
.catalog-column-picker > div {
  position: absolute;
  z-index: 25;
  top: calc(100% + 0.45rem);
  right: 0;
  display: grid;
  width: 240px;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  border: 1px solid #d8d0ca;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.8rem;
  box-shadow: 0 18px 45px rgba(35, 24, 18, 0.16);
}
.catalog-column-picker > div > strong { margin-bottom: 0.25rem; font-size: 0.72rem; }
.catalog-required-columns {
  margin: -0.05rem 0 0.2rem;
  color: var(--stock-muted);
  font-size: 0.66rem;
  line-height: 1.4;
}
.catalog-column-picker label { display: flex; align-items: center; gap: 0.45rem; font-size: 0.72rem; }
.catalog-column-picker input { accent-color: var(--stock-accent); }

.catalog-reset-button {
  padding: 0 0.9rem;
  font-weight: 750;
  cursor: pointer;
}
.catalog-reset-button:hover { border-color: #b9ada4; background: #faf8f6; }

.catalog-active-filters {
  display: flex;
  overflow-x: auto;
  gap: 0.4rem;
  border-inline: 1px solid #ded7d2;
  background: #faf8f6;
  padding: 0.55rem 0.75rem;
}
.catalog-active-filters[hidden] { display: none; }
.catalog-active-filters span {
  flex: none;
  border: 1px solid #e0d8d2;
  border-radius: 999px;
  background: #fff;
  padding: 0.28rem 0.55rem;
  color: #5f5650;
  font-size: 0.64rem;
}

.catalog-table-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-inline: 1px solid #ded7d2;
  border-top: 1px solid #eee9e5;
  background: #f7f3ef;
  padding: 0.55rem 0.75rem;
  color: var(--stock-muted);
  font-size: 0.67rem;
}
.catalog-table-meta p { margin: 0; }
.catalog-table-meta p:first-child { color: #4b433e; font-weight: 750; }
.catalog-table-meta p:last-child { display: inline-flex; align-items: center; gap: 0.2rem; }
.catalog-table-meta p:last-child strong { color: #625952; font-size: inherit; }

.catalog-order-note {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  border-inline: 1px solid #ded7d2;
  border-top: 1px solid #eee8e3;
  background: #fffaf7;
  padding: 0.55rem 0.75rem;
  color: #6c625b;
  font-size: 0.68rem;
  line-height: 1.45;
}
.catalog-order-note strong { flex: none; color: #3f3732; }
.catalog-live-filter-dot {
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.25rem;
  border-radius: 999px;
  background: #a69c95;
}
.has-usable-quotes .catalog-live-filter-dot { background: var(--stock-positive); }
.has-partial-quotes .catalog-live-filter-dot { background: #b87510; }

.catalog-quote-controls-help {
  margin: 0;
  border: 1px solid #ded7d2;
  border-top: 0;
  background: #fbf9f7;
  padding: 0.55rem 0.75rem;
  color: var(--stock-muted);
  font-size: 0.67rem;
  line-height: 1.5;
}

.catalog-scroll-hint {
  display: none;
  margin: 0;
  border-right: 1px solid #d8d0ca;
  border-left: 1px solid #d8d0ca;
  background: #f6f2ef;
  padding: 0.45rem 0.7rem;
  color: var(--stock-muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.catalog-table-shell {
  width: 100%;
  overflow: auto;
  border: 1px solid #d8d0ca;
  border-radius: 0 0 0.9rem 0.9rem;
  background: #fff;
  box-shadow: 0 22px 65px rgba(45, 31, 22, 0.08);
  overscroll-behavior-inline: contain;
}
.catalog-table-shell:focus-visible {
  outline: 3px solid rgba(215, 25, 32, 0.28);
  outline-offset: 2px;
}

.catalog-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.75rem;
}

.global-stock-table-shell { max-height: min(78vh, 980px); }
.global-stock-table { min-width: 3600px; }
.global-stock-table [data-column="sector"] { min-width: 150px; }
.global-stock-table [data-column="industry"] { min-width: 210px; }
.global-stock-table [data-column="marketCap"],
.global-stock-table [data-column="enterpriseValue"] { min-width: 145px; }
.global-stock-table [data-column="week52"] { min-width: 190px; }

.catalog-table th,
.catalog-table td {
  box-sizing: border-box;
  border-right: 1px solid #ebe5e1;
  border-bottom: 1px solid #ebe5e1;
}
.catalog-table th:last-child,
.catalog-table td:last-child { border-right: 0; }
.catalog-table tbody tr:last-child td { border-bottom: 0; }

.catalog-table thead th {
  position: sticky;
  z-index: 7;
  top: 0;
  min-width: 105px;
  height: 42px;
  background: #f0ece8;
  padding: 0.45rem 0.55rem;
  color: #5c534d;
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.catalog-header-row th button {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.catalog-header-row th button.is-active { color: var(--stock-accent-dark); }
.catalog-header-row th button span { font-size: 0.7rem; }
.catalog-header-row th button:disabled {
  color: #9e958f;
  cursor: not-allowed;
}

.catalog-table .catalog-filter-row th {
  z-index: 6;
  top: 42px;
  height: 46px;
  background: #faf8f6;
  padding: 0.35rem;
}

.catalog-filter-row input,
.catalog-filter-row select,
.catalog-filter-row button {
  width: 100%;
  min-width: 76px;
  height: 31px;
  border: 1px solid #ddd5cf;
  border-radius: 0.4rem;
  outline: 0;
  background: #fff;
  padding: 0 0.4rem;
  color: #4a433e;
  font: inherit;
  font-size: 0.65rem;
}
.catalog-filter-row input:focus,
.catalog-filter-row select:focus { border-color: rgba(215, 25, 32, 0.55); box-shadow: 0 0 0 2px rgba(215, 25, 32, 0.08); }
.catalog-filter-row input:disabled,
.catalog-filter-row select:disabled,
.catalog-filter-row button:disabled { background: #f0ece9; color: #aaa19b; cursor: not-allowed; }
.catalog-range { display: grid; min-width: 140px; grid-template-columns: 1fr 1fr; gap: 0.25rem; }

.catalog-table td {
  height: 62px;
  max-width: 300px;
  background: #fff;
  padding: 0.55rem 0.65rem;
  color: #3d3733;
  vertical-align: middle;
  white-space: nowrap;
}
.catalog-table tbody tr:hover td { background: #faf7f4; }
.catalog-table .catalog-watch-column { min-width: 44px; width: 44px; text-align: center; }
.catalog-table .company-cell { min-width: 250px; }
.catalog-table .ticker-cell { min-width: 125px; }
.catalog-table [data-column="country"] { min-width: 145px; }
.catalog-table [data-column="exchange"] { min-width: 190px; }
.catalog-table [data-column="type"] { min-width: 145px; }
.catalog-table [data-column="source"] { min-width: 165px; }
.catalog-table [data-column="price"],
.catalog-table [data-column="change"],
.catalog-table [data-column="volume"] { min-width: 125px; }
.catalog-table [data-column="week52"] { min-width: 165px; }
.catalog-table [data-column="status"] { min-width: 135px; }
.catalog-table [data-column="updated"] { min-width: 150px; }
.catalog-table [data-column="open"] { min-width: 135px; }

.catalog-table .company-cell a,
.catalog-table .ticker-cell a,
.catalog-country-link { color: inherit; text-decoration: none; }
.catalog-table .company-cell a:hover strong,
.catalog-table .ticker-cell a:hover strong,
.catalog-country-link:hover { color: var(--stock-accent-dark); text-decoration: underline; text-underline-offset: 2px; }
.catalog-cell-main { font-size: 0.72rem; }
.catalog-source-link { color: var(--stock-accent-dark); font-size: 0.7rem; text-decoration: none; }
.catalog-source-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.catalog-cell-note { display: block; margin-top: 0.18rem; color: var(--stock-muted); font-size: 0.61rem; }
.catalog-table code { border-radius: 0.3rem; background: #f2efec; padding: 0.2rem 0.35rem; color: #514943; font-size: 0.66rem; }
.catalog-open-button {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7cfc9;
  border-radius: 0.48rem;
  background: #fff;
  padding: 0.42rem 0.55rem;
  color: #4a423d;
  font-size: 0.66rem;
  font-weight: 800;
  text-decoration: none;
}
.catalog-open-button:hover { border-color: rgba(215, 25, 32, 0.35); color: var(--stock-accent-dark); }

.catalog-table th.column-hidden,
.catalog-table td.column-hidden { display: none; }

.catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem 0;
}
.catalog-pagination button {
  min-height: 38px;
  border: 1px solid #d8d0ca;
  border-radius: 0.55rem;
  background: #fff;
  padding: 0 0.75rem;
  color: #4a433e;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 750;
  cursor: pointer;
}
.catalog-pagination button:hover:not(:disabled) { border-color: rgba(215, 25, 32, 0.35); color: var(--stock-accent-dark); }
.catalog-pagination button:disabled { opacity: 0.45; cursor: not-allowed; }
.catalog-pagination span { min-width: 95px; color: var(--stock-muted); font-size: 0.7rem; text-align: center; }
.catalog-method-note {
  margin: 0;
  border-left: 3px solid var(--stock-accent);
  background: #f8f5f2;
  padding: 0.75rem 0.9rem;
  color: var(--stock-muted);
  font-size: 0.7rem;
  line-height: 1.55;
}
.catalog-method-note + .catalog-method-note { margin-top: 0.45rem; }
.catalog-method-note a { color: var(--stock-accent-dark); font-weight: 800; text-underline-offset: 2px; }
.catalog-provider-attribution {
  margin: 0.55rem 0 0;
  padding: 0 0.9rem;
  color: var(--stock-muted);
  font-size: 0.68rem;
  line-height: 1.55;
}
.catalog-provider-attribution a {
  color: var(--stock-accent-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Country and company page framing */
.investment-subpage {
  min-height: 100vh;
  background: linear-gradient(180deg, #f7f3ef 0, #fffdfb 30rem, #fff 100%);
  color: var(--stock-ink);
}
.investment-subpage-hero {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1rem, 3vw, 2rem) 1.5rem;
}
.investment-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.2rem;
  color: var(--stock-muted);
  font-size: 0.7rem;
}
.investment-breadcrumbs a { color: inherit; text-decoration: none; }
.investment-breadcrumbs a:hover { color: var(--stock-accent-dark); }
.investment-subpage-hero h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.98;
}
.investment-subpage-hero > p:last-child {
  max-width: 820px;
  margin: 1rem 0 0;
  color: var(--stock-muted);
  line-height: 1.65;
}
.country-screener-section,
.stock-detail-section {
  width: 100%;
  padding: 0 clamp(0.5rem, 1.2vw, 1.5rem) 3rem;
}
.country-screener-unavailable {
  border: 1px solid #ded7d2;
  border-radius: 1rem;
  background: #fff;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 18px 50px rgba(45, 31, 22, 0.06);
}
.country-screener-unavailable h2 { margin: 0 0 0.5rem; font-size: 1.4rem; }
.country-screener-unavailable p { max-width: 850px; margin: 0; color: var(--stock-muted); font-size: 0.8rem; line-height: 1.6; }
.country-directory {
  width: 100%;
  padding: 0 clamp(0.5rem, 1.2vw, 1.5rem) 2.5rem;
}
.country-directory details {
  border: 1px solid #ded7d2;
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.85rem;
}
.country-directory summary { font-size: 0.78rem; font-weight: 800; cursor: pointer; }
.country-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 0.45rem;
  margin-top: 0.8rem;
}
.country-link-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border: 1px solid #e8e2dd;
  border-radius: 0.55rem;
  padding: 0.55rem 0.65rem;
  color: var(--stock-ink);
  font-size: 0.7rem;
  text-decoration: none;
}
.country-link-grid a:hover { border-color: rgba(215, 25, 32, 0.3); color: var(--stock-accent-dark); }
.country-link-grid span { color: var(--stock-muted); font-size: 0.6rem; }

.stock-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 1rem;
}
.stock-profile-card,
.stock-quote-card {
  border: 1px solid #ded7d2;
  border-radius: 1rem;
  background: #fff;
  padding: clamp(1rem, 2vw, 1.4rem);
  box-shadow: 0 18px 50px rgba(45, 31, 22, 0.06);
}
.stock-profile-card h2,
.stock-quote-card h2 { margin: 0 0 1rem; font-size: 1rem; }
.stock-fact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.stock-fact-grid div { border-top: 1px solid #ece7e3; padding-top: 0.55rem; }
.stock-fact-grid span { display: block; color: var(--stock-muted); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.06em; }
.stock-fact-grid strong { display: block; margin-top: 0.25rem; font-size: 0.8rem; }
.stock-fact-grid a { color: var(--stock-accent-dark); text-underline-offset: 2px; }
.stock-quote-price { margin: 0; font-size: clamp(1.8rem, 4vw, 3.2rem); font-weight: 900; letter-spacing: -0.05em; }
.stock-quote-change { margin: 0.25rem 0 0; font-size: 0.85rem; font-weight: 800; }
.stock-quote-time { margin: 0.85rem 0 0; color: var(--stock-muted); font-size: 0.7rem; line-height: 1.5; }
.stock-widget-section { margin-top: 1rem; overflow: hidden; border: 1px solid #ded7d2; border-radius: 1rem; background: #fff; }
.stock-widget-section .tradingview-widget-container { height: 520px !important; min-height: 520px; }
.stock-widget-section .tradingview-widget-container__widget { height: 488px !important; min-height: 488px; }
.native-market-chart {
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid #ded7d2;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 18px 50px rgba(45, 31, 22, 0.05);
}
.provider-market-chart {
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid #ded7d2;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 18px 50px rgba(45, 31, 22, 0.05);
}
.market-chart-range-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow-x: auto;
  border-bottom: 1px solid #ece7e3;
  background: #fbfaf9;
  padding: 0.55rem 1rem;
  scrollbar-width: thin;
}
.market-chart-range-label {
  flex: none;
  color: var(--stock-muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.market-chart-range-list {
  display: flex;
  flex: none;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.market-chart-range-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  min-height: 2.75rem;
  border: 1px solid #d9d2cd;
  border-radius: 0.55rem;
  background: #fff;
  color: #554d48;
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
}
.market-chart-range-link:hover { border-color: rgba(215, 25, 32, 0.45); color: var(--stock-accent-dark); }
.market-chart-range-link[aria-current="page"] {
  border-color: var(--stock-accent);
  background: var(--stock-accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(215, 25, 32, 0.18);
}
.market-chart-range-link:focus-visible { outline: 3px solid rgba(215, 25, 32, 0.28); outline-offset: 2px; }
.provider-market-chart-canvas {
  min-height: 420px;
  background: #fff;
}
.provider-market-chart-view-only {
  position: relative;
  overflow: hidden;
  user-select: none;
}
.provider-market-chart-view-only::after {
  position: absolute;
  z-index: 5;
  inset: 0;
  content: '';
}
.provider-market-chart-view-only > * { pointer-events: none !important; }
.provider-market-chart coingecko-coin-price-chart-widget {
  display: block;
  width: 100%;
  min-width: 100%;
  height: 420px;
  min-height: 420px;
}
.provider-market-chart-canvas > iframe {
  display: block;
  width: 100%;
  min-width: 100%;
  height: 452px;
  min-height: 452px;
  border: 0;
}
.provider-market-chart .tradingview-widget-container,
.provider-market-chart .tradingview-widget-container__widget,
.provider-market-chart .tradingview-widget-container iframe {
  display: block;
  width: 100% !important;
  min-width: 100%;
  height: 420px !important;
  min-height: 420px;
}
.provider-market-chart-image {
  display: grid;
  place-items: center;
  padding: 1rem;
}
.provider-market-chart-image img {
  display: block;
  width: min(100%, 900px);
  height: auto;
  max-height: 480px;
  object-fit: contain;
}
.provider-market-chart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid #ece7e3;
  padding: 0.75rem 1rem;
  color: var(--stock-muted);
  font-size: 0.68rem;
  line-height: 1.5;
}
.provider-market-chart-footer a {
  color: var(--stock-accent-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.native-market-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #ece7e3;
  padding: 1rem 1.2rem;
}
.native-market-chart-header h2 { margin: 0.15rem 0 0; font-size: 1rem; }
.native-market-chart-header > p { max-width: 440px; margin: 0; color: var(--stock-muted); font-size: 0.68rem; text-align: right; }
.native-market-chart-canvas { overflow-x: auto; padding: 0.8rem 0.7rem 0; }
.native-market-chart-canvas svg { display: block; min-width: 720px; width: 100%; height: auto; }
.native-market-grid-line { stroke: #ece7e3; stroke-width: 1; }
.native-market-axis-label { fill: #786f69; font-size: 12px; }
.native-market-line { fill: none; stroke: #d71920; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }
.native-market-last-point { fill: #fff; stroke: #d71920; stroke-width: 4; }
.native-market-chart-summary { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #ece7e3; }
.native-market-chart-summary span { padding: 0.75rem 1rem; color: var(--stock-muted); font-size: 0.68rem; text-align: center; }
.native-market-chart-summary span + span { border-left: 1px solid #ece7e3; }
.native-market-chart-summary strong { display: block; margin-top: 0.15rem; color: var(--stock-ink); font-size: 0.85rem; }
.native-market-chart-empty { display: flex; flex-direction: column; gap: 0.25rem; padding: 2.25rem 1.2rem; text-align: center; }
.native-market-chart-empty strong { font-size: 0.9rem; }
.native-market-chart-empty span { color: var(--stock-muted); font-size: 0.7rem; }
.crypto-detail-hero > img { width: 3.5rem; height: 3.5rem; margin-bottom: 1rem; border-radius: 999px; object-fit: cover; }
.crypto-detail-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-top: 1rem; }
.crypto-detail-range span { border-top: 1px solid #ece7e3; padding-top: 0.55rem; color: var(--stock-muted); font-size: 0.65rem; }
.crypto-detail-range strong { display: block; margin-top: 0.2rem; color: var(--stock-ink); font-size: 0.8rem; }
.stock-page-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.stock-page-links a { border: 1px solid #d7cfc9; border-radius: 0.55rem; background: #fff; padding: 0.55rem 0.75rem; color: #443d38; font-size: 0.72rem; font-weight: 750; text-decoration: none; }
.stock-page-links a:hover { border-color: rgba(215, 25, 32, 0.35); color: var(--stock-accent-dark); }

@media (max-width: 900px) {
  .catalog-heading-row { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .catalog-scope-badge { min-width: 0; }
  .catalog-toolbar { grid-template-columns: minmax(0, 1fr) 90px; }
  .catalog-search-field { grid-column: 1 / -1; }
  .catalog-table-meta { align-items: flex-start; flex-direction: column; gap: 0.25rem; }
  .catalog-order-note { align-items: flex-start; flex-direction: column; gap: 0.2rem; }
  .catalog-scroll-hint { display: block; }
  .stock-profile-grid { grid-template-columns: 1fr; }
  .native-market-chart-header { flex-direction: column; }
  .native-market-chart-header > p { text-align: left; }
  .provider-market-chart-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .catalog-toolbar { grid-template-columns: 1fr 1fr; }
  .catalog-search-field,
  .catalog-reset-button { grid-column: 1 / -1; }
  .catalog-pagination button[data-page="first"],
  .catalog-pagination button[data-page="last"] { display: none; }
  .catalog-pagination button { padding-inline: 0.55rem; }
  .stock-fact-grid { grid-template-columns: 1fr; }
  .native-market-chart-summary { grid-template-columns: 1fr; }
  .native-market-chart-summary span + span { border-top: 1px solid #ece7e3; border-left: 0; }
  .market-chart-range-nav { align-items: flex-start; flex-direction: column; gap: 0.4rem; }
}
