/* FIP web30 readability layer.
   Loaded last on every page. Typography, spacing, contrast and table legibility
   tuned for executive readers (CFOs, CEOs, PE operating partners).
   No content, layout grid or conversion logic changes live here. */

/* 1. Self-hosted Inter (SIL OFL 1.1, see /assets/fonts/Inter-OFL.txt) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD, U+2190-21FF;
}

:root {
  --fr-ink: #142021;
  --fr-body: #2f4441;      /* body copy: 10.9:1 on #f8f9f6 */
  --fr-muted: #435a56;     /* secondary copy: 7.3:1 */
  --fr-fine: #4d625e;      /* fine print: 6.2:1 */
  --fr-teal: #066e72;      /* links and accents: 5.9:1 */
  --fr-measure: 68ch;
}
html[data-theme="dark"] {
  --fr-ink: #f4fbf7;
  --fr-body: #d3e4de;
  --fr-muted: #c3d8d1;
  --fr-fine: #b7cec7;
  --fr-teal: #86e6dd;
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, .ex-page, .fip-discovery, .fip-approval, .fip-privacy,
button, input, select, textarea {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}
body { text-rendering: optimizeLegibility; }
::selection { background: #bfeee9; color: #102628; }

/* 2. Headings: slightly calmer scale, less tracking, balanced line breaks */
h1, h2, h3 { text-wrap: balance; }
p, blockquote, figcaption, summary { text-wrap: pretty; }

/* Same specificity as the base rules so page-specific heading sizes (case studies,
   sample diagnostic) keep their smaller document scale. */
.ex-page h1, .ex-page h2 { letter-spacing: -.032em; }
.ex-page h3 { letter-spacing: -.022em; }
.ex-page h1 { font-size: clamp(40px, 4.9vw, 68px); line-height: 1.07; }
.ex-home h2, .ex-engagements h2, .ex-insights h2 { font-size: clamp(31px, 3.5vw, 48px); line-height: 1.1; }

/* About page (legacy markup) */
html body main:not(.ex-page) h1 { letter-spacing: -.032em; }
html body main:not(.ex-page) .section-heading,
html body main:not(.ex-page) section h2 { letter-spacing: -.03em; line-height: 1.1; }

/* Headline followed directly by copy needs breathing room */
html body .ex-page h2 + p,
html body .ex-page h2 + ol,
html body .ex-page h2 + ul,
html body:not(.fip-approval):not(.fip-privacy) main h2 + p:not(.ex-eyebrow) { margin-top: 20px; }
html body .ex-page h3 + p { margin-top: 10px; }

/* 3. Eyebrows and labels: larger, less tracked, still quiet */
html body .ex-page .ex-eyebrow,
html body .ex-about-experience .ex-eyebrow,
html body main .eyebrow {
  font-size: 12.5px !important;
  letter-spacing: .1em !important;
  font-weight: 760 !important;
  line-height: 1.5;
}
html body .ex-opportunity-grid article > span,
html body .ex-three article > span,
html body .ex-alt-grid article > span,
html body .ex-insights-list article > span,
html body .ex-evidence-note > span,
html body .ex-price-panel .ex-panel-tag {
  font-size: 12px !important;
  letter-spacing: .08em !important;
}

/* 4. Body copy: 17px base, comfortable measure, stronger contrast */
html body .ex-page { font-size: 17px; line-height: 1.65; }
html body .ex-page p { max-width: var(--fr-measure); }
html body .ex-page .ex-hero-support { font-size: 17.5px; line-height: 1.68; color: var(--fr-muted); }
html body .ex-page .ex-lede { line-height: 1.48; }
html body .ex-page .ex-section-head p:last-child { font-size: 18px; color: var(--fr-muted); }
html body .ex-page .ex-evidence-grid > div > p:not(.ex-eyebrow),
html body .ex-page .ex-fit-grid > div > p:not(.ex-eyebrow) { font-size: 17.5px; color: var(--fr-body); }

/* Card and panel copy was 13 to 14px; raise to 15.5 to 16px */
html body .ex-page .ex-opportunity-grid p,
html body .ex-page .ex-three p,
html body .ex-page .ex-alt-grid p,
html body .ex-page .ex-evidence-note p,
html body .ex-page .ex-fit-box p,
html body .ex-page .ex-insights-list p {
  font-size: 16px !important;
  line-height: 1.65 !important;
  color: var(--fr-body) !important;
}
html body .ex-page .ex-opportunity-grid h3 { font-size: 23px; }
html body .ex-page .ex-card-link a,
html body .ex-page .ex-evidence-note a,
html body .ex-feature-grid .ex-inline-link { font-size: 15.5px !important; }

/* Price panels: tabular figures, readable inclusions and notes */
html body .ex-page .ex-price,
html body .ex-page .ex-alt-price,
html body .ex-proof strong,
html body main .proof-item strong { font-variant-numeric: lining-nums tabular-nums; }
html body .ex-price-panel li { font-size: 16px !important; line-height: 1.55 !important; padding: 6px 0 !important; }
html body .ex-page .ex-panel-sub { font-size: 15.5px !important; }
html body .ex-page .ex-panel-note { font-size: 14px !important; line-height: 1.6 !important; color: #49605c !important; }
html body .ex-page .ex-alt-foot { font-size: 15px !important; }
html body .ex-page .ex-alt-price small,
html body .ex-page .ex-price small { font-size: 15px; }

/* Micro copy under buttons was 12px */
html body .ex-page .ex-micro,
html body .ex-closing .ex-micro { font-size: 15px !important; line-height: 1.55; }
html body .ex-page .ex-fit-inline { font-size: 14.5px; line-height: 1.55; }

/* Proof strip */
html body .ex-proof { padding: 32px 0; }
html body .ex-proof strong { font-size: 26px !important; }
html body .ex-proof span { font-size: 15px !important; line-height: 1.5 !important; color: #dfece8 !important; }
html body main .proof-item strong { font-size: clamp(22px, 2.2vw, 28px); }
html body main .proof-item span { font-size: 15px; line-height: 1.5; }

/* About page legacy body copy */
html body main:not(.ex-page) .story-body p,
html body main:not(.ex-page) .credential p,
html body main:not(.ex-page) .principle p,
html body main:not(.ex-page) .past-grid p,
html body main:not(.ex-page) .credentials-intro p,
html body main:not(.ex-page) .work-head p { font-size: 17px; line-height: 1.68; max-width: var(--fr-measure); }
html body main:not(.ex-page) .credential > strong { font-size: 13px; }
html body main:not(.ex-page) .hero-detail { font-size: 17px; line-height: 1.68; }

/* FAQ */
html body .ex-faq-items summary { font-size: 18px !important; padding-top: 20px; padding-bottom: 20px; }
html body .ex-faq-items details p { font-size: 16.5px !important; line-height: 1.68 !important; max-width: 72ch; }

/* 5. Buttons and navigation: larger targets and labels */
html body .ex-page .btn,
html body:not(.fip-approval):not(.fip-privacy):not(.fip-discovery) main .btn {
  font-size: 15px !important;
  min-height: 52px;
  padding: 14px 24px !important;
  font-weight: 700 !important;
}
html body .nav-links a { font-size: 15px !important; }
html body .nav-call { font-size: 14px !important; padding: 13px 20px !important; max-width: none !important; }
html body .theme-toggle { font-size: 12.5px; min-height: 36px; padding: 7px 12px; }
html body .theme-auto { font-size: 12.5px; }
@media (max-width: 1130px) {
  html body .nav-links a { font-size: 13.5px !important; }
  html body .nav-call { font-size: 13px !important; padding: 11px 14px !important; }
}
@media (max-width: 900px) {
  html body .nav-links a { font-size: 17px !important; padding: 14px 0 !important; }
}

/* Focus visibility for keyboard users */
html body a:focus-visible,
html body button:focus-visible,
html body summary:focus-visible,
html body select:focus-visible,
html body input:focus-visible,
html body textarea:focus-visible { outline: 3px solid #0a8a8f; outline-offset: 3px; border-radius: 6px; }

/* Inline links: consistent underline */
html body .ex-page p a,
html body main p a { text-underline-offset: 3px; text-decoration-thickness: 1.5px; }

/* 6. Financial tables: tabular figures, right-aligned numbers, clear headers */
html body .fip-proof-table { border-radius: 12px; background: #fff; }
html body .fip-proof-table table {
  font-size: 16px !important;
  font-variant-numeric: lining-nums tabular-nums;
}
html body .fip-proof-table caption {
  font-size: 15.5px !important;
  font-weight: 720 !important;
  padding: 14px 18px !important;
  color: var(--fr-ink);
}
html body .fip-proof-table thead th {
  font-size: 13px !important;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #3d5450;
  vertical-align: bottom;
}
html body .fip-proof-table th,
html body .fip-proof-table td { padding: 13px 18px !important; }
html body .fip-proof-table tbody th { font-weight: 620 !important; color: var(--fr-ink); }
html body .fip-proof-table td { color: var(--fr-body); }
html body .fip-proof-table .num { text-align: right !important; white-space: nowrap; }
html body .fip-proof-table thead th.num { text-align: right !important; }
html body .fip-proof-table tr.fr-total th,
html body .fip-proof-table tr.fr-total td { font-weight: 760 !important; color: var(--fr-ink); border-top: 2px solid #9eb3ae; }
html[data-theme="dark"] body .fip-proof-table { background: #1d2d30; }
html[data-theme="dark"] body .fip-proof-table thead th { color: #c3d8d1; }

/* Approval memo and privacy pages */
@media screen {
  html body.fip-privacy main { font-size: 16.5px; line-height: 1.65; }
}

/* 7. Discovery page: brand-consistent header and a visible primary action */
html body.fip-discovery main { max-width: 760px; }
html body.fip-discovery .brand { display: inline-flex; align-items: center; text-decoration: none; }
html body.fip-discovery .brand img { width: 220px; height: auto; display: block; }
html body.fip-discovery h1 { letter-spacing: -.035em; text-wrap: balance; }
html body.fip-discovery .next-steps { font-size: 16.5px; }
html body.fip-discovery .offer-summary,
html body.fip-discovery .trust-note,
html body.fip-discovery .small { font-size: 15px !important; }
html body.fip-discovery .qual label { font-size: 14.5px; }
html body.fip-discovery .qual select { font-size: 15.5px; min-height: 46px; }
html body.fip-discovery a.email {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 14px 26px; border-radius: 999px;
  background: #164b48; color: #fff; font-weight: 700; text-decoration: none;
}
html body.fip-discovery a.email:hover { background: #295456; }
html[data-theme="dark"] body.fip-discovery a.email { background: #8ce9de; color: #153736; }
@media (max-width: 480px) { html body.fip-discovery a.email { width: 100%; } }

html body.fip-approval .brand { display: inline-flex; text-decoration: none; }
html body.fip-approval .brand img { width: 200px; height: auto; display: block; }
html[data-theme="dark"] body :is(.fip-discovery, .fip-approval) .brand img,
html[data-theme="dark"] body.fip-discovery .brand img,
html[data-theme="dark"] body.fip-approval .brand img { filter: brightness(1.48) saturate(.85); }
@media print {
  /* Keep the approval memo on one printed page */
  html body.fip-approval .brand img { width: 140px; filter: none !important; }
  html body.fip-approval .eyebrow { margin-top: 14px; }
  html body.fip-approval h1 { font-size: 22pt; }
  html body.fip-approval .summary { margin-top: 6px; }
  html body.fip-approval .summary section { padding-top: 5px; }
  html body.fip-approval .summary p { margin-bottom: 8px; line-height: 1.45; }
  html body.fip-approval .next { margin-top: 10px; }
  html body.fip-approval .footer { margin-top: 10px; }
}

/* 8. Small screens */
@media (max-width: 740px) {
  html body .ex-page { font-size: 16.5px; }
  .ex-page h1 { font-size: clamp(36px, 10vw, 44px); line-height: 1.08; }
  .ex-home h2, .ex-engagements h2, .ex-insights h2 { font-size: clamp(29px, 8.2vw, 36px); }
  html body .ex-page .ex-eyebrow,
  html body main .eyebrow { font-size: 12px !important; letter-spacing: .08em !important; }
  html body .ex-proof strong { font-size: 23px !important; }
  html body .ex-proof span { font-size: 14px !important; }
  html body .fip-proof-table table { font-size: 15px !important; }
  /* Two and three column tables fit the phone width; wider tables scroll with an edge shadow cue */
  html body .fip-proof-table:not(:has(th:nth-child(4))) table { min-width: 0 !important; }
  html body .fip-proof-table:has(th:nth-child(4)) {
    background:
      linear-gradient(90deg, #fff 30%, rgba(255,255,255,0)) left / 28px 100% no-repeat local,
      linear-gradient(270deg, #fff 30%, rgba(255,255,255,0)) right / 28px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgba(16,38,40,.22), transparent) left / 12px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgba(16,38,40,.22), transparent) right / 12px 100% no-repeat scroll,
      #fff;
  }
  html[data-theme="dark"] body .fip-proof-table:has(th:nth-child(4)) { background: #1d2d30; }
  html body .fip-proof-table th,
  html body .fip-proof-table td { padding: 11px 12px !important; }
  html body .ex-page .ex-price-panel li { font-size: 15.5px !important; }
}

/* 9. Motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html body .ex-page .btn:hover { transform: none; }
}

/* 10. Print: keep tables and memo legible */
@media print {
  html body .fip-proof-table { overflow: visible; border-color: #999; }
  html body .fip-proof-table table { min-width: 0 !important; font-size: 11pt !important; }
  html body .ex-mobile-sticky { display: none !important; }
}

/* About page bridge link: render as an outlined button like the rest of the site */
html body .fip-experience-bridge .btn {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid #7b9994; border-radius: 999px; background: transparent;
}
html body .fip-experience-bridge .btn:hover { background: #e8f1ee; }
html[data-theme="dark"] body .fip-experience-bridge .btn { border-color: #6fa9a2; color: #ecf4f1; }
html[data-theme="dark"] body .fip-experience-bridge .btn:hover { background: #223638; }
