/* Predict Here Capital foundation (October 27, 2026): tokens, self-hosted type and global components.
   Loads last on every route and owns the type scale. Colours are the nine palette values or color-mix() of them.
   Role rules are scoped to #main so they outrank the layered route sheets, which later phases retire route by route.
   Phase 0 defect fixes are marked. */

/* Type: Newsreader for reading, Public Sans for interface (SIL Open Font License; notices in /assets/fonts/) */
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader-roman.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/assets/fonts/public-sans.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/assets/fonts/public-sans-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
/* Metric-matched fallbacks keep line breaks steady while the web fonts load */
@font-face { font-family: "Newsreader Fallback"; src: local("Georgia"); size-adjust: 91.52%; ascent-override: 80.31%; descent-override: 28.95%; line-gap-override: 0%; }
@font-face { font-family: "Public Sans Fallback"; src: local("Arial"), local("Helvetica"); size-adjust: 105.61%; ascent-override: 89.96%; descent-override: 21.31%; line-gap-override: 0%; }

:root {
  --navy: #101b2b; --ivory: #f5f1e8; --paper: #ebe6dc; --gold: #d6b16b; --dark-gold: #725423;
  --ink: #182638; --muted: #566474; --line: #d3cec4; --white: #ffffff;
  --serif: "Newsreader", "Newsreader Fallback", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", "Public Sans Fallback", Arial, Helvetica, sans-serif;

  --text: var(--ink);
  --text-2: color-mix(in srgb, var(--ink) 55%, var(--muted));
  --text-3: var(--muted);
  --on-navy: var(--ivory);
  --on-navy-2: color-mix(in srgb, var(--ivory) 82%, var(--navy));
  --label: var(--dark-gold);
  --focus-ring: var(--dark-gold);
  --gold-hover: color-mix(in srgb, var(--gold) 86%, var(--navy));
  --navy-hover: color-mix(in srgb, var(--navy) 78%, var(--muted));
  --link-rest: color-mix(in srgb, var(--dark-gold) 45%, transparent);

  /* Fluid scale between 390 px and 1,440 px viewports */
  --fs-display: clamp(2.75rem, 2.1rem + 2.667vw, 4.5rem);          /* 44 → 72 */
  --fs-title: clamp(2.5rem, 2.036rem + 1.905vw, 3.75rem);          /* 40 → 60 */
  --fs-section: clamp(2rem, 1.721rem + 1.143vw, 2.75rem);          /* 32 → 44 */
  --fs-heading: clamp(1.625rem, 1.486rem + 0.571vw, 2rem);         /* 26 → 32 */
  --fs-sub: clamp(1.3125rem, 1.243rem + 0.286vw, 1.5rem);          /* 21 → 24 */
  --fs-standfirst: clamp(1.1875rem, 1.118rem + 0.286vw, 1.375rem); /* 19 → 22 */
  --fs-item: clamp(1.125rem, 1.079rem + 0.19vw, 1.25rem);          /* 18 → 20 */
  --fs-reading: clamp(1.125rem, 1.102rem + 0.095vw, 1.1875rem);    /* 18 → 19, essays */
  --fs-prose: clamp(1.0625rem, 1.039rem + 0.095vw, 1.125rem);      /* 17 → 18 */
  --fs-short: 1rem;                                                /* 16 */
  --fs-ui: clamp(0.875rem, 0.852rem + 0.095vw, 0.9375rem);         /* 14 → 15 */
  --fs-caption: clamp(0.84375rem, 0.833rem + 0.048vw, 0.875rem);   /* 13.5 → 14 */
  --fs-label: clamp(0.71875rem, 0.708rem + 0.048vw, 0.75rem);      /* 11.5 → 12 */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-padding-top: 92px; }
body { font-family: var(--sans); font-kerning: normal; font-optical-sizing: auto; text-rendering: optimizeLegibility; }

/* Phase 0: balanced headings; paragraphs avoid one-word last lines where supported */
h1, h2, h3, h4, .subtitle, .exhibit-title { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }

/* Serif roles */
#main .hero-copy h1 {
  font-family: var(--serif); font-size: var(--fs-display); font-weight: 300; line-height: 1.02; letter-spacing: -0.02em;
}
#main :is(.compact-hero h1, .split-intro h1, .market-hero-copy h1, .article-header h1, .home-research-copy h2, .launch-editorial > h2, .contact-close h2) {
  font-family: var(--serif); font-size: var(--fs-title); font-weight: 300; line-height: 1.06; letter-spacing: -0.015em;
}
#main :is(.section-heading h2, .home-why-heading h2, .overview-heading h2, .approach-editorial-heading h2, .market-evidence-intro h2,
  .market-paths-heading h2, .market-future-intro h2, .library-heading h2, section.section > h2) {
  font-family: var(--serif); font-size: var(--fs-section); font-weight: 400; line-height: 1.1; letter-spacing: -0.01em;
}
#main :is(.article-section h2, .contact-form h2, .market-question-intro h3, .contact-guidance h2, .venue-expansion-heading, .venue-beyond h3,
  .strategy-concept-diagram > figcaption strong) {
  font-family: var(--serif); font-size: var(--fs-heading); font-weight: 400; line-height: 1.18; letter-spacing: -0.005em;
}
#main :is(.research-card-copy h3, .related-research-card h3, .approach-grid h3, .risk-grid h3, .principles-grid h3, .home-why-grid h3,
  .market-question-detail h4, .venue-card h3, .venue-current h3, .person h3, .related-research h2, .strategy-concept-states h2,
  .completed-trade figcaption strong) {
  font-family: var(--serif); font-size: var(--fs-sub); font-weight: 500; line-height: 1.25; letter-spacing: 0;
}
#main .research-card--featured .research-card-copy h3 {
  font-size: var(--fs-section); font-weight: 400; line-height: 1.1; letter-spacing: -0.01em;
}
#main :is(.standards-grid h3, .contact-route-card strong, .exhibit-title, .milestone-title, .partner-name, .research-start li a) {
  font-family: var(--serif); font-size: var(--fs-item); font-weight: 500; line-height: 1.3; letter-spacing: 0;
}
#main :is(.hero-copy > p:not(.eyebrow), .split-intro > p:not(.eyebrow), .compact-hero > p:not(.eyebrow), .market-hero-copy > p:not(.eyebrow),
  .article-header .subtitle) {
  font-family: var(--serif); font-size: var(--fs-standfirst); font-weight: 400; line-height: 1.4; letter-spacing: 0;
}
#main .article-header .article-abstract {
  max-width: 64ch; color: var(--text-2); font-family: var(--serif); font-size: var(--fs-reading); line-height: 1.6;
}
#main :is(.article-section:not(.references) > p:not(.exhibit-formula), .article-section:not(.references) > ul > li,
  .article-section:not(.references) > ol > li) {
  max-width: 68ch; color: var(--text); font-family: var(--serif); font-size: var(--fs-reading); line-height: 1.65;
}
#main .article-takeaways li { color: var(--text); font-family: var(--serif); font-size: var(--fs-prose); line-height: 1.55; }
#main .article-takeaways li::before { color: var(--label); font-family: var(--serif); font-size: var(--fs-prose); line-height: 1.55; font-variant-numeric: lining-nums tabular-nums; }
#main :is(.launch-editorial-copy > p, .home-why-heading > p:not(.eyebrow), .section-heading > p:not(.eyebrow), .approach-editorial-heading > p:not(.eyebrow),
  .market-evidence-intro > p:not(.eyebrow), .market-future-intro > p:not(.eyebrow), .home-research-copy > p:not(.eyebrow):not(.home-research-meta),
  .research-card--featured .research-card-abstract) {
  color: var(--text-2); font-family: var(--serif); font-size: var(--fs-prose); line-height: 1.6;
}
#main .home-research-copy > p:not(.eyebrow):not(.home-research-meta) { color: var(--on-navy-2); }
#main .article-section .exhibit-formula { font-family: var(--serif); font-size: var(--fs-prose); }

/* Indices and serif numerals: lining, tabular */
#main :is(.risk-number, .home-why-number, .strategy-topic-number, .principles-grid article > span, .process-stage-number, .market-question-number,
  .market-evidence-list-number, .market-question-index a > span, .process-disclosure-number, .explorer-tabs button > span,
  .market-inspector-tabs button > span, .visual-node-number, .strategy-section-index a span, .scene-term-row > span,
  .process-explorer-tabs button > .explorer-tab-number) {
  font-family: var(--serif); font-variant-numeric: lining-nums tabular-nums;
}
#main :is(.market-evidence-note, .market-question-detail h4) { font-family: var(--serif); }

/* Fact strips: Public Sans values under labels */
#main :is(.overview-facts dd, .fund-structure-list dd, .status-grid span, .hero-facts dd) {
  color: var(--navy); font-family: var(--sans); font-size: var(--fs-short); font-weight: 500; line-height: 1.45;
  font-variant-numeric: lining-nums tabular-nums;
}

