/* News & Impact pages (Circulars, Market / Company News, Dividend, Right
   Share, Book Close, Price Adjustment, Promoter Lock-in, Economic Indicators,
   IPO/FPO Pipeline, Mutual Funds) plus their staff forms and delete pages.
   Layout only — colours come from the tm-* tokens in
   components/_iq_theme.html, so light / dark differ in one place. Every page
   extends templates/news_impact/_base_news.html. */

/* ── Page ── */
.ni-page { display: flex; flex-direction: column; gap: 1rem; padding-bottom: 2.5rem; }
.ni-page > * { min-width: 0; }
.ni-grid { display: grid; gap: 1rem; }
.ni-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ni-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ni-grid.cols-2-3 { grid-template-columns: 2fr 3fr; }
.ni-grid.cols-3-2 { grid-template-columns: 3fr 2fr; }
.ni-grid.cols-main-aside { grid-template-columns: minmax(0, 1fr) 19rem; align-items: start; }
.ni-narrow { max-width: 56rem; margin: 0 auto; width: 100%; }
.ni-medium { max-width: 72rem; margin: 0 auto; width: 100%; }
.ni-footnote { font-size: .66rem; color: var(--tm-faint); }

/* ── Domain strip (pinned under the page heading on wide screens) ── */
.ni-nav { position: relative; z-index: 25; align-items: center; }
/* Selected controls use the shared analysis-control tokens (tinted, as on Fundamentals / TradeMood), never a solid deep fill. */
.ni-nav .tm-tab.is-on, .ni-nav .tm-tab.is-on:hover { color: var(--analysis-control-text); background: var(--analysis-control-bg); box-shadow: inset 0 0 0 1px var(--analysis-control-ring); }
.ni-domain { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; margin-right: .25rem; border-radius: 10px; font-size: .62rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.ni-domain.is-news { color: #9f1239; background: #ffe4e6; }
.ni-domain.is-actions { color: #065f46; background: #d1fae5; }
.ni-domain.is-market { color: #3730a3; background: #e0e7ff; }
.ni-domain.is-overview { color: #334155; background: #f1f5f9; }
.dark .ni-domain.is-news { color: #fda4af; background: rgba(225,29,72,.18); }
.dark .ni-domain.is-actions { color: #6ee7b7; background: rgba(16,185,129,.18); }
.dark .ni-domain.is-market { color: #c7d2fe; background: rgba(99,102,241,.2); }
.dark .ni-domain.is-overview { color: #cbd5e1; background: #334155; }
.ni-nav-more { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; padding-right: .5rem; font-size: .62rem; font-weight: 800; color: var(--tm-faint); white-space: nowrap; }
.ni-nav-more a { color: var(--tm-muted); text-decoration: none; }
.ni-nav-more a:hover { color: var(--tm-accent); text-decoration: underline; }

/* ── Page-level actions (Add / Bulk upload in the heading) ── */
/* Corporate actions: provenance, reminders and expandable source evidence. */
.ni-source-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-top: 3px solid var(--tm-accent); }
.ni-source-heading { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.ni-source-heading strong { color: var(--tm-text); font-size: .9rem; }
.ni-source-heading p { margin: .3rem 0 0; color: var(--tm-muted); font-size: .74rem; line-height: 1.6; }
.ni-source-icon { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; flex: 0 0 auto; border-radius: .85rem; color: var(--tm-accent); background: var(--tm-accent-bg); }
.ni-source-links { display: flex; gap: .5rem; flex-wrap: wrap; flex-shrink: 0; }
.ni-action-reminders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1rem; }
.ni-reminder-card > summary, .ni-insights > summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem 1rem; cursor: pointer; list-style: none; color: var(--tm-text-2); font-size: .78rem; font-weight: 700; }
.ni-reminder-card > summary::-webkit-details-marker, .ni-insights > summary::-webkit-details-marker { display: none; }
.ni-reminder-card > summary::after, .ni-insights > summary::after { content: '+'; color: var(--tm-muted); font-size: 1rem; }
.ni-reminder-card[open] > summary::after, .ni-insights[open] > summary::after { content: '−'; }
.ni-reminder-card[open] > summary { border-bottom: 1px solid var(--tm-line); }
.ni-reminder-label { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-right: auto; }
.ni-reminder-label small { font-weight: 400; color: var(--tm-muted); }
.ni-reminder-note { padding: .75rem 1rem 0; margin: 0; color: var(--tm-muted); font-size: .74rem; line-height: 1.6; }
.ni-reminder-card time { color: var(--tm-text-2); font-size: .74rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ni-reminder-card .k small { display: block; margin-top: .2rem; color: var(--tm-muted); }
.ni-insights > .ni-grid { padding: 0 .8rem .8rem; }
.ni-source-detail > summary { cursor: pointer; list-style: none; }
.ni-source-observations { min-width: 16rem; max-width: 25rem; padding: .8rem; margin-top: .5rem; border: 1px solid var(--tm-line); border-radius: .6rem; background: var(--tm-bg-soft); font-size: .72rem; white-space: normal; }
.ni-source-observations p { margin: 0 0 .7rem; line-height: 1.6; }
.ni-source-observations dl { display: grid; grid-template-columns: 1fr 1.4fr; gap: .35rem .6rem; margin: .7rem 0; padding-top: .7rem; border-top: 1px solid var(--tm-line); }
.ni-source-observations dt { color: var(--tm-muted); }
.ni-source-observations dd { margin: 0; font-variant-numeric: tabular-nums; }
.ni-source-observations a { color: var(--tm-accent); }
.ni-reminder-card > summary:focus-visible, .ni-insights > summary:focus-visible, .ni-source-detail > summary:focus-visible { outline: 2px solid var(--tm-accent); outline-offset: -2px; }
@media (max-width: 767px) {
  .ni-source-banner { align-items: flex-start; flex-direction: column; padding: .9rem; }
  .ni-action-reminders { grid-template-columns: 1fr; gap: .7rem; }
  .ni-source-links { width: 100%; }
  .ni-source-links > a { flex: 1; }
}

.ni-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.ni-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 34px; padding: 0 .9rem; border: 1px solid transparent; border-radius: 9px; font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap; }
.ni-btn.primary { color: #fff; background: var(--tm-accent); }
.ni-btn.primary:hover { filter: brightness(1.08); }
.ni-btn.ghost { color: var(--tm-text-2); background: var(--tm-bg); border-color: var(--tm-line); }
.ni-btn.ghost:hover { background: var(--tm-bg-soft); color: var(--tm-text); }
.ni-btn.soft { color: var(--tm-accent); background: var(--tm-accent-bg); }
.ni-btn.danger { color: #fff; background: var(--tm-down); }
.ni-btn.danger-soft { color: var(--tm-down); background: var(--tm-down-bg); }
.ni-btn.link { color: var(--tm-muted); background: transparent; padding: 0 .4rem; }
.ni-btn.link:hover { color: var(--tm-text); }
.ni-btn i { font-size: .62rem; }
.ni-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Filters card ── */
.ni-filters .pxf-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem 1rem; border-bottom: 1px solid var(--tm-line); }
.ni-filters .pxf-head h2 { margin: 0; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--tm-text-2); }
.ni-filters-title { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ni-filters-aside { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .64rem; color: var(--tm-muted); }
.ni-form-filters { padding: .75rem 1rem .9rem; }
.ni-form-filters .ni-filter-actions { display: flex; gap: .4rem; align-items: end; }
.ni-form-filters .ni-filter-actions > * { flex: 1; }
.ni-form-filters .wide { grid-column: span 2; }
.ni-search { position: relative; }
.ni-search i { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); font-size: .62rem; color: var(--tm-faint); pointer-events: none; }
.ni-search input { padding-left: 1.7rem !important; }
.ni-page .ni-form-filters.pxf-form .ni-search input[name] { padding-left: 1.8rem !important; }

/* Chip rows (category / topic / status filters on the news pages) */
.ni-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; padding: .55rem 1rem; border-top: 1px solid var(--tm-line-soft); }
.ni-chips > .tm-eyebrow { margin-right: .3rem; }
.ni-chips .tm-chip.is-on { color: var(--analysis-control-text); background: var(--analysis-control-bg); border-color: var(--analysis-control-ring); }
.ni-chips .tm-chip small { font-weight: 600; opacity: .7; }
.ni-chips .tm-chip.is-on small { opacity: .85; }
.ni-chips .tm-chip.warn.is-on { color: var(--tm-warn); background: var(--tm-warn-bg); border-color: var(--tm-warn); }
.ni-chips .tm-chip.up.is-on { color: var(--tm-up); background: var(--tm-up-bg); border-color: var(--tm-up); }
.ni-chips .tm-chip.muted.is-on { color: var(--tm-text-2); background: var(--tm-bg-sunk); border-color: var(--tm-muted); }
.ni-pills .tm-chip i { font-size: .55rem; opacity: .75; }

/* Economic Indicators: region · type · series · search · years on one laptop row,
   the Every reading / Latest of each series switch in the filter head */
@media (min-width: 640px) and (max-width: 1023px) {
  .ni-econ-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .ni-econ-filters { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1.25fr) minmax(0, .75fr) minmax(0, .75fr) auto; }
  .ni-econ-filters .wide { grid-column: auto; }
}
.ni-view > a.is-on { color: var(--analysis-control-text); background: var(--analysis-control-bg); box-shadow: inset 0 0 0 1px var(--analysis-control-ring); }
.ni-series { color: inherit; text-decoration: none; }
.ni-series:hover { color: var(--tm-accent); text-decoration: underline; }

/* ── KPI tiles: fixed column counts per page ── */
.ni-kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ni-kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .ni-kpis-4, .ni-kpis-5 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .ni-kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
a.tm-kpi { display: block; text-decoration: none; color: inherit; }
a.tm-kpi:hover { border-color: var(--tm-accent); }
a.tm-kpi.is-on { border-color: var(--tm-accent); box-shadow: 0 0 0 2px var(--tm-accent-bg); }
.tm-kpi > span i { font-size: .66rem; color: var(--tm-faint); }

/* ── Workflow stepper (dividend / right-share status pipeline) ── */
.ni-steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .35rem; padding: .75rem 1rem; }
.ni-step { position: relative; display: block; min-width: 0; padding: .55rem .65rem .6rem; border-radius: 12px; border: 1px solid var(--tm-line); background: var(--tm-bg-soft); text-decoration: none; color: inherit; }
.ni-step::before { content: ""; position: absolute; left: .65rem; right: .65rem; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--tm-faint); }
.ni-step.info::before { background: var(--tm-info); } .ni-step.warn::before { background: var(--tm-warn); }
.ni-step.accent::before { background: var(--tm-accent); } .ni-step.up::before { background: var(--tm-up); }
.ni-step.down::before { background: var(--tm-down); } .ni-step.muted::before { background: var(--tm-faint); }
.ni-step > span { display: block; font-size: .56rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ni-step > b { display: block; margin-top: .1rem; font-size: 1.05rem; font-weight: 900; line-height: 1.2; color: var(--tm-text); font-variant-numeric: tabular-nums; }
.ni-step > small { display: block; font-size: .6rem; color: var(--tm-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.ni-step:hover { border-color: var(--tm-accent); background: var(--tm-bg); }
.ni-step.is-on { border-color: var(--tm-accent); box-shadow: 0 0 0 2px var(--tm-accent-bg); background: var(--tm-bg); }
.ni-step .ni-step-arrow { position: absolute; right: -.55rem; top: 50%; transform: translateY(-50%); z-index: 1; font-size: .6rem; color: var(--tm-faint); }

/* ── Ranked list (top dividends, top rights, leaders) ── */
.ni-rank { list-style: none; margin: 0; padding: .35rem .5rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0 1rem; }
.ni-rank li { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr) 4.5rem auto; align-items: center; gap: .5rem; padding: .35rem .4rem; border-bottom: 1px solid var(--tm-line-soft); font-size: .72rem; }
.ni-rank li:last-child { border-bottom: 0; }
.ni-rank .n { font-size: .6rem; font-weight: 800; color: var(--tm-faint); text-align: right; }
.ni-rank .who { min-width: 0; display: flex; flex-direction: column; }
.ni-rank .who small { font-size: .6rem; color: var(--tm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ni-rank .tm-meter { width: 100%; }
.ni-rank .val { font-weight: 800; color: var(--tm-text); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Compact key/value rows (sector summaries, record details, fund facts) */
.ni-rows { margin: 0; padding: 0; list-style: none; }
.ni-rows li, .ni-rows > div { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .4rem 1rem; border-bottom: 1px solid var(--tm-line-soft); font-size: .72rem; }
.ni-rows li:last-child, .ni-rows > div:last-child { border-bottom: 0; }
.ni-rows .k { color: var(--tm-text-2); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ni-rows .v { color: var(--tm-text); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ni-rows .v small { font-weight: 600; color: var(--tm-muted); }
.ni-rows .v .tm-badge { margin-left: .3rem; }
.ni-counts { display: inline-flex; gap: .35rem; }
.ni-counts b { display: inline-block; min-width: 1.6rem; padding: .05rem .3rem; border-radius: 6px; text-align: center; font-size: .6rem; font-weight: 800; background: var(--tm-bg-sunk); color: var(--tm-text-2); }
.ni-counts b.info { color: var(--tm-info); background: var(--tm-info-bg); } .ni-counts b.warn { color: var(--tm-warn); background: var(--tm-warn-bg); }
.ni-counts b.accent { color: var(--tm-accent); background: var(--tm-accent-bg); } .ni-counts b.up { color: var(--tm-up); background: var(--tm-up-bg); }
.ni-counts b.down { color: var(--tm-down); background: var(--tm-down-bg); }
.ni-legend { display: inline-flex; flex-wrap: wrap; gap: .25rem .5rem; font-size: .58rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--tm-faint); }
.ni-legend i { display: inline-block; width: .5rem; height: .5rem; border-radius: 3px; margin-right: .2rem; vertical-align: middle; background: var(--tm-faint); }
.ni-legend i.info { background: var(--tm-info); } .ni-legend i.warn { background: var(--tm-warn); } .ni-legend i.accent { background: var(--tm-accent); } .ni-legend i.up { background: var(--tm-up); } .ni-legend i.down { background: var(--tm-down); }

/* ── Tables ── */
.tm-table .sym, .ni-sym { font-weight: 800; color: var(--tm-text); background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 800; text-decoration: none; text-align: left; }
.tm-table .sym:hover, .ni-sym:hover { color: var(--tm-accent); }
.tm-table td.wrap { white-space: normal; min-width: 14rem; max-width: 26rem; line-height: 1.4; }
.tm-table td.muted { color: var(--tm-muted); }
.tm-table td.strong { font-weight: 800; color: var(--tm-text); }
/* Economic Indicators · event records: the description is the record, so it gets room. */
.ni-events td.wrap { min-width: 18rem; max-width: 44rem; }
.tm-table td.num, .tm-table th.num { font-variant-numeric: tabular-nums; }
.tm-table .sub { display: block; max-width: 12rem; font-size: .6rem; font-weight: 500; color: var(--tm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-table th.act, .tm-table td.act { text-align: right; width: 1%; }
.ni-row-actions { display: inline-flex; gap: .25rem; }
.ni-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 7px; border: 1px solid var(--tm-line); background: var(--tm-bg); color: var(--tm-muted); text-decoration: none; font-size: .6rem; }
.ni-icon-btn:hover { color: var(--tm-accent); border-color: var(--tm-accent); }
.ni-icon-btn.danger:hover { color: var(--tm-down); border-color: var(--tm-down); }
.ni-count { font-size: .62rem; font-weight: 800; color: var(--tm-muted); white-space: nowrap; }
.ni-count b { color: var(--tm-text); }
.tm-head .ni-head-aside { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }

/* ── Pagination ── */
.tm-pages nav { display: inline-flex; gap: .2rem; }
.tm-pages nav a, .tm-pages nav span.cur { display: inline-flex; align-items: center; justify-content: center; min-width: 1.8rem; height: 1.8rem; padding: 0 .45rem; border-radius: 7px; border: 1px solid var(--tm-line); background: var(--tm-bg); font-size: .64rem; font-weight: 800; color: var(--tm-text-2); text-decoration: none; }
.tm-pages nav a:hover { border-color: var(--tm-accent); color: var(--tm-accent); }
.tm-pages nav span.cur { color: var(--analysis-control-text); background: var(--analysis-control-bg); border-color: var(--analysis-control-ring); }
.tm-pages nav span.gap { display: inline-flex; align-items: center; padding: 0 .2rem; color: var(--tm-faint); }

/* ── News cards (Market News, Company News, Circulars) ── */
.ni-news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: .75rem; }
.ni-news-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.ni-news-card .cover { display: block; aspect-ratio: 16 / 8; overflow: hidden; background: var(--tm-bg-sunk); }
.ni-news-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ni-news-card .body { display: flex; flex-direction: column; gap: .45rem; padding: .8rem .9rem; flex: 1; }
.ni-news-card .tags { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.ni-news-card h3 { margin: 0; font-size: .86rem; font-weight: 800; line-height: 1.35; color: var(--tm-text); }
.ni-news-card h3 a { color: inherit; text-decoration: none; }
.ni-news-card h3 a:hover { color: var(--tm-accent); }
.ni-news-card p { margin: 0; font-size: .72rem; line-height: 1.5; color: var(--tm-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ni-news-card .meta { display: flex; flex-wrap: wrap; gap: .25rem .6rem; font-size: .62rem; color: var(--tm-faint); }
.ni-news-card .meta b { color: var(--tm-text-2); font-weight: 700; }
.ni-news-card .meta a { color: var(--tm-accent); font-weight: 800; text-decoration: none; }
.ni-news-card .meta a:hover { text-decoration: underline; }
.ni-news-card .foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .5rem; border-top: 1px solid var(--tm-line-soft); font-size: .64rem; }
.ni-news-card .foot .links { display: flex; flex-wrap: wrap; gap: .6rem; }
.ni-news-card .foot .links a { color: var(--tm-accent); font-weight: 800; text-decoration: none; }
.ni-news-card .foot .links a:hover { text-decoration: underline; }
.ni-news-card .foot .links a.ext { color: var(--tm-muted); }
.ni-syms { display: flex; flex-wrap: wrap; gap: .25rem; }
.ni-syms .tm-chip { padding: .1rem .4rem; font-size: .58rem; }

/* ── Article (news detail) ── */
.ni-article { overflow: hidden; }
.ni-article .cover { max-height: 22rem; overflow: hidden; background: var(--tm-bg-sunk); }
.ni-article .cover img { width: 100%; height: 100%; max-height: 22rem; object-fit: cover; display: block; }
.ni-article .body { padding: 1.4rem 1.6rem 1.6rem; }
.ni-article .tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.ni-article h2 { margin: .8rem 0 0; font-size: 1.55rem; font-weight: 900; line-height: 1.2; letter-spacing: -.01em; color: var(--tm-text); }
.ni-article .lead { margin: .8rem 0 0; font-size: .95rem; line-height: 1.55; color: var(--tm-text-2); }
.ni-article .meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: 1rem; padding: .65rem 0; border-top: 1px solid var(--tm-line); border-bottom: 1px solid var(--tm-line); font-size: .72rem; color: var(--tm-muted); }
.ni-article .meta b { color: var(--tm-text); font-weight: 800; }
.ni-article .meta i { margin-right: .3rem; }
.ni-prose { margin-top: 1.1rem; font-size: .92rem; line-height: 1.75; color: var(--tm-text-2); }
.ni-prose p { margin: 0 0 1rem; }
.ni-prose p:last-child { margin-bottom: 0; }
.ni-article .after { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.2rem; padding-top: .9rem; border-top: 1px solid var(--tm-line); font-size: .7rem; color: var(--tm-muted); }
.ni-aside { display: flex; flex-direction: column; gap: 1rem; }
.ni-related { list-style: none; margin: 0; padding: 0; }
.ni-related li { padding: .55rem 1rem; border-bottom: 1px solid var(--tm-line-soft); }
.ni-related li:last-child { border-bottom: 0; }
.ni-related a { font-size: .74rem; font-weight: 700; color: var(--tm-text); text-decoration: none; line-height: 1.35; display: block; }
.ni-related a:hover { color: var(--tm-accent); }
.ni-related small { display: block; margin-top: .15rem; font-size: .6rem; color: var(--tm-faint); }
.ni-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; padding: .75rem 1rem; }
.ni-facts div { min-width: 0; }
.ni-facts span { display: block; font-size: .56rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tm-muted); }
.ni-facts b { display: block; margin-top: .1rem; font-size: .78rem; font-weight: 800; color: var(--tm-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ni-facts b a { color: var(--tm-accent); text-decoration: none; }
.ni-facts b a:hover { text-decoration: underline; }
.ni-doc { display: flex; align-items: center; gap: .6rem; margin: .75rem 1rem; padding: .6rem .75rem; border-radius: 12px; border: 1px dashed var(--tm-line); font-size: .7rem; color: var(--tm-muted); text-decoration: none; }
.ni-doc:hover { border-color: var(--tm-accent); color: var(--tm-text); }
.ni-doc i { font-size: 1rem; color: var(--tm-down); }
.ni-doc b { color: var(--tm-text); }

/* ── Version history timeline ── */
.ni-timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--tm-line); display: flex; flex-direction: column; gap: .8rem; }
.ni-timeline > li { position: relative; }
.ni-timeline > li::before { content: ""; position: absolute; left: -1.55rem; top: .85rem; width: .7rem; height: .7rem; border-radius: 999px; background: var(--tm-faint); border: 2px solid var(--tm-bg); }
.ni-timeline > li.is-current::before { background: var(--tm-accent); }
.ni-version { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; padding: .7rem 1rem; border-bottom: 1px solid var(--tm-line); }
.ni-version h3 { margin: 0; font-size: .82rem; font-weight: 800; color: var(--tm-text); display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.ni-version p { margin: .15rem 0 0; font-size: .66rem; color: var(--tm-muted); }
.ni-changes { width: 100%; border-collapse: collapse; font-size: .7rem; }
.ni-changes th { width: 9rem; padding: .45rem 1rem; text-align: left; vertical-align: top; font-size: .58rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--tm-muted); border-bottom: 1px solid var(--tm-line-soft); }
.ni-changes td { padding: .45rem 1rem; vertical-align: top; border-bottom: 1px solid var(--tm-line-soft); color: var(--tm-text-2); }
.ni-changes tr:last-child th, .ni-changes tr:last-child td { border-bottom: 0; }
.ni-diff { font-family: var(--font-mono); font-size: .66rem; line-height: 1.5; border-radius: 8px; overflow: hidden; border: 1px solid var(--tm-line-soft); }
.ni-diff div { padding: .1rem .5rem; white-space: pre-wrap; }
.ni-diff .add { background: var(--tm-up-bg); color: var(--tm-up); }
.ni-diff .del { background: var(--tm-down-bg); color: var(--tm-down); }
.ni-before { color: var(--tm-faint); text-decoration: line-through; }
.ni-after { color: var(--tm-text); font-weight: 700; }

/* ── Mutual fund sub-tabs (Summary · Closed · Open · Matured) ── */
.ni-subnav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.ni-subnav .tm-seg > a.is-on { color: var(--analysis-control-text); background: var(--analysis-control-bg); box-shadow: inset 0 0 0 1px var(--analysis-control-ring); }
.ni-subnav .tm-seg > a small { margin-left: .2rem; padding: 0 .3rem; border-radius: 5px; font-size: .58rem; background: rgba(0,0,0,.08); }
.dark .ni-subnav .tm-seg > a small { background: rgba(255,255,255,.12); }
.ni-subnav .ni-actions { margin-left: auto; }

/* ── Circular rows ── */
.ni-circulars { list-style: none; margin: 0; padding: 0; }
.ni-circulars li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; gap: .75rem; align-items: start; padding: .75rem 1rem; border-bottom: 1px solid var(--tm-line-soft); }
.ni-circulars li:last-child { border-bottom: 0; }
.ni-circulars .when { font-size: .66rem; font-weight: 800; color: var(--tm-text-2); font-variant-numeric: tabular-nums; }
.ni-circulars .when small { display: block; font-weight: 600; color: var(--tm-faint); }
.ni-circulars h3 { margin: 0; font-size: .8rem; font-weight: 800; line-height: 1.35; color: var(--tm-text); }
.ni-circulars p { margin: .25rem 0 0; font-size: .7rem; line-height: 1.5; color: var(--tm-muted); }
.ni-circulars .tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.ni-circulars .act { display: flex; gap: .3rem; align-items: center; }

/* ── Forms ── */
.ni-form { display: flex; flex-direction: column; gap: 1rem; }
.ni-form-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.ni-back { display: inline-flex; align-items: center; gap: .4rem; font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tm-muted); text-decoration: none; }
.ni-back:hover { color: var(--tm-accent); }
.ni-back i { font-size: .58rem; }
.ni-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; padding: 1rem; }
.ni-fields.cols-1 { grid-template-columns: 1fr; }
.ni-fields.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ni-field { min-width: 0; }
.ni-field.wide { grid-column: 1 / -1; }
.ni-field > label { display: block; margin-bottom: .3rem; font-size: .66rem; font-weight: 800; letter-spacing: .04em; color: var(--tm-text-2); }
.ni-field > label .req { color: var(--tm-down); }
.ni-field > label .note { font-weight: 600; color: var(--tm-faint); }
.ni-field .help { margin: .3rem 0 0; font-size: .64rem; line-height: 1.4; color: var(--tm-muted); }
.ni-field .err { margin: .3rem 0 0; font-size: .66rem; font-weight: 700; color: var(--tm-down); }
.ni-field .err ul { margin: 0; padding: 0; list-style: none; }
.ni-form :where(input:not([type=checkbox], [type=radio], [type=file]), select, textarea), .f-input {
  width: 100%; height: 38px; padding: 0 .75rem; font-size: .8rem; font-weight: 600; color: var(--tm-text); background: var(--tm-bg);
  border: 1px solid var(--tm-line); border-radius: 9px; transition: border-color .15s, box-shadow .15s; box-sizing: border-box; }
.ni-form :where(textarea), textarea.f-input { height: auto; min-height: 5.5rem; padding: .55rem .75rem; line-height: 1.55; resize: vertical; font-weight: 500; }
.ni-form :where(input, select, textarea):focus, .f-input:focus { outline: none; border-color: var(--tm-accent); box-shadow: 0 0 0 3px var(--tm-accent-bg); }
.ni-form :where(input, select, textarea)::placeholder { color: var(--tm-faint); font-weight: 500; }
.ni-form :where(input[type=file]) { font-size: .74rem; color: var(--tm-muted); }
.ni-form :where(select) { appearance: none; -webkit-appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2394a3b8'%3E%3Cpath d='M4.2 6.2a.8.8 0 0 1 1.1 0L8 8.9l2.7-2.7a.8.8 0 1 1 1.1 1.1l-3.2 3.3a.8.8 0 0 1-1.2 0L4.2 7.3a.8.8 0 0 1 0-1.1z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; background-size: .9rem; }
.dark .ni-form :where(input[type=date], input[type=datetime-local], input[type=time])::-webkit-calendar-picker-indicator { filter: invert(.8); }
.ni-form .is-invalid :where(input, select, textarea) { border-color: var(--tm-down); }
/* Adornments: a "%" / "Rs" prefix sits inside the box, so the input is
   inset far enough that a typed value never renders underneath it. */
.ni-prefix { position: relative; }
.ni-prefix > span { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); font-size: .7rem; font-weight: 800; color: var(--tm-faint); pointer-events: none; }
.ni-prefix > input { padding-left: 2.5rem; }
.ni-field-note { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .3rem; font-size: .62rem; color: var(--tm-faint); }
.ni-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .85rem 1rem; border-top: 1px solid var(--tm-line); }
.ni-form-actions .spacer { flex: 1; }
.ni-errors { padding: .6rem .9rem; border-radius: 10px; font-size: .72rem; font-weight: 600; color: var(--tm-down); background: var(--tm-down-bg); }
.ni-errors ul { margin: 0; padding-left: 1rem; }
.ni-preview { margin: 0 1rem 1rem; padding: .7rem .9rem; border-radius: 12px; border: 1px solid var(--tm-line); background: var(--tm-bg-soft); font-size: .72rem; color: var(--tm-text-2); line-height: 1.5; }
.ni-preview b { color: var(--tm-text); }
.ni-preview code { font-size: .66rem; padding: 0 .3rem; border-radius: 4px; background: var(--tm-bg-sunk); }
.ni-status-note { margin: .4rem 0 0; font-size: .64rem; color: var(--tm-muted); line-height: 1.45; }
.ni-status-note b { color: var(--tm-text-2); }
.ni-cover-preview { display: block; width: 100%; height: 6rem; margin-top: .5rem; border-radius: 10px; object-fit: cover; border: 1px solid var(--tm-line); }

/* Upload drop zone */
.ni-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: 1.4rem 1rem; border-radius: 12px; border: 2px dashed var(--tm-line); background: var(--tm-bg-soft); text-align: center; font-size: .72rem; color: var(--tm-muted); cursor: pointer; }
.ni-drop:hover { border-color: var(--tm-accent); }
.ni-drop i { font-size: 1.4rem; color: var(--tm-faint); }
.ni-drop b { color: var(--tm-text); }
.ni-drop input[type=file] { display: none; }
.ni-drop .file { font-weight: 800; color: var(--tm-accent); }
.ni-guide summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem 1rem; cursor: pointer; font-size: .74rem; font-weight: 800; color: var(--tm-text); list-style: none; }
.ni-guide summary::-webkit-details-marker { display: none; }
.ni-guide summary i { font-size: .6rem; color: var(--tm-faint); transition: transform .15s; }
.ni-guide[open] summary i { transform: rotate(180deg); }
.ni-guide summary small { font-weight: 600; color: var(--tm-muted); }
.ni-guide + .ni-guide { border-top: 1px solid var(--tm-line-soft); }
.ni-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .5rem; padding: .75rem 1rem; }
.ni-template { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .7rem; border-radius: 12px; border: 1px solid var(--tm-line); background: var(--tm-bg-soft); text-decoration: none; color: inherit; }
.ni-template:hover { border-color: var(--tm-accent); }
.ni-template b { display: block; font-size: .72rem; color: var(--tm-text); text-transform: capitalize; }
.ni-template small { display: block; font-size: .6rem; color: var(--tm-muted); }
.ni-template i { color: var(--tm-accent); }

