/* Stock watch (the main screen), heatmap, compare and the Dalal side drawer. Same structure as our Confluence Desk /
   Discovery Desk main pages; colours and type are the look kit tokens (look_kit.css). */

/* ---------------------------------------------------------------- the top bar, terminal style */
.top { background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(1.2) blur(14px); -webkit-backdrop-filter: saturate(1.2) blur(14px); }
.top-in { max-width: none; padding: 8px 18px; gap: 16px; }
.topnav a { font: var(--fw-med) var(--fs-md) var(--sans); padding: 9px 10px; border-radius: 0; color: var(--muted); }
.topnav a:hover { background: transparent; color: var(--ink); }
.topnav a .ic { width: 15px; height: 15px; }
.logo rect:first-child { fill: #121613; stroke: rgba(103, 232, 165, .35); }
[data-theme="light"] .logo rect:first-child { fill: #1F4D3A; stroke: none; }
#themeBtn { flex: none; margin-left: auto; }
#themeBtn + .me-wrap { margin-left: 0; }

/* ---------------------------------------------------------------- the full-height screen */
body.term { overflow: hidden; }
body.term main { max-width: none; padding: 0; min-height: 0; }
body.term .foot { display: none; }
.tw { display: grid; grid-template-columns: 350px minmax(0, 1fr); height: calc(100dvh - var(--top-h, 57px)); }

.tw-left { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--bg-2); }
.tw-pick { padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); }
.tw-pick select, .tw-pick input, .tw-find input { width: 100%; height: 34px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); padding: 0 10px; font-size: var(--fs-sm); color: var(--ink); }
.tw-pick select optgroup { font-style: normal; color: var(--muted); }
.tw-pick select option { color: var(--ink); background: var(--surface); }
.tw-find { position: relative; }
.tw-find input { padding-right: 34px; }
.tw-find kbd { position: absolute; right: 8px; top: 7px; font: var(--fw-med) var(--fs-2xs)/18px var(--mono); padding: 0 6px; border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--faint); }
.tw-ac { position: absolute; top: 38px; left: 0; right: 0; background: var(--raise); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow); z-index: 50; max-height: 340px; overflow-y: auto; }
.tw-ac div { padding: 8px 12px; cursor: pointer; font-size: var(--fs-sm); color: var(--ink); }
.tw-ac div:hover, .tw-ac div.on { background: var(--surface-2); }
.tw-ac div small { color: var(--accent); font-family: var(--mono); margin-left: 8px; }
.tw-about { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }
.tw-head, .tw-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px 62px 72px; gap: 6px; align-items: center; padding: 0 12px; }
.tw-head { height: 30px; font: var(--fw-med) var(--fs-2xs)/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line); }
.tw-head span { cursor: pointer; user-select: none; }
.tw-head span.r { text-align: right; }
.tw-head span.on { color: var(--accent); }
.tw-list { flex: 1; overflow-y: auto; outline: 0; }
.tw-row { height: 38px; border-bottom: 1px solid var(--line); cursor: pointer; font: var(--fw-reg) var(--fs-sm)/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.tw-row:hover { background: var(--surface); }
.tw-row.sel { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.tw-row .s { font: var(--fw-med) var(--fs-sm)/1.2 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.tw-row .s small { display: block; font: var(--fw-reg) var(--fs-2xs)/1.25 var(--sans); color: var(--faint); overflow: hidden; text-overflow: ellipsis; }
.tw-row .r { text-align: right; white-space: nowrap; }
.tw-row .m { color: var(--muted); }
.tw-row .up, .tw-strip .up { color: var(--pos); }
.tw-row .down, .tw-strip .down { color: var(--neg); }
.wl-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--sand); margin: 0 6px 1px 0; vertical-align: middle; }
.tw-foot { min-height: 30px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 12px; font: var(--fw-reg) var(--fs-2xs)/1.3 var(--mono); color: var(--faint); border-top: 1px solid var(--line); }
.tw-empty { padding: 40px 24px; color: var(--muted); font-size: var(--fs-md); line-height: 1.5; }

.tw-main { overflow-y: auto; min-width: 0; outline: 0; padding-bottom: 60px; }
.tw-hd { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 14px; padding: 14px 18px 8px; }
.tw-hd .tk { font: var(--fw-med) var(--fs-xs)/1 var(--mono); letter-spacing: .06em; color: var(--accent); }
.tw-hd .nm { font: var(--fw-reg) var(--fs-2xl)/1.15 var(--serif); letter-spacing: -.015em; color: var(--ink); margin-top: 4px; }
.tw-hd .grp { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }
.tw-hd .px { margin-left: auto; text-align: right; font: var(--fw-med) var(--fs-2xl)/1.1 var(--mono); color: var(--ink); }
.tw-hd .px small { display: block; font-size: var(--fs-xs); margin-top: 4px; }
.tw-hd .px .up { color: var(--pos); } .tw-hd .px .down { color: var(--neg); }
.tw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 0 18px 10px; }
.tw-bar .links { margin-left: auto; }
.tw-bar .k-btn { height: 30px; font-size: var(--fs-sm); text-decoration: none; }
.tw-star.on, .btn.tw-star.on { color: var(--sand); border-color: color-mix(in srgb, var(--sand) 45%, transparent); }
.btn.tw-star svg { vertical-align: -3px; }
.tw-chart { height: max(420px, calc(100dvh - var(--top-h, 57px) - 250px)); margin: 0 18px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--bg-2); }
.tw-note { color: var(--faint); font-size: var(--fs-xs); margin: 6px 18px 0; }
.tw-strip { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 10px 18px 0; padding: 10px 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font: var(--fw-reg) var(--fs-sm)/1.3 var(--mono); color: var(--ink); }
.tw-strip b { font-weight: var(--fw-med); color: var(--muted); margin-right: 6px; }
.tw-strip em { font-style: normal; }
.tw-body { padding: 18px 18px 0; }
.tw-body .grid2 { gap: 14px; margin-bottom: 14px; }
.tw-body .card { padding: 16px 18px; margin-bottom: 14px; }
.tw-body .card h2 { font-size: var(--fs-xl); }

