/* Deep Stock Analysis (#/deep) — research-deep.js. Same show/hide approach as Star Ratings. */
html.ivd-on .hero, html.ivd-on #view, html.ivd-on #ivs, html.ivd-on #ivb { display: none !important; }
html:not(.ivd-on) #ivd { display: none !important; }
html.ivd-lock { overflow: hidden; }
.ivd-wrap { padding: 24px 0 60px; min-width: 0; max-width: 100%; }
.ivd-head { max-width: 980px; margin-bottom: 16px; }
.ivd-eb { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: #B07D00; }
.ivd-head h1 { margin: 6px 0 8px; font-size: clamp(24px, 3vw, 34px); line-height: 1.15; color: #0A2A5E; }
.ivd-head p { margin: 0 0 6px; color: #4a5568; font-size: 14.5px; line-height: 1.6; }
.ivd-asof { font-size: 12.5px !important; color: #6b7a90 !important; }

.ivd-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 4px 0 12px; border-radius: 14px; background: #f3ecdc; border: 1.5px solid #e5c97a; }
.ivd-tabs button { border: 0; background: transparent; padding: 9px 16px; border-radius: 10px; font: 700 13.5px/1 inherit; color: #4a4434; cursor: pointer; transition: background-color .15s ease, color .15s ease, transform .16s ease-out; }
.ivd-tabs button:hover { background: #fff; }
.ivd-tabs button:active { transform: scale(.97); }
.ivd-tabs button.on { background: linear-gradient(135deg, #0A2A5E, #123b7a); color: #fff; box-shadow: 0 6px 16px #0a2a5e40, inset 0 -2px 0 #e5b93c; }

.ivd-panel { background: linear-gradient(180deg, #0A2A5E, #123b7a); border-radius: 18px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(10,42,94,.18); display: grid; gap: 10px; margin-bottom: 14px; }
.ivd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.ivd-fl { flex: 0 0 auto; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #9db0cc; }
.ivd-chips { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.ivd-chip { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: #e6ecf5; padding: 7px 12px; border-radius: 999px; font: 600 12.5px/1 inherit; cursor: pointer; transition: background-color .15s ease, transform .16s ease-out; }
.ivd-chip:hover { background: rgba(255,255,255,.14); }
.ivd-chip:active, .ivd-pill:active { transform: scale(.97); }
.ivd-chip.on { background: #F5B700; border-color: #F5B700; color: #0A2A5E; }
.ivd-pre { margin-left: auto; }
.ivd-pill { border: 1px dashed rgba(245,183,0,.6); background: transparent; color: #f5d27a; padding: 6px 11px; border-radius: 999px; font: 600 12px/1 inherit; cursor: pointer; }
.ivd-pill:hover { background: rgba(245,183,0,.12); }
.ivd-inputs label { display: inline-flex; align-items: center; gap: 6px; color: #c9d5e8; font-size: 12.5px; }
.ivd-inputs input, .ivd-inputs select { height: 34px; border-radius: 9px; border: 1px solid rgba(255,255,255,.25); background: #fff; color: #0A2A5E; padding: 0 10px; font: inherit; font-size: 13px; }
.ivd-inputs input[type=number] { width: 64px; }
.ivd-inputs select { max-width: 220px; }
.ivd-q { flex: 1 1 220px; }
.ivd-q input { flex: 1; min-width: 0; }

.ivd-sum { margin: 2px 0 10px; padding: 10px 14px; border-radius: 12px; background: #fff; border: 1px solid #e7dfcc; color: #3d4a63; font-size: 13.5px; line-height: 1.5; }
.ivd-tw { overflow-x: auto; border: 1px solid #e7dfcc; border-radius: 14px; background: #fff; }
.ivd-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.ivd-t th { position: sticky; top: 0; background: #0A2A5E; color: #e8ecf4; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; text-align: left; padding: 9px 12px; white-space: nowrap; }
.ivd-t td { padding: 8px 12px; border-top: 1px solid #efe6d2; vertical-align: middle; }
.ivd-t .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ivd-t td small { display: block; color: #8a95a8; font-size: 11px; font-weight: 400; }
.ivd-t tbody tr[data-isin], .ivd-t tbody tr[data-sector] { cursor: pointer; transition: background-color .12s ease; }
.ivd-t tbody tr[data-isin]:hover, .ivd-t tbody tr[data-sector]:hover { background: #fff8e6; }
.ivd-t tbody tr:focus-visible { outline: 2px solid #e5b93c; outline-offset: -2px; }
.ivd-name b { color: #0A2A5E; }
.ivd-rank { color: #8a95a8; width: 28px; }
.ivd-miss { opacity: .4; }
.ivd-na { color: #b8c0cc; }
.up { color: #1A7F4B; } .dn { color: #C0392B; }
.ivd-spark rect.up { fill: #9fd3b4; } .ivd-spark rect.dn { fill: #eba79f; }
.ivd-spark rect.up.last { fill: #1A7F4B; } .ivd-spark rect.dn.last { fill: #C0392B; }
.ivd-note { margin: 8px 2px 0; font-size: 12px; color: #6b7a90; }
.ivd-empty, .ivd-load { padding: 28px; text-align: center; color: #6b7a90; background: #fff; border: 1px solid #e7dfcc; border-radius: 14px; }
.ivd-spin { display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; border-radius: 50%; border: 2.5px solid #e3e8f0; border-top-color: #0A2A5E; animation: ivdSpin .8s linear infinite; }
@keyframes ivdSpin { to { transform: rotate(1turn); } }
.ivd-tops { white-space: normal; }
.ivd-tag { display: inline-block; margin: 2px 4px 2px 0; padding: 3px 9px; border-radius: 999px; border: 1px solid #d9e0ea; background: #f6f8fb; color: #0A2A5E; font: 600 11.5px/1.3 inherit; cursor: pointer; }
.ivd-tag:hover { background: #fff3cf; border-color: #e5c97a; }
.ivd-heat td.n { color: #0A2A5E; font-weight: 600; }

/* stock drawer */
.ivd-drawer { position: fixed; inset: 0; z-index: 1000; background: rgba(10,20,40,.45); display: flex; justify-content: flex-end; animation: ivdFade .2s ease-out; }
.ivd-drawer[hidden] { display: none; }
@keyframes ivdFade { from { opacity: 0; } to { opacity: 1; } }
.ivd-dr-in { position: relative; width: min(980px, 100vw); height: 100%; overflow: auto; background: #f7f3ea; padding: 22px 24px 40px; box-shadow: -20px 0 50px rgba(0,0,0,.25); animation: ivdIn .28s cubic-bezier(.23,1,.32,1); }
@keyframes ivdIn { from { transform: translateX(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.ivd-x { position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border-radius: 10px; border: 1px solid #e7dfcc; background: #fff; font-size: 22px; cursor: pointer; }
.ivd-dh h2 { margin: 4px 0 12px; color: #0A2A5E; font-size: 26px; }
.ivd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ivd-kpis > div { background: #fff; border: 1px solid #e7dfcc; border-radius: 12px; padding: 10px 12px; }
.ivd-kpis > div > span { display: block; font-size: 11px; color: #6b7a90; text-transform: uppercase; letter-spacing: .05em; }   /* only the label: the coloured numbers inside <b> stay on one line ("248 / 133") */
.ivd-kpis b { font-size: 20px; color: #0A2A5E; }
.ivd-kpis small { display: block; color: #8a95a8; font-size: 11px; }
.ivd-dr-in h3 { margin: 18px 0 8px; color: #0A2A5E; font-size: 15px; }
.ivd-dr-in h3 small { color: #8a95a8; font-weight: 500; }
.ivd-chart { width: 100%; max-width: 640px; height: auto; display: block; background: #fff; border: 1px solid #e7dfcc; border-radius: 14px; padding: 8px; box-sizing: border-box; }
.ivd-chart .axis { stroke: #c8d0dc; stroke-width: 1; }
.ivd-chart rect.up { fill: #1A7F4B; } .ivd-chart rect.dn { fill: #C0392B; }
.ivd-chart circle.net { fill: #F5B700; stroke: #0A2A5E; stroke-width: 2; }
.ivd-chart text { font-size: 12px; fill: #4a5568; }
.ivd-legend { margin: 6px 2px 0; font-size: 12px; color: #6b7a90; }
.ivd-legend .k { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 6px; vertical-align: -1px; }
.ivd-legend .k.up { background: #1A7F4B; } .ivd-legend .k.dn { background: #C0392B; } .ivd-legend .k.net { background: #F5B700; border-radius: 50%; }
.ivd-small td, .ivd-small th { padding: 6px 10px; }
.ivd-ty, .ivd-mv { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ivd-ty-active { background: #e6eefb; color: #0A2A5E; } .ivd-ty-passive { background: #eef0f3; color: #5a6478; } .ivd-ty-arbitrage { background: #f6efe0; color: #8a6a1f; }
.ivd-mv-new, .ivd-mv-buy { background: #e3f4ea; color: #1A7F4B; } .ivd-mv-trim, .ivd-mv-exit { background: #fbe7e4; color: #C0392B; }
.ivd-split { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: #fff3cf; color: #8a6a1f; font-size: 10.5px; font-weight: 700; }
@media (max-width: 760px) {
  .ivd-pre { margin-left: 0; }
  .ivd-dr-in { padding: 16px 14px 30px; }
  .ivd-inputs label { flex: 1 1 100%; justify-content: space-between; min-width: 0; max-width: 100%; }
  /* 21 Nov 2026: a long sector name made the select 336px and pushed the page (and the stock drawer) 39px past a phone screen */
  .ivd-inputs select, .ivd-inputs .ivd-q input { max-width: none; flex: 1 1 0; min-width: 0; width: 0; }
}
@media (prefers-reduced-motion: reduce) { .ivd-spin, .ivd-drawer, .ivd-dr-in { animation: none; } }

/* ── flagship layer (owner, 18 Nov 2026: "top notch, green = good, red = bad") ── */
.ivd-head { max-width: none; position: relative; overflow: hidden; padding: 22px 24px 18px; border-radius: 20px; color: #fff;
  background: radial-gradient(120% 160% at 100% 0%, rgba(245,183,0,.22) 0%, transparent 45%), linear-gradient(120deg, #071a3d 0%, #0A2A5E 55%, #123b7a 100%);
  box-shadow: 0 16px 40px rgba(10,42,94,.25); }
.ivd-head::after { content: ''; position: absolute; inset: auto -40px -60px auto; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(26,127,75,.25), transparent 65%); pointer-events: none; }
.ivd-head .ivd-eb { color: #F5D27A; }
.ivd-head h1 { color: #fff; }
.ivd-head p { color: #c9d5e8; max-width: 980px; }
.ivd-head p b { color: #fff; }
.ivd-head .ivd-asof { color: #9db0cc !important; }
.ivd-pulse { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 12px 0 14px; }
.ivd-pk { position: relative; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid #e7dfcc; box-shadow: 0 2px 8px rgba(10,42,94,.05); overflow: hidden; }
.ivd-pk::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #e5c97a; }
.ivd-pk:has(b.up)::before { background: #1A7F4B; } .ivd-pk:has(b.dn)::before { background: #C0392B; }
.ivd-pk span { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: #6b7a90; }
.ivd-pk b { display: block; margin-top: 3px; font-size: 21px; color: #0A2A5E; line-height: 1.2; }
.ivd-pk small { color: #6b7a90; font-size: 12px; }
.ivd-pk b.up, .ivd-t .up, .ivd-sum .up { color: #12804a; } .ivd-pk b.dn, .ivd-t .dn { color: #c0392b; }

.ivd-t thead th { background: linear-gradient(180deg, #0A2A5E, #0d3170); }
.ivd-t th.c, .ivd-t td.c { text-align: center; }
.ivd-t tbody tr.ivd-r-up td:first-child { box-shadow: inset 3px 0 0 #1A7F4B; }
.ivd-t tbody tr.ivd-r-dn td:first-child { box-shadow: inset 3px 0 0 #C0392B; }
.ivd-t tbody tr:nth-child(even) td { background: #fcfaf5; }
.ivd-t tbody tr[data-isin]:hover td { background: #fff6dc; }
.ivd-t td.n.up b, .ivd-t td.n.dn b { font-weight: 800; }
.ivd-t td.n small { margin-top: 1px; }

.ivd-score { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; }
.ivd-score svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ivd-score .bg { fill: none; stroke: #edf0f4; stroke-width: 4; }
.ivd-score .fg { fill: none; stroke-width: 4; stroke-linecap: round; transition: stroke-dasharray .5s cubic-bezier(.23,1,.32,1); }
.ivd-score.hi .fg { stroke: #1A7F4B; } .ivd-score.mid .fg { stroke: #E0A100; } .ivd-score.lo .fg { stroke: #9aa5b5; }
.ivd-score b { position: relative; font-size: 12.5px; font-weight: 800; color: #0A2A5E; }
.ivd-r-dn .ivd-score.hi .fg { stroke: #C0392B; }

.ivd-bs { margin-top: 4px; display: flex; gap: 5px; flex-wrap: wrap; }
.ivd-b { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; }
.ivd-b.acc { background: #e3f4ea; color: #12804a; box-shadow: 0 0 0 0 rgba(26,127,75,.4); animation: ivdAcc 2.4s ease-out infinite; }
.ivd-r-dn .ivd-b.acc { background: #fbe7e4; color: #c0392b; animation: none; }
.ivd-b.all { background: #eef2fb; color: #0A2A5E; }
@keyframes ivdAcc { 0% { box-shadow: 0 0 0 0 rgba(26,127,75,.4); } 70%, 100% { box-shadow: 0 0 0 6px rgba(26,127,75,0); } }

.ivd-sum { position: relative; }

.ivd-split2 { display: block; width: 140px; height: 10px; border-radius: 999px; background: #e9a59d; overflow: hidden; }
.ivd-split2 i { display: block; height: 100%; background: linear-gradient(90deg, #1A7F4B, #2fa866); border-radius: 999px 0 0 999px; }
.ivd-heat td.n { font-weight: 700; }
@media (max-width: 760px) { .ivd-head { padding: 16px; } }
@media (prefers-reduced-motion: reduce) { .ivd-b.acc { animation: none; } .ivd-score .fg { transition: none; } }
.ivd-dnote { margin: -6px 0 12px; font-size: 12.5px; color: #6b7a90; }
.ivd-b.no { background: #f1f2f5; color: #6b7a90; border: 1px dashed #b8c0cc; }

/* look up any stock, no filters */
.ivd-find { position: relative; margin-top: 12px; max-width: 620px; z-index: 5; }
.ivd-find > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #0A2A5E; font-size: 18px; pointer-events: none; }
.ivd-find input { width: 100%; box-sizing: border-box; height: 46px; padding: 0 14px 0 40px; border-radius: 14px; border: 2px solid #F5B700; background: #fff; color: #0A2A5E; font: 600 15px/1 inherit; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.ivd-find input:focus { outline: none; border-color: #ffd34d; box-shadow: 0 0 0 4px rgba(245,183,0,.3), 0 8px 24px rgba(0,0,0,.18); }
.ivd-find-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); max-height: 420px; overflow: auto; background: #fff; border-radius: 14px; border: 1px solid #e7dfcc; box-shadow: 0 20px 44px rgba(10,42,94,.28); padding: 6px; }
.ivd-find-list[hidden] { display: none; }
.ivd-find-list button { display: grid; grid-template-columns: 1fr auto auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.ivd-find-list button:hover, .ivd-find-list button:focus-visible { background: #fff6dc; outline: none; }
.ivd-find-list b { color: #0A2A5E; font-size: 14px; grid-column: 1; }
.ivd-find-list small { color: #8a95a8; font-size: 11.5px; grid-column: 1; }
.ivd-fh { grid-column: 2; grid-row: 1 / 3; color: #4a5568; font-size: 12.5px; }
.ivd-ff { grid-column: 3; grid-row: 1 / 3; font-weight: 800; font-size: 13px; }
.ivd-ff.up { color: #12804a; } .ivd-ff.dn { color: #c0392b; }
.ivd-fnone { padding: 12px; color: #6b7a90; font-size: 13px; }
/* the lookup list must float out of the hero, so the hero no longer clips; its glow stays inside */
.ivd-head { overflow: visible; z-index: 6; }
.ivd-head::after { inset: auto 0 0 auto; width: 240px; height: 200px; border-radius: 0 0 20px 0;
  background: radial-gradient(circle at 100% 100%, rgba(26,127,75,.28), transparent 70%); }

/* compact (owner, 18 Nov 2026): shorter hero and cards */
.ivd-wrap { padding-top: 14px; }
.ivd-head { padding: 14px 20px 14px; border-radius: 16px; margin-bottom: 10px; }
.ivd-head h1 { margin: 4px 0 0; font-size: clamp(20px, 2.4vw, 26px); }
.ivd-find { margin-top: 10px; }
.ivd-find input { height: 40px; font-size: 14px; }
.ivd-pulse { gap: 8px; margin: 0 0 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.ivd-pk { padding: 7px 12px; border-radius: 12px; }
.ivd-pk span { font-size: 10px; line-height: 1.3; }
.ivd-pk b { margin-top: 1px; font-size: 17px; }
.ivd-pk small { font-size: 11px; }
.ivd-tabs { margin: 0 0 10px; }
.ivd-tabs button { padding: 8px 14px; }
.ivd-panel { padding: 12px 14px; gap: 8px; }
/* market cap tags (AMFI list) */
.ivd-cap { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 5px; font-size: 10px; font-weight: 800; letter-spacing: .02em; vertical-align: 1px; }
.ivd-cap-large { background: #e6eefb; color: #0A2A5E; }
.ivd-cap-mid { background: #fff3cf; color: #8a6a1f; }
.ivd-cap-small { background: #f3e8fb; color: #6b2fa3; }
.ivd-cap-other { background: #eef0f3; color: #6b7a90; }
.ivd-cap-foreign { background: #e3f4ef; color: #11624d; }
.ivd-dh .ivd-eb .ivd-cap { font-size: 11px; letter-spacing: .02em; }

/* not printable (owner, 21 Nov 2026) */
@media print { #ivd { display: none !important; } }
