/* Rank Forge site-wide formatting refinement — 2026-08-17 */
:root {
  --rf-format-shell: 1180px;
  --rf-format-gutter: clamp(18px, 4vw, 40px);
  --rf-format-section: clamp(56px, 7vw, 92px);
  --rf-format-radius: 4px;
  --rf-format-shadow: none;
}

html { scroll-padding-top: 92px; }
body { overflow-x: hidden; text-rendering: optimizeLegibility; }
*, *::before, *::after { box-sizing: border-box; }
img, svg, video { max-width: 100%; }
img { height: auto; }
main { min-width: 0; }
main h1, main h2, main h3 { text-wrap: balance; }
main p, main li { text-wrap: pretty; }

/* Keep the shared navigation breathable at intermediate desktop widths. */
.rfnav-main {
  width: min(100%, 1320px) !important;
  margin-inline: auto !important;
  padding-inline: var(--rf-format-gutter) !important;
  gap: clamp(16px, 2.5vw, 34px) !important;
}
.rfnav-logo { flex: 0 0 auto; }
.rfnav-menu { min-width: 0; gap: clamp(11px, 1.6vw, 24px) !important; }
.rfnav-menu > a, .rfnav-menu summary { white-space: nowrap; }
.rfnav-cta { white-space: nowrap; }

/* Consistent interactive finish. */
a, button, summary, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a[class*="button"], a[class*="cta"], button, input[type="submit"] {
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}
@media (hover:hover) {
  a[class*="button"]:hover, a[class*="cta"]:hover, button:hover, input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(24, 36, 51, .14);
  }
}

