/**
 * Atlas shared type scale — sizes, weights, line-heights.
 * Load after app.css / marketing.css so semantic rules can normalize chrome.
 */
:root {
  --atlas-type-2xs: 0.6875rem;
  --atlas-type-xs: 0.8125rem;
  --atlas-type-sm: 0.875rem;
  --atlas-type-md: 1rem;
  --atlas-type-lg: 1.0625rem;
  --atlas-type-xl: 1.25rem;
  --atlas-type-2xl: 1.5rem;
  --atlas-type-display: clamp(1.75rem, 4vw, 2.5rem);

  --atlas-weight-regular: 400;
  --atlas-weight-medium: 500;
  --atlas-weight-semibold: 600;
  --atlas-weight-bold: 700;

  --atlas-leading-tight: 1.25;
  --atlas-leading-normal: 1.5;
  --atlas-leading-relaxed: 1.62;

  /* Legacy aliases (lesson form, mobile views) */
  --app-title: var(--atlas-type-lg);
  --app-body: var(--atlas-type-sm);
  --app-caption: var(--atlas-type-xs);
  --app-leading: var(--atlas-leading-normal);

  --mkt-body: var(--atlas-type-sm);
  --mkt-body-leading: var(--atlas-leading-normal);
}

@media (max-width: 640px) {
  :root {
    --atlas-type-2xs: 0.75rem;
    --atlas-type-xs: 0.875rem;
    --atlas-type-sm: 0.9375rem;
    --atlas-type-display: clamp(1.5rem, 6vw, 2rem);
  }
}

/* --- Semantic typography (app + shared chrome) --- */
body {
  font-size: var(--atlas-type-md);
  line-height: var(--atlas-leading-normal);
}

.mkt-body {
  --mkt-body: var(--atlas-type-sm);
  font-size: var(--atlas-type-md);
  line-height: var(--atlas-leading-normal);
}

.view-title {
  font-size: var(--atlas-type-2xl);
  font-weight: var(--atlas-weight-bold);
  line-height: var(--atlas-leading-tight);
}

.view-lead,
.hint:not(.inline-hint) {
  font-size: var(--atlas-type-sm);
  line-height: var(--atlas-leading-normal);
}

.panel-heading {
  font-size: var(--atlas-type-lg);
  font-weight: var(--atlas-weight-semibold);
}

.field > .field-label,
.field > span.field-label {
  font-size: var(--atlas-type-md);
  font-weight: var(--atlas-weight-semibold);
}

.field input[type="text"],
.field input[type="search"],
.field input[type="email"],
.field input[type="password"],
.field input[type="url"],
.field input[type="number"],
.field select,
.field textarea,
select.text-input,
input.text-input,
textarea.text-input {
  font-size: var(--atlas-type-md);
}

button,
.mkt-btn,
.button-link.primary {
  font-size: var(--atlas-type-md);
  font-weight: var(--atlas-weight-semibold);
}

.workflow-step {
  font-size: var(--atlas-type-sm);
}

.app-toolbar .nav-lbl-full {
  font-size: var(--atlas-type-md);
}

.app-toolbar .nav-lbl-text {
  font-size: var(--atlas-type-xs);
  font-weight: var(--atlas-weight-semibold);
}

.mkt-hero h1 {
  font-size: var(--atlas-type-display);
}

.mkt-hero p.lead,
.mkt-section-lead,
.mkt-feat-hero p.lead {
  font-size: var(--mkt-body);
  line-height: var(--mkt-body-leading);
}

#ops-summary .ops-metric-label {
  font-size: var(--atlas-type-2xs);
  font-weight: var(--atlas-weight-semibold);
}

#ops-summary .ops-metric-value--num {
  font-size: var(--atlas-type-xl);
  font-weight: var(--atlas-weight-bold);
}

#ops-summary .ops-metric-value--text {
  font-size: var(--atlas-type-xs);
}

@media (max-width: 640px) {
  main#app .view-title {
    font-size: var(--atlas-type-xl);
  }

  main#app {
    --app-title: var(--atlas-type-lg);
    --app-body: var(--atlas-type-sm);
    --app-caption: var(--atlas-type-xs);
  }
}