/* AI Awaaz shared typography, 2026-09-24.
   Deliberately loaded alongside the legacy theme: explicit text roles override
   legacy fs/weight utilities without changing icon fonts, layout or controls. */
body.app:is(.aia-shell, .white-background, .frontend-body) {
  --aia-t-h1-size: clamp(1.5rem, 1.6vw, 1.75rem);
  --aia-t-h1-weight: 650;
  --aia-t-h1-line: 1.3;
  --aia-t-h1-track: -.025em;
  --aia-t-h2-size: 1.25rem;
  --aia-t-h2-weight: 600;
  --aia-t-h2-line: 1.4;
  --aia-t-h2-track: -.015em;
  --aia-t-h3-size: 1.0625rem;
  --aia-t-h3-weight: 600;
  --aia-t-h3-line: 1.45;
  --aia-t-h4-weight: 600;
  --aia-t-button-size: .875rem;
  --aia-t-button-weight: 600;
  --aia-t-button-line: 1.45;
  --aia-t-nav-size: .875rem;
  --aia-t-nav-weight: 500;
  --aia-t-label-weight: 600;
  --aia-t-metric-size: 1.625rem;
  --aia-t-metric-weight: 600;
  --aia-t-metric-line: 1.35;
  --aia-t-metric-track: -.02em;
  font-family: var(--aia-font-sans, 'Manrope', system-ui, sans-serif);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Semantic defaults also cover older admin and account screens. */
body.app:is(.aia-shell, .white-background, .frontend-body) :is(h1,h2,h3,h4,h5,h6) {
  font-family: var(--aia-font-sans);
  font-weight: 600 !important;
  line-height: 1.4 !important;
  letter-spacing: -.015em !important;
  overflow-wrap: break-word;
}
body.app.aia-shell h1 { font-size: 28px !important; }
body.app.aia-shell h2 { font-size: 20px !important; }
body.app.aia-shell h3 { font-size: 18px !important; }
body.app.aia-shell h4 { font-size: 16px !important; }
body.app.aia-shell :is(h5,h6) { font-size: 14px !important; }
body.app.aia-shell :is(.page-title,.aia-studio-heading .card-title,.aia-voice-library__heading h1,.aia-create__heading h1) {
  font-size: var(--aia-t-h1-size) !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
  letter-spacing: -.025em !important;
}
body.app.aia-shell .aia-content :is(.card-title,.aia-u5-section-title,.aia-u5-settings__title,.aia-studio-section-heading h4,.aia-section-heading h3) {
  font-size: 17px !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
  letter-spacing: -.01em !important;
}
/* The studio title is a page heading even though its legacy tag is h3. */
body.app.aia-shell .aia-content .aia-studio-heading .card-title { font-size: var(--aia-t-h1-size) !important; font-weight: 650 !important; }
body.app.aia-shell .aia-content :is(.aia-u7-plan-card h2,.aia-u7-panel-heading h2,.aia-create__step-heading h2,.aia-create__success h2,.aia-u3-modal__header h2,.aia-account .usage-info h2,.aia-operation-card h3) {
  font-size: 20px !important; font-weight: 600 !important; line-height: 1.4 !important; letter-spacing: -.015em !important;
}
body.app.aia-shell :is(.aia-welcome-copy,.aia-phase5-subtitle,.aia-create__heading p,.aia-voice-library__heading p,.aia-u7-plan-card p) {
  font-size: 14px !important; font-weight: 400; line-height: 1.65 !important;
}
body.app.aia-shell :is(.aia-u7-empty,.aia-empty-state,.aia-create__step-heading p,.aia-create__hint,.aia-settings-hint,.aia-create__fields small,.form-text,.help-block) {
  font-size: 13px !important; font-weight: 400; line-height: 1.6 !important;
}
body.app.aia-shell :is(.aia-eyebrow,.aia-section-kicker,.aia-phase5-kicker,.aia-create__eyebrow,.aia-voice-library__eyebrow) {
  font-size: 11px !important; font-weight: 600 !important; line-height: 1.5; letter-spacing: .08em !important;
}

/* Navigation and controls remain legible without extra-bold text. */
body.app.aia-shell .aia-sidebar :is(.side-menu__label,.slide-item),
body.app.aia-shell .aia-topbar :is(.nav-link,.dropdown-item) {
  font-size: 14px !important; font-weight: 500 !important; line-height: 1.5 !important; letter-spacing: normal;
}
body.app.aia-shell .aia-sidebar .side-item-category { font-size: 11px !important; font-weight: 600 !important; letter-spacing: .08em; }
body.app:is(.aia-shell,.white-background,.frontend-body) :is(.btn,button:not(.header-icon),.nav-tabs .nav-link,.aia-u3-voice-card__select) {
  font-family: var(--aia-font-sans);
  font-size: 14px !important; font-weight: 600 !important; line-height: 1.45 !important; letter-spacing: normal !important;
}
body.app:is(.aia-shell,.white-background,.frontend-body) :is(.form-control,.form-select,input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select) {
  font-family: var(--aia-font-sans); font-size: 14px !important; font-weight: 400 !important; line-height: 1.6 !important; letter-spacing: normal !important;
}
body.app:is(.aia-shell,.white-background) :is(.form-label,.form-group > label,.input-box > label,.aia-field-label,.aia-create__fields label,.aia-login__field > label) {
  font-size: 13px !important; font-weight: 600 !important; line-height: 1.5 !important; letter-spacing: normal !important;
}
body.app:is(.aia-shell,.white-background) :is(.invalid-feedback,.alert,.alert-login) { font-size: 13px !important; line-height: 1.6 !important; }

/* Long names and multilingual scripts must keep their natural glyph spacing. */
body.app.aia-shell :is(.aia-u3-voice-card h3,.aia-voice-library__card h2,.aia-u3-selected-copy strong) {
  font-size: 15px !important; font-weight: 600 !important; line-height: 1.5 !important; letter-spacing: normal !important; overflow-wrap: anywhere;
}
body.app.aia-shell :is(.aia-u3-voice-card p,.aia-u3-voice-card small,.aia-voice-library__card p,.aia-voice-library__card small,.aia-u4-model__heading small,.aia-u5-switch small,.aia-u5-slider small) {
  font-size: 13px !important; font-weight: 400 !important; line-height: 1.55 !important;
}
body.app.aia-shell :is(.aia-u5-switch,.aia-u5-slider) { font-size: 14px !important; font-weight: 500 !important; }
body.app.aia-shell #textarea-row-box textarea,
body.app.aia-shell :is(#aia-script-enhancer-script,#aia-script-enhancer-script p) {
  font-family: var(--aia-font-sans); font-size: 16px !important; font-weight: 400 !important; line-height: 1.85 !important; letter-spacing: normal !important;
}
body.app.aia-shell .aia-script-enhancer__script :is(mark,span) { font-weight: 500 !important; letter-spacing: normal; }

/* Prices and balances use a modest scale; labels never inherit number sizing. */
body.app.aia-shell :is(.aia-u7-metric strong,.aia-voice-balance > strong,.aia-stat-value,.referral-value) {
  font-size: 26px !important; font-weight: 600 !important; line-height: 1.35 !important; letter-spacing: -.02em !important; font-variant-numeric: tabular-nums;
}
body.app.aia-shell :is(.aia-credit-value strong,.aia-balance-value strong,#balance-number) { font-weight: 600 !important; font-variant-numeric: tabular-nums; letter-spacing: normal; }
body.app:is(.aia-shell,.frontend-body) .plan-title { font-size: 17px !important; font-weight: 600 !important; line-height: 1.45 !important; letter-spacing: -.01em !important; overflow-wrap: anywhere; }
body.app:is(.aia-shell,.frontend-body) .price-card .plan-cost,
body.app:is(.aia-shell,.frontend-body) .plan-cost {
  font-size: clamp(26px,2vw,32px) !important; font-weight: 600 !important; line-height: 1.3 !important; letter-spacing: -.025em !important; font-variant-numeric: tabular-nums;
}
body.app:is(.aia-shell,.frontend-body) .plan-cost > :is(.fs-12,small) { font-size: 13px !important; font-weight: 400 !important; line-height: 1.5 !important; letter-spacing: normal !important; }
body.app.aia-shell :is(.table,.dataTable) :is(td,th) { font-size: 13px !important; line-height: 1.55 !important; letter-spacing: normal !important; }
body.app.aia-shell :is(.table,.dataTable) th { font-weight: 600 !important; }
body.app.aia-shell :is(.table,.dataTable) td { font-weight: 400; }
body.app.aia-shell .aia-content :is(.super-strong,.font-weight-800,.font-weight-900) { font-weight: 600 !important; }

/* Auth and public pages share the same family and readable scale. */
body.app.white-background :is(.login-title,h1) { font-size: clamp(26px,2.2vw,32px) !important; font-weight: 650 !important; line-height: 1.3 !important; letter-spacing: -.025em !important; }
body.app.white-background .aia-login__heading p { font-size: 14px !important; line-height: 1.65 !important; }
body.app.white-background .aia-login__options :is(a,.custom-switch-description),
body.app.white-background .aia-login__signup { font-size: 13px !important; line-height: 1.5 !important; }
body.app.white-background .aia-login__options > .d-flex { flex-wrap: wrap; column-gap: 12px; row-gap: 10px; }
body.app.white-background .aia-login__options .custom-switch-description { white-space: normal; }
body.app.frontend-body h1 { font-size: clamp(30px,4vw,52px) !important; line-height: 1.2 !important; }
body.app.frontend-body h2 { font-size: clamp(24px,2.5vw,34px) !important; line-height: 1.3 !important; }
body.app.frontend-body h3 { font-size: 20px !important; }
body.app.frontend-body p { font-size: 15px; line-height: 1.7; }

@media (max-width:767px) {
  body.app.aia-shell :is(.page-title,.aia-studio-heading .card-title,.aia-voice-library__heading h1,.aia-create__heading h1) { font-size: 24px !important; }
  /* Native mobile inputs stay at 16px to avoid focus zoom and crowded glyphs. */
  body.app:is(.aia-shell,.white-background,.frontend-body) :is(.form-control,.form-select,input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select) { font-size: 16px !important; }
  body.app.aia-shell :is(.aia-u7-metric strong,.aia-stat-value) { font-size: 24px !important; }
}
body.app.aia-shell .aia-voiceover .aia-u5-settings__title { display:block; margin:0 !important; padding:0; color:var(--aia-text); }

/* Premium voice settings */
body.app.aia-shell .aia-voiceover .aia-u5-settings{padding:18px!important;border-radius:17px;background:radial-gradient(circle at 100% 0,var(--aia-primary-soft),transparent 55%),var(--aia-surface);box-shadow:0 16px 36px rgba(0,0,0,.08)}
body.app.aia-shell .aia-voiceover .aia-u5-settings__header{display:flex;align-items:center;gap:11px;margin-bottom:15px;padding-bottom:15px;border-bottom:1px solid var(--aia-border)}
body.app.aia-shell .aia-voiceover .aia-u5-settings__icon{display:grid;place-items:center;flex:none;width:38px;height:38px;border:1px solid var(--aia-primary-border);border-radius:11px;background:var(--aia-primary-soft);color:var(--aia-primary);font-size:15px}
body.app.aia-shell .aia-voiceover .aia-u5-settings__subtitle{margin:2px 0 0;color:var(--aia-text-muted);font-size:11px;line-height:1.4}
body.app.aia-shell .aia-voiceover .aia-u5-settings>.aia-u5-slider,body.app.aia-shell .aia-voiceover .aia-u5-settings>.aia-u5-switch{padding:12px 13px;border:1px solid var(--aia-border);border-radius:12px;background:var(--aia-surface-2)}
body.app.aia-shell .aia-voiceover .aia-u5-settings>.aia-u5-switch{margin:9px 0 0;transition:border-color .18s ease,background .18s ease}
body.app.aia-shell .aia-voiceover .aia-u5-settings>.aia-u5-switch:hover{border-color:var(--aia-primary-border)}
