/* MaxxFinders public site. One stylesheet, no external requests.
   Tokens follow apps/ios/MaxxFinders/Design/DesignTokens.swift and DESIGN.md ("The Proof Sheet"). */

:root {
  color-scheme: light dark;
  --brand-red: #c4121d;
  --tint: #3a6674;
  --tint-ink: #ffffff;
  --ink: #171717;
  --ink-2: #4a4a50;
  --bg: #ffffff;
  --surface: #f2f2f4;
  --rule: #d1d1d6;
  --frame: #171717;
  --tab: #171717;
  --tab-ink: #ffffff;
  --note-bg: #fff3cd;
  --note-ink: #4d3800;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: 16px;
  --max: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* The pinned #C4121D is about 3.1:1 on the dark ground; this lighter red passes 4.5:1. */
    --brand-red: #f0565d;
    --tint: #7faab8;
    --tint-ink: #111112;
    --ink: #f2f2f7;
    --ink-2: #b4b4ba;
    --bg: #111112;
    --surface: #1c1c1e;
    --rule: #3a3a3c;
    --frame: #8e8e93;
    --tab: #f2f2f7;
    --tab-ink: #111112;
    --note-bg: #3d3005;
    --note-ink: #ffe8a3;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.55;
  accent-color: var(--tint);
  caret-color: var(--tint);
  overflow-wrap: break-word;
}

::selection { background: var(--tint); color: var(--tint-ink); }

img, svg { display: block; max-width: 100%; height: auto; }

a {
  color: var(--tint);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--tint);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2rem); }
h3 { font-size: 1.1875rem; letter-spacing: -0.01em; }
p, ul, ol, dl { margin: 0; }
p + p, p + ul, ul + p, p + ol, ol + p { margin-top: 0.9em; }
ul, ol { padding-left: 1.3em; }
li + li { margin-top: 0.35em; }
strong { font-weight: 650; }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  background: var(--tint);
  color: var(--tint-ink);
  padding: 10px 14px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 8px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 48rem) {
  :root { --gutter: 32px; }
}

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: var(--brand-red);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3125rem;
  letter-spacing: -0.01em;
}
.brand svg { width: 44px; height: 22px; flex: none; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  list-style: none;
  padding: 0;
  margin: 0 -10px;
}
.site-nav li + li { margin-top: 0; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.site-nav a:hover { color: var(--tint); }
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

/* Phones: wordmark on its own row, then one nav row that scrolls sideways if it ever has to. */
@media (max-width: 40rem) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 0; padding-block: 6px 0; }
  .site-nav { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .site-nav ul { flex-wrap: nowrap; margin-inline: -8px; }
  .site-nav a { padding-inline: 8px; white-space: nowrap; font-size: 0.9375rem; }
}

/* Page sections */
main { display: block; }
.section { padding-block: clamp(48px, 6vw, 88px); }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { max-width: 44rem; margin-bottom: 32px; }
.section-head p { margin-top: 12px; color: var(--ink-2); }
.lede {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 38em;
}
.prose { max-width: 42rem; }
.wrap.prose { max-width: var(--max); }
.wrap.prose > * { max-width: 42rem; }
.link-row { display: inline-flex; align-items: center; min-height: 44px; }
main:focus { outline: none; }
.prose h2 { margin-top: 2.2em; margin-bottom: 0.6em; }
.prose h3 { margin-top: 1.6em; margin-bottom: 0.4em; }
.prose > :first-child { margin-top: 0; }

.page-head { padding-block: clamp(40px, 6vw, 72px) clamp(24px, 3vw, 40px); }
.page-head .lede { margin-top: 16px; }
.not-found { padding-block: clamp(64px, 10vw, 128px); }

/* Hero */
.hero .wrap {
  display: grid;
  gap: 40px;
  align-items: center;
}
.hero h1 { max-width: 14em; }
.hero .lede { margin-top: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--tint);
  background: var(--tint);
  color: var(--tint-ink);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.button.secondary { background: transparent; color: var(--tint); }
.fine { font-size: 0.9375rem; color: var(--ink-2); }
.actions + .fine { margin-top: 14px; }

@media (min-width: 60rem) {
  .hero .wrap { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 64px; }
}

