/* Fonts are served from this site: the page makes no request to anyone else. */
@font-face {
  font-family: 'Geist';
  src: url('fonts/geist-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Martian Mono';
  src: url('fonts/martian-mono-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --chalk: #f2f4f1;
  --paper: #ffffff;
  --ink: #14181f;
  --ink-2: #4a5361;
  --rule: #d5dad6;

  /* The three stages of a ticket, which are also the page's only colours */
  --todo: #5b6574;
  --doing: #2b58f5;
  --done: #0f8a5f;
  /* A timer is running */
  --live: #ff5a1f;

  /* The dark band: the part about your data */
  --band-bg: #14181f;
  --band-fg: #f2f4f1;
  --band-fg-2: #a9b2bf;
  --band-rule: #2c343f;

  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Martian Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --chalk: #0f1318;
    --paper: #171c23;
    --ink: #eceeea;
    --ink-2: #a6afbc;
    --rule: #2a323c;
    --todo: #66707f;
    --doing: #3d66ff;
    --done: #2fb583;
    --live: #ff6b35;
    --band-bg: #171c23;
    --band-fg: #eceeea;
    --band-fg-2: #a6afbc;
    --band-rule: #2a323c;
  }
}

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

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--doing);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(1120px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

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

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav {
  display: flex;
  gap: clamp(14px, 3vw, 28px);
  font-size: 0.9375rem;
}

.nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 640px) {
  .nav__optional {
    display: none;
  }
}

/* ---------- Buttons ---------- */

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.button--primary {
  background: var(--ink);
  color: var(--chalk);
}

.button--primary:hover {
  background: var(--doing);
  border-color: var(--doing);
  color: #fff;
  transform: translateY(-1px);
}

.button--plain:hover {
  background: var(--paper);
  transform: translateY(-1px);
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(20px, 3.5vw, 48px) clamp(56px, 8vw, 112px);
}

.facts {
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* The motto: short enough to be one big line */
h1 {
  margin: 0;
  font-size: clamp(2.75rem, 10.5vw, 7.5rem);
  font-weight: 640;
  line-height: 1;
  letter-spacing: -0.045em;
}

.lead {
  max-width: 54ch;
  margin: 20px 0 0;
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--ink-2);
}

.small {
  margin: 14px 0 0;
  font-size: 0.875rem;
  color: var(--ink-2);
}

/* The demo: one ticket, picked up. Its final state is the default; the script plays the way there. */

.stage {
  margin-top: clamp(32px, 4.5vw, 56px);
  padding: clamp(20px, 4vw, 40px);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 24px;
}

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

/* The time tracker is what this demo is about: the clock is the biggest thing in it */
.clock {
  display: inline-flex;
  align-items: center;
  gap: 0.22em;
  font-family: var(--mono);
  font-size: clamp(2.5rem, 11vw, 7.25rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.clock__dot {
  width: 0.2em;
  height: 0.2em;
  border-radius: 50%;
  background: var(--todo);
}

.clock.is-running .clock__dot {
  background: var(--live);
  animation: pulse 2s ease-in-out infinite;
}

.stage__toast {
  min-height: 1.5em;
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(0.6875rem, 1.8vw, 0.875rem);
  color: var(--done);
  /* Shown only while the demo plays: "the time was logged" */
  opacity: 0;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 55%, transparent);
  }
  70%,
  100% {
    box-shadow: 0 0 0 0.12em transparent;
  }
}

.stage__ticket {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin-top: clamp(16px, 2.5vw, 28px);
}

.stage__key {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1rem, 2.6vw, 1.5rem);
  letter-spacing: -0.03em;
}

.stage__title {
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  letter-spacing: -0.01em;
  color: var(--ink-2);
}

.rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(24px, 4vw, 40px);
  padding: 4px;
  background: var(--chalk);
  border: 1px solid var(--rule);
  border-radius: 14px;
  font-size: clamp(0.8125rem, 2vw, 1rem);
  font-weight: 600;
}

