/* ---------- Fonts ---------- */

/* Latin subsets from Fontsource. Licenses: static/fonts/licenses/. */
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;
  --white: #ffffff;
  --ink: #111111;
  --muted: #555555;
  --line: rgb(17 17 17 / 0.14);
  --rule: rgb(17 17 17 / 0.5);
  --red: oklch(0.52 0.19 33);
  --retired: var(--red);
  --paper: var(--white);
  --thermal: var(--white);
  --accent: var(--ink);
  --r-tag: 4px;
  --r-control: 8px;
  --r-group: 12px;
  --page-max: 1320px;
  --gutter: 28px;
  --sans: "Public Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

@media (max-width: 599.98px) {
  :root {
    --gutter: 16px;
  }
}

/* ---------- Base ---------- */

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  font-size: clamp(44px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p,
li,
dd {
  text-wrap: pretty;
}

p {
  margin: 0 0 16px;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

img {
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: 3px;
}

@media (max-width: 599.98px) {
  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 28px;
  }
}

/* ---------- Shared ---------- */

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

.section {
  padding-block: 80px;
}

.wrap > .section {
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px 48px;
  align-items: start;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--r-control);
  background: var(--accent);
  color: var(--thermal);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn--quiet {
  border: 1px solid var(--rule);
  background: var(--white);
  color: var(--ink);
}

.link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lede {
  max-width: 36ch;
  font-size: 18px;
  line-height: 1.5;
}

/* WCAG 2.5.8: 24px target. Inline padding leaves the text lines in place. */
main p a:not([class]),
main li a:not([class]) {
  padding-block: 3px;
}

/* 44px tap target. */
.snippet-actions .link {
  min-width: 44px;
  justify-content: center;
}

.caption {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

h2 + .caption {
  margin-top: 8px;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.table {
  border-collapse: collapse;
  font-size: 15px;
}

.table thead th {
  padding: 0 24px 8px 0;
  border-bottom: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  vertical-align: bottom;
}

.table td,
.table tbody th {
  padding: 8px 24px 8px 0;
  text-align: left;
  vertical-align: top;
}

.table tbody th {
  font-weight: 600;
}

.table th:last-child,
.table td:last-child {
  padding-right: 0;
}

.table tbody:has(> tr:nth-child(6)) > tr:not(:last-child) > * {
  border-bottom: 1px solid var(--line);
}

.table .num {
  text-align: right;
}

.table td.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table tr.hl > * {
  font-weight: 600;
}

.split > .table {
  justify-self: start;
}

.sum td,
.sum tbody th {
  padding-block: 4px;
}

.sum td.num {
  font-family: inherit;
}

.sum tfoot th,
.sum tfoot td {
  padding-block: 8px;
  font-weight: 600;
  text-align: left;
  vertical-align: baseline;
}

.sum tfoot td.num {
  text-align: right;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

@media (max-width: 599.98px) {
  .section {
    padding-block: 48px;
  }

  .lede {
    font-size: 17px;
  }
}

/* ---------- Skip ---------- */

.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: var(--r-control);
  background: var(--white);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  position: static;
  align-self: flex-start;
  margin: 12px 0 0 max(var(--gutter), (100% - var(--page-max)) / 2 + var(--gutter));
}

/* ---------- Header ---------- */

.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 24px;
  padding-block: 12px;
}

/* Link stays 44px tall to tap. */
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.wordmark picture {
  display: contents;
}

.wordmark img {
  width: auto;
  height: 16px;
}

.site-head .wordmark {
  margin-right: auto;
}

.site-head .btn {
  font-size: 15px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 44px tap target. Spare width goes on both sides. */
.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  background: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.menu-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-toggle[aria-expanded="true"]::after {
  transform: translateY(2px) rotate(-135deg);
}

@media (max-width: 899.98px) {
  .site-head.has-menu .menu-toggle {
    display: inline-flex;
  }

  .site-head.has-menu .site-nav {
    display: none;
    flex-basis: 100%;
    order: 1;
  }

  .site-head.has-menu.is-open .site-nav {
    display: block;
  }

  /* 12px keeps the first link's focus ring clear of the rule. */
  .site-head.has-menu .site-nav ul {
    flex-direction: column;
    margin: 12px calc(-1 * var(--gutter)) 0;
    padding: 12px var(--gutter) 0;
    border-top: 1px solid var(--line);
  }

  .site-head.has-menu .site-nav a {
    display: flex;
    justify-content: flex-start;
    font-size: 17px;
  }
}

@media (max-width: 599.98px) {
  .site-head {
    column-gap: 12px;
  }

  .site-head .wordmark img {
    height: 14px;
  }

  .site-nav ul {
    column-gap: 20px;
  }

  .site-nav a {
    justify-content: flex-start;
  }

  .menu-toggle {
    padding-inline: 8px;
  }
}

@media (max-width: 389.98px) {
  .site-head {
    column-gap: 8px;
  }

  .site-head .wordmark img {
    height: 12px;
  }
}

@media (max-width: 359.98px) {
  .site-head .wordmark img {
    height: 11px;
  }

  .site-head .btn {
    padding-inline: 10px;
  }

  .menu-toggle {
    padding-inline: 4px;
  }

  .menu-toggle::after {
    display: none;
  }
}

/* ---------- Footer ---------- */

.site-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 22px;
  margin-inline: calc(-1 * var(--gutter));
  padding: 26px var(--gutter) 34px;
  border-top: 1px solid var(--ink);
  font-size: 14px;
}

.site-foot .wordmark {
  margin-right: auto;
}

.site-foot .wordmark img {
  height: 14px;
}

.site-foot ul {
  display: flex;
  flex-wrap: wrap;
  column-gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-foot nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  text-decoration: none;
}

.site-foot nav a:hover {
  text-decoration: underline;
}

@media (max-width: 599.98px) {
  .site-foot nav {
    flex-basis: 100%;
  }

  .site-foot ul {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    column-gap: 28px;
  }

  .site-foot nav a {
    justify-content: flex-start;
  }
}

/* ---------- Home ---------- */

.hero {
  --peek: 96px;
  overflow-x: clip;
}

.scene {
  --parcel-w: 94vw;
  --stage-w: calc(var(--parcel-w) * 1.6313);
  --stage-h: calc(var(--stage-w) * 0.625);
  --view-h: calc(var(--parcel-w) * 0.79);
  --stage-x: calc(50vw - var(--stage-w) * 0.407);
  --stage-y: calc(var(--view-h) / 2 - var(--stage-h) * 0.491);
}

.hero__copy {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 16px;
  padding: 32px var(--gutter) 0;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(36px, 3.06vw, 44px);
}

.hero h1 span {
  display: block;
  text-wrap: balance;
}

.hero .lede {
  margin: 0;
  font-size: 19px;
  line-height: 1.5;
}

.hero__fine {
  max-width: 44ch;
  margin: 0;
  font-size: 15px;
}

/* hidden is the fallback for browsers without clip. */
.scene__view {
  position: relative;
  height: var(--view-h);
  margin-top: 16px;
  overflow: hidden;
  overflow: clip;
}

.scene__stage {
  position: absolute;
  top: var(--stage-y);
  left: var(--stage-x);
  width: var(--stage-w);
  height: var(--stage-h);
}

.scene__stage picture {
  display: block;
  width: 100%;
  height: 100%;
}

.scene__render {
  display: block;
  width: 100%;
  height: 100%;
}

.scene__live {
  position: absolute;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.is-live .scene__live {
  opacity: 1;
}

/* Vertical pan stays the page's, so a finger on the parcel still scrolls. */
.scene__grab {
  position: absolute;
  top: 8%;
  left: 6%;
  width: 70%;
  height: 84%;
  clip-path: ellipse(50% 50%);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.scene__grab.is-held {
  cursor: grabbing;
}

/* The turn control's only focus mark. */
.scene__hint {
  position: absolute;
  top: 79%;
  left: 15%;
  display: none;
  margin: 0;
  padding: 3px 8px;
  border-radius: var(--r-tag);
  background: var(--white);
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
}

.scene__turn:focus-visible ~ .scene__hint {
  display: block;
  outline: 2px dashed var(--ink);
  outline-offset: 3px;
}

.scene > .hero__line {
  z-index: 1;
  margin: -28px var(--gutter) 0;
}

.hero__line .ck-ru {
  background: var(--white);
}

.hero__demo {
  position: relative;
  z-index: 2;
  display: flow-root;
  max-width: calc(432px + var(--gutter) * 2);
  margin-top: 40px;
  padding-inline: var(--gutter);
}

.shop-switcher {
  margin-top: 12px;
}

.hero__demo [data-view="checkout"] .ck-wm {
  display: none;
}

.hero__demo .ck-opt {
  padding-block: 3px;
}

.hero__demo .ck-ru,
.hero__line .ck-ru {
  padding-block: 8px;
}

.hero__demo .ck-tot {
  margin-top: 8px;
  padding-block: 6px;
}

.hero__demo .demo-caption {
  margin-top: 8px;
}

.shop-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.shop-tabs[hidden] {
  display: none;
}

.js .shop-tabs[hidden] {
  display: grid;
  visibility: hidden;
}

.shop-tabs [role="tab"] {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

.shop-tabs [role="tab"][aria-selected="true"] {
  border-color: var(--ink);
}

.shop-tabs [role="tab"]:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.demo-caption {
  margin: 16px 0 0;
}

.intro {
  max-width: 54ch;
  margin: 12px 0 28px;
  font-size: 17px;
}

.dateline {
  display: grid;
  row-gap: 16px;
  margin: 0;
  padding: 0;
  font-variant-numeric: tabular-nums;
  list-style: none;
}

.dateline li {
  display: grid;
  grid-template-columns: 5.5em minmax(0, 1fr);
  column-gap: 16px;
}

.dateline .dateline__opens {
  display: none;
}

.dateline__event {
  margin: 0;
  font-weight: 600;
}

.dateline__detail {
  display: block;
  font-weight: 400;
}

@media (min-width: 900px) {
  .dateline {
    --y: 76px;
    --lift: 44px;
    position: relative;
    display: block;
    height: calc(var(--y) + 32px);
    font-size: 15px;
    line-height: 20px;
  }

  .dateline::before {
    content: "";
    position: absolute;
    top: calc(var(--y) - 1px);
    right: 0;
    left: 0;
    height: 2px;
    background: var(--ink);
  }

  .dateline li {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--at);
    display: block;
    width: 0;
  }

  .dateline .dateline__opens {
    display: block;
  }

  .dateline li::before {
    content: "";
    position: absolute;
    top: calc(var(--y) - 7px);
    left: 0;
    width: 1px;
    height: 14px;
    background: var(--ink);
  }

  .dateline time,
  .dateline__event {
    position: absolute;
    left: 0;
    white-space: nowrap;
  }

  .dateline time {
    top: calc(var(--y) + 11px);
  }

  .dateline__event {
    bottom: calc(32px + 11px);
  }

  .dateline .dateline__back::before {
    right: 0;
    left: auto;
  }

  .dateline__back time,
  .dateline__back .dateline__event {
    right: 0;
    left: auto;
    text-align: right;
  }

  .dateline__high .dateline__event {
    bottom: calc(32px + 11px + var(--lift));
  }

  .dateline__high::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: calc(32px + 7px);
    width: 1px;
    height: calc(var(--lift) + 1px);
    background: var(--ink);
  }

  .dateline .dateline__span {
    width: calc(var(--to) - var(--at));
  }

  .dateline__span::after {
    content: "";
    position: absolute;
    top: calc(var(--y) - 4px);
    right: 0;
    left: 0;
    height: 8px;
    background: var(--ink);
  }

  .dateline__span .dateline__event {
    right: 8px;
    white-space: normal;
  }

  /* The cover page's dates have no month names, so the two at the end of the line are too long to
     sit side by side. They break after "Next Month", and the line keeps room below for the second row. */
  .dateline--relative {
    margin-bottom: 20px;
  }

  .dateline--relative .dateline__span time,
  .dateline--relative .dateline__high time {
    width: 6em;
    white-space: normal;
  }

  /* Screen reader text. On the line, the segment's two ends say this. */
  .dateline__to {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (min-width: 1280px) {
  .dateline {
    --y: 56px;
    --lift: 24px;
  }
}

.trail__price {
  max-width: 54ch;
  margin: 24px 0 0;
  font-size: 17px;
  font-weight: 600;
}

.big-number {
  margin: 16px 0 14px;
  font-size: 64px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.note {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  max-width: 760px;
}

.note img {
  display: block;
  width: 150px;
  height: auto;
}

.note h2 {
  margin-bottom: 16px;
  font-size: 28px;
}

.note p {
  max-width: 54ch;
  font-size: 18px;
  line-height: 1.55;
}

.note .caption {
  margin: -8px 0 16px;
  font-size: 13px;
  line-height: 1.45;
}

.note .note__sig {
  margin: 4px 0 4px;
  font-weight: 600;
}

@media (max-width: 599.98px) {
  .intro,
  .trail__price {
    font-size: 16px;
  }

  .big-number {
    font-size: 44px;
  }

  .note {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .note img {
    width: 120px;
  }

  .note p:not(.caption) {
    font-size: 17px;
  }
}

@media (max-width: 759.98px) {
  .shop-tabs [role="tab"] {
    padding-inline: 7px;
  }
}

@media (min-width: 760px) {
  .scene {
    --parcel-w: 84vw;
  }

  .scene > .hero__line {
    max-width: 372px;
    margin-top: calc(var(--stage-y) + var(--stage-h) * 0.64 + 62px - var(--view-h));
  }
}

@media (min-width: 1100px) {
  .hero {
    --scene-h: max(600px, calc(100vh - 68px));
    --room: calc(var(--scene-h) - var(--peek) - 40px);
    --left: max(var(--gutter), calc((100vw - var(--page-max)) / 2 + var(--gutter)));
    --copy-w: clamp(360px, 30vw, 444px);
  }

  .scene {
    --parcel-w: min(60vw, calc(var(--room) * 1.342), calc(98vw - var(--left) - var(--copy-w) - 24px));
    --stage-x: calc(var(--left) + var(--copy-w) + 24px - var(--stage-w) * 0.1);
    --stage-y: calc((var(--scene-h) - var(--peek)) / 2 - var(--stage-h) * 0.491);
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    overflow: clip;
  }

  .hero__copy {
    grid-area: 1 / 1;
    width: calc(var(--left) + var(--copy-w));
    min-height: calc(var(--scene-h) - var(--peek));
    padding: 24px 0 24px var(--left);
  }

  .hero h1 {
    font-size: clamp(34px, 3.06vw, 44px);
  }

  .scene__view {
    grid-area: 1 / 1 / 3 / 2;
    align-self: start;
    height: var(--scene-h);
    margin: 0;
  }

  .scene > .hero__line {
    position: absolute;
    top: min(calc(var(--stage-y) + var(--stage-h) * 0.64 + 74px), calc(var(--scene-h) - var(--peek) - 94px));
    left: calc(var(--left) + var(--copy-w) + 12px);
    width: 372px;
    max-width: none;
    margin: 0;
    transition: opacity 200ms cubic-bezier(0.22, 1, 0.36, 1), visibility 200ms;
  }

  .scene > .hero__line.is-away {
    opacity: 0;
    visibility: hidden;
  }

  .hero__demo {
    grid-area: 2 / 1;
    width: calc(var(--left) + var(--copy-w));
    max-width: none;
    margin: 0;
    padding: 0 0 72px var(--left);
  }
}

@media (min-width: 1100px) and (min-height: 640px) {
  .scene__view {
    position: sticky;
    top: 0;
  }
}

/* svh leaves out a phone's sliding address bar. */
@supports (height: 100svh) {
  @media (min-width: 1100px) {
    .hero {
      --scene-h: max(600px, calc(100svh - 68px));
    }
  }
}

/* cqw leaves out a classic scrollbar, so the copy lines up with the header. */
@supports (width: 1cqw) {
  .hero {
    container-type: inline-size;
  }

  @media (min-width: 1100px) {
    .hero {
      --left: max(var(--gutter), calc((100cqw - var(--page-max)) / 2 + var(--gutter)));
    }
  }
}

/* ---------- Ledger ---------- */

.retired {
  color: var(--red);
  font-weight: 600;
}

/* ---------- Checkout ---------- */

.ck {
  position: relative;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.ck--phone {
  width: 100%;
}

.ck :where(p, dl, dd, h2, h3, h4, fieldset) {
  margin: 0;
}

.ck small {
  display: block;
  font-size: 13px;
  text-wrap: pretty;
}

.ck b {
  font-weight: 600;
}

.ck-price,
.ck dd {
  white-space: nowrap;
}

.ck-wm {
  margin-bottom: 20px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

.ck-pack {
  min-width: 0;
  margin-bottom: 12px;
  padding: 0;
  border: 0;
}

.ck-pack legend {
  margin: 0 0 8px;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
}

.ck-opts {
  display: grid;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-group);
}

.ck-opt {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: var(--r-control);
  transition: border-color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ck-opt:has(:checked) {
  border-color: var(--ink);
}

.ck-opt > span:first-of-type,
.ck-ru > span,
.ck-lines dt {
  text-wrap: balance;
}

.ck input[type="radio"],
.ck input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--ink);
}

.ck label:has(:enabled) {
  cursor: pointer;
}

.ck-ru {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-group);
}

.ck-ru small {
  margin-top: 2px;
  line-height: 1.4;
}

.ck [data-roundup-amount] {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

.ck-tot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
}

/* Kerning and ligatures off, so swapping in one box per character moves nothing. */
.ck-odo {
  display: inline-block;
  height: 1lh;
  font-size: 21px;
  font-kerning: none;
  font-variant-ligatures: none;
  white-space: nowrap;
}

/* Screen reader copy of the total. Unselectable, so a copy takes the total once. */
.ck [data-total-text] {
  -webkit-user-select: none;
  user-select: none;
}

/* 1.35em is 1lh for browsers without lh. hidden is for browsers without clip. */
.ck-odo > span {
  display: inline-block;
  height: 1lh;
  vertical-align: top;
}

.ck-odo > .ck-odo__digit {
  position: relative;
  height: 1.35em;
  height: 1lh;
  overflow: hidden;
  overflow: clip;
  color: transparent;
}

/* No transform at rest: it would round the digit a pixel off the text beside it. */
.ck-odo__digit::before {
  content: "0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9";
  position: absolute;
  top: calc(var(--d) * -100%);
  left: 0;
  color: var(--ink);
  white-space: pre;
  pointer-events: none;
  transform: translateY(var(--from));
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ck-odo.is-settling > .ck-odo__digit::before,
.ck-odo__digit.is-placing::before {
  transition: none;
}

.ck-paybox {
  display: grid;
}

.ck-paybox > * {
  grid-area: 1 / 1;
}

.ck-paybox > noscript,
.ck-paybox > [data-js-failed] {
  align-self: center;
}

.ck .btn {
  display: flex;
  width: 100%;
  margin: 0;
}

.ck [data-pay][hidden] {
  display: flex;
  visibility: hidden;
}

.ck-noscript {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  text-wrap: balance;
}

.ck-noscript--under {
  margin-top: 12px;
}

/* 44px tap target. */
.ck-by {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  margin-inline: auto;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ck-by:hover {
  color: var(--ink);
}

.ck [data-view="receipt"] {
  display: grid;
  grid-template-rows: 1fr;
}

/* Under reduced motion is-entering does nothing and the receipt shows at once. */
@media (prefers-reduced-motion: no-preference) {
  /* clip, because focusing the heading mid-grow can't scroll it. hidden is the fallback. */
  .ck [data-view="receipt"].is-entering {
    overflow: hidden;
    overflow: clip;
    animation: ck-receipt-in 300ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .ck:has(> [data-view="receipt"].is-entering) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 0fr;
    animation: ck-checkout-out 300ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .ck:has(> [data-view="receipt"].is-entering) > [data-view="receipt"] {
    grid-row: 1;
    align-self: start;
  }

  .ck:has(> [data-view="receipt"].is-entering) > [data-view="checkout"][hidden] {
    display: block;
    grid-row: 2;
    min-height: 0;
    overflow: hidden;
    overflow: clip;
    visibility: hidden;
  }
}

@keyframes ck-receipt-in {
  from {
    grid-template-rows: 0fr;
  }
}

@keyframes ck-checkout-out {
  from {
    grid-template-rows: auto 1fr;
  }
}

.ck-rc {
  min-height: 0;
}

.ck-ok {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 0 0 12px;
}

.ck-tick {
  position: relative;
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.ck-tick::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 11px;
  width: 7px;
  height: 13px;
  border: solid var(--ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ck-order {
  font-size: 13px;
}

/* The focus ring must clear the line above and stay inside the growing receipt. */
.ck-thanks {
  width: fit-content;
  margin: 2px 4px 0 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}

.ck-thanks:focus-visible {
  outline-offset: 1px;
}

.ck-shopnote {
  font-size: 14px;
}

.ck-box {
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-group);
}

.ck-box__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

.ck-box__no {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
}

.ck-lines {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

/* 9.5em keeps labels to two lines in any system font, with the template's nbsp. */
.ck-lines > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 12px;
}

.ck-lines dt {
  flex: 1 1 9.5em;
}

.ck-lines dd {
  margin-left: auto;
  text-align: right;
}

.ck-lines--sep {
  margin-top: 8px;
  padding-top: 8px;
}

.ck-noru {
  margin-top: 10px;
}

/* 44px tap target. */
.ck-howto,
.ck-link {
  display: flex;
  align-items: center;
  width: fit-content;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* The 44px box runs over the hairline, but a tap on either line's text must miss it. */
.ck-howto {
  position: relative;
  align-items: flex-start;
  margin: 0 0 -9px;
  padding-top: 7.5px;
  font-size: 13px;
}

.ck-howto + .ck-lines--sep {
  margin-top: 0;
}

.ck-link {
  margin-bottom: -12px;
  font-size: 13.5px;
}

/* The ring goes round the words. Round the 44px box it would hit the neighbors. */
.ck :is(.ck-by, .ck-howto, .ck-link):focus-visible {
  outline: none;
}

.ck :is(.ck-by, .ck-howto, .ck-link):focus-visible > span {
  outline: 2px dashed var(--ink);
  outline-offset: 3px;
}

.ck-pending {
  margin-top: 12px;
  color: var(--ink);
  font-size: 13px;
  text-wrap: balance;
}

.ck-fine {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.ck .ck-again {
  margin-top: 16px;
}

/* A display rule would beat [hidden]. Pay now is left out so it keeps its space. */
.ck [hidden]:not([data-pay]) {
  display: none;
}

/* ---------- Concept ---------- */

.how {
  font-variant-numeric: tabular-nums;
}

.how__lede {
  max-width: 54ch;
  margin-top: 16px;
}

.how__follow {
  max-width: 54ch;
  margin: 32px 0;
  font-size: 17px;
}

.how__copy {
  margin-top: 12px;
}

.how__figure {
  max-width: 400px;
}

.how__note {
  max-width: 54ch;
  margin: 16px 0 0;
  font-size: 17px;
}

.pack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pack__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

.pack__name {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: normal;
  text-wrap: pretty;
}

.pack__instead {
  margin: 2px 0 0;
  font-size: 14px;
}

@media (min-width: 900px) {
  .pack {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.calc {
  max-width: 560px;
  font-size: 17px;
  line-height: 1.55;
}

.calc :where(p, dl, dd) {
  margin: 0;
}

.calc__field {
  display: block;
}

.calc__label,
.calc__answer dt {
  display: block;
  font-weight: 400;
}

.calc__amount,
.calc__answer dd {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.calc__amount {
  display: inline-flex;
  align-items: baseline;
  max-width: 100%;
  margin-top: 4px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--muted);
}

.calc[data-on] .calc__field:hover .calc__amount,
.calc[data-on] .calc__amount:focus-within {
  border-bottom-color: var(--ink);
}

.calc__sizer {
  display: inline-grid;
  min-width: 0;
}

.calc__sizer::after {
  content: attr(data-value);
  grid-area: 1 / 1;
  padding-right: 2px;
  visibility: hidden;
  white-space: pre;
}

.calc__input {
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  padding: 0 2px 0 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-variant-numeric: inherit;
  letter-spacing: inherit;
  appearance: none;
}

/* Outline off because the underline and selected amount mark the focus. */
.calc__input:focus-visible {
  outline: none;
}

.calc:not([data-on]) .calc__input {
  cursor: default;
}

.calc__result {
  display: grid;
  margin-top: 16px;
}

.calc__result > * {
  grid-area: 1 / 1;
  min-width: 0;
}

.calc__whole {
  visibility: hidden;
}

.calc.is-whole .calc__whole {
  visibility: visible;
}

.calc.is-whole .calc__some {
  visibility: hidden;
}

.calc__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 16px;
}

.calc__answer {
  display: grid;
  grid-template-columns: repeat(2, minmax(max-content, 1fr));
  gap: 16px;
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}

.calc__answer > div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calc__answer dd {
  margin-top: 4px;
}

.calc__why {
  min-height: calc(1.55em * 2);
  margin-top: 20px;
  font-variant-numeric: normal;
}

.js .calc-try[hidden] {
  display: inline;
  visibility: hidden;
}

.calc-try__total {
  white-space: nowrap;
}

.calc-try button {
  padding: 0;
  border: 0;
  background: none;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.rc__toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  min-width: 0;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-group);
}

.rc__toggle label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--r-control);
  font-size: 15px;
  cursor: pointer;
}

.rc__toggle label:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rc__toggle label:has(:checked) {
  border-color: var(--ink);
  font-weight: 600;
}

.rc__toggle label:has(:focus-visible) {
  outline: 2px dashed var(--ink);
  outline-offset: 3px;
}

.rc__retired {
  display: none;
}

.rc:has(input[value="retired"]:checked) .rc__retired {
  display: block;
}

.rc:has(input[value="retired"]:checked) .rc__pending {
  display: none;
}

.rc__sample {
  margin: 12px 0 0;
}

@media (max-width: 599.98px) {
  .calc__amount,
  .calc__answer dd {
    font-size: 28px;
  }

  .calc__why {
    min-height: calc(1.55em * 3);
  }
}

/* ---------- 404 ---------- */

.notfound {
  padding-bottom: 96px;
}

.notfound .lede {
  margin: 20px 0 12px;
}

.notfound__links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Pages ---------- */

.section > h1 + .lede {
  margin-top: 16px;
}

.stack > * + * {
  margin-top: 16px;
}

.stack p {
  max-width: 54ch;
  font-size: 17px;
  line-height: 1.55;
}

.samples tbody th {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  text-align: right;
  white-space: nowrap;
}

.samples tr.hl > * {
  font-weight: 600;
}

.ledger-table {
  width: 100%;
}

.ledger-table td.serials {
  font-family: var(--mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.ledger-table .status-date {
  white-space: nowrap;
}

.retired {
  color: var(--retired);
  font-weight: 600;
}

.steps {
  max-width: 54ch;
  margin: 0;
  padding-left: 22px;
  font-size: 17px;
}

.steps li + li {
  margin-top: 8px;
}

.steps li::marker {
  font-variant-numeric: normal;
}

.fact-list {
  max-width: 54ch;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fact-list li + li {
  margin-top: 8px;
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.about-hero .lede {
  max-width: 54ch;
  margin-top: 20px;
}

.about-hero img {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
}

.essay p {
  max-width: 54ch;
  font-size: 18px;
  line-height: 1.55;
}

.essay p + p {
  margin-top: 16px;
}

.builds {
  margin: 0;
  max-width: 62ch;
}

.builds > div + div {
  margin-top: 20px;
}

.builds dt {
  font-weight: 600;
}

.builds dd {
  margin: 4px 0 0;
  font-size: 17px;
  line-height: 1.5;
}

.builds dd .link {
  display: flex;
  width: fit-content;
}

.credits-table td,
.credits-table tbody th {
  overflow-wrap: anywhere;
}

.credits-table td a {
  padding-block: 3px;
}

@media (min-width: 900px) {
  .about-hero {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 64px;
  }
}

@media (max-width: 599.98px) {
  .samples td,
  .samples th {
    font-size: 13px;
  }

  .samples td,
  .samples tbody th,
  .samples thead th {
    padding-right: 12px;
  }

  .ledger-table,
  .ledger-table tbody,
  .credits-table,
  .credits-table tbody {
    display: block;
  }

  .ledger-table thead,
  .credits-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .ledger-table tbody tr,
  .credits-table tbody tr {
    display: block;
    padding: 12px 0;
  }

  .ledger-table tbody:has(> tr:nth-child(6)) > tr:not(:last-child),
  .credits-table tbody:has(> tr:nth-child(6)) > tr:not(:last-child) {
    border-bottom: 1px solid var(--line);
  }

  .ledger-table tbody:has(> tr:nth-child(6)) > tr:not(:last-child) > *,
  .credits-table tbody:has(> tr:nth-child(6)) > tr:not(:last-child) > * {
    border-bottom: 0;
  }

  .ledger-table tbody th,
  .ledger-table tbody td,
  .credits-table tbody th,
  .credits-table tbody td {
    display: block;
    padding: 2px 0;
    border: 0;
    text-align: left;
  }

  .ledger-table tbody td::before,
  .credits-table tbody td[data-label]::before {
    content: attr(data-label) ": ";
    font-family: var(--sans, inherit);
    font-size: 13px;
  }

  /* 44px tap target. */
  .ledger-table td a,
  .credits-table td a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* ---------- Install ---------- */

.platform-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  background: none;
}

.platform-tabs[hidden] {
  display: none;
}

.platform-tabs [role="tab"] {
  display: flex;
  align-items: flex-start;
  min-height: 44px;
  margin: 0;
  padding: 10px 0 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.platform-tabs [role="tab"][aria-selected="true"] {
  border-bottom-color: var(--ink);
}

.platform-tabs [role="tab"]:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 599.98px) {
  .platform-tabs {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    column-gap: 28px;
  }
}

.platform-tabs:not([hidden]) ~ .platform > .platform__title {
  display: none;
}

.platform {
  margin-top: 16px;
}

.platform + .platform {
  margin-top: 28px;
}

.platform-tabs:not([hidden]) ~ .platform {
  margin-top: 20px;
}

.platform__title {
  margin-bottom: 8px;
  font-size: 18px;
}

.steps {
  margin: 0;
  padding-left: 1.4em;
  max-width: 54ch;
  font-size: 17px;
  line-height: 1.5;
}

.steps li + li {
  margin-top: 8px;
}

.snippet-title {
  margin: 32px 0 8px;
  font-size: 18px;
}

.snippet {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--thermal);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.snippet code {
  font: inherit;
}

.snippet-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 4px;
}

.snippet-actions .link[hidden] {
  display: none;
}

button.link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
}

.snippet-note {
  margin-top: 4px;
  font-size: 15px;
}

.packaging td,
.packaging tbody th {
  vertical-align: middle;
}

.packaging__pic {
  width: 124px;
}

.packaging__img {
  display: block;
  width: 108px;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

.packaging__name {
  width: 200px;
}

.packaging__instead {
  width: 180px;
}

@media (max-width: 599.98px) {
  .packaging,
  .packaging tbody {
    display: block;
  }

  .packaging thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .packaging tbody tr {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas:
      "pic name"
      "pic what"
      "pic instead";
    align-content: start;
    column-gap: 16px;
    padding: 14px 0;
  }

  .packaging tbody tr:not(:last-child) {
    border-bottom: 1px solid var(--line);
  }

  .packaging tbody:has(> tr:nth-child(6)) > tr:not(:last-child) > * {
    border-bottom: 0;
  }

  .packaging tbody th,
  .packaging tbody td {
    display: block;
    padding: 0;
    border: 0;
    overflow-wrap: anywhere;
  }

  .packaging__pic {
    grid-area: pic;
    width: auto;
  }

  .packaging__img {
    width: 96px;
  }

  .packaging tbody th.packaging__name {
    grid-area: name;
    width: auto;
    font-size: 16px;
  }

  .packaging tbody td:nth-child(3) {
    grid-area: what;
    margin-top: 2px;
    font-size: 14px;
  }

  .packaging tbody td.packaging__instead {
    grid-area: instead;
    width: auto;
    margin-top: 4px;
    font-size: 14px;
  }

  .packaging__instead::before {
    content: attr(data-label) ": ";
  }
}

/* ---------- Motion ---------- */

/* Stays last so it wins. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
