/* R-0428, A.14: Reports is a look surface. No teal decisions or moving figures. */
.rv2,.rv2-sheet {color:var(--ink-900);font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--lh-body);box-sizing:border-box;}
.rv2 *, .rv2-sheet * {box-sizing:border-box;}
.rv2 {container-type:inline-size;container-name:reports;display:flex;flex-direction:column;gap:var(--space-6);max-width:var(--content-max,1120px);margin:auto;min-width:0;}
.rv2[hidden],.rv2 tr[hidden] {display:none;}
.rv2-header {display:flex;flex-direction:column;gap:var(--space-5);}
.rv2-month {display:flex;align-items:center;gap:var(--space-3);font-weight:var(--weight-semibold);}
.rv2-month span {min-width:0;text-align:center;}
.rv2-answer {font-family:var(--font-display);font-size:var(--today-answer-size,2.5rem);line-height:var(--lh-heading);letter-spacing:var(--tracking-tight);font-weight:var(--weight-semibold);margin:0;max-width:26em;}
.rv2-head-money {font-size:clamp(1rem,7vw,1em);white-space:nowrap;font-variant-numeric:tabular-nums;}
.rv2-basis {display:flex;align-items:center;gap:var(--space-4);font-size:var(--text-xs);color:var(--ink-500);}
.rv2-logos,.rv2-logo-slot {display:flex;align-items:center;flex-shrink:0;}
.rv2-logo-slot {width:var(--stack-logo-slot);}
.rv2-mark {width:var(--stack-logo-size);height:var(--stack-logo-size);flex-shrink:0;border:1px solid var(--border-default);border-radius:var(--radius-md);background:var(--surface-raised);display:inline-flex;align-items:center;justify-content:center;color:var(--ink-500);}
.rv2-logos .rv2-mark + .rv2-mark {margin-left:calc(-1 * var(--space-3));}
.rv2-mark svg,.rv2-mark img {width:var(--stack-mark-size);height:var(--stack-mark-size);fill:none;stroke:currentColor;stroke-width:1.5;object-fit:contain;}
.rv2-panel {background:var(--surface-raised);border:1px solid var(--ui-line);border-radius:var(--radius-card);min-width:0;overflow:clip;}
.rv2-section-title {font-family:var(--font-display);font-size:var(--text-lg);font-weight:var(--weight-semibold);margin:0;padding:var(--space-5) var(--space-6);}
.rv2-subtitle,.rv2-panel > .rv2-muted {margin:0;padding:0 var(--space-6) var(--space-4);}
.rv2-money {font-family:var(--font-mono);font-weight:var(--weight-semibold);font-variant-numeric:tabular-nums;white-space:nowrap;}
.rv2-chart {display:grid;grid-template-columns:repeat(auto-fit,minmax(2rem,1fr));gap:var(--space-5);padding:var(--space-4) var(--space-6) var(--space-5);}
.rv2-bar-column {display:flex;align-items:center;flex-direction:column;gap:var(--space-3);min-width:0;color:var(--ink-500);}
.rv2-chart-value {font-family:var(--font-mono);font-weight:var(--weight-semibold);font-size:var(--text-xs);white-space:nowrap;}
.rv2-bar-track {width:100%;max-width:4.5rem;height:var(--stack-chart-height);display:flex;align-items:flex-end;background:transparent;}
.rv2-bar {display:block;width:100%;background:var(--ink-300);border-radius:var(--radius-md) var(--radius-md) 0 0;}
.rv2-current {color:var(--ink-900);}
.rv2-current .rv2-bar {background:var(--ink-700);}
.rv2-bar--loss {background:var(--ink-500);border:1px dashed var(--ink-700);}
.rv2-bar-label {font-size:var(--text-xs);}
.rv2-change {display:grid;grid-template-columns:var(--stack-logo-size) minmax(0,1fr);gap:var(--space-4);padding:var(--space-5) var(--space-6);border-top:1px solid var(--border-default);align-items:start;}
.rv2-change p {margin:0;}
.rv2-table {width:100%;min-width:0;border-collapse:collapse;table-layout:fixed;}
.rv2-table th {font-size:var(--text-xs);color:var(--ink-500);font-weight:var(--weight-semibold);text-align:left;padding:var(--space-4) var(--space-3);}
.rv2-table th:first-child {width:38%;padding-left:calc(var(--space-6) + var(--stack-logo-slot));}
.rv2-table th:nth-child(2) {width:16%;}
.rv2-table th:nth-child(3) {width:13%;}
.rv2-table th:nth-child(4) {width:17%;text-align:right;}
.rv2-table th:last-child {padding-right:var(--space-6);}
.rv2-pnl th:last-child,.rv2-bills th:last-child {width:calc(var(--stack-action-width) + var(--space-7));}
.rv2-table td {border-top:1px solid var(--border-default);padding:var(--space-5) var(--space-3);vertical-align:middle;white-space:normal;}
.rv2-table .rv2-money {white-space:nowrap;}
.rv2-table td:first-child {padding-left:var(--space-6);}
.rv2-table td:last-child {padding-right:var(--space-6);}
.rv2-identity {display:flex;align-items:center;min-width:0;}
.rv2-label {min-width:0;overflow-wrap:anywhere;font-weight:var(--weight-semibold);}
.rv2-label small {display:block;font-weight:var(--weight-normal);font-size:var(--text-xs);color:var(--ink-500);margin-top:var(--space-2);}
.rv2-status,.rv2-share {font-size:var(--text-xs);color:var(--ink-500);}
.rv2-status {overflow-wrap:anywhere;font-weight:var(--weight-semibold);}
.rv2-amount,.rv2-action {text-align:right;}
.rv2-amount {font-size:var(--text-base);}
.rv2-total {background:var(--surface-sunken);}
.rv2-button {font-family:var(--font-sans);font-size:var(--text-sm);font-weight:var(--weight-semibold);border:1px solid var(--border-default);background:var(--surface-raised);color:var(--ink-900);border-radius:var(--radius-pill);min-height:44px;width:var(--stack-action-width);max-width:100%;padding:var(--space-3) var(--space-4);cursor:pointer;touch-action:manipulation;}
.rv2-button:active {transform:scale(.97);}
.rv2-button:disabled {cursor:default;color:var(--ink-500);}
.rv2-button:focus-visible {outline:2px solid var(--ink-700);outline-offset:3px;}
.rv2-month-button {width:44px;height:44px;padding:0;font-size:var(--text-xl);}
.rv2-name {border:0;background:transparent;border-radius:0;text-align:left;width:auto;max-width:100%;padding:0;font-size:var(--text-base);white-space:normal;line-height:var(--lh-body);}
.rv2-name:focus-visible {outline:2px solid var(--ink-700);}
.rv2-segments {display:flex;gap:var(--space-1);height:var(--space-6);margin:0 var(--space-6) var(--space-5);border-radius:var(--radius-sm);overflow:clip;}
.rv2-segment {flex-basis:0;background:var(--ink-700);}
.rv2-tone-1 {background:var(--ink-500);}.rv2-tone-2 {background:var(--ink-300);}.rv2-tone-3 {background:var(--ink-200);}
.rv2-spend th:first-child,.rv2-service th:first-child {width:48%;}
.rv2-spend th:last-child,.rv2-service th:last-child {width:22%;text-align:right;}
.rv2-sheet {container-type:inline-size;container-name:report-card;width:min(var(--stack-sheet-width),calc(100vw - var(--space-8)));max-height:calc(100dvh - var(--space-8));border:0;border-radius:var(--stack-sheet-radius);background:var(--surface-raised);padding:var(--space-7);box-shadow:var(--shadow-modal);overscroll-behavior:contain;overflow:auto;}
.rv2-sheet::backdrop {background:color-mix(in srgb,var(--ink-900) 38%,transparent);}
.rv2-card-title {font-family:var(--font-display);font-size:var(--text-2xl);font-weight:var(--weight-semibold);margin:0 0 var(--space-4);overflow-wrap:anywhere;}
.rv2-card-amount {font-size:clamp(1rem,5vw,2rem);margin:0 0 var(--space-4);}
.rv2-sheet h3 {font-size:var(--text-sm);margin:var(--space-6) 0 var(--space-4);}
.rv2-breakdown {display:flex;justify-content:space-between;align-items:baseline;gap:var(--space-4);padding:var(--space-4) 0;border-top:1px solid var(--border-default);}
.rv2-breakdown > :first-child {min-width:0;overflow-wrap:anywhere;}
.rv2-foot {border-top:3px double var(--ink-700);font-weight:var(--weight-semibold);}
.rv2-equation {display:flex;gap:var(--space-4);align-items:baseline;padding:var(--space-5) 0;}
.rv2-equation-part {display:flex;gap:var(--space-3);align-items:baseline;}
.rv2-equation .rv2-foot {border:0;}
.rv2-operator {color:var(--ink-500);}
.rv2-source {display:flex;gap:var(--space-4);padding:var(--space-4) 0;border-top:1px solid var(--border-default);}
.rv2-source small {display:block;color:var(--ink-500);font-size:var(--text-xs);margin-top:var(--space-2);}
.rv2-card-tools,.rv2-footer-tools {display:flex;justify-content:flex-end;gap:var(--space-4);flex-wrap:wrap;margin-top:var(--space-6);}
.rv2-muted,.rv2-footer {color:var(--ink-500);}
.rv2-footer {font-size:var(--text-xs);}
.rv2-footer p {margin:0;}
.rv2-retained {margin-top:var(--space-6);}
.rv2-retained summary {padding:var(--space-4);min-height:44px;cursor:pointer;}
.rv2-transaction {display:flex;justify-content:space-between;gap:var(--space-4);padding:var(--space-4);border-top:1px solid var(--border-default);}
.rv2-transaction > div {min-width:0;overflow-wrap:anywhere;}
.rv2-transaction small {display:block;color:var(--ink-500);}
@media (hover:hover) and (pointer:fine) {.rv2-button:hover {border-color:var(--ink-700);}.rv2-name:hover {text-decoration:underline;text-underline-offset:var(--space-2);}}
@media (max-width:1100px) {
 .rv2-table th:first-child {width:34%;}.rv2-table th:nth-child(3){width:10%;}.rv2-table td{padding-left:var(--space-3);padding-right:var(--space-3);}
}
@media (max-width:900px) {
 .rv2-table thead {display:none;}.rv2-table tbody {display:block;}.rv2-table tr {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--space-3) var(--space-4);padding:var(--space-5);border-top:1px solid var(--border-default);}
 .rv2-table td,.rv2-table td:first-child,.rv2-table td:last-child {border:0;padding:0;min-width:0;}
 .rv2-table .rv2-identity {grid-column:1 / -1;grid-row:1;}.rv2-label small {display:none;}.rv2-table .rv2-share {display:none;}.rv2-table .rv2-status {grid-column:1;grid-row:2;align-self:center;}
 .rv2-table .rv2-amount {grid-column:2;grid-row:2;}.rv2-action {grid-column:2;grid-row:3;}.rv2-logo-slot{width:var(--stack-logo-slot);}
 .rv2-button {width:var(--stack-action-width-phone);}.rv2-name {width:auto;}.rv2-month-button {width:44px;}
 .rv2-answer {font-size:var(--text-xl);}.rv2-section-title {padding:var(--space-5);}.rv2-chart {padding:var(--space-4) var(--space-5);gap:var(--space-3);}.rv2-bar-track {height:var(--stack-chart-height-phone);}.rv2-chart-value {font-size:var(--text-xs);}
 .rv2-change {padding:var(--space-5);}.rv2-subtitle,.rv2-panel > .rv2-muted {padding-left:var(--space-5);padding-right:var(--space-5);}.rv2-segments {margin-left:var(--space-5);margin-right:var(--space-5);}
 .rv2-equation {flex-direction:column;align-items:stretch;gap:var(--space-4);}.rv2-equation-part {justify-content:space-between;}.rv2-equation .rv2-foot {border-top:3px double var(--ink-700);padding-top:var(--space-4);}
 .rv2-spend .rv2-amount {grid-column:2;grid-row:2;}.rv2-service td:nth-child(3),.rv2-service td:nth-child(4) {grid-column:2;text-align:right;}
}
@container reports (max-width:56.25rem) {
 .rv2-table thead {display:none;}.rv2-table tbody {display:block;}.rv2-table tr {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--space-3) var(--space-4);padding:var(--space-5);border-top:1px solid var(--border-default);}
 .rv2-table td,.rv2-table td:first-child,.rv2-table td:last-child {border:0;padding:0;min-width:0;}
 .rv2-table .rv2-identity {grid-column:1 / -1;grid-row:1;}.rv2-label small {display:none;}.rv2-table .rv2-share {display:none;}.rv2-table .rv2-status {grid-column:1;grid-row:2;align-self:center;}
 .rv2-table .rv2-amount {grid-column:2;grid-row:2;}.rv2-action {grid-column:2;grid-row:3;}.rv2-logo-slot{width:var(--stack-logo-slot);}
 .rv2-button {width:var(--stack-action-width-phone);}.rv2-name {width:auto;}.rv2-month-button {width:44px;}
 .rv2-answer {font-size:var(--text-xl);}.rv2-section-title {padding:var(--space-5);}.rv2-chart {padding:var(--space-4) var(--space-5);gap:var(--space-3);}.rv2-bar-track {height:var(--stack-chart-height-phone);}.rv2-chart-value {font-size:var(--text-xs);}
 .rv2-change {padding:var(--space-5);}.rv2-subtitle,.rv2-panel > .rv2-muted {padding-left:var(--space-5);padding-right:var(--space-5);}.rv2-segments {margin-left:var(--space-5);margin-right:var(--space-5);}
 .rv2-equation {flex-direction:column;align-items:stretch;gap:var(--space-4);}.rv2-equation-part {justify-content:space-between;}.rv2-equation .rv2-foot {border-top:3px double var(--ink-700);padding-top:var(--space-4);}
 .rv2-spend .rv2-amount {grid-column:2;grid-row:2;}.rv2-service td:nth-child(3),.rv2-service td:nth-child(4) {grid-column:2;text-align:right;}
}
@media (max-width:640px) {
 .rv2-sheet {container-type:inline-size;container-name:report-card;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:var(--space-6) var(--space-5);padding-bottom:calc(var(--space-6) + env(safe-area-inset-bottom));}
 .rv2-card-tools {justify-content:space-between;}.rv2-basis {align-items:flex-start;}.rv2-bar-track {height:8rem;}
 .rv2-transaction {flex-direction:column;}.rv2-transaction .rv2-money {align-self:flex-end;}
}

