/*
 * Knowledge base readability + mobile layer.
 *
 * Loaded after each knowledge page's own <style>, so these rules win at equal
 * specificity. Sizes and spacing only: colours and fonts stay with the theme
 * (css/dealroom-theme-3da7d8e.css).
 */

/* ── All widths ─────────────────────────────────────────────────────────── */

/* Grid children may shrink below their content, so one long word or chip row
   can no longer push a page wider than the screen. */
.page-layout > *,
.content-grid > *,
.industry-list > * { min-width: 0; }

.page-layout img,
.page-layout video,
.page-layout iframe { max-width: 100%; height: auto; }

/* Wide tables and code scroll inside their own box instead of the page. */
.page-layout pre { overflow-x: auto; }
.page-layout p,
.page-layout li,
.term-def { overflow-wrap: break-word; }

/* Nothing that carries meaning goes below 12px. */
.chip, .term-tag, .sub-count, .badge-premium, .score-band-label,
.report-label, .video-badge, .upd-type-tag, .upd-new-badge,
.time-pill, .header-category, .method-badge, .tag-note,
.hub-feature-chip, .hub-count, .ticker-item,
body .badge-premium, .badge, .ticker-label, .hub-feature-label,
.page-layout th { font-size: 0.75rem; }

.strength-desc { font-size: 0.8125rem; }
code { font-size: max(0.75rem, 0.85em); }

.product-desc { font-size: 0.8125rem; }

.gloss-group-title,
.sidebar-title,
.section-label,
.section-title,
.field-label,
.signal-item-label,
.strength-label { font-size: 0.75rem; }

/* Comfortable line height for running text. */
.term-def,
.term-example,
.signal-item-desc,
.strength-desc,
.page-layout p { line-height: 1.6; }

/* ── Phones and small tablets ───────────────────────────────────────────── */
@media (max-width: 600px) {
  /* Running text at a size that reads without zooming. */
  .term-def,
  .page-layout p,
  .page-layout li { font-size: 0.9375rem; }

  .term-name { font-size: 1rem; }

  .term-example,
  .signal-item-desc,
  .strength-desc,
  .inline-link { font-size: 0.875rem; }

  .chip,
  .term-tag { font-size: 0.8125rem; }

  /* Tap targets: at least ~40px tall. */
  .filter-pill,
  .cat-pill {
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .hero-back,
  .updates-tab {
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
  }

  .kb-nav-item a,
  .toc-list a,
  .sidebar-card a,
  .hub-article-link,
  .hub-cta {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
  }

  /* Filter pills scroll sideways in one row instead of stacking into a wall. */
  .filter-pills,
  .category-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }
  .filter-pills::-webkit-scrollbar,
  .category-pills::-webkit-scrollbar { display: none; }
  .filter-pill,
  .cat-pill { flex: none; }

  /* Tables that do not fit scroll inside their card. */
  .page-layout table:not(.rate-table) {
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }
}
