/* P4.2.3 Typography tuning for uploaded local Arabic fonts such as Alexandria.
   This file intentionally contains no font binaries and uses only settings-provided local URLs. */

body.fd-local-font-enabled {
  font-size: var(--fd-app-font-size, 14.5px) !important;
  line-height: var(--fd-body-line-height, 1.72);
  font-weight: var(--fd-weight-regular, 400);
  letter-spacing: -0.006em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
}

body.fd-public-body.fd-local-font-enabled {
  font-size: var(--fd-public-font-size, 15px) !important;
}

.fd-local-font-enabled h1,
.fd-local-font-enabled h2,
.fd-local-font-enabled h3,
.fd-local-font-enabled h4,
.fd-local-font-enabled h5,
.fd-local-font-enabled h6 {
  font-weight: var(--fd-weight-bold, 700) !important;
  letter-spacing: -0.014em;
  line-height: 1.28;
}

.fd-local-font-enabled strong,
.fd-local-font-enabled .fw-bold,
.fd-local-font-enabled .fw-semibold,
.fd-local-font-enabled .fd-brand__copy strong,
.fd-local-font-enabled .fd-admin-metric__value,
.fd-local-font-enabled .fd-public-plan__price {
  font-weight: var(--fd-weight-bold, 700) !important;
}

.fd-local-font-enabled .btn,
.fd-local-font-enabled .form-control,
.fd-local-font-enabled .form-select,
.fd-local-font-enabled .dropdown-menu,
.fd-local-font-enabled .nav-link {
  font-size: var(--fd-control-font-size, 14px) !important;
  line-height: 1.55;
}

.fd-local-font-enabled .btn,
.fd-local-font-enabled .badge,
.fd-local-font-enabled .fd-admin-kicker,
.fd-local-font-enabled .fd-admin-hero__badge,
.fd-local-font-enabled .fd-platform-hero-card__pill {
  font-weight: var(--fd-weight-medium, 500) !important;
}

.fd-local-font-enabled small,
.fd-local-font-enabled .small,
.fd-local-font-enabled .form-text,
.fd-local-font-enabled .text-muted,
.fd-local-font-enabled .fd-admin-panel__head p,
.fd-local-font-enabled .fd-platform-status-card small {
  font-size: var(--fd-small-font-size, .84rem);
  line-height: 1.65;
}

.fd-local-font-enabled code,
.fd-local-font-enabled pre,
.fd-local-font-enabled .font-monospace {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
  letter-spacing: 0;
}

.fd-local-font-enabled .fd-admin-hero h1,
.fd-local-font-enabled .fd-platform-settings-hero h1 {
  font-size: clamp(1.75rem, calc(2.2vw * var(--fd-heading-scale, .96)), 2.55rem) !important;
  line-height: 1.25;
}

.fd-local-font-enabled .fd-public-hero h1,
.fd-local-font-enabled .fd-public-hero__copy h1,
.fd-local-font-enabled .fd-home-hero h1 {
  font-size: clamp(2.15rem, calc(5.2vw * var(--fd-heading-scale, .96)), 4.35rem) !important;
  line-height: 1.12;
}

.fd-local-font-enabled .fd-sidebar,
.fd-local-font-enabled .fd-app-topbar,
.fd-local-font-enabled .fd-admin-panel,
.fd-local-font-enabled .fd-public-card,
.fd-local-font-enabled .fd-public-plan {
  font-feature-settings: "kern" 1;
}

/* Platform settings visual refinement */
.fd-platform-settings-page {
  --fd-platform-card-border: rgba(148, 163, 184, .2);
}

.fd-platform-settings-page .fd-admin-hero {
  padding: clamp(1.25rem, 2vw, 1.8rem);
  border-radius: 28px;
}

.fd-platform-settings-page .fd-admin-hero__copy p {
  max-width: 760px;
  line-height: 1.78;
}

.fd-platform-settings-page .fd-admin-panel__head {
  align-items: flex-start;
  gap: 1rem;
}

.fd-platform-settings-page .fd-admin-panel__head h2 {
  font-size: 1.05rem;
  margin-bottom: .25rem;
}

.fd-platform-settings-page .form-control,
.fd-platform-settings-page .form-select {
  min-height: 44px;
  border-radius: 14px;
}

.fd-platform-settings-page .form-control-lg {
  min-height: 48px;
  font-size: .98rem;
}

.fd-platform-hero-card strong {
  font-size: 1.24rem !important;
  font-weight: var(--fd-weight-bold, 700) !important;
}

.fd-platform-status-card {
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .055);
}

.fd-platform-status-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
}

.fd-platform-typography-control {
  padding: 1rem;
  border-radius: 22px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border: 1px solid rgba(148, 163, 184, .2);
}

.fd-platform-switch--premium {
  min-height: 64px;
  align-items: flex-start;
}

.fd-platform-switch--premium > div,
.fd-platform-switch--premium strong,
.fd-platform-switch--premium small {
  display: block;
}

.fd-platform-switch--premium small {
  color: #64748b;
  margin-top: .15rem;
}

.fd-platform-font-card {
  border-radius: 20px;
}

.fd-platform-font-card strong {
  font-weight: var(--fd-weight-bold, 700) !important;
}

.fd-platform-type-samples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
}

.fd-platform-type-samples > div {
  min-height: 84px;
  padding: .95rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: #fff;
  display: grid;
  align-content: center;
  gap: .35rem;
}

.fd-platform-type-samples span {
  color: var(--fd-primary, #a7161f);
  font-size: .72rem;
  font-weight: var(--fd-weight-medium, 500);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fd-platform-type-samples strong {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: var(--fd-weight-bold, 700) !important;
}

.fd-platform-type-samples p {
  margin: 0;
  color: #475569;
  line-height: 1.72;
}

.fd-platform-font-preview {
  font-size: var(--fd-app-font-size, 14.5px);
}

.fd-platform-font-preview strong {
  font-size: 1rem !important;
  font-weight: var(--fd-weight-bold, 700) !important;
}

.fd-platform-font-preview p {
  margin: .15rem 0 0;
  color: #475569;
  line-height: 1.72;
}

@media (max-width: 900px) {
  .fd-platform-type-samples { grid-template-columns: 1fr; }
}
