/* This site's tokens (design-kit deal: mint-pink-accounts, Host Grotesk) and page parts. */
:root {
  --p-bg: #f8f8f8; --p-surface: #eeeeee; --p-ink: #0a0a0a; --p-muted: #6a6a6a;
  --p-accent: #1f6b3a; --p-accent-ink: #ffffff; --p-action: #1f6b3a; --p-action-ink: #ffffff;
  --p-inv-bg: #0a0a0a; --p-inv-surface: #171717; --p-inv-ink: #f8f8f8; --p-inv-muted: #939393;
  --p-inv-accent: #1f6b3a; --p-inv-accent-ink: #ffffff; --p-inv-action: #1f6b3a; --p-inv-action-ink: #ffffff;
  --font-display: var(--hg), system-ui, sans-serif;
  --font-text: var(--hg), system-ui, sans-serif;
  --font-mono: var(--jb), ui-monospace, Consolas, monospace;
  --display-weight: 500;
  --display-tracking: -0.035em;
  --display-tracking-xl: -0.04em;
}

.hero__media > img { border-radius: var(--r-lg); }
.hero__kicker { font-weight: 500; }

/* The workbook */
.sheet-section .section-head { max-width: none; }
.xl { background: #fff; color: #1b1b1b; border: 1px solid #d4d4d4; border-radius: var(--r-lg); overflow: hidden; }
.xl-title { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-weight: 500; font-size: 14px; border-bottom: 1px solid #e2e2e2; }
.xl-formula { display: flex; align-items: stretch; height: 40px; border-bottom: 1px solid #d4d4d4; font: 13px/1.4 var(--font-mono); }
.xl-ref { display: flex; align-items: center; justify-content: center; width: 64px; flex: none; border-right: 1px solid #d4d4d4; }
.xl-formula code { display: block; min-width: 0; padding: 10px 12px; font: inherit; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.xl-body { height: 420px; }
.xl-grid { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; font-variant-numeric: tabular-nums; }
.xl-grid th, .xl-grid td { border: 1px solid #e2e2e2; padding: 0 10px; height: 30px; font-weight: 400; text-align: left; line-height: 1.2; overflow-wrap: anywhere; }
.xl-grid thead th, .xl-grid thead td, .xl-grid .xl-num { background: #f3f3f3; color: #5c5c5c; font-size: 13px; text-align: center; }
.xl-grid .xl-num { width: 44px; padding: 0; }
.xl-cols-4 thead th:nth-child(2) { width: 38%; }
.xl-cols-2 thead th:nth-child(2) { width: 62%; }
.xl-grid td.xl-value { text-align: right; }
.xl-grid td { cursor: cell; }
.xl-grid tbody td:hover { background: #f1f6f2; }
.xl-grid td.xl-head { background: #1f2a37; color: #fff; font-weight: 500; }
.xl-grid tbody td.xl-head:hover { background: #1f2a37; }
.xl-grid td.xl-input, .xl-grid tbody td.xl-input:hover { background: #fef3c7; }
.xl-grid td.xl-strong, .xl-grid td.xl-pos, .xl-grid td.xl-neg { font-weight: 500; }
.xl-grid td.xl-pos { color: #1f6b3a; }
.xl-grid td.xl-neg { color: #b3261e; }
.xl-grid td.xl-picked { outline: 2px solid #1f6b3a; outline-offset: -2px; }
.xl-tabs { display: flex; flex-wrap: wrap; background: #f3f3f3; border-top: 1px solid #d4d4d4; padding: 0 8px; }
.xl-tabs button { min-height: 44px; padding: 0 16px; border: 0; border-top: 2px solid transparent; background: transparent; color: #4a4a4a; font: 500 14px var(--font-text); cursor: pointer; transition: background-color .15s, color .15s; }
.xl-tabs button:hover { background: #e8e8e8; color: #0a0a0a; }
.xl-tabs button[aria-pressed="true"] { background: #fff; color: #1f6b3a; border-top-color: #1f6b3a; }

/* Rows beside a photograph */
.split { align-items: start; }
.split > .frame--photo { height: 480px; position: relative; overflow: hidden; border-radius: var(--r-lg); }
.rows__line { grid-column: 1; color: var(--ink); font-size: 16px; }

/* Buy */
.buy { display: grid; gap: 12px; }
.buy label { font-weight: 500; font-size: 14px; }
.buy input { width: 100%; height: 48px; padding: 0 14px; font: 16px var(--font-text); color: var(--ink); background: #fff; border: 1px solid #a8a8a8; border-radius: var(--r-sm); }
.buy input[aria-invalid="true"] { border-color: #b3261e; }
.buy-error { margin: 0; color: #b3261e; font-size: 14px; }
.buy .btn { width: 100%; justify-content: center; }
.buy .btn:disabled { cursor: wait; opacity: .8; }
.buy-note { margin: 0; font-size: 14px; color: var(--muted); }
.buy-note a { color: var(--ink); }
.files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; list-style: none; margin: 0; padding: 0; }
.files li { background: var(--p-bg); border-radius: var(--r-lg); padding: 32px; display: flex; flex-direction: column; gap: 16px; min-height: 400px; }
.files img { margin-bottom: auto; width: 96px; height: 96px; }
.files h3 { font-size: var(--t-card); overflow-wrap: anywhere; margin: 0; }
.files p { margin: 0; }

.faq-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.faq-two > .faq__item:nth-child(2) { padding-top: 0; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { min-height: 100svh; display: grid; place-items: center; color: var(--p-action); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Contact, policy, thank-you and 404 pages: the footer always sits at the bottom */
body:has(> main.page) { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
main.page { flex: 1 0 auto; display: flex; flex-direction: column; padding-top: calc(var(--nav) + 64px); padding-bottom: 96px; }
.page-head { display: grid; gap: 16px; padding-bottom: 48px; }
.page-head h1, .done h1 { font-size: var(--t-h2); margin: 0; }
.page-head p { margin: 0; font-size: var(--t-lead); color: var(--muted); }
.page-body { align-items: start; }
.page-nav { display: flex; flex-direction: column; }
.page-nav a { display: flex; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line); color: var(--muted); text-decoration: none; transition: color .2s, padding .2s; }
.page-nav a:hover { color: var(--ink); padding-left: 4px; }
.page-nav a[aria-current="page"] { color: var(--ink); font-weight: 500; border-bottom-color: var(--ink); }
.prose h2 { font-size: var(--t-lead); margin: 32px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 16px; max-width: 62ch; }
.prose > p a:not(.btn), .done p a { text-decoration: underline; text-underline-offset: 3px; }
.done { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 20px; }
.done p { margin: 0; max-width: 56ch; font-size: var(--t-lead); }
.tick { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--p-action); }

@media (max-width: 1023px) {
  .split > .span-5, .split > .span-6, .page-body > .page-nav, .page-body > .prose { grid-column: 1 / -1; }
  .split { row-gap: 32px; }
  .faq-two { grid-template-columns: minmax(0, 1fr); }
  .faq-two > .faq__item:nth-child(2) { padding-top: 16px; }
  .split > .frame--photo { height: 320px; }
  .page-nav { flex-direction: row; flex-wrap: wrap; column-gap: 24px; margin-bottom: 32px; }
}
@media (max-width: 639px) {
  .files { grid-template-columns: minmax(0, 1fr); }
  .files li { padding: 20px; gap: 8px; min-height: 0; }
  .files img { width: 56px; height: 56px; }
  .split > .frame--photo { height: 240px; }
  .xl-body { height: auto; min-height: 420px; }
  .xl-formula { height: auto; min-height: 40px; }
  .xl-formula code { white-space: normal; word-break: break-all; }
  .xl-grid { font-size: 13px; }
  .xl-grid th, .xl-grid td { padding: 0 4px; }
  .xl-grid .xl-num { width: 24px; }
  .xl-cols-4 thead th:nth-child(2) { width: 31%; }
  .xl-cols-2 thead th:nth-child(2) { width: 64%; }
  .xl-tabs button { padding: 0 10px; }
  main.page { padding-top: calc(var(--nav) + 40px); padding-bottom: 64px; }
}

.close__word { line-height: 1.05; }
/* The name across the page, line to line: sized by hand for these 16 characters. */
.close__word { font-size: calc((min(100vw - 2 * var(--gut), 1280px)) * .144); white-space: nowrap; }
/* Wider screens and shorter windows: the name is sized from its own column, and the close never
   shrinks below its content, so it cannot run over the links. */
@supports (container-type: inline-size) {
  .closing__cta { container-type: inline-size; }
  .close__word { font-size: 14.4cqw; }
}
footer.closing > .wrap { grid-template-rows: minmax(min-content, 1fr) auto; }

/* Inner pages have no phone action bar, and the button would not fit beside the name. */
@media (max-width: 639px) {
  body:has(> main.page) .nav:not(.is-open) .nav__actions { display: none; }
  body:has(> main.page) .nav:not(.is-open) .nav__actions + .nav__toggle { margin-left: auto; }
}

/* The statement */
.statement .mo-wh__text { font-size: var(--t-h1); line-height: 1.12; max-width: 1180px; }
@media (max-width: 639px) { .statement .mo-wh__text { font-size: 36px; } }

/* Sections are as tall as their content, with even air above and below (not a screen each), so a tall
   window never leaves empty bands. The first screen and the phone layout keep their own rules. */
@media (min-width: 640px) {
  main#top > section.section:not(.hero, .section--hero) {
    min-height: 0; height: auto; display: block;
    padding-block: clamp(72px, 8vw, 112px);
  }
  main#top > section.section:not(.hero, .section--hero) > .wrap { display: block; }
  main#top > #questions { padding-top: 0; }
  body footer.closing { height: auto; min-height: 0; padding-block: clamp(72px, 8vw, 112px) 32px; }
  body footer.closing > .wrap { height: auto; }
  .split { align-items: center; }
  .split > .frame--photo { height: clamp(360px, 38vw, 520px); }
  .files li { min-height: 0; }
  .files img { margin-bottom: 8px; }
  .statement .mo-wh__text { margin-block: 0; }
}
@media (min-width: 1024px) {
  main#top > .hero { height: auto; min-height: 0; padding-bottom: clamp(56px, 6vw, 96px); }
  main#top > .hero > .wrap { height: auto; display: block; }
  .hero--split .hero__grid { align-items: center; }
  .hero--split .hero__text { align-self: center; }
  .hero--split .hero__media { height: clamp(460px, 72svh, 660px); }
  .hero--split .hero__media > img { height: 100%; }
}
