@font-face {
  font-family: "Mona Sans";
  src: url("fonts/MonaSans-Latin.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --canvas: #f4f4f2;
  --surface: #ffffff;
  --inset: #ececea;
  --ink: #111111;
  --ink-2: #45453f;
  --ink-3: #66665f;
  --hairline: rgb(17 17 17 / 10%);
  --hairline-strong: rgb(17 17 17 / 17%);
  --field-border: #7d7d77;
  --action: #111111;
  --action-hover: #2c2c2c;
  --on-action: #ffffff;
  --tonal: rgb(17 17 17 / 6%);
  --tonal-hover: rgb(17 17 17 / 10%);
  --indicator: #0c64ed;
  --indicator-ink: #0b5cd5;
  --indicator-wash: #e8f1ff;
  --earned: #f6c90e;
  --earned-rim: #9c7700;
  --earned-wash: #fdf4d8;
  --track: #ececea;
  --hatch-edge: rgb(12 100 237 / 55%);
  --focus: #0c64ed;
  --selection: rgb(12 100 237 / 18%);
  --word: rgb(12 100 237 / 16%);

  --font: "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  --w-text: 420;
  --w-ui: 560;
  --w-strong: 600;

  --r-mark: 2px;
  --r-cell: 3px;
  --r-md: 10px;
  --r-lg: 18px;
  --r-pill: 999px;

  --page: 1.5rem;
  --pad: 1.5rem;
  --gap: 1rem;
  --measure: 80rem;
  --control: 2.75rem;

  --hover: 150ms;
  --press: 90ms;
  --feedback: 220ms;
  --base: 200ms;
  --out: 140ms;
  --enter: 520ms;
  --fill: 720ms;
  --emphasized: cubic-bezier(0.2, 0.8, 0.2, 1);
  --standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-enter: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: linear(0, 0.01 1.4%, 0.037 2.8%, 0.089 4.6%, 0.172 6.8%, 0.465 13.5%, 0.602 16.9%, 0.696 19.7%, 0.776 22.4%, 0.841 25.2%, 0.903 28.6%, 0.948 32%, 0.984 36.3%, 1.006 41.7%, 1.015 48.4%, 1.001 80.4%, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0e0e0f;
    --surface: #161617;
    --inset: #242425;
    --ink: #f2f2ef;
    --ink-2: #bdbdb8;
    --ink-3: #8c8c87;
    --hairline: rgb(255 255 255 / 9%);
    --hairline-strong: rgb(255 255 255 / 16%);
    --field-border: #808079;
    --action: #f2f2ef;
    --action-hover: #cececc;
    --on-action: #111111;
    --tonal: rgb(255 255 255 / 8%);
    --tonal-hover: rgb(255 255 255 / 13%);
    --indicator: #4b8dff;
    --indicator-ink: #4b8dff;
    --indicator-wash: #1d232e;
    --earned: #f6c90e;
    --earned-rim: #f6c90e;
    --earned-wash: #342f20;
    --track: rgb(255 255 255 / 16%);
    --hatch-edge: rgb(75 141 255 / 55%);
    --focus: #4b8dff;
    --selection: rgb(75 141 255 / 32%);
    --word: rgb(75 141 255 / 28%);
  }
}

@media (min-width: 36rem) {
  :root { --page: 3rem; --pad: 1.75rem; --gap: 1.5rem; }
}
@media (min-width: 72rem) {
  :root { --page: 5rem; --pad: 2rem; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--canvas);
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: var(--w-text);
  line-height: 1.55;
  font-variant-numeric: proportional-nums lining-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
p, li { text-wrap: pretty; }

::selection { background: var(--selection); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

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

.skip {
  position: absolute;
  left: var(--page);
  top: 0.75rem;
  z-index: 90;
  padding: 0.625rem 1rem;
  border-radius: var(--r-pill);
  background: var(--action);
  color: var(--on-action);
  font-size: 0.9375rem;
  font-weight: var(--w-ui);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus-visible { transform: none; }

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

/* Type roles */
.t-hero {
  font-size: clamp(2.625rem, 1.5rem + 4.5vw, 4.625rem);
  font-weight: var(--w-strong);
  letter-spacing: -0.04em;
  line-height: 0.96;
  text-wrap: balance;
}
.t-display {
  font-size: 2rem;
  font-weight: var(--w-strong);
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}
.t-section {
  font-size: 1.1875rem;
  font-weight: var(--w-strong);
  letter-spacing: -0.02em;
  line-height: 1.22;
  text-wrap: balance;
}
.t-lead {
  font-size: 1.0625rem;
  font-weight: var(--w-text);
  letter-spacing: -0.005em;
  line-height: 1.5;
  text-wrap: balance;
  color: var(--ink-2);
}
.t-title {
  font-size: 1rem;
  font-weight: var(--w-strong);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.t-body { font-size: 1rem; line-height: 1.55; color: var(--ink-2); }
.t-small { font-size: 0.875rem; line-height: 1.45; }
.t-meta { font-size: 0.8125rem; line-height: 1.35; color: var(--ink-3); }
.t-figure {
  font-size: 2rem;
  font-weight: var(--w-strong);
  letter-spacing: -0.035em;
  line-height: 0.95;
}
.ink-2 { color: var(--ink-2); }
.ink-3 { color: var(--ink-3); }

@media (min-width: 36rem) {
  .t-display { font-size: 3rem; }
  .t-section { font-size: 1.375rem; }
  .t-lead { font-size: 1.1875rem; }
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--r-cell);
}
.brand-mark { width: 22px; height: 22px; flex: none; }
.wordmark {
  font-size: 1.3125rem;
  font-stretch: 116%;
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1;
}

/* Link */
.link {
  color: var(--ink);
  font-weight: var(--w-ui);
  text-decoration: none;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--hairline-strong), var(--hairline-strong));
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px, 100% 1px;
  transition: background-size var(--hover) var(--emphasized);
}
.link:hover, .link:focus-visible { background-size: 100% 1px, 100% 1px; }

/* Buttons: one pair */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--control);
  padding-inline: 1.375rem;
  border: 0;
  border-radius: var(--r-pill);
  font-size: 0.9375rem;
  font-weight: var(--w-ui);
  letter-spacing: -0.005em;
  line-height: 1.25rem;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  position: relative;
  flex-shrink: 0;
  transition-property: transform, background-color, color;
  transition-duration: var(--hover);
  transition-timing-function: var(--emphasized);
}
.btn:active { transform: translateY(1px) scale(0.985); transition-duration: var(--press); }
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
  .btn:hover:active { transform: translateY(1px) scale(0.985); }
}
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-secondary { background: var(--tonal); color: var(--ink); }
@media (hover: hover) {
  .btn-primary:hover { background: var(--action-hover); }
  .btn-secondary:hover { background: var(--tonal-hover); }
}
.btn-primary:active { background: var(--action-hover); }
.btn-secondary:active { background: var(--tonal-hover); }
.btn-large { min-height: 3rem; padding-inline: 1.5rem; font-size: 1rem; line-height: 1.5rem; gap: 0.75rem; }
.btn-small { min-height: 2rem; padding-inline: 0.875rem; font-size: 0.875rem; }
.btn[disabled] { cursor: default; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--tonal);
  color: var(--ink);
  flex: none;
  transition: background-color var(--hover) var(--emphasized), transform var(--press) var(--emphasized);
}
@media (hover: hover) { .icon-btn:hover { background: var(--tonal-hover); } }
.icon-btn:active { transform: scale(0.96); }
.icon-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.icon-btn.play {
  width: var(--control);
  height: var(--control);
  background: var(--action);
  color: var(--on-action);
}
@media (hover: hover) { .icon-btn.play:hover { background: var(--action-hover); } }
.icon { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-20 { width: 1.25rem; height: 1.25rem; }
.icon.solid { fill: currentColor; stroke-width: 1.5; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 1.375rem;
  padding: 0 0.5rem;
  border-radius: var(--r-pill);
  font-size: 0.8125rem;
  font-weight: var(--w-ui);
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
  color: var(--ink-2);
}
.badge.is-indicator { box-shadow: none; background: var(--indicator-wash); color: var(--indicator-ink); }
.badge.is-earned { box-shadow: inset 0 0 0 1px var(--earned-rim); background: var(--earned); color: #111111; }

/* Header */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  padding-block: 0.875rem;
}
.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.nav-link {
  display: none;
  align-items: center;
  min-height: var(--control);
  padding-inline: 0.875rem;
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: var(--w-ui);
  text-decoration: none;
  transition: background-color var(--hover) var(--emphasized), color var(--hover) var(--emphasized);
}
@media (hover: hover) { .nav-link:hover { background: var(--tonal); color: var(--ink); } }
@media (min-width: 36rem) { .nav-link { display: inline-flex; } }
.site-nav .btn { margin-left: 0.5rem; }

/* Hero */
.hero { padding-top: 3.5rem; }
@media (min-width: 56rem) { .hero { padding-top: 4.5rem; } }
.hero h1 { max-width: 19ch; }
.hero .t-lead { max-width: 38rem; margin-top: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.hero .t-meta { margin-top: 1rem; }

/* The one entrance */
@keyframes enter { from { opacity: 0; transform: translateY(0.75rem); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(0.25rem); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
.enter { animation: enter var(--enter) var(--ease-enter) both; animation-delay: calc(var(--i, 0) * 60ms); }

/* Product preview */
.preview { margin-top: 3.5rem; }
@media (min-width: 56rem) { .preview { margin-top: 4.5rem; } }

.app {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--hairline);
}
@media (min-width: 36rem) { .app-bar { padding: 0.75rem 1rem; } }
.app-bar-meta {
  display: none;
  align-items: center;
  gap: 0.375rem;
  padding-right: 0.5rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 36rem) { .app-bar-meta { display: inline-flex; } }

.segmented {
  position: relative;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--tonal);
  max-width: 100%;
  flex: none;
}
.segment {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: calc(var(--control) - 6px);
  padding: 3px 0.875rem;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: var(--w-ui);
  line-height: 1.25rem;
  transition: background-color var(--hover) var(--emphasized), color var(--hover) var(--emphasized);
}
@media (min-width: 36rem) { .segment { padding-inline: 1rem; } }
@media (hover: hover) { .segment:not([aria-selected="true"]):not([aria-checked="true"]):hover { background: var(--tonal); color: var(--ink); } }
.segment[aria-selected="true"], .segment[aria-checked="true"] { color: var(--on-action); }
.segmented:not(.has-thumb) .segment[aria-selected="true"], .segmented:not(.has-thumb) .segment[aria-checked="true"] { background: var(--action); }
.segment-thumb {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: var(--r-pill);
  background: var(--action);
  pointer-events: none;
  visibility: hidden;
}
.segmented.has-thumb .segment-thumb { visibility: visible; }
.segment-thumb.slide { transition: transform var(--feedback) var(--spring), width var(--feedback) var(--spring); }
.segmented.small .segment { min-height: calc(2rem - 6px); padding-inline: 0.75rem; }

.app-body { position: relative; transition: height 320ms var(--standard); }
.app-body.easing { overflow: hidden; }
.view { min-height: 32rem; }
.view[hidden] { display: none; }
.view.is-entering { animation: rise var(--base) var(--emphasized) both; }

/* Library */
.library { display: grid; grid-template-columns: 1fr; }
@media (min-width: 56rem) { .library { grid-template-columns: 13rem 1fr; } }
.lib-side { display: none; padding: 1rem 0.75rem; border-right: 1px solid var(--hairline); }
@media (min-width: 56rem) { .lib-side { display: block; } }
.lib-group + .lib-group { margin-top: 1.25rem; }
.lib-group-title { padding: 0 0.75rem 0.375rem; }
.lib-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 2.25rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: var(--w-ui);
  text-align: left;
  transition: background-color var(--hover) var(--emphasized), color var(--hover) var(--emphasized);
}
.lib-filter .t-meta { font-weight: var(--w-text); }
@media (hover: hover) { .lib-filter:hover { background: var(--tonal); color: var(--ink); } }
.lib-filter[aria-pressed="true"] { background: var(--tonal); color: var(--ink); }

.lib-main { padding: var(--pad) 1rem; min-width: 0; }
@media (min-width: 36rem) { .lib-main { padding: 1.5rem; } }
.lib-head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.field {
  position: relative;
  flex: 1 1 16rem;
  max-width: 26rem;
}
.field .icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}
.field input {
  width: 100%;
  min-height: 2.5rem;
  padding: 0 0.875rem 0 2.5rem;
  border: 1px solid var(--field-border);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 0.9375rem;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color var(--hover) var(--emphasized);
}
.field input::placeholder { color: var(--ink-3); opacity: 1; }
.field input:focus-visible { outline-color: var(--focus); }
.field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.lib-count { margin-left: auto; }