/* ---------------------------------------------------------------- heatmap */
.hm-bar { gap: 12px; }
.hm-key { display: inline-flex; align-items: center; gap: 6px; font: var(--fw-reg) var(--fs-xs) var(--mono); }
.hm-key i { display: inline-block; width: 16px; height: 10px; border-radius: var(--r-sm); }
.hm { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; margin-top: 10px; }
.hm-sec { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: 10px; min-width: 0; }
.hm-sec header { display: flex; align-items: baseline; gap: 10px; margin: 0 2px 8px; font: var(--fw-reg) var(--fs-sm) var(--mono); }
.hm-sec header b { font: var(--fw-med) var(--fs-md) var(--sans); color: var(--ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-sec header .up { color: var(--pos); } .hm-sec header .down { color: var(--neg); }
.hm-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 44px; grid-auto-flow: dense; gap: 3px; }
.hm-t { display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 0; padding: 2px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; overflow: hidden; }
.hm-t:hover { outline: 1px solid var(--ink-2); text-decoration: none; }
.hm-t b { font: var(--fw-med) var(--fs-2xs)/1.2 var(--mono); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-t span { font: var(--fw-reg) var(--fs-2xs)/1.2 var(--mono); opacity: .85; }
.hm-t.x2 { grid-column: span 2; grid-row: span 2; }
.hm-t.x2 b { font-size: var(--fs-sm); } .hm-t.x2 span { font-size: var(--fs-xs); }
.hm-t.x3 { grid-column: span 3; grid-row: span 2; }
.hm-t.x3 b { font-size: var(--fs-md); } .hm-t.x3 span { font-size: var(--fs-xs); }
.hm-more { grid-column: span 2; display: flex; align-items: center; justify-content: center; font: var(--fw-reg) var(--fs-2xs) var(--mono); color: var(--faint); }

/* ---------------------------------------------------------------- compare */
.cmp-picks { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 6px 0 16px; }
.cmp-find { width: min(340px, 100%); }
.cmp-chart { height: 460px; margin: 14px; }
.cmp-tbl td { text-align: left; font-family: var(--mono); font-size: var(--fs-sm); }
.cmp-tbl td:first-child { font-family: var(--sans); }
.cmp-tbl td span { display: inline; text-align: left; }
.cmp-tbl td.cmp-hi { color: var(--accent); box-shadow: inset 2px 0 0 var(--accent-line); }
.cmp-tbl th { vertical-align: top; padding: 12px 14px; text-transform: none; letter-spacing: 0; font-family: var(--sans); }
.cmp-tbl th .sub { display: block; font-size: var(--fs-xs); }
.cmp-tbl td:first-child { width: 34%; }

/* ---------------------------------------------------------------- page bits in the new look */
.page-head h1 { font-size: var(--fs-3xl); }
.k-seg button { font-family: var(--sans); }
.asof { gap: 8px; flex-wrap: wrap; }
.card { box-shadow: none; background: color-mix(in srgb, var(--surface) 86%, transparent); }
.btn { font-weight: var(--fw-med); border-radius: var(--r-md); border-color: var(--line-2); }
.btn:hover { border-color: var(--accent-line); background: var(--surface-2); }
.tbl th { background: var(--surface-2); }
.tbl td { border-bottom-color: var(--line); }
.tbl tbody tr:hover { background: var(--surface-2); }
.chip { font-weight: var(--fw-med); }
.up { color: var(--pos); } .down { color: var(--neg); }

/* ---------------------------------------------------------------- Dalal as a side drawer */
.dalal-panel { top: var(--top-h, 57px); right: 0; bottom: 0; height: auto; width: min(420px, 100vw); border-radius: 0; border: 0; border-left: 1px solid var(--line-2); background: var(--bg-2); box-shadow: var(--shadow); }
.dalal-panel footer { background: var(--bg-2); border-top: 1px solid var(--line); }
.dmsgs { background: var(--bg-2); }
.dctx { font-size: var(--fs-sm); color: var(--ink-2); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--r-sm); padding: 6px 9px; margin: 8px 0 !important; }
.dform textarea { background: var(--surface); color: var(--ink); border-color: var(--line-2); }

@media (max-width: 900px) {
  body.term { overflow: auto; }
  .tw { grid-template-columns: 1fr; height: auto; }
  .tw-left { border-right: 0; border-bottom: 1px solid var(--line); }
  .tw-list { max-height: 46vh; }
  .tw-chart { height: 380px; margin: 0 10px; }
  .tw-hd, .tw-bar { padding-left: 12px; padding-right: 12px; }
  .tw-bar .links { margin-left: 0; }
  .tw-body { padding: 14px 10px 0; }
  .tw-strip { margin: 10px 10px 0; gap: 6px 14px; }
  .hm { grid-template-columns: 1fr; }
  .dalal-panel { width: 100vw; }
}

/* the peeking mascot would sit on the chart: on the stock-watch screen Dalal opens from the "Ask Dalal" button */
body.term .dalal-peek { display: none; }
.tw-row:focus, .tw-list:focus { outline: none; }

/* every page uses the whole screen width (Sagar 2026-11-16: "i want all the page to be full width");
   only an article (.post) keeps a reading width */
main { max-width: none; padding: 22px 28px 40px; }
.foot p { max-width: none; padding: 18px 28px 28px; }
@media (max-width: 760px) { main { padding: 18px 14px 32px; } .foot p { padding: 16px 14px 24px; } }

/* ---------------------------------------------------------------- left side menu (Sagar 2026-11-16: like SectorScope) */
:root { --nav-w: 196px; }
body.nav-mini { --nav-w: 60px; }
.nv-g, .nv-tog { display: none; }
@media (min-width: 901px) {
  /* a blurred header would hold the fixed side menu inside itself (backdrop-filter makes a containing block) */
  .top { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .top-in { gap: 12px; }
  .me-wrap { margin-left: auto; }
  #topnav.topnav { position: fixed; z-index: 25; top: var(--top-h, 57px); left: 0; bottom: 0; width: var(--nav-w); flex-direction: column; flex: none; gap: 1px;
    overflow-y: auto; overflow-x: hidden; padding: 10px 8px 16px; background: var(--bg-2); border-right: 1px solid var(--line); }
  #topnav.topnav a { padding: 8px 10px; border-radius: var(--r-sm); color: var(--muted); font: var(--fw-med) var(--fs-md) var(--sans); box-shadow: none; }
  #topnav.topnav a:hover { background: var(--surface); color: var(--ink); }
  #topnav.topnav a.on { background: var(--accent-soft); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); border-radius: 0 8px 8px 0; }
  #topnav .nv-g { display: block; margin: 12px 10px 4px; font: var(--fw-med) var(--fs-2xs)/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
  #topnav .nv-g:first-child { margin-top: 2px; }
  #topnav .nv-tog { display: flex; align-items: center; gap: 7px; margin-top: auto; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--faint); font: var(--fw-med) var(--fs-sm) var(--sans); cursor: pointer; }
  #topnav .nv-tog:hover { color: var(--ink); background: var(--surface); }
  main, .foot { margin-left: var(--nav-w); }
  body.signed-out main, body.signed-out .foot { margin-left: 0; }
  body.nav-mini #topnav a span, body.nav-mini #topnav .nv-tog span { display: none; }
  body.nav-mini #topnav a, body.nav-mini #topnav .nv-tog { justify-content: center; padding: 9px 0; }
  body.nav-mini #topnav .nv-g { margin: 10px 0 4px; height: 1px; overflow: hidden; color: transparent; background: var(--line); }
}

/* ---------------------------------------------------------------- my lists on Stock watch */
.tw-lists { display: flex; flex-wrap: wrap; gap: 6px; }
.tw-lists .k-chip { height: 24px; font-size: var(--fs-xs); cursor: pointer; }
.tw-lists .k-chip:hover { border-color: var(--accent-line); color: var(--ink); }
.tw-wlwrap { position: relative; }
.tw-wlmenu { position: absolute; top: 36px; left: 0; z-index: 40; min-width: 230px; background: var(--raise); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 6px; }
.tw-wlmenu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink-2); font: var(--fw-reg) var(--fs-sm) var(--sans); cursor: pointer; text-align: left; }
.tw-wlmenu button:hover { background: var(--surface-2); }
.tw-wlmenu button small { margin-left: auto; color: var(--faint); font-family: var(--mono); }
.tw-wlmenu i.box { width: 13px; height: 13px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); flex: none; }
.tw-wlmenu button.on i.box { background: var(--accent); border-color: var(--accent); }
.tw-wlmenu i.plus { width: 13px; text-align: center; font-style: normal; color: var(--accent); }

