/* C4 Hub: geometry inherited from C4; light colors adapted for the Hub.
   Final tokens and shared-component styling are in hub-theme.css. */


/* Operational rhythm: quiet section labels and readable financial figures. */
.cash-analysis,
.insight-layout > section { container: finance-analysis / inline-size; }
.cash-context,
.report-context,
.rb-toolbar,
.ops-filter { color: var(--muted); border-color: var(--line); }
.cash-context,
.report-coverage,
.rb-filter-note,
.rb-note,
.rb-list-footer { font-size: 13px; line-height: 1.6; }
:is(.cash-analysis,.decision-lab,.insight-layout,.closing-layout,.decisions-layout,.ops-companies,.rb-page) .eyebrow,
.week-title .eyebrow {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}
:is(.cash-analysis,.insight-layout) .metric > span,
.rb-stat dt,
.ops-top span { color: var(--muted); font-size: 13px; line-height: 1.5; }
:is(.cash-analysis,.insight-layout) .metric > strong,
.rb-stat strong,
.ops-top strong,
.scenario-delta > strong {
  color: var(--ink);
  font-size: 30px;
  font-weight: 550;
  line-height: 1.18;
  letter-spacing: -.8px;
}
:is(.cash-analysis,.insight-layout) .metric > small,
.rb-stat small { color: var(--muted); font-size: 12px; line-height: 1.5; }
:is(.cash-analysis,.insight-layout) .metric { border-color: var(--line); }
:is(.cash-analysis,.insight-layout) .metric > .button { color: var(--accent-ink); font-size: 14px; }
:is(.cash-analysis,.insight-layout) .metric > .button:hover { background: var(--accent-soft); }
.cash-analysis .metric > .button .icon,
.insight-layout .metric > .button .icon { transform: none; }
.cash-analysis .section-toolbar h2,
.decision-lab .section-toolbar h2,
.insight-layout h2 { color: var(--ink); font-size: 17px; font-weight: 550; }