.books {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 1.5rem 1rem;
  margin-top: 1.5rem;
}
@media (max-width: 35.999rem) {
  .books { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .books .cover { aspect-ratio: 5 / 4; }
}
.book {
  display: grid;
  width: 100%;
  align-content: start;
  gap: 0.625rem;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  border-radius: var(--r-cell);
}
.cover {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.875rem 0.75rem;
  border-radius: var(--r-cell);
  background: var(--inset);
  transition: transform 180ms var(--emphasized), background-color var(--hover) var(--emphasized);
}
@media (hover: hover) { .book:hover .cover { transform: translateY(-2px); background: color-mix(in srgb, var(--inset), var(--ink) 4%); } }
.cover-title {
  font-size: 0.9375rem;
  font-weight: var(--w-strong);
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-wrap: balance;
  color: var(--ink);
}
.cover-author { font-size: 0.8125rem; line-height: 1.35; color: var(--ink-2); }
.book-meta { display: grid; gap: 0.375rem; }
.book-line { display: flex; justify-content: space-between; gap: 0.5rem; }
.bar {
  display: block;
  position: relative;
  height: 4px;
  border-radius: var(--r-mark);
  background: var(--track);
  overflow: hidden;
}
.bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--v, 0) * 100%);
  border-radius: var(--r-mark);
  background: var(--indicator);
  transition: width var(--fill) var(--standard);
}
.bar.is-partial > span {
  background: repeating-linear-gradient(135deg, var(--indicator) 0 2px, var(--indicator-wash) 2px 5px);
  box-shadow: inset 0 0 0 1px var(--hatch-edge);
}
.empty { padding: 3rem 0; text-align: center; }

