/*
  Shared typography layer for the default template.
  Loaded after page/component styles so old template classes cannot drift.
*/

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --type-body: var(--text-sm);
  --type-caption: var(--text-xs);
  --type-control: var(--text-sm);
  --type-card-title: var(--text-md);
  --type-page-title: var(--text-xl);
  --type-system-title: 2.5rem;
  --type-system-code: 5.5rem;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  letter-spacing: 0;
}

body {
  font-family: var(--font-sans);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
label,
button,
input,
select,
textarea,
table,
.btn,
.form-control,
.custom-select {
  font-family: var(--font-sans);
  letter-spacing: 0;
}

h1,
.h1,
.page-title,
.system-title {
  margin: 0;
  color: var(--text);
  font-size: var(--type-page-title);
  font-weight: 750;
  line-height: 1.18;
}

h2,
.h2,
.nk-block-title,
.card-title,
.modal-title {
  margin: 0;
  color: var(--text);
  font-size: var(--type-card-title);
  font-weight: 700;
  line-height: 1.25;
}

h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6 {
  margin: 0;
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.3;
}

p,
.page-subtitle,
.nk-block-des,
.security-card-subtitle,
.description,
.subtitle {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.5;
}

.page-subtitle,
.security-card-subtitle {
  margin: var(--space-0-5) 0 0;
}

.security-eyebrow,
.stat-label,
.form-label,
.form-control-label,
.modal-body label,
th,
.table-header-results,
div.table .table-footer-rows-set label {
  font-size: var(--type-caption);
  font-weight: 700;
  line-height: 1.25;
}

.security-eyebrow {
  text-transform: uppercase;
}

th {
  color: var(--muted);
  text-transform: uppercase;
}

td,
div.table td,
.security-table td {
  font-size: var(--text-sm);
  line-height: 1.35;
}

code,
kbd,
pre,
samp,
div.table td:first-child > div {
  font-family: var(--font-mono);
}

.btn,
button,
[role="button"] {
  font-size: var(--type-control);
  font-weight: 650;
  line-height: 1;
}

.btn-sm,
.btn-xs,
.security-panel .btn,
div.table .table-footer .btn {
  font-size: var(--type-caption);
  font-weight: 700;
}

.security-table .btn,
.security-table button,
.security-table [role="button"] {
  font-size: 0.6875rem;
  font-weight: 700;
}

.form-control,
.custom-select,
.input-field {
  font-size: var(--type-control);
  line-height: 1.35;
}

.form-control-lg {
  font-size: var(--text-md);
}

.security-choice {
  font-size: var(--type-control);
  font-weight: 650;
  line-height: 1.2;
}

.error-code {
  color: var(--primary);
  font-size: var(--type-system-code);
  font-weight: 800;
  line-height: 0.9;
}

.error-card .title {
  color: var(--text);
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.2;
}

.error-card .description {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.system-code {
  margin: 0 0 var(--space-2);
  color: var(--primary);
  font-size: var(--type-system-code);
  font-weight: 800;
  line-height: 0.9;
}

.system-title {
  font-size: var(--type-system-title);
}

.system-description {
  max-width: 28rem;
  margin: var(--space-1) auto 0;
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 1.55;
}

@media (max-width: 48rem) {
  :root {
    --type-system-title: 2rem;
    --type-system-code: 4.5rem;
  }
}
