/* Course task typography. The complete shared UI family carries arbitrary
   course/file names; course codes retain their original monospace role. */
:root :is(.course-catalog, .course-detail) {
  font-family: var(--nylon-type-ui);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.75;
  color: var(--ny-text);
}

:root .course-catalog .catalog-heading h1,
:root .course-detail .course-title-row h1 {
  font-family: var(--nylon-type-ui);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ny-text);
}

:root .course-catalog .catalog-course h3,
:root .course-detail :is(h2, h3, h4) {
  font-family: var(--nylon-type-ui);
  font-weight: 650;
  color: var(--ny-text);
}

:root .course-catalog .catalog-course h3 { font-size: 17px; }
:root .course-catalog .catalog-caption h2 { font-weight: 650; }
:root .course-detail .course-file-row h4 { font-size: 17px; }

/* interface.css has a typed-input font shorthand at specificity (0,4,2).
   Match its three exclusions so this scoped role wins at (0,5,1), including
   select/textarea through :is(), without making unrelated controls heavier. */
:root :is(.course-catalog, .course-detail)
  :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea),
:root .course-catalog .catalog-program-field .ny-select > button.ny-select-trigger {
  font-family: var(--nylon-type-ui);
  font-size: 16px;
  font-weight: 500;
  color: var(--ny-text);
}

:root :is(.course-catalog, .course-detail) :is(input, textarea)::placeholder {
  color: var(--ny-muted);
  opacity: 1;
  font-weight: 500;
}

:root .course-catalog :is(.catalog-search-box button, .catalog-contribute),
:root .course-detail :is(button, .course-primary-link) {
  font-family: var(--nylon-type-ui);
  font-weight: 600;
  font-size: 14px;
}

:root .course-catalog .catalog-search-box .catalog-clear {
  font-size: 24px;
  font-weight: 500;
}

:root .course-catalog :is(.catalog-program-field > label, .catalog-sort-field > label),
:root .course-detail :is(.course-field > label, .course-material-filter label > span,
  .course-history-filter label, .course-reference-filter label) {
  font-weight: 600;
  color: var(--ny-text);
}

:root .course-catalog :is(.catalog-scope label > span, .catalog-list-head),
:root .course-detail .course-section-nav.ny-glass-surface > a {
  font-family: var(--nylon-type-ui);
  font-weight: 600;
  color: var(--ny-text);
}

:root .course-catalog .catalog-scope input:checked + span,
:root .course-detail .course-section-nav.ny-glass-surface > a[aria-current=page] {
  font-weight: 700;
}

/* The useful secondary layer is never reduced with opacity. Keep dates,
   provenance and limits legible while names and actions remain the first read. */
:root .course-catalog :is(.catalog-heading p:last-child, .catalog-course-meta,
  .catalog-materials, .catalog-result-context, .catalog-native-hint,
  .catalog-method, .catalog-pagination, .catalog-access, .catalog-empty p),
:root .course-detail :is(.course-section-heading p, .course-help,
  .course-source-note, .course-file-meta, .course-file-policy,
  .course-footer-help, .comment-form-footer p, .course-comment time,
  .comment-kind, .course-source-evidence, .course-scheme-list small,
  .course-reference-empty, .history-entry-meta, .course-related-post p,
  .course-material-pagination) {
  font-weight: 500;
  color: var(--ny-muted);
}

:root .course-catalog :is(.catalog-heading .eyebrow, .catalog-caption h2 > span,
  .catalog-materials strong > span, .catalog-materials > span,
  .catalog-course-meta, .catalog-method, .catalog-pagination, .catalog-access),
:root .course-detail :is(.course-section-count, .course-file-meta,
  .course-file-policy, .course-help, .course-source-note,
  .course-file-group > h3 > span, .history-entry-meta,
  .course-material-pagination) {
  font-size: 13px;
  font-weight: 500;
}

:root .course-catalog .catalog-heading p:last-child,
:root .course-detail :is(.course-section-heading p, .course-footer-help) {
  font-size: 15px;
}

:root .course-catalog .catalog-materials strong {
  font-weight: 700;
  color: var(--ny-text);
}

:root .course-detail :is(.course-file-policy dd, .course-description,
  .comment-body, .course-rule > p, .course-offering) {
  color: var(--ny-text);
  font-weight: 500;
}

:root .course-detail :is(.course-description, .comment-body) {
  font-size: 16px;
  line-height: 1.9;
}

:root .course-detail :is(.course-back, .course-personal-tools > a,
  .course-personal-options > summary, .course-personal-panel a,
  .course-file-open-label, .course-file-actions a, .course-review-actions a,
  .course-evidence-index a, .course-edit-link, .course-member-action),
:root .course-catalog :is(.catalog-row-action, .catalog-sidebar-heading a,
  .catalog-access nav a, .catalog-pagination a) {
  font-weight: 600;
  color: var(--ny-link);
}

:root .course-detail .course-file-row h4 > a { color: var(--ny-text); }
:root .course-detail .course-file-policy dt { font-weight: 600; }
:root .course-detail [data-course-disclosure] > summary { font-weight: 600; }
:root .course-detail [data-course-disclosure] > summary small { font-weight: 500; }
:root .course-detail .community-bookmark-form label { font-weight: 500; }

/* Keep the original code face, fixed tracking and tabular numbers. The Latin
   regular asset has one weight, so avoid synthesizing a darker code face. */
:root .course-catalog .catalog-code,
:root .course-detail .course-code {
  font-family: var(--nylon-type-code);
  font-weight: 400;
  color: var(--ny-text);
}

@media (max-width: 600px) {
  :root .course-catalog .catalog-course h3,
  :root .course-detail .course-file-row h4 { font-size: 16px; }
  :root .course-detail .course-section-nav.ny-glass-surface > a { font-size: 14px; }
  :root .course-detail .course-material-pagination { font-size: 13px; }
}