/* ── Delete confirmation ── */
.ni-danger { border-color: rgba(225,29,72,.35); }
.ni-danger .tm-head { background: var(--tm-down-bg); border-bottom-color: rgba(225,29,72,.25); }
.ni-danger .tm-head h3 { color: var(--tm-down); }
.ni-danger .tm-head h3 i { margin-right: .35rem; }
.ni-warn { display: flex; gap: .6rem; margin: 1rem 1rem 0; padding: .65rem .8rem; border-radius: 10px; font-size: .72rem; line-height: 1.45; color: var(--tm-warn); background: var(--tm-warn-bg); }
.ni-warn i { margin-top: .15rem; }
.ni-record { margin: 1rem; border: 1px solid var(--tm-line); border-radius: 12px; overflow: hidden; }
.ni-record .tm-eyebrow { display: block; padding: .45rem .9rem; background: var(--tm-bg-soft); border-bottom: 1px solid var(--tm-line); }
.ni-record dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; }
.ni-record dl > div { display: flex; flex-direction: column; gap: .1rem; padding: .5rem .9rem; border-bottom: 1px solid var(--tm-line-soft); min-width: 0; }
.ni-record dt { font-size: .56rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tm-muted); }
.ni-record dd { margin: 0; font-size: .76rem; font-weight: 700; color: var(--tm-text); overflow-wrap: anywhere; }
.ni-record dl > div.wide { grid-column: 1 / -1; }

