/* THE SITE is a mint: stock paper, black ink, one foil gold. A word is struck
 * as a coin and the money behind it is its size. Two faces: Besley (a
 * Clarendon, the letter of banknotes and share certificates) for anything
 * said aloud, Hanken Grotesk for reading and for figures. No second theme. */

@font-face {
  font-family: 'Besley';
  src: url('/assets/besley.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/assets/hanken-grotesk.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #fafaf7;
  --ink: #16130d;
  --ink-soft: #3a352b;
  --graphite: #6b665c;
  --rule: #dedacf;
  --foil: #a87b0a;       /* marks, rims, rules */
  --foil-ink: #856107;   /* the same gold, dark enough to read as text */
  --bullion: #e8c24a;    /* the face of a coin, and the one button */
  --bullion-deep: #ddb437;

  --display: 'Besley', Clarendon, Georgia, 'Times New Roman', serif;
  --text: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gutter: 24px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--text);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration-color: var(--foil); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
a:hover { text-decoration-color: var(--ink); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; }
b, strong { font-weight: 650; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 6.6vw, 5.25rem); line-height: 1; letter-spacing: -0.022em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.125rem); line-height: 1.08; letter-spacing: -0.016em; }
h3 { font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.005em; }

.wrap { width: 100%; max-width: 1168px; margin: 0 auto; padding: 0 var(--gutter); }
.quiet { color: var(--graphite); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------------------------------------------------------------- top bar */
.top { padding: 22px 0; }
.top-row { display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.375rem/1 var(--display); letter-spacing: -0.01em; text-decoration: none; }
.brand svg { width: 24px; height: 24px; }
.top-links { display: none; gap: 30px; margin-left: auto; font-size: 1rem; }
.top-links a { text-decoration: none; }
.top-links a:hover { text-decoration: underline; text-decoration-color: var(--foil); }
.top .btn { margin-left: auto; }
@media (min-width: 860px) {
  .top-links { display: flex; }
  .top .btn { margin-left: 0; }
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 24px; border: 0; border-radius: 4px;
  background: var(--bullion); color: var(--ink);
  font: 650 1.0625rem/1 var(--text); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 140ms var(--ease);
}
.btn:hover { background: var(--bullion-deep); }
.btn:active { transform: translateY(1px); }
.btn-small { height: 42px; padding: 0 18px; font-size: 1rem; }
.btn-plain { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-plain:hover { background: var(--ink); color: var(--paper); }
.btn[disabled] { opacity: 0.3; cursor: default; }
.btn[disabled]:hover { background: transparent; color: var(--ink); }

/* ---------------------------------------------------------------- hero: the mint */
.hero { padding: 48px 0 104px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero-lead { margin-top: 28px; max-width: 30em; font-size: 1.25rem; line-height: 1.5; color: var(--ink-soft); }
.mint { display: flex; margin-top: 40px; max-width: 30rem; }
.mint input {
  flex: 1; min-width: 0; height: 60px; padding: 0 18px;
  border: 1.5px solid var(--ink); border-right: 0; border-radius: 4px 0 0 4px;
  background: #fff; color: var(--ink);
  font: 500 1.375rem/1 var(--display);
}
.mint input::placeholder { color: var(--graphite); opacity: 0.75; }
.mint input:focus-visible { outline-offset: -4px; outline-width: 1.5px; }
.mint .btn { height: 60px; border-radius: 0 4px 4px 0; box-shadow: inset 0 0 0 1.5px var(--ink); }
.mint-note { margin-top: 14px; max-width: 30rem; min-height: 3.2em; font-size: 1rem; line-height: 1.5; color: var(--graphite); }
.mint-note a { color: var(--ink); white-space: nowrap; }

.hero-art { width: 100%; max-width: 540px; justify-self: center; }
#mint-svg { width: 100%; height: auto; overflow: visible; }
.hero-art figcaption { margin-top: 16px; min-height: 3em; font-size: 0.9375rem; line-height: 1.5; color: var(--graphite); }
.mint-link { stroke: var(--ink); stroke-opacity: 0.26; stroke-linecap: round; transition: stroke-opacity 160ms var(--ease); }
.mint-link.on { stroke-opacity: 1; }
.coin { cursor: default; outline: none; }
.coin-face { fill: var(--bullion); stroke: var(--foil); stroke-width: 1.25; }
.coin-reed { fill: none; stroke: var(--foil); stroke-width: 3; stroke-dasharray: 1 2.6; opacity: 0.55; }
.coin-rim { fill: none; stroke: var(--foil); stroke-width: 0.75; }
.coin-word { font-family: var(--display); font-weight: 600; fill: var(--ink); }
.coin.on .coin-face, .coin:focus-visible .coin-face { stroke: var(--ink); stroke-width: 2; }
.coin-ring { fill: none; stroke: var(--foil); stroke-width: 1.5; opacity: 0; }
.coin.struck .coin-body { animation: strike 420ms var(--ease) both; }
.coin.struck .coin-ring { animation: ring 620ms var(--ease) both; }
@keyframes strike {
  from { transform: scale(1.4); opacity: 0; }
  55% { transform: scale(0.96); opacity: 1; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes ring {
  from { transform: scale(1); opacity: 0.9; }
  to { transform: scale(1.55); opacity: 0; }
}

@media (min-width: 960px) {
  .hero { padding: 72px 0 128px; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 64px; }
  .hero-art { justify-self: end; }
}

/* ---------------------------------------------------------------- sections */
.section { padding: 104px 0; border-top: 1px solid var(--rule); }
.split { display: grid; gap: 36px; }
.head-wide { max-width: 41rem; margin-bottom: 56px; }
.sub { margin-top: 20px; max-width: 34em; color: var(--ink-soft); }
.body > p + p { margin-top: 18px; }
.body > p { max-width: 34em; }
@media (min-width: 920px) {
  .split { grid-template-columns: 5fr 7fr; column-gap: 72px; }
  .split > .head { position: sticky; top: 32px; align-self: start; }
}

/* the founder's sentence */
.quote { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--ink); }
.quote p { max-width: 24em; font: 500 1.625rem/1.34 var(--display); letter-spacing: -0.008em; text-indent: -0.42em; }
.quote footer { margin-top: 16px; font-size: 0.9375rem; color: var(--graphite); }

/* ---------------------------------------------------------------- the two layers */
.layer { display: grid; gap: 28px; padding: 40px 0; border-top: 1px solid var(--rule); }
.layer:first-child { padding-top: 0; border-top: 0; }
.layer:last-child { padding-bottom: 0; }
.layer p { margin-top: 12px; max-width: 30em; color: var(--ink-soft); }
.layer figcaption { margin-bottom: 14px; font-size: 0.9375rem; color: var(--graphite); }
.layer figcaption b { font-family: var(--display); font-weight: 600; color: var(--ink); }
@media (min-width: 700px) { .layer { grid-template-columns: 1fr 1fr; column-gap: 48px; align-items: start; } }
.ranks li { display: grid; grid-template-columns: 5.6em 1fr auto; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.ranks li:first-child { border-top: 1px solid var(--rule); }
.rank-name { font: 500 1.0625rem/1.2 var(--display); }
.rank-track { display: block; height: 10px; }
.bar { display: block; height: 100%; background: var(--bullion); box-shadow: inset 0 0 0 1px var(--foil); transition: width 900ms var(--ease); }
.bar[data-w='100'] { width: 100%; } .bar[data-w='84'] { width: 84%; } .bar[data-w='71'] { width: 71%; }
.bar[data-w='62'] { width: 62%; } .bar[data-w='50'] { width: 50%; } .bar[data-w='46'] { width: 46%; }
.bar[data-w='38'] { width: 38%; } .bar[data-w='31'] { width: 31%; } .bar[data-w='23'] { width: 23%; }
.js .ranks:not(.in) .bar { width: 0; }
.pct { min-width: 2.6em; text-align: right; font-size: 0.9375rem; font-weight: 500; }
.edge-word { font: 600 clamp(1.5rem, 3.4vw, 2.125rem)/1.1 var(--display); letter-spacing: -0.01em; overflow-wrap: anywhere; }

/* three things that are true at once: not a sequence, so no numbers */
.tri { display: grid; gap: 32px; }
.tri > div { padding-top: 20px; border-top: 1px solid var(--ink); }
.tri p { margin-top: 10px; color: var(--ink-soft); }
@media (min-width: 860px) { .tri { grid-template-columns: repeat(3, 1fr); gap: 48px; } }

/* ---------------------------------------------------------------- how it works: a real sequence */
.steps li { display: grid; grid-template-columns: 2.2rem 1fr; column-gap: 16px; row-gap: 8px; padding: 28px 0; border-top: 1px solid var(--rule); }
.steps li:first-child { border-top-color: var(--ink); }
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.n { font: 600 1.375rem/1.25 var(--display); color: var(--foil-ink); }
.steps h3, .steps p { grid-column: 2; }
.steps p { color: var(--ink-soft); max-width: 32em; }
.steps .eg { font-size: 0.9375rem; color: var(--graphite); }
.eg b { display: block; font: 600 1.25rem/1.3 var(--display); color: var(--ink); }
@media (min-width: 920px) {
  .steps li { grid-template-columns: 4rem 14rem 1fr 13rem; column-gap: 32px; align-items: baseline; }
  .steps h3, .steps p { grid-column: auto; }
}

/* ---------------------------------------------------------------- the curve: Ana and Ben */
.story { display: grid; gap: 32px; padding: 32px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.story-chart svg { width: 100%; height: auto; }
.story-side { display: flex; flex-direction: column; }
.story-count { font-size: 0.9375rem; color: var(--graphite); }
.story-text { margin-top: 10px; min-height: 6.2em; font-size: 1.1875rem; line-height: 1.5; }
.story-ledger { margin-top: 20px; }
.story-ledger div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-top: 1px solid var(--rule); font-size: 1rem; }
.story-ledger dt { display: flex; align-items: center; gap: 10px; color: var(--graphite); }
.story-ledger dd { text-align: right; }
.story-ledger .up, .story-ledger .down { font-weight: 650; }
.swatch { width: 12px; height: 12px; }
.swatch-a { background: var(--bullion); box-shadow: inset 0 0 0 1px var(--foil); }
.swatch-b { background: var(--ink-soft); }
.story-ctl { display: flex; gap: 10px; margin-top: 24px; }
@media (min-width: 920px) { .story { grid-template-columns: 7fr 5fr; column-gap: 56px; align-items: center; } }

.grid-line { stroke: var(--rule); stroke-width: 1; }
.axis { stroke: var(--ink); stroke-width: 1; }
.axis-label { font: 500 12px var(--text); fill: var(--graphite); }
.curve-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.area-a { fill: var(--bullion); }
.area-b { fill: var(--ink-soft); }
.area-label { font: 650 14px var(--text); }
.label-a { fill: var(--ink); }
.label-b { fill: var(--paper); }
.price-dot { fill: var(--paper); stroke: var(--ink); stroke-width: 2.5; }
.price-tag { font: 650 15px var(--text); fill: var(--ink); }
.guide { stroke: var(--foil); stroke-width: 1; stroke-dasharray: 3 3; }
.views-area { fill: var(--bullion); fill-opacity: 0.55; }
.narrow .axis-label { font-size: 13px; }

.curve-note { margin-top: 28px; max-width: 40em; color: var(--ink-soft); }

.views { margin-top: 72px; }
.views-head p { margin-top: 8px; max-width: 34em; color: var(--ink-soft); }
.views-charts { display: grid; gap: 28px; margin-top: 28px; }
.views-charts figcaption { margin-bottom: 8px; font-size: 0.9375rem; color: var(--graphite); }
.views-charts svg { width: 100%; height: auto; touch-action: pan-y; cursor: ew-resize; }
@media (min-width: 760px) { .views-charts { grid-template-columns: 1fr 1fr; column-gap: 48px; } }
.views-ctl { margin-top: 20px; max-width: 34rem; }
.views-read { margin-top: 12px; font-size: 1rem; color: var(--ink-soft); }
input[type='range'] { width: 100%; height: 28px; margin: 0; background: transparent; accent-color: var(--ink); cursor: ew-resize; }

/* ---------------------------------------------------------------- plain lists of things */
.defs > div { display: grid; gap: 6px; padding: 22px 0; border-top: 1px solid var(--rule); }
.defs > div:first-child { border-top-color: var(--ink); }
.defs > div:last-child { border-bottom: 1px solid var(--rule); }
.defs p { color: var(--ink-soft); max-width: 32em; }
@media (min-width: 620px) { .defs > div { grid-template-columns: 11.5rem 1fr; column-gap: 28px; align-items: baseline; } }
.contract { margin-top: 28px; font-size: 1rem; color: var(--graphite); }
.contract a { color: var(--ink); }

/* ---------------------------------------------------------------- the dictionary: an entry, set as one */
.sample { padding: 28px 0 30px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.sample figcaption { font-size: 0.9375rem; color: var(--graphite); }
.sample-word { margin-top: 10px; font: 600 clamp(2.75rem, 7vw, 4.5rem)/1 var(--display); letter-spacing: -0.022em; }
.sample-facts { margin-top: 14px; color: var(--ink-soft); }
.sample-senses { margin-top: 22px; counter-reset: sense; max-width: 26rem; }
.sample-senses li { counter-increment: sense; display: grid; grid-template-columns: 1.8rem 1fr auto; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--rule); }
.sample-senses li::before { content: counter(sense); font: 600 1rem/1 var(--display); color: var(--foil-ink); }
.sample-senses b { font: 600 1.375rem/1.2 var(--display); }
.sample-senses span { font-weight: 500; }
.sample + .mint { margin-top: 32px; }

/* ---------------------------------------------------------------- live words */
.live-list { display: grid; column-gap: 72px; border-top: 1px solid var(--ink); }
@media (min-width: 760px) { .live-list { grid-template-columns: 1fr 1fr; } }
.live-list a { display: grid; grid-template-columns: 1fr auto 8.5em; align-items: baseline; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.live-list a:hover .live-word { text-decoration: underline; text-decoration-color: var(--foil); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.live-word { min-width: 0; font: 600 1.1875rem/1.3 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-price { font-weight: 600; }
.live-behind { text-align: right; font-size: 0.9375rem; color: var(--graphite); }

/* ---------------------------------------------------------------- start: four steps */
.start { display: grid; gap: 28px; }
.start li { padding-top: 18px; border-top: 1px solid var(--ink); }
.start h3 { margin-top: 6px; }
.start p { margin-top: 8px; color: var(--ink-soft); }
@media (min-width: 620px) { .start { grid-template-columns: 1fr 1fr; column-gap: 40px; row-gap: 40px; } }
@media (min-width: 1000px) { .start { grid-template-columns: repeat(4, 1fr); } }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin-top: 56px; }

/* ---------------------------------------------------------------- questions */
.faq details { border-top: 1px solid var(--rule); }
.faq details:first-child { border-top-color: var(--ink); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; cursor: pointer; list-style: none; font: 500 1.25rem/1.3 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; font: 400 1.5rem/1 var(--text); color: var(--foil-ink); transition: transform 180ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 2.5rem 24px 0; max-width: 36em; color: var(--ink-soft); }

/* ---------------------------------------------------------------- the white paper
 * A document in the page: its contents beside it, one reading column, numbered
 * sections, its equations in MathML (the browser sets them; nothing loaded). */
.paper-grid { display: grid; gap: 40px; }
.paper-meta { font-size: 0.9375rem; color: var(--graphite); }
.toc { margin-top: 18px; counter-reset: toc; font-size: 1rem; line-height: 1.35; }
.toc li { counter-increment: toc; display: grid; grid-template-columns: 1.6em 1fr; padding: 7px 0; border-top: 1px solid var(--rule); }
.toc li::before { content: counter(toc); color: var(--foil-ink); font-weight: 600; }
.toc li.plain::before { content: ''; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; text-decoration-color: var(--foil); }
@media (min-width: 1000px) {
  .paper-grid { grid-template-columns: 4fr 8fr; column-gap: 72px; }
  .paper-aside { position: sticky; top: 32px; align-self: start; }
}
.paper { min-width: 0; max-width: 44rem; font-size: 1.0625rem; line-height: 1.7; counter-reset: sec; }
.paper-title { font-size: clamp(1.875rem, 3.6vw, 2.625rem); line-height: 1.12; }
.paper .byline { margin-top: 16px; font-size: 0.9375rem; line-height: 1.5; color: var(--graphite); }
.paper .byline code { display: block; margin-top: 2px; padding: 0; background: none; overflow-wrap: anywhere; }
.paper .abstract { margin-top: 36px; padding: 24px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.paper .abstract h3 { font-size: 1.125rem; }
.paper .abstract p { margin-top: 8px; }
.paper h3.sec { counter-increment: sec; counter-reset: sub; margin-top: 64px; font-size: 1.625rem; line-height: 1.2; }
.paper h3.sec::before { content: counter(sec) '\2003'; color: var(--foil-ink); }
.paper h3.sec.plain { counter-increment: none; }
.paper h3.sec.plain::before { content: none; }
.paper h4 { counter-increment: sub; margin-top: 36px; font: 600 1.1875rem/1.35 var(--display); }
.paper h4::before { content: counter(sec) '.' counter(sub) '\2002'; color: var(--graphite); font-weight: 500; }
.paper p { margin-top: 14px; }
.paper ul, .paper ol.list { margin-top: 12px; padding-left: 1.3em; list-style: disc; }
.paper li { margin-top: 8px; }
.paper em { font-style: italic; }
.paper code { padding: 1px 5px; border-radius: 3px; background: #efede4; }
.paper a { color: var(--foil-ink); }
.paper .def { margin-top: 18px; padding: 2px 0 2px 20px; border-left: 2px solid var(--foil); }
.paper .def p:first-child { margin-top: 0; }
.paper .def b { font-family: var(--display); font-weight: 600; }
.paper math { font-size: 1.08em; }
.paper math[display='block'] { margin: 18px 0; overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.paper .eq { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.paper .eq-n { font-size: 0.9375rem; color: var(--graphite); }
.paper table { width: 100%; margin-top: 20px; border-collapse: collapse; border-top: 1px solid var(--ink); font-size: 0.9375rem; line-height: 1.5; }
.paper th, .paper td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.paper th { font-weight: 600; }
.paper td.num, .paper th.num { padding-right: 0; text-align: right; }
.paper .small { font-size: 0.9375rem; line-height: 1.55; color: var(--graphite); }
.paper .refs { margin-top: 14px; padding-left: 0; list-style: none; font-size: 0.9375rem; line-height: 1.55; }
.paper .refs li { padding-left: 2.6em; text-indent: -2.6em; }
.paper .refs li span { display: inline-block; width: 2.6em; text-indent: 0; color: var(--graphite); }

/* ---------------------------------------------------------------- foot */
.foot { padding: 64px 0 56px; border-top: 1px solid var(--ink); }
.risk-title { font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.005em; }
.risk p { margin-top: 12px; max-width: 46em; font-size: 0.9375rem; line-height: 1.6; color: var(--graphite); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule); }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 1rem; }
.foot-row > p { margin-left: auto; font-size: 0.9375rem; color: var(--graphite); }

/* ---------------------------------------------------------------- small screens, stilled motion */
@media (max-width: 620px) {
  :root { --gutter: 18px; }
  body { font-size: 1.0625rem; }
  .hero { padding: 28px 0 72px; }
  .hero-lead { font-size: 1.125rem; }
  .section { padding: 72px 0; }
  .head-wide { margin-bottom: 40px; }
  .mint input { font-size: 1.1875rem; padding: 0 14px; }
  .mint .btn { padding: 0 18px; }
  .quote p { font-size: 1.375rem; }
  .live-list a { grid-template-columns: 1fr auto; }
  .live-behind { display: none; }
  .foot-row > p { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