/* Reader */
.reader { display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr auto; min-height: 32rem; }
@media (min-width: 56rem) { .reader { grid-template-columns: 1fr 17rem; } }
.page {
  padding: 2rem 1.25rem;
  min-width: 0;
}
@media (min-width: 36rem) { .page { padding: 2.5rem 2.5rem 2rem; } }
.page-inner { max-width: 36rem; margin-inline: auto; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.passage {
  font-size: 1.0625rem;
  line-height: 1.7;
  letter-spacing: -0.003em;
  color: var(--ink);
  text-wrap: pretty;
}
@media (min-width: 36rem) { .passage { font-size: 1.1875rem; } }
.w {
  border-radius: var(--r-mark);
  cursor: pointer;
  transition: background-color 120ms var(--standard), color 120ms var(--standard);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
mark.hl {
  color: inherit;
  background: var(--earned-wash);
  box-shadow: inset 0 -1px 0 var(--earned-rim);
  border-radius: var(--r-mark);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.w.now { background: var(--word); box-shadow: 0 0 0 2px var(--word); }
.rail {
  display: none;
  padding: 1.5rem;
  border-left: 1px solid var(--hairline);
}
@media (min-width: 56rem) { .rail { display: block; } }
.rail-list { display: grid; margin-top: 0.75rem; }
.note { padding-block: 0.875rem; border-top: 1px solid var(--hairline); display: grid; gap: 0.375rem; }
.note:first-child { border-top: 0; padding-top: 0.25rem; }
.note q { quotes: none; font-size: 0.875rem; line-height: 1.45; color: var(--ink); }
.note q::before { content: ""; display: inline-block; width: 0.625rem; height: 0.625rem; margin-right: 0.5rem; border-radius: var(--r-cell); background: var(--earned); box-shadow: inset 0 0 0 1px var(--earned-rim); vertical-align: 0; }
.transport {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  padding: 0.875rem 1rem;
  border-top: 1px solid var(--hairline);
}
@media (min-width: 36rem) { .transport { padding: 0.875rem 1.5rem; flex-wrap: nowrap; } }
.transport-progress { flex: 1 1 10rem; display: grid; gap: 0.375rem; min-width: 0; order: 3; }
@media (min-width: 36rem) { .transport-progress { order: 0; } }
.transport-line { display: flex; justify-content: space-between; gap: 0.75rem; }
.speed { display: inline-flex; align-items: center; gap: 0.375rem; margin-left: auto; }
.speed output {
  display: inline-block;
  min-width: 3.25rem;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: var(--w-ui);
}
.slot { display: inline-block; min-width: 4.5ch; text-align: right; }

/* Listen */
.listen { display: grid; grid-template-columns: 1fr; }
@media (min-width: 56rem) { .listen { grid-template-columns: 18rem 1fr; } }
.listen-side { padding: var(--pad) 1.25rem; border-bottom: 1px solid var(--hairline); display: grid; gap: 1.25rem; align-content: start; }
@media (min-width: 56rem) { .listen-side { padding: 1.5rem; border-bottom: 0; border-right: 1px solid var(--hairline); } }
.listen-book { display: flex; gap: 0.875rem; align-items: center; }
.thumb { width: 3rem; aspect-ratio: 3 / 4; border-radius: var(--r-cell); background: var(--inset); flex: none; }
.figure-row { display: flex; align-items: baseline; gap: 0.375rem; }
.listen-main { padding: 0.5rem 1.25rem 1.25rem; min-width: 0; }
@media (min-width: 36rem) { .listen-main { padding: 0.75rem 1.5rem 1.5rem; } }
.listen-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.75rem; }
.rows { border-top: 1px solid var(--hairline); }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem 1rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--hairline);
}
@media (min-width: 36rem) { .row { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 7.5rem; } }
.row-text { display: grid; gap: 0.125rem; min-width: 0; }
.row-bar { grid-column: 1 / -1; order: 3; }
@media (min-width: 36rem) { .row-bar { grid-column: auto; order: 0; } }
.row-action { justify-self: end; display: inline-flex; align-items: center; gap: 0.5rem; }
.row-action .btn { min-width: 6.25rem; }
.spinner {
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 700ms linear infinite;
}

