@font-face {
  font-family: Figtree;
  src: url("/fonts/figtree.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font-sans: Figtree, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --paper: #fffaf5;
  --ink: #121111;
  --background: var(--paper);
  --foreground: var(--ink);
  --card: #fff;
  --muted: #f2efeb;
  --muted-foreground: rgb(18 17 17 / .62);
  --border: rgb(18 17 17 / .085);
  --input: rgb(18 17 17 / .12);
  --cobalt: #274bdb;
  --cobalt-deep: #15214c;
  --cobalt-light: #a5b8ff;
  --primary: var(--cobalt);
  --primary-hi: #486dff;
  --primary-foreground: #fff;
  --accent-foreground: var(--cobalt);
  --brand-surface: #eef2ff;
  --brand-border: rgb(39 75 219 / .24);
  --secondary: var(--ink);
  --secondary-foreground: var(--paper);
  --ring: rgb(39 75 219 / .62);
  --success: #3f8c1c;
  --pending: #512da8;
  --warning: #e8650f;
  --destructive: #e73827;
  --error-text: #ac271b;
  --nav: #171717;
  --radius: .875rem;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow-gloss: inset 0 2px 1px rgb(255 255 255 / .46),
    inset 0 .6px .6px -1.25px rgb(255 255 255 / .72),
    inset 0 2.3px 2.3px -2.5px rgb(255 255 255 / .56),
    0 10px 22px -9px rgb(39 75 219 / .56);
  --shadow-gloss-ink: inset 0 1px 0 rgb(255 255 255 / .18), 0 10px 20px -12px rgb(18 17 17 / .5);
  --shadow-card: 0 1px 2px rgb(18 17 17 / .04), 0 12px 32px -12px rgb(18 17 17 / .12);
  --shadow-float: 0 2px 4px rgb(18 17 17 / .04), 0 24px 48px -16px rgb(18 17 17 / .18);
}

:root[data-theme="dark"], .chapter-dark {
  color-scheme: dark;
  --background: #0f0e0e;
  --foreground: var(--paper);
  --card: #171616;
  --muted: #211f1e;
  --muted-foreground: rgb(255 250 245 / .66);
  --border: rgb(255 255 255 / .085);
  --input: rgb(255 255 255 / .12);
  --primary: #3b62f6;
  --primary-hi: #5d80ff;
  --accent-foreground: var(--cobalt-light);
  --brand-surface: rgb(59 98 246 / .18);
  --brand-border: rgb(118 150 255 / .34);
  --secondary: var(--paper);
  --secondary-foreground: var(--ink);
  --ring: rgb(130 157 255 / .78);
  --success: #6fd23f;
  --pending: #9b7bf0;
  --warning: #fda24a;
  --destructive: #ff6a4d;
  --error-text: #ff9c8b;
  --nav: #211f1e;
  --shadow-gloss: inset 0 1.5px 1px rgb(255 255 255 / .42),
    inset 0 .6px .6px -1.25px rgb(255 255 255 / .68),
    0 10px 24px -8px rgb(59 98 246 / .52);
  --shadow-gloss-ink: inset 0 2px 1px rgb(255 255 255 / .9), 0 10px 20px -12px rgb(0 0 0 / .6);
  --shadow-card: inset 0 1px 0 rgb(255 255 255 / .04), 0 12px 32px -12px rgb(0 0 0 / .6);
  --shadow-float: inset 0 1px 0 rgb(255 255 255 / .05), 0 24px 48px -16px rgb(0 0 0 / .72);
}

.chapter-dark {
  --background: #121111;
  --card: #191818;
  --muted: #232120;
  --border: rgb(255 255 255 / .09);
  --input: rgb(255 255 255 / .14);
  background: var(--background);
  color: var(--foreground);
}
:root[data-theme="dark"] .chapter-dark {
  --background: #151414;
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-float);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-padding-top: 5.5rem;
  scrollbar-width: none;
}

:root::-webkit-scrollbar { display: none; }
.page-scrollbar { display: none; }

