/* Avan Partners, v3
   One typeface (Helvetica Neue), two colour directions set on <html data-palette>.
   A = red dominant, B = cream dominant. Contrast pairs are listed in README.md. */

:root {
  /* White site. Every background is white; text is only red or black.
     --cream and --blush are kept as names so the rules below are unchanged. */
  --red: #B80614;
  --red-dark: #8F0510;
  --cream: #FFFFFF;
  --blush: #FFFFFF;
  --ink: #1A1A1A;
  --grey: #1A1A1A;
  --white: #FFFFFF;

  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 90rem;
  --narrow: 42rem;
  --header-h: 4rem;

  /* Page body, same in both directions */
  --page-bg: var(--cream);
  --page-fg: var(--ink);
  --page-muted: var(--grey);
  --accent: var(--red);
  --rule: #E6E6E6;
}

/* A. Red dominant */
[data-palette="red"] {
  --hdr-bg: var(--red);
  --hdr-fg: var(--cream);
  --hdr-wm-avan: var(--cream);
  --hdr-wm-partners: rgba(250, 246, 240, .82);
  --hdr-focus: var(--cream);
  --hero-bg: var(--red);
  --hero-fg: var(--cream);
  --hero-muted: rgba(250, 246, 240, .82);
  --hero-focus: var(--cream);
  --foot-bg: var(--red);
  --foot-fg: var(--cream);
  --foot-muted: rgba(250, 246, 240, .82);
  --foot-rule: rgba(250, 246, 240, .35);
  --foot-focus: var(--cream);
}

/* B. Cream dominant */
[data-palette="cream"] {
  --hdr-bg: var(--cream);
  --hdr-fg: var(--ink);
  --hdr-wm-avan: var(--red);
  --hdr-wm-partners: var(--ink);
  --hdr-focus: var(--red);
  --hero-bg: var(--cream);
  --hero-fg: var(--red);
  --hero-muted: var(--ink);
  --hero-focus: var(--red);
  --foot-bg: var(--cream);
  --foot-fg: var(--red);
  --foot-muted: var(--ink);
  --foot-rule: var(--red);
  --foot-focus: var(--red);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--page-fg);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--red-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
mark.ph { background: #FFF1A8; color: var(--ink); padding: 0 .2em; border-radius: 2px; font-size: .9em; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--cream); padding: .75rem 1rem; text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--cream); }
main:focus { outline: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--hdr-bg); color: var(--hdr-fg);
  border-bottom: 1px solid color-mix(in srgb, var(--hdr-fg) 14%, transparent);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.site-header :focus-visible { outline-color: var(--hdr-focus); }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 36px; width: auto; }
.wordmark {
  font-size: .95rem; letter-spacing: .2em; font-weight: 400; white-space: nowrap;
  line-height: 1;
}
.site-header .wm-avan { color: var(--hdr-wm-avan); }
.site-header .wm-partners { color: var(--hdr-wm-partners); }

/* Show the logo that suits the background */
[data-palette="red"] .site-header .brand-logo-red,
[data-palette="red"] .site-footer .brand-logo-red,
[data-palette="cream"] .site-header .brand-logo-cream,
[data-palette="cream"] .site-footer .brand-logo-cream { display: none; }

