/* ============================================================================
 * Welzin Financial Model & MIS - styles
 * Self-contained, offline. System font stack (no external fonts).
 * ========================================================================== */

:root {
  /* Welzin design-system palette (mirrors packages/brand/theme.css):
     cobalt #2b57c4 · ink #1a1712 · paper #faf7f1 · border #e8e1d2 */
  --ink:        #1a1712;  /* warm near-black (theme --color-ink) */
  --ink-soft:   #3a4350;
  --muted:      #5b6573;  /* ≥4.5:1 on white for small-text WCAG AA */
  --line:       #e8e1d2;  /* theme --color-border */
  --line-soft:  #EFF1F4;
  --bg:         #faf7f1;  /* warm paper canvas (theme --color-paper) */
  --panel:      #ffffff;
  --rail:       #191E25;  /* Eerie Black */
  --rail-soft:  #232b35;
  --rail-line:  #323b47;
  --rail-ink:   #aeb7c2;
  --violet:     #2b57c4;  /* accent = restrained cobalt (theme --color-primary) */
  --magenta:    #21408f;  /* deep cobalt (theme --color-primary-strong) */
  --grad:       linear-gradient(120deg, #3a6bd6 0%, #2b57c4 50%, #21408f 100%);
  --grad-soft:  linear-gradient(120deg, rgba(43,87,196,.10), rgba(33,64,143,.10));
  --good:       #1db98a;  /* theme --color-success */
  --good-bg:    #e3f7ef;
  --warn:       #c4810a;
  --warn-bg:    #fdf3df;
  --bad:        #d4344e;
  --bad-bg:     #fce8ec;
  --shadow:     0 1px 2px rgba(20,18,43,.04), 0 8px 24px rgba(20,18,43,.06);
  --shadow-lg:  0 12px 40px rgba(20,18,43,.16);
  --radius:     14px;
  --radius-sm:  9px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
.num, table.data td, table.data th, .k-val, .kpi .k-val, .sheet td, .sheet th { font-feature-settings: "tnum" 1, "cv01" 1; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

/* keyboard focus rings - visible only for keyboard nav, mouse clicks stay clean.
   Light ring on the dark topbar/nav; brand ring on light surfaces. */
.btn:focus-visible, .segmented button:focus-visible, .viewtabs button:focus-visible,
.field-inline select:focus-visible, .field-inline input:focus-visible {
  outline: 2px solid #8fb6ff; outline-offset: 2px;
}
.term:focus-visible, .addrow:focus-visible, .rail-toggle:focus-visible,
.minitable .del:focus-visible, .lever input:focus-visible {
  outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 4px;
}

/* ---- sticky header (top bar + section nav pinned together) --------------- */
.topstick { position: sticky; top: 0; z-index: 50; }

/* ---- top bar ------------------------------------------------------------- */
.topbar {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; row-gap: 4px;
  padding: 12px 22px;
  background: var(--rail);
  color: #fff;
  border-bottom: 1px solid var(--rail-line);
}
.brand { display: flex; align-items: center; gap: 11px; margin-right: 6px; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px; background: var(--grad);
  display: grid; place-items: center; font-weight: 800; color: #fff;
  box-shadow: 0 4px 14px rgba(31,73,182,.5);
}
.brand .title { font-family: var(--display); font-weight: 600; letter-spacing: 0; font-size: 18px; line-height: 1.15; }
.brand .title small { display: block; font-weight: 500; font-size: 11px; color: var(--rail-ink); letter-spacing: .02em; margin-top: 2px; }

.topbar .spacer { flex: 1; }
/* slogan sits on its own full-width line at the bottom of the header, right-aligned under the Download button */
.topbar .slogan { flex: 1 0 100%; text-align: right; font-style: italic; font-size: 12px; color: var(--rail-ink); letter-spacing: .02em; opacity: .85; transition: opacity .45s ease; }

.toolset { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.field-inline { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--rail-ink); }
.field-inline select, .field-inline input {
  background: var(--rail-soft); color: #fff; border: 1px solid var(--rail-line);
  border-radius: 8px; padding: 6px 9px; font-size: 12.5px; outline: none;
}
.field-inline input { width: 64px; }
.field-inline select { cursor: pointer; }

/* segmented control */
.segmented { display: inline-flex; background: var(--rail-soft); border: 1px solid var(--rail-line); border-radius: 9px; padding: 3px; }
.segmented button {
  border: 0; background: transparent; color: var(--rail-ink);
  padding: 5px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 600;
}
.segmented button.on { background: var(--grad); color: #fff; box-shadow: 0 2px 8px rgba(31,73,182,.45); }
.segmented.ccy button.on { background: #fff; color: var(--ink); }

.btn {
  border: 1px solid var(--rail-line); background: var(--rail-soft); color: #fff;
  padding: 8px 13px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px; transition: transform .05s ease;
}
.btn:hover { border-color: #4a447e; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--grad); border-color: transparent; box-shadow: 0 4px 16px rgba(31,73,182,.45); }
.btn.ghost { background: transparent; }

/* ---- view tabs ----------------------------------------------------------- */
.viewtabs { display: flex; gap: 4px; padding: 0 22px; background: var(--rail); }
.viewtabs button {
  border: 0; background: transparent; color: var(--rail-ink);
  padding: 10px 16px 12px; font-size: 13px; font-weight: 600;
  border-bottom: 2px solid transparent;
}
.viewtabs button.on { color: #fff; border-bottom-color: var(--magenta); }

/* ---- layout -------------------------------------------------------------- */
.layout { display: grid; grid-template-columns: var(--rail-w, 360px) 1fr; align-items: start; gap: 0; }
.layout.rail-collapsed { grid-template-columns: 36px 1fr; }
@media (max-width: 1100px) { .layout, .layout.rail-collapsed { grid-template-columns: 1fr; } }

/* rail header: heading + collapse toggle */
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 10px; }
.rail .rail-head h2 { margin: 0; }  /* specificity beats the later `.rail h2` rule */
.rail-toggle {
  flex: none; width: 24px; height: 24px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  display: grid; place-items: center; font-size: 15px; line-height: 1; padding: 0;
}
.rail-toggle:hover { color: var(--violet); border-color: var(--violet); }

/* draggable right-edge resize handle */
.rail-resize {
  position: absolute; top: 0; bottom: 0; right: 0; width: 6px;
  cursor: col-resize; user-select: none; touch-action: none;
}
.rail-resize:hover { background: linear-gradient(90deg, transparent, rgba(31,73,182,.25)); }

/* collapsed: thin strip showing only the toggle */
.layout.rail-collapsed .rail { padding: 12px 4px; }
.layout.rail-collapsed .rail h2,
.layout.rail-collapsed #levers,
.layout.rail-collapsed .rail-resize { display: none; }
.layout.rail-collapsed .rail-head { justify-content: center; margin: 0; }
.layout.rail-collapsed .rail-toggle { transform: rotate(180deg); }

/* ---- levers rail --------------------------------------------------------- */
.rail {
  position: sticky; top: var(--header-h, 90px); align-self: start;
  height: calc(100vh - var(--header-h, 90px)); overflow-y: auto;
  background: var(--panel); border-right: 1px solid var(--line);
  padding: 16px 16px 60px;
}
.rail h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 4px 0 10px; }

.group { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; background: var(--panel); }
.group > summary {
  list-style: none; cursor: pointer; padding: 11px 13px;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 650; font-size: 13px; color: var(--ink);
  background: var(--line-soft);
}
.group > summary::-webkit-details-marker { display: none; }
.group > summary .chev { color: var(--muted); transition: transform .15s ease; font-size: 11px; }
.group[open] > summary .chev { transform: rotate(90deg); }
.group .body { padding: 11px 13px; overflow-x: auto; }  /* wide minitables scroll rather than crush their columns */
.group .readout { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.group .readout b { color: var(--violet); font-weight: 700; }

/* lever rows */
.lever { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; margin: 9px 0; }
.lever label { font-size: 12.5px; color: var(--ink-soft); }
.lever .hint { font-size: 10.5px; color: var(--muted); }
.lever input[type="number"], .lever input[type="text"], .lever select {
  width: 96px; text-align: right; border: 1px solid var(--line); border-radius: 7px;
  padding: 6px 8px; font-size: 12.5px; color: var(--ink); background: #fff; outline: none;
}
.lever input:focus, .lever select:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(31,73,182,.14); }
.lever .suffix { position: relative; }

/* editable mini-tables (tiers, headcount, opex) */
.minitable { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; }
.minitable th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 4px 5px; font-weight: 600; }
.minitable td { padding: 2px 4px; }
.minitable input, .minitable select { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 4px 5px; font-size: 12px; background: #fff; outline: none; }
.minitable input:focus, .minitable select:focus { border-color: var(--violet); }
.minitable input.num { text-align: right; }

/* Multi-column plan tables (headcount, opex): fixed column widths so the Fn
   dropdown and the money amounts get real room instead of being crushed by the
   even width:100% split. Sized to fit the default rail without clipping; the
   group body scrolls only if the rail is dragged narrower. */
.minitable.hc, .minitable.ox { table-layout: fixed; }
.minitable.hc { min-width: 290px; }
.minitable.hc th:nth-child(1), .minitable.hc td:nth-child(1) { width: auto; }   /* Role */
.minitable.hc th:nth-child(2), .minitable.hc td:nth-child(2) { width: 56px; }   /* Fn */
.minitable.hc th:nth-child(3), .minitable.hc td:nth-child(3) { width: 34px; }   /* Mo */
.minitable.hc th:nth-child(4), .minitable.hc td:nth-child(4) { width: 30px; }   /* # */
.minitable.hc th:nth-child(5), .minitable.hc td:nth-child(5) { width: 78px; }   /* money */
.minitable.hc th:nth-child(6), .minitable.hc td:nth-child(6) { width: 22px; }   /* delete */
.minitable.ox { min-width: 320px; }
.minitable.ox th:nth-child(1), .minitable.ox td:nth-child(1) { width: auto; }   /* Cost */
.minitable.ox th:nth-child(2), .minitable.ox td:nth-child(2) { width: 52px; }   /* Fn */
.minitable.ox th:nth-child(3), .minitable.ox td:nth-child(3) { width: 56px; }   /* Type */
.minitable.ox th:nth-child(4), .minitable.ox td:nth-child(4) { width: 58px; }   /* Amt */
.minitable.ox th:nth-child(5), .minitable.ox td:nth-child(5) { width: 46px; }   /* ↑%/mo */
.minitable.ox th:nth-child(6), .minitable.ox td:nth-child(6) { width: 36px; }   /* COGS */
.minitable.ox th:nth-child(7), .minitable.ox td:nth-child(7) { width: 22px; }   /* delete */
.minitable .del { color: var(--bad); border: 0; background: transparent; font-size: 15px; line-height: 1; padding: 0 4px; }
.addrow { margin-top: 7px; border: 1px dashed var(--line); background: #fff; color: var(--violet); width: 100%; padding: 7px; border-radius: 7px; font-size: 12px; font-weight: 600; }
.addrow:hover { background: var(--grad-soft); }

/* ---- content ------------------------------------------------------------- */
.content { padding: 20px 24px 80px; min-width: 0; }
.note {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--grad-soft); border: 1px solid #d9e1f6; border-radius: var(--radius);
  padding: 11px 14px; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 18px;
}
.note b { color: var(--ink); }

/* KPI strip */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 15px; box-shadow: var(--shadow); position: relative; }
.kpi .k-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kpi .k-val { font-size: 23px; font-weight: 750; letter-spacing: -.02em; margin-top: 6px; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.kpi.hero { background: var(--rail); border-color: transparent; color: #fff; overflow: hidden; }
.kpi.hero::after { content:""; position:absolute; inset:0; background: var(--grad); opacity:.16; }
.kpi.hero .k-label { color: var(--rail-ink); }
.kpi.hero .k-val { color: #fff; position: relative; font-family: var(--display); font-weight: 600; font-size: 30px; }
.kpi.hero .k-sub { color: var(--rail-ink); }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px; margin-top: 8px; }
.badge .b-ic { font-size: 11px; line-height: 1; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad  { background: var(--bad-bg); color: var(--bad); }

/* KPI micro-trend sparkline */
.kpi .spark { width: 100%; height: 26px; display: block; margin-top: 10px; opacity: .9; }
.kpi.hero .spark { opacity: 1; }

/* cards / charts grid */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: 2fr 1fr; }
@media (max-width: 920px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card h3 { margin: 0 0 2px; font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: -.005em; }
.card .sub { font-size: 11.5px; color: var(--muted); margin-bottom: 12px; }
.card .legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-soft); margin-top: 8px; }
.card .legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* svg chart helpers */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
/* axis labels carry the .axis class directly on the <text>; target the
   element, not a descendant (the old `.axis text` selector matched nothing,
   so labels fell back to the ~16px SVG default). */
text.axis { fill: var(--muted); font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
text.axis.axis-y { font-size: 10.5px; }
text.axis.end-val { font-size: 11.5px; font-weight: 700; }
.gridline { stroke: var(--line-soft); stroke-width: 1; }
.chart .dot-label { fill: var(--ink-soft); font-size: 10px; font-weight: 600; }
.chart-donut { display: block; }
.chart-donut .donut-cap { fill: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.chart-donut .donut-val { fill: var(--ink); font-family: var(--display); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* data tables */
.tablewrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 8px 10px; text-align: right; white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; position: sticky; left: 0; background: var(--panel); }
table.data thead th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); font-weight: 600; }
table.data tbody tr { border-bottom: 1px solid var(--line-soft); }
table.data tbody tr.total { font-weight: 700; color: var(--ink); border-top: 1px solid var(--line); }
table.data tbody tr.total td { background: var(--line-soft); }
table.data .pos { color: var(--good); }
table.data .neg { color: var(--bad); }
table.data .em { font-weight: 650; }

/* use of funds donut + cap table */
.fund-grid { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: center; }
@media (max-width: 620px) { .fund-grid { grid-template-columns: 1fr; } }
.legend-list { display: flex; flex-direction: column; gap: 7px; }
.legend-list .row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.legend-list .row .l { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); }
.legend-list .row .v { font-weight: 650; font-variant-numeric: tabular-nums; }

/* MIS */
.mis-actual input { width: 92px; text-align: right; border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; font-size: 12px; background: #fffdf7; outline: none; }
.mis-actual input:focus { border-color: var(--violet); }
.var-pos { color: var(--good); font-weight: 650; }
.var-neg { color: var(--bad); font-weight: 650; }
/* non-color cue so variance direction survives colour-blindness / mono print */
.var-pos::before { content: "\25B2 "; font-size: 8px; vertical-align: 1px; }
.var-neg::before { content: "\25BC "; font-size: 8px; vertical-align: 1px; }
.cohort td { font-variant-numeric: tabular-nums; text-align: center; font-size: 11px; padding: 5px 6px; border-radius: 4px; }

.hide { display: none !important; }
.foot { color: var(--muted); font-size: 11px; padding: 8px 2px 0; }
.foot a { color: var(--violet); }

/* ======================================================================== */
/* CFO Cockpit additions: tooltips, section heads, the sheet grid, CM band  */
/* ======================================================================== */

.viewtabs { flex-wrap: wrap; }

/* glossary terms + floating tooltip (JS-positioned, never clipped) */
.term { border-bottom: 1px dotted currentColor; cursor: pointer; opacity: .96; text-underline-offset: 2px; }
.term:hover { color: var(--violet); }
.kpi.hero .term:hover, .topbar .term:hover { color: #9cc2ff; }
.tip {
  position: fixed; z-index: 200; max-width: 290px; pointer-events: none;
  background: #0e1320; color: #eef1f6; padding: 10px 12px; border-radius: 10px;
  font-size: 12px; line-height: 1.45; box-shadow: 0 14px 40px rgba(8,10,20,.4);
  border: 1px solid #2a3346; opacity: 0; transform: translateY(5px); transition: opacity .12s ease, transform .12s ease;
}
.tip.show { opacity: 1; transform: translateY(0); }
.tip .t-term { display: block; font-weight: 700; margin-bottom: 4px; color: #7fb0ff; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
.tip .t-formula { display: block; margin-top: 5px; font-family: var(--mono); font-size: 11px; color: #aeb7c2; }
.tip .t-more { display: block; margin-top: 7px; font-size: 10.5px; font-weight: 600; color: #7fb0ff; }

/* section header */
.section-head { margin: 2px 0 18px; }
.section-head h2 { font-family: var(--display); font-size: 25px; font-weight: 600; letter-spacing: -.015em; margin: 0; line-height: 1.05; }
.section-head .kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--violet); font-weight: 700; margin-bottom: 5px; }
.section-head p { color: var(--muted); font-size: 13px; margin: 5px 0 0; max-width: 76ch; }
.soon { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--violet); background: var(--grad-soft); border: 1px solid #d9e1f6; padding: 2px 8px; border-radius: 20px; margin-left: 8px; vertical-align: middle; }

/* contribution-margin band */
.cmband { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; background: var(--panel); box-shadow: var(--shadow); }
.cmband .seg { padding: 14px 16px; border-right: 1px solid var(--line); position: relative; }
.cmband .seg:last-child { border-right: 0; }
.cmband .seg.accent { background: var(--grad-soft); }
.cmband .seg .l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.cmband .seg .v { font-family: var(--display); font-size: 21px; font-weight: 600; margin-top: 4px; letter-spacing: -.01em; }
.cmband .seg .s { font-size: 11px; color: var(--muted); margin-top: 1px; }
.cmband .seg .v.neg { color: var(--bad); }

/* P&L contribution rows */
table.data tbody tr.cm td { background: rgba(31,73,182,.06); font-weight: 700; }
table.data tbody tr.cm td:first-child { color: var(--violet); }

/* the sheet - monthly grid */
.sheet-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
table.sheet { border-collapse: separate; border-spacing: 0; font-size: 11.5px; min-width: 100%; }
.sheet th, .sheet td { padding: 6px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
.sheet thead th { position: sticky; top: var(--header-h, 90px); background: var(--violet); color: #fff; font-size: 10.5px; font-weight: 600; z-index: 2; }
.sheet th:first-child, .sheet td:first-child { position: sticky; left: 0; text-align: left; background: var(--panel); z-index: 1; font-weight: 500; box-shadow: 1px 0 0 var(--line); min-width: 150px; }
.sheet thead th:first-child { z-index: 3; background: var(--violet); }
.sheet tbody tr:hover td { background: var(--line-soft); }
.sheet tbody tr:hover td:first-child { background: #eef0f6; }
.sheet tr.grp td { background: var(--line-soft); font-weight: 700; color: var(--ink-soft); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.sheet tr.em td { font-weight: 700; color: var(--ink); }
.sheet tr.em td:first-child { color: var(--violet); }
.sheet tr.em.dark td { background: rgba(31,73,182,.05); }
.sheet .neg { color: var(--bad); }
.sheet .yr { border-left: 2px solid var(--line); }

/* subtle accent strip under the nav */
.viewtabs { position: relative; }
.viewtabs::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(31,73,182,0), transparent); }

/* ---- Finance 101 --------------------------------------------------------- */
.f101-ref { display: grid; gap: 20px; margin-bottom: 8px; }
.f101-grptitle { font-family: var(--display); font-size: 18px; font-weight: 600; margin: 0 0 10px; }
.f101-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 12px; }
.f101-card { padding: 13px 14px; margin: 0; }
.f101-term { font-weight: 700; font-size: 13.5px; color: var(--ink); margin-bottom: 5px; }
.f101-def { margin: 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.f101-formula { margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.f101-bench { margin-top: 8px; font-size: 11px; font-weight: 600; color: var(--violet); }
.f101-chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.f101-chapter p { font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 9px; }
.f101-chapter p:last-child { margin-bottom: 0; }
.f101-list { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-soft); line-height: 1.7; }
.f101-list b { color: var(--ink); }
/* accounts journal worked-example table: left-aligned, readable, full-width */
table.acct-table { font-size: 12px; margin: 4px 0 2px; }
table.acct-table th, table.acct-table td { text-align: left; white-space: normal; vertical-align: top; padding: 7px 10px; }
table.acct-table th:first-child, table.acct-table td:first-child { position: static; background: transparent; }
table.acct-table thead th { color: var(--muted); }
table.acct-table td + td { font-family: var(--mono); font-size: 11px; color: var(--ink); white-space: nowrap; }
.f101-flash { animation: f101flash 1.2s ease; }
@keyframes f101flash { 0% { box-shadow: 0 0 0 3px var(--violet); } 100% { box-shadow: 0 0 0 0 rgba(31,73,182,0); } }
