/* Site-wide checklist fixes (2026-10-12). Loaded last on every shell page so it
   wins over page stylesheets without editing each one. Tokens come from
   site-shell.css; see DESIGN.md "Buttons", "States" and "Motion". */

/* ---- #3 One look per button kind: 6px corners, 600 weight -------------- */
html body :is(.home-button, .guide-btn, .rev-btn, .page-btn, .conversion-button, .site-nav-cta, .btn, .button) {
  border-radius: 6px !important;
  font-weight: 600 !important;
}
/* Cards: one radius (10px); edge-to-edge grid tiles stay square. */
html body :is(.rev-card, .rev-price, .tier, .spark-box) { border-radius: var(--fll-radius) !important; }
/* Demoted home pricing action sits on the dark core card. */
html body .home-button-secondary.home-button-on-dark { color: #ffffff !important; border-color: rgb(255 255 255 / .55); background: transparent; }
html body .home-button-secondary.home-button-on-dark:hover { background: rgb(255 255 255 / .08); border-color: #ffffff; }

/* ---- #5 Contrast ------------------------------------------------------- */
html body a.fll-skip-link, html body a.skip-link {
  background: var(--fll-flame) !important; color: #151719 !important;
  border: 2px solid #151719;
}
/* /real-estate-video was drawn for a dark canvas; in light mode use ink text. */
:root:not([data-theme="dark"]) .rev-page {
  --rev-paper: #151719;
  --rev-muted: #4a4f54;
  --rev-dim: #5f656a;
  --rev-line: rgb(21 23 25 / .14);
  --rev-card: rgb(21 23 25 / .03);
  --rev-card-strong: rgb(21 23 25 / .05);
}
:root:not([data-theme="dark"]) .rev-page .rev-eyebrow { color: #a63600 !important; }
:root:not([data-theme="dark"]) .rev-page .rev-btn.secondary { color: #151719 !important; border-color: var(--fll-line-strong) !important; background: #ffffff !important; }
:root[data-theme="dark"] .rev-form label { color: var(--fll-muted) !important; }
/* Light panels on industry and snapshot pages need dark surfaces in dark mode. */
:root[data-theme="dark"] :is(.step, .traditional-panel) { background: var(--fll-charcoal-2) !important; }
:root[data-theme="dark"] .traditional-panel :is(h2, h3, strong, dt) { color: var(--fll-paper) !important; }
:root[data-theme="dark"] .traditional-panel :is(p, span, dd, li) { color: var(--fll-muted) !important; }
:root[data-theme="dark"] .traditional-panel .panel-label { color: #ffb27a !important; }
:root:not([data-theme="dark"]) .rev-page .rev-badge { color: #a63600 !important; }
:root[data-theme="dark"] body:has(.traditional-panel) .eyebrow { background: var(--fll-charcoal-3) !important; border-color: var(--fll-line) !important; color: #ffb27a !important; }

/* Cream strip on legacy industry pages turns muddy grey over the dark canvas. */
:root[data-theme="dark"] .trust-strip { background: var(--fll-charcoal-2) !important; }
:root[data-theme="dark"] body:has(.traditional-panel) main li:not(.traditional-panel li),
:root[data-theme="dark"] body:has(.traditional-panel) main li:not(.traditional-panel li) strong { color: var(--fll-muted) !important; }
/* Retired /forgeshop notice. */
html body .retire-kicker { color: #a63600 !important; }
:root[data-theme="dark"] .retire-kicker { color: #ffb27a !important; }
html body .retire-cta { background: var(--fll-flame) !important; color: #151719 !important; }
:root[data-theme="dark"] body:has(.retire-cta) main a:not(.retire-cta) { color: #ffb27a !important; }

/* ---- #8 Tap targets ------------------------------------------------------ */
html body .fll-privacy-choices { min-height: 44px !important; padding: 10px 14px !important; }
html body .fll-footer a { min-height: 24px; display: flex; align-items: center; }
html body :is(.guide-breadcrumb, .breadcrumbs, .guide-toc, nav.more, .conversion-note) a {
  display: inline-block; min-height: 24px; line-height: 1.5; padding-block: 2px;
}

/* ---- #9 Enlarged text keeps the home pricing intact ---------------------- */
/* The grid no longer clips its tiles; square corners keep the tiles flush. */
/* Home pricing: two separate 10px cards with a gap (same corners as every other card). */
html body .home-pricing-grid { overflow: visible; border: 0 !important; border-radius: 0; gap: 16px; }
html body .home-pricing-grid > * { min-width: 0; overflow-wrap: break-word; border: 1px solid var(--home-line, var(--fll-line)); border-radius: var(--fll-radius, 10px) !important; }
html body .home-price span { display: inline-block; max-width: 100%; font-size: clamp(3rem, 2rem + 12vw, 5.25rem); }
html body :is(.home-wrap, .home-section) p { overflow-wrap: break-word; }

/* ---- #11 Hover, pressed and disabled looks for every button ------------- */
html body :is(a, button, input, summary):is(.home-button, .guide-btn, .rev-btn, .page-btn, .conversion-button, .site-nav-cta, .site-dropdown-toggle, .btn, .button, .fll-privacy-choices, [data-workflow-step], [data-workflow-next]),
html body :is(button[type="submit"], input[type="submit"], .fll-consent button) {
  transition: transform .08s var(--fll-ease), filter .15s var(--fll-ease), box-shadow .15s var(--fll-ease);
}
html body [data-workflow-step]:hover { background: var(--fll-charcoal-3); }
html body :is(.home-button, .guide-btn, .rev-btn, .page-btn, .conversion-button, .site-nav-cta, .site-dropdown-toggle, .btn, .button, .fll-privacy-choices, [data-workflow-step], [data-workflow-next], button[type="submit"], input[type="submit"], .fll-consent button):active:not(:disabled):not([aria-disabled="true"]) {
  transform: translateY(1px) scale(.98);
  filter: brightness(.9);
  box-shadow: inset 0 2px 4px rgb(0 0 0 / .18);
}
html body :is(.home-button, .guide-btn, .rev-btn, .page-btn, .conversion-button, .site-nav-cta, .btn, .button, button, input[type="submit"]):is(:disabled, [aria-disabled="true"]) {
  opacity: .55; cursor: not-allowed; filter: grayscale(.4); transform: none; box-shadow: none;
}
html body button[aria-busy="true"] { cursor: progress; opacity: .8; }

/* ---- #12 Inline form errors and status --------------------------------- */
html body .fll-field-error { display: block; margin-top: 6px; color: #b42318; font-size: 14px; font-weight: 500; line-height: 1.4; }
:root[data-theme="dark"] .fll-field-error { color: #ffa39a; }
html body .fll-field-error[hidden] { display: none; }
html body :is(input, select, textarea)[aria-invalid="true"] { border-color: #b42318 !important; box-shadow: 0 0 0 1px #b42318; }
:root[data-theme="dark"] :is(input, select, textarea)[aria-invalid="true"] { border-color: #ffa39a !important; box-shadow: 0 0 0 1px #ffa39a; }
html body .fll-form-status { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--fll-paper); }
html body .fll-form-status[data-state="error"] { color: #b42318; }
:root[data-theme="dark"] .fll-form-status[data-state="error"] { color: #ffa39a; }
html body .fll-form-status:empty { display: none; }

/* ---- #13 Panels animate open (only when motion is welcome) -------------- */
@keyframes fll-panel-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes fll-fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  html body .site-dropdown-menu:not([hidden]) { animation: fll-panel-in .18s var(--fll-ease); }
  html body .site-links.open { animation: fll-panel-in .2s var(--fll-ease); }
  html body [data-workflow-panel]:not([hidden]) { animation: fll-fade-in .22s var(--fll-ease); }
  html body details[open] > :not(summary) { animation: fll-panel-in .2s var(--fll-ease); }
  html body .fll-consent:not([hidden]) { animation: fll-panel-in .22s var(--fll-ease); }
}
/* Arrow icon follows the white label on the dark card. */
html body .home-button-on-dark img { filter: brightness(0) invert(1); }

/* ===== Round 2 (2026-10-13): fixes for the live re-check ====================== */

/* #5 Theme switches and first paint must not animate colours: mid-transition
   frames were measured as low contrast. site-shell.js adds this class for two
   frames around every theme change. */
html.fll-theme-switching, html.fll-theme-switching *, html.fll-theme-switching *::before, html.fll-theme-switching *::after {
  transition: none !important;
}

/* #3 Every outline-style control: 6px corners, 600 weight. */
html body .site-links a.site-nav-login,
html body .site-dropdown-toggle { font-weight: 600 !important; border-radius: 6px !important; }
html body button[onclick*="openPreferences"] { border-radius: 6px !important; font-weight: 600 !important; min-height: 44px; }
/* The workflow "Next" row is a text action with a divider, not an outline button. */
html body [data-enhanced="true"] .home-demo-next { border: 0 !important; box-shadow: inset 0 1px 0 var(--home-line, var(--fll-line)); font-weight: 600; }
/* One input look everywhere (also covers legacy industry forms and widgets in the page DOM). */
html body :where(input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=hidden]):not([type=range]), textarea, select):not([aria-invalid="true"]) {
  border-radius: 6px !important; border: 1px solid var(--fll-line-strong) !important; font-size: 16px !important;
}
/* ...but an invalid field keeps its red error border (#12). */
html body :is(input, textarea, select)[aria-invalid="true"]:is(input, textarea, select) { border-color: #b42318 !important; }
:root[data-theme="dark"] body :is(input, textarea, select)[aria-invalid="true"]:is(input, textarea, select) { border-color: #ffa39a !important; }

/* #8 Links inside sentences get a 24px-tall hit area without moving the text
   (vertical padding on an inline box does not change line layout). */
html body :is(p, li, small, label, td, dd, figcaption, blockquote, .fll-consent) a:not(nav a):not([class*="btn"]):not([class*="button"]):not([class*="card"]):not([class*="cta"]) {
  padding-block: max(0px, calc((26px - 1.15em) / 2));
}

/* #9 Text enlarged to 200% (text-only zoom) must not overflow, clip or scroll sideways. */
/* Text blocks may break a long word only when it cannot fit (no mid-word breaks otherwise). */
html:root body:not(#fll-none) :is(main, footer, section, article, aside) :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, div, a, button, b, strong, span, em, small, summary, figcaption, blockquote, caption, td, th, label) {
  overflow-wrap: break-word !important;
}
/* Headings and display numbers: unitless line-height so it scales with the text
   and leaves room for descenders. */
html:root body:not(#fll-none) :is(h1, h2, h3, h4, .big-number, .home-title, .home-section-title, .page-title, .page-section-title, .rev-h2, .h1, .h2) {
  line-height: 1.18 !important;
  padding-bottom: .12em;
}
html:root body:not(#fll-none) :is(td, th, dt, dd, li, p) :is(strong, b) { line-height: inherit !important; }
html:root body:not(#fll-none) :is(td, th) { line-height: 1.45 !important; }
html body :is(main, section, article, aside, footer) :is(img, video, iframe, canvas, svg, pre, table) { max-width: 100%; }
html body :is(main, section, footer) :is(div, ul, ol, form, nav, article, aside, section, figure) { max-width: 100%; }
html body .home-wrap { max-width: 100%; }
@media (max-width: 640px) {
  /* Narrow screens: tables reflow into stacked rows instead of running off-screen. */
  html body main table { min-width: 0 !important; }
  html body main table, html body main thead, html body main tbody, html body main tr, html body main th, html body main td, html body main caption { display: block; width: auto !important; }
  html body main table.fll-stack-table thead { display: none; }
  html body main table.fll-stack-table [data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fll-muted); margin-bottom: 2px; }
  html body main table.fll-stack-table th[data-label]::before { display: none; }
  html body main tr { padding: 10px 0; border-bottom: 1px solid var(--fll-line); }
  html body main :is(th, td) { padding: 4px 0 !important; border: 0 !important; text-align: left !important; }
  /* Long label chips and pill rows wrap. */
  html body :is(.chip, .pill, .badge, .tag, .eyebrow, .page-eyebrow, .home-label, .home-small-label) { white-space: normal !important; max-width: 100%; }
  html body :is(.page-actions, .home-actions, .button-row, .guide-btns) { flex-wrap: wrap; }
  html body :is(.page-actions, .home-actions, .button-row, .guide-btns) > * { max-width: 100%; white-space: normal; }
}

/* #18 Header "Book a demo" steps back to an outline button when the page's own
   main action is a form or checkout (class set by site-shell.js). */
html body .site-links a.site-nav-cta.site-nav-cta-quiet,
html body.fll-quiet-cta .site-links a.site-nav-cta {
  background: transparent !important; color: var(--fll-paper) !important;
  border: 1px solid var(--fll-line-strong) !important; font-weight: 600 !important;
}
html body .site-links a.site-nav-cta.site-nav-cta-quiet:hover,
html body.fll-quiet-cta .site-links a.site-nav-cta:hover { background: var(--fll-charcoal-3) !important; border-color: var(--fll-paper) !important; }

/* #9 Remaining spots found by the 200% text audit. */
html:root body:not(#fll-none) :is(b, strong) { line-height: 1.25; padding-bottom: .12em; }
html:root body:not(#fll-none) .home-price span { line-height: 1.15 !important; padding-bottom: .2em; }
html:root body:not(#fll-none) :is(.source, .home-price-disclosure) { line-height: 1.5 !important; padding-bottom: .4em; }
html:root body:not(#fll-none) .chip { width: auto !important; max-width: 100%; white-space: normal !important; }
html:root body:not(#fll-none) .visual-inner { overflow: visible !important; height: auto !important; }
html:root body:not(#fll-none) .visual-inner * { white-space: normal !important; }
html:root body:not(#fll-none) :is(.section-head, .calc-row, .conversion-ledger > div, .stat) { flex-wrap: wrap; }
html:root body:not(#fll-none) .conversion-ledger dd { white-space: normal !important; }
html:root body:not(#fll-none) .hero-visual { overflow: visible !important; height: auto !important; }
html:root body:not(#fll-none) .hero-visual * { white-space: normal !important; }
html:root body:not(#fll-none) .ticker-track > * { white-space: normal !important; }
html:root body:not(#fll-none) .page-hero { overflow: visible !important; }
:root[data-theme="dark"] :is(.traditional-panel, .process-list) { color: var(--fll-paper); }

/* #9 Grid and flex layout tracks may shrink below their longest word, so
   enlarged text wraps instead of pushing columns off-screen. Scoped to the
   layout containers the 200% audit flagged (not component internals). */
html body :is(.stat-grid, .grid, .grid2, .grid3, .page-hero, .page-proof-strip, .section-head, .form-grid, .split-grid, .roi-costs,
  .hero, .hero-meta, .container, .panel, .week, .tiers, .tier, .spark-grid, .wrap, .calc-row, .chips, .dash-top, .metric-grid, .flow,
  .steps, .form, .proof-row, .cards, .related-grid, .page-wrap, .final-panel, .conversion-wrap, .rev-wrap, .rev-proof,
  .rev-section-head, .rev-form, .rev-grid-3, .rev-flow, .rev-price-grid, .rev-price, .mysam-bubble, .floating-note, .guide-breadcrumb, .fx-item) > * {
  min-width: 0;
}
html body .form label > *, html body .rev-form label > * { min-width: 0; }
/* Button rows wrap; each button may take the full row and wrap its label. */
html body :is(.guide-btns, .page-actions, .btns, .actions, .button-row, .hero-actions, .rev-actions, .fll-consent-actions) { flex-wrap: wrap; }
html body :is(.guide-btns, .page-actions, .btns, .actions, .button-row, .hero-actions, .rev-actions, .fll-consent-actions) > * { max-width: 100%; white-space: normal; }
html body .guide-faq summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
html body .rev-btn { white-space: normal !important; height: auto !important; max-width: 100%; }
html body .rev-actions .rev-btn { flex: 1 1 auto; min-width: min-content; }

/* ===== Round 3 (2026-10-13): 200% text at desktop widths and at 320px ===== */
/* Header: the links row may wrap instead of pushing "Book a demo" off-screen. */
html body .site-links { flex-wrap: wrap; min-width: 0; justify-content: flex-end; row-gap: 8px; }
html body .site-nav > * { min-width: 0; }
html body :is(.home-capabilities, .home-footer-top) > * { min-width: 0; }
@media (max-width: 360px) { html body :is(.guide-btn, .page-btn) { padding-inline: 12px !important; } }
/* Home add-ons: separate 10px cards, matching the pricing cards. */
html body .home-addons { background: none !important; gap: 16px; border: 0 !important; }
html body .home-addons article { background: var(--home-surface); border: 1px solid var(--home-line, var(--fll-line)) !important; border-radius: var(--fll-radius, 10px); }
/* Capability strip: columns stay wide enough for their words; enlarged text drops to fewer columns. */
@media (max-width: 640px) {
  html body .home-capabilities { grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5em), 1fr)) !important; font-size: 12px; }
}
html body .home-capabilities span { min-width: 0; overflow-wrap: break-word; }
/* Inline-link tap padding must not spill past the last line of its block. */
html body :is(p, li, small, dd, figcaption, blockquote):has(> a:not([class*="btn"]):not([class*="button"]):not([class*="card"]):not([class*="cta"])) { padding-bottom: 5px; }
html body .home-addons > * { min-width: 0; }
html body .home-addons article { grid-template-columns: 52px minmax(0, 1fr); }
/* /google-ads-leak-snapshot checklist rows: one bordered 10px panel like other cards. */
html body:has(.traditional-panel) .cards { border: 1px solid var(--line) !important; border-radius: var(--fll-radius, 10px); overflow: hidden; }
