/* The interval and tender-offer fund page's figures, on top of
   /notes/dashboard/dashboard.css (which sets the panels, bars, legends and
   table twins). Figures are ink, never blue: blue text on a light ground is a
   link (sqx_site.md design rules). Each part box is its own .dash block. */
.app-part[data-app="funds-interval"] { margin: 16px 0 24px; }
.fi-kpis .kpi-value { color: var(--ink); }

/* monthly columns: one stacked column per month, the count above it */
.fi-cols { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; align-items: end; height: 220px; }
.fi-col { display: grid; grid-template-rows: auto 1fr auto; align-items: end; justify-items: center; height: 100%; min-width: 0; border-radius: 4px; }
.fi-col:hover, .fi-col:focus-visible { background: var(--accent-wash); outline: none; }
.fi-stack { display: flex; flex-direction: column-reverse; gap: 2px; width: min(28px, 80%); height: calc(100% * var(--h)); min-height: 2px; align-self: end; }
.fi-seg { display: block; flex: 1 1 0; min-height: 1px; }
.fi-seg:last-child { border-radius: 4px 4px 0 0; }
.fi-ahead .fi-seg { opacity: 0.55; }
.fi-col-val { font-size: 12px; color: var(--text); font-variant-numeric: tabular-nums; }
.fi-col-label { font-size: 11.5px; color: var(--faint); margin-top: 6px; writing-mode: horizontal-tb; text-align: center; line-height: 1.2; }

/* tables: the upcoming deadlines, the examples and every fund */
.fi-note { font-size: 14px; color: var(--muted); margin: 0 0 10px; max-width: 76ch; }
.fi-example-head { margin: 0 0 10px; font-size: 15px; color: var(--text); }
.fi-table { overflow-x: auto; max-width: 100%; }
.fi-table table { display: table; width: 100%; border-collapse: collapse; font-size: 13.5px; }
.fi-table caption { caption-side: top; text-align: left; font-size: 13px; color: var(--muted); padding: 0 0 8px; }
.fi-table :is(th, td) { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.fi-table th { color: var(--ink); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.fi-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fi-family { display: block; font-size: 12px; color: var(--faint); text-transform: none; }
.fi-sort { all: unset; cursor: pointer; font: inherit; color: var(--ink); }
.fi-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
th[aria-sort="ascending"] .fi-sort::after { content: " \2191"; }
th[aria-sort="descending"] .fi-sort::after { content: " \2193"; }
.fi-funds, .fi-scroll { max-height: 70vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; }
.fi-scroll { max-height: 480px; }
.fi-scroll thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.fi-funds table { min-width: 1320px; }
.fi-funds td:first-child { min-width: 300px; white-space: normal; }
.fi-funds thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.fi-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 12px; }
.fi-controls input, .fi-controls select { font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); min-height: 42px; }
.fi-controls input { flex: 1 1 260px; min-width: 0; }
.fi-count { margin: 0; font-size: 13px; color: var(--muted); }
.fi-more { margin-top: 12px; }

@media (max-width: 760px) {
  .fi-cols { height: 180px; gap: 2px; }
  .fi-col-label { font-size: 10px; writing-mode: vertical-rl; transform: rotate(180deg); margin-top: 4px; }
  .fi-col-val { font-size: 10px; }
  .fi-table table { font-size: 13px; }
}

/* paired bars: sales beside redemptions on one zero-based scale */
.fi-pairs { height: 220px; }
.fi-pair-cols { display: flex; align-items: flex-end; gap: 2px; height: 100%; width: min(30px, 90%); align-self: end; }
.fi-pair-cols .fi-pair-bar { flex: 1 1 0; height: calc(100% * var(--f)); min-height: 1px; border-radius: 3px 3px 0 0; }
.fi-pairs .fi-col { grid-template-rows: 1fr auto; }
.fi-pairs-h { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fi-pair-row { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr) 6.5em; align-items: center; gap: 10px; border-radius: 4px; padding: 2px 4px; }
.fi-pair-row:hover, .fi-pair-row:focus-visible { background: var(--accent-wash); outline: none; }
.fi-pair-label { font-size: 13px; color: var(--text); }
.fi-pair-bars { display: grid; gap: 2px; }
.fi-pair-bars .fi-pair-bar { display: block; height: 10px; width: calc(100% * var(--f)); min-width: 1px; border-radius: 0 3px 3px 0; }
.fi-pair-note { font-size: 12.5px; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }

/* the fund list's open row */
.fi-open { all: unset; cursor: pointer; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
.fi-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fi-open[aria-expanded="true"] { font-weight: 700; }
.fi-detail-row > td { background: var(--accent-wash); padding: 14px 16px 18px; }
.fi-detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.fi-detail h4 { margin: 0 0 8px; font-size: 15px; color: var(--ink); }
.fi-detail .fi-table { max-height: 320px; overflow: auto; background: var(--panel); }
.fi-detail-wide { grid-column: 1 / -1; }
.fi-detail-inner { position: sticky; left: 16px; }
.fi-funds .fi-detail-row td { white-space: normal; }

/* field definitions */
.fi-fields { border-top: 1px solid var(--line); padding: 10px 0; }
.fi-fields summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; color: var(--ink); }
.fi-defs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 10px 0 0; font-size: 13.5px; }
.fi-defs dt { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.fi-defs dd { margin: 0; color: var(--text); }

@media (max-width: 760px) {
  .fi-pairs { height: 180px; }
  .fi-pair-row { grid-template-columns: minmax(0, 6.5em) minmax(0, 1fr) 5.5em; gap: 6px; }
  .fi-detail { grid-template-columns: minmax(0, 1fr); }
  .fi-defs { grid-template-columns: minmax(0, 1fr); }
  .fi-defs dd { margin-bottom: 6px; }
}

/* table cells hold their line (a date never breaks); a table wider than the
   column scrolls inside its frame, and only a fund name wraps */
.fi-table td { white-space: nowrap; }
.fi-table td:has(> a), .fi-table td:has(> .fi-open) { white-space: normal; min-width: 180px; }

/* source line under a chart, and the page's last step */
.dash .fi-source { margin: 10px 0 0; font-size: 12px; color: var(--faint); }
.fi-next { font-size: 17px; line-height: 1.55; color: var(--text); max-width: 76ch; margin: 0 0 16px; }
.fi-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .fi-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
