/* ═══════════════════════════════════════════════════════════════════════════
   15-structure.css: Capital structure (STRU, static/js/structure.js, .stru-*)
   and Financings (FINC, static/js/financings.js, .fin-*).

   FIFTEENTH file in the numeric-ordered set (load order IS the cascade; see
   CLAUDE.md). Rebuilt 2026-10-21 (Ticket 6 polish): the old dossier (.dil-*)
   is gone; Capital structure is the Financings board for one company with a
   summary strip under its bar. Table, chips, side panel: 66-table.css
   (.mpt-*) and the Corporate events block of 05-chart-panels.css (.cev-*).
   tokens.css colours, inset rings, no accent lines, sentence case.
   ═══════════════════════════════════════════════════════════════════════════ */

#structure-view{position:relative;}
.stru{flex:1 1 auto;display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--bg-primary);}
.stru-board{position:relative;flex:1 1 auto;display:flex;flex-direction:column;min-width:0;min-height:0;}
.stru-board > .mpt{flex:1 1 auto;}
/* The page bar leaves room for the floating view menu at the top right
   (same reserve as the stock Analysts view). */
.stru-page .mpt-bar{padding-right:calc(clamp(13.5rem, 9.5rem + 4.5vw, 16.25rem) + 2.5rem);}
@media (max-width:640px){ .stru-page .mpt-bar{padding-right:4.75rem;} }
.stru-title{display:inline-flex;align-items:baseline;gap:0;min-width:0;white-space:nowrap;}
.stru-sym,.stru-nm{font-family:var(--font-sans);letter-spacing:normal;}
.stru-sym{margin-left:12px;font-weight:600;color:var(--text-primary);}
.stru-nm{margin-left:8px;font-weight:400;color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;max-width:22rem;min-width:2.5rem;flex:0 1 auto;display:inline-block;white-space:nowrap;vertical-align:bottom;}
/* The page title gives way (the name ellipsizes) before Columns or CSV
   would slide under the view menu. */
.stru-page .mpt-title.stru-title{flex:0 1 auto;min-width:0;overflow:hidden;}
.stru-title > :not(.stru-nm){flex-shrink:0;}

/* Summary strip: label over value, the value's date beside it. One row,
   cells wrap only when the page is narrow. */
.stru-strip{flex:none;display:flex;flex-direction:column;padding:0 var(--mpt-padx, 12px);
  background:var(--mpt-bg, var(--bg-primary));box-shadow:inset 0 1px 0 var(--border-default);}
.stru-strip[hidden]{display:none;}
/* The figures left as a 4 x 2 grid of tiles, the share count chart right
   (Ali 10-21). Shelf / ATM / room / cap tiles fill the grid after the six.
   A long value's date gives way first. */
.stru-top{display:flex;align-items:stretch;min-width:0;}
.stru-cells{flex:1 1 auto;display:grid;grid-template-columns:repeat(4, minmax(0, 1fr));align-content:center;min-width:0;}
.stru-c{display:flex;flex-direction:column;justify-content:center;gap:2px;min-width:0;padding:7px 10px;
  box-shadow:inset 1px 0 0 var(--border-subtle);}
.stru-cells > .stru-c:nth-child(4n+1){padding-left:0;box-shadow:none;}
.stru-cells > .stru-c:nth-child(n+5){box-shadow:inset 1px 0 0 var(--border-subtle), inset 0 1px 0 var(--border-subtle);}
.stru-cells > .stru-c:nth-child(4n+1):nth-child(n+5){box-shadow:inset 0 1px 0 var(--border-subtle);}
.stru-cells .stru-l,.stru-cells .stru-v{overflow:hidden;text-overflow:ellipsis;}
.stru-cells .stru-d{min-width:0;overflow:hidden;text-overflow:ellipsis;}
.stru-l{color:var(--text-muted);white-space:nowrap;}
.stru-cells .stru-l{display:flex;align-items:baseline;gap:6px;min-width:0;}
.stru-cells .stru-ln{flex:none;}
.stru-cells .stru-d{font-size:11px;}
.stru-v{display:inline-flex;align-items:center;gap:6px;color:var(--text-primary);font-weight:600;
  font-variant-numeric:tabular-nums;white-space:nowrap;}
.stru-v .cev-doc{color:var(--text-primary);font-weight:600;}
.stru-v .cev-doc:hover{color:var(--text-secondary);}
.stru-v .cev-st{font-weight:400;}
.stru-d{font-weight:400;color:var(--text-muted);}
.stru-d.stru-old{opacity:.6;}
/* Share count chart: head line (name, 1y, 3y) over the line with its
   value axis right and years under. Hover = date + count. No fill. */
.stru-hist{flex:0 0 clamp(300px, 36%, 560px);display:flex;flex-direction:column;gap:2px;min-width:0;
  padding:7px 0 4px 14px;box-shadow:inset 1px 0 0 var(--border-default);}
