/* Inspired by the measured Forbes Global Properties typography:
   Work Sans body 14–16px; FreightNeo headings 26px / 1.2, weight 500.
   Work Sans approximates the unavailable FreightNeo; Noto Sans supplies Greek and Cyrillic.
   Fonts are locally hosted under SIL OFL; see wwwroot/fonts/*-OFL.txt. */
:root {
    --font-ui: 'Work Sans', 'Noto Sans', Arial, sans-serif;
    --type-caption: 13px;
    --type-small: 14px;
    --type-body: 16px;
    --data-text-size: 15px;
    --data-secondary-size: 14px;
    --dxbl-font-family: var(--font-ui);
    --dxds-font-family: var(--font-ui);
}
body { font-family: var(--font-ui); font-size: var(--type-body); font-weight: 400; line-height: 1.5; }
/* Use one font for Cyrillic text, Latin names and numbers in Russian screens. */
html:lang(ru) { --font-ui: 'Noto Sans', 'Work Sans', Arial, sans-serif; }
h1, h2, h3, h4, .brand { font-family: var(--font-ui); font-weight: 500; letter-spacing: -.02em; line-height: 1.25; }
h1, .page-heading h1, .login-form h1 { font-size: clamp(26px, 2.3vw, 32px); }
h2, .panel-heading h2, .assistant-context h2, .assistant-composer h2 { font-size: 22px; }
h3, .settings-panel h3, .assistant-result h3 { font-size: 19px; }
.modal .modal-heading h2 { font-size: clamp(24px, 2.1vw, 28px); font-weight: 500; }
.modal h3 { font-size: 20px; font-weight: 500; }
strong, b { font-weight: 600; }
input, select, textarea { font-family: var(--font-ui); font-size: 16px; font-weight: 400; line-height: 1.5; min-height: 44px; }
input[type=checkbox], input[type=radio] { min-height: 0; }
label { font-size: 14px; font-weight: 500; line-height: 1.5; }
.button, .text-button, .segmented button { font-family: var(--font-ui); font-size: 14px; font-weight: 500; line-height: 1.5; }
.button { min-height: 42px; }
.sidebar nav a { font-size: 14px; font-weight: 500; }
.sidebar nav a.active { font-weight: 600; }
.workspace-name strong, .profile strong { font-size: 14px; font-weight: 600; }
.breadcrumb, .top-actions select, .global-search input { font-size: 14px; }
.eyebrow, .nav-heading { font-size: 12px; font-weight: 500; letter-spacing: .1em; }
.rr-brand-caption { font-family: var(--font-ui); font-size: 10px; }
.page-heading p, .section-heading p, .panel-heading p, .settings-panel p,
.info-card p, .login-form > p, .demo-note p, .email-body, .assistant-answer { font-size: 15px; line-height: 1.65; }
.property-body h3 { font-size: 19px; font-weight: 500; line-height: 1.35; }
.property-price { font-family: var(--font-ui); font-weight: 500; font-size: 24px; }
.stat > strong { font-family: var(--font-ui); font-weight: 500; letter-spacing: -.03em; }
.stat > span, .stat > small { line-height: 1.5; }
.lead-name strong, .team-row strong, .kanban-card strong { font-weight: 500; }
th { font-weight: 500; letter-spacing: 0; }
td { font-variant-numeric: tabular-nums; }
.badge { font-weight: 500; }
.unassigned-owner { font-weight: 600; }
.notice, .validation-errors, .empty p { font-size: 14px; }
.timeline article > strong { font-size: 15px; font-weight: 500; }
.timeline article p { font-size: 14px; line-height: 1.65; }
.assistant-prompt textarea, .assistant-draft input, .assistant-draft textarea,
.assistant-context select, .mailbox-table input, .mailbox-table select { font-size: 16px; }
.assistant-shortcuts button, .assistant-check { font-size: 14px; }
:is(.lead-dialog, .property-dialog) { font-size: 16px; }
:is(.lead-dialog, .property-dialog) label { font-weight: 500; }
:is(.lead-dialog, .property-dialog) input, :is(.lead-dialog, .property-dialog) select,
:is(.lead-dialog, .property-dialog) textarea { font-size: 16px; }
label[data-selected-overflow]::after { font-size: 13px; }
@media (max-width: 640px) {
    .heading-actions .button { font-size: 14px; }
    .page-heading p { font-size: 14px; }
    .panel-heading h2 { font-size: 20px; }
    .login-story h1 { font-size: 28px; }
    .app-footer { flex-wrap: wrap; gap: 12px; }
}
/* Short categorical labels should not break mid-word in data tables. */
.source-label { white-space: nowrap; }

/* Long translated labels must not push the profile outside the fixed sidebar. */
.sidebar { overflow-y: auto; }
.sidebar > * { flex-shrink: 0; }
/* Keep measurements together; move the whole feature onto the next line. */
.property-meta { flex-wrap: wrap; row-gap: 10px; }
.property-meta > span { flex-shrink: 0; max-width: 100%; overflow-wrap: normal; }
.property-meta > span:last-child { white-space: nowrap; }
.toolbar .filter-select { display: block; margin: 0; min-width: 0; max-width: 100%; }
.toolbar .filter-select select { width: 100%; }
@media (max-width: 640px) {
    .toolbar .filter-select { flex: 1 1 170px; }
}

/* Russian stage names need a full line, even in the desktop half-width panel. */
html:lang(ru) .pipeline-chart { height: auto; flex-direction: column; gap: 16px; }
html:lang(ru) .chart-column { display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 6px 12px; align-items: center; }
html:lang(ru) .chart-column > span { grid-column: 1 / -1; grid-row: 1; margin: 0; overflow-wrap: normal; }
html:lang(ru) .chart-column .bar-track { grid-column: 1; grid-row: 2; height: 14px; border: 0; }
html:lang(ru) .chart-column .bar { height: 14px; width: var(--stage-share); border-radius: 3px; }
html:lang(ru) .chart-column strong { grid-column: 2; grid-row: 2; margin: 0; text-align: right; }
@media (max-width: 640px) {
    .assistant-prompt textarea:placeholder-shown { min-height: 260px; }
}