@container report-card (max-width:32rem) {.rv2-equation {flex-direction:column;align-items:stretch;gap:var(--space-4);}.rv2-equation-part{justify-content:space-between;}.rv2-equation .rv2-foot{border-top:3px double var(--ink-700);padding-top:var(--space-4);}}
.rv2-button {overflow-wrap:anywhere;}
.rv2-chart-value.rv2-no-data {white-space:normal;text-align:center;}
.rv2-head-money {font-family:var(--font-mono);font-weight:var(--weight-semibold);}
.rv2-chart-value {font-variant-numeric:tabular-nums;}

/* ── One-UI step 3 (claude-design-1009, 2026-10-13) ──
   Page title; status pills; the retained tabs (Performance, P&L, Vendors &
   fees, Working capital, Snapshot) under .rv2-on: one answer sentence,
   sentence-case tables that stack on a phone, neutral money (sign carries
   direction, never red/green), category chips in one style, outline pill
   buttons, a "Where this came from" list. Only while reports_v2 is on. */
.rv2-page-title {font-family:var(--font-display);font-size:var(--text-2xl);line-height:var(--lh-heading);font-weight:var(--weight-semibold);color:var(--ui-ink);margin:0 0 var(--space-6);}
.rv2-status .tf-status-pill {font-weight:var(--weight-semibold);}
.rv2-where {padding:var(--space-5) var(--space-6);}
.rv2-where .rv2-source-title {font-family:var(--font-display);font-size:var(--text-base);margin:0 0 var(--space-3);}
.rv2-footer-tools .tf-pill-btn {width:var(--btn-pill-w);}
.rv2-segment,.rv2-tone-1,.rv2-tone-2,.rv2-tone-3 {background:var(--ink-300);}
.rv2-tab-answer {font-family:var(--font-display);font-size:var(--text-xl);line-height:var(--lh-heading);font-weight:var(--weight-semibold);color:var(--ui-ink);margin:0 0 var(--space-6);max-width:32em;}
.rv2-tab-sources {margin-top:var(--space-6);background:var(--surface-raised);border:1px solid var(--ui-line);border-radius:var(--radius-card);padding:var(--space-5) var(--space-6);}
.rv2-tab-sources .rv2-source-title {font-family:var(--font-display);font-size:var(--text-base);margin:0 0 var(--space-3);}
#tab-reports.rv2-on .reports-panel table thead th {text-transform:none;letter-spacing:0;font-family:var(--font-sans);color:var(--ui-muted);}
#tab-reports.rv2-on .reports-panel .tf-table-wrap {border-color:var(--ui-line);}
#tab-reports.rv2-on .reports-panel .tf-table td {border-color:var(--ui-divider);}
#tab-reports.rv2-on .reports-panel .text-red,#tab-reports.rv2-on .reports-panel .text-green,
#tab-reports.rv2-on .reports-panel td span[style*="color"],#tab-reports.rv2-on .reports-panel td[style*="color"],
#tab-reports.rv2-on .reports-panel td [class*="change"],#tab-reports.rv2-on .reports-panel .tf-kpi__value,
#tab-reports.rv2-on .reports-panel .pnl-card__change,#tab-reports.rv2-on .reports-panel .chg-up,#tab-reports.rv2-on .reports-panel .chg-down {color:var(--ui-ink) !important;}
#tab-reports.rv2-on #books-categories td span[style],#tab-reports.rv2-on .reports-panel .cat-pill {background:var(--ui-sched-bg) !important;color:var(--ui-sched) !important;}
#tab-reports.rv2-on .reports-panel [style*="cash-down"],#tab-reports.rv2-on .reports-panel [style*="cash-up"] {border-color:var(--ui-line) !important;}
#tab-reports.rv2-on #books-trend-chart [style*="background"][style*="cash"],#tab-reports.rv2-on #books-trend-chart [style*="background"][style*="accent"],#tab-reports.rv2-on #wcap-content [style*="height"][style*="cash"] {background:var(--ink-300) !important;}
#tab-reports.rv2-on .reports-panel .tf-pill-btn {flex:none !important;width:var(--btn-pill-w) !important;min-height:var(--btn-pill-h);padding:var(--space-2) var(--space-3);border:var(--border-width) solid var(--ui-btn-line);border-radius:var(--radius-pill);background:var(--surface-raised);color:var(--ui-ink);font-size:var(--text-sm);font-weight:var(--weight-semibold);justify-content:center;}
#tab-reports.rv2-on .reports-panel .tf-pill-btn svg {display:none;}
@media (max-width:600px) {
 #tab-reports.rv2-on .reports-panel table.tf-table--stack,#tab-reports.rv2-on .reports-panel table.tf-table--stack td {min-width:0 !important;width:100% !important;max-width:100%;}
 #tab-forecast table.fc-week-table,#tab-forecast table.fc-week-table td {min-width:0 !important;width:100% !important;max-width:100%;}
}