/* ── Dashboard ── */
.ni-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: .6rem; }
.ni-area { display: flex; align-items: center; gap: .65rem; padding: .7rem .8rem; border-radius: 14px; border: 1px solid var(--tm-line); background: var(--tm-bg); text-decoration: none; color: inherit; min-width: 0; box-shadow: var(--tm-shadow); }
.ni-area:hover { border-color: var(--tm-accent); }
.ni-area .ic { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 11px; color: #fff; font-size: .9rem; flex: none; }
.ni-area .ic.news { background: linear-gradient(135deg, #be123c, #f43f5e); } .ni-area .ic.actions { background: linear-gradient(135deg, #047857, #10b981); }
.ni-area .ic.market { background: linear-gradient(135deg, #4338ca, #818cf8); } .ni-area .ic.info { background: linear-gradient(135deg, #0369a1, #38bdf8); }
.ni-area .ic.warn { background: linear-gradient(135deg, #b45309, #f59e0b); } .ni-area .ic.muted { background: linear-gradient(135deg, #475569, #94a3b8); }
.ni-area b { display: block; font-size: .78rem; color: var(--tm-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ni-area small { display: block; font-size: .64rem; color: var(--tm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ni-area .n { margin-left: auto; font-size: 1rem; font-weight: 900; color: var(--tm-text); font-variant-numeric: tabular-nums; }
.ni-feed { list-style: none; margin: 0; padding: 0; }
.ni-feed li { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: .6rem; padding: .55rem 1rem; border-bottom: 1px solid var(--tm-line-soft); }
.ni-feed li:last-child { border-bottom: 0; }
.ni-feed .when { font-size: .62rem; font-weight: 800; color: var(--tm-muted); line-height: 1.3; }
.ni-feed .when b { display: block; font-size: .82rem; color: var(--tm-text); }
.ni-feed h4 { margin: 0; font-size: .74rem; font-weight: 700; line-height: 1.35; color: var(--tm-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ni-feed h4 a { color: inherit; text-decoration: none; } .ni-feed h4 a:hover { color: var(--tm-accent); }
.ni-feed .meta { margin-top: .2rem; display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: center; font-size: .6rem; color: var(--tm-faint); }
.ni-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .5rem; padding: .75rem 1rem; }
.ni-quick a { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; border-radius: 12px; border: 1px solid var(--tm-line); background: var(--tm-bg-soft); font-size: .7rem; font-weight: 800; color: var(--tm-text); text-decoration: none; }
.ni-quick a:hover { border-color: var(--tm-accent); color: var(--tm-accent); }
.ni-quick a i { width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 8px; background: var(--tm-accent-bg); color: var(--tm-accent); font-size: .66rem; }

/* ── Phones ── */
@media (max-width: 639px) {
  .ni-page { gap: .75rem; }
  .ni-grid.cols-2, .ni-grid.cols-3, .ni-grid.cols-2-3, .ni-grid.cols-3-2, .ni-grid.cols-main-aside { grid-template-columns: 1fr; }
  .ni-nav-more { display: none; }
  .ni-domain { padding: .3rem .55rem; font-size: .56rem; }
  .ni-btn { height: 32px; padding: 0 .7rem; font-size: .62rem; }
  .ni-form-filters .wide { grid-column: span 2; }
  .ni-steps { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto; gap: .4rem; padding: .6rem .75rem; }
  .ni-step .ni-step-arrow { display: none; }
  .ni-step > b { font-size: .95rem; }
  .ni-rank { grid-template-columns: 1fr; padding: .25rem .25rem; }
  .ni-rank li { grid-template-columns: 1.3rem minmax(0, 1fr) 3rem auto; }
  .ni-fields, .ni-fields.cols-3 { grid-template-columns: 1fr; padding: .85rem; }
  .ni-form-actions { flex-direction: column; align-items: stretch; }
  .ni-form-actions .spacer { display: none; }
  .ni-form-actions .ni-btn { width: 100%; }
  .ni-record dl { grid-template-columns: 1fr; }
  .ni-article .body { padding: 1rem .9rem 1.1rem; }
  .ni-article h2 { font-size: 1.2rem; }
  .ni-article .lead { font-size: .84rem; }
  .ni-prose { font-size: .84rem; line-height: 1.65; }
  .ni-circulars li { grid-template-columns: 1fr; gap: .3rem; }
  .ni-circulars .when small { display: inline; margin-left: .3rem; }
  .ni-facts { grid-template-columns: 1fr 1fr; }
  .ni-feed li { grid-template-columns: 2.8rem minmax(0, 1fr); padding: .5rem .75rem; }
  .ni-news-grid { grid-template-columns: 1fr; }
  .ni-changes th { width: 6rem; padding: .4rem .6rem; }
  .ni-changes td { padding: .4rem .6rem; }
  .ni-timeline { padding-left: .8rem; }
  .ni-timeline > li::before { left: -1.25rem; }
  .ni-subnav .ni-actions { margin-left: 0; width: 100%; }
  .ni-filters .pxf-head > .ni-filters-aside { grid-column: 1 / -1; }
  .ni-subnav .ni-actions .ni-btn { flex: 1; }
  .ni-areas { grid-template-columns: 1fr 1fr; }
  .ni-area { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .ni-area .n { margin-left: 0; }
  .ni-tab-hide-phone { display: none; }
  .tm-table .sub { max-width: 8rem; }
}
