/*
 * The project page. Its colours are the web app's, light and dark. With no
 * theme chosen on the page it follows the system setting; a choice made with
 * the switch sets data-theme on the root, which theme.js restores before the
 * page is drawn.
 */

:root {
  color-scheme: light;
  --bg: #EEF3EE;
  --surface: #FAFCF9;
  --ink: #24332B;
  --muted: #52645A;
  --accent: #2E5A3F;
  --line: #D5E0D6;
  --edge: #C3D0C6;
  --track: #E3EBE3;
  --tile: #D5E8D9;
  --tile-ink: #2E5A3F;
  --sage: #5E9C74;
  --warn: #8A3A2E;
  --primary-bg: #2E5A3F;
  --primary-ink: #FAFCF9;
  --primary-shadow: 0 10px 24px -12px rgba(46, 90, 63, 0.7);
  --card-shadow: 0 1px 2px rgba(36, 51, 43, 0.04), 0 10px 24px -14px rgba(36, 51, 43, 0.16);
  --flat-shadow: 0 1px 2px rgba(36, 51, 43, 0.04);
  --stage-bg: #D5E8D9;
  --stage-edge: #C9DDCD;
  --shot-edge: rgba(36, 51, 43, 0.14);
  --shot-shadow: 0 40px 80px -40px rgba(20, 40, 28, 0.55);
  --phone-bezel: #1A241E;
  --phone-shadow: 0 40px 70px -30px rgba(15, 30, 20, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  --band: #FAFCF9;
  --code-bg: #18211C;
  --protocol-bg: #111814;
  --protocol-line: transparent;
  --seg-on-bg: #FAFCF9;
  --seg-on-ink: #24332B;
  --seg-on-shadow: 0 1px 2px rgba(36, 51, 43, 0.14);
  --seg-off-ink: #52645A;
  --focus: #2E5A3F;

  /* The code panels and the protocol band are dark in both themes. */
  --dark-ink: #EEF4EF;
  --dark-muted: #A3B5A9;
  --dark-accent: #7DBE92;
  --dark-surface: #18211C;
  --dark-deep: #111814;
  --dark-line: #2C3A32;
  --dark-edge: #3B4C42;
  --dark-warn: #F0A99C;

  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}

/* The same dark colours twice: once for a choice made on the page, once for
   the system setting when there is none. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111814;
  --surface: #18211C;
  --ink: #EEF4EF;
  --muted: #A3B5A9;
  --accent: #A8D8B6;
  --line: #2C3A32;
  --edge: #3B4C42;
  --track: #2C3A32;
  --tile: #24382C;
  --tile-ink: #A8D8B6;
  --sage: #7DBE92;
  --warn: #F0A99C;
  --primary-bg: #7DBE92;
  --primary-ink: #0F1A13;
  --primary-shadow: none;
  --card-shadow: none;
  --flat-shadow: none;
  --stage-bg: #24382C;
  --stage-edge: #2C3A32;
  --shot-edge: #3B4C42;
  --shot-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
  --phone-bezel: #0A0F0C;
  --phone-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.75), inset 0 0 0 1px #3B4C42;
  --band: #18211C;
  --code-bg: #0C120F;
  --protocol-bg: #0B100D;
  --protocol-line: #2C3A32;
  --seg-on-bg: #3B4C42;
  --seg-on-ink: #EEF4EF;
  --seg-on-shadow: none;
  --seg-off-ink: #A3B5A9;
  --focus: #A8D8B6;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111814;
    --surface: #18211C;
    --ink: #EEF4EF;
    --muted: #A3B5A9;
    --accent: #A8D8B6;
    --line: #2C3A32;
    --edge: #3B4C42;
    --track: #2C3A32;
    --tile: #24382C;
    --tile-ink: #A8D8B6;
    --sage: #7DBE92;
    --warn: #F0A99C;
    --primary-bg: #7DBE92;
    --primary-ink: #0F1A13;
    --primary-shadow: none;
    --card-shadow: none;
    --flat-shadow: none;
    --stage-bg: #24382C;
    --stage-edge: #2C3A32;
    --shot-edge: #3B4C42;
    --shot-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
    --phone-bezel: #0A0F0C;
    --phone-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.75), inset 0 0 0 1px #3B4C42;
    --band: #18211C;
    --code-bg: #0C120F;
    --protocol-bg: #0B100D;
    --protocol-line: #2C3A32;
    --seg-on-bg: #3B4C42;
    --seg-on-ink: #EEF4EF;
    --seg-on-shadow: none;
    --seg-off-ink: #A3B5A9;
    --focus: #A8D8B6;
  }
}

/* Screenshots come in both themes; only the one that fits is shown, and the
   other is never fetched, since both load lazily. */
.only-dark {
  display: none;
}

:root[data-theme="dark"] .only-light {
  display: none;
}

:root[data-theme="dark"] .only-dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-light {
    display: none;
  }

  :root:not([data-theme="light"]) .only-dark {
    display: block;
  }
}