.rail__thumb {
  position: absolute;
  inset: 4px auto 4px 4px;
  width: calc((100% - 8px) / 3);
  border-radius: 10px;
  background: var(--doing);
  /* --i is the stop it sits on: 0 to do, 1 in progress, 2 done. The script moves it */
  transform: translateX(calc(var(--i, 1) * 100%));
  transition: background-color 0.7s ease;
}

.rail__thumb[data-stage='todo'] {
  background: var(--todo);
}

.rail__thumb[data-stage='done'] {
  background: var(--done);
}

.rail__stop {
  position: relative;
  padding: 12px 6px;
  text-align: center;
  color: var(--ink-2);
  transition: color 0.4s ease 0.2s;
}

.rail__stop.is-active {
  color: #fff;
}

.stage__shell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: clamp(20px, 3vw, 32px) 0 0;
  font-family: var(--mono);
  font-size: clamp(0.6875rem, 1.9vw, 0.9375rem);
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.stage__prompt {
  color: var(--done);
  font-weight: 700;
}

.stage__opens {
  color: var(--ink);
}

.stage__cmd.is-typing::after {
  content: '';
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: var(--ink);
  animation: blink 0.9s steps(2, start) infinite;
}

@keyframes blink {
  to {
    visibility: hidden;
  }
}

/* ---------- The app: its three views, with a switch like the real one ---------- */

.app {
  margin-top: clamp(32px, 4.5vw, 56px);
}

.app__switch {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
}

.app__switch[hidden] {
  display: none;
}

.app__switch button {
  min-height: 44px;
  padding: 0 clamp(16px, 3vw, 26px);
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

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

.app__switch button[aria-selected='true'] {
  background: var(--ink);
  color: var(--chalk);
}

.app__caption {
  min-height: 3em;
  max-width: 62ch;
  margin: 14px 0 16px;
  color: var(--ink-2);
}

.app__window {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 24px 60px -28px color-mix(in srgb, var(--ink) 45%, transparent);
}

.app__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--rule);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
}

.app__bar img {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.app__panel img {
  display: block;
  width: 100%;
  height: auto;
}

.app__panel:not([hidden]) {
  animation: appin 0.35s ease;
}

@keyframes appin {
  from {
    opacity: 0;
  }
}

.app__note {
  margin-top: 12px;
}

/* On a phone the whole window would be unreadably small: show the list, which is where the switch acts */
@media (max-width: 700px) {
  .app__panel {
    height: 480px;
    overflow: hidden;
  }

  .app__panel img {
    width: calc((100vw - 2 * var(--gutter)) * 2.87);
    max-width: none;
  }
}

/* ---------- Motion hooks: only when the script is going to animate (.js) ---------- */

/* The page, read from top to bottom, is a ticket going from to do, through in progress, to done */
.progress {
  display: none;
}

.js .progress {
  display: block;
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 3px;
  pointer-events: none;
}

.progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--todo), var(--doing) 50%, var(--done));
  clip-path: inset(0 100% 0 0);
}

/* Headline lines rise out of a mask. The padding keeps descenders inside it. */
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.line > span {
  display: block;
}

.js .line > span {
  opacity: 0;
}

.js [data-intro],
.js .reveal {
  opacity: 0;
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(56px, 9vw, 120px);
}

.section--band {
  background: var(--band-bg);
  color: var(--band-fg);
}