/* Charts inherit the same financial geometry, without a decorative background. */
:is(.cash-analysis,.insight-layout) .chart-grid { stroke: var(--line); }
:is(.cash-analysis,.insight-layout) .chart-line { stroke: var(--accent); stroke-width: 2.2; filter: none; }
:is(.cash-analysis,.insight-layout) .chart-area { fill: var(--accent); opacity: .055; }
:is(.cash-analysis,.insight-layout) .chart-comparison { stroke: var(--muted); stroke-width: 1.6; stroke-dasharray: 5 5; }
:is(.cash-analysis,.insight-layout) .reserve-line { stroke: var(--warning); stroke-dasharray: 3 5; }
:is(.cash-analysis,.insight-layout) .chart-cursor { stroke: var(--line); }
:is(.cash-analysis,.insight-layout) .chart-point { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
:is(.cash-analysis,.insight-layout) .chart-wrap text { fill: var(--muted); font-family: var(--font-mono); font-size: 12px; }
:is(.cash-analysis,.insight-layout) .chart-masked { color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.cash-analysis .line-solid { border-top-color: var(--accent); }
.cash-analysis .line-dashed { border-top-color: var(--muted); }
.cash-analysis .chart-legend { color: var(--muted); font-size: 12px; }
.projection-surface { border-color: var(--line); }

/* Scenario controls and the selected week. */
.week-picker button { color: var(--muted); border-color: transparent; border-radius: 4px; min-height: 44px; }
.week-picker button:hover { color: var(--ink); background: #F5F6F7; border-color: var(--line); }
.week-picker button[aria-pressed=true] {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
  font-weight: 600;
}
.week-picker small { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.week-picker button[aria-pressed=true] small { color: var(--accent-ink); }
.week-inspector {
  background: var(--surface);
  border-color: var(--line);
  border-left-color: var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 20px;
  box-shadow: none;
}
.week-title h3 { color: var(--ink); font-size: 15px; font-weight: 550; }
.week-title > span:last-child,
.week-inspector > p { color: var(--muted); font-size: 13px; display: block; }
.week-title .eyebrow { color: var(--accent-ink); }
.week-equation strong { color: var(--ink); font-size: 14px; font-weight: 550; }
.week-equation div > span { color: var(--muted); font-size: 12px; }
.week-equation .math { color: var(--muted); }
.week-equation .result strong { color: var(--accent-ink); }
.reserve-note { color: var(--green); font-size: 12px; }
.reserve-note.warning { color: var(--warning); }
.reserve-note .button { color: var(--accent-ink); }
.decision-lab {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}
.decision-lab > .section-toolbar > .icon { color: var(--muted); }
.decision-lab > p,
.decision-lab .switch-row small,
.decision-lab .amount-field,
.scenario-delta > span,
.scenario-delta > small { color: var(--muted); font-size: 12px; line-height: 1.6; }
.decision-lab .switch-row strong { color: var(--ink); font-size: 15px; font-weight: 550; }
.decision-lab .switch-row { min-height: 44px; }
.decision-lab .scenario-choice,
.decision-lab .scenario-delta,
.decision-lab > p.simulation-disclosure { border-color: var(--line); }
.decision-lab .switch-row input[type=checkbox] { background: var(--line); border: 1px solid var(--line); flex-shrink: 0; }
.decision-lab .switch-row input[type=checkbox]:after { background: var(--ink); top: 2px; left: 2px; }
.decision-lab .switch-row input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent); }
.decision-lab .switch-row input[type=checkbox]:checked:after { background: var(--paper); }
.decision-lab .amount-field input { background: var(--paper); color: var(--ink); border-color: var(--line); color-scheme: dark; min-height: 40px; }
.decision-lab .amount-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent); }
.decision-lab .amount-field input:disabled { color: var(--muted); background: var(--paper); border-color: var(--line); }
.decision-lab .amount-field small { color: var(--muted); font-size: 12px; }
.decision-lab > p.simulation-disclosure { color: var(--muted); font-size: 12px; }
.decision-lab .lab-footer p { color: var(--muted); font-size: 12px; flex-basis: 100%; margin: 4px 0; }
.projection-table,
.annual-report { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.projection-table summary,
.annual-report summary { min-height: 60px; padding: 18px 24px; border: 0; color: var(--ink); font-size: 15px; font-weight: 550; line-height: 1.5; }
.projection-table summary span,
.annual-report summary span { color: var(--muted); font-size: 13px; }
.projection-table[open] > summary,
.annual-report[open] > summary { border-bottom: 1px solid var(--line); }
.projection-table > summary:focus-visible,
.annual-report > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.projection-table .table-scroll,
.annual-report .table-scroll { min-width: 0; scrollbar-color: var(--line) var(--paper); }

/* Analysis and its supporting records. */
.report-context .select-group label,
.report-coverage { color: var(--muted); font-size: 13px; }
.report-context .select-group select,
.activity-toolbar > select,
.ops-filter select { color: var(--ink); background: var(--paper); border-color: var(--line); color-scheme: dark; }
.report-context .select-group select:focus,
.activity-toolbar > select:focus,
.ops-filter select:focus { border-color: var(--accent); }
.factor-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.factor-panel .panel-head { align-items: flex-start; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); color: var(--ink); }
.factor-panel .panel-head > div { flex: 1; min-width: 0; }
.factor-panel .panel-head p { font-size: 13px; line-height: 1.6; }
.factor-panel .panel-head .badge { display: inline-flex; flex-shrink: 0; }
.factor-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 24px; border-color: var(--line); }
.factor-row .grow { min-width: 0; }
.factor-row:hover { background: #F5F6F7; }
.factor-panel .factor-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.factor-row .rank { display: block; color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.factor-row strong,
.factor-row .grow > strong { color: var(--ink); font-size: 15px; font-weight: 550; line-height: 1.5; }
.factor-row small { color: var(--muted); font-size: 13px; line-height: 1.6; }
.factor-change { color: var(--ink); font-family: var(--font-mono); font-size: 14px; font-weight: 400; white-space: nowrap; }
.factor-track { background: var(--line); border-radius: 0; }
.factor-track i { background: var(--accent); border-radius: 0; }
.advisor-note { background: var(--surface); border-color: var(--line); border-radius: 8px; box-shadow: none; }
.advisor-note p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.advisor-note .note-rule { border-color: var(--line); }
.advisor-note > small { color: var(--muted); font-size: 12px; }
.advisor-note .note-question { color: var(--ink); }
.activity-toolbar { color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--line); padding: 20px 22px; }
.activity-toolbar .search-field { background: var(--paper); border-color: var(--line); border-radius: 5px; flex: 1 1 280px; min-width: 0; max-width: none; }
.activity-toolbar .search-field input { color: var(--ink); background: transparent; color-scheme: dark; font-size: 14px; min-width: 0; width: 100%; min-height: 42px; }
.activity-toolbar .search-field input::placeholder { color: var(--muted); opacity: 1; }
.activity-toolbar .search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent); }
.activity-toolbar ~ .filter-chip { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--line); margin: 16px 22px; max-width: calc(100% - 44px); flex-wrap: wrap; }
.activity-toolbar ~ .table-footer { color: var(--muted); background: var(--surface); border-color: var(--line); font-size: 13px; padding: 18px 22px; flex-wrap: wrap; }
.activity-toolbar ~ .table-footer strong { color: var(--ink); }