/* Proof card: an annotated example of a sighting, not a screenshot */
.proof {
  position: relative;
  margin: 0;
  max-width: 24rem;
  justify-self: center;
  width: 100%;
  border: 1px solid var(--frame);
  background: var(--surface);
}
.proof-photo {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--frame);
  background: var(--bg);
}
.ill { width: 100%; height: 100%; }
.ill-line, .ill-handle { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ill-handle { stroke: var(--tint); stroke-width: 4; }
.ill-paper { fill: var(--surface); }
.ill-soft { fill: var(--surface); }
.ill-weave { fill: none; stroke: var(--tint); stroke-width: 1.5; opacity: 0.7; }
.tab {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--tab);
  color: var(--tab-ink);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 3px 8px;
  line-height: 1.4;
}
.proof-body { padding: 12px; }
.proof-body .item { font-weight: 650; font-size: 1.0625rem; }
.proof-meta { color: var(--ink-2); font-size: 0.9375rem; margin-top: 2px; }
.stock { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 0.8125rem; font-weight: 600; }
.stock-bar { display: grid; grid-template-columns: repeat(3, 22px); gap: 3px; }
.stock-bar i { height: 12px; border: 1px solid var(--frame); }
.stock-bar i.on { background: var(--tint); border-color: var(--tint); }
.proof figcaption {
  padding: 10px 12px;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--ink-2);
  background: var(--bg);
}

/* Three things the app does: a ruled definition list, not cards */
.roles {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--frame);
}
.roles > div {
  padding: 20px 0 24px;
  border-bottom: 1px solid var(--rule);
}
.roles dt { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.roles dd { margin: 8px 0 0; color: var(--ink-2); max-width: 36em; }
@media (min-width: 52rem) {
  .roles { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; }
  .roles > div { border-bottom: 0; }
  .roles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roles.two > div { border-bottom: 1px solid var(--rule); }
}

/* Numbered steps: the sequence is the information */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 0; max-width: 46rem; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 18px 0 20px 64px;
  border-top: 1px solid var(--rule);
  margin: 0;
}
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 20px;
  background: var(--tab);
  color: var(--tab-ink);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 3px 8px;
  line-height: 1.4;
}
.steps h3 { margin-bottom: 4px; }
.steps p { color: var(--ink-2); }