/* ---------------------------------------------------------------- Discover */
.dc-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 4px 0 18px; border-bottom: 1px solid var(--line); }
.dc-nav a { padding: 8px 0 10px; color: var(--muted); font: var(--fw-med) var(--fs-md) var(--sans); text-decoration: none; }
.dc-nav a:hover { color: var(--ink); text-decoration: none; }
.dc-nav a.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.dc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.dc-tile { display: block; border: 1px solid var(--line); border-radius: var(--r-md); background: color-mix(in srgb, var(--surface) 86%, transparent); padding: 18px; color: var(--ink); text-decoration: none; }
.dc-tile:hover { border-color: var(--accent-line); text-decoration: none; }
.dc-tile h3 { font: var(--fw-reg) var(--fs-xl)/1.25 var(--serif); margin: 0 0 8px; }
.dc-mini { list-style: none; padding: 0; margin: 0; font-size: var(--fs-sm); color: var(--ink-2); display: grid; gap: 4px; }
.dc-mini b { font: var(--fw-med) var(--fs-sm) var(--mono); color: var(--accent); margin-right: 6px; }
.dc-big { font: var(--fw-reg) var(--fs-3xl)/1.1 var(--serif); margin: 4px 0; }
.dc-huge { font: var(--fw-reg) var(--fs-3xl)/1 var(--serif); margin: 6px 0 10px; }
.dc-huge small { font-size: var(--fs-xl); color: var(--muted); margin-left: 4px; }
.dc-meter { position: relative; display: inline-block; width: 150px; height: 8px; border-radius: var(--r-lg); vertical-align: middle;
  background: linear-gradient(90deg, var(--pos), var(--sand), var(--neg)); opacity: .85; }
