/* WordPrais UX Polish — load after theme and footer plugin styles. */
:root {
  --wp-text-dim: #94a3b8;
  --ux-border: #64748b;
  --ux-link: #93c5fd;
  --ux-focus: #f8fafc;
}
body { font-family: 'Golos Text', sans-serif; line-height: 1.6; }
button, input, select, textarea { font: inherit; font-family: 'Golos Text', sans-serif; }
h1,h2,h3,h4,h5,h6 { font-family: 'Onest', sans-serif; overflow-wrap: break-word; }
h1, .hero-section h1, .single-article-title { font-size: clamp(32px, 4.2vw, 52px) !important; line-height: 1.15 !important; }
h2, .wprs-lead__title, .wplm-lead__title { font-size: clamp(26px, 3vw, 36px) !important; line-height: 1.2 !important; }
h3 { font-size: clamp(21px, 2vw, 24px) !important; line-height: 1.25 !important; }
p { line-height: 1.6; }
/* Fix intrinsic sizing, not by clipping content off the viewport. */
:where(.container, .hero-grid, .hero-actions, .hero-trust-bar, .solutions-grid,
.plugins-grid, .calc-card, .legal-box, .footer-row, .header-row,
.wprs-lead__inner, .wprs-lead__row, .wplm-lead__inner, .wplm-row) > * { min-width: 0; }
:where(main, .site-footer, .wprs-lead, .wplm-lead) { overflow-wrap: break-word; }
.hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.hero-badge { max-width: 100%; white-space: normal; overflow-wrap: break-word; }
.hero-badge > * { min-width: 0; }
.hero-actions > *, .wprs-f, .wplm-f { min-width: 0; max-width: 100%; }
.solutions-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)) !important; }
.blog-breadcrumbs, .blueprint-header, .solution-metrics { flex-wrap: wrap; gap: 8px; }
.blueprint-header-dots { flex-shrink: 0; }
img, video, iframe { max-width: 100%; }
img, video { height: auto; }
pre, .wp-block-table { max-width: 100%; overflow-x: auto; }
:where(.single-article-content, .entry-content, .wprs-legal) table { width: 100%; table-layout: fixed; overflow-wrap: anywhere; }
/* A shared control system. Important declarations only beat existing inline/plugin rules. */
:is(.btn, .header-cta-btn, .wprs-btn, .wplm-btn, .wprs-cta__b, .mobile-sticky-btn, input[type=submit]) {
  display: inline-flex; align-items: center; justify-content: center; flex-direction: row;
  gap: 8px; min-height: 48px; max-width: 100%; padding: 11px 20px;
  border: 1px solid var(--ux-border); border-radius: 8px;
  font-family: 'Golos Text', sans-serif !important; font-size: 16px !important;
  font-weight: 600; line-height: 1.4; text-align: center; white-space: normal;
  text-decoration: none; cursor: pointer; transition: background-color .18s, border-color .18s;
}
:is(.btn, .header-cta-btn, .wprs-btn, .wplm-btn, .wprs-cta__b, .mobile-sticky-btn) svg { flex: 0 0 20px; width: 20px; height: 20px; }
:is(.btn-primary, .header-cta-btn, .wprs-btn, .wplm-btn, .wprs-cta__form, .mobile-sticky-btn.wprs-mob-form, input[type=submit]) {
  background: #2563eb; color: #fff !important; border-color: #2563eb;
}
:is(.btn-secondary, .wplm-btn--ghost, .wprs-cta__call, .mobile-sticky-btn.phone) {
  background: #141923; color: #f8fafc !important; border-color: var(--ux-border) !important; box-shadow: none;
}
@media (hover: hover) {
  :is(.btn-primary, .header-cta-btn, .wprs-btn, .wplm-btn, .wprs-cta__form, .mobile-sticky-btn.wprs-mob-form, input[type=submit]):hover {
    background: #1d4ed8; filter: none; transform: none;
  }
  :is(.btn-secondary, .wplm-btn--ghost, .wprs-cta__call, .mobile-sticky-btn.phone):hover { background: #263245; border-color: #94a3b8 !important; transform: none; }
}
:is(.btn, .header-cta-btn, .wprs-btn, .wplm-btn, .wprs-cta__b, .mobile-sticky-btn):active { filter: brightness(.9); transform: translateY(1px); }
:is(button, input[type=submit]):disabled { opacity: .6; cursor: not-allowed; transform: none; }
:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--ux-focus) !important; outline-offset: 3px;
  box-shadow: 0 0 0 6px #0b0e14;
}
:where(.wprs-f, .wplm-f) :is(input, select, textarea) {
  font: inherit; font-size: 16px; min-height: 48px; min-width: 0; border-color: var(--ux-border); border-radius: 8px;
}
:where(.wprs-consent, .wplm-consent) { font-size: 14px; line-height: 1.6; padding-block: 8px; }
:where(.wprs-consent, .wplm-consent) input { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; accent-color: #2563eb; }
:where(.wprs-consent, .wplm-consent) a { color: var(--ux-link); text-decoration: underline; text-underline-offset: 3px; }
.wprs-cta { background: #0b0e14; border-radius: 12px; padding: 8px; z-index: 90; max-width: calc(100% - 32px); }
body { padding-bottom: 88px; }
#wprs-lead, #calculator { scroll-margin-top: 110px; }
html { scroll-padding-bottom: 100px; }
.mobile-menu-toggle, .drawer-close-btn { min-width: 48px; min-height: 48px; }
/* Hidden drawer must not contribute to page overflow or keyboard traversal. */
.mobile-nav-drawer:not(.active) { visibility: hidden; }
.mobile-nav-drawer { height: 100dvh; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.header-phone-label, .trust-label, .metric-term, .blueprint-header,
.hero-badge, .section-tag, .solution-badge, .plugin-badge-agents, .plugin-badge-cat,
.plugin-card-economy, .btn-link-free, .drawer-subhead, .drawer-services-list,
.blog-breadcrumbs, .wprs-f, .wplm-f, .site-footer { font-size: 14px; }
.section-tag { color: var(--ux-link); }
.hero-phone-btn span { font-size: inherit; }
/* Target small inline captions in supplied templates without touching SVG diagram labels. */
:where(main, .site-footer, .mobile-nav-drawer) :is(div, span, a, ul, p)[style*="font-size: 1"][style*="px"] {
  font-size: max(14px, 1em);
}
:where(main, .site-footer, .mobile-nav-drawer) :is(div, span, a, ul, p):is([style*="font-size: 10"], [style*="font-size: 11"], [style*="font-size: 12"], [style*="font-size: 13"]) { font-size: 14px !important; }
.header-phone-number, .drawer-phone-link { color: #10b981; }
.site-footer a[style*="#4ade80"] { color: #10b981 !important; }
@media (max-width: 1280px) and (min-width: 992px) {
  .header-nav { gap: 12px; flex-wrap: wrap; }
  .header-row { gap: 16px; }
  .header-phone-link { display: none; }
}
@media (max-width: 991px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 768px) {
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .header-cta-group .header-cta-btn { display: none; }
  .mobile-sticky-bar {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
    width: auto; left: 0; right: 0; background: #0b0e14;
    padding: 8px max(12px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    z-index: 97;
  }
  .mobile-sticky-btn { min-width: 0; min-height: 54px; padding: 10px 12px; }
  .mobile-sticky-btn span { font-size: 16px; }
  .wprs-cta { display: none; }
  .hero-phone-detail { display: none; }
  .hero-phone-btn > span { font-size: 16px; }
  :where(main, .wprs-lead, .wplm-lead) p,
  .plugin-card-desc, .single-article-content, .entry-content,
  .drawer-link, .wprs-lead__sub, .wplm-lead__sub { font-size: 16px !important; }
  :where(main) ul:not(.site-footer ul), :where(main) details > div { font-size: 16px !important; }
  .site-footer .container > div[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .hero-blueprint-card > div[style*="display: flex"] { flex-wrap: wrap; gap: 12px; }
  .wprs-lead__inner, .wplm-lead__inner { padding: 22px 16px; }
  .hero-blueprint-card { padding: 20px 16px; }
  .trust-number { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  .mobile-sticky-bar, .wprs-cta { display: none !important; }
  body { padding-bottom: 0; }
}
/* Additional captions and plugin rules with matching specificity. */
.cluster-badge, .timeline-days, .timeline-marker, .legal-badge-pill,
.cluster-solution, .timeline-deliverable, .result-payback,
.blog-meta, .blog-card-meta, .blog-card-footer, .author-role,
.post-nav-row, .post-nav-row a, .compare-table th,
.wprs-legal-strip, .wprs-legal-strip span, .wprs-legal-strip a { font-size: 14px; }
.wprs-consent, .wplm-consent { font-size: 14px; line-height: 1.6; }
:is(.wprs-f, .wplm-f) :is(input, select, textarea) { font-family: 'Golos Text', sans-serif; font-size: 16px; min-height: 48px; border-color: var(--ux-border); }
.legal-box [style*="font-size: 13"], .calc-card label[style*="font-size: 13"] { font-size: 14px !important; }
.single-content code { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
main code { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 768px) {
  .cluster-solution, .timeline-deliverable, .calc-label-row, .calc-checkbox-label { font-size: 16px; }
}
.card-meta, .card-footer-link a, .plugin-card-desc, .cluster-keywords { font-size: 14px; }
.article-entry-content code { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 768px) {
  .mobile-sticky-bar .mobile-sticky-btn { min-height: 54px; }
  .article-entry-content, .article-entry-content code { font-size: 16px; }
}
/* Text blue is lighter than the filled primary button for AA on dark panels. */
.trust-number[style*="var(--wp-blue)"] { color: var(--ux-link) !important; }

/* Round 2 (live render fixes, 11.11.2026). */
/* Card titles stay compact: the section heading scale must not inflate cards. */
:is(.card-title, .plugin-card-title, .solution-card h3, .blog-card h2, .blog-card h3, .article-next-step__title) {
  font-size: clamp(18px, 1.5vw, 22px) !important; line-height: 1.25 !important;
}
:where(.single-article-content, .entry-content, .article-entry-content) :is(p, li) { hyphens: auto; }
:where(.single-article-content, .entry-content, .article-entry-content) a { overflow-wrap: anywhere; }
/* Desktop header: logo never touches the menu, menu never squeezes. */
.header-row { gap: 24px; }
.brand-logo { flex-shrink: 0; }
.header-nav { gap: 18px; white-space: nowrap; }
.header-nav a { white-space: nowrap; }
@media (max-width: 1280px) and (min-width: 992px) {
  .header-nav { gap: 14px; flex-wrap: nowrap; }
}
/* Hero: the calculator is a secondary action, shown as a text link under the buttons. */
.hero-actions a.btn[href="#calculator"] {
  flex-basis: 100%; justify-content: flex-start; min-height: 44px; padding: 8px 2px;
  background: transparent !important; border-color: transparent !important; box-shadow: none;
  color: var(--ux-link) !important; text-decoration: underline; text-underline-offset: 4px;
}
.hero-actions a.btn[href="#calculator"]::after { content: "→"; display: inline-block; margin-left: 6px; text-decoration: none; }
@media (max-width: 576px) { .hero-actions a.btn[href="#calculator"] { justify-content: center; } }
/* Blog pagination as page buttons. */
.blog-pagination ul.page-numbers { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; margin: 32px 0 0; padding: 0; }
.blog-pagination ul.page-numbers li { margin: 0; padding: 0; list-style: none; }
.blog-pagination ul.page-numbers li::marker { content: none; }
.blog-pagination .page-numbers:is(a, span) {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--ux-border); border-radius: 8px; background: #141923; color: #f8fafc;
  font-family: 'Golos Text', sans-serif; font-size: 16px; font-weight: 600; text-decoration: none;
}
.blog-pagination a.page-numbers:hover { background: #263245; border-color: #94a3b8; }
.blog-pagination span.page-numbers.current { background: #2563eb; border-color: #2563eb; color: #fff; }
.blog-pagination span.page-numbers.dots { border-color: transparent; background: transparent; min-width: 24px; padding: 0 4px; }
.header-cta-group { flex-shrink: 0; }
.header-cta-btn, .header-phone-label, .header-phone-number { white-space: nowrap; }
@media (max-width: 1120px) and (min-width: 992px) {
  .header-row { gap: 14px; }
  .header-nav { gap: 10px; }
  .header-cta-group .header-cta-btn { padding-inline: 14px; }
}
@media (max-width: 1040px) and (min-width: 992px) {
  .header-nav { gap: 8px; }
  .brand-logo { font-size: 17px; gap: 8px; }
}
