/* Shared reading and control sizes for the public catalogue and editorial tools. */
:root {
  --type-body: 1rem;
  --type-action: .9375rem;
  --type-label: .875rem;
  --type-meta: .8125rem;
  --line-copy: 1.7;
}

.hf-summary, .story p, .topicgrid span,
.rd-titleblock > p, .rd-text p, .rd-filehead p,
.th-head p, .th-card-copy p, .th-spot-copy p,
.bj-mast p, .bj-feature-info p, .bj-row p,
.entry p, .route span, .adminpanel .intro {
  font-size: var(--type-body);
  line-height: var(--line-copy);
}

.hf-category, .hf-count, .nasfeature small, .story small, .topicgrid small,
.rd-feature small, .rd-options small, .rd-result-title span, .rd-text small,
.rd-record dt, .rd-code, .rd-pending,
.th-tools output, .th-slide-count, .th-kicker, .th-spot-end > span,
.th-routes-head span, .th-routetxt small,
.bj-pick, .bj-feature-line time, .bj-story small, .bj-listhead output,
.bj-choices button small, .crumb, .rd-crumb {
  font-size: var(--type-meta);
  line-height: 1.55;
}

.hf-read, .quick a, .th-enter, .bj-more, .rd-downloads .rd-action,
.rd-record dd, .rd-relation, .rd-search button, .rd-options button,
.th-tabs button, .bj-choices button, .soft {
  font-size: var(--type-action);
}

.secthead a, .nasfeature span, .rd-feature span,
.rd-reset, .rd-alt, .rd-topics, .route em,
.bj-listhead select {
  font-size: var(--type-label);
}

.rd-search input, .th-search input, .bj-search input, .filters input {
  min-width: 0;
  font-size: var(--type-body);
}

:is(.rd-search, .th-search, .bj-search) { min-height: 44px; }
.bj-listhead select { min-height: 38px; }
.rd-facet > h2, .bj-side h2 { font-size: var(--type-body); }
.th-routetxt b, .th-feature-link b { font-size: var(--type-action); }




.bj-row, .rd-entry { padding-block: clamp(17px, 1.5vw, 23px); }
.bj-row h3, .rd-text h3 { margin-block: 5px; }
.rd-record dl > div { min-width: 0; }
.rd-record dd, .rd-result-title, .rd-filehead p, .bj-story {
  overflow-wrap: anywhere;
}
.rd-wrap .rd-notes h2, .rd-rel-block h2 { font-size: 1.1875rem; }
.rd-topics { gap: 8px 14px; }
.route span, .route em { line-height: 1.55; }

.mb-wrap .mb-byline, .mb-wrap .mb-byline small,
.mb-wrap .mb-controls small, .ad small, .rd-sponsors .ad .cycle,
.ad .cycle { font-size: var(--type-meta); }
.mb-wrap .mb-byline small, .ad small { padding: 1px 5px; }
.mb-wrap .mb-controls > button { min-width: 31px; min-height: 34px; }
.mb-wrap .mb-controls .mb-play { font-size: var(--type-label); }
.mb-wrap .mb-controls small { min-width: 34px; }
.mb-side .mb-copy { padding-top: 15px; }
.mb-side .mb-byline { flex-wrap: wrap; gap: 4px 7px; }

:root:has(body[data-cms-admin]) { font-size: 100%; }
.cms-main, .adminpanel { overflow-wrap: anywhere; }
.cms-sidebar button span, .cms-sidebar h2, .cms-sidebar p, .cms-state,
.cms-small, .cms-list-head, .md-status, .mb-admin-item small { font-size: var(--type-meta); }
.cms-field, .cms-list-row, .cms-top p, .cms-hint, .cms-tag,
.fields label, .cms-group h3 { font-size: var(--type-label); }
.cms-btn, .cms-act, .cms-list-row .cms-link, .cms-sidebar button, .cms-sidebar a,
.md-toolbar button, .mb-admin-tabs > button, .mb-admin-item strong {
  font-size: var(--type-action);
}
.cms-field input, .cms-field select, .cms-tools input, .cms-tools select,
.cms-rel-controls select, .fields :is(input, select, textarea),
.auth-card input, .auth-card button { font-size: var(--type-body); }
.cms-btn, .cms-act, .cms-sidebar nav > *, .cms-field :is(input,select),
.cms-tools :is(input,select), .cms-rel-controls select { min-height: 42px; }
.cms-form { row-gap: 22px; }
.cms-field, .fields label { gap: 7px; }
.cms-panel .md-widget textarea { font-size: 1rem !important; line-height: 1.75; }
.cms-panel .md-toolbar { gap: 6px; }
.cms-panel .md-toolbar button { min-height: 36px; }
.cms-list-row { padding-block: 14px; }
.auth-card .auth-intro { font-size: var(--type-body); line-height: var(--line-copy); }
.auth-card label, .auth-card .back { font-size: var(--type-action); }
.auth-spread .auth-feature-copy p { font-size: var(--type-meta); }

@media (max-width: 680px) {
  .story p { display: -webkit-box; -webkit-line-clamp: 2; }
  .entry.story { align-items: flex-start; padding-block: 16px; }
  .story b, .rd-text h3, .bj-row h3 { font-size: 1.125rem; line-height: 1.42; }
  .bj-row p { -webkit-line-clamp: 2; }
  .th-tools, .rd-head { row-gap: 12px; }
  .th-tools { padding-block: 11px; }
  .th-tabs button, .bj-choices button, .rd-options button { min-height: 39px; }
  .rd-workspace { grid-template-columns: minmax(0, 1fr); }
  .rd-facet, .rd-results { min-width: 0; }
  .rd-options { flex-wrap: wrap; gap: 6px; overflow: visible; padding: 0; }
  .rd-options button { gap: 6px; }
  .rd-head { display: flex; }
  .bj-listhead select { font-size: var(--type-body); max-width: 100%; }

  .rd-thumb { width: 40px; height: 40px; }
  .rd-filehead p { margin-top: 8px; }
  .th-tabs { flex: 1 1 auto; }
  .th-tools output { margin-inline-start: 0; }
  .th-search { flex-basis: 100%; }


  .bj-mast, .th-head { align-items: baseline; }
  .bj-row { align-items: flex-start; }
  .bj-thumb { margin-top: 3px; }
  .bj-body .bj-side { margin-bottom: 17px; }
  .cms-main .cms-panel { padding: 12px; }
  .adminwrap .adminpanel { min-width: 0; }
  .mb-admin-item { align-items: flex-start; flex-wrap: wrap; }
  .auth-card input, .auth-card button { min-height: 46px; }
}

@media (max-width: 660px) {
  .th-slide-bar + .th-slide-viewport .th-routes { min-height: 14.625rem; }
}

@media (max-width: 480px) {
  .bj-page .bj-listhead { align-items: center; flex-wrap: wrap; gap: 8px; }
  .cms-form, .cms-rel-controls, .cms-row-controls, .cms-panel .md-widget { min-width: 0; }
  .cms-row-controls .cms-field { min-width: min(120px, 100%); }
}

@media (max-width: 365px) {
  .bj-thumb, .story > img { width: 60px; }
  .rd-titleline { flex-wrap: wrap; gap: 4px 10px; }
  .th-head h1, .bj-mast h1 { line-height: 1.22; }
  .cms-main, .adminwrap { padding-inline: 12px; }
}