@media (any-pointer: fine) {
  .page-scrollbar {
    --scrollbar-thumb-color: var(--primary-hi);
    position: fixed;
    top: 0;
    right: 0;
    z-index: 50;
    display: block;
    width: 12px;
    height: 100%;
    margin: 0;
    appearance: none;
    writing-mode: vertical-lr;
    background: transparent;
    pointer-events: none;
  }
  .page-scrollbar:is(:hover, :focus-visible) { --scrollbar-thumb-color: var(--primary); }
  .page-scrollbar:focus-visible { outline-offset: -2px; }

  @supports (height: attr(data-thumb-height px, 32px)) {
    .page-scrollbar { --scrollbar-thumb-height: attr(data-thumb-height px, 32px); }
  }

  .page-scrollbar::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: var(--scrollbar-thumb-height, 32px);
    border: 3px solid transparent;
    border-radius: 999px;
    background: var(--scrollbar-thumb-color) padding-box;
    pointer-events: auto;
  }
  .page-scrollbar::-moz-range-track { background: transparent; }
  .page-scrollbar::-moz-range-thumb {
    box-sizing: border-box;
    width: 12px;
    height: var(--scrollbar-thumb-height, 32px);
    border: 3px solid transparent;
    border-radius: 999px;
    background: var(--scrollbar-thumb-color) padding-box;
    pointer-events: auto;
  }
}

@media (forced-colors: active) {
  .page-scrollbar {
    --scrollbar-thumb-color: ButtonText;
    forced-color-adjust: none;
  }
  .page-scrollbar:is(:hover, :focus-visible) { --scrollbar-thumb-color: Highlight; outline-color: Highlight; }
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--background);
  color: var(--foreground);
  font-size: 1rem;
  line-height: 1.5;
}

body, main { overflow-x: clip; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-weight: 500; }
a { color: inherit; text-decoration: none; }
button, select, input, textarea { font: inherit; }
button, select { cursor: pointer; }
img, svg { display: block; }
::selection { background: var(--brand-border); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }

.container { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.text-display { font-size: clamp(3rem, 2rem + 4.5vw, 5.5rem); letter-spacing: -.04em; line-height: .97; }
.text-title { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); letter-spacing: -.04em; line-height: 1.1; }
.text-label {
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.text-mono, .text-amount, code, pre { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.text-amount { font-weight: 500; letter-spacing: -.03em; }
.muted { color: var(--muted-foreground); }
.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  z-index: 60;
  top: .5rem;
  left: .5rem;
  padding: .5rem .75rem;
  border-radius: var(--radius);
  background: var(--card);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .5rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--muted);
  color: var(--foreground);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
  transition: filter .2s var(--ease), background-color .2s var(--ease), translate .22s var(--ease), scale .18s var(--ease);
}
.button:is(:enabled, a[href]):active { translate: none; scale: .976; }
.button:disabled { opacity: .45; cursor: default; }
.button-small { min-height: 2.25rem; padding-inline: .875rem; font-size: .875rem; }
.button-large { min-height: 3.5rem; padding-inline: 1.75rem; border-radius: 1.125rem; font-size: 1.0625rem; }
.button-wide { width: 100%; }
.button-primary {
  background: linear-gradient(180deg, var(--primary-hi), var(--primary) 40%);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-gloss);
}
.button-primary:hover:enabled, a.button-primary:hover { filter: brightness(1.04); }
.button-secondary { background: var(--secondary); color: var(--secondary-foreground); box-shadow: var(--shadow-gloss-ink); }
.button-secondary:hover:enabled, a.button-secondary:hover { filter: brightness(1.15); }
.button-outline { background: var(--card); border-color: var(--border); box-shadow: var(--shadow-card); }
.button-outline:hover:enabled, a.button-outline:hover { background: var(--muted); }
.button .icon { transition: transform .22s var(--ease); }
.text-link { display: inline-flex; align-items: center; gap: .3rem; font-weight: 500; }
.text-link:hover { text-decoration: underline; text-underline-offset: .2em; }
.text-link:disabled { opacity: .45; cursor: default; text-decoration: none; }
button.text-link { background: none; border: 0; padding: 0; color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  padding: 1rem .75rem 0;
  pointer-events: none;
}
.nav-pill {
  display: flex;
  align-items: center;
  gap: .25rem;
  height: 3.125rem;
  max-width: 100%;
  padding: .375rem .5rem;
  border-radius: 99rem;
  background: var(--nav);
  color: var(--paper);
  box-shadow: var(--shadow-float);
  pointer-events: auto;
}
[data-theme="dark"] .nav-pill { box-shadow: 0 0 0 1px var(--border), var(--shadow-float); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border-radius: .6rem;
  font-weight: 600;
  letter-spacing: -.025em;
  white-space: nowrap;
}
.brand-icon { width: 1.875rem; height: 1.875rem; }
.brand-icon { transition: transform .25s var(--ease); }
.brand:hover .brand-icon { transform: rotate(-7deg); }
.nav-pill > .brand { margin-right: .375rem; padding-right: .25rem; }
.nav-link {
  padding: .375rem .75rem;
  border-radius: 99rem;
  color: rgb(255 250 245 / .7);
  font-size: .9375rem;
  line-height: 1.25;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--paper); background: rgb(255 255 255 / .1); }