.dc-meter i { position: absolute; top: -4px; width: 3px; height: 16px; margin-left: -1px; border-radius: var(--r-sm); background: var(--ink); box-shadow: 0 0 0 2px var(--bg); }
.dc-rel { display: grid; gap: 10px; }
.dc-rel > div { display: grid; grid-template-columns: 220px minmax(0, 1fr) 160px auto; gap: 12px; align-items: center; font-size: var(--fs-md); }
.dc-rel span { color: var(--muted); }
.dc-chart { height: 340px; }
.dc-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; align-items: start; }
.dc-person { padding: 12px 14px; }
.dc-person.open { grid-column: 1 / -1; }
.dc-person-h { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: var(--ink); font: var(--fw-reg) var(--fs-xl) var(--serif); cursor: pointer; padding: 0 0 6px; text-align: left; }
.dc-person-h .k-pill { margin-left: auto; }
.chip.bad { background: var(--coral-soft); color: var(--neg); }
.chip.info { background: var(--sky-soft); color: var(--sky); }
.nowrap { white-space: nowrap; }
.sub-ish { color: var(--ink-2); font-size: var(--fs-sm); }
.dc-rrg-card { padding: 10px; }
.dc-rrg { width: 100%; height: auto; max-height: 72vh; display: block; }
.dc-rrg .dc-axis { stroke: var(--line-2); stroke-width: 1; }
.dc-rrg .dc-q { font: var(--fw-med) var(--fs-xs) var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.dc-rrg .dc-ax { font: var(--fw-reg) var(--fs-2xs) var(--sans); fill: var(--faint); }
.dc-rrg .dc-lbl { font: var(--fw-reg) var(--fs-2xs) var(--sans); fill: var(--ink-2); }
.dc-quads { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dc-quads .card { margin: 0; }
.dc-quads ul { font-size: var(--fs-sm); }
.dc-gd { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
.dc-gd .card { margin: 0; }
.dc-out { font: var(--fw-reg) var(--fs-lg)/1.5 var(--serif); color: var(--ink); margin: 6px 0 10px; }
.dc-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: var(--fs-md); }
.dc-items blockquote { margin: 4px 0 0; padding: 2px 0 2px 12px; border-left: 2px solid var(--accent-line); color: var(--ink-2); font: italic var(--fw-reg) var(--fs-md)/1.5 var(--serif); }
.dc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.dc-kpis > div { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; background: var(--surface); }
.dc-kpis b { display: block; font: var(--fw-reg) var(--fs-2xl)/1.1 var(--serif); }
.dc-kpis span { color: var(--muted); font-size: var(--fs-sm); }
.dc-mygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
.dc-mygrid .card { margin: 0; }
.dc-px { font: var(--fw-reg) var(--fs-sm) var(--mono); }
.dc-bars { display: grid; gap: 6px; }
.dc-bars > div { display: grid; grid-template-columns: 200px minmax(0, 1fr) 56px; gap: 10px; align-items: center; font-size: var(--fs-sm); }
.dc-bars i { display: block; height: 10px; border-radius: var(--r-lg); background: var(--accent); opacity: .8; }
.dc-bars b { font: var(--fw-med) var(--fs-sm) var(--mono); text-align: right; }
.dc-facts { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.dc-xin { width: 100%; font: var(--fw-reg) var(--fs-md) var(--mono); padding: 10px 12px; }
@media (max-width: 900px) {
  .dc-quads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dc-gd, .dc-mygrid, .dc-people { grid-template-columns: 1fr; }
  .dc-rel > div { grid-template-columns: 1fr; gap: 4px; }
  .dc-bars > div { grid-template-columns: 120px minmax(0, 1fr) 50px; }
}

/* ---------------------------------------------------------------- Discover premium: trial line, lock, menu sub-items */
.dc-prem { margin: -6px 0 16px; padding: 9px 12px; border-radius: var(--r-md); border: 1px solid color-mix(in srgb, var(--sand) 35%, transparent); background: var(--sand-soft); color: var(--ink-2); font-size: var(--fs-md); }
.dc-prem.ok { border-color: var(--accent-line); background: var(--accent-soft); }
.dc-lock { max-width: 720px; padding: 26px 28px; }
.dc-lock h2 { font-size: var(--fs-3xl); margin: 4px 0 10px; }
.dc-lock-list { columns: 2; margin: 14px 0 18px; padding-left: 18px; color: var(--ink-2); font-size: var(--fs-md); }
.dc-coupon { display: flex; gap: 10px; flex-wrap: wrap; }
.dc-coupon input { flex: 1; min-width: 220px; height: 40px; padding: 0 12px; font: var(--fw-med) var(--fs-md) var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.nv-tag { margin-left: auto; padding: 1px 6px; border-radius: var(--r-sm); font: var(--fw-med) var(--fs-2xs)/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--sand); background: var(--sand-soft); }
@media (min-width: 901px) {
  #topnav.topnav a.nv-sub { padding: 5px 10px 5px 37px; font-size: var(--fs-sm); color: var(--faint); }
  #topnav.topnav a.nv-sub:hover { color: var(--ink); }
  #topnav.topnav a.nv-sub.on { color: var(--ink); }
  body.nav-mini #topnav a.nv-sub, body.nav-mini .nv-tag { display: none; }
}
@media (max-width: 900px) { #topnav a.nv-sub, .nv-tag { display: none; } }

/* ---------------------------------------------------------------- Discover > All triggers */
.dc-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 16px; align-items: start; }
.dc-grp { margin: 0; padding: 12px; }
.dc-grp.on { border-color: var(--accent-line); }
.dc-grp-h { display: flex; justify-content: space-between; align-items: baseline; width: 100%; border: 0; background: none; color: var(--ink); cursor: pointer; padding: 0 2px 8px; }
.dc-grp-h b { font: var(--fw-reg) var(--fs-xl) var(--serif); }
.dc-grp-h span { font: var(--fw-med) var(--fs-sm) var(--mono); color: var(--muted); }
.dc-bks { display: grid; gap: 3px; }
.dc-bk { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 6px 9px; border: 1px solid transparent; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); font: var(--fw-reg) var(--fs-sm) var(--sans); cursor: pointer; text-align: left; }
.dc-bk:hover { border-color: var(--line-2); color: var(--ink); }
.dc-bk b { font: var(--fw-med) var(--fs-xs) var(--mono); }
.dc-bk.pos b { color: var(--pos); } .dc-bk.neg b { color: var(--neg); } .dc-bk.info b { color: var(--sky); }
.dc-bk.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--ink); }

