/* Skip link — matches /fund/ and the privacy pages. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--color-surface); color: var(--color-text);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm); text-decoration: none;
}
.skip-link:focus { left: var(--space-4); top: var(--space-2); }

/* Layout only. Every value is a design-system token. */
*, *::before, *::after { box-sizing: border-box; }

body {
  /* The darker brand token meets AA for small text on the light surface. */
  --color-text-brand: var(--color-primary-press);
  margin: 0;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-prose);
  letter-spacing: var(--tracking-sans);
  -webkit-font-smoothing: antialiased;
}

html, body { max-width: 100%; overflow-x: clip; }
.wrap { max-width: 1140px; margin-inline: auto; padding-inline: var(--space-5); }

/* ---- nav: mirrors the home page so moving between them is seamless ----
   Three columns with equal 1fr edges, so the links sit centred in the bar
   rather than drifting right. The home page does the same; when this was a
   flex row with margin-left:auto the two bars disagreed. */
.site-nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.nav-inner {
  max-width: 1140px; margin-inline: auto; padding-inline: var(--space-5);
  height: 76px; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: var(--space-6);
}
.logo { width: 96px; color: var(--color-primary); flex: 0 0 auto; display: block; padding: 4px 0; }
.logo-mark {
  display: block; width: 100%; aspect-ratio: 552.756 / 127.559;
  background: currentColor;
  -webkit-mask: url("/assets/images/Runway_pop.svg") center / contain no-repeat;
  mask: url("/assets/images/Runway_pop.svg") center / contain no-repeat;
}
.nav-links {
  display: flex; align-items: center; gap: var(--space-6);
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  font-family: var(--font-mono); font-size: var(--text-label);
  text-transform: uppercase; letter-spacing: var(--tracking-mono);
  color: var(--color-text-muted); text-decoration: none; white-space: nowrap;
  transition: color .2s;
  display: inline-flex; align-items: center; min-height: 24px; min-width: 24px; justify-content: center;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-primary-press); }
/* A flex item will not shrink below its content unless min-width is cleared. */
.nav-inner > nav { min-width: 0; }

.nav-toggle {
  display: none; background: none; justify-self: end;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm);
  width: 40px; height: 40px; color: var(--color-text); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 1px; background: currentColor;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* Same breakpoint and the same dropdown shape as the home page, so the
   navigation does not change form when a reader moves between the two.
   The bar stays sticky here as well: this is a long reference page, and a
   reader deep in it should not have to scroll back to the top to leave.
   Sticky is a positioned value, so .site-nav is still the containing block
   for the absolutely-positioned dropdown, and its z-index: 10 stacking
   context keeps the open panel painted above the answers. */
@media (max-width: 900px) {
  /* Opaque: the bar now passes over content, and backdrop-filter cannot be
     relied on to do the work on mobile. */
  .site-nav { background: var(--color-surface); }
  .nav-links {
    position: absolute; top: 76px; left: 0; right: 0;
    background: var(--color-surface);
    flex-direction: column; align-items: flex-start;
    padding: var(--space-5) var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--color-border);
    display: none; gap: var(--space-5);
    /* Opened with the bar stuck partway down a long page, the panel can run
       past the fold, so it scrolls itself and the last link stays reachable. */
    max-height: calc(100vh - 76px);
    max-height: calc(100dvh - 76px);
    overflow-y: auto; overscroll-behavior: contain;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-flex; }
}

/* ---- masthead ---- */
.masthead { padding-block: var(--space-9) var(--space-7); }
.masthead h1 {
  font-family: var(--font-display); font-weight: var(--weight-regular);
  font-size: clamp(var(--text-h3), 6.4vw, var(--text-display-m));
  line-height: var(--leading-display); letter-spacing: var(--tracking-display);
  margin: var(--space-4) 0 0; max-width: 20ch;
}
.masthead .lede {
  font-size: var(--text-body-l); color: var(--color-text-muted);
  max-width: 58ch; margin: var(--space-5) 0 0;
}

.service-page { padding-bottom: var(--space-8); }
.service-page .masthead h1 { margin-top: 0; }
@media (max-width: 600px) {
  .service-page .masthead { padding-block: var(--space-7) var(--space-6); }
}
.service-section {
  max-width: 68ch;
  padding-block: var(--space-6);
  border-top: var(--border-hairline) solid var(--color-border);
}
.service-section h2 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-size: clamp(var(--text-title), 4.4vw, var(--text-h2));
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-display);
}
.service-section p { margin: 0 0 var(--space-4); }
.service-section p:last-child { margin-bottom: 0; }
.service-section a:not(.rw-button) {
  color: var(--color-text-brand);
  text-underline-offset: var(--border-icon);
}
.service-section ul {
  padding-inline-start: var(--space-5);
  margin: 0 0 var(--space-5);
}
.service-section li + li { margin-top: var(--space-2); }
.service-section address { font-style: normal; }
.service-section .service-action { margin-block: var(--space-4); }
.service-section .service-action .rw-button { min-height: 44px; }
.legal-documents .legal-document {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.service-section .legal-entity {
  margin-top: var(--space-5);
  color: var(--color-text-muted);
  font-size: var(--text-small);
}

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--color-surface-deep); outline-offset: 2px; border-radius: var(--radius-sm);
}
