/* Shared editorial typography and component rhythm. Loaded after page styles.
   Interface mockups, charts, captions, badges and circular controls keep their own scale. */

:is(.rich-copy, .rich-text, .author-bio-copy, .tool-rich-copy, .use-case-copy) > :is(p, ul, ol) {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  margin-block: 0 var(--copy-gap);
}
:is(.rich-copy, .author-bio-copy, .tool-rich-copy, .use-case-copy) > :is(h2, h3, h4) {
  margin-top: var(--space-8);
  margin-bottom: var(--copy-gap);
}
:is(.rich-copy, .author-bio-copy, .tool-rich-copy, .use-case-copy) > :first-child { margin-top: 0; }
:is(.rich-copy, .author-bio-copy, .tool-rich-copy, .use-case-copy) > :last-child { margin-bottom: 0; }

/* Actual reading text in cards uses 16px; compact metadata stays on its smaller tokens. */
:is(.feature-card, .catalog-card, .media-card, .media-coverage-card, .tools-card,
    .tool-role-grid, .tool-summary-grid, .tool-work-grid, .tool-design-card-grid,
    .api-feature-grid, .pra-principle-card, .pra-contract-grid, .iosco-control-grid,
    .iosco-use-grid, .benchmark-workflow-grid, .benchmark-market-card,
    .sector-market-card, .sector-highlight-list, .sector-decision-grid,
    .industry-input-card, .industry-workflow-grid, .use-case-step-grid,
    .use-cases-overview-step-grid, .platform-step-grid, .governance-control-list,
    .about-benefits-grid, .about-history-grid, .about-evidence-list, .about-process-list,
    .home-proof-grid, .home-approach-card) p:not(.eyebrow):not(.form-status) {
  font-size: var(--font-size-card-body);
  line-height: var(--line-height-body);
  margin-bottom: var(--copy-gap);
}
:is(.catalog-card, .feature-card, .media-coverage-card, .tools-card) > p:last-child { margin-bottom: 0; }

/* Leads have one scale across hero and section introductions. */
:is(.section-heading, .section-heading--centered) > p:not(.eyebrow),
:is(.home-brand-hero-copy, .markets-hero-copy, .market-detail-hero-copy,
    .sector-market-hero-copy, .milk-fats-hero-copy, .dairy-submarket-hero-copy,
    .dca-media-hero-copy, .insights-overview-hero-copy, .api-hero-copy,
    .tool-design-hero-copy, .use-cases-overview-hero-copy) > p:not(.eyebrow),
section[class*="hero"] p.lead-copy {
  font-size: var(--font-size-lead);
  line-height: var(--line-height-lead);
}
:is(.section-heading, .section-heading--centered) { margin-bottom: var(--heading-gap); }
:is(.section-heading, .section-heading--centered) > :last-child { margin-bottom: 0; }

/* Shared component spacing; specialized preview and table layouts stay local. */
.cards,
:is(.media-card-grid, .media-coverage-card-grid, .tools-card-grid, .team-grid--analysts,
    .industry-workflow-grid, .use-case-step-grid, .use-cases-overview-step-grid,
    .about-benefits-grid, .home-proof-grid) { gap: var(--grid-gap); }
:is(.market-card, .feature-card, .catalog-card, .pra-principle-card, .industry-input-card) {
  padding: var(--card-padding);
  border-radius: var(--radius-card);
}
:is(.actions, .prefooter-actions, .insight-paywall-actions) { gap: var(--space-4); }
:is(.split, .cards, .media-card-grid, .media-coverage-card-grid, .team-grid--analysts) > * { min-width: 0; }

/* Profile changes affect order and content, never tile dimensions or type scale. */
.home-market-grid { grid-auto-rows: 1fr; }
.home-market-grid > .market-card {
  grid-column: span 6;
  min-height: 270px;
  gap: var(--space-2);
}
.home-market-grid .market-card strong {
  max-width: none;
  font-size: var(--font-size-large);
  line-height: var(--line-height-card);
}
.home-market-grid .market-card .card-description {
  max-width: var(--measure);
  font-size: var(--font-size-card-body);
  line-height: var(--line-height-body);
  opacity: 1;
  visibility: visible;
  transform: none;
}
@media (max-width: 960px) {
  .home-market-grid > .market-card { min-height: 250px; }
}
@media (max-width: 640px) {
  .home-market-grid { grid-auto-rows: auto; }
  .home-market-grid > .market-card { grid-column: 1 / -1; min-height: 250px; }
  /* Compact platform rows keep room for their arrow, with the same internal padding. */
  .home-platform-section .feature-card { padding: var(--card-padding); }
  :is(.section-heading, .section-heading--centered) > p:not(.eyebrow) { font-size: var(--font-size-body); }
  .author-bio-copy { overflow-wrap: anywhere; }
}
