/* ============================================================
   NEPSE Technical — Nepse Decode editorial theme (2026-10-05)
   Matches the /nepse-ipo/ tracker design language: small-caps lime
   kicker, serif display headline, stat cards, pill tabs/buttons,
   generous spacing. Uses --nd-* tokens from nd-tokens.css.
   Light mode via [data-theme="light"] (this page toggles data-theme);
   dark mode is the token default. The d2 sidebar shell is untouched.
   ============================================================ */

/* The shared sidebar script injects a .nav-sub span (Momentum / Trend Relay /
   Reversal) into the mobile nav; without this its links wrap and collide.
   Scoped here so other pages are untouched. */
.d2-mobilenav .nav-sub { display: inline-flex; gap: 8px; flex: none; align-items: center; }

/* ---- Page canvas (explicit: never depend on the browser default, which
   color-scheme: dark would paint dark) ---- */
body {
  background: var(--nd-bg, #F6F7F9);
  color: var(--nd-text, #0A0C10);
}

.nt-wrap {
  max-width: var(--nd-page-max, 1360px);
  margin: 0 auto;
  padding: 0 var(--nd-gutter, 24px) var(--nd-s16, 64px);
  animation: ntFadeIn .5s ease both;
}@keyframes ntFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.nt-badge-row { display: flex; justify-content: center; margin-bottom: 14px; }

/* ---- Skip link: visually hidden until keyboard focus ---- */
.skip-link {
  position: absolute; left: 16px; top: -80px; z-index: 5000;
  background: var(--nd-lime, #B8E62E); color: #0a0d12;
  font-size: 14px; font-weight: 700;
  padding: 10px 18px; border-radius: 10px; text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }
[data-theme="light"] .skip-link { background: #4D7C0F; color: #fff; }

/* ---- Dividend FY tag ---- */
.nt-fy {
  font-size: .68rem; font-weight: 600;
  color: var(--nd-dim, #6B7280);
  border: 1px solid var(--nd-border, #1E2430);
  border-radius: 6px; padding: 1px 6px; margin-left: 6px;
  white-space: nowrap; vertical-align: 1px;
}

/* ---- Dividend marker key ---- */
.nt-divkey {
  font-size: .78rem; color: var(--nd-dim, #6B7280);
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: auto;
}
.nt-divkey i {
  font-style: normal; font-weight: 700; font-size: .68rem;
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #0A0C10;
}
.nt-divkey .nt-dk-d { background: #A3D614; }
.nt-divkey .nt-dk-bc { background: #F59E0B; width: auto; padding: 0 6px; border-radius: 10px; }

/* ---- Masthead ---- */
.nt-kicker {
  font: 600 var(--nd-text-eyebrow, .6875rem) var(--nd-font-sans, system-ui);
  letter-spacing: .22em; text-transform: uppercase; color: var(--nd-lime, #B8E62E);
  margin: var(--nd-s8, 32px) 0 var(--nd-s3, 12px);
}
.nt-wrap h1 {
  font-family: var(--nd-font-display, Georgia, serif); font-weight: 700;
  font-size: clamp(1.9rem, 1.9rem + 1vw, 2.6rem);
  letter-spacing: -.02em; color: var(--nd-text, #fff); margin: 0 0 var(--nd-s3, 12px);
  line-height: 1.15;
}
.nt-lede {
  max-width: 72ch; color: var(--nd-muted, #9AA3B2);
  font-size: 1rem; line-height: 1.75; margin: 0 0 var(--nd-s6, 24px);
}

/* ---- Search card ---- */
.nt-search {
  background: var(--nd-panel, #12141A); border: 1px solid var(--nd-border, #1E2430);
  border-radius: var(--nd-r-card, 18px); padding: 20px;
  margin-bottom: var(--nd-s6, 24px);
}
.nt-search-row { display: flex; gap: 10px; }
.nt-search-row input {
  flex: 1; min-width: 0;
  background: var(--nd-inset, #0D0F14); border: 1px solid var(--nd-border, #1E2430);
  border-radius: var(--nd-r-md, 12px); color: var(--nd-text, #fff);
  padding: 10px 16px; font-size: var(--nd-text-body, .875rem);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.nt-search-row input::placeholder { color: var(--nd-dim, #6B7280); }
.nt-search-row input:focus {
  outline: none; border-color: var(--nd-lime, #B8E62E);
  box-shadow: 0 0 0 3px var(--nd-lime-soft, rgba(184,230,46,.12));
}
.nt-go {
  appearance: none; cursor: pointer; flex: none;
  border: 1px solid var(--nd-lime, #B8E62E); background: var(--nd-lime, #B8E62E);
  color: var(--nd-on-lime, #0A0C10); border-radius: var(--nd-r-pill, 999px);
  padding: 10px 22px;
  font: 600 var(--nd-text-body, .875rem) var(--nd-font-sans, system-ui);
  white-space: nowrap; transition: all .2s ease;
}
.nt-go:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(184,230,46,.3); }
.nt-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.nt-chips button {
  appearance: none; cursor: pointer;
  border: 1px solid var(--nd-border, #1E2430); background: var(--nd-panel, #12141A);
  color: var(--nd-muted, #9AA3B2); border-radius: var(--nd-r-pill, 999px);
  padding: 8px 16px;
  font: 600 .8125rem var(--nd-font-sans, system-ui);
  transition: all .2s ease; white-space: nowrap;
}
.nt-chips button:hover {
  border-color: var(--nd-lime, #B8E62E); color: var(--nd-text, #fff);
  transform: translateY(-1px);
}
.nt-chips button.on {
  background: var(--nd-lime, #B8E62E); border-color: var(--nd-lime, #B8E62E);
  color: var(--nd-on-lime, #0A0C10);
}

/* ---- Toolbar: pill buttons ---- */
.nt-tools {
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
  margin: 0 0 var(--nd-s4, 16px);
}
.nt-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.nt-seg button {
  appearance: none; cursor: pointer;
  border: 1px solid var(--nd-border, #1E2430); background: var(--nd-panel, #12141A);
  color: var(--nd-muted, #9AA3B2); border-radius: var(--nd-r-pill, 999px);
  padding: 8px 14px;
  font: 600 .8125rem var(--nd-font-sans, system-ui);
  font-variant-numeric: tabular-nums;
  transition: all .2s ease; white-space: nowrap;
}
.nt-seg button:hover { border-color: var(--nd-lime, #B8E62E); color: var(--nd-text, #fff); }
.nt-seg button.on {
  background: var(--nd-lime, #B8E62E); border-color: var(--nd-lime, #B8E62E);
  color: var(--nd-on-lime, #0A0C10);
  box-shadow: 0 4px 16px rgba(184,230,46,.3);
}
.nt-ov { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nt-ov-title {
  font-size: var(--nd-text-meta, .6875rem); text-transform: uppercase;
  letter-spacing: .08em; color: var(--nd-dim, #6B7280); margin-right: 2px;
}
.nt-ovl {
  appearance: none; cursor: pointer;
  border: 1px solid var(--nd-border, #1E2430); background: transparent;
  color: var(--nd-dim, #6B7280); border-radius: var(--nd-r-pill, 999px);
  padding: 6px 14px;
  font: 600 .75rem var(--nd-font-sans, system-ui); letter-spacing: .04em;
  transition: all .2s ease; white-space: nowrap;
}
.nt-ovl:hover { border-color: var(--nd-border-strong, #2A3140); color: var(--nd-text, #fff); }
.nt-ovl[aria-pressed="true"] {
  background: var(--nd-panel-2, #161A23); border-color: var(--nd-lime, #B8E62E);
  color: var(--nd-lime, #B8E62E);
}
.nt-ovl:disabled { opacity: .35; cursor: not-allowed; }

/* ---- Two-column layout: fundamentals + chart (Merolagani-style) ---- */
.nt-cols {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  margin-bottom: var(--nd-s6, 24px);
  align-items: start;
}
.nt-fund {
  background: var(--nd-panel, #12141A);
  border: 1px solid var(--nd-border, #1E2430);
  border-radius: var(--nd-r-card, 18px);
  overflow: hidden;
  position: sticky;
  top: 76px;
}
.nt-fund-head {
  background: var(--nd-lime, #B8E62E);
  color: var(--nd-on-lime, #0A0C10);
  font: 700 .95rem var(--nd-font-sans, system-ui);
  padding: 12px 18px;
  line-height: 1.4;
}
[data-theme="light"] .nt-fund-head { background: #4D7C0F; color: #fff; }
.nt-fund-table { margin: 0; padding: 0; }
.nt-frow {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; padding: 10px 18px;
  border-bottom: 1px solid var(--nd-border, #1E2430);
  font-size: .875rem;
}
.nt-frow:last-child { border-bottom: none; }
.nt-frow dt {
  color: var(--nd-text, #fff); font-weight: 600; flex: none;
  font-size: .85rem;
}
.nt-frow dd {
  margin: 0; text-align: right;
  font-family: var(--nd-font-mono, monospace);
  font-variant-numeric: tabular-nums;
  color: var(--nd-muted, #9AA3B2);
  font-size: .85rem;
  overflow-wrap: anywhere;
}
.nt-frow dd.up { color: var(--nd-up, #4ADE80); font-weight: 700; }
.nt-frow dd.down { color: var(--nd-down, #F87171); font-weight: 700; }
.nt-frow dd.strong { color: var(--nd-text, #fff); font-weight: 700; }

/* ---- Chart card (right column) ---- */
.nt-card {
  background: var(--nd-panel, #12141A); border: 1px solid var(--nd-border, #1E2430);
  border-radius: var(--nd-r-card, 18px); padding: 18px;
  margin-bottom: 0; position: relative;
  min-width: 0;
}
/* Merolagani-style two-line legend */
.nt-legend {
  display: block;
  font-size: 13.5px; color: var(--nd-muted, #9AA3B2);
  margin-bottom: 10px; min-height: 44px; line-height: 1.5;
}
.nt-lg-line1 { display: block; margin-bottom: 2px; }
.nt-lg-line2 { display: block; font-family: var(--nd-font-mono, monospace); font-size: 12.5px; }
.nt-lg-sym { font-weight: 700; color: var(--nd-text, #fff); font-size: 15px; }
.nt-lg-date { font-family: var(--nd-font-mono, monospace); font-size: 12px; color: var(--nd-dim, #6B7280); margin-left: 8px; }
.nt-lg-ohlc { color: var(--nd-muted, #9AA3B2); }
.nt-lg-ohlc b {
  color: var(--nd-text, #fff); font-weight: 600;
}
.nt-lg-chg { font-weight: 600; margin-left: 8px; }
.nt-lg-chg.up { color: var(--nd-up, #4ADE80); }
.nt-lg-chg.down { color: var(--nd-down, #F87171); }
.nt-lg-chg.flat { color: var(--nd-muted, #9AA3B2); }

/* ---- Moving-average stats (below columns) ---- */
.nt-stats-ma { grid-template-columns: repeat(3, 1fr); max-width: 640px; }
.nt-live {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #fff;
  background: var(--nd-up, #4ADE80); border-radius: 4px; padding: 2px 8px;
}
[data-theme="light"] .nt-live { color: #fff; }

#nt-chart { width: 100%; height: 480px; position: relative; }
#nt-chart.loading::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(128,128,128,.12) 50%, transparent 70%);
  background-size: 200% 100%; animation: nt-shimmer 1.2s infinite;
  border-radius: 6px; pointer-events: none;
}
@keyframes nt-shimmer { to { background-position: -200% 0; } }
.nt-spinner {
  text-align: center; color: var(--nd-dim, #6B7280);
  font-size: 14px; padding: 18px 0 4px;
}
.nt-session {
  font-family: var(--nd-font-mono, monospace); font-size: var(--nd-text-meta, .6875rem);
  color: var(--nd-muted, #9AA3B2); margin: 12px 2px 0;
  display: flex; align-items: center; gap: 8px;
}
.nt-session::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--nd-lime, #B8E62E); flex: none;
  animation: ntPulse 2s ease-in-out infinite;
}
@keyframes ntPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.8); }
}
.nt-flag {
  font-size: 13px; color: var(--nd-text, #fff);
  background: var(--nd-chip-closed-bg, rgba(245,179,1,.12));
  border: 1px solid var(--nd-amber, #F5B301);
  border-radius: var(--nd-r-md, 12px); padding: 10px 14px; margin-top: 12px;
}

/* ---- Stats row ---- */
.nt-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin-bottom: var(--nd-s8, 32px);
}
.nt-stat {
  background: var(--nd-panel, #12141A); border: 1px solid var(--nd-border, #1E2430);
  border-radius: var(--nd-r-card, 18px); padding: 16px 18px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.nt-stat:hover {
  transform: translateY(-2px); border-color: var(--nd-lime, #B8E62E);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.nt-stat .k {
  display: block; font-size: var(--nd-text-meta, .6875rem); color: var(--nd-dim, #6B7280);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px;
}
.nt-stat .v {
  font: 700 1.5rem var(--nd-font-mono, monospace); color: var(--nd-text, #fff);
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
.nt-stat .v.up { color: var(--nd-up, #4ADE80); }
.nt-stat .v.down { color: var(--nd-down, #F87171); }

/* ---- Notes card ---- */
.nt-notes {
  padding: var(--nd-s6, 24px);
  border: 1px solid var(--nd-border, #1E2430); border-radius: var(--nd-r-card, 18px);
  background: linear-gradient(135deg, var(--nd-panel-2, #161A23), var(--nd-panel, #12141A));
  color: var(--nd-muted, #9AA3B2);
  font-size: var(--nd-text-body-sm, .8125rem); line-height: 1.8;
  position: relative; overflow: hidden;
}
.nt-notes::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--nd-lime, #B8E62E), transparent);
}
.nt-notes h2 {
  font-family: var(--nd-font-display, Georgia, serif); font-weight: 600;
  font-size: 1.1rem; color: var(--nd-text, #fff); margin: 0 0 10px;
  letter-spacing: -.01em;
}
.nt-notes p { margin: 0 0 12px; }
.nt-notes a { color: var(--nd-lime, #B8E62E); }
.nt-notes .fine { font-size: 12.5px; color: var(--nd-muted, #9AA3B2); }
.nt-faq { margin-top: 20px; }
.nt-faq details { border-top: 1px solid var(--nd-border, #1E2430); padding: 12px 0; }
.nt-faq details:last-child { border-bottom: 1px solid var(--nd-border, #1E2430); }
.nt-faq summary {
  cursor: pointer; font-weight: 600; color: var(--nd-text, #fff); font-size: 14.5px;
}
.nt-faq details p { margin: 8px 0 2px; font-size: 14px; }

/* ---- Light theme: remap nd tokens for this page's content ---- */
[data-theme="light"] .nt-wrap {
  --nd-bg: #F6F7F9;
  --nd-panel: #FFFFFF;
  --nd-panel-2: #EFF1F5;
  --nd-inset: #EDEFF3;
  --nd-border: #E2E6EC;
  --nd-border-strong: #CBD2DC;
  --nd-lime: #4D7C0F;
  --nd-lime-soft: rgba(77, 124, 15, 0.1);
  --nd-lime-faint: rgba(77, 124, 15, 0.05);
  --nd-on-lime: #FFFFFF;
  --nd-amber: #B45309;
  --nd-text: #0A0C10;
  --nd-muted: #4B5563;
  --nd-dim: #8A94A3;
  --nd-up: #15803D;
  --nd-down: #DC2626;
  --nd-chip-closed-bg: rgba(180, 83, 9, 0.12);
}
[data-theme="light"] .nt-go:hover,
[data-theme="light"] .nt-seg button.on,
[data-theme="light"] .nt-chips button.on { box-shadow: 0 4px 14px rgba(77, 124, 15, .25); }
[data-theme="light"] .nt-stat:hover { box-shadow: 0 8px 20px rgba(10, 12, 16, .08); }
[data-theme="light"] .nt-notes a { color: #4D7C0F; }

/* ---- Mobile ---- */
@media (max-width: 960px) {
  .nt-cols { grid-template-columns: 1fr; }
  .nt-fund { position: static; }
}
@media (max-width: 640px) {
  .nt-wrap { padding-left: 16px; padding-right: 16px; }
  .nt-wrap h1 { font-size: 1.6rem; }
  .nt-stats { grid-template-columns: repeat(2, 1fr); }
  .nt-stats-ma { grid-template-columns: repeat(3, 1fr); }
  #nt-chart { height: 360px; }
  .nt-search-row { flex-direction: column; }
  .nt-card { padding: 12px; }
  .nt-notes { padding: 20px 16px; }
}

/* ============================================================
 * Premium 3D layer — technical charts
 * ============================================================ */
.nt-card{
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0) 35%), var(--nd-panel, #12141A);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 2px 6px rgba(0,0,0,.4), 0 16px 40px rgba(0,0,0,.35);
}
.nt-go{
  background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,0) 45%), var(--nd-lime, #B8E62E);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
  transition: transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s, filter .2s;
}
.nt-go:hover{
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 10px rgba(0,0,0,.45), 0 4px 16px rgba(184,230,46,.3), 0 16px 36px rgba(0,0,0,.35);
}
.nt-go:active{ transform: translateY(1px) scale(.98); box-shadow: inset 0 2px 5px rgba(0,0,0,.25); }
.nt-chips button{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0) 50%), var(--nd-panel-2, #161A23);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 1px 3px rgba(0,0,0,.35);
  transition: transform .18s cubic-bezier(.22,1,.36,1), box-shadow .18s;
}
.nt-chips button:hover{ transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 3px 8px rgba(0,0,0,.4); }
.nt-chips button:active{ transform: translateY(1px) scale(.97); }
.nt-search-row input{
  box-shadow: inset 0 2px 6px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.03);
}
.nt-search-row input:focus{
  box-shadow: inset 0 2px 6px rgba(0,0,0,.3), 0 0 0 3px var(--nd-lime-soft, rgba(184,230,46,.12));
}
.nt-live{
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 3px rgba(0,0,0,.35);
}
.nt-flag{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0) 40%), var(--nd-chip-closed-bg, rgba(245,179,1,.12));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 1px 2px rgba(0,0,0,.35), 0 6px 18px rgba(0,0,0,.25);
}
@media (prefers-reduced-motion: reduce){
  .nt-go, .nt-chips button{ transition: none; }
  .nt-go:hover, .nt-chips button:hover{ transform: none; }
}

/* Skip link: visually hidden until keyboard-focused (a11y best practice) */
.skip-link{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;z-index:9999;background:var(--nd-lime,#B8E62E);color:#0A0C10;padding:10px 18px;border-radius:8px;font-weight:700;text-decoration:none}
.skip-link:focus,.skip-link:active{left:12px;top:12px;width:auto;height:auto;overflow:visible}

/* ============================================================
 * CINEMA harmonization (2026-10-23) — Spectral stat numerals +
 * price-position strip: last close vs SMA 20/50/200 on one axis,
 * markers in the chart's own overlay colours.
 * ============================================================ */
.nt-stat .v{ font-family:var(--nd-font-display,"Spectral",Georgia,serif); font-weight:600; letter-spacing:-.01em; }
.nt-pos{ margin:-12px 0 var(--nd-s8,32px); background:var(--nd-panel,#12141A); border:1px solid var(--nd-border,#1E2430); border-radius:var(--nd-r-card,18px); padding:16px 18px 12px; }
.nt-pos[hidden]{ display:none; }
.nt-pos-track{ position:relative; height:26px; border-radius:999px; background:var(--nd-inset,#0D0F14); border:1px solid var(--nd-border,#1E2430); }
.nt-pos-mk{ position:absolute; top:50%; width:11px; height:11px; border-radius:50%; transform:translate(-50%,-50%); border:2px solid #0A0C10; }
.nt-pos-mk.s20{ background:#4C9AFF; } .nt-pos-mk.s50{ background:#FFAB00; } .nt-pos-mk.s200{ background:#C377E0; }
.nt-pos-mk.close{ background:#B8E62E; border-radius:3px; transform:translate(-50%,-50%) rotate(45deg); width:12px; height:12px; z-index:2; }
.nt-pos-legend{ display:flex; flex-wrap:wrap; gap:6px 18px; margin-top:10px; font-size:.75rem; color:var(--nd-muted,#B8C0CE); font-variant-numeric:tabular-nums; }
.nt-pos-legend b{ display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; }
.nt-pos-legend .s20{ background:#4C9AFF; } .nt-pos-legend .s50{ background:#FFAB00; } .nt-pos-legend .s200{ background:#C377E0; }
.nt-pos-legend .close{ background:#B8E62E; border-radius:2px; }
[data-theme="light"] .nt-pos-mk{ border-color:#fff; }
[data-theme="light"] .nt-pos-mk.s20, [data-theme="light"] .nt-pos-legend .s20{ background:#1D6FD1; }
[data-theme="light"] .nt-pos-mk.s50, [data-theme="light"] .nt-pos-legend .s50{ background:#C77E00; }
[data-theme="light"] .nt-pos-mk.s200, [data-theme="light"] .nt-pos-legend .s200{ background:#8E44AD; }
[data-theme="light"] .nt-pos-mk.close, [data-theme="light"] .nt-pos-legend .close{ background:#65A30D; }
[data-theme="light"] .nt-pos-track{ background:#F3F4F6; }

/* ============================================================
 * FULL RE-TEARDOWN (2026-10-27) — canvas pin, 48px controls,
 * enlarged stats/strip/fundamentals, sector peers, freshness line.
 * Appended last in the last-loaded sheet so every rule here wins
 * ties against shared sheets.
 * ============================================================ */

/* ---- Page canvas, theme-scoped (overview values) ----
   The plain `body` pin above (specificity 0,0,1) loses to theme.css
   `[data-theme="dark"] body.nd` (0,2,1). This pin matches that
   specificity and, as the later sheet, wins: dark #0A0C10,
   light #F6F7F9, both straight from --nd-bg. */
[data-theme="dark"] body.nd, [data-theme="light"] body.nd { background: var(--nd-bg); }

/* ---- 48px control treatment ----
   Every interactive control on the page is at least 48px tall:
   search input, Open chart, quick chips, chart-type buttons,
   overlay toggles, peers pager. One shared focus-visible ring. */
.nt-search-row input {
  min-height: 48px; box-sizing: border-box;
  padding: 12px 16px; font-size: 1rem;
}
.nt-go {
  min-height: 48px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 24px;
  font-size: .9375rem;
}
.nt-chips button {
  min-height: 48px; display: inline-flex; align-items: center;
  padding: 0 18px; font-size: .875rem;
}
.nt-seg button {
  min-height: 48px; display: inline-flex; align-items: center;
  padding: 0 16px; font-size: .875rem;
}
.nt-ovl {
  min-height: 48px; display: inline-flex; align-items: center;
  padding: 0 16px; font-size: .8125rem;
}
.nt-go:focus-visible, .nt-chips button:focus-visible, .nt-seg button:focus-visible,
.nt-ovl:focus-visible, .nt-peer:focus-visible,
.nt-pg-prev:focus-visible, .nt-pg-next:focus-visible {
  outline: 2px solid var(--nd-lime, #B8E62E); outline-offset: 2px;
}

/* ---- Larger fundamentals values ---- */
.nt-fund-head { font-size: 1rem; padding: 13px 18px; }
.nt-frow { padding: 12px 18px; }
.nt-frow dt { font-size: .9rem; }
.nt-frow dd { font-size: .95rem; }

/* ---- Enlarged MA stats (Spectral numerals kept) ---- */
.nt-stat { padding: 18px 20px; }
.nt-stat .v { font-size: 1.9rem; }

/* ---- Bigger position strip, clearer markers + legend ---- */
.nt-pos { padding: 18px 20px 14px; }
.nt-pos-track { height: 34px; }
.nt-pos-mk { width: 14px; height: 14px; border-width: 2px; }
.nt-pos-mk.close { width: 15px; height: 15px; }
.nt-pos-legend { font-size: .85rem; }
.nt-pos-legend b { width: 10px; height: 10px; }

/* ---- Chart freshness line (page-owned; distinct from the shared
   session badge in the chrome header) ---- */
.nt-fresh {
  font-family: var(--nd-font-mono, monospace); font-size: var(--nd-text-meta, .6875rem);
  color: var(--nd-muted, #9AA3B2); margin: 12px 2px 0;
}
.nt-fresh .fail { color: var(--nd-down, #F87171); font-weight: 700; }

/* ---- Sector peers block (directly under the fundamentals panel) ---- */
.nt-peers { margin-bottom: var(--nd-s8, 32px); }
.nt-peers[hidden] { display: none; }
.nt-peers-head h2 {
  font-family: var(--nd-font-display, Georgia, serif); font-weight: 700;
  font-size: 1.35rem; letter-spacing: -.01em; color: var(--nd-text, #fff);
  margin: 0 0 4px;
}
.nt-peers-meta {
  font-family: var(--nd-font-mono, monospace); font-size: var(--nd-text-meta, .6875rem);
  color: var(--nd-muted, #9AA3B2); margin: 0 0 14px;
}
.nt-peers-open {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--nd-panel, #12141A); border: 1px solid var(--nd-lime, #B8E62E);
  border-radius: var(--nd-r-card, 18px); padding: 14px 18px; margin-bottom: 12px;
}
.nt-peer-tag {
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: var(--nd-lime, #B8E62E); color: var(--nd-on-lime, #0A0C10);
  border-radius: 999px; padding: 2px 10px;
}
.nt-peers-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.nt-peer {
  appearance: none; cursor: pointer; text-align: left;
  background: var(--nd-panel, #12141A); border: 1px solid var(--nd-border, #1E2430);
  border-radius: var(--nd-r-card, 18px); padding: 14px 16px; min-height: 76px;
  display: flex; flex-direction: column; gap: 3px;
  transition: transform .2s ease, border-color .2s ease;
}
.nt-peer:hover { transform: translateY(-2px); border-color: var(--nd-lime, #B8E62E); }
.nt-peer-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.nt-peer-sym { font-weight: 700; color: var(--nd-text, #fff); font-size: .95rem; }
.nt-peer-name {
  color: var(--nd-muted, #9AA3B2); font-size: .8rem; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nt-peer-close {
  font-family: var(--nd-font-display, Georgia, serif); font-weight: 600;
  font-size: 1.25rem; color: var(--nd-text, #fff); font-variant-numeric: tabular-nums;
}
.nt-peer-chg { font-family: var(--nd-font-mono, monospace); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.nt-peer-chg.up { color: var(--nd-up, #4ADE80); }
.nt-peer-chg.down { color: var(--nd-down, #F87171); }
.nt-peer-chg.flat { color: var(--nd-muted, #9AA3B2); }
.nt-peers-empty { color: var(--nd-muted, #9AA3B2); font-size: .9rem; margin: 4px 0 0; }
.nt-peers-pager { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.nt-peers-pager[hidden] { display: none; }
.nt-pg-prev, .nt-pg-next {
  appearance: none; cursor: pointer; min-height: 48px;
  display: inline-flex; align-items: center; padding: 0 20px;
  border-radius: var(--nd-r-pill, 999px);
  font: 600 .875rem var(--nd-font-sans, system-ui); white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease;
}
.nt-pg-prev {
  border: 1px solid var(--nd-border, #1E2430); background: var(--nd-panel, #12141A);
  color: var(--nd-muted, #9AA3B2);
}
.nt-pg-next {
  border: 1px solid var(--nd-lime, #B8E62E); background: var(--nd-lime, #B8E62E);
  color: var(--nd-on-lime, #0A0C10);
}
.nt-pg-prev:disabled, .nt-pg-next:disabled { opacity: .35; cursor: not-allowed; }
.nt-pg-count {
  font-family: var(--nd-font-mono, monospace); font-size: .8rem; color: var(--nd-muted, #9AA3B2);
}

/* ---- Reduced motion: the single .nt-wrap entrance goes too ---- */
@media (prefers-reduced-motion: reduce) {
  .nt-wrap { animation: none; }
}