/* Hamburger menu on every screen size. One button in the bar, the five tabs in a panel */
.header-actions { display: flex; align-items: center; gap: 1rem; }
.header-cta {
  color: var(--hdr-fg); text-decoration: none; font-size: .9rem; white-space: nowrap;
  border: 1px solid var(--hdr-fg); border-radius: 999px; padding: .45rem 1.1rem;
}
.header-cta:hover { background: var(--hdr-fg); color: var(--hdr-bg); text-decoration: none; }
.menu-toggle {
  background: none; border: 0; color: var(--hdr-fg); cursor: pointer;
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.menu-toggle svg { width: 26px; height: 26px; }
.menu-toggle .i-close { display: none; }
.menu-open .menu-toggle .i-open { display: none; }
.menu-open .menu-toggle .i-close { display: block; }
.site-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; top: var(--header-h);
  background: var(--hdr-bg); overflow-y: auto; overscroll-behavior: contain;
  border-top: 1px solid color-mix(in srgb, var(--hdr-fg) 14%, transparent);
}
.menu-open .site-nav { display: flex; flex-direction: column; }
html:has(.menu-open) { overflow: hidden; }
.site-nav ul { list-style: none; margin: 0 auto; padding: clamp(1.5rem, 5vh, 3rem) var(--gutter) .5rem; max-width: var(--max); width: 100%; }
.site-nav li { border-top: 1px solid color-mix(in srgb, var(--hdr-fg) 14%, transparent); }
.site-nav li:first-child { border-top: 0; }
.nav-link {
  display: block; color: var(--hdr-fg); text-decoration: none;
  font-size: clamp(1.4rem, 3vw, 2rem); padding: .7rem 0;
}
.nav-link:hover { color: var(--hdr-fg); text-decoration: underline; text-underline-offset: .2em; }
.nav-link[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.nav-note { max-width: var(--max); width: 100%; margin: auto auto 0; padding: 2rem var(--gutter) 2rem; font-size: .9rem; color: var(--hdr-fg); opacity: .8; }
.nav-cta-mobile { display: none; }
@media (max-width: 640px) {
  .header-cta { display: none; }
  .nav-cta-mobile { display: block; }
  .wordmark { font-size: .82rem; letter-spacing: .16em; }
}

/* Simple tabs inside a page */
.service-list { list-style: none; margin: 0; padding: 0; counter-reset: svc; }
.service-list li { counter-increment: svc; padding: 1rem 0; border-top: 1px solid var(--rule); font-size: 1.25rem; display: grid; grid-template-columns: 3.5rem 1fr; }
.service-list li:last-child { border-bottom: 1px solid var(--rule); }
.service-list li::before { content: counter(svc, decimal-leading-zero); color: var(--red); }
.two-cols { display: grid; gap: 2.5rem; }
@media (min-width: 820px) { .two-cols { grid-template-columns: 1fr 1fr; } }
.ps { color: var(--page-muted); font-size: .95rem; }
.landing-buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.5rem; }
.landing .small-line { font-size: clamp(1rem, 1.4vw, 1.1rem); margin: 1rem 0 0; max-width: 44rem; }
.landing .button { background: var(--cream); color: var(--red); border-color: var(--cream); }
.landing .button-ghost { background: transparent; color: var(--cream); border-color: var(--cream); }
.landing .button-ghost:hover { background: var(--cream); color: var(--red); }
.legal-line { font-size: .85rem; opacity: .85; max-width: 46rem; }

/* ---------- Landing ---------- */
.page-home { background: var(--hero-bg); }
.landing {
  background: var(--hero-bg); color: var(--hero-fg);
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex; align-items: center;
  padding: clamp(4rem, 12vh, 9rem) var(--gutter);
}
.landing-inner { max-width: var(--max); margin: 0 auto; width: 100%; }
.landing h1 {
  margin: 0; font-weight: 400;
  /* Sized so each of the four sentences sits on one line from ~1100px up */
  font-size: clamp(2rem, 4.3vw, 4.25rem);
  line-height: 1.15; letter-spacing: -.02em;
}
.landing .line { display: block; }
.landing .line + .line { margin-top: .3em; }
.landing-link {
  display: inline-block; margin-top: clamp(2rem, 5vh, 3.5rem);
  color: var(--hero-fg); font-size: 1.05rem; text-decoration: underline; text-underline-offset: .3em;
}
.landing-link:hover { color: var(--hero-fg); text-decoration-thickness: 2px; }
.landing :focus-visible { outline-color: var(--hero-focus); }

@media (prefers-reduced-motion: no-preference) {
  .anim .landing .line, .anim .landing-link { opacity: 0; animation: rise .5s cubic-bezier(.2, .7, .2, 1) forwards; }
  .anim .landing .line:nth-child(1) { animation-delay: .05s; }
  .anim .landing .line:nth-child(2) { animation-delay: .17s; }
  .anim .landing .line:nth-child(3) { animation-delay: .29s; }
  .anim .landing .line:nth-child(4) { animation-delay: .41s; }
  .anim .landing-link { animation-delay: .5s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(.35em); } to { opacity: 1; transform: none; } }

/* Review-only palette switch */
.palette-toggle {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60;
  display: flex; align-items: center; gap: .25rem;
  background: var(--white); color: var(--ink); border: 1px solid var(--ink);
  border-radius: 999px; padding: .25rem; font-size: .8rem; box-shadow: 0 4px 18px rgba(0,0,0,.12);
}
.pt-label { padding: 0 .5rem 0 .65rem; color: var(--grey); text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; }
.palette-toggle button {
  font: inherit; border: 0; background: none; color: var(--ink); border-radius: 999px;
  padding: .45rem .8rem; cursor: pointer; min-height: 36px;
}
.palette-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--white); }

