/* Shared typography only. Component sizes and page layout belong to styles.css. */
:root {
  --type-scale: 1;
  --type-extra: calc(1px + 1pt);
  --type-font-family: 'Barlow', 'Inter', 'Noto Sans', 'Noto Sans CJK SC', 'Noto Sans CJK TC', 'Noto Sans CJK JP', 'Noto Sans CJK KR', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans', sans-serif;
  --type-weight-heading: 300;
  --type-weight-body: 400;
  --type-weight-action: 500;
  --type-weight-number: 600;
  --type-letter-text: .2px;
  --type-letter-number: 1px;
  --type-line-heading: 1.2;
  --type-line-body: 1.5;
  --type-unit-ratio: .55em;
}
html[data-font="inter"] {
  --type-extra: 0px;
  --type-font-family: 'Inter', 'Noto Sans', 'Noto Sans CJK SC', 'Noto Sans CJK TC', 'Noto Sans CJK JP', 'Noto Sans CJK KR', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans', sans-serif;
  --type-weight-heading: 700;
  --type-weight-action: 600;
}
html, body, button, input, select, textarea {
  font-stretch: normal;
  font-optical-sizing: auto;
  font-synthesis: none;
}
body {
  --type-base-size: 15px;
  font-size: calc((var(--type-base-size) + var(--type-extra)) * var(--type-scale));
}
body, button, input, select, textarea {
  font-family: var(--type-font-family);
  font-weight: var(--type-weight-body);
  letter-spacing: var(--type-letter-text);
  line-height: var(--type-line-body);
}
/* Explicit roles keep component-specific rules from changing their hierarchy. */
html[data-font] :is(h2, h3, .section-title, .logo, strong, b, th) {
  font-weight: var(--type-weight-action);
}
html[data-font] :is(h1, .modal-header h2) {
  font-weight: var(--type-weight-heading);
}
html[data-font] :is(h1, h2, h3, .section-title) {
  line-height: var(--type-line-heading);
  letter-spacing: var(--type-letter-text);
}
html[data-font] :is(.btn, button, .role-label),
html[data-font] .role-card .role-label {
  font-weight: var(--type-weight-action);
  letter-spacing: var(--type-letter-text);
  line-height: var(--type-line-body);
}
html[data-font] :is(.topnav, .nav-link, .auth-tabs button, .stepper .step, .field label, .field > span:first-child, input, select, textarea, .eyebrow, .tag, .card-company, .card-location, .sort-control, .info-item dd, .auth-role-option span) {
  font-weight: var(--type-weight-body);
  letter-spacing: var(--type-letter-text);
  line-height: var(--type-line-body);
}
/* Numeric styling is opt-in; descriptions and other original user text stay text. */
html[data-font] :is(.numeric-value, .numeric-cell, .money-cell, .type-preview-number) {
  font-weight: var(--type-weight-number);
}
.numeric-value, .numeric-range, .numeric-cell, .money-cell,
input[type="number"], input[inputmode="numeric"], input[inputmode="decimal"],
td[data-type="number"], td[data-type="money"],
th[data-type="number"], th[data-type="money"] {
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--type-letter-number);
}
.numeric-value, .numeric-range, .card-pay, .salary-number, .type-preview-number {
  line-height: var(--type-line-heading);
}
.amount {
  display: inline-flex;
  align-items: baseline;
  gap: .15em;
  white-space: nowrap;
}
.numeric-range { white-space: normal; }
:is(.card-pay, .salary-number, .type-preview-number, .review-item, .manage-row, .info-item) :is(.amount, .numeric-value, .numeric-range) {
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}
html[data-font] .currency,
html[data-font] :is(.card-pay, .salary-number, .type-preview-number, .review-item, .manage-row, .info-item) .currency {
  font-size: .6em;
  font-weight: 500;
  letter-spacing: var(--type-letter-text);
  font-variant-numeric: normal;
  line-height: var(--type-line-body);
  color: inherit;
}
html[data-font] .unit,
html[data-font] :is(.card-pay, .salary-number, .type-preview-number, .review-item, .manage-row, .info-item) .unit {
  font-size: clamp(9px, var(--type-unit-ratio), 1em);
  font-weight: 400;
  letter-spacing: var(--type-letter-text);
  font-variant-numeric: normal;
  line-height: var(--type-line-body);
}
.numeric-cell, .money-cell,
td[data-type="number"], td[data-type="money"],
th[data-type="number"], th[data-type="money"] { text-align: right; }
th { text-align: left; }
/* The settings preview overrides its own tokens without changing saved preferences. */
.type-preview {
  --type-base-size: 15px;
  font-family: var(--type-font-family);
  font-size: calc((var(--type-base-size) + var(--type-extra)) * var(--type-scale));
  font-weight: 400;
  letter-spacing: .2px;
  line-height: 1.5;
}
.type-preview[data-preview-font="barlow"] {
  --type-weight-heading: 300;
  --type-weight-action: 500;
  --type-weight-body: 400;
  --type-weight-number: 600;
}
.type-preview[data-preview-font="inter"] {
  --type-weight-heading: 700;
  --type-weight-action: 600;
  --type-weight-body: 400;
  --type-weight-number: 600;
}
.type-preview h3 {
  --type-base-size: 25px;
  font-family: var(--type-font-family);
  font-size: calc((var(--type-base-size) + var(--type-extra)) * var(--type-scale));
  line-height: 1.2;
  letter-spacing: .2px;
}
.type-preview[data-preview-font] h3 { font-weight: var(--type-weight-heading); }
.type-preview p {
  font-family: var(--type-font-family);
  font-size: inherit;
  font-weight: 400;
  letter-spacing: .2px;
  line-height: 1.5;
}
.type-preview-number {
  --type-base-size: 28px;
  font-family: var(--type-font-family);
  font-size: calc((var(--type-base-size) + var(--type-extra)) * var(--type-scale));
  font-weight: 600;
  line-height: 1.2;
}
.font-options input[value="inter"] + span {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 400;
}
.font-options input[value="barlow"] + span {
  font-family: 'Barlow', 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 400;
}
/* Paper sizes remain independent of the user's screen scale and screen extra. */
@media print {
  :root, html[data-font], .type-preview {
    --type-scale: 1 !important;
    --type-extra: 0px !important;
  }
  html, body {
    font-size: 10.5pt !important;
    line-height: 1.5 !important;
  }
  h1, .modal-header h2 {
    font-size: 24pt !important;
    line-height: 1.2 !important;
  }
  h2, .section-title {
    font-size: 14pt !important;
    line-height: 1.2 !important;
  }
  h3 {
    font-size: 12pt !important;
    line-height: 1.2 !important;
  }
  p, li, dd, dt, label, input, select, textarea,
  .review-item, .tag, .notice, .card-company, .card-location {
    font-size: 10.5pt !important;
    line-height: 1.5 !important;
  }
  .card-pay, .salary-number, .type-preview-number {
    font-size: 14pt !important;
    line-height: 1.2 !important;
  }
  .numeric-value, .numeric-range {
    font-size: inherit !important;
    font-variant-numeric: tabular-nums !important;
    letter-spacing: 1px !important;
  }
  html[data-font] .currency {
    font-size: .6em !important;
    font-weight: 500 !important;
    letter-spacing: .2px !important;
  }
  html[data-font] .unit {
    font-size: max(6.75pt, .55em) !important;
    font-weight: 400 !important;
    letter-spacing: .2px !important;
  }
  th, td {
    font-size: 10.5pt !important;
    line-height: 1.5 !important;
    border: .6pt solid #8c9387 !important;
  }
  thead { display: table-header-group !important; }
  tr { break-inside: avoid; }
  .numeric-cell, .money-cell,
  td[data-type="number"], td[data-type="money"],
  th[data-type="number"], th[data-type="money"] { text-align: right !important; }
}