/* Basics */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

p a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
}

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

main:focus {
  outline: none;
}

[hidden] {
  display: none !important;
}

/* Controls that only work with the script are left out without it, and the
   titles that stand in for the install tabs are left out with it. */
:root:not(.js) .js-only,
.js .no-js-only {
  display: none !important;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  flex: none;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--primary-bg);
  color: var(--primary-ink);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 16px;
}

/* Layout and type */

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.section {
  padding-block: clamp(72px, 8vw, 116px);
}

.section__head {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.eyebrow {
  margin: 0;
  font-size: 13px;
  line-height: 16px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.h2 {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lead {
  margin: 0;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.card {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.band {
  background: var(--band);
  border-block: 1px solid var(--line);
}

/* Buttons and switches */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button .icon {
  font-size: 18px;
  stroke-width: 2;
  color: var(--muted);
}

.button--primary {
  padding-inline: 26px;
  border: 0;
  background: var(--primary-bg);
  color: var(--primary-ink);
  box-shadow: var(--primary-shadow);
}

.button--primary:hover {
  filter: brightness(1.08);
}

.button--secondary {
  border: 1px solid var(--edge);
  background: var(--surface);
  color: var(--ink);
}

.button--secondary:hover {
  border-color: var(--muted);
}

.button--small {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 16px;
}

.button--small .icon {
  font-size: 16px;
}

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--track);
}

.seg__button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--seg-off-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

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

.seg__button[aria-pressed="true"] {
  background: var(--seg-on-bg);
  color: var(--seg-on-ink);
  box-shadow: var(--seg-on-shadow);
}

.seg--icons {
  gap: 0;
  padding: 2px;
  border-radius: 12px;
}

.seg--icons .seg__button {
  width: 44px;
  height: 44px;
  min-height: 0;
  padding: 0;
}

.seg--icons .icon {
  font-size: 18px;
}

/* Header */

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  width: 34px;
  height: 34px;
}

.brand__name {
  font-size: 21px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.nav__link:hover {
  background: var(--track);
}

.nav .button {
  margin-left: 8px;
}

.theme {
  margin-left: 6px;
}

/* Hero */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(36px, 5vw, 80px);
  padding-bottom: clamp(72px, 8vw, 112px);
}

.hero__text {
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.pill:hover {
  border-color: var(--edge);
}

.pill__tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--tile);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pill .icon {
  font-size: 14px;
  stroke-width: 2.2;
}

.hero__title {
  margin: 0;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero__lead {
  max-width: 690px;
  font-size: clamp(18px, 1.45vw, 21px);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding-top: 6px;
}

.hero__note {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: balance;
}

.showcase {
  width: 100%;
  margin-top: clamp(40px, 4.5vw, 64px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.showcase__caption {
  margin: 0;
  max-width: 620px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.stage {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  row-gap: 24px;
  padding: clamp(20px, 4vw, 56px) clamp(16px, 4vw, 56px);
  border-radius: clamp(20px, 2.6vw, 36px);
  border: 1px solid var(--stage-edge);
  background: var(--stage-bg);
}

.stage__desktop {
  flex: 1 1 520px;
  min-width: 0;
  max-width: 900px;
  overflow: hidden;
  border-radius: clamp(8px, 1vw, 14px);
  border: 1px solid var(--shot-edge);
  background: var(--bg);
  box-shadow: var(--shot-shadow);
}

.stage__desktop img {
  width: 100%;
}

.phone {
  padding: 9px;
  border-radius: 46px;
  background: var(--phone-bezel);
  box-shadow: var(--phone-shadow);
}

.phone img {
  width: 100%;
  border-radius: 37px;
}

/* The phone overlaps the desktop window on a wide screen and moves below it
   on a narrow one. */
.stage__phone {
  position: relative;
  z-index: 1;
  flex: 0 0 clamp(150px, 18vw, 250px);
  margin-left: clamp(-110px, calc((720px - 100vw) * 0.2), 0px);
  padding: clamp(5px, 0.6vw, 9px);
  border-radius: clamp(26px, 3.4vw, 46px);
}

.stage__phone img {
  border-radius: clamp(21px, 2.8vw, 37px);
}

/* Why kasad */

.why {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.why__text {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.day {
  flex: 1 1 520px;
  min-width: 0;
  margin: 0;
  padding: clamp(20px, 2.4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.day__caption {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 16px;
  line-height: 1.5;
}

.day__eyebrow {
  font-size: 13px;
  line-height: 16px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.day__row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 16px;
}

.day__label {
  font-size: 16px;
  font-weight: 600;
}

.day__verdict {
  font-size: 14px;
  font-weight: 600;
}

.day__verdict--bad {
  color: var(--warn);
}

.day__verdict--good {
  color: var(--accent);
}

/* A day from 00:00 to 24:00: 03:10 is 13.19% along, 04:00 is 16.67%, and
   18:30 to 22:15 runs from 77.08% for 15.63%. */
.day__track {
  position: relative;
  height: 26px;
}

.day__track > span {
  position: absolute;
}

.day__base {
  left: 0;
  right: 0;
  top: 8px;
  height: 10px;
  border-radius: 5px;
  background: var(--track);
}

.day__span {
  left: 77.08%;
  width: 15.63%;
}

.day__span--on {
  top: 8px;
  height: 10px;
  border-radius: 5px;
  background: var(--sage);
}

.day__span--missed {
  top: 6px;
  height: 14px;
  border-radius: 7px;
  border: 2px dashed var(--warn);
}

.day__cut {
  left: 13.19%;
  top: 0;
  width: 3px;
  height: 26px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--warn);
}

.day__sync {
  left: 16.67%;
  top: 6px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--accent);
}

.day__axis {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 16px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.swatch {
  flex: none;
}

.swatch--cut {
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: var(--warn);
}

.swatch--sync {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.swatch--on {
  width: 22px;
  height: 8px;
  border-radius: 4px;
  background: var(--sage);
}

.swatch--missed {
  width: 22px;
  height: 10px;
  border-radius: 5px;
  border: 2px dashed var(--warn);
}

/* Features */

.features {
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 4vw, 56px);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 16px;
}

.feature {
  padding: 26px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--flat-shadow);
}

.feature__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feature__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.feature__body {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.tile {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--tile);
  color: var(--tile-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile .icon {
  font-size: 22px;
}

.stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 28px;
  border-top: 1px solid var(--edge);
}

.stats__list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 24px;
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 6px;
}

.stat dt {
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}

.stat dd {
  margin: 0;
  font-size: clamp(28px, 2.6vw, 36px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stats__note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* Two kinds of rule */

.rules {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
}

.rules__text {
  flex: 1 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.compare {
  overflow-x: auto;
  margin-top: 4px;
}

.compare table {
  width: 100%;
  min-width: 300px;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.45;
}

.compare th,
.compare td {
  padding: 14px 12px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.compare th:first-child {
  padding-left: 0;
}

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

.compare thead th {
  padding-top: 0;
  padding-bottom: 12px;
  border-top: 0;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.compare thead th:first-child {
  color: var(--muted);
}

.compare thead th:nth-child(2) {
  white-space: nowrap;
}

.compare tbody th {
  font-weight: 500;
}

.compare td {
  font-weight: 600;
}

.compare tbody tr:last-child > * {
  border-bottom: 1px solid var(--line);
}

.rules__note {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.rules__phone {
  flex: 0 1 300px;
  margin-inline: auto;
  display: flex;
  justify-content: center;
}

.rules__phone .phone {
  width: clamp(220px, 21vw, 290px);
}

/* Install */

.install {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 4vw, 48px);
}

.install__layout {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 24px;
}

.install__main {
  flex: 1 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.install__tabs {
  align-self: flex-start;
  max-width: 100%;
}

.install__panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* With the script, one method at a time; without it, all three. */
.js .install__panel:not(.is-active) {
  display: none;
}

.js .install__panel.is-active {
  flex: 1;
}

.install__panel-title {
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 600;
}

.install__caption {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.install__caption code {
  white-space: nowrap;
}

.install__side {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.install__side-title {
  margin: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
}

/* Beside the tabs the terminal fills the height of the commands; without the
   script, when all three methods are shown, it keeps its own height. */
.js .install__side .code {
  flex: 1;
}

.code {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--dark-line);
  background: var(--code-bg);
  color: var(--dark-ink);
}

.js .install__panel .code {
  flex: 1;
}

.code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 4px 6px 4px 20px;
  border-bottom: 1px solid var(--dark-line);
}

.code__label {
  font-size: 13px;
  line-height: 16px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dark-muted);
}

.code__copy {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--dark-muted);
  cursor: pointer;
}

.code__copy:hover {
  background: var(--dark-line);
  color: var(--dark-ink);
}

.code__copy:focus-visible {
  outline-color: var(--dark-accent);
}

.code__copy .icon {
  font-size: 18px;
}

.code__copy .icon--done,
.code__copy.is-copied .icon--copy {
  display: none;
}

.code__copy.is-copied .icon--done {
  display: block;
  color: var(--dark-accent);
}

.code__body {
  margin: 0;
  padding: 18px 20px 22px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.75;
  white-space: pre;
  tab-size: 2;
}

.code__body code {
  font-size: inherit;
}

/* Output is only read, not copied, so long lines wrap rather than scroll. */
.terminal {
  color: var(--dark-muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.terminal .prompt {
  color: var(--dark-accent);
}

.terminal .command {
  color: var(--dark-ink);
}

.notes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 16px;
}

.note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.note .icon {
  margin-top: 2px;
  font-size: 22px;
  color: var(--accent);
}

.note p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.note strong {
  color: var(--ink);
  font-weight: 600;
}

/* The protocol, on a dark band in both themes */

.band--protocol {
  background: var(--protocol-bg);
  color: var(--dark-ink);
  border-color: var(--protocol-line);
}

.protocol {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(36px, 5vw, 72px);
}

.protocol :focus-visible {
  outline-color: #A8D8B6;
}

.protocol__text {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.protocol .eyebrow {
  color: var(--dark-accent);
}

.protocol .h2 {
  color: var(--dark-ink);
}

.protocol .lead {
  color: var(--dark-muted);
}

.callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--dark-line);
  background: var(--dark-surface);
}

.callout .icon {
  margin-top: 2px;
  font-size: 20px;
  color: var(--dark-warn);
}

.callout p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--dark-muted);
}

.callout strong {
  color: var(--dark-ink);
  font-weight: 600;
}

.demo {
  flex: 1 1 560px;
  min-width: 0;
  padding: clamp(18px, 2.2vw, 28px);
  border-radius: 24px;
  border: 1px solid var(--dark-line);
  background: var(--dark-surface);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  appearance: none;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--dark-edge);
  background: transparent;
  color: var(--dark-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--dark-accent);
}

.chip[aria-pressed="true"] {
  border-color: var(--dark-accent);
  background: var(--dark-accent);
  color: #0F1A13;
}

.readout {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.readout > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.readout dt,
.demo__label {
  margin: 0;
  font-size: 13px;
  line-height: 16px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dark-muted);
}

.readout dd {
  margin: 0;
}

.mono {
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.readout__json {
  color: var(--dark-ink);
}

.readout__bytes {
  color: var(--dark-accent);
  line-height: 1.75;
}

.readout__length {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.readout__count {
  font-size: 14px;
  line-height: 1.5;
  color: var(--dark-muted);
}

.demo__steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--dark-line);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 10px;
}

.step {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--dark-line);
  background: var(--dark-deep);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
}

.step__char {
  font-size: 22px;
  line-height: 1.2;
  color: var(--dark-ink);
}

.step__xor {
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
  color: var(--dark-muted);
}

.step__out {
  display: flex;
  gap: 6px;
  color: var(--dark-accent);
  font-weight: 600;
}

.demo__note {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--dark-muted);
}

/* Status and thanks */

.credits {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5vw, 64px);
}

.status {
  padding: clamp(20px, 2.4vw, 28px) clamp(20px, 2.6vw, 32px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  box-shadow: var(--flat-shadow);
}

.status__text {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 650;
}

.status__body {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.status__link {
  min-height: 48px;
  padding: 0 20px;
  font-size: 16px;
}

.status__link .icon {
  font-size: 16px;
}

.thanks {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.thanks__head {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.thanks__title {
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.thanks__lead {
  font-size: clamp(17px, 1.3vw, 19px);
}

.thanks__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 12px;
}

.thanks__list li {
  display: flex;
}

.thanks__link {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.thanks__link:hover {
  border-color: var(--edge);
}

.thanks__name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 16px;
  font-weight: 650;
}

.thanks__name .icon {
  font-size: 16px;
  stroke-width: 2;
  color: var(--muted);
}

.thanks__what {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* Footer */

.foot {
  border-top: 1px solid var(--line);
}

.foot__inner {
  padding-top: 36px;
  padding-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
}

.foot__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.foot .brand__mark {
  width: 28px;
  height: 28px;
}

.foot .brand__name {
  font-size: 18px;
}

.foot__tagline {
  font-size: 15px;
  color: var(--muted);
}

.foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
}

.foot__nav .nav__link {
  font-size: 15px;
}

.foot__legal {
  margin: 0;
  max-width: 820px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