/* Sync */
.sync { display: grid; grid-template-columns: 1fr; }
@media (min-width: 56rem) { .sync { grid-template-columns: 1fr 1fr; } }
.sync-col { padding: var(--pad) 1.25rem; min-width: 0; }
@media (min-width: 36rem) { .sync-col { padding: 1.5rem 2rem; } }
.sync-col + .sync-col { border-top: 1px solid var(--hairline); }
@media (min-width: 56rem) { .sync-col + .sync-col { border-top: 0; border-left: 1px solid var(--hairline); } }
.switch-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.switch-row > div { display: grid; gap: 0.25rem; }
.switch {
  position: relative;
  flex: none;
  width: 2.5rem;
  height: 1.5rem;
  margin-top: 0.125rem;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--inset);
  box-shadow: inset 0 0 0 1px var(--field-border);
  transition: background-color var(--hover) var(--emphasized), box-shadow var(--hover) var(--emphasized);
}
.switch::after {
  content: "";
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  width: 1rem;
  height: 1rem;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--field-border);
  transition: transform var(--feedback) var(--spring), box-shadow var(--feedback) var(--emphasized);
}
.switch[aria-checked="true"] { background: var(--action); box-shadow: none; }
.switch[aria-checked="true"]::after { transform: translateX(1rem); box-shadow: none; }
.sync-list { margin-top: 1.25rem; border-top: 1px solid var(--hairline); }
.sync-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.25rem;
  padding-block: 0.5rem;
  border-bottom: 1px solid var(--hairline);
}
.sync-item-text { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.sync-item-text .icon { color: var(--ink-2); }
.key-note { margin-top: 1.25rem; display: flex; gap: 0.625rem; align-items: flex-start; }
.key-note .icon { margin-top: 0.1875rem; color: var(--ink-2); flex: none; }

/* Sections */
.section { padding-block: 5rem; }
@media (min-width: 56rem) { .section { padding-block: 7rem; } }
.section-head { max-width: 46rem; }
.section-head .t-lead { margin-top: 1.25rem; }

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 3rem;
  margin-top: 3rem;
}
@media (min-width: 56rem) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 4rem; } }
.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.625rem;
  padding-block: 1.75rem 2rem;
  border-top: 1px solid var(--hairline-strong);
  align-content: start;
}
.feature .t-body { max-width: 34rem; }
.feature-figure { display: flex; align-items: baseline; gap: 0.5rem; margin-top: 0.75rem; }

