/* Canonical Persian type roles. Load after all component/responsive styles.
   Numeric formatting, stored amounts, telephone numbers and IDs are untouched. */
@font-face {
  font-family: "Ava Vazirmatn";
  src: url('/static/Vazirmatn.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --ava-font-text: "Ava Vazirmatn", Tahoma, Arial, sans-serif;
  --ava-font-code: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ava-type-micro: .75rem;
  --ava-type-caption: .8125rem;
  --ava-type-small: .875rem;
  --ava-type-body: 1rem;
  --ava-type-h3: 1.125rem;
  --ava-type-h2: clamp(1.125rem, 1.05rem + .3vw, 1.375rem);
  --ava-type-h1: clamp(1.375rem, 1.2rem + .6vw, 1.75rem);
  --ava-type-figure: clamp(1.5rem, 1.35rem + .6vw, 2rem);
  --ava-weight-regular: 400;
  --ava-weight-medium: 500;
  --ava-weight-semibold: 600;
  --ava-weight-bold: 700;
  --ava-leading-body: 1.9;
  --ava-leading-compact: 1.65;
}
html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html body,
html body.vmm-workspace {
  font-family: var(--ava-font-text);
  font-size: var(--ava-type-body);
  font-weight: var(--ava-weight-regular);
  line-height: var(--ava-leading-body);
  font-synthesis: none;
  letter-spacing: normal;
}
/* Inherit only on text controls; never replace the icon-font family on i/.fa. */
html body :is(button, input, select, textarea),
html body.vmm-workspace :is(button, input, select, textarea) {
  font-family: var(--ava-font-text);
  letter-spacing: normal;
}
html body :is(input, select, textarea),
html body.vmm-workspace :is(input, select, textarea) {
  font-size: var(--ava-type-body);
  font-weight: var(--ava-weight-regular);
  line-height: 1.75;
}
html body :is(input, textarea)::placeholder { font-weight: var(--ava-weight-regular); }
html body :is(#content, #dialog-content, .auth, .shared-report, main) :is(h1, h2, h3, h4),
html body.vmm-workspace :is(#content, #dialog-content, .auth) :is(h1, h2, h3, h4) {
  font-family: var(--ava-font-text);
  line-height: 1.6;
  letter-spacing: normal;
  font-weight: var(--ava-weight-semibold);
}
html body :is(#content, #dialog-content, .auth, .shared-report, main) h1,
html body.vmm-workspace :is(#content, #dialog-content, .auth) h1 {
  font-size: var(--ava-type-h1);
  font-weight: var(--ava-weight-bold);
}
html body :is(#content, #dialog-content, .auth, .shared-report, main) h2,
html body.vmm-workspace :is(#content, #dialog-content, .auth) h2 { font-size: var(--ava-type-h2); }
html body :is(#content, #dialog-content, .auth, .shared-report, main) h3,
html body.vmm-workspace :is(#content, #dialog-content, .auth) h3 { font-size: var(--ava-type-h3); }
html body :is(#content, #dialog-content, .auth, .shared-report, main) h4,
html body.vmm-workspace :is(#content, #dialog-content, .auth) h4 { font-size: var(--ava-type-body); }
html body.vmm-workspace #shell > main > header h1 { font-size: var(--ava-type-h1); }
html body :is(#content, #dialog-content, .auth, .shared-report, main) p,
html body.vmm-workspace :is(#content, #dialog-content, .auth) p {
  font-size: var(--ava-type-body);
  line-height: var(--ava-leading-body);
  letter-spacing: normal;
}
html body :is(label, legend),
html body.vmm-workspace :is(label, legend),
html body.vmm-workspace :is(#content, #dialog-content, .auth) :is(label, legend) {
  font-size: var(--ava-type-small);
  font-weight: var(--ava-weight-medium);
  line-height: 1.8;
}
html body :is(#content, #dialog-content, .auth, .shared-report) :is(button, .button-link, summary, .doc-link),
html body.vmm-workspace :is(#content, #dialog-content, .auth) :is(button, .button-link, summary, .doc-link),
html body dialog#dialog button {
  font-size: var(--ava-type-small);
  font-weight: var(--ava-weight-semibold);
  line-height: var(--ava-leading-compact);
  letter-spacing: normal;
}
html body main #bank-form button { font-family: var(--ava-font-text); font-size: var(--ava-type-small); font-weight: var(--ava-weight-semibold); line-height: var(--ava-leading-compact); }
html body :is(#content, #dialog-content, .shared-report) :is(b, strong) { font-weight: var(--ava-weight-semibold); }
html body :is(#content, #dialog-content, .auth, .shared-report) :is(small, .muted, .field-help, .notice, .error-text, .toolbar-label),
html body.vmm-workspace :is(#content, #dialog-content, .auth) :is(small, .muted, .field-help, .notice, .error-text, .toolbar-label) {
  font-size: var(--ava-type-caption);
  font-weight: var(--ava-weight-regular);
  line-height: 1.85;
}
html body :is(#content, #dialog-content, .shared-report) :is(.notice, .field-help, .muted) p {
  font-size: inherit;
  line-height: inherit;
}
html body :is(#content, #dialog-content, .shared-report) :is(td, th),
html body.vmm-workspace :is(#content, #dialog-content) :is(td, th) {
  font-size: var(--ava-type-small);
  line-height: 1.8;
  letter-spacing: normal;
}
html body :is(#content, #dialog-content, .shared-report) th,
html body.vmm-workspace :is(#content, #dialog-content) th {
  font-size: var(--ava-type-caption);
  font-weight: var(--ava-weight-semibold);
}
html body :is(#content, #dialog-content, .shared-report) :is(.money, .stat, .workspace-wallet-amount, .report-kpi > strong, .report-compact-card > strong, .workspace-metric > strong) {
  font-size: var(--ava-type-figure);
  font-weight: var(--ava-weight-semibold);
  line-height: 1.6;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: normal;
}
html body :is(#content, #dialog-content, .shared-report) :is(.money, .workspace-wallet-amount) small { font-size: var(--ava-type-small); }
html body :is(#content, #dialog-content, .shared-report) :is(.badge, .tariffs) {
  font-size: var(--ava-type-caption);
  font-weight: var(--ava-weight-medium);
  line-height: 1.8;
}
html body :is(#content, #dialog-content, .shared-report) :is(td, dd, .estimate, .badge, input[type=number]) { font-variant-numeric: lining-nums tabular-nums; }
html body :is(#content, #dialog-content, .shared-report) :is(code, .send-id, .token, .workspace-campaign-id) {
  font-family: var(--ava-font-code);
  font-size: var(--ava-type-caption);
  font-weight: var(--ava-weight-regular);
  line-height: 1.75;
  letter-spacing: normal;
}
html body .guide { max-width: 72ch; font-size: var(--ava-type-body); line-height: 2; }
html body #toast { font-family: var(--ava-font-text); font-size: var(--ava-type-small); line-height: 1.85; }
/* Navigation roles and persistent chrome. */
html body.vmm-workspace #shell aside nav button { font-size: var(--ava-type-small); font-weight: var(--ava-weight-medium); line-height: 1.8; }
html body.vmm-workspace #shell aside nav button.active { font-weight: var(--ava-weight-semibold); }
html body.vmm-workspace :is(.workspace-nav-label, .workspace-menu-search label, .workspace-brand-copy small, #workspace-identity small, .aside-bottom > small, #company, .eyebrow) {
  font-size: var(--ava-type-micro); line-height: 1.8; letter-spacing: normal; font-weight: var(--ava-weight-medium);
}
html body.vmm-workspace :is(.workspace-menu-caption, .workspace-menu-close, #workspace-identity strong, .header-tools button, .workspace-provider-disclosure > summary) { font-size: var(--ava-type-small); font-weight: var(--ava-weight-medium); line-height: 1.8; }
html body.vmm-workspace #shell .brand { font-size: 2rem; font-weight: var(--ava-weight-bold); letter-spacing: normal; line-height: 1.4; }
html body.vmm-workspace #connection { font-size: var(--ava-type-micro); font-weight: var(--ava-weight-medium); }
html body.vmm-workspace :is(.workspace-menu-search input, .workspace-menu-search input::placeholder) { font-size: var(--ava-type-body); }
/* Detail copy shares roles instead of shrinking separately in each component. */
html body :is(#content, #dialog-content) :is(.workspace-kicker, .workspace-section-heading > span, .workspace-metric-label, .workspace-metric > small, .workspace-table-subtitle, .workspace-wallet-note, .workspace-wallet-owner, .workspace-wallet dt, .workspace-wallet dd, .workspace-overview-footnote, .workspace-task small, .workspace-service-row small, .workspace-panel-heading p, .workflow-dialog-intro, .report-chart-detail, .report-detail-row, .report-key-row, .report-denominator-note, .report-kpi small, .report-filter-summary, .report-compact-card small),
html body :is(.provider-credit > small, .line-provider-credit) { font-size: var(--ava-type-caption); line-height: 1.85; letter-spacing: normal; }
html body :is(#content, #dialog-content) :is(.workspace-task strong, .workspace-service-row strong, .workspace-wallet-label, .provider-credit-heading, .workflow-step-number) { font-size: var(--ava-type-small); line-height: 1.8; }
html body #provider-balances-bar :is(.provider-credit > span, .provider-credit > small) { font-size: var(--ava-type-caption); line-height: 1.85; }
html body #provider-balances-bar .provider-credit > strong { font-size: var(--ava-type-body); font-weight: var(--ava-weight-semibold); }
/* Existing report renderer has two size declarations marked important. */
html body .report-legend .report-legend-item { font-size: var(--ava-type-caption) !important; font-weight: var(--ava-weight-medium); line-height: 1.8; }
html body .report-legend .report-legend-item small { font-size: var(--ava-type-caption); }
html body .report-overview svg text { font-family: var(--ava-font-text); font-variant-numeric: tabular-nums; letter-spacing: normal; }
html body .report-overview .report-donut-number { font-size: 28px; font-weight: var(--ava-weight-semibold); }
html body .report-overview .report-donut-caption { font-size: 13px; font-weight: var(--ava-weight-regular); }
html body.vmm-workspace :is(#content, #dialog-content) p:is(.workspace-wallet-note, .workspace-overview-footnote, .workflow-dialog-intro, .report-chart-detail, .report-denominator-note),
html body.vmm-workspace :is(#content, #dialog-content) .workspace-panel-heading p { font-size: var(--ava-type-caption); line-height: 1.85; font-weight: var(--ava-weight-regular); }
html body #provider-balances-bar .provider-credit-heading button { font-size: var(--ava-type-small) !important; font-weight: var(--ava-weight-semibold); }
html body :is(#content, #dialog-content) :is(.phase-strip, .report-progress .row, .report-pagination, .readiness, .workflow-check-item small, .content-approval-panel .quality-details p) { font-size: var(--ava-type-caption); line-height: 1.85; }
html body :is(#content, #dialog-content) :is(.workflow-fieldset legend, .workflow-count, .report-filter-chip) { font-size: var(--ava-type-small); font-weight: var(--ava-weight-medium); }
html body .line-provider-credit { font-size: var(--ava-type-caption) !important; line-height: 1.85; }
@media (max-width:780px) {
  html body.vmm-workspace #shell > main > header .header-tools #reload-template { font-size: 0; }
  html body.vmm-workspace #shell > main > header .header-tools #reload-template i { font-size: 16px; }
}
@media (max-width:600px) {
  html body.vmm-workspace #shell > main > header h1 { font-size: 1.25rem; }
  /* Icon-only controls retain their accessible labels and do not grow the header. */
  html body.vmm-workspace #shell > main > header .header-tools :is(#connection, #reload-template) { font-size: 0; }
  html body.vmm-workspace #shell > main > header .header-tools #reload-template i { font-size: 16px; }
}
@media print {
  html body,
  html body.vmm-workspace { font-size: 11pt; line-height: 1.7; }
}