/* ---------- Inner pages ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: calc(var(--narrow) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.page-hero {
  background: var(--hero-bg); color: var(--hero-fg);
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem);
}
[data-palette="cream"] .page-hero { border-bottom: 1px solid var(--red); }
.page-hero :focus-visible { outline-color: var(--hero-focus); }
.page-hero a { color: var(--hero-fg); }
.page-hero h1 { font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 400; letter-spacing: -.02em; max-width: 16em; margin-bottom: .45em; }
.page-hero .lede { font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.5; max-width: 38em; color: var(--hero-muted); margin: 0; }
.eyebrow { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 1.25rem; }
.page-hero .eyebrow { color: var(--hero-muted); }

.jump { background: var(--page-bg); border-bottom: 1px solid var(--rule); position: sticky; top: var(--header-h); z-index: 20; }
.jump ul { list-style: none; margin: 0 auto; padding: 0 var(--gutter); max-width: var(--max); display: flex; gap: 1.5rem; overflow-x: auto; scrollbar-width: none; }
.jump a { display: block; padding: .9rem 0; font-size: .9rem; color: var(--page-fg); text-decoration: none; white-space: nowrap; }
.jump a:hover { color: var(--red); }

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; border-bottom: 1px solid var(--rule); }
.section:last-of-type { border-bottom: 0; }
.section-head { display: grid; gap: .6rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head .eyebrow {
  color: var(--red); margin: 0; font-weight: 700; line-height: 1.05;
  font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: .02em;
}
.section h2 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); font-weight: 400; max-width: 30em; margin: 0; }
.section h3 { font-size: 1.3rem; font-weight: 500; }
.body-cols { display: grid; gap: 1rem 3rem; }
@media (min-width: 900px) { .body-cols { grid-template-columns: 16rem minmax(0, 1fr); } .body-cols > .body { grid-column: 2; } }
.body { max-width: 44rem; }
.body h3 { margin-top: 2.5rem; }
.body > h3:first-child, .body > p + h3 { margin-top: 2rem; }
.body table { margin-bottom: .5rem; }
.body > p:first-child, .intro { font-size: 1.2rem; line-height: 1.55; }
.muted { color: var(--page-muted); }

.list-plain { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.list-plain li { padding: .8rem 0; border-top: 1px solid var(--rule); }
.list-plain li:last-child { border-bottom: 1px solid var(--rule); }

/* Two tracks */
.tracks { display: grid; gap: 1.5rem; }
@media (min-width: 820px) { .tracks { grid-template-columns: 1fr 1fr; } }
.track { background: var(--white); border: 1px solid var(--rule); border-top: 4px solid var(--red); padding: clamp(1.5rem, 3vw, 2.5rem); scroll-margin-top: 8rem; }
.track h3 { font-size: 1.6rem; font-weight: 400; margin-bottom: .35em; }
.track .track-for { color: var(--page-muted); margin-bottom: 1.5rem; }
.track dl { margin: 0; }
.track dt { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-top: 1.25rem; }
.track dd { margin: .3rem 0 0; }
.track ul { margin: .3rem 0 0; padding-left: 1.1rem; }

/* Numbered steps */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 0 1rem; padding: 1.5rem 0; border-top: 1px solid var(--rule); }
.steps > li:last-child { border-bottom: 1px solid var(--rule); }
.steps > li::before { content: counter(step, decimal-leading-zero); font-size: 1.5rem; color: var(--red); line-height: 1.2; }
.steps h3 { margin: 0 0 .25rem; font-size: 1.2rem; }
.steps .step-meta { font-size: .85rem; color: var(--page-muted); margin: 0 0 .5rem; letter-spacing: .02em; }
.steps p:last-child { margin-bottom: 0; }

/* Refusals */
.refusals { list-style: none; padding: 0; margin: 0; display: grid; gap: 0 3rem; }
@media (min-width: 820px) { .refusals { grid-template-columns: 1fr 1fr; } }
.refusals li { padding: 1.25rem 0; border-top: 1px solid var(--rule); }
.refusals strong { display: block; font-weight: 500; margin-bottom: .25rem; }
.refusals span { color: var(--page-muted); }

.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
table { border-collapse: collapse; width: 100%; font-size: .98rem; }
th, td { text-align: left; vertical-align: top; padding: .8rem 1rem .8rem 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 500; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }

/* Callout */
main { overflow-x: clip; }
.callout {
  background: var(--hero-bg); color: var(--hero-fg);
  margin: 2rem calc(50% - 50vw) 0;
  padding: clamp(2.5rem, 6vw, 4.5rem) calc(50vw - 50%);
}
.callout + .body-cols { margin-top: clamp(3rem, 6vw, 4.5rem); }
/* A callout that ends a section closes it, no gap or rule under it */
.section:has(> .wrap > .callout:last-child) { padding-bottom: 0; border-bottom: 0; }
[data-palette="cream"] .callout { border-block: 1px solid var(--red); }
.callout p { font-size: clamp(1.4rem, 2.8vw, 2.2rem); line-height: 1.3; max-width: 26em; margin: 0; }
.callout .callout-note { font-size: 1rem; margin-top: 1.25rem; color: var(--hero-muted); }

/* FAQ */
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.2rem 2.5rem 1.2rem 0; position: relative; font-size: 1.1rem; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 1rem; font-size: 1.5rem; font-weight: 300; color: var(--red); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 1.4rem; max-width: 44rem; }
.faq-group { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin: 2.5rem 0 .75rem; font-weight: 400; }
.faq-group:first-child { margin-top: 0; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 48px;
  background: var(--red); color: var(--cream); border: 1px solid var(--red);
  padding: .8rem 1.4rem; border-radius: 999px; text-decoration: none; font: inherit; font-size: 1rem; cursor: pointer;
}
.button:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--cream); text-decoration: none; }
.button-ghost { background: transparent; color: var(--red); }
.button-ghost:hover { background: var(--red); color: var(--cream); }
.callout .button, .page-hero .button { background: var(--cream); color: var(--red); border-color: var(--cream); }
[data-palette="cream"] .callout .button, [data-palette="cream"] .page-hero .button { background: var(--red); color: var(--cream); border-color: var(--red); }
.cta-band { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.cta-band h2 { margin-bottom: .5em; }
.cta-band p { max-width: 36rem; }

/* People */
.people { display: grid; gap: 2.5rem; }
@media (min-width: 820px) { .people { grid-template-columns: 1fr 1fr; } }
.person { scroll-margin-top: 6rem; }
.photo {
  aspect-ratio: 4 / 5; background: var(--blush); color: var(--red-dark); display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem; font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; max-width: 16rem;
}
.person h3 { font-size: 1.6rem; font-weight: 400; margin-bottom: .2em; }
.person .role { color: var(--red); margin-bottom: 1rem; }

.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: 0 3rem; counter-reset: pr; }
@media (min-width: 820px) { .principles { grid-template-columns: 1fr 1fr; } }
.principles li { counter-increment: pr; padding: 1.5rem 0; border-top: 1px solid var(--rule); }
.principles li::before { content: counter(pr, upper-roman); display: block; color: var(--red); margin-bottom: .5rem; }
.principles strong { display: block; font-size: 1.2rem; font-weight: 500; margin-bottom: .3rem; }

