/* finance-overview.css — Finance → Overview (2026-10-06). Namespace fov-: design-bridge.css
   rewrites .fin-* selectors, so nothing here borrows them. Tokens only (light + dark come
   together); hue only for month status. Phone: one column at 768, 44px+ tap targets. */

#fin-subtab-overview .fov-sec {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 16px 18px 18px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.fov-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.fov-label {
  margin: 0; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
}
.fov-note { font-size: var(--t-micro, 11px); color: var(--ink-3); font-weight: 500; }
.fov-num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.fov-ico { width: 16px; height: 16px; flex: none; }
.fov-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fov-error { padding: 24px 16px; text-align: center; color: var(--rust); background: var(--rust-bg); border-radius: var(--radius-lg); }
.fov-basis { margin: 12px 0 0; font-size: var(--t-micro, 11px); line-height: 1.5; color: var(--ink-3); }

/* Status chip: borderless tint, 22px, radius 6, 11px 600 caps (chips.md "Status"). */
.fov-chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
}
.fov-st-closed { background: var(--green-bg); color: var(--green-2); }
.fov-st-soft   { background: var(--sage-bg);  color: var(--ink); }
.fov-st-open   { background: var(--amber-bg); color: var(--ink); }
.fov-st-now    { background: var(--bg-2);     color: var(--ink-2); }

/* ── Months: one tappable tile per month, the reasons in a strip underneath ── */
/* One row while the months fit (Feb–Dec = 11 tiles at ≥ 88px), then wrap. */
.fov-months { display: flex; flex-wrap: wrap; gap: 8px; }
.fov-months > .fov-month { flex: 1 1 0; min-width: 88px; }
.fov-month {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  min-height: 60px; padding: 10px 10px 10px 12px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 10px;
  font: inherit; color: var(--ink); text-align: left; cursor: pointer;
  transition: border-color .15s, background .15s, transform .08s;
}
.fov-month-name { font-size: var(--t-lead, 14px); font-weight: 700; }
.fov-month[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.fov-month:active { transform: scale(.97); }
.fov-month:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
@media (hover: hover) { .fov-month:hover { background: var(--bg-2); } }

.fov-month-detail { margin-top: 12px; padding: 12px 14px; background: var(--bg-2); border-radius: 10px; }
.fov-month-detail:empty { display: none; }
.fov-detail-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.fov-detail-head strong { font-size: var(--t-lead, 14px); }
.fov-reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fov-reason { display: flex; align-items: flex-start; gap: 8px; font-size: var(--t-body, 13px); color: var(--ink); line-height: 1.4; }
.fov-reason .fov-ico { margin-top: 1px; }
.fov-reason-ok .fov-ico   { color: var(--green); }
.fov-reason-no .fov-ico   { color: var(--rust); }
.fov-reason-note          { color: var(--ink-2); }
.fov-reason-note .fov-ico { color: var(--amber); }

/* ── Cash & obligations: the hero number, then the ledger that makes it ── */
.fov-cash { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(280px, 1.6fr); gap: 20px; align-items: start; }
.fov-hero { display: flex; flex-direction: column; gap: 4px; padding: 4px 0; }
.fov-hero-label { font-size: var(--t-small, 12px); font-weight: 600; color: var(--ink-2); }
.fov-hero-num {
  font-family: var(--font-serif); font-size: var(--t-hero, 34px); font-weight: 700; line-height: 1.1;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.fov-ledger { display: grid; }
.fov-ledger-head {
  margin: 10px 0 2px; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
}
.fov-ledger-head:first-child { margin-top: 0; }
.fov-row {
  display: flex; justify-content: space-between; gap: 12px; padding: 5px 0;
  font-size: var(--t-body, 13px); color: var(--ink); border-bottom: 1px solid var(--line);
}
.fov-row-total { font-weight: 700; border-bottom-color: var(--line-strong); }
.fov-row-net { font-weight: 800; font-size: var(--t-lead, 14px); border-bottom: 0; border-top: 1px solid var(--ink); margin-top: 4px; padding-top: 7px; }
.fov-row-aside { color: var(--ink-2); border-bottom: 0; }

/* ── Goals: three tiles, the bridge, the cohort table ── */
.fov-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fov-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px;
  background: var(--bg-2); border-radius: 12px; min-width: 0;
}
.fov-tile-label { font-size: var(--t-small, 12px); font-weight: 600; color: var(--ink-2); }
.fov-tile-num {
  font-family: var(--font-serif); font-size: var(--t-display, 28px); font-weight: 700; line-height: 1.1;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
/* Meter: one neutral fill (magnitude), the target as an ink tick. No status hue. */
.fov-meter { position: relative; display: block; height: 6px; border-radius: 3px; background: var(--line); }
.fov-meter-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--ink-3); }
.fov-meter-target { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); }

