/* Portal typography — tek semantik ölçek (sayfa / bölüm / gövde / yardımcı). */
:root {
  /* Hedef px (16px kök): sayfa 22, bölüm 18, durum 24, gövde 16, yardımcı 14 */
  --text-page-title: 1.375rem;
  --text-section: 1.125rem;
  --text-status: 1.5rem;
  --text-body: 1rem;
  --text-sm: 0.875rem;
  --text-xs: 0.875rem;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-title: 700;
  --weight-semibold: 700;

  /* Eski / CodeM aliasları — dağınık kurallar aynı ölçeğe bağlansın */
  --type-page: var(--text-page-title);
  --type-section: var(--text-section);
  --type-body: var(--text-body);
  --type-caption: var(--text-sm);
  --text-title: var(--text-page-title);
  --text-lg: var(--text-section);
  --text: var(--text-body);
}

@media (max-width: 700px) {
  :root {
    --text-page-title: 1.25rem; /* 20px */
    --text-status: 1.375rem; /* 22px — baskın ama clamp tavanı yok */
  }
}

body,
body.login-page {
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: 1.55;
}

/* Sayfa başlığı: Özet, Dosyalarım, … — 22 / 20, ekran büyüyünce şişmez */
h1,
.card-title {
  font-size: var(--text-page-title) !important;
  font-weight: var(--weight-title) !important;
  line-height: 1.3 !important;
  letter-spacing: 0 !important;
}

/* Bölüm başlığı: kart h2, panel, expiry, downloads */
h2,
.portal-panel-title,
.ux-panel h2,
.ux-expiry h2,
.ux-downloads h2 {
  font-size: var(--text-section) !important;
  font-weight: var(--weight-title) !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
}

/* Hero durum: Kurtarıldı / güncel aşama — baskın ama ≤24px */
.ux-summary h2,
#currentStatus {
  font-size: var(--text-status) !important;
  font-weight: var(--weight-title) !important;
  line-height: 1.3 !important;
  letter-spacing: 0 !important;
  margin: 0.3rem 0 1rem !important;
}

h3,
h4,
h5,
h6 {
  font-size: var(--text-section) !important;
  font-weight: var(--weight-title) !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
}

:where(h1, h2, h3, h4, h5, h6) {
  margin-block: 0 0.75rem;
  overflow-wrap: anywhere;
  text-align: start;
}

.card-header {
  padding: 1rem 1.25rem;
  text-align: start;
}

.card-header .card-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: var(--ink);
}

/* Başlık 22 → ikon ~20–22 */
.card-header .card-title i,
h1.card-title > i,
.card-title > i {
  flex: 0 0 auto;
  font-size: 0.95em !important;
  margin: 0 !important;
  line-height: 1;
}

:where(h2, h3) > i {
  font-size: 0.95em;
  margin-inline-end: 0.35rem;
}

.card-body {
  padding: 1.25rem;
}

body :is(.nav-item, .sidebar-link, .btn, .btn-login, .app-btn, .otp-open, .store-open) {
  font-size: var(--text-sm);
  font-weight: var(--weight-title);
  line-height: 1.4;
  letter-spacing: 0;
}

body :is(.btn, .btn-login, .app-btn) {
  min-height: 44px;
  padding: 0.625rem 1rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

body :is(.btn, .nav-item, .sidebar-link) > i {
  font-size: 1em;
}

body :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  font-family: inherit;
  font-size: var(--text-body);
  line-height: 1.5;
}

body :is(label, .form-label, summary) {
  font-size: var(--text-sm);
  font-weight: var(--weight-title);
  line-height: 1.5;
}

body :is(
  small,
  .muted,
  .card-lead,
  .security-note,
  .support-line,
  .site-footer,
  .fs-bulk-info,
  .fs-bulk-status,
  .portal-alert,
  .ux-secondary,
  .ux-theme,
  .step-badge,
  .nav-staff-tag
) {
  font-size: var(--text-sm);
  line-height: 1.5;
}

body :is(strong, b) {
  font-weight: var(--weight-title);
}

body :is(
  .grid-cell,
  .fs-list-row,
  .fs-tree-pane,
  .fs-breadcrumb,
  .fs-explorer-status,
  .portal-devices-table td,
  .cases-table td
) {
  font-size: var(--text-sm);
  line-height: 1.5;
}

body :is(th, .grid-header-row .grid-cell, .fs-list-head > div) {
  font-size: var(--text-sm);
  font-weight: var(--weight-title);
  line-height: 1.4;
  letter-spacing: 0;
}

body :is(.fs-list-search-btn, .fs-list-refresh-btn) {
  font-size: var(--text-sm);
  font-weight: var(--weight-title);
}

body :is(.ux-summary, .ux-panel, .ux-expiry, .ux-downloads) {
  padding: 1.25rem;
}

body :is(.portal-modal-card, .portal-summary-card, .fs-modal-content) {
  line-height: 1.55;
}

body :is(.portal-summary-row, .portal-transfer-message, .portal-transfer-meta) {
  font-size: var(--text-sm);
}

.ux-summary-label {
  font-size: var(--text-sm) !important;
  font-weight: var(--weight-title);
  line-height: 1.4;
}

@media (max-width: 700px) {
  .card-header {
    padding: 0.875rem 1rem;
  }
  .card-body {
    padding: 1rem;
  }
  body :is(.ux-summary, .ux-panel, .ux-expiry, .ux-downloads) {
    padding: 1rem;
  }
}