/* ---------- Intelligence ---------- */
.filters { display: grid; gap: 1rem; margin-bottom: 2.5rem; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.filter-label { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--page-muted); min-width: 5.5rem; }
.chip {
  font: inherit; font-size: .92rem; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  border-radius: 999px; padding: .45rem .95rem; cursor: pointer; min-height: 40px;
}
.chip:hover { border-color: var(--red); color: var(--red); }
.chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: var(--cream); }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.card[hidden] { display: none; }
.card-link {
  display: flex; flex-direction: column; gap: .6rem; height: 100%;
  background: var(--white); border: 1px solid var(--rule); padding: 1.5rem; text-decoration: none; color: var(--ink);
  transition: border-color .15s;
}
.card-link:hover { border-color: var(--red); color: var(--ink); text-decoration: none; }
.card-link:hover .card-title { color: var(--red); }
.card-meta { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.card-title { font-size: 1.3rem; line-height: 1.25; }
.card-summary { color: var(--grey); font-size: .98rem; }
.card-time { margin-top: auto; font-size: .85rem; color: var(--grey); }
.empty { border: 1px dashed var(--grey); padding: 2.5rem; text-align: center; color: var(--grey); }
.empty[hidden] { display: none; }
.result-count { font-size: .9rem; color: var(--grey); margin-bottom: 1rem; }

.article-head { padding-top: clamp(3rem, 7vw, 5rem); padding-bottom: 2rem; }
.crumb { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.article-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 400; letter-spacing: -.02em; }
.article-head .lede { font-size: 1.3rem; line-height: 1.45; color: var(--ink); }
.article-meta { font-size: .88rem; color: var(--grey); border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: 1.5rem; }
.prose { font-size: 1.12rem; line-height: 1.7; padding-bottom: 2rem; }
.prose h2 { font-size: 1.6rem; font-weight: 500; margin-top: 2.2em; }
.prose h3 { font-size: 1.25rem; font-weight: 500; margin-top: 1.8em; }
.prose h2, .prose h3 { margin-bottom: .6em; }
.prose > :first-child { margin-top: 0; }
.prose ol, .prose ul { padding-left: 1.3rem; margin: 0 0 1.25em; }
.prose li { margin-bottom: .55em; }
.prose blockquote { margin: 1.5em 0; padding: .25em 0 .25em 1.25em; border-left: 3px solid var(--red); font-size: 1.2rem; }
.prose table { font-size: .95rem; }
.article-foot { padding-bottom: clamp(3rem, 7vw, 5rem); }
.article-cta { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 1.25rem 0; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.pager a { text-decoration: none; color: var(--ink); display: block; padding: 1rem 0; }
.pager a:hover { color: var(--red); }
.pager span { display: block; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: .3rem; }
.pager-next { text-align: right; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) { .form-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.segmented { display: inline-flex; border: 1px solid var(--ink); border-radius: 999px; padding: .25rem; margin-bottom: 2rem; flex-wrap: wrap; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span { display: block; padding: .6rem 1.2rem; border-radius: 999px; cursor: pointer; }
.segmented input:checked + span { background: var(--red); color: var(--cream); }
.segmented input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset[disabled] { display: none; }
[data-contact-form][data-type="other"] .form-actions { display: none; }
fieldset[data-for="other"] h2 { font-size: 1.5rem; margin-bottom: .75rem; }
legend { padding: 0; }
.field { display: grid; gap: .4rem; margin-bottom: 1.25rem; }
.field-row { display: grid; gap: 0 1.25rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
label, .label { font-size: .95rem; font-weight: 500; }
.hint { font-weight: 400; color: var(--grey); font-size: .88rem; }
input[type="text"], input[type="email"], input[type="url"], select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--white);
  border: 1px solid #8A8A8A; border-radius: 4px; padding: .75rem .85rem; width: 100%; min-height: 48px;
}
textarea { min-height: 8rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--red); outline-offset: 1px; border-color: var(--red); }
.form-note { font-size: .88rem; color: var(--grey); }
.form-status { margin-top: 1rem; }
.form-success { background: var(--white); border: 1px solid var(--rule); border-top: 4px solid var(--red); padding: 2rem; }
.form-success[hidden] { display: none; }
.aside-block { border-top: 1px solid var(--rule); padding: 1.25rem 0; }
.aside-block h2 { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--red); font-weight: 400; margin: 0 0 .5rem; }
.aside-block p { margin: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; max-width: 36rem; }
.inline-form .field { flex: 1 1 16rem; margin: 0; }

/* Legal and small pages */
.draft-flag { background: #FFF1A8; color: var(--ink); padding: .75rem 1rem; font-weight: 500; margin-bottom: 2rem; }
.legal h2 { font-size: 1.4rem; font-weight: 500; margin-top: 2em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--foot-bg); color: var(--foot-fg); }
[data-palette="cream"] .site-footer { border-top: 2px solid var(--red); }
.site-footer :focus-visible { outline-color: var(--foot-focus); }
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 6vw, 4.5rem) var(--gutter) 2.5rem;
  display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}