.fov-bridge {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; margin: 14px 0 4px;
  padding: 10px 14px; border: 1px dashed var(--line-strong); border-radius: 10px;
  font-size: var(--t-body, 13px); color: var(--ink-2);
}
.fov-term b { color: var(--ink); font-variant-numeric: tabular-nums; font-size: var(--t-lead, 14px); }
.fov-op { color: var(--ink-3); font-weight: 700; }
.fov-bridge .fov-note { flex-basis: 100%; }

.fov-link {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; padding: 0;
  background: none; border: 0; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.fov-link .fov-ico { width: 13px; height: 13px; }
.fov-sync .fin-sync-dot { margin-right: 4px; vertical-align: middle; }
.fov-sync .fin-sync-sub { display: none; }

/* ── Financials: months whose revenue has not posted are greyed and say so ── */
/* (0,2,2) + loaded after finance.css, so it beats `.pnl tr.pnl-strong td` (subtotals in ink). */
.pnl tr th.pnl-unposted, .pnl tr td.pnl-unposted { color: var(--ink-3); background: var(--bg-2); }
.pnl tr td.pnl-unposted.pnl-neg { color: var(--ink-3); }
.pnl .pnl-unposted-tag {
  display: block; margin-top: 2px; font-size: 10px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-3);
}
.pnl-basis { margin: 0 0 10px; font-size: var(--t-micro, 11px); color: var(--ink-3); }

/* ── Phone ── */
@media (max-width: 768px) {
  #fin-subtab-overview .fov-sec { padding: 14px; border-radius: 12px; }
  .fov-months { display: grid; grid-template-columns: repeat(3, 1fr); }
  .fov-months > .fov-month { min-width: 0; }
  .fov-month { min-height: 56px; padding: 8px 10px; }
  /* "SOFT-CLOSED" in caps is ~80px and the tile has ~76px at 375: sentence case at the 11px floor fits. */
  .fov-month .fov-chip { font-size: 11px; padding: 0 6px; letter-spacing: 0; text-transform: none; }
  .fov-month { padding: 8px 8px 8px 10px; }
  .fov-cash { grid-template-columns: 1fr; gap: 12px; }
  .fov-tiles { grid-template-columns: 1fr; }
  .fov-link { min-height: 44px; }
  #fin-subtab-overview .fin-header .btn { min-height: 44px; padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) { .fov-month { transition: none; } .fov-month:active { transform: none; } }

/* The Monthly table (restored 2026-10-07) is wider than a phone. The pv2 skin clips
   .fin-monthly-wrap (overflow:hidden, for rounded corners), so on a phone its right-hand
   columns were unreachable; let it scroll sideways inside its card there. Desktop unchanged. */
@media (max-width: 767px) {
  #fov-monthly, #fov-monthly .fin-section { min-width: 0; max-width: 100%; }
  .pv2-root #fov-monthly .fin-monthly-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* The Monthly table's YTD total sits on TOP since 2026-10-07: rule under it, not over it. */
#fov-monthly .fin-monthly-table tr.fin-monthly-total td { border-top: 0; border-bottom: 2px solid var(--border-light); }