h2 {
  max-width: 20ch;
  margin: 0;
  font-size: clamp(1.75rem, 4.2vw, 3rem);
  font-weight: 620;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.intro {
  max-width: 56ch;
  margin: 16px 0 0;
  color: var(--ink-2);
}

.section--band .intro {
  color: var(--band-fg-2);
}

/* A row: what it is on the left, what it means on the right. Features and the data ledger share it. */

.rows {
  margin: clamp(32px, 5vw, 56px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 8px clamp(20px, 5vw, 64px);
  padding-block: clamp(22px, 3.5vw, 36px);
  border-bottom: 1px solid var(--rule);
}

.row__label {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.row__title {
  margin: 0;
  font-size: clamp(1.1875rem, 2.2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.row__text {
  max-width: 62ch;
  margin: 8px 0 0;
  color: var(--ink-2);
}

.row__code {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 8px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.section--band .rows,
.section--band .row {
  border-color: var(--band-rule);
}

.section--band .row__text {
  margin-top: 0;
  color: var(--band-fg);
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
}

.section--band .row__label {
  color: var(--band-fg-2);
  padding-top: 0.3em;
}

@media (max-width: 720px) {
  .row {
    grid-template-columns: 1fr;
  }
}

/* The stage a feature belongs to */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tag::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

.tag--todo {
  color: var(--todo);
}

.tag--doing {
  color: var(--doing);
}

.tag--done {
  color: var(--done);
}

@media (prefers-color-scheme: dark) {
  .tag--todo {
    color: #9aa4b2;
  }
  .tag--doing {
    color: #8aa6ff;
  }
}

.more {
  display: inline-block;
  margin-top: 28px;
  font-weight: 600;
}

.section--band .more {
  color: var(--band-fg);
}

/* ---------- Move and edit: tickets picked, dragged and dropped. The default is a still frame; flow.js plays it. ---------- */

.flow {
  margin-top: clamp(32px, 5vw, 48px);
}

.flow__window {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 24px 60px -28px color-mix(in srgb, var(--ink) 45%, transparent);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.flow__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-right: 1px solid var(--rule);
}

.frow {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--rule);
}

.frow.is-marked {
  background: color-mix(in srgb, var(--doing) 11%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--doing) 40%, transparent);
}

.frow.is-dragging {
  opacity: 0.45;
}

.frow.is-flash {
  animation: rowflash 1.1s ease;
}

@keyframes rowflash {
  from {
    background: color-mix(in srgb, var(--done) 30%, transparent);
  }
}

.frow__type {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--doing);
}

.frow__type--bug {
  background: var(--live);
}

.frow__type--story {
  background: var(--done);
}

.frow__key {
  flex: none;
  font-weight: 600;
  color: var(--ink-2);
}

.frow__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* What the edit changes: shown once it has been applied */
.frow__prio {
  flex: none;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-top: 0;
  border-bottom: 9px solid var(--live);
  opacity: 0;
}

.frow__due {
  flex: none;
  font-size: 0.75rem;
  color: var(--ink-2);
  opacity: 0;
}

.pill {
  flex: none;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pill--todo {
  background: color-mix(in srgb, var(--todo) 16%, transparent);
  color: var(--todo);
}

.pill--doing {
  background: color-mix(in srgb, var(--doing) 14%, transparent);
  color: var(--doing);
}

.pill--done {
  background: color-mix(in srgb, var(--done) 16%, transparent);
  color: var(--done);
}

@media (prefers-color-scheme: dark) {
  .pill--todo {
    color: #9aa4b2;
  }
  .pill--doing {
    color: #8aa6ff;
  }
}

.flow__pane {
  position: relative;
  min-height: 300px;
}

.flow__detail {
  padding: 18px 20px;
}

.flow__crumb {
  margin: 0;
  color: var(--ink-2);
  font-weight: 600;
}

.flow__name {
  margin: 8px 0 18px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.flow__line {
  display: block;
  height: 8px;
  margin-top: 10px;
  border-radius: 4px;
  background: var(--chalk);
}

.flow__line--short {
  width: 60%;
}

/* Over the detail while tickets are dragged: the edit zone, then the workflow graph */
.flow__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: var(--paper);
}

.flow__zone {
  display: grid;
  place-items: center;
  min-height: 56px;
  border: 1.5px dashed var(--ink-2);
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 600;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.flow__zone.is-hot {
  background: var(--chalk);
  border-color: var(--ink);
  border-style: solid;
  color: var(--ink);
}

.flow__graph {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 190px;
}

.flow__links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--rule);
  stroke-width: 1.5;
}

.flow__links path {
  vector-effect: non-scaling-stroke;
}

.gcol {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-self: stretch;
}

.gnode {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 8px 12px;
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.gcol .gnode {
  align-self: flex-end;
  width: min(100%, 150px);
}

.gnode.is-hot {
  border-color: var(--doing);
  background: color-mix(in srgb, var(--doing) 12%, var(--paper));
  transform: scale(1.04);
}

.gdot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.gdot--todo {
  background: var(--todo);
}

.gdot--doing {
  background: var(--doing);
}

.gdot--done {
  background: var(--done);
}

/* The bulk edit dialog */
.flow__dialog {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: color-mix(in srgb, var(--ink) 35%, transparent);
  opacity: 0;
  visibility: hidden;
}

.flow__dialog > * {
  width: min(86%, 380px);
  background: var(--paper);
  border-inline: 1px solid var(--rule);
}

.dlg__head {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  border: 1px solid var(--rule);
  border-radius: 10px 10px 0 0;
}

.dlg__head span {
  font-size: 0.75rem;
  color: var(--ink-2);
}

.dlg__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.dlg__field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
}

.dlg__val {
  min-width: 9em;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--chalk);
  color: var(--ink-2);
  font-weight: 500;
}

.dlg__val.is-set {
  color: var(--ink);
  border-color: var(--ink-2);
}

.dlg__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid var(--rule);
  border-radius: 0 0 10px 10px;
}

.dlg__btn {
  padding: 6px 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-weight: 600;
}

.dlg__btn--go {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--chalk);
}