@media (min-width: 960px) { .footer-inner { grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr; } }
.site-footer .brand-logo { height: 48px; }
.site-footer .wm-avan { color: var(--foot-fg); }
.site-footer .wm-partners { color: var(--foot-muted); }
[data-palette="cream"] .site-footer .wm-avan { color: var(--red); }
[data-palette="cream"] .site-footer .wm-partners { color: var(--ink); }
.footer-desc { margin: 1.25rem 0 .5rem; max-width: 22rem; color: var(--foot-fg); font-size: .98rem; }
.footer-city { color: var(--foot-muted); font-size: .95rem; margin: 0; }
.footer-head { font-size: .75rem; letter-spacing: .14em; white-space: nowrap; text-transform: uppercase; font-weight: 400; color: var(--foot-muted); margin: .4rem 0 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a { color: var(--foot-fg); text-decoration: none; }
.site-footer a:hover { color: var(--foot-fg); text-decoration: underline; }
.footer-bar {
  max-width: var(--max); margin: 0 auto; padding: 1.25rem var(--gutter) 1.75rem;
  border-top: 1px solid var(--foot-rule);
  display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; align-items: center;
  font-size: .88rem; color: var(--foot-muted);
}
.footer-bar p { margin: 0; }
.footer-bar ul { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer-bar li { margin: 0; }
/* Give the bottom bar room so the review toggle never covers it */
body:has(.palette-toggle) .footer-bar { padding-bottom: 4.5rem; }
.footer-col ul + .footer-head { margin-top: 1.75rem; }
.landing .line-small { font-size: max(.42em, 1.1rem); line-height: 1.35; letter-spacing: -.01em; margin-top: 1.4rem; opacity: .9; }
.landing-link { display: inline-block; margin-top: 1.75rem; }

/* Button movement. The lead button breathes while idle,
   swell on hover with a little spring, and press in on click. */
.button, .header-cta { position: relative; isolation: isolate; will-change: transform; }
@media (prefers-reduced-motion: no-preference) {
  .button.beckon, .header-cta { animation: avan-breathe 2.8s ease-in-out infinite; }
  .button, .header-cta {
    transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease, background-color .2s, color .2s, border-color .2s;
  }
  .header-cta { animation-delay: 1.4s; }
  .button:hover, .button:focus-visible, .header-cta:hover, .header-cta:focus-visible {
    animation: none; transform: scale(1.09); box-shadow: 0 10px 28px -8px rgba(0, 0, 0, .35);
  }
  .button:active, .header-cta:active { transform: scale(.95); transition-duration: .08s; }
  .button:disabled { animation: none; transform: none; box-shadow: none; }
}
@keyframes avan-breathe {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.05); }
  60% { transform: scale(1.035); }
}
@media (prefers-reduced-motion: reduce) {
  .button:hover, .header-cta:hover { transform: scale(1.04); }
}
/* Cream buttons on red stay cream when they swell */
.landing .button:not(.button-ghost):hover, .callout .button:not(.button-ghost):hover, .page-hero .button:not(.button-ghost):hover {
  background: var(--cream); color: var(--red); border-color: var(--cream);
}
[data-palette="cream"] .callout .button:not(.button-ghost):hover, [data-palette="cream"] .page-hero .button:not(.button-ghost):hover {
  background: var(--red-dark); color: var(--cream); border-color: var(--red-dark);
}

