@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --hl: #E3ED35;
  --hl-deep: #BEC72C;
  --ink: #16170C;
  --ink-2: #4D4E42;
  --on-hl-2: #3D410E;
  --on-ink-2: #BDBEB0;
  --rule: #DADCD3;
  --rule-ink: #3A3B2F;
  --tint: #F4F5ED;
  --white: #FFFFFF;
  --link-blue: #1F55B5;
  --gutter: clamp(20px, 4vw, 56px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-kerning: normal;
}
.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }

h1, h2, h3 { text-wrap: balance; margin: 0; }
p { text-wrap: pretty; }

a { color: inherit; text-decoration: underline; text-decoration-color: var(--hl-deep); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { background: var(--hl); text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Header, on the highlighter band */
.site-header { background: var(--hl); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-stretch: 112%; font-size: 1.0625rem; }
.brand:hover { background: none; }
.brand img { width: 30px; height: 30px; display: block; }
.nav { display: flex; gap: clamp(14px, 2.4vw, 30px); }
.nav a { text-decoration: none; font-weight: 500; font-size: 0.9375rem; padding: 2px 0; border-bottom: 2px solid transparent; }
.nav a:hover { background: none; border-bottom-color: var(--ink); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }

/* Hero */
.hero { background: var(--hl); padding: clamp(40px, 7vw, 96px) 0 clamp(40px, 5vw, 64px); }
.hero h1 {
  font-size: clamp(2.5rem, 6.6vw, 5.75rem);
  line-height: 0.98;
  font-weight: 760;
  font-stretch: 112%;
  letter-spacing: -0.025em;
  max-width: 16ch;
}
.hero .lede { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.5; color: var(--on-hl-2); max-width: 54ch; margin: clamp(20px, 2.6vw, 32px) 0 clamp(24px, 3vw, 36px); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.button { display: inline-block; background: var(--ink); color: var(--white); text-decoration: none; font-weight: 650; font-stretch: 108%; padding: 14px 22px; border-radius: 2px; }
.button:hover { background: #2C2E1A; }
.hero .actions a:not(.button) { text-decoration-color: var(--ink); font-weight: 500; }
.hero .actions a:not(.button):hover { background: var(--ink); color: var(--hl); }

/* The sheet */
.show { background: linear-gradient(var(--hl) 0 140px, var(--white) 140px); padding-bottom: clamp(56px, 8vw, 112px); }
.sheet { margin: 0; background: var(--white); border: 1.5px solid var(--ink); font-size: 0.90625rem; line-height: 1.3; box-shadow: 0 34px 60px -34px rgba(61, 65, 14, .55); }
.fx { display: grid; grid-template-columns: 76px 44px 1fr; border-bottom: 1px solid var(--rule); }
.fx > span { padding: 10px 12px; white-space: nowrap; }
.fx .name { border-right: 1px solid var(--rule); color: var(--ink-2); }
.fx .label { border-right: 1px solid var(--rule); color: var(--ink-2); font-style: italic; text-align: center; }
.fx .formula { font-weight: 500; display: flex; align-items: center; gap: 12px; }
.grid-scroll { overflow-x: auto; }
.sheet table { border-collapse: collapse; width: 100%; min-width: 860px; font-variant-numeric: tabular-nums; }
.sheet th, .sheet td { border: 1px solid var(--rule); padding: 11px 14px; text-align: left; white-space: nowrap; font-weight: 400; }
.sheet tr > :first-child { border-left: 0; }
.sheet tr > :last-child { border-right: 0; }
.sheet thead th { background: var(--tint); color: var(--ink-2); text-align: center; font-size: 0.8125rem; padding: 5px 14px; border-top: 0; }
.sheet .row { background: var(--tint); color: var(--ink-2); text-align: center; width: 46px; font-size: 0.8125rem; padding-inline: 8px; }
.sheet .num { text-align: right; }
.sheet .key { color: var(--link-blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.sheet .heads td:not(.row) { background: var(--ink); color: var(--white); font-weight: 650; border-color: var(--ink); }
.sheet .heads .cell { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flt { flex: none; width: 16px; height: 16px; border: 1px solid #8A8C7C; border-radius: 2px; position: relative; }
.flt::after { content: ""; position: absolute; left: 3px; top: 5px; border: 4px solid transparent; border-top: 5px solid var(--white); border-bottom: 0; }
.sheet .total td:not(.row) {
  font-weight: 700;
  border-bottom: 0;
  background: linear-gradient(var(--hl), var(--hl)) no-repeat left / 100% 100%;
  animation: swipe .28s cubic-bezier(.22, 1, .36, 1) both;
}
.sheet .total td:nth-child(2) { animation-delay: .50s; }
.sheet .total td:nth-child(3) { animation-delay: .60s; }
.sheet .total td:nth-child(4) { animation-delay: .78s; }
.sheet .total td:nth-child(5) { animation-delay: .90s; }
.sheet .total td:nth-child(6) { animation-delay: .98s; }
.sheet .total td:nth-child(7) { animation-delay: 1.06s; }
.sheet .total .row { border-bottom: 0; }
@keyframes swipe { from { background-size: 0 100%; } to { background-size: 100% 100%; } }
@media (prefers-reduced-motion: reduce) { .sheet .total td:not(.row) { animation: none; } }
.sheet td.selected { position: relative; outline: 2px solid var(--ink); outline-offset: -2px; }
.sheet td.selected::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 8px; height: 8px; background: var(--ink); border: 1.5px solid var(--white); }
.tabs { display: flex; align-items: stretch; border-top: 1px solid var(--rule); background: var(--tint); overflow-x: auto; }
.tabs span { padding: 9px 18px; color: var(--ink-2); border-right: 1px solid var(--rule); white-space: nowrap; font-size: 0.8125rem; }
.tabs span.on { background: var(--white); color: var(--ink); font-weight: 700; box-shadow: inset 0 3px 0 var(--ink); }
.tabs .note { border: 0; display: flex; align-items: center; padding-block: 0; }

/* Numbered markers that tie the sheet to its legend */
.n { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--hl); border: 1.5px solid var(--ink); color: var(--ink); font-size: 0.75rem; font-weight: 700; font-style: normal; line-height: 1; font-variant-numeric: tabular-nums; }

.legend { list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px clamp(24px, 4vw, 56px); }
.legend li { display: grid; grid-template-columns: 22px 1fr; column-gap: 14px; align-items: start; align-content: start; }
.legend .n { margin-top: 3px; }
.legend h3 { font-size: 1.125rem; font-weight: 700; font-stretch: 108%; line-height: 1.3; }
.legend p { grid-column: 2; margin: 6px 0 0; color: var(--ink-2); font-size: 1rem; }

/* What else */
.more { padding-bottom: clamp(64px, 9vw, 128px); }
.more h2, .flow-band h2 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); font-weight: 740; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.05; }
.spec { margin: clamp(24px, 3vw, 40px) 0 0; border-top: 2px solid var(--ink); }
.spec div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 8px 40px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.spec dt { font-size: clamp(1.1875rem, 1.8vw, 1.5rem); font-weight: 650; font-stretch: 108%; line-height: 1.25; }
.spec dd { margin: 0; color: var(--ink-2); max-width: 60ch; }

/* Where the data goes */
.flow-band { background: var(--ink); color: var(--white); padding: clamp(64px, 9vw, 120px) 0 clamp(56px, 7vw, 96px); }
.flow-band .intro { color: var(--on-ink-2); font-size: 1.1875rem; max-width: 52ch; margin: 16px 0 0; }
.flow { display: flex; align-items: stretch; margin: clamp(32px, 4vw, 56px) 0 0; }
.node { flex: 1 1 0; border: 1.5px solid var(--white); padding: 20px 22px; min-width: 0; }
.node strong { display: block; font-size: 1.1875rem; font-weight: 700; font-stretch: 108%; line-height: 1.25; }
.node span { display: block; color: var(--on-ink-2); font-size: 0.9375rem; margin-top: 4px; }
.node.work { background: var(--hl); border-color: var(--hl); color: var(--ink); }
.node.work span { color: var(--on-hl-2); }
.hop { flex: 0 0 clamp(36px, 7vw, 96px); position: relative; }
.hop::before { content: ""; position: absolute; left: 6px; right: 8px; top: 50%; height: 2px; margin-top: -1px; background: var(--hl); }
.hop::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-top: 2px solid var(--hl); border-right: 2px solid var(--hl); transform: rotate(45deg); }
.nowhere { margin: 16px 0 0; border: 1.5px dashed #7B7D6C; padding: 18px 22px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 6px 40px; color: var(--on-ink-2); }
.nowhere strong { color: var(--white); font-weight: 650; font-stretch: 108%; text-decoration: line-through; text-decoration-color: var(--hl); text-decoration-thickness: 2px; }
.scopes { margin: clamp(40px, 5vw, 64px) 0 0; }
.scopes h3 { font-size: 1.1875rem; font-weight: 700; font-stretch: 108%; margin-bottom: 8px; }
.scopes dl { margin: 0; border-top: 1px solid var(--rule-ink); }
.scopes dl div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 4px 40px; padding: 14px 0; border-bottom: 1px solid var(--rule-ink); }
.scopes dt { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9375rem; color: var(--hl); }
.scopes dd { margin: 0; color: var(--on-ink-2); }
.flow-band .after { margin: 28px 0 0; }
.flow-band a:hover, .site-footer a:hover { background: var(--hl); color: var(--ink); }

/* Document pages */
.masthead { background: var(--hl); padding: clamp(28px, 5vw, 64px) 0 clamp(32px, 4vw, 52px); }
.masthead h1 { font-size: clamp(2.25rem, 5.2vw, 4.25rem); line-height: 1; font-weight: 760; font-stretch: 112%; letter-spacing: -0.025em; }
.masthead .meta { color: var(--on-hl-2); margin: 16px 0 0; font-weight: 500; }
.doc-grid { display: grid; grid-template-columns: 220px minmax(0, 68ch); gap: clamp(32px, 6vw, 88px); padding: clamp(36px, 5vw, 64px) 0 clamp(72px, 9vw, 128px); }
.side { font-size: 0.9375rem; align-self: start; position: sticky; top: 28px; }
.side h2 { font-size: 0.9375rem; font-weight: 700; margin-bottom: 10px; }
.side ol { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.side li { border-bottom: 1px solid var(--rule); }
.side li a { display: block; padding: 9px 0; text-decoration: none; color: var(--ink-2); }
.side li a:hover { color: var(--ink); }
.side p { margin: 0; color: var(--ink-2); border-top: 2px solid var(--ink); padding-top: 10px; }
.doc > :first-child { margin-top: 0; }
.doc h2 { font-size: 1.4375rem; font-weight: 700; font-stretch: 108%; line-height: 1.25; margin: 48px 0 12px; scroll-margin-top: 24px; }
.doc p, .doc li { color: var(--ink-2); }
.doc strong { color: var(--ink); font-weight: 650; }
.doc ul, .doc ol { padding-left: 22px; }
.doc figure { margin: 28px 0; }
@media (min-width: 1340px) { .doc figure { margin-right: -220px; } }
.doc figure img { display: block; width: 100%; height: auto; border: 1.5px solid var(--ink); }
.doc figcaption { margin-top: 10px; font-size: 0.9375rem; color: var(--ink-2); }
.doc li { margin: 8px 0; }
.doc li::marker { color: var(--ink); }
.doc code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.875em; background: var(--tint); padding: 2px 6px; border-radius: 2px; color: var(--ink); }
.doc .summary { font-size: clamp(1.1875rem, 1.9vw, 1.4375rem); line-height: 1.45; color: var(--ink); font-weight: 500; margin: 0 0 8px; }
.doc .caps { font-size: 0.9375rem; }

/* FAQ */
details { border-bottom: 1px solid var(--rule); }
details:first-of-type { border-top: 2px solid var(--ink); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 16px 0; font-weight: 650; color: var(--ink); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 400; font-size: 1.375rem; line-height: 1; }
details[open] summary::after { content: "\2212"; }
summary:hover { background: var(--tint); }
details p { margin: 0 0 18px; max-width: 60ch; }

/* Footer */
.site-footer { background: var(--ink); color: var(--on-ink-2); font-size: 0.9375rem; padding: 0 0 40px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; border-top: 1px solid var(--rule-ink); padding-top: 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { text-decoration: none; color: var(--white); }
body:not(.home) .site-footer { padding-top: 0; }
body:not(.home) .site-footer .wrap { border-top: 0; padding-top: 36px; }

@media (max-width: 860px) {
  .spec div, .nowhere, .scopes dl div { grid-template-columns: 1fr; }
  .flow { flex-direction: column; }
  .hop { flex-basis: 44px; }
  .hop::before { left: 50%; right: auto; top: 6px; bottom: 8px; width: 2px; height: auto; margin: 0 0 0 -1px; }
  .hop::after { right: auto; left: 50%; top: auto; bottom: 8px; margin: 0 0 0 -5px; transform: rotate(135deg); }
  .doc-grid { grid-template-columns: 1fr; }
  .side { position: static; }
  .side.toc { display: none; }
}
@media (max-width: 520px) {
  .brand span { display: none; }
  .show { background: linear-gradient(var(--hl) 0 90px, var(--white) 90px); }
}