/* Tables: opaque wireline surfaces retain comparable rows and sticky headers. */
.projection-table table,
.annual-table,
.activity-toolbar ~ .table-scroll table,
.rb-table { color: var(--ink); background: var(--surface); border-color: var(--line); }
.projection-table th,
.annual-table th,
.activity-toolbar ~ .table-scroll th,
.rb-table th {
  color: var(--muted);
  background: var(--paper);
  border-color: var(--line);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .15px;
}
.projection-table td,
.annual-table td,
.activity-toolbar ~ .table-scroll td,
.rb-table td { color: var(--ink); border-color: var(--line); font-size: 13px; }
.projection-table tbody tr:hover,
.annual-table tbody tr:hover,
.activity-toolbar ~ .table-scroll tbody tr:hover,
.rb-table tbody tr:hover { background: #F5F6F7; }
.projection-table tbody tr.selected { color: var(--ink); background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.projection-table tbody tr.selected th { background: var(--accent-soft); }
.annual-table th:first-child { color: var(--ink); background: var(--paper); }
.annual-table :is(th, td) { padding: 13px 16px; }
.annual-table thead th,
.annual-table tbody th { font-size: 12px; }
.annual-table tbody tr:hover th:first-child { background: #F5F6F7; }
.projection-table .table-button,
.annual-table .table-button { color: inherit; border-color: transparent; background: transparent; }
.projection-table .table-button:hover,
.annual-table .table-button:hover { color: var(--accent-ink); background: #F5F6F7; }
.cash-analysis .projection-table .table-button { font-size: 13px; }
.rb-page .rb-table .badge { font-size: 12px; }
.activity-toolbar ~ .table-scroll td small { color: var(--muted); font-size: 12px; }

/* Revenue: the same fiscal journey, with clear state and review boundaries. */
.rb-heading h1 { color: var(--ink); font-size: 30px; font-weight: 550; letter-spacing: -.8px; }
.rb-heading p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.rb-stats { border-color: var(--line); }
.rb-stat { border-color: var(--line); }
.rb-workspace { background: var(--surface); border: 1px solid var(--line); box-shadow: none; border-radius: 8px; overflow: hidden; }
.rb-view-tabs { border-color: var(--line); padding: 0 22px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.rb-view-tabs .button { color: var(--muted); background: transparent; font-size: 14px; border-bottom-color: transparent; flex-shrink: 0; white-space: nowrap; }
.rb-view-tabs .button:hover { color: var(--ink); background: #F5F6F7; }
.rb-view-tabs .button.active { color: var(--accent-ink); background: transparent; border-bottom-color: var(--accent); font-weight: 600; }
.rb-tab-count { color: var(--muted); background: #F5F6F7; border-radius: 3px; font-family: var(--font-mono); font-size: 12px; }
.rb-view-tabs .active .rb-tab-count { color: var(--accent-ink); background: var(--accent-soft); }
.rb-toolbar { border-color: var(--line); padding: 20px 22px; flex-wrap: wrap; }
.rb-filters .field { color: var(--muted); font-size: 13px; flex: 1 1 170px; min-width: 0; }
.rb-filters input,
.rb-filters select { color: var(--ink); background: var(--paper); border-color: var(--line); color-scheme: dark; border-radius: 5px; font-size: 14px; }
.rb-filters input::placeholder { color: var(--muted); opacity: 1; }
.rb-filters input:focus,
.rb-filters select:focus { border-color: var(--accent); }
.rb-table td strong { color: var(--ink); font-size: 14px; font-weight: 550; }
.rb-table td small,
.rb-client-cell small { color: var(--muted); font-size: 12px; }
.rb-value-cell { color: var(--ink); font-family: var(--font-mono); font-size: 14px; font-weight: 400; }
.rb-next-cell { color: var(--muted); font-size: 14px; }
.rb-deadline-cell { color: var(--muted); font-size: 13px; font-family: var(--font-mono); }
.rb-overdue { color: var(--danger); }
.rb-table .rb-action-cell > .button { color: var(--accent-ink); border-color: var(--line); background: var(--surface); border-radius: 5px; }
.rb-table .rb-action-cell > .button:hover { color: var(--ink); border-color: var(--accent); background: #F5F6F7; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent); }
.rb-list-footer { color: var(--muted); border-color: var(--line); padding: 18px 22px; flex-wrap: wrap; border-bottom: 0; }
.rb-page .rb-empty,
.rb-draft-table .rb-empty { color: var(--muted); background: var(--surface); padding: 28px 18px; line-height: 1.7; }
.rb-stage-number { color: var(--muted); font-family: var(--font-mono); }
.rb-pipeline strong { color: var(--ink); font-size: 13px; font-weight: 550; }
.rb-pipeline small { color: var(--muted); font-size: 12px; }
.rb-pipeline li { border-color: var(--line); }
.rb-pipeline li.done .rb-stage-number { color: var(--green); }
.rb-pipeline li.active .rb-stage-number { color: var(--accent-ink); }
.rb-timeline { border-color: var(--line); }
.rb-timeline li { color: var(--ink); border-color: var(--line); font-size: 13px; }
.rb-timeline li:before { background: var(--accent); }
.rb-timeline li small { color: var(--muted); font-size: 12px; }
.rb-alert { background: var(--warning-soft); color: var(--warning); border-color: var(--warning); border-radius: 5px; }
.rb-alert p { color: inherit; font-size: 13px; line-height: 1.65; }
.rb-stepper { border-color: var(--line); gap: 16px 24px; flex-wrap: wrap; }
.rb-stepper button { color: var(--muted); font-size: 14px; min-height: 44px; }
.rb-stepper button > span { color: var(--muted); background: var(--paper); border-color: var(--line); border-radius: 5px; font-family: var(--font-mono); font-size: 12px; }
.rb-stepper li.active button { color: var(--ink); font-weight: 600; }
.rb-stepper li.active button > span { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent); }
.rb-stepper li.done button > span { color: var(--green); background: var(--green-soft); border-color: var(--green); }
.rb-main > h3 { color: var(--ink); font-size: 23px; font-weight: 550; letter-spacing: -.45px; }
.rb-main > p,
.rb-detail p,
.rb-review p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.rb-main .field { color: var(--muted); font-size: 13px; }
.rb-main input,
.rb-main select,
.rb-main textarea { color: var(--ink); background: var(--paper); border-color: var(--line); border-radius: 5px; color-scheme: dark; font-size: 14px; }
.rb-main :is(input,textarea)::placeholder { color: var(--muted); opacity: 1; }
.rb-main :is(input,select,textarea):focus { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent); }
.rb-main :is(input,select,textarea):disabled { color: var(--muted); background: var(--paper); border-color: var(--line); opacity: 1; }
.rb-main :is(input,select,textarea)[aria-invalid=true] { border-color: var(--danger); }
.rb-consent { color: var(--muted); font-size: 13px; }
.rb-consent input[type=checkbox] { accent-color: var(--accent); }
.rb-aside { color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: none; display: block; }
.rb-aside h3 { color: var(--ink); font-size: 15px; font-weight: 550; }
.rb-aside p,
.rb-aside .rb-review-line { color: var(--muted); font-size: 13px; }
.rb-review-line { color: var(--ink); border-color: var(--line); font-size: 13px; }
.rb-review-line > span { color: var(--muted); }
.rb-review-line > strong,
.rb-review-line strong { color: var(--ink); font-weight: 500; font-size: 13px; }
.rb-detail h3,
.rb-review h4 { color: var(--ink); font-weight: 550; }
.rb-document { color: var(--ink); background: var(--surface); border-color: var(--line); border-radius: 6px; }
.rb-document-watermark { color: var(--muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; }
.rb-document h3 { color: var(--ink); }
.rb-document p { color: var(--muted); font-size: 14px; }

/* Decision and delivery surfaces. */
.decisions-layout > .panel,
.closing-layout .panel,
.ops-companies { background: var(--surface); color: var(--ink); border-color: var(--line); border-radius: 8px; box-shadow: none; }
.decision-list-row { color: var(--ink); border-color: var(--line); display: grid; grid-template-columns: 44px minmax(0, 1fr) max-content 18px; gap: 16px; padding: 24px; }
.decision-list-row:hover { background: #F5F6F7; }
.decision-list-row .grow > strong { color: var(--ink); font-size: 15px; font-weight: 550; }
.decision-list-row p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.decision-list-row small { color: var(--muted); font-size: 12px; }
.decision-list-row .date-tile { color: var(--muted); }
.decision-list-row .date-tile span { color: var(--muted); font-family: var(--font-mono); }
.decision-amount > strong { color: var(--ink); font-family: var(--font-mono); font-size: 18px; font-weight: 400; white-space: nowrap; }
.decision-note { background: var(--surface); border-color: var(--line); border-radius: 8px; }
.decision-note > .icon { color: var(--muted); }
.decision-note h2 { color: var(--ink); font-size: 18px; font-weight: 550; }
.decision-note p,
.decision-note ol { color: var(--muted); font-size: 14px; }
.decision-note > small { color: var(--muted); font-size: 12px; }
.month-letter { color: var(--muted); background: var(--surface); border-color: var(--line); border-radius: 8px; }
.month-letter h2 { color: var(--ink); font-size: 24px; font-weight: 550; }
.month-letter p { color: var(--muted); font-size: 15px; line-height: 1.8; }
.month-letter blockquote { color: var(--ink); border-left-color: var(--accent); font-size: 16px; }
.month-letter .letter-signature { color: var(--ink); border-color: var(--line); }
.month-letter .letter-signature small { color: var(--muted); font-size: 13px; }
.closing-status { background: var(--surface); border-color: var(--line); border-radius: 8px; min-width: 0; padding: 24px; }
.closing-status h3 { color: var(--ink); font-size: 15px; font-weight: 550; }
.closing-check { border-color: var(--line); }
.closing-check > span { color: var(--muted); flex-shrink: 0; }
.closing-check.done > span { color: var(--green); }
.closing-check strong { color: var(--ink); font-size: 14px; font-weight: 550; }
.closing-check small { color: var(--muted); font-size: 12px; }
.closing-owner strong { color: var(--ink); font-size: 13px; }
.closing-owner small { color: var(--muted); font-size: 12px; }
.discussion { color: var(--muted); background: var(--surface); border-color: var(--line); padding: 24px; }
.discussion p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.discussion textarea { color: var(--ink); background: var(--paper); border-color: var(--line); border-radius: 5px; color-scheme: dark; font-size: 14px; }
.discussion textarea::placeholder { color: var(--muted); opacity: 1; }
.discussion textarea:focus { border-color: var(--accent); }
.discussion .conversation { color: var(--muted); border-color: var(--line); }
.discussion .conversation strong { color: var(--ink); font-size: 13px; }
.discussion .conversation small { color: var(--muted); font-size: 12px; }
.discussion .question-context { color: var(--muted); background: var(--accent-soft); border-color: var(--line); }
.closing-status .completion-track { background: var(--line); }
.closing-status .completion-track i { background: var(--accent); }
.closing-layout .avatar { color: var(--ink); background: #F5F6F7; }
.ops-top { border-color: var(--line); flex-wrap: wrap; gap: 24px 44px; }
.ops-top > div:last-child strong { color: var(--ink); font-size: 16px; }
.ops-filter { color: var(--muted); font-size: 12px; }
.ops-company { color: var(--ink); background: var(--surface); border-color: var(--line); grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) auto; padding: 24px; }
.ops-company .grow h3 { color: var(--ink); font-size: 15px; font-weight: 550; }
.ops-company .grow > span,
.ops-job small,
.ops-company-footer > span { color: var(--muted); font-size: 12px; }
.ops-company .company-square,
.ops-company .company-square.lilac,
.ops-company .company-square.clay { color: var(--accent-ink); background: #F5F6F7; border: 1px solid var(--line); border-radius: 5px; }
.ops-job strong { color: var(--ink); font-size: 14px; font-weight: 550; }
.ops-job > .icon { color: var(--muted); }
.operating-principle { border-color: var(--line); }
.operating-principle > span { color: var(--muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; }
.operating-principle h2 { color: var(--ink); font-weight: 500; }
.operating-principle p { color: var(--muted); font-size: 14px; line-height: 1.7; }

/* Empty and monetary-privacy states belong to the same opaque reading surface. */
:is(.insight-layout,.cash-layout,.decisions-layout,.closing-layout,.rb-page,.ops-companies) .empty,
:is(.insight-layout,.cash-layout,.decisions-layout,.closing-layout,.rb-page,.ops-companies) .empty-mini {
  color: var(--muted);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
}
:is(.insight-layout,.cash-layout,.decisions-layout,.closing-layout,.rb-page,.ops-companies) .empty h3 { color: var(--ink); }
:is(.insight-layout,.cash-layout,.decisions-layout,.closing-layout,.rb-page,.ops-companies) .empty p { color: var(--muted); }
.activity-toolbar ~ .table-scroll td[colspan] { color: var(--muted); background: var(--surface); }

/* Small screens keep the existing grid changes, fiscal cards and labels. */
.cash-layout, .insight-layout, .rb-page, .rb-wizard, .rb-detail, .rb-review, .decisions-layout, .closing-layout, .ops-companies, .panel:has(> .activity-toolbar) { min-width: 0; font-size: 15px; line-height: 1.6; }
:is(.cash-layout,.insight-layout,.rb-page,.rb-wizard,.rb-detail,.decisions-layout,.closing-layout,.ops-companies) .button, .activity-toolbar > .button, .report-context > .button, .rb-actions .button, .rb-wizard-footer .button { min-height: 42px; font-size: 14px; line-height: 1.4; }
.cash-layout { grid-template-columns: minmax(0, 1fr) minmax(286px, 310px); gap: 28px; }
.closing-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
.decisions-layout { grid-template-columns: minmax(0, 1fr) 280px; }
.rb-page { container: revenue-workspace / inline-size; }
.cash-context { flex-wrap: wrap; }
.decision-lab .switch-row > span { min-width: 0; }
.decision-lab > p { font-size: 14px; }
.decision-lab .scenario-choice { display: block; width: auto; padding: 18px 0; border-top: 1px solid var(--line); }
.decision-lab .scenario-delta { display: block; width: auto; }
.decision-lab .lab-footer { display: flex; flex-wrap: wrap; width: auto; margin: 16px 0 0; gap: 8px; }
.activity-toolbar > select { flex: 0 1 205px; width: auto; min-height: 42px; max-width: 100%; font-size: 14px; }
.activity-toolbar ~ .table-scroll, .rb-table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-color: var(--line) var(--paper); }
.activity-toolbar ~ .table-scroll table { min-width: 860px; }
.activity-toolbar ~ .table-scroll :is(th, td) { padding: 15px 18px; }
.activity-toolbar ~ .table-scroll td { font-size: 14px; }
.activity-toolbar ~ .table-scroll td:first-child { white-space: nowrap; }
.rb-filters { min-width: 0; flex-wrap: wrap; }
.rb-filters .field:first-child { flex: 1.5 1 250px; max-width: none; }
.rb-filters :is(input, select) { width: 100%; min-width: 0; min-height: 42px; }
.rb-workspace > .rb-filter-note { padding: 0 22px; margin-bottom: 18px; }
.rb-table { min-width: 900px; }
.rb-table :is(th, td) { padding: 16px; }
.rb-table th:first-child, .rb-table td:first-child { padding-left: 22px; }
.rb-table th:last-child, .rb-table td:last-child { padding-right: 22px; }
.rb-table .rb-overdue { color: var(--danger); }
.rb-pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 14px 0; }
.rb-pipeline > li { min-width: 0; padding-inline: 12px; }
.rb-main .field :is(input, select, textarea) { min-height: 42px; font-size: 14px; }
.decision-list-row .grow { min-width: 0; }
.decision-list-row:focus-visible { outline-offset: -3px; }
.decision-amount { min-width: 0; }
.closing-status .closing-check { display: flex; width: auto; min-height: 0; gap: 12px; }
.closing-check > div { min-width: 0; }
.ops-company > .row { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px 12px; }
.ops-company .grow, .ops-job > div { min-width: 0; }
.ops-company .row > .badge { display: inline-flex; grid-column: 2; justify-self: start; max-width: 100%; white-space: normal; }
.ops-job { align-items: flex-start; }
.ops-company-footer { min-width: 0; }
@media (min-width: 851px) and (max-width: 1150px) {
  .cash-analysis .metric > strong { font-size: 23px; }
  .cash-analysis .metric > span,
  .cash-analysis .metric > small { font-size: 12px; }
  .week-equation strong { font-size: 12px; }
  .week-equation div > span { font-size: 12px; }
  .rb-stat strong { font-size: 27px; }
}
@media (max-width: 850px) {
  .cash-analysis .metric > strong { font-size: 28px; }
  .rb-stat strong { font-size: 27px; }
}
@media (max-width: 600px) {
  .cash-analysis .metric:first-child > strong { font-size: 30px; }
  .cash-analysis .metric > strong { font-size: 24px; }
  .cash-analysis .metric > span,
  .cash-analysis .metric > small { font-size: 12px; }
  .cash-context { font-size: 12px; gap: 9px 14px; }
  .cash-context button { min-height: 44px; font-size: 14px; }
  .cash-analysis .chart-legend { font-size: 12px; }
  .week-picker button { min-height: 46px; }
  .week-inspector { padding: 18px 16px; }
  .week-title h3 { font-size: 14px; }
  .week-title > span:last-child { font-size: 12px; }
  .week-equation strong { font-size: 14px; }
  .week-equation div > span { font-size: 12px; }
  .reserve-note { font-size: 12px; }
  .reserve-note .button { min-height: 44px; }
  .decision-lab { padding: 21px; }
  .decision-lab .scenario-choice { border-color: var(--line); padding-block: 19px; }
  .decision-lab .switch-row { min-height: 44px; }
  .decision-lab .amount-field input,
  .decision-lab .lab-footer .button { min-height: 44px; }
  .report-context .select-group select,
  .activity-toolbar > select,
  .activity-toolbar .search-field input,
  .ops-filter select { min-height: 44px; font-size: 14px; }
  .insight-layout .metric strong { font-size: 29px; }
  .factor-panel .panel-head { padding: 20px 16px 16px; gap: 12px; }
  .factor-row { grid-template-columns: 20px minmax(0, 1fr); gap: 8px 12px; padding: 18px 16px; align-items: start; }
  .factor-row .rank { grid-column: 1; grid-row: 1; padding-top: 2px; }
  .factor-row .grow { grid-column: 2; }
  .factor-row strong,
  .factor-row .grow > strong { font-size: 15px; }
  .factor-row small { font-size: 13px; }
  .factor-change { grid-column: 2; justify-self: start; padding-top: 4px; font-size: 15px; }
  .projection-table summary,
  .annual-report summary { padding: 17px 16px; font-size: 14px; }
  .projection-table summary span,
  .annual-report summary span { display: block; margin: 5px 0 0 15px; font-size: 12px; }
  .rb-heading h1 { font-size: 27px; }
  .rb-stat strong { font-size: 26px; }
  .rb-stat dt,
  .rb-stat small { font-size: 12px; }
  .rb-view-tabs { gap: 7px; }
  .rb-view-tabs .button { min-height: 44px; font-size: 14px; }
  .rb-filters input,
  .rb-filters select { min-height: 44px; }
  .rb-table { background: transparent; }
  .rb-table tr { color: var(--ink); background: var(--surface); border-color: var(--line); border-radius: 6px; box-shadow: none; }
  .rb-table tbody tr:hover { background: #F5F6F7; }
  .rb-table td[data-label]:before { color: var(--muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: .3px; }
  .rb-table .rb-client-cell > strong { color: var(--ink); font-size: 15px; }
  .rb-table .rb-client-cell > small { color: var(--muted); font-size: 13px; }
  .rb-table .rb-value-cell { color: var(--ink); font-size: 16px; }
  .rb-table td small { font-size: 12px; }
  .rb-table .rb-action-cell > .button { min-height: 44px; border-color: var(--line); font-size: 14px; }
  .rb-pipeline strong { font-size: 12px; }
  .rb-pipeline small { font-size: 12px; }
  .rb-stepper { gap: 12px; }
  .rb-stepper button { min-height: 44px; font-size: 14px; }
  .rb-main > h3 { font-size: 22px; }
  .rb-main input,
  .rb-main select,
  .rb-mode .button,
  .rb-wizard-footer .button,
  .rb-actions .button { min-height: 44px; }
  .rb-review-line { gap: 14px; }
  .decision-amount > strong { font-size: 17px; }
  .decision-note { padding: 21px; }
  .month-letter { padding: 22px; }
  .month-letter h2 { font-size: 23px; }
  .month-letter blockquote { font-size: 15px; }
  .closing-status { padding: 21px; }
  .closing-check .button { min-height: 44px; }
  .ops-top strong { font-size: 30px; }
  .ops-top > div:last-child strong { font-size: 15px; }
  .ops-company-footer .button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .decision-lab .switch-row input[type=checkbox] { transition: none; }
}

/* A largura da coluna de análise, e não a tela inteira, define o resumo. */
@media (max-width: 1200px) {
  .decisions-layout { grid-template-columns: minmax(0, 1fr); }
  .ops-company { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ops-company-footer { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (max-width: 1100px) {
  .cash-layout,
  .closing-layout { grid-template-columns: minmax(0, 1fr); }
  .closing-status { order: -1; }
  .week-equation strong { font-size: 15px; }
  .week-equation div > span { font-size: 12px; }
  .decision-lab .scenario-choice { display: block; width: auto; padding: 18px 0; }
  .decision-lab .lab-footer { width: auto; margin: 16px 0 0; }
}
@media (max-width: 700px) {
  .decision-list-row { grid-template-columns: 40px minmax(0, 1fr) 18px; gap: 12px; padding: 20px 18px; }
  .decision-list-row .date-tile { grid-column: 1; grid-row: 1; align-self: start; }
  .decision-list-row .grow { grid-column: 2; }
  .decision-list-row > .icon { display: block; grid-column: 3; grid-row: 1; align-self: start; }
  .decision-list-row .decision-amount { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; text-align: left; }
  .decision-list-row .decision-amount > strong { margin: 0; font-size: 19px; }
}
@media (max-width: 600px) {
  :is(.cash-layout,.insight-layout,.rb-page,.rb-wizard,.rb-detail,.decisions-layout,.closing-layout,.ops-companies) .button,
  .activity-toolbar > .button,
  .report-context > .button,
  .rb-actions .button,
  .rb-wizard-footer .button { min-height: 44px; font-size: 14px; }
  .cash-analysis .metric > span,
  .cash-analysis .metric > small,
  .rb-stat dt,
  .rb-stat small { font-size: 13px; }
  .activity-toolbar { padding: 18px 16px; }
  .activity-toolbar .search-field { flex-basis: 100%; }
  .activity-toolbar > select { min-height: 44px; flex: 1; }
  .activity-toolbar ~ .table-footer { padding: 18px 16px; }
  .activity-toolbar ~ .filter-chip { margin-inline: 16px; max-width: calc(100% - 32px); }
  .rb-view-tabs { padding-inline: 16px; }
  .rb-toolbar { padding: 20px 16px; }
  .rb-filters .field { font-size: 13px; }
  .rb-workspace > .rb-filter-note { padding-inline: 16px; }
  .rb-table-scroll { padding-inline: 16px; }
  .rb-table { min-width: 0; max-width: 100%; }
  .rb-table .rb-action-cell > .button { font-size: 14px; }
  .rb-table td[data-label]:before { font-size: 12px; }
  .rb-list-footer { padding: 18px 16px; }
  .rb-pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 0; }
  .rb-pipeline > li { padding-inline: 0 14px; border-left: 0; }
  .rb-pipeline strong { font-size: 13px; }
  .rb-pipeline small { font-size: 12px; }
  .rb-review { grid-template-columns: minmax(0, 1fr); }
  .rb-wizard-footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; width: 100%; gap: 10px; }
  .rb-wizard-footer > div { display: contents; }
  .rb-wizard-footer .button { width: 100%; min-width: 0; min-height: 44px; height: auto; align-self: start; align-items: center; margin: 0; }
  .rb-wizard-footer .button.primary { grid-column: 2; }
  .month-letter p { font-size: 15px; }
  .discussion { padding: 20px 18px; }
  .closing-status { padding: 22px 18px; }
  .ops-top { gap: 24px 20px; }
  .ops-company { grid-template-columns: minmax(0, 1fr); padding: 22px 18px; }
  .ops-company > .row { gap: 8px 12px; }
  .ops-company-footer { grid-column: auto; flex-wrap: wrap; gap: 12px; }
  .ops-company .row > .badge { font-size: 12px; }
}
@container revenue-workspace (min-width: 601px) and (max-width: 1100px) {
  .rb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 0; }
  .rb-stats > .rb-stat { min-width: 0; padding: 0 20px; }
  .rb-stats > .rb-stat:nth-child(odd) { padding-left: 0; border-right: 1px solid var(--line); }
  .rb-stats > .rb-stat:nth-child(even) { padding-right: 0; border-right: 0; }
}
@container revenue-workspace (max-width: 600px) {
  .rb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 0; }
  .rb-stats > .rb-stat { min-width: 0; padding: 0 10px; }
  .rb-stats > .rb-stat:nth-child(odd) { padding-left: 0; border-right: 1px solid var(--line); }
  .rb-stats > .rb-stat:nth-child(even) { padding-right: 0; border-right: 0; }
  .rb-stats > .rb-stat strong { font-size: clamp(20px, 5.6cqi, 28px); }
}
@container finance-analysis (max-width: 740px) {
  :is(.cash-analysis,.insight-layout) .metrics.three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 0; }
  :is(.cash-analysis,.insight-layout) .metric { min-width: 0; padding: 0 18px; border-bottom: 0; }
  :is(.cash-analysis,.insight-layout) .metric:first-child { grid-column: 1 / -1; padding: 0 0 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  :is(.cash-analysis,.insight-layout) .metric:nth-child(2) { padding-left: 0; border-right: 1px solid var(--line); }
  :is(.cash-analysis,.insight-layout) .metric:last-child { padding-right: 0; }
  :is(.cash-analysis,.insight-layout) .metric > strong { font-size: 27px; }
  :is(.cash-analysis,.insight-layout) .metric > span { font-size: 13px; }
  :is(.cash-analysis,.insight-layout) .metric > .button { position: static; margin: 7px 0 0 -8px; min-height: 44px; }
}
@container finance-analysis (max-width: 600px) {
  .cash-analysis .week-equation { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 18px 10px; }
  .cash-analysis .week-equation div > span { white-space: normal; font-size: 12px; }
  .cash-analysis .week-equation strong { font-size: 15px; }
  .cash-analysis .week-equation > .math:nth-child(4) { display: none; }
  .cash-analysis .week-equation > .math:nth-child(6) { font-size: 0; }
  .cash-analysis .week-equation > .math:nth-child(6)::after { content: '='; font-size: 15px; }
  .cash-analysis .week-equation > div:nth-child(5) > span::before { content: '− '; }
  .cash-analysis .week-picker { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
}
@container finance-analysis (max-width: 440px) {
  :is(.cash-analysis,.insight-layout) .metrics.three { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  :is(.cash-analysis,.insight-layout) .metrics.three > .metric { grid-column: auto; padding: 0 0 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  :is(.cash-analysis,.insight-layout) .metrics.three > .metric:last-child { padding-bottom: 0; border-bottom: 0; }
  :is(.cash-analysis,.insight-layout) .metrics.three > .metric > strong { font-size: 28px; }
}

/* Revenue summary: long currency values must not size the mobile grid tracks. */
@media (max-width: 600px) {
  .rb-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: minmax(0, 1fr);
    column-gap: 0;
    min-width: 0;
    max-width: 100%;
  }
  .rb-stats .rb-stat {
    min-width: 0;
    max-width: 100%;
    padding-inline: 0 10px;
  }
  .rb-stats .rb-stat:nth-child(even) { padding-inline: 10px 0; }
  .rb-stats .rb-stat dd,
  .rb-stats .rb-stat strong { min-width: 0; max-width: 100%; }
  .rb-stats .rb-stat strong {
    font-size: clamp(18px, 5.6vw, 26px);
    letter-spacing: -.65px;
    line-height: 1.25;
  }
  .rb-stats .rb-stat strong > .money { font: inherit; letter-spacing: inherit; }
  .rb-stats .rb-stat dt,
  .rb-stats .rb-stat small { overflow-wrap: anywhere; }
}
.decision-list-row .date-tile span{font-size:12px;line-height:1.4}