.flow__toast {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 4;
  width: max-content;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 8px 16px;
  background: var(--ink);
  color: var(--chalk);
  border-radius: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
}

.flow__undo {
  padding: 4px 10px;
  border-radius: 7px;
  font-weight: 700;
  color: #8aa6ff;
}

@media (prefers-color-scheme: dark) {
  .flow__undo {
    color: var(--doing);
  }
}

.flow__cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.flow__cursor svg {
  display: block;
  fill: var(--ink);
  stroke: var(--paper);
  stroke-width: 1;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.3));
}

.flow__ghost {
  position: absolute;
  left: 16px;
  top: 14px;
  padding: 3px 9px;
  background: var(--ink);
  color: var(--chalk);
  border-radius: 7px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
}

.flow__caption {
  min-height: 3em;
  max-width: 62ch;
  margin: 16px 0 0;
  color: var(--ink-2);
}

.basics {
  max-width: 62ch;
  margin: 28px 0 0;
  color: var(--ink-2);
}

.basics code {
  padding: 1px 6px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 0.8em;
}

/* Narrow: the list above, the pane below */
@media (max-width: 700px) {
  .flow__window {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow__pane {
    min-height: 280px;
  }

  .flow__list {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .frow__due {
    display: none;
  }
}

/* ---------- Quick start: the two apps a worktree opens in ---------- */

.launchers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 3vw, 28px);
  margin: clamp(32px, 5vw, 48px) 0 0;
  padding: 0;
  list-style: none;
}

.launcher {
  padding: clamp(20px, 3vw, 32px);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.launcher__logo {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.launcher__name {
  margin: 16px 0 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.launcher__text {
  margin: 8px 0 0;
  color: var(--ink-2);
}

.launcher__need {
  margin: 14px 0 0;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.launcher__need code {
  padding: 1px 6px;
  background: var(--chalk);
  border: 1px solid var(--rule);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 0.8em;
}

#quick-start h2 {
  max-width: 24ch;
}

#quick-start .small {
  margin-top: 24px;
}

@media (max-width: 720px) {
  .launchers {
    grid-template-columns: 1fr;
  }
}

/* ---------- Steps: a real sequence, so these are numbered ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 48px);
  margin: clamp(32px, 5vw, 56px) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font-family: var(--mono);
  font-weight: 700;
}

.step h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.step p {
  margin: 8px 0 0;
  color: var(--ink-2);
}

@media (max-width: 820px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ---------- Questions ---------- */

.faq {
  margin: clamp(32px, 5vw, 48px) 0 0;
  border-top: 1px solid var(--rule);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  font-family: var(--mono);
  color: var(--ink-2);
}

.faq details[open] summary::after {
  content: '\2212';
}

.faq p {
  max-width: 62ch;
  margin: 0 0 22px;
  color: var(--ink-2);
}

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

.foot {
  padding-block: 40px 56px;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.foot p {
  max-width: 70ch;
  margin: 0 0 8px;
}

/* ---------- Always in sight: the timer notch, and the window shrunk to it. The default is a still frame; mini.js plays it. ---------- */

.mini {
  margin-top: clamp(32px, 5vw, 48px);
}

/* A desktop: an editor behind, Tracket in front. Sizes follow its width, so the scene scales as a whole. */
.mini__desk {
  position: relative;
  overflow: hidden;
  container-type: inline-size;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--doing) 30%, var(--chalk)),
    color-mix(in srgb, var(--live) 22%, var(--chalk))
  );
}