/* ---------------------------------------------------------------- Portfolio X-ray */
.pf-add { display: grid; grid-template-columns: minmax(240px, 2fr) 130px 160px 160px auto; gap: 10px; align-items: center; margin: 8px 0; }
.pf-add input { height: 40px; padding: 0 12px; font-size: var(--fs-md); }
.pf-find input { width: 100%; }
.pf-find .tw-ac div em { float: right; font: normal 400 12px var(--mono); color: var(--muted); }
.pf-more summary { cursor: pointer; color: var(--accent); font-size: var(--fs-md); margin-top: 6px; }
.pf-tbl td .sub { display: block; }
.pf-lot td { background: var(--surface-2); font-size: var(--fs-sm); }
@media (max-width: 900px) { .pf-add { grid-template-columns: 1fr 1fr; } .pf-find { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- Discover in the stock-list layout */
.tw-why { margin: 0 18px 10px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); }
.tw-why .k-label { margin: 0 0 6px; }
.tw-why ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--ink-2); }
.tw-lists a.k-chip { height: 24px; font-size: var(--fs-xs); text-decoration: none; }
.tw-lists a.k-chip:hover { border-color: var(--accent-line); color: var(--ink); }
.tw-about .k-pill { margin-left: 4px; }

/* ---------------------------------------------------------------- section tabs in the top bar (Sagar 2026-11-26: "one side
   tab, then sub tabs on upper side so no need to scroll for everything"); filled by app.js SUBTABS, empty = hidden */
.subtabs { display: flex; flex: 1 1 auto; min-width: 0; align-self: stretch; gap: 4px; margin: -8px 0; overflow-x: auto; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs:empty { display: none; }
.subtabs a { display: flex; align-items: center; padding: 0 12px; white-space: nowrap; color: var(--muted); font: var(--fw-med) var(--fs-md) var(--sans); text-decoration: none; }
.subtabs a:hover { color: var(--ink); text-decoration: none; }
.subtabs a.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
@media (max-width: 900px) {
  .top-in { flex-wrap: wrap; }
  .subtabs { order: 4; flex-basis: 100%; align-self: auto; margin: 0 -14px; padding: 0 6px; border-top: 1px solid var(--line); }
  .subtabs a { padding: 10px; font-size: var(--fs-sm); }
}
