/*
 * SSA Neon Framework
 * Layer: Typography
 * Version: 1.0.0
 * Updated: 2026-06-17
 *
 * Low-risk site text layer. This intentionally handles reading colors,
 * headings, links, and basic media constraints without turning article content
 * into cards or restyling plugin controls.
 */

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(45, 212, 191, 0.12), transparent 28%),
    radial-gradient(circle at 92% 4%, rgba(167, 139, 250, 0.10), transparent 30%),
    linear-gradient(180deg, var(--ssa-site-page), #020617) !important;
  color: var(--ssa-site-ink-soft) !important;
  color-scheme: dark;
}

body :where(#main-container, .site-main, .content-area, article, .entry-content, .ct-container, .ct-container-full) {
  color: var(--ssa-site-ink-soft);
}

body :where(.ssa-neon-content-shell) {
  max-width: min(100%, 1120px);
  margin-inline: auto;
  color: var(--ssa-site-ink-soft);
  color-scheme: dark;
  overflow-wrap: break-word;
  word-break: normal;
}

body :where(.ssa-neon-content-shell, .ssa-neon-content-shell *, .ssa-neon-content-shell *::before, .ssa-neon-content-shell *::after) {
  box-sizing: border-box;
}

body :where(.ssa-neon-content-shell *) {
  min-width: 0;
}

body :where(.entry-content, .ct-post, .ct-page, .ct-sidebar, .ct-widget, .ct-comments, .ct-related-posts) {
  overflow-wrap: break-word;
  word-break: normal;
}

body :where(.entry-content) :where(h1, h2, h3, h4, h5, h6) {
  color: #ffffff !important;
  letter-spacing: 0 !important;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.20) !important;
}

body :where(.entry-content) :where(p, li, dd, dt, figcaption, cite, small, label) {
  color: var(--ssa-site-ink-soft) !important;
}

body :where(.entry-content) :where(a:not(.button):not(.btn):not([role="button"]):not(.wp-block-button__link)) {
  color: #8eeaff !important;
  text-decoration-color: rgba(142, 234, 255, 0.54) !important;
}

body :where(.entry-content) :where(img, iframe, canvas, svg, video, table, pre, code) {
  max-width: 100%;
}

body :where(.entry-content) :where(pre, code, table) {
  overflow-x: auto;
}

@media (max-width: 480px) {
  body :where(.entry-content, .ct-container, .ct-container-full) {
    max-width: 100% !important;
    overflow-x: clip !important;
  }

  body :where(.ssa-neon-content-shell) {
    max-width: 100% !important;
    overflow-x: clip !important;
  }
}

/*
 * Article rhythm rescue.
 *
 * The dark-neon normalization layer intentionally touches many exported
 * legacy blocks. Normal posts/pages still need readable prose spacing, so
 * keep this late and scoped to standard Gutenberg content elements.
 */
body :where(.entry-content) {
  line-height: 1.72 !important;
}

body :where(.entry-content) :where(
  p,
  .wp-block-paragraph,
  ul,
  ol,
  .wp-block-list,
  blockquote,
  figure,
  .wp-block-image,
  .wp-block-embed,
  .wp-block-table,
  .wp-block-buttons,
  .wp-block-columns,
  .wp-block-group,
  .wp-block-details
) {
  margin-top: 0 !important;
  margin-bottom: clamp(18px, 2.4vw, 28px) !important;
}

body :where(.entry-content) :where(h1, h2, h3, h4, h5, h6, .wp-block-heading) {
  clear: both;
  line-height: 1.2 !important;
  margin-top: clamp(34px, 5vw, 56px) !important;
  margin-bottom: clamp(12px, 2vw, 20px) !important;
}

body :where(.entry-content) > :where(h1, h2, h3, h4, h5, h6, .wp-block-heading):first-child {
  margin-top: 0 !important;
}

body :where(.entry-content) :where(p, li, dd, dt) {
  line-height: 1.72 !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
}

body :where(.entry-content) :where(ul, ol, .wp-block-list) {
  display: block !important;
  padding-left: clamp(1.25rem, 3vw, 1.7rem) !important;
}

body :where(.entry-content) :where(li) {
  margin-top: 0 !important;
  margin-bottom: 0.62em !important;
  padding-left: 0.12em !important;
}

body :where(.entry-content) :where(li:last-child) {
  margin-bottom: 0 !important;
}

body :where(.entry-content) :where(.wp-block-columns) {
  gap: clamp(18px, 3vw, 32px) !important;
}

body :where(.entry-content) :where(.wp-block-column > :last-child, .wp-block-group > :last-child, .wp-block-details > :last-child) {
  margin-bottom: 0 !important;
}

@media (max-width: 700px) {
  body :where(.entry-content) {
    line-height: 1.68 !important;
  }

  body :where(.entry-content) :where(
    p,
    .wp-block-paragraph,
    ul,
    ol,
    .wp-block-list,
    blockquote,
    figure,
    .wp-block-image,
    .wp-block-embed,
    .wp-block-table,
    .wp-block-buttons,
    .wp-block-columns,
    .wp-block-group,
    .wp-block-details
  ) {
    margin-bottom: 20px !important;
  }

  body :where(.entry-content) :where(h1, h2, h3, h4, h5, h6, .wp-block-heading) {
    margin-top: 34px !important;
    margin-bottom: 14px !important;
  }
}