/* Header button on phones: short label, always visible */
.cta-short { display: none; }
@media (max-width: 640px) {
  .header-cta { display: inline-flex; padding: .4rem .95rem; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
}

/* Section menu on phones: fade the edge while more items are off screen */
.jump ul.more { -webkit-mask-image: linear-gradient(to right, #000 80%, transparent); mask-image: linear-gradient(to right, #000 80%, transparent); }

/* Contact tabs on phones: three equal boxes instead of a wrapping pill */
@media (max-width: 640px) {
  .segmented { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; border-radius: 14px; }
  .segmented span { border-radius: 10px; padding: .6rem .4rem; text-align: center; font-size: .9rem; line-height: 1.2; height: 100%; display: flex; align-items: center; justify-content: center; }
}

/* Cookie choice bar */
.consent-bar { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60; max-width: 40rem; margin: 0 auto;
  background: var(--page-bg); color: var(--page-fg); border: 1px solid var(--ink); border-radius: 12px;
  padding: 1rem 1.25rem; display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; box-shadow: 0 12px 32px -12px rgba(0,0,0,.35); }
.consent-bar[hidden] { display: none; }
.consent-bar p { margin: 0; flex: 1 1 18rem; font-size: .92rem; }
.consent-actions { display: flex; gap: .6rem; }
.consent-actions .button { min-height: 40px; padding: .5rem 1.1rem; font-size: .92rem; }

/* FAQ questions are h3 for search engines, styled like the summary text */
.faq-q { font: inherit; margin: 0; display: inline; }
.landing .definition { font-size: clamp(1rem, 1.4vw, 1.1rem); margin: 2.5rem 0 0; max-width: 44rem; opacity: .92; }
.byline { font-size: .9rem; color: var(--grey); margin-top: .75rem; }

/* Let's chat. One button opens a founder or investor choice, then the matching form */
.chat-pick { position: relative; display: inline-block; }
.chat-toggle .chev { width: 12px; height: 12px; transition: transform .2s; }
.chat-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.chat-menu {
  position: absolute; left: 0; top: calc(100% + .5rem); z-index: 30; min-width: 100%;
  display: grid; gap: .25rem; padding: .4rem; border-radius: 14px;
  background: var(--page-bg); border: 1px solid var(--accent); box-shadow: 0 12px 32px -12px rgba(0,0,0,.35);
}
.chat-menu[hidden] { display: none; }
.chat-menu button {
  font: inherit; text-align: left; white-space: nowrap; cursor: pointer; min-height: 44px;
  padding: .6rem 1rem; border: 0; border-radius: 10px; background: transparent; color: var(--accent);
}
.chat-menu button:hover, .chat-menu button[aria-pressed="true"] { background: var(--accent); color: var(--page-bg); }
.chat-form { margin-top: 2rem; max-width: 44rem; }
.chat-form[hidden] { display: none; }
.chat-legend { font-size: 1.3rem; font-weight: 500; padding: 0; margin-bottom: 1.25rem; }
.chat .form-note[hidden] { display: none; }
.chat .form-success { margin-top: 2rem; max-width: 44rem; }

/* On the home page the form sits on the hero colours */
.landing-chat { margin-top: 2.5rem; text-align: left; }
.landing .chat-form label, .landing .chat-legend { color: var(--hero-fg); }
.landing .chat .hint, .landing .chat .form-note { color: var(--hero-muted); }
.landing .chat-form a { color: var(--hero-fg); }
.landing .chat .form-success { color: var(--page-fg); }
.landing .chat-menu { background: var(--hero-bg); border-color: var(--hero-fg); }
.landing .chat-menu button { color: var(--hero-fg); }
.landing .chat-menu button:hover, .landing .chat-menu button[aria-pressed="true"] { background: var(--hero-fg); color: var(--hero-bg); }
.landing .chat-form .button { background: var(--hero-fg); color: var(--hero-bg); border-color: var(--hero-fg); }

/* Home: "Venture diagnostics" opens its definition on hover, tap or focus */
.landing h1 .term {
  text-decoration: underline dotted; text-decoration-thickness: .06em; text-underline-offset: .14em;
  cursor: help; outline-offset: 6px;
}
.landing .vd { position: relative; }
.landing .vd .definition {
  position: absolute; left: 0; top: calc(100% + .75rem); z-index: 20; margin: 0; max-width: 40rem;
  background: var(--white); color: var(--ink); border: 1px solid var(--red); padding: 1.25rem 1.5rem; border-radius: 12px;
  box-shadow: 0 16px 40px -16px rgba(0,0,0,.45); font-size: 1.02rem; line-height: 1.55; opacity: 1;
  visibility: hidden; transform: translateY(-.35rem); transition: opacity .18s, transform .18s, visibility .18s;
}
.landing .vd .definition { opacity: 0; }
.landing .vd:has(.term:hover) .definition, .landing .vd:has(.term:focus) .definition, .landing .vd .definition:hover {
  opacity: 1; visibility: visible; transform: none;
}
/* A sent form hides itself, even where a layout rule sets display */
[data-avan-form][hidden] { display: none; }
/* The booking button stands out on the success card, on the home page too */
.chat .form-success .button, .chat .form-success .button:hover,
.landing .chat .form-success .button:not(.button-ghost):hover {
  background: var(--accent); color: var(--page-bg); border-color: var(--accent);
}

/* White site: no filled colour blocks. Every button is red text on white with a red outline,
   and fills red only while hovered or pressed. */
.button, .header-cta { background: var(--white) !important; color: var(--red) !important; border-color: var(--red) !important; }
.button:hover, .button:focus-visible, .header-cta:hover, .header-cta:focus-visible { background: var(--red) !important; color: var(--white) !important; }
.photo { border: 1px solid var(--rule); }

/* ---------- Home, centred hero ---------- */
.page-home .landing { align-items: center; text-align: center; padding-top: clamp(3rem, 8vh, 6rem); padding-bottom: clamp(3rem, 8vh, 6rem); }
.page-home .hero-inner { max-width: 72rem; }
.hero-eyebrow {
  margin: 0 0 clamp(1.5rem, 4vh, 2.5rem); color: var(--red);
  font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
}
.hero-eyebrow .term { text-decoration: underline dotted; text-underline-offset: .35em; cursor: help; outline-offset: 4px; }
.page-home .vd { display: inline-block; }
.page-home .landing .vd .definition { left: 50%; top: calc(100% - .75rem); transform: translate(-50%, -.35rem); width: min(36rem, 88vw); text-align: left; letter-spacing: 0; text-transform: none; }
.page-home .landing .vd:has(.term:hover) .definition, .page-home .landing .vd:has(.term:focus) .definition, .page-home .landing .vd .definition:hover { transform: translate(-50%, 0); }
.vd:has(.hero-eyebrow .term:hover) .definition, .vd:has(.hero-eyebrow .term:focus) .definition { opacity: 1; visibility: visible; }

.page-home .landing h1 {
  color: var(--ink); font-weight: 500; letter-spacing: -.03em; line-height: 1.08;
  font-size: clamp(2.1rem, 3.75vw, 4.1rem); text-wrap: balance;
}
.page-home .landing h1 .line + .line { margin-top: .08em; }
.page-home .landing h1 .u {
  color: var(--red); text-decoration: underline; text-decoration-color: var(--red);
  text-decoration-thickness: .06em; text-underline-offset: .14em;
}

/* Three steps joined by a hairline */
.path {
  list-style: none; margin: clamp(2.5rem, 7vh, 4.5rem) auto 0; padding: 0; max-width: 54rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; position: relative; counter-reset: none;
}
.path::before {
  content: ""; position: absolute; top: 1.15rem; left: 16.66%; right: 16.66%; height: 1px;
  background: linear-gradient(to right, var(--red) 0 100%); opacity: .35;
}
.path li { position: relative; display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.path-n {
  width: 2.3rem; height: 2.3rem; border-radius: 50%; border: 1px solid var(--red); background: var(--white);
  display: grid; place-items: center; color: var(--red); font-size: .72rem; letter-spacing: .06em; position: relative;
  margin-bottom: .55rem;
}
.path-t { font-size: 1.15rem; font-weight: 500; color: var(--ink); letter-spacing: -.01em; }
.path-c { font-size: .9rem; line-height: 1.45; color: var(--ink); max-width: 15rem; text-wrap: balance; }
.path li:last-child .path-c { color: var(--red); }
@media (max-width: 640px) {
  .path { grid-template-columns: 1fr; gap: 1.6rem; max-width: 20rem; }
  .path::before { top: 1.15rem; bottom: 1.15rem; left: 50%; right: auto; width: 1px; height: auto; display: none; }
}

/* The one button, centred, with its form opening beneath */
.page-home .landing-chat { margin-top: clamp(2.5rem, 6vh, 3.5rem); text-align: center; }
.page-home .chat-menu { left: 50%; transform: translateX(-50%); text-align: left; }
.page-home .chat-form, .page-home .chat .form-success { margin-left: auto; margin-right: auto; text-align: left; }
.hero-foot { margin: clamp(2rem, 5vh, 3rem) auto 0; max-width: 34rem; font-size: .95rem; color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .anim .hero-eyebrow, .anim .path li, .anim .landing-chat, .anim .hero-foot { opacity: 0; animation: rise .55s cubic-bezier(.2, .7, .2, 1) forwards; }
  .anim .landing h1 .line:nth-child(1) { animation-delay: .1s; }
  .anim .landing h1 .line:nth-child(2) { animation-delay: .22s; }
  .anim .path li:nth-child(1) { animation-delay: .4s; }
  .anim .path li:nth-child(2) { animation-delay: .5s; }
  .anim .path li:nth-child(3) { animation-delay: .6s; }
  .anim .landing-chat { animation-delay: .72s; }
  .anim .hero-foot { animation-delay: .8s; }
}

/* Partner portraits: round, with a thin red ring and a white gap */
.portrait {
  width: clamp(11rem, 22vw, 15rem); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  padding: 6px; border: 1.5px solid var(--red); background: var(--white); margin-bottom: 1.5rem;
}
.person-link { margin-top: .5rem; font-size: .95rem; }

/* Home: two pills to the founder and investor pages */
.page-home .hero-pills { justify-content: center; margin-top: clamp(2.5rem, 6vh, 3.5rem); gap: 1rem; }
.page-home .hero-pills .button { min-width: 11.5rem; justify-content: center; }

/* Let's chat on For Startups and For Investors: the form opens under its own button */
.chat-band { border-top: 1px solid var(--rule); }
.chat-band .chat { margin-top: 1.75rem; }
.chat-band .chat-form, .chat-band .form-success { max-width: 44rem; }
.chat-band { scroll-margin-top: calc(var(--header-h) + 3.25rem); }

/* Room between a form's submit button and the text under it */
[data-avan-form] button[type="submit"] + p { margin-top: 1.5rem; }
.form-actions .form-note + .form-note { margin-top: .5rem; }

/* Data pages: who said the quote */
.prose blockquote p { margin: 0; }
.prose blockquote footer { margin-top: .5rem; font-size: .9rem; color: var(--grey); }

/* Resources page */
.resource-list li { padding: .9rem 0; border-top: 1px solid var(--rule); margin: 0; }
.resource-list li:last-child { border-bottom: 1px solid var(--rule); }
.resource-list a { font-size: 1.15rem; }
