/* Prose styles — raw element selectors so anything typed in the WP editor
   (h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, table, img, etc.) picks
   up the V2 design system without needing a class.

   All parent wrappers are inside :where() so they contribute ZERO specificity.
   That means class-targeted rules in component CSS (e.g. .ccs-cmp-card__gba img)
   automatically win over these defaults. This file is the design-system
   "base" — author-typed elements inherit V2 styling; structural component
   markup keeps its own bespoke styling. */

/* Convenience: SCOPE matches any V2 editorial wrapper with no specificity cost. */

/* baseline body type */
:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) {
  font-family: var(--ccs-font-display);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ccs-on-surface-variant);
}

/* ─── Headings ──────────────────────────────────────────────────────────── */

:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) h1 {
  font-family: var(--ccs-font-display);
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ccs-primary);
  margin: 32px 0 16px;
}
@media (min-width: 1024px) {
  :where(
    body.ccs-rev-fullwidth .ccs-listing-body,
    body.ccs-rev-fullwidth .ccs-cmp-editorial,
    .ccs-rev-editorial__body
  ) h1 { font-size: 36px; }
}

:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) h2 {
  font-family: var(--ccs-font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ccs-primary);
  margin: 32px 0 12px;
  text-transform: none;
}

:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) h3 {
  font-family: var(--ccs-font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ccs-primary);
  margin: 28px 0 10px;
}

:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) h4 {
  font-family: var(--ccs-font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ccs-primary);
  margin: 24px 0 8px;
}

:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) h5 {
  font-family: var(--ccs-font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ccs-primary);
  margin: 20px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) h6 {
  font-family: var(--ccs-font-label, "Inter"), system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ccs-on-surface-variant);
  margin: 18px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* First heading at top of container shouldn't push down */
:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) > :is(h1, h2, h3):first-child { margin-top: 0; }

/* ─── Paragraphs / inline text ─────────────────────────────────────────── */

:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) p {
  font-family: var(--ccs-font-display);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ccs-on-surface-variant);
  margin: 0 0 16px;
}
:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) p:last-child { margin-bottom: 0; }

/* Author <div> blocks (e.g. Custom-HTML editor block) read like <p> */
:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) > div:not([class]):not([id]) {
  font-family: var(--ccs-font-display);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ccs-on-surface-variant);
  margin: 0 0 16px;
}

:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) a {
  color: var(--ccs-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) a:hover { text-decoration: none; }

:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) :is(strong, b) { color: var(--ccs-on-surface); font-weight: 700; }

:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) :is(em, i) { font-style: italic; }

/* ─── Lists ────────────────────────────────────────────────────────────── */

:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) :is(ul, ol) {
  font-family: var(--ccs-font-display);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ccs-on-surface-variant);
  padding-left: 24px;
  margin: 0 0 16px;
}
:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) li { margin: 4px 0; }
:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) :is(ul ul, ol ol, ul ol, ol ul) { margin: 4px 0; }

/* ─── Blockquote ───────────────────────────────────────────────────────── */

:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) blockquote {
  margin: 24px 0;
  padding: 16px 24px;
  border-left: 4px solid var(--ccs-primary);
  background: var(--ccs-surface-container-low);
  border-radius: 0 var(--ccs-radius-lg, 12px) var(--ccs-radius-lg, 12px) 0;
  font-family: var(--ccs-font-display);
  font-size: 18px;
  line-height: 1.5;
  font-style: italic;
  color: var(--ccs-on-surface);
}
:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) blockquote p:last-child { margin-bottom: 0; }

/* ─── Tables ───────────────────────────────────────────────────────────── */

:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-family: var(--ccs-font-display);
  font-size: 16px;
  line-height: 1.5;
}
:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) th {
  text-align: left;
  background: var(--ccs-surface-container-low);
  color: var(--ccs-primary);
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 2px solid var(--ccs-outline-variant);
}
:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--ccs-outline-variant);
  color: var(--ccs-on-surface-variant);
}
:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) tr:last-child td { border-bottom: 0; }

/* ─── Inline code + preformatted ───────────────────────────────────────── */

:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--ccs-surface-container-low);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ccs-primary);
}
:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) pre {
  background: var(--ccs-surface-container-low);
  padding: 16px;
  border-radius: var(--ccs-radius-lg, 12px);
  overflow-x: auto;
  margin: 16px 0;
  font-size: 15px;
  line-height: 1.5;
}
:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) pre code { background: transparent; padding: 0; color: inherit; }

/* ─── Images + figures ─────────────────────────────────────────────────── */

:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ccs-radius-lg, 12px);
}
:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) figure { margin: 24px 0; }
:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) figcaption {
  font-family: var(--ccs-font-label, "Inter"), system-ui, sans-serif;
  font-size: 13px;
  color: var(--ccs-on-surface-variant);
  margin-top: 8px;
  text-align: center;
}

/* ─── Horizontal rule ──────────────────────────────────────────────────── */

:where(
  body.ccs-rev-fullwidth .ccs-listing-body,
  body.ccs-rev-fullwidth .ccs-cmp-editorial,
  .ccs-rev-editorial__body
) hr {
  border: 0;
  height: 1px;
  background: var(--ccs-outline-variant);
  margin: 32px 0;
}