.mini__editor,
.mini__app {
  font-size: max(9px, 1.45cqw);
  line-height: 1.4;
}

.mini__editor {
  position: absolute;
  inset: 3% 2% 3% 2%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 0.8em;
}

.mini__etitle {
  display: flex;
  align-items: center;
  gap: 0.45em;
  height: 2.6em;
  padding: 0 0.9em;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  color: var(--ink-2);
}

.mini__etitle i,
.mini__ctrl i {
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: var(--rule);
}

.mini__etitle span {
  margin-left: 0.6em;
}

.mini__code {
  padding: 0.9em 1.2em;
}

.cl {
  display: block;
  width: var(--w);
  height: 0.7em;
  margin: 0.7em 0 0.7em calc(var(--in, 0) * 1.8em);
  border-radius: 0.35em;
  background: color-mix(in srgb, var(--ink) 16%, transparent);
}

.cl--k {
  background: color-mix(in srgb, var(--doing) 42%, transparent);
}

.mini__app {
  position: absolute;
  left: 17%;
  top: 16%;
  z-index: 2;
  width: 70%;
  height: 76%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 0.9em;
  box-shadow: 0 1.6em 3.2em -1.6em color-mix(in srgb, var(--ink) 55%, transparent);
}

.mini__bar {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.55em;
  height: 2.7em;
  padding: 0 0.9em;
  border-bottom: 1px solid var(--rule);
}

.mini__mark {
  width: 1.3em;
  height: 1.3em;
}

.mini__name {
  font-weight: 600;
  color: var(--ink-2);
}

.mini__ctrl {
  display: flex;
  gap: 0.5em;
  margin-left: auto;
}

/* The notch hangs in the middle of the bar; the script slides it in when the timer starts */
.mini__notchbox {
  position: absolute;
  inset: 0.4em 0 auto 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.mini__notch,
.mini__pill {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #050505;
  color: #fff;
  font-family: var(--mono);
  font-weight: 600;
}

.mini__notch {
  height: 1.9em;
  padding: 0 0.85em;
  border: 1px solid rgb(255 255 255 / 0.1);
}

.mini__dot {
  flex: none;
  width: 0.6em;
  height: 0.6em;
  margin-right: 0.55em;
  border-radius: 50%;
  background: var(--live);
  animation: pulse 2s ease-in-out infinite;
}

.mini__clock {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* The button that shrinks (or brings back) the window: out of sight until the pill is pointed at */
.mini__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0;
  height: 1.4em;
  margin-left: 0;
  overflow: hidden;
  border-radius: 50%;
  opacity: 0;
  transition:
    width 0.2s ease,
    margin-left 0.2s ease,
    opacity 0.2s ease;
}

.mini__btn svg {
  flex: none;
  width: 0.95em;
  height: 0.95em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.is-hover > .mini__btn {
  width: 1.4em;
  margin-left: 0.5em;
  opacity: 1;
}

.mini__body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  min-height: 0;
}

.mini__list {
  border-right: 1px solid var(--rule);
}

.mini__list span {
  display: block;
  height: 3.4em;
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(var(--rule), var(--rule)) 1em 1em / 3.2em 0.6em no-repeat,
    linear-gradient(color-mix(in srgb, var(--ink) 14%, transparent), color-mix(in srgb, var(--ink) 14%, transparent)) 1em
      1.9em / 62% 0.6em no-repeat;
}

.mini__list span:first-child {
  background-color: color-mix(in srgb, var(--doing) 11%, transparent);
}

.mini__detail {
  padding: 1em 1.2em;
}

.mini__key {
  margin: 0 0 0.8em;
  font-family: var(--mono);
  font-weight: 700;
}

.mini__line {
  display: block;
  height: 0.6em;
  margin-bottom: 0.7em;
  border-radius: 0.3em;
  background: color-mix(in srgb, var(--ink) 14%, transparent);
}

.mini__line--short {
  width: 60%;
}

/* The shrunk window: shown by the script only, once the window is a pill */
.mini__pill {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
}

.mini__cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.mini__cursor svg {
  display: block;
  fill: var(--ink);
  stroke: var(--paper);
  stroke-width: 1;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.3));
}