/* Pricing */
.plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  margin-top: 3rem;
}
@media (min-width: 56rem) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 4rem; } }
.card {
  display: flex;
  flex-direction: column;
  padding: var(--pad);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
}
.plan-price { display: flex; align-items: baseline; gap: 0.5rem; margin-top: 1.25rem; }
.plan-price .t-figure { font-size: 2.75rem; }
.plan .t-body { margin-top: 0.75rem; max-width: 30rem; }
@media (min-width: 56rem) { .plan .t-body { min-height: 3.1em; } }
.checks { display: grid; gap: 0.625rem; margin-block: 1.5rem 2rem; padding-top: 1.5rem; border-top: 1px solid var(--hairline); }
.checks li { display: flex; gap: 0.625rem; align-items: flex-start; font-size: 0.9375rem; line-height: 1.45; }
.checks .icon { margin-top: 0.125rem; flex: none; }
.plan .btn { margin-top: auto; align-self: flex-start; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 2rem 2.5rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 0.875rem; }

/* Inline code */
code {
  font-family: var(--font);
  font-size: 0.9375em;
  font-weight: var(--w-ui);
  font-variant-numeric: tabular-nums;
  padding: 0.0625rem 0.375rem;
  border-radius: var(--r-cell);
  background: var(--tonal);
  color: var(--ink);
  white-space: nowrap;
}