/* Sans roles */
#main :is(.approach-grid p, .principles-grid p, .risk-grid p, .home-why-grid p, .venue-card p, .venue-current p, .venue-beyond p,
  .person p:not(.person-role), .research-card-abstract, .market-question-copy, .market-context-note, .standards-grid p, .flow li,
  .branches span, .market-position-boundary span, .completed-trade-caveat, .completed-trade-note, .strategy-concept-diagram article p) {
  font-family: var(--sans); font-size: var(--fs-short); line-height: 1.6;
}
#main #important-information > p { font-family: var(--sans); font-size: var(--fs-short); line-height: 1.6; }
#main :is(.exhibit-table, .references li, .references > p, .article-byline, .person-role, .form-grid label > span, .research-scope,
  .milestone-text, .home-execution-principle p, .visible-email p, .evidence-content dd, .evidence-content dt, .research-section-nav a,
  .contact-path-list a, .market-contract-reference dd, .market-context-sequence li, .market-response-options span,
  .market-settlement-sequence li, .market-question-index b, .contact-guidance > a) {
  font-family: var(--sans); font-size: var(--fs-ui); line-height: 1.5;
}
#main :is(.article-byline, .person-role, .form-grid label > span, .contact-path-list a, .market-contract-reference dd, .market-context-sequence li,
  .market-response-options span, .market-settlement-sequence li, .market-question-index b, .contact-guidance > a, .home-execution-principle strong) {
  font-weight: 600;
}
#main .completed-trade-flow strong, #main .completed-trade-result strong {
  font-family: var(--sans); font-size: var(--fs-short); font-weight: 600; line-height: 1.4; font-variant-numeric: lining-nums tabular-nums;
}
/* Public Sans sets wider than Arial: tables run at caption size so columns keep their former breaks */
#main .exhibit-table { font-size: var(--fs-caption); }
#main .exhibit-table thead th { font-size: 0.8125rem; }
#main :is(.exhibit-chart text, .research-topic-svg text, .explorer-visual text, .concept-execution-diagram text) {
  font-family: var(--sans); font-variant-numeric: lining-nums tabular-nums;
}

/* Phase 0: captions, sources and notes at 13.5 px or more */
#main :is(.article-section .exhibit-source, .article-section .exhibit-note, .phc-research-art figcaption, .breadcrumb, .breadcrumb a, .breadcrumb span,
  .related-research-card p, .milestone-when, .milestone-when time, .completed-trade-flow small, .research-start span, .research-start p,
  .article-contents a, .article-contents span, .article-contents summary, .publication-record summary, .article-meta, .overview-date,
  .home-research-meta, .diagram-note, .form-notice, .form-grid small, .research-card-topics li, .strategy-concept-decisions li,
  .partner-role, .partner-cards a) {
  font-family: var(--sans); font-size: var(--fs-caption); line-height: 1.5;
}
#main :is(.article-section .exhibit-source, .article-section .exhibit-note, .article-meta, .milestone-when, .overview-date, .breadcrumb span) { color: var(--text-3); }
.site-footer :is(.footer-main p, .footer-main nav a, .footer-contacts a, .footer-bottom, .footer-bottom a, .footer-bottom span) {
  font-family: var(--sans); font-size: var(--fs-caption); line-height: 1.6;
}
.site-footer .footer-main > p { font-size: var(--fs-ui); }

/* Labels: one style */
#main :is(.eyebrow, .exhibit-label, .article-takeaways h2, .fund-structure-list dt, .overview-facts dt, .hero-facts dt, .overview-milestones h3,
  .status-grid b, .completed-trade-kicker, .home-execution-label, .market-question-step, .market-context-kicker, .market-context-label,
  .completed-trade-flow span, .contact-route-card span:not(.contact-route-action), .venue-logo-region, .venue-live-pill,
  figure.diagram > figcaption, .strategy-concept-diagram article > span, .strategy-concept-decisions > span) {
  font-family: var(--sans); font-size: var(--fs-label); font-weight: 600; line-height: 1.35; letter-spacing: 0.12em; text-transform: uppercase;
  font-variant-numeric: lining-nums tabular-nums;
}

/* Lining tabular figures where numbers are compared; dates in running meta stay proportional */
#main :is(.hero-facts, .status-grid, .fund-structure-list, .overview-facts, .milestone-when, .exhibit-table, .exhibit-table th,
  .exhibit-table td, .completed-trade-flow, .research-card-topics, .library-filter span) {
  font-variant-numeric: lining-nums tabular-nums;
}
#main :is(.article-meta, .article-meta time, .overview-date, .home-research-meta) { font-variant-numeric: lining-nums proportional-nums; }

/* Phase 0: figure legend legible on the figure's navy (ivory on #142338 is 14.0 : 1) */
#main .phc-research-art .phc-art-label-key li {
  color: var(--ivory); font-family: var(--sans); font-size: var(--fs-caption); font-weight: 500; line-height: 1.45;
}
#main .phc-research-art figcaption { color: var(--on-navy-2); }

/* Phase 0: footer disclosure at a readable measure */
.site-footer .footer-disclosure { max-width: 88ch; color: var(--on-navy-2); font-family: var(--sans); font-size: var(--fs-caption); line-height: 1.6; }