/* Cards and evidence blocks share one visual rhythm. */
.rf-service-directory-grid > article,
.rf-evidence-gallery > a,
.rf-article-related a,
.rf-article-callout,
.rf-article-checklist,
.rf-article-table-wrap,
main section [style*="border-radius:13px"],
main section [style*="border-radius:14px"],
main section [style*="border-radius:15px"] {
  box-shadow: none;
}
.rf-service-directory-grid > article,
.rf-evidence-gallery > a,
.rf-article-related a {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
@media (hover:hover) {
  .rf-service-directory-grid > article:hover,
  .rf-evidence-gallery > a:hover,
  .rf-article-related a:hover {
    transform: translateY(-1px);
    box-shadow: none;
    border-color: #c8bcad;
  }
}

/* Forms are visually consistent across location, service, and audit pages. */
form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
form select,
form textarea {
  width: 100%;
  min-height: 50px;
  border-radius: 4px !important;
  border-color: #bdb4a8 !important;
  background: #fffdf9 !important;
  color: #1e2a3a !important;
  font: inherit;
}
form textarea { min-height: 132px; resize: vertical; }
form input:focus, form select:focus, form textarea:focus {
  outline: 3px solid rgba(242, 101, 34, .18) !important;
  outline-offset: 1px;
  border-color: #d94712 !important;
}
form button[type="submit"], form input[type="submit"] { min-height: 52px; }

/* Article system: bounded hero, readable line length, stable sidebar. */
.rf-article-page .rf-article-hero__inner,
.rf-article-page .rf-article-layout,
.rf-article-page .rf-article-related,
.rf-article-page .rf-article-cta__inner {
  width: min(var(--rf-format-shell), calc(100% - 40px));
}
.rf-article-page .rf-article-hero h1 {
  max-width: 940px;
  font-size: clamp(42px, 5.6vw, 72px);
  line-height: 1.01;
}
.rf-article-page .rf-article-copy { max-width: 76ch; }
.rf-article-page .rf-article-copy > p:first-child { max-width: 66ch; }
.rf-article-page .rf-article-aside { border-radius: 0; box-shadow: none; }
.rf-article-page .rf-article-table-wrap { scrollbar-width: thin; }
.rf-article-page .rf-article-faq summary { line-height: 1.35; }

/* The all-services hero was oversized and left excessive dead space. */
body.rf-format-services main > section:first-child > div:last-child {
  max-width: 940px !important;
  padding-top: clamp(54px, 6vw, 76px) !important;
  padding-bottom: clamp(64px, 7vw, 88px) !important;
}
body.rf-format-services main > section:first-child h1 {
  max-width: 850px;
  margin-inline: auto !important;
  font-size: clamp(42px, 5.4vw, 68px) !important;
  line-height: 1 !important;
  letter-spacing: -.035em !important;
  text-transform: none !important;
}
body.rf-format-services main > section:first-child p { max-width: 690px !important; }

/* Long-form tables and accordions remain readable rather than cramped. */
main table { font-variant-numeric: tabular-nums; }
main th { line-height: 1.35; }
main td { overflow-wrap: anywhere; }
main details summary { line-height: 1.4; }

/*
 * Editorial interior hero
 * Replaces the repeated gradient / skyline / oversized split-color pattern used
 * by legacy service, industry, location, and company pages.
 */
body.rf-editorial-page .rf-editorial-hero {
  min-height: 0 !important;
  border-bottom: 1px solid #d8d1c7;
  background: #f8f6f2 !important;
}
body.rf-editorial-page .rf-editorial-hero > div[style*="position:absolute"] {
  display: none !important;
}
body.rf-editorial-page .rf-editorial-hero__content {
  box-sizing: border-box;
  width: min(1000px, calc(100% - 40px)) !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: clamp(38px, 4vw, 52px) clamp(18px, 4vw, 40px) clamp(42px, 4.5vw, 58px) !important;
  text-align: left !important;
}
body.rf-editorial-page .rf-editorial-hero__content > div:not([style*="display:flex"]) {
  max-width: 760px;
  margin-bottom: 20px !important;
  color: #b53a11 !important;
  font-size: 12px !important;
  font-weight: 700;
  letter-spacing: .16em !important;
  line-height: 1.4;
  text-transform: uppercase;
}
body.rf-editorial-page .rf-editorial-hero__content > div:first-child a {
  color: #53606c !important;
}
body.rf-editorial-page .rf-editorial-hero h1 {
  max-width: 980px;
  margin: 0 0 28px !important;
  color: #1e2a3a !important;
  font-size: clamp(44px, 5vw, 68px) !important;
  font-weight: 760 !important;
  letter-spacing: -.045em !important;
  line-height: 1.02 !important;
  text-transform: none !important;
}
body.rf-editorial-page .rf-editorial-hero h1 span {
  color: inherit !important;
}
@media (min-width: 761px) {
  body.rf-editorial-page .rf-editorial-hero h1 br { content: ""; }
  body.rf-editorial-page .rf-editorial-hero h1 br::after { content: " "; }
}
body.rf-editorial-page .rf-editorial-hero h1::after {
  display: block;
  width: 54px;
  height: 3px;
  margin-top: 27px;
  background: #d94712;
  content: "";
}
body.rf-editorial-page .rf-editorial-hero__content > p {
  max-width: 880px !important;
  margin: 0 0 30px !important;
  color: #3e4a56 !important;
  font-size: clamp(18px, 1.65vw, 21px) !important;
  line-height: 1.65 !important;
}
body.rf-editorial-page .rf-editorial-hero__content > div[style*="display:flex"] {
  gap: 10px !important;
}
body.rf-editorial-page .rf-editorial-hero__content > div[style*="display:flex"] a {
  min-height: 48px;
  border: 1px solid #1e2a3a !important;
  border-radius: 3px !important;
  padding: 13px 22px !important;
  background: transparent !important;
  color: #1e2a3a !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}
body.rf-editorial-page .rf-editorial-hero__content > div[style*="display:flex"] a:first-child {
  background: #1e2a3a !important;
  color: #fff !important;
}

/* Flatten the most common generated card treatment into editorial panels. */
body.rf-editorial-page main section:not(.rf-editorial-hero) [style*="border-radius:16px"],
body.rf-editorial-page main section:not(.rf-editorial-hero) [style*="border-radius:15px"],
body.rf-editorial-page main section:not(.rf-editorial-hero) [style*="border-radius:14px"] {
  border-radius: 4px !important;
  box-shadow: none !important;
}
body.rf-editorial-page main section:not(.rf-editorial-hero) [style*="letter-spacing:4px"] {
  letter-spacing: .16em !important;
}
body.rf-editorial-page main section:not(.rf-editorial-hero) h2 {
  letter-spacing: -.035em !important;
  line-height: 1.08 !important;
}

/* Replace presentation-deck spacing with a denser editorial rhythm. */
body.rf-editorial-page main > section:not(.rf-editorial-hero) > div[style*="padding:clamp"] {
  box-sizing: border-box;
  padding-top: 46px !important;
  padding-bottom: 46px !important;
}
body.rf-editorial-page main > section:not(.rf-editorial-hero) > div[style*="max-width:820px"],
body.rf-editorial-page main > section:not(.rf-editorial-hero) > div[style*="max-width:860px"],
body.rf-editorial-page main > section:not(.rf-editorial-hero) > div[style*="max-width:900px"] {
  max-width: 1000px !important;
}
body.rf-editorial-page main > section:not(.rf-editorial-hero) > div[style*="max-width:820px"] > div[style*="flex-direction:column"] {
  max-width: 820px;
}
body.rf-editorial-page main > section:not(.rf-editorial-hero) > div > div[style*="border-radius:16px"] {
  border-radius: 3px !important;
}
body.rf-editorial-page main > section:not(.rf-editorial-hero) h2[style*="margin:0 0 44px"] { margin-bottom: 28px !important; }
body.rf-editorial-page main > section:not(.rf-editorial-hero) h2[style*="margin:0 0 40px"],
body.rf-editorial-page main > section:not(.rf-editorial-hero) h2[style*="margin:0 0 36px"] { margin-bottom: 26px !important; }

@media (max-width: 1100px) and (min-width: 901px) {
  .rfnav-main { padding-inline: 22px !important; gap: 15px !important; }
  .rfnav-menu { gap: 10px !important; }
  .rfnav-menu > a, .rfnav-menu summary { font-size: 13px !important; }
  .rfnav-cta { padding-inline: 16px !important; font-size: 13px !important; }
}

@media (max-width: 900px) {
  :root { --rf-format-section: clamp(46px, 8vw, 72px); }
  .rf-article-page .rf-article-hero__inner,
  .rf-article-page .rf-article-layout,
  .rf-article-page .rf-article-related,
  .rf-article-page .rf-article-cta__inner { width: min(100% - 32px, var(--rf-format-shell)); }
  .rf-article-page .rf-article-hero h1 { font-size: clamp(38px, 9.5vw, 58px); }
  .rf-article-page .rf-article-layout { gap: 34px; }
  .rf-article-page .rf-article-aside { position: static; }
  body.rf-editorial-page .rf-editorial-hero__content { width: min(100% - 32px, 1000px) !important; }
  body:has(.rfnav-bottombar) { padding-bottom: 58px; }
  .rfnav-bottombar { min-height: 58px !important; height: 58px !important; }
  .rfnav-bottombar a { min-height: 58px !important; padding-block: 10px !important; font-size: 14px !important; }
}

@media (max-width: 560px) {
  html { scroll-padding-top: 72px; }
  main h1 { overflow-wrap: break-word; }
  body.rf-format-services main > section:first-child h1 { font-size: clamp(36px, 11vw, 50px) !important; }
  form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), form select, form textarea { font-size: 16px !important; }
  .rf-article-page .rf-article-hero__inner { padding-top: 38px; padding-bottom: 48px; }
  .rf-article-page .rf-article-meta { gap: 8px 14px; }
  body.rf-editorial-page .rf-editorial-hero__content { padding: 32px 16px 38px !important; }
  body.rf-editorial-page main > section:not(.rf-editorial-hero) > div[style*="padding:clamp"] { padding-top: 36px !important; padding-bottom: 36px !important; }
  body.rf-editorial-page .rf-editorial-hero h1 { font-size: clamp(38px, 11.5vw, 52px) !important; }
  body.rf-editorial-page .rf-editorial-hero h1::after { margin-top: 22px; }
  body.rf-editorial-page .rf-editorial-hero__content > div[style*="display:flex"] { align-items: stretch; flex-direction: column; }
  body.rf-editorial-page .rf-editorial-hero__content > div[style*="display:flex"] a { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Case-study pages: evidence-first, compact editorial presentation. */
.rf-case-index-intro { display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:clamp(48px,8vw,110px);align-items:end; }
.rf3-work-index-hero { padding:58px 0 54px !important; }
.rf3-work-index-hero h1 { max-width:760px !important;margin-top:16px !important;font-size:clamp(44px,5vw,66px) !important;line-height:1.01 !important;letter-spacing:-.045em !important; }
.rf3-work-index-hero p { max-width:690px !important;margin-top:20px !important;font-size:18px !important;line-height:1.58 !important; }
.rf-case-index-jump { border-top:1px solid rgba(255,255,255,.35); }
.rf-case-index-jump>span { display:block;padding:13px 0 10px;color:rgba(255,255,255,.6);font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase; }
.rf-case-index-jump a { display:grid;grid-template-columns:28px 1fr;gap:8px;padding:12px 0;border-top:1px solid rgba(255,255,255,.14);color:rgba(255,255,255,.55);font-size:12px;text-decoration:none; }
.rf-case-index-jump a b { color:#fff;font-size:15px;font-weight:600; }
.rf3-work-index { padding-top:54px !important; }
.rf3-work-index-list { gap:58px !important; }
.rf3-case-hero { padding:42px 0 36px !important; }
.rf3-case-hero h1 { max-width:900px !important;font-size:clamp(42px,5vw,64px) !important;line-height:1.02 !important; }
.rf3-case-hero>div>p { max-width:760px !important;font-size:18px !important; }
.rf3-case-meta { margin-top:30px !important; }

/* Close long pages with a compact decision row instead of a poster-sized CTA. */
.rf3-final { padding: 52px 0 !important; text-align: left !important; }
.rf3-final > .rf3-shell { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 54px; align-items: center; }
.rf3-final .rf3-kicker { grid-column: 1; }
.rf3-final h2 { grid-column: 1; max-width: 760px !important; margin: 10px 0 0 !important; font-size: clamp(36px, 4vw, 52px) !important; line-height: 1.02 !important; }
.rf3-final p { grid-column: 1; max-width: 650px !important; margin: 16px 0 0 !important; }
.rf3-final .rf3-button { grid-column: 2; grid-row: 1 / span 3; white-space: nowrap; }

@media (max-width:760px) {
  .rf3-hero h1 { max-width: none !important; font-size: clamp(37px, 10.5vw, 42px) !important; line-height: 1.02 !important; }
  .rf-case-index-intro { grid-template-columns:1fr;gap:32px; }
  .rf3-work-index-hero { padding:40px 0 38px !important; }
  .rf3-work-index-hero h1 { font-size:clamp(36px,10.4vw,46px) !important; }
  .rf3-work-index-hero p { font-size:17px !important; }
  .rf3-work-index { padding-top:38px !important; }
  .rf3-case-hero h1 { font-size:clamp(36px,10vw,46px) !important; }
  .rf3-final { padding: 38px 0 !important; }
  .rf3-final > .rf3-shell { grid-template-columns: 1fr; }
  .rf3-final .rf3-button { grid-column: 1; grid-row: auto; width: 100%; margin-top: 22px; text-align: center; }
}