/* The real thing, after the scene: the app with its notch, and the pill it shrinks to */
.shots {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 32px);
  align-items: start;
  margin-top: clamp(24px, 4vw, 40px);
}

.shot {
  margin: 0;
}

.shot figcaption {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.shot__window {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 24px 60px -28px color-mix(in srgb, var(--ink) 45%, transparent);
}

.shot__window img {
  display: block;
  width: 100%;
  height: auto;
}

/* The pill sits on a desktop, like the scene above, as it does on a real screen */
.shot__desk {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 12%;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--doing) 30%, var(--chalk)),
    color-mix(in srgb, var(--live) 22%, var(--chalk))
  );
}

.shot__desk img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 14px rgb(0 0 0 / 0.35));
}

@media (max-width: 700px) {
  .shots {
    grid-template-columns: minmax(0, 1fr);
  }

  .shot__desk {
    aspect-ratio: 16 / 7;
    padding: 6% 18%;
  }
}

/* ---------- Themes: three screenshots, stacked ---------- */

.themes {
  margin-top: clamp(28px, 4vw, 44px);
}

.themes__switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
}

.themes__switch[hidden] {
  display: none;
}

.themes__switch button {
  min-height: 44px;
  padding: 0 clamp(14px, 3vw, 24px);
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

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

.themes__switch button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--chalk);
}

/* The one in front is whole, the two behind show a strip of their title bar above it. Everything is measured from the
   bottom of the stack: a card is as high as its picture, so the percentages are those of that height. */
.themes__stack {
  position: relative;
  margin-top: 24px;
  aspect-ratio: 2200 / 1680;
}

.themes__card {
  --y: 0%;
  --scale: 1;
  position: absolute;
  inset: auto 0 0;
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 24px 60px -28px color-mix(in srgb, var(--ink) 45%, transparent);
  transform: translateY(var(--y)) scale(var(--scale));
  transform-origin: 50% 100%;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s ease;
}

.themes__card img {
  display: block;
  width: 100%;
  height: auto;
}

.themes__card[data-pos='0'] {
  z-index: 3;
}

.themes__card[data-pos='1'] {
  --y: -14%;
  --scale: 0.94;
  z-index: 2;
  filter: brightness(0.88);
}

.themes__card[data-pos='2'] {
  --y: -28%;
  --scale: 0.88;
  z-index: 1;
  filter: brightness(0.76);
}

/* Without the script nothing is clickable, so nothing says it is */
.js-themes .themes__card:not([data-pos='0']) {
  cursor: pointer;
}

.js-themes .themes__card[data-pos='1']:hover {
  --y: -16%;
  filter: brightness(1);
}

.js-themes .themes__card[data-pos='2']:hover {
  --y: -30%;
  filter: brightness(0.92);
}

.themes__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 32px);
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.themes__list li {
  padding-top: 12px;
  border-top: 2px solid var(--rule);
  transition: border-color 0.3s ease, color 0.3s ease;
}

.themes__list li.is-front {
  border-color: var(--ink);
  color: var(--ink);
}

.themes__list strong {
  color: var(--ink);
}

.themes__note {
  max-width: 62ch;
  margin-top: 20px;
}

@media (max-width: 700px) {
  .themes__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
}

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

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