/* Theme foundation; it deliberately does not reflow the existing page sections. */
html:has(body.flj-independent) { scroll-behavior: smooth; scroll-padding-top: var(--flj-nav-anchor-offset, 110px); }
body.flj-independent { margin: 0; background: var(--flj-color-surface); color: var(--flj-color-ink); font: 400 var(--flj-size-body)/var(--flj-leading-body) var(--flj-font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.flj-independent *, body.flj-independent *::before, body.flj-independent *::after { box-sizing: border-box; }
body.flj-independent :where(main, article, section, aside, .site-content, .flj-site-main) { min-width: 0; }
body.flj-independent :where(img, video, iframe, canvas, svg) { max-width: 100%; }
body.flj-independent :where(img) { height: auto; }
body.flj-independent :where(figure) { margin: 0; }
body.flj-independent :where(a) { color: inherit; text-decoration: none; text-underline-offset: .22em; }
body.flj-independent :where(button, input, select, textarea) { font: inherit; }
body.flj-independent :where(button, summary) { cursor: pointer; }
body.flj-independent :where(button, a, summary, input, select, textarea) { -webkit-tap-highlight-color: transparent; }
body.flj-independent :where(button:disabled, input:disabled, select:disabled, textarea:disabled) { cursor: not-allowed; }
body.flj-independent :where(a, button, summary, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid var(--flj-color-focus); outline-offset: 4px; }
body.flj-independent :where([hidden]) { display: none !important; }
body.flj-independent ::selection { background: var(--flj-color-yellow); color: var(--flj-color-ink); }
body.flj-independent :where(pre, code, kbd, samp) { font-family: var(--flj-font-mono); }
body.flj-independent :where(pre) { overflow: auto; white-space: pre; }
body.flj-independent :where(p) { color: var(--flj-color-muted); }

/* Global type owns family/weight. Route-specific sizes and section geometry remain in place. */
body.flj-independent :is(#flj-content, .flj-site-main, .flj-document, .fljp-page, .flj-article-body, .flj-native-form, .srfm-form) { font-family: var(--flj-font-body) !important; }
body.flj-independent :where(h1, h2, .flj-shell-footer-title) { font-family: var(--flj-font-display) !important; font-weight: 600; line-height: 1.1; letter-spacing: -.025em; }
body.flj-independent :where(h3, h4, h5, h6) { font-family: var(--flj-font-body) !important; font-weight: 600; line-height: 1.3; letter-spacing: -.015em; }
body.flj-independent :where(h1) { font-size: clamp(42px, 4.6vw, 68px); }
body.flj-independent :where(h2) { font-size: clamp(34px, 3.2vw, 48px); }
body.flj-independent :where(h3) { font-size: 26px; }
body.flj-independent :where(h4) { font-size: 22px; }
body.flj-independent :where(h5, h6) { font-size: 19px; }
body.flj-independent :is(.btn, .text-link, .fljp-button, .fljp-text-link, .srfm-submit-button) { font-family: var(--flj-font-body) !important; }
body.flj-independent :where(.container, .fljp-container) { width: min(var(--flj-content-width), calc(100% - var(--flj-gutter) * 2)); max-width: var(--flj-content-width); margin-inline: auto; }
body.flj-independent :where(.eyebrow, .fljp-eyebrow) { font-family: var(--flj-font-body); font-size: var(--flj-size-detail); font-weight: 600; text-transform: none; letter-spacing: 0; }
body.flj-independent :where(.micro, .table-note, figcaption, .breadcrumb, .breadcrumbs) { font-size: var(--flj-size-note); line-height: 1.55; }
body.flj-independent :where([id]) { scroll-margin-top: 12px; }

/* Unmigrated pages, searches and 404s receive the same readable baseline. */
body.flj-independent .flj-document { width: min(100% - var(--flj-gutter) * 2, var(--flj-content-width)); margin-inline: auto; padding-block: var(--flj-space-section); }
body.flj-independent .flj-document :where(.flj-document-copy, .entry-content) { max-width: var(--flj-reading-width); }
body.flj-independent .flj-document :where(h1, h2, h3, h4, h5, h6) { margin: 1.2em 0 .5em; color: var(--flj-color-ink); }
body.flj-independent .flj-document :where(h1:first-child, h2:first-child) { margin-top: 0; }
body.flj-independent .flj-document :where(p, ul, ol, blockquote, figure, table, pre) { margin: 0 0 1.25em; }
body.flj-independent .flj-document :where(ul, ol) { padding-inline-start: 1.4em; }
body.flj-independent .flj-document :where(li + li) { margin-top: .4em; }
body.flj-independent .flj-document :where(p, li) > a { color: var(--flj-color-primary); text-decoration: underline; }
body.flj-independent .flj-document :where(blockquote) { padding: .5em 0 .5em 1.25em; border-inline-start: 3px solid var(--flj-color-primary); }
body.flj-independent .flj-document :where(table) { border-collapse: collapse; width: 100%; }
body.flj-independent .flj-document :where(th, td) { text-align: start; border-bottom: 1px solid var(--flj-color-border); padding: 12px 16px; font-size: var(--flj-size-detail); line-height: 1.6; }
body.flj-independent .flj-document :where(th) { color: var(--flj-color-ink); background: var(--flj-color-silver); font-weight: 600; }

body.flj-independent :where(.skip, .skip-link, .screen-reader-text) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
body.flj-independent :where(.skip, .skip-link, .screen-reader-text):focus { position: fixed; inset: 12px auto auto 12px; z-index: 100000; width: auto; height: auto; margin: 0; padding: 12px 20px; clip-path: none; background: #fff; color: var(--flj-color-primary); }
@media (prefers-reduced-motion: reduce) {
  html:has(body.flj-independent) { scroll-behavior: auto; }
  body.flj-independent *, body.flj-independent *::before, body.flj-independent *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