/* Current page in the nav */
.nav-link[aria-current="page"] { background: var(--tonal); color: var(--ink); }

/* Docs page */
.page-head { padding-top: 3.5rem; }
@media (min-width: 56rem) { .page-head { padding-top: 4.5rem; } }
.page-head .t-lead { max-width: 40rem; margin-top: 1.5rem; }
.toc { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 2rem; font-size: 0.9375rem; }

.doc-section { padding-block: 4rem; border-top: 1px solid var(--hairline); }
.doc-section.first { margin-top: 3.5rem; }
@media (min-width: 56rem) { .doc-section { padding-block: 5.5rem; } .doc-section.first { margin-top: 4.5rem; } }

.voice-cards { display: grid; grid-template-columns: 1fr; gap: var(--gap); margin-top: 2.5rem; }
@media (min-width: 56rem) { .voice-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 3rem; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.voice-cards .t-body { margin-top: 0.75rem; max-width: 30rem; }

.spec { margin-top: 1.25rem; border-top: 1px solid var(--hairline); }
.spec div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-block: 0.625rem;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.spec dt { color: var(--ink-2); flex: none; }
.spec dd { margin: 0; font-weight: var(--w-ui); text-align: right; min-width: 0; }

.code {
  margin: 0;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  overflow: hidden;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.375rem 0.375rem 0.375rem 1rem;
  border-bottom: 1px solid var(--hairline);
}
.code-head .t-meta { min-width: 0; }
.copy { min-width: 5.75rem; }
.code pre {
  margin: 0;
  padding: 1rem;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 460;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
  color: var(--ink);
}
.code pre code { padding: 0; background: none; font-size: inherit; font-weight: inherit; white-space: inherit; }
.code pre.wire { word-break: break-all; }
.code .tok { white-space: nowrap; }
.code .ln { display: block; padding-left: 1.25rem; text-indent: -1.25rem; }
.code .ln + .ln { margin-top: 0.5rem; }
.stack { display: grid; gap: var(--gap); align-content: start; min-width: 0; }

.path-block { margin-top: 2.5rem; max-width: 46rem; }
.key-note { margin-top: 1.25rem; display: flex; gap: 0.625rem; align-items: flex-start; }
.key-note .icon { margin-top: 0.1875rem; color: var(--ink-2); flex: none; }
#providers .key-note { max-width: 46rem; }

.provider-tabs { margin-top: 3rem; }
@media (max-width: 35.99rem) {
  .segmented.grid-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; border-radius: 22px; }
  .segmented.grid-tabs .segment { padding-inline: 0.5rem; white-space: nowrap; }
}
.provider { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 1.5rem; }
.provider[hidden] { display: none; }
@media (min-width: 56rem) { .provider { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; align-items: start; } }
.provider-text { display: grid; gap: 0.25rem; align-content: start; min-width: 0; }
.provider-text .spec dd { text-align: right; }

