/* Compact content density v1.
   Linked late in <head> by tools/sync-sitewide-header.ps1 so it can tighten
   generated pages with large inline article styles. */

body:not(.stream-pages) {
  --compact-radius: 8px;
  --compact-gap: 0.65rem;
}

body:not(.stream-pages) main,
body:not(.stream-pages) .legacy-page-shell,
body:not(.stream-pages) .article-reader-wrap,
body:not(.stream-pages) .lex-wrap,
body:not(.stream-pages) .net-wrap,
body:not(.stream-pages) .kjv-wrap,
body:not(.stream-pages) .abbr-page-wrap,
body.kp-body main.wrap {
  padding-top: 0.7rem !important;
  padding-bottom: 2rem !important;
}

body:not(.stream-pages) .wrap,
body:not(.stream-pages) .article-reader-wrap,
body:not(.stream-pages) .lex-wrap,
body:not(.stream-pages) .net-wrap,
body:not(.stream-pages) .kjv-wrap,
body:not(.stream-pages) .abbr-page-wrap,
body.kp-body main.wrap {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

body:not(.stream-pages) .hero,
body:not(.stream-pages) .hero-card,
body:not(.stream-pages) .hero-main,
body:not(.stream-pages) .hero-side,
body:not(.stream-pages) .panel,
body:not(.stream-pages) .card,
body:not(.stream-pages) .content-panel,
body:not(.stream-pages) .info-panel,
body:not(.stream-pages) article.article,
body:not(.stream-pages) .lead-box,
body:not(.stream-pages) .faq,
body:not(.stream-pages) .summary-card,
body:not(.stream-pages) .toc,
body:not(.stream-pages) .sticky-block,
body:not(.stream-pages) .note-card,
body:not(.stream-pages) .entity-block,
body:not(.stream-pages) .entry-card,
body:not(.stream-pages) .entry-section,
body:not(.stream-pages) .data-card,
body:not(.stream-pages) .lex-hero,
body:not(.stream-pages) .lex-card,
body:not(.stream-pages) .lex-search-panel,
body:not(.stream-pages) .net-hero,
body:not(.stream-pages) .net-card,
body:not(.stream-pages) .net-search-panel,
body:not(.stream-pages) .net-integrity-notice,
body:not(.stream-pages) .net-browse-section,
body:not(.stream-pages) .net-reader-card,
body:not(.stream-pages) .kjv-hero,
body:not(.stream-pages) .kjv-card,
body:not(.stream-pages) .article-reader-hero,
body:not(.stream-pages) .article-reader-panel,
body:not(.stream-pages) .article-reader-output,
body:not(.stream-pages) .abbr-hero,
body:not(.stream-pages) .abbr-card,
body:not(.stream-pages) .abbr-json-card,
body:not(.stream-pages) .box,
body:not(.stream-pages) .note {
  margin-top: var(--compact-gap) !important;
  margin-bottom: var(--compact-gap) !important;
  padding: 0.75rem 0.9rem !important;
  border-radius: var(--compact-radius) !important;
  box-shadow: none !important;
}

body:not(.stream-pages) .hero,
body:not(.stream-pages) .doctrine-hero {
  padding-top: 0.55rem !important;
  padding-bottom: 0.45rem !important;
}

body:not(.stream-pages) .breadcrumbs,
body:not(.stream-pages) .crumbs,
body:not(.stream-pages) .net-breadcrumbs,
body:not(.stream-pages) .breadcrumb {
  margin: 0.35rem 0 !important;
  padding: 0.35rem 0 !important;
  font-size: 0.86rem !important;
}

body:not(.stream-pages) main h1,
body:not(.stream-pages) article h1,
body:not(.stream-pages) .hero h1,
body:not(.stream-pages) .hero-card h1,
body:not(.stream-pages) .lex-hero h1,
body:not(.stream-pages) .net-hero h1,
body:not(.stream-pages) .kjv-hero h1,
body:not(.stream-pages) .abbr-hero h1 {
  margin: 0 0 0.35rem !important;
  font-size: 1.75rem !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
}

body:not(.stream-pages) main h2,
body:not(.stream-pages) article h2,
body:not(.stream-pages) .article-reader-output h2,
body:not(.stream-pages) .doctrine-content h2,
body:not(.stream-pages) .panel-title h2 {
  margin: 1rem 0 0.45rem !important;
  padding-top: 0 !important;
  padding-bottom: 0.25rem !important;
  font-size: 1.25rem !important;
  line-height: 1.2 !important;
}

body:not(.stream-pages) main h3,
body:not(.stream-pages) article h3,
body:not(.stream-pages) .doctrine-content h3,
body:not(.stream-pages) .entry-card h3,
body:not(.stream-pages) .abbr-card h3 {
  margin: 0.8rem 0 0.3rem !important;
  font-size: 1.05rem !important;
  line-height: 1.25 !important;
}

body:not(.stream-pages) .subtitle,
body:not(.stream-pages) .lede,
body:not(.stream-pages) .lead,
body:not(.stream-pages) .article-reader-lead,
body:not(.stream-pages) .article-deck,
body:not(.stream-pages) .summary,
body:not(.stream-pages) .net-lead,
body:not(.stream-pages) .kjv-hero p {
  max-width: 96ch !important;
  margin: 0.25rem 0 0.5rem !important;
  font-size: 0.95rem !important;
  line-height: 1.45 !important;
}

body:not(.stream-pages) main p,
body:not(.stream-pages) main li,
body:not(.stream-pages) article p,
body:not(.stream-pages) article li,
body:not(.stream-pages) .content-panel p,
body:not(.stream-pages) .content-panel li,
body:not(.stream-pages) .doctrine-content p,
body:not(.stream-pages) .doctrine-content li,
body:not(.stream-pages) .definition,
body:not(.stream-pages) .lex-definition,
body:not(.stream-pages) .net-verse,
body:not(.stream-pages) .kjv-scripture,
body:not(.stream-pages) .dictionary-search-definition {
  font-size: 1rem !important;
  line-height: 1.55 !important;
}

body:not(.stream-pages) main p,
body:not(.stream-pages) article p,
body:not(.stream-pages) .content-panel p,
body:not(.stream-pages) .doctrine-content p,
body:not(.stream-pages) .entry-card p {
  margin-top: 0.4rem !important;
  margin-bottom: 0.6rem !important;
}

body:not(.stream-pages) main ul,
body:not(.stream-pages) main ol,
body:not(.stream-pages) article ul,
body:not(.stream-pages) article ol,
body:not(.stream-pages) .doctrine-content ul,
body:not(.stream-pages) .content-panel ul {
  margin-top: 0.35rem !important;
  margin-bottom: 0.65rem !important;
}

body:not(.stream-pages) .hero-grid,
body:not(.stream-pages) .page-grid,
body:not(.stream-pages) .grid,
body:not(.stream-pages) .grid-2,
body:not(.stream-pages) .grid-3,
body:not(.stream-pages) .detail-grid,
body:not(.stream-pages) .doctrine-layout,
body:not(.stream-pages) .doctrine-article,
body:not(.stream-pages) .doctrine-card-grid,
body:not(.stream-pages) .article-reader-grid,
body:not(.stream-pages) .article-reader-summary,
body:not(.stream-pages) .lex-grid,
body:not(.stream-pages) .net-grid,
body:not(.stream-pages) .net-book-grid,
body:not(.stream-pages) .kjv-grid,
body:not(.stream-pages) .abbr-grid,
body:not(.stream-pages) .takeaways,
body:not(.stream-pages) .checklist,
body:not(.stream-pages) aside.sidebar,
body:not(.stream-pages) .doctrine-sidebar {
  gap: var(--compact-gap) !important;
}

body:not(.stream-pages) .page-grid,
body:not(.stream-pages) .lex-grid,
body:not(.stream-pages) .net-grid,
body:not(.stream-pages) .kjv-grid {
  margin-top: 0.45rem !important;
  margin-bottom: 1.25rem !important;
}

body:not(.stream-pages) aside,
body:not(.stream-pages) .sticky-block,
body:not(.stream-pages) .doctrine-sidebar,
body:not(.stream-pages) .sidebar-layout > aside.section-stack,
body:not(.stream-pages) .sidebar-layout > aside.info-panel {
  top: 0.75rem !important;
}

body:not(.stream-pages) .chip,
body:not(.stream-pages) .badge,
body:not(.stream-pages) .pill,
body:not(.stream-pages) .lex-badge,
body:not(.stream-pages) .lex-meta span,
body:not(.stream-pages) .unit-ref,
body:not(.stream-pages) .scripture-pills span,
body:not(.stream-pages) .keyword-cloud span,
body:not(.stream-pages) .filter {
  padding: 0.24rem 0.48rem !important;
  border-radius: var(--compact-radius) !important;
  font-size: 0.8rem !important;
}

body:not(.stream-pages) .button,
body:not(.stream-pages) .button-secondary,
body:not(.stream-pages) .btn,
body:not(.stream-pages) .actions a,
body:not(.stream-pages) .lex-button,
body:not(.stream-pages) .lex-actions a,
body:not(.stream-pages) .net-button,
body:not(.stream-pages) .net-actions a,
body:not(.stream-pages) .net-chip,
body:not(.stream-pages) .kjv-nav a,
body:not(.stream-pages) .kjv-tools a,
body:not(.stream-pages) .kjv-copy,
body:not(.stream-pages) .article-reader-button,
body:not(.stream-pages) .copy-button,
body:not(.stream-pages) .copy-content-btn,
body:not(.stream-pages) .unit-links a {
  padding: 0.34rem 0.55rem !important;
  border-radius: var(--compact-radius) !important;
  font-size: 0.84rem !important;
  line-height: 1.15 !important;
}

body:not(.stream-pages) blockquote,
body:not(.stream-pages) .quote-box,
body:not(.stream-pages) .punch,
body:not(.stream-pages) .confrontive,
body:not(.stream-pages) .reading-note,
body:not(.stream-pages) .geo-answer,
body:not(.stream-pages) .core-claims li,
body:not(.stream-pages) .notice,
body:not(.stream-pages) .notice-strip,
body:not(.stream-pages) .abbr-warning,
body:not(.stream-pages) .takeaways div,
body:not(.stream-pages) .checklist li,
body:not(.stream-pages) .detail-card,
body:not(.stream-pages) .keyterm-card,
body:not(.stream-pages) .answer-box {
  margin-top: 0.55rem !important;
  margin-bottom: 0.55rem !important;
  padding: 0.55rem 0.7rem !important;
  border-radius: var(--compact-radius) !important;
  box-shadow: none !important;
}

body:not(.stream-pages) details {
  margin: 0.4rem 0 !important;
  padding: 0.5rem 0.65rem !important;
  border-radius: var(--compact-radius) !important;
}

body:not(.stream-pages) table {
  margin: 0.65rem 0 !important;
}

body:not(.stream-pages) th,
body:not(.stream-pages) td {
  padding: 0.45rem 0.55rem !important;
  line-height: 1.35 !important;
}

body:not(.stream-pages) .net-verse,
body:not(.stream-pages) .kjv-verse {
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
  scroll-margin-top: 4.5rem !important;
}

body:not(.stream-pages) .net-chapter-grid,
body:not(.stream-pages) .kjv-grid {
  gap: 0.35rem !important;
}

body:not(.stream-pages) .net-chapter-grid a,
body:not(.stream-pages) .kjv-book-card,
body:not(.stream-pages) .kjv-chapter-card,
body:not(.stream-pages) .net-book-link,
body:not(.stream-pages) .lex-result,
body:not(.stream-pages) .net-result,
body:not(.stream-pages) .kjv-result {
  padding: 0.45rem 0.55rem !important;
  border-radius: var(--compact-radius) !important;
  box-shadow: none !important;
}

body:not(.stream-pages) input,
body:not(.stream-pages) select,
body:not(.stream-pages) textarea {
  border-radius: var(--compact-radius) !important;
}

body:not(.stream-pages) .article-reader-field input,
body:not(.stream-pages) .article-reader-field textarea,
body:not(.stream-pages) .dictionary-search-input,
body:not(.stream-pages) .net-search-row input,
body:not(.stream-pages) .net-search-row select,
body:not(.stream-pages) .kjv-search input,
body:not(.stream-pages) .lex-search-row input,
body:not(.stream-pages) .lex-search-row select,
body:not(.stream-pages) .abbr-search-panel input {
  padding: 0.5rem 0.6rem !important;
  font-size: 0.92rem !important;
}

body:not(.stream-pages) .article-reader-field textarea {
  min-height: 18rem !important;
}

body:not(.stream-pages) footer,
body:not(.stream-pages) .footer,
body:not(.stream-pages) .site-footer,
body:not(.stream-pages) .lex-footer {
  margin-top: 0.75rem !important;
  padding-top: 0.75rem !important;
  padding-bottom: 1rem !important;
}

body:not(.stream-pages) .footer-grid,
body:not(.stream-pages) .site-footer .footer-grid {
  gap: 0.5rem !important;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
}

body:not(.stream-pages) footer .footer-grid,
body:not(.stream-pages) .footer .footer-grid {
  padding-top: 0.65rem !important;
  padding-bottom: 0.8rem !important;
}

body:not(.stream-pages) .footer-inner {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body:not(.stream-pages) .footer-card,
body:not(.stream-pages) .site-footer .footer-card,
body:not(.stream-pages) .footer-panel {
  padding: 0.55rem 0.65rem !important;
  border-radius: var(--compact-radius) !important;
  box-shadow: none !important;
}

body:not(.stream-pages) .footer-card strong,
body:not(.stream-pages) .footer-card h3,
body:not(.stream-pages) .site-footer h3,
body:not(.stream-pages) footer h3,
body:not(.stream-pages) footer .site-title {
  margin: 0 0 0.25rem !important;
  font-size: 0.95rem !important;
  line-height: 1.2 !important;
}

body:not(.stream-pages) .footer-card p,
body:not(.stream-pages) .footer-card li,
body:not(.stream-pages) .site-footer p,
body:not(.stream-pages) .site-footer li,
body:not(.stream-pages) footer p,
body:not(.stream-pages) footer li,
body:not(.stream-pages) .kjv-footer-note {
  margin-top: 0.22rem !important;
  margin-bottom: 0.22rem !important;
  font-size: 0.84rem !important;
  line-height: 1.34 !important;
}

body:not(.stream-pages) .footer-card ul,
body:not(.stream-pages) .site-footer ul,
body:not(.stream-pages) footer ul {
  margin-top: 0.25rem !important;
  margin-bottom: 0 !important;
  padding-left: 1rem !important;
}

body:not(.stream-pages) .footer a,
body:not(.stream-pages) .site-footer a,
body:not(.stream-pages) footer a,
body:not(.stream-pages) .machine-readable-footer a {
  line-height: 1.3 !important;
}

body:not(.stream-pages) footer .quick-links,
body:not(.stream-pages) .footer .quick-links {
  gap: 0.25rem 0.45rem !important;
  margin-top: 0.25rem !important;
}

body:not(.stream-pages) footer .quick-links a,
body:not(.stream-pages) .footer .quick-links a {
  font-size: 0.84rem !important;
  line-height: 1.25 !important;
}

body:not(.stream-pages) .footer-license {
  gap: 0.45rem !important;
  margin-top: 0.45rem !important;
}

body:not(.stream-pages) .footer-license img {
  width: 82px !important;
}

body:not(.stream-pages) .footer-copy,
body:not(.stream-pages) .footer-data-actions,
body:not(.stream-pages) .machine-readable-footer {
  margin-top: 0.45rem !important;
}

body:not(.stream-pages) .footer-data-actions .button,
body:not(.stream-pages) .footer-data-actions .button-secondary {
  min-height: 0 !important;
  padding: 0.35rem 0.55rem !important;
  font-size: 0.82rem !important;
}

@media (max-width: 760px) {
  body:not(.stream-pages) .wrap,
  body:not(.stream-pages) .article-reader-wrap,
  body:not(.stream-pages) .lex-wrap,
  body:not(.stream-pages) .net-wrap,
  body:not(.stream-pages) .kjv-wrap,
  body:not(.stream-pages) .abbr-page-wrap,
  body.kp-body main.wrap {
    width: min(100% - 1.25rem, 100%) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body:not(.stream-pages) main h1,
  body:not(.stream-pages) article h1,
  body:not(.stream-pages) .hero h1,
  body:not(.stream-pages) .hero-card h1,
  body:not(.stream-pages) .lex-hero h1,
  body:not(.stream-pages) .net-hero h1,
  body:not(.stream-pages) .kjv-hero h1,
  body:not(.stream-pages) .abbr-hero h1 {
    font-size: 1.45rem !important;
  }

  body:not(.stream-pages) main h2,
  body:not(.stream-pages) article h2,
  body:not(.stream-pages) .article-reader-output h2,
  body:not(.stream-pages) .doctrine-content h2 {
    font-size: 1.12rem !important;
  }
}