/* The one to three facts a section turns on, set apart from the detail below them */
.keyfacts { display: grid; border-top: 1px solid var(--frame); margin-bottom: 40px; }
.keyfacts > div { padding: 16px 0 18px; border-bottom: 1px solid var(--rule); }
.keyfacts dt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 30em;
}
.keyfacts dd { margin: 6px 0 0; color: var(--ink-2); }
@media (min-width: 52rem) {
  .keyfacts.two, .keyfacts.three { column-gap: 32px; }
  .keyfacts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .keyfacts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.split h3 + ul, .split h3 + p { margin-top: 8px; }
.split ul + h3, .split p + h3 { margin-top: 28px; }
.split + .callout { margin-top: 40px; }

/* Fee components */
.ledger { border-top: 1px solid var(--frame); max-width: 46rem; }
.ledger > div {
  display: grid;
  gap: 4px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.ledger dt { font-weight: 650; }
.ledger dd { margin: 0; color: var(--ink-2); }
.ledger .total dt { font-size: 1.125rem; }
@media (min-width: 40rem) {
  .ledger > div { grid-template-columns: 13rem minmax(0, 1fr); }
}

.split h2 + ul, .prose h2 + ul, .prose h2 + p { margin-top: 16px; }
.steps + .fine, .steps + .callout, .ledger + .callout, .callout + .fine { margin-top: 24px; }
.contact-block .fine { margin-top: 12px; }

.split { display: grid; gap: 40px; }
@media (min-width: 56rem) { .split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; } }
.split h3 { margin-bottom: 10px; }

.callout {
  border: 1px solid var(--frame);
  padding: 20px;
  max-width: 46rem;
}
.callout h2, .callout h3 { margin-bottom: 8px; }
.callout + .callout { margin-top: 16px; }

address { font-style: normal; line-height: 1.5; }
.contact-block { border: 1px solid var(--frame); padding: 20px; max-width: 26rem; }
.contact-block address { margin-top: 8px; }

/* Tables */
.table-wrap { overflow-x: auto; margin-block: 1.2em; border: 1px solid var(--rule); }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
th { font-weight: 650; background: var(--surface); }
tr:last-child td { border-bottom: 0; }
caption { text-align: left; padding: 10px 12px; font-weight: 650; caption-side: top; }

/* Legal pages */
/* Same palette as the counsel notes: both mark text that is not final. */
.draft-banner {
  background: var(--note-bg);
  color: var(--note-ink);
  border-block: 3px solid var(--note-ink);
}
.draft-banner .wrap { padding-block: 16px; }
.draft-banner p { margin: 0; max-width: 52rem; }
.draft-banner strong { font-size: 1.0625rem; font-weight: 700; }
.draft-banner p + p { margin-top: 4px; }

.legal { display: grid; gap: 32px; padding-bottom: 72px; }
.legal article { max-width: 68ch; min-width: 0; }
.legal article h2 { margin-top: 2em; margin-bottom: 0.5em; scroll-margin-top: 16px; font-size: 1.5rem; }
.legal article h3 { margin-top: 1.4em; margin-bottom: 0.3em; }
.legal article > h2:first-child { margin-top: 0; }
.legal article p + h3, .legal article ul + h3 { margin-top: 1.4em; }
.toc { font-size: 0.9375rem; }
.toc h2 { font-size: 1rem; letter-spacing: 0; margin-bottom: 8px; }
.toc ol { padding-left: 1.6em; }
.toc li + li { margin-top: 2px; }
.toc a { display: block; padding-block: 10px; color: var(--ink); text-decoration-color: var(--rule); }
.toc a:hover { color: var(--tint); }
.toc nav { border: 1px solid var(--rule); padding: 16px 16px 12px; background: var(--surface); }
@media (min-width: 64rem) {
  .legal { grid-template-columns: 16rem minmax(0, 1fr); gap: 56px; align-items: start; }
  .toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
}
.meta { color: var(--ink-2); font-size: 0.9375rem; margin-top: 12px; }

.counsel {
  display: block;
  margin-block: 0.9em;
  padding: 10px 14px;
  background: var(--note-bg);
  color: var(--note-ink);
  border: 1px dashed currentColor;
  font-size: 0.9375rem;
  font-weight: 600;
}
.counsel.inline { display: inline; margin: 0; padding: 1px 6px; }

.mark-tab { fill: var(--tab); }
.mark-ink { fill: var(--tab-ink); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--frame);
  background: var(--surface);
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.site-footer .wrap { padding-block: 40px 48px; display: grid; gap: 28px; }
.site-footer h2 { font-size: 1rem; letter-spacing: 0; color: var(--ink); margin-bottom: 8px; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li + li { margin-top: 0; }
.site-footer a { color: var(--ink); display: inline-flex; min-height: 44px; align-items: center; }
.site-footer address a { min-height: 0; display: inline; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 48rem) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.footer-fine { border-top: 1px solid var(--rule); padding-top: 20px; display: grid; gap: 8px; max-width: 60rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  a, .button { transition: color 120ms ease-out, background-color 120ms ease-out, text-decoration-thickness 120ms ease-out; }
}

@media print {
  :root {
    --ink: #000000; --ink-2: #222222; --bg: #ffffff; --surface: #ffffff; --rule: #999999;
    --frame: #000000; --tab: #000000; --tab-ink: #ffffff; --tint: #000000;
    --note-bg: #ffffff; --note-ink: #000000;
  }
  body { font-size: 11pt; line-height: 1.45; }
  .skip-link, .site-nav, .toc, .site-footer .footer-grid { display: none; }
  .site-header { border: 0; }
  .draft-banner { background: #ffffff; color: #000000; border: 2pt solid #000000; }
  .legal { display: block; padding: 0; }
  .legal article { max-width: none; }
  .legal article h2, .legal article h3 { break-after: avoid; }
  .table-wrap { overflow: visible; border: 0; }
  tr { break-inside: avoid; }
  a { color: #000000; }
  .legal article a[href^="http"]::after, .legal article a[href^="mailto:"]::after { content: " <" attr(href) ">"; font-size: 0.85em; }
}