/* Links: resting underline at 45 %, a full hairline draws over it on hover or focus */
#main :is(.article-section, .article-takeaways, .home-why-sources, .article-end-links, .visible-email, .partner-cards) a:not(.button), #main a.text-link {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--link-rest), var(--link-rest));
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px, 100% 1px;
  transition: background-size 0.4s var(--ease), color 0.22s var(--ease);
}
#main :is(.article-section, .article-takeaways, .home-why-sources, .article-end-links, .visible-email, .partner-cards) a:not(.button):is(:hover, :focus-visible),
#main a.text-link:is(:hover, :focus-visible) {
  background-size: 100% 1px, 100% 1px;
}
#main a.text-link { font-family: var(--sans); font-size: var(--fs-short); font-weight: 600; }

/* Focus: 2 px ring, 3 px offset; gold on navy surfaces */
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible,
[tabindex]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.site-header, .site-footer, .home-hero, .editorial-home-hero, .page-home .home-research, .page-strategy .section-ink, .phc-research-art,
.strategy-concept-fill { --focus-ring: var(--gold); }
/* Two former navy bands are now paper: dark gold rings there (gold on paper is 1.6 : 1) */
.page-home .contact-close :focus-visible, .page-markets .market-paths :focus-visible { outline-color: var(--dark-gold); }

/* Header: nav at 15 px; the current page carries a 1 px gold rule */
.site-header .primary-nav a { font-family: var(--sans); font-size: var(--fs-ui); font-weight: 500; }
.site-header .primary-nav a:is([aria-current="page"], [data-section-current="true"]) {
  text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 0.5em;
}
.site-header .header-cta { font-family: var(--sans); font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.01em; }

/* Buttons: 48 px, square, 14 px semibold, 22 px sides; the arrow moves 4 px on hover */
.button {
  min-height: 48px; padding: 0 22px; border-radius: 0; font-family: var(--sans); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.01em;
  transition: background-color 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s var(--ease);
}
a.button:not([download])::after {
  width: 14px; height: 10px; margin-left: 12px; flex: none; background: currentColor; content: "";
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M0 5h12M8.5 1.5 12 5l-3.5 3.5' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M0 5h12M8.5 1.5 12 5l-3.5 3.5' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.22s var(--ease);
}
a.button:not([download]):is(:hover, :focus-visible)::after { transform: translateX(4px); }
.button-gold, .page-home .home-research-copy .button { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.button-gold:hover, .page-home .home-research-copy .button:hover { background: var(--gold-hover); border-color: var(--gold-hover); color: var(--navy); }
.button-navy { background: var(--navy); border-color: var(--navy); color: var(--white); }
.button-navy:hover { background: var(--navy-hover); border-color: var(--navy-hover); color: var(--white); }
.button-outline, .page-home .editorial-home-hero .button-outline { border-color: color-mix(in srgb, var(--ivory) 70%, var(--navy)); background: transparent; color: var(--ivory); }
.button-outline:hover, .page-home .editorial-home-hero .button-outline:hover { background: color-mix(in srgb, var(--ivory) 10%, transparent); color: var(--ivory); }
.button-copy { border-color: var(--muted); background: var(--white); color: var(--navy); }
.button-copy:hover { background: var(--paper); color: var(--navy); }

/* Fields: 48 px, muted border, white fill */
#main .form-grid :is(input, select, textarea) {
  min-height: 48px; border: 1px solid var(--muted); border-radius: 0; background-color: var(--white); color: var(--text);
  font-family: var(--sans); font-size: 1rem;
}

/* Page changes crossfade where supported; the header stays put */
@view-transition { navigation: auto; }
::view-transition-group(root) { animation-duration: 250ms; animation-timing-function: var(--ease); }
.site-header { view-transition-name: phc-header; }
::view-transition-group(phc-header), ::view-transition-old(phc-header), ::view-transition-new(phc-header) { animation: none; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  #main a, .button, a.button::after { transition: none; }
}

/* Three team profiles side by side at the existing desktop breakpoint. */
@media (min-width: 761px) {
  .page-home .people-grid,
  .page-firm .people-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .partner-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Compact team portraits without stretching them across the three-person grid. */
.page-home .leadership,
.page-firm .firm-leadership { padding-block: clamp(40px, 5vw, 64px); }

@media (min-width: 761px) {
  .page-home .leadership .people-grid { max-width: 1000px; gap: 32px 40px; }
  .page-home .person-compact > .person-portrait { width: min(100%, 240px); }
  .page-firm .people-list .person > img { width: min(100%, 240px); max-width: 240px; }
}

@media (max-width: 760px) {
  .page-firm .people-list .person > img { width: min(100%, 200px); max-width: 200px; }
}