.fields-title { margin-top: 4rem; }
.fields { margin-top: 1.25rem; border-top: 1px solid var(--hairline-strong); }
.fields div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem 2rem;
  padding-block: 0.875rem;
  border-bottom: 1px solid var(--hairline);
}
@media (min-width: 36rem) { .fields div { grid-template-columns: 8.5rem minmax(0, 1fr); } }
.fields dt { font-weight: var(--w-strong); }
.fields dd { margin: 0; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.5; min-width: 0; }
.protocol .fields div { grid-template-columns: 1fr; }
@media (min-width: 36rem) { .protocol .fields div { grid-template-columns: 5.5rem minmax(0, 1fr); } }

.protocol { display: grid; grid-template-columns: 1fr; gap: 2.5rem; margin-top: 2.5rem; }
@media (min-width: 56rem) { .protocol { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; margin-top: 3rem; align-items: start; } }
.protocol > .fields { margin-top: 0; }

.agents { display: grid; grid-template-columns: 1fr; gap: var(--gap); margin-top: 2.5rem; align-items: start; }
@media (min-width: 56rem) { .agents { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 3rem; } }
.agents-wide { grid-column: 1 / -1; min-width: 0; }

/* Home: wide feature row */
.feature-wide { grid-column: 1 / -1; }
.feature-wide .t-body { max-width: 46rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover, .btn:active, .icon-btn:active, .book:hover .cover { transform: none !important; }
  .spinner { animation: none !important; border-right-color: currentColor; opacity: 0.5; }
}