.nav-pill .button { min-height: 2.25rem; border-radius: 99rem; white-space: nowrap; }
.theme-toggle {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgb(255 250 245 / .8);
}
.theme-toggle:hover { background: rgb(255 255 255 / .1); color: var(--paper); }
.theme-toggle .sun, [data-theme="dark"] .theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }

.asset-pill, .status-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .65rem;
  border: 1px solid var(--border);
  border-radius: 99rem;
  background: var(--card);
  box-shadow: var(--shadow-card);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.2;
}
.asset-pill img { width: 1.375rem; height: 1.375rem; object-fit: contain; }
.status-dot { display: inline-block; width: .45rem; height: .45rem; flex: none; border-radius: 50%; background: currentColor; }
.status-dot.green { color: var(--success); }
.status-dot.amber { color: var(--warning); }
.status-dot.violet { color: var(--pending); }
.candy-violet { background: linear-gradient(225deg, #673ab7, #512da8); }
.candy-amber { background: linear-gradient(225deg, #fdc830, #f37335); }
.candy-green { background: linear-gradient(225deg, #50b224, #3f8c1c); }
.candy-ink { background: linear-gradient(225deg, #3a3634, #121111); }
.candy-cobalt { background: linear-gradient(225deg, #3d61ed, var(--cobalt)); }
.candy-ember { background: linear-gradient(225deg, #ff7034, #de4016); }

.candy-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  width: fit-content;
  max-width: 100%;
  min-height: 2rem;
  padding: .3rem .85rem;
  border-radius: 99rem;
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: inset 0 1.5px 1px rgb(255 255 255 / .4), 0 8px 18px -10px rgb(18 17 17 / .45);
}
.candy-pill .icon { width: .95rem; height: .95rem; }
.candy-pill.candy-green { background: linear-gradient(165deg, #277b40, #176130); }
.candy-pill.candy-amber { color: #422909; }
.candy-pill.candy-ember { background: linear-gradient(165deg, #b93b23, #9b2b19); }

.step-spine {
  --step-size: 1.85rem;
  --step-gap: .65rem;
  --step-space: .85rem;
  display: grid;
  gap: var(--step-space);
  padding: 0;
  list-style: none;
}
.step-item {
  position: relative;
  display: grid;
  grid-template-columns: var(--step-size) minmax(0, 1fr);
  align-items: start;
  gap: var(--step-gap);
  min-width: 0;
}
.step-item:not(:last-child)::before {
  position: absolute;
  top: var(--step-size);
  bottom: calc(-1 * var(--step-space));
  inset-inline-start: calc((var(--step-size) - var(--step-line-width, 1px)) / 2);
  width: var(--step-line-width, 1px);
  background: var(--step-line, var(--input));
  content: "";
}
.step-node {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--step-size);
  height: var(--step-size);
  border-radius: .6rem;
  color: #fff;
  box-shadow: inset 0 1.5px 1px rgb(255 255 255 / .38);
}
.step-node .icon { width: 1rem; height: 1rem; }
.step-node.candy-amber { color: #422909; }

.ticket-seam {
  position: relative;
  flex: none;
  border-top: 1px dashed var(--input);
}
.ticket-seam::before, .ticket-seam::after {
  position: absolute;
  top: -.58rem;
  width: 1.12rem;
  height: 1.12rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--ticket-surround, var(--background));
  content: "";
}
.ticket-seam::before { left: -.57rem; }
.ticket-seam::after { right: -.57rem; }

@keyframes slide-in {
  from { opacity: 0; translate: 0 .6rem; }
}

@media (hover: hover) {
  .button:is(:enabled, a[href]):hover:not(:active) { translate: 0 -2px; }
  a.button:hover .icon:last-child { transform: translateX(3px); }
}

.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.25rem; font-size: .875rem; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: .2em; }

::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
