/* Shared title hierarchy. The layer also overrides legacy inline/page !important rules.
   Navigation labels, counters and the NOVA brand keep their own typography. */
@layer nova-headings {
  :root {
    --nova-page-title-size: 28px;
    --nova-section-title-size: 20px;
    --nova-item-title-size: 16px;
  }

  h1:not(.brand-admin h1, .member-top h1, #hero-title), h2, h3,
  .agent-create-details > summary strong,
  .presentation-create-panel > summary #slot-title,
  .presentation-archive > summary,
  .library-categories > summary,
  .library-add > summary {
    font-family: Inter, Arial, sans-serif !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    overflow-wrap: anywhere;
  }

  h1:not(.brand-admin h1, .member-top h1, #hero-title) {
    font-size: var(--nova-page-title-size) !important;
  }

  h2,
  .agent-create-details > summary strong,
  .presentation-create-panel > summary #slot-title,
  .presentation-archive > summary,
  .library-categories > summary,
  .library-add > summary {
    font-size: var(--nova-section-title-size) !important;
  }

  /* Disclosure labels stay compact, including nested headings. */
  .agent-create-details > summary strong,
  .presentation-create-panel > summary #slot-title,
  .presentation-archive > summary,
  .library-categories > summary,
  .library-add > summary,
  .library-add > summary h2 {
    font-size: 16px !important;
  }

  h3 { font-size: var(--nova-item-title-size) !important; }

  @media (max-width: 700px) {
    .agent-create-details > summary strong,
    .presentation-create-panel > summary #slot-title,
    .presentation-archive > summary,
    .library-categories > summary,
    .library-add > summary,
    .library-add > summary h2 { font-size: 15px !important; }
    :root {
      --nova-page-title-size: 24px;
      --nova-section-title-size: 18px;
      --nova-item-title-size: 15px;
    }
  }
}