.stru-hh{display:flex;align-items:baseline;gap:14px;min-width:0;white-space:nowrap;}
.stru-ht{color:var(--text-secondary);font-weight:600;overflow:hidden;text-overflow:ellipsis;}
.stru-chgs{display:inline-flex;gap:14px;margin-left:auto;}
.stru-chg{display:inline-flex;align-items:baseline;gap:5px;white-space:nowrap;}
.stru-chg .stru-l{color:var(--text-muted);}
.stru-cv{color:var(--text-primary);font-weight:600;font-variant-numeric:tabular-nums;}
.stru-chart{position:relative;flex:1 1 auto;height:84px;min-width:0;}
.stru-hist.stru-nochart{justify-content:center;}
.stru-svg{display:block;overflow:visible;}
.stru-gl{stroke:var(--border-subtle);stroke-width:1;shape-rendering:crispEdges;}
.stru-gy,.stru-gx{fill:var(--text-muted);font-size:11px;font-variant-numeric:tabular-nums;}
.stru-gx{text-anchor:middle;}
.stru-gline{fill:none;stroke:var(--text-primary);stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round;}
.stru-ga{fill:none;}
.stru-ge{fill:var(--text-primary);stroke:none;}
.stru-gh{stroke:var(--text-muted);stroke-width:1;shape-rendering:crispEdges;}
.stru-gd{fill:var(--text-primary);stroke:none;}
.stru-tip{position:absolute;top:0;z-index:5;display:flex;gap:8px;padding:3px 7px;border-radius:4px;pointer-events:none;
  white-space:nowrap;font-variant-numeric:tabular-nums;background:var(--bg-elevated, var(--bg-secondary));
  color:var(--text-primary);box-shadow:inset 0 0 0 1px var(--border-default);}
.stru-tip[hidden]{display:none;}
.stru-td{color:var(--text-muted);}
.stru-cna{display:flex;align-items:center;height:100%;}

/* Workspace pane: the strip compact, the table a pane board. */
.wks-dossier > .stru{position:absolute;inset:0;overflow:hidden;}
.stru-pane{container-type:inline-size;container-name:strupane;}
.stru-pane .stru-compact{padding:0 8px;box-shadow:inset 0 -1px 0 var(--border-default);}
.stru-pane .stru-c{padding:4px 8px;gap:1px;font-size:11px;}
.stru-pane .stru-v{gap:5px;}
.stru-pane .stru-hist{padding:4px 0 2px 10px;}
.stru-pane .stru-chart{height:64px;}
/* Pane tiles never cut text (T10 presets 2026-10-24: "Mkt value Oct..."
   in Biotech catalysts at 1280): the date moves under the value, the label
   line keeps only the label and its state tag, and a narrow pane lays the
   tiles three across so "Enterprise value" fits. */
.stru-pane .stru-cells .stru-c{display:grid;grid-template-columns:auto minmax(0, 1fr);column-gap:6px;
  align-content:center;row-gap:1px;}
.stru-pane .stru-cells .stru-l{display:contents;}
.stru-pane .stru-cells .stru-ln{grid-row:1;grid-column:1;color:var(--text-muted);white-space:nowrap;}
.stru-pane .stru-cells .stru-l > :not(.stru-ln):not(.stru-d){grid-row:1;grid-column:2;justify-self:start;}
.stru-pane .stru-cells .stru-v{grid-row:2;grid-column:1 / -1;}
.stru-pane .stru-cells .stru-d{grid-row:3;grid-column:1 / -1;white-space:nowrap;}
@container strupane (max-width:520px){
  .stru-pane .stru-cells{grid-template-columns:repeat(3, minmax(0, 1fr));}
  .stru-pane .stru-cells > .stru-c:nth-child(n){padding-left:8px;box-shadow:inset 1px 0 0 var(--border-subtle), inset 0 1px 0 var(--border-subtle);}
  .stru-pane .stru-cells > .stru-c:nth-child(3n+1){padding-left:0;box-shadow:inset 0 1px 0 var(--border-subtle);}
  .stru-pane .stru-cells > .stru-c:nth-child(-n+3){box-shadow:inset 1px 0 0 var(--border-subtle);}
  .stru-pane .stru-cells > .stru-c:first-child{box-shadow:none;}
}
/* A narrow pane or page: the chart moves under the figures, full width. */
@container strupane (max-width:900px){ .stru-pane .stru-top{flex-direction:column;}
  .stru-pane .stru-hist{flex:none;padding-left:0;box-shadow:inset 0 1px 0 var(--border-subtle);} }
@container mptpage (max-width:900px){ .stru-page .stru-top{flex-direction:column;}
  .stru-page .stru-hist{flex:none;padding-left:0;box-shadow:inset 0 1px 0 var(--border-subtle);} }

/* ═══ Ticket 6 N (2026-10-20): Financings (FINC) + Capital structure ═══════
   .fin-* = static/js/financings.js (the page, the FINC pane, the Financings
   section of Capital structure). Table, status chip, pills, expanded row:
   66-table.css (.mpt-*, .cev-*). tokens.css colours, no accent lines. */
.fin-surface{position:absolute;inset:0;display:none;flex-direction:column;min-width:0;min-height:0;background:var(--bg-primary);}
.fin-surface [hidden]{display:none!important;}
#research-view[data-rsx-mode="financings"] .fin-surface{display:flex;}
#research-view[data-rsx-mode="financings"] #research-iframe,
#research-view[data-rsx-mode="financings"] .rf-surface{display:none!important;}
#research-view[data-rsx-mode="financings"] .research-panel{display:none!important;}
.fin-t td.fin-ty{color:var(--text-primary);white-space:nowrap;}
.fin-t td.mpt-n{white-space:nowrap;}


/* Narrow STRU page: the bar shares its row with the view dropdown, so the
   status keeps only its dot (words in hover) and the name gives way first. */
@container mptpage (max-width:1080px){
  .stru-page .cev-status .cev-sw{display:none;}
  .stru-page .stru-nm{max-width:10rem;}
}
