/* Shared typography/focus contract. All colours inherit the selected application theme. */
html { font-size: 16px; }
:root { --wds-font-grid: 13px; --wds-font-label: 13px; --crm-menu-font-size: 13px; }
.woolly-skip-link { position: fixed; inset-block-start: -200px; inset-inline-start: 12px; z-index: 2200; padding: 10px 16px; border: 2px solid var(--wds-link, #07579f); border-radius: 8px; background: var(--wds-surface, white); color: var(--wds-link, #07579f); font-weight: 600; }
.woolly-skip-link:focus { inset-block-start: 10px; }
:where(a, button, input, select, textarea, summary, [role="tab"]):focus-visible { outline: 2px solid var(--wds-link, #07579f); outline-offset: 3px; }
.crm-content-container :where(.form-text, .dashboard-section-meta, .lead-form-action-note, .crm-pagination-summary, .breadcrumb, .small) { font-size: max(.75rem, 12px); line-height: 1.5; }
.crm-content-container :where(.form-label, .dashboard-table) { line-height: 1.45; }
.crm-content-container :where(input.form-control, select.form-select, textarea.form-control) { font-size: max(.875rem, 14px); }
.wds-tab { min-height: 48px; }
.wds-tab-shell, .wds-tab-panels { background-color: var(--wds-tab-active-bg, var(--wds-surface)); }
.wds-tab-rail { background-color: var(--wds-tab-rail-bg, var(--wds-surface-muted)); }
.wds-tab[aria-selected="true"] { background-color: var(--wds-tab-active-bg, var(--wds-surface)); }
.crm-language-menu .small { max-width: 250px; white-space: normal; font-size: 12px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Exact management totals are data, not decorative labels: never truncate them. */
.management-summary-grid .management-summary-card {
    align-items: flex-start;
    overflow: visible;
}
.management-summary-card > div:last-child {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}
.management-summary-card .dashboard-stat-label {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
}
.management-summary-card .dashboard-stat-value {
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    font-size: 1.125rem;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
}
/* Fit the available content width, not the viewport. At 1440px this normally
   gives three Finance cards per row instead of six cramped/clipped totals.
   At narrow widths min(100%,...) permits one card without horizontal overflow.
   Natural wrapping also retains every separately labelled currency and N2 value. */
.finance-page .management-summary-grid,
.management-summary-grid.management-summary-grid--money {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    align-items: stretch;
}
.finance-page .management-summary-card .invoice-summary-caption {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
}
