/* Spekkr. The identity is "quiet pixel": the name, Pekk the woodpecker and
   the clouds in his sky are drawn in pixels, and everything else is plain. Hanken Grotesk is for
   everything that is read. DM Mono is only for what is typed or pasted:
   ids, the line, commands and file names. The red of Pekk's crest is used
   nowhere else.

   A page is a sheet of paper on a ground, set on four columns. The rules
   that say so are under "Sheet", near the end of this file: they are laid
   over the rules above them, which still shape everything they do not
   name. */
:root {
  color-scheme: light dark;
  /* The ground a sheet lies on, and the sheet. */
  --ground: #ecebe8;
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #16181d;
  --mute: #5f6168;
  --line: #e4e4e1;
  --pale: #f3f3f1;
  /* The edge of a box to type in or tick, which has to be seen. */
  --field: #868c98;
  --sky: #a8dcff;
  --sky-mute: #2f3a48;
  --mark: #a8dcff;
  --crest: #f0442b;
  /* The white of Pekk's stripe. On a dark page it is the page's ground. */
  --pkw: #ffffff;
  --panel: #16181d;
  --panel-text: #ffffff;
  --panel-well: #272b34;
  --panel-mute: #b9bdc6;
  --pass: #0f7a56;
  --fail: #b3362c;
  /* The fill of a ticked box. */
  --accent: #16181d;
  --lift: 0 16px 30px -20px rgba(22, 24, 29, 0.5);
  --sheet-shadow: 0 1px 0 rgba(22, 24, 29, 0.03), 0 40px 60px -40px rgba(22, 24, 29, 0.22);
  --measure: 46rem;
  --wide: 85rem;
  /* The sheet's own margin, the space between it and the window, and the
     space between two of its four columns. */
  --pad: clamp(1.25rem, 3.6vw, 3rem);
  --edge: clamp(0.375rem, 1.4vw, 1.25rem);
  --gap: 2rem;
  /* The weight of a line of display type. */
  --display: 520;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Night, for a reader whose system asks for a dark page: deep indigo, with
   Pekk turned white. */
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0b0c1c;
    --bg: #14162e;
    --surface: #1c1f40;
    --ink: #f4f5fa;
    --mute: #b3b8d0;
    --line: #2b2f55;
    --pale: #1d2042;
    --field: #7d84ad;
    --sky: #253a78;
    --sky-mute: #c9d3f0;
    --mark: #3550a8;
    --pkw: #0b0c1c;
    --panel: #1c1f40;
    --panel-text: #f4f5fa;
    --panel-well: #12142b;
    --panel-mute: #b3b8d0;
    --pass: #6ad3a8;
    --fail: #ff9a8c;
    /* A mid blue: a browser's tick shows on it whether drawn white or
       black. */
    --accent: #6f8df5;
    --lift: 0 16px 30px -20px rgba(0, 0, 0, 0.7);
    --sheet-shadow: 0 40px 60px -40px rgba(0, 0, 0, 0.8);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* A place a link jumps to stays clear of the masthead. */
  scroll-padding-top: 5.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
}

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

a:hover {
  color: var(--mute);
}

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

button,
input,
select {
  font: inherit;
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1.04;
  text-wrap: balance;
}

h2 {
  font-size: 1.55rem;
  font-weight: 720;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 0.9rem;
}

dd {
  margin: 0;
}

[hidden] {
  display: none !important;
}

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

/* The first thing the Tab key reaches: a way past the masthead. */
.skip {
  position: absolute;
  top: 0.75rem;
  left: -100rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 650;
}

.skip:focus {
  left: 0.75rem;
  color: var(--bg);
}

/* Pixels: the name and Pekk. Each drawing is paths of whole pixels, kept
   sharp at any size. The head takes the page's ink and the stripe its
   opposite, so Pekk turns white on a dark page. */
.px {
  display: block;
  flex: none;
  shape-rendering: crispEdges;
}

.px-ink {
  fill: var(--ink);
}

.px-white {
  fill: var(--pkw);
}

.px-crest {
  fill: var(--crest);
}

/* Pekk pecks twice every four seconds, and not at all for a reader who
   asked for less motion. */
.pekk-tok {
  opacity: 0;
}

@keyframes pekk-rest {
  0%,
  79.9% {
    opacity: 1;
  }
  80%,
  84.9% {
    opacity: 0;
  }
  85%,
  89.9% {
    opacity: 1;
  }
  90%,
  94.9% {
    opacity: 0;
  }
  95%,
  100% {
    opacity: 1;
  }
}

@keyframes pekk-tok {
  0%,
  79.9% {
    opacity: 0;
  }
  80%,
  84.9% {
    opacity: 1;
  }
  85%,
  89.9% {
    opacity: 0;
  }
  90%,
  94.9% {
    opacity: 1;
  }
  95%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .pekk-rest {
    animation: pekk-rest 4s linear infinite;
  }

  .pekk-tok {
    animation: pekk-tok 4s linear infinite;
  }
}

/* Where Pekk answers a copy: the tick is there for a moment after the line
   is copied, and Pekk stands still while it is. */
.answers .pekk-sign {
  visibility: hidden;
}

.answers.is-copied .pekk-sign {
  visibility: visible;
}

.answers.is-copied .pekk-rest {
  animation: none;
  opacity: 1;
}

.answers.is-copied .pekk-tok {
  animation: none;
  opacity: 0;
}

/* The page frame. The masthead stays at the top, a little see-through,
   with a hairline under it. */
.masthead {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.masthead-in,
.colophon-in,
main {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.masthead-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.wordmark {
  display: flex;
  align-items: center;
  min-height: 48px;
  border-radius: 0.5rem;
}

.wordmark svg {
  width: 150px;
  height: 48px;
}

.masthead nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.375rem;
  font-weight: 550;
  font-size: 1rem;
}

.masthead nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.875rem;
  border-radius: 0.75rem;
  color: var(--ink);
  text-decoration: none;
}

.masthead nav a:hover {
  background: var(--pale);
}

/* The link to the page being read has a line under it. */
.masthead nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

.masthead nav .nav-signin {
  margin-left: 0.5rem;
  padding: 0 1.125rem;
  background: var(--ink);
  color: var(--bg);
}

.masthead nav .nav-signin:hover {
  background: var(--mute);
}

/* The small box in the masthead of every page but the front page. What is
   typed there is searched on the front page. */
.masthead-find {
  flex: 1 1 13.75rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  max-width: 26.25rem;
  min-height: 44px;
  padding: 0 0.5rem 0 0.875rem;
  border: 1px solid var(--field);
  border-radius: 0.875rem;
  background: var(--surface);
}

.masthead-find:focus-within,
.finder:focus-within {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.masthead-find input,
.finder .search {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}

.masthead-find input {
  height: 42px;
  font-size: 0.95rem;
}

.masthead-find input::placeholder,
.finder .search::placeholder {
  color: var(--mute);
  opacity: 1;
}

.masthead-find input::-webkit-search-cancel-button,
.finder .search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  display: none;
}

.finder-icon {
  flex: none;
  display: flex;
}

.finder-icon svg {
  width: 1.375rem;
  height: 1.375rem;
  fill: none;
  stroke: var(--mute);
  stroke-width: 2;
  stroke-linecap: round;
}

.masthead-find .finder-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* The key that puts the cursor in the box. It goes once the box is in use,
   and is not shown where there is no keyboard to press it on. */
.finder-key {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 0.5625rem;
  background: var(--pale);
  color: var(--mute);
  font-size: 0.875rem;
}

.masthead-find .finder-key {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
}

input:focus ~ .finder-key,
input:not(:placeholder-shown) ~ .finder-key,
.clear:not([hidden]) ~ .finder-key {
  display: none;
}

@media (hover: none) {
  .finder-key {
    display: none;
  }
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  padding-top: 1rem;
  padding-bottom: 4.5rem;
}

/* A page of reading keeps to a measure. A section marked .wide, and a
   spec's own page, use the full width. */
main > section,
main > article {
  width: 100%;
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

main > .wide,
main > .spec {
  max-width: none;
}

main > .spec-plain {
  max-width: var(--measure);
}

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

.colophon-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2.5rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.colophon p {
  max-width: 42rem;
  margin: 0;
  color: var(--mute);
  font-size: 0.92rem;
}

.colophon p a {
  color: var(--mute);
}

.colophon nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  font-weight: 550;
  font-size: 0.95rem;
}

.colophon nav a {
  padding: 0.625rem 0;
}

/* Words that are said more quietly. */
.lede {
  max-width: 40rem;
  margin: 0.75rem 0 0;
  color: var(--mute);
  font-size: 1.2rem;
  line-height: 1.42;
}

.label {
  margin: 0 0 0.5rem;
  color: var(--mute);
  font-size: 0.95rem;
  font-weight: 550;
}

.hint,
.empty,
.twin,
.notice,
.draft {
  color: var(--mute);
  font-size: 0.95rem;
}

/* A page that is still a template. */
.draft {
  margin: 0 0 1.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

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

/* Text links to specs, under the kind buttons. */
.key-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 0 0 1.75rem;
}

.key-specs a {
  color: var(--ink);
}

.hint,
.empty {
  margin: 0.75rem 0 0;
}

.is-pass {
  color: var(--pass);
}

.is-fail {
  color: var(--fail);
}

/* Buttons. The filled one is the thing to do; the outlined one is the
   other thing. */
.button,
.copy,
.more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.375rem;
  border: 1.5px solid var(--ink);
  border-radius: 0.875rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.copy:hover,
.more:hover {
  border-color: var(--mute);
  background: var(--mute);
  color: var(--bg);
}

.button-quiet {
  background: transparent;
  color: var(--ink);
}

.button-quiet:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.copy {
  flex: none;
  padding: 0 1.5rem;
}

/* A line to copy, in a box with its button: on the page about publishing,
   the sentence that publishes a spec. */
.says {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem 1.25rem;
  min-height: 72px;
  padding: 0.75rem 0.75rem 0.75rem 1.625rem;
  border-radius: 1.375rem;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--lift);
}

.says code {
  flex: 1 1 17.5rem;
  min-width: 0;
  font-size: clamp(0.86rem, 1.45vw, 1.12rem);
  overflow-wrap: anywhere;
}

/* A choice among a few things, as a button for each. They are radio
   buttons, so the arrow keys move between them. */
.segs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.seg {
  position: relative;
  display: inline-flex;
}

.seg input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.seg span {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.875rem;
  border: 1px solid var(--field);
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.seg:hover span {
  border-color: var(--ink);
}

.seg input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.seg input:focus-visible + span {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* Front page. It opens on a rounded panel of sky: the headline with a
   sentence beside it, and under them the box that finds a spec, as wide as
   the panel, with Pekk standing on it. The panel names no spec. Where
   there is no room beside the headline, the sentence goes under it. */
.hero {
  display: flex;
  flex-direction: column;
  gap: clamp(1.125rem, 2.2vw, 1.75rem);
  padding: clamp(1.375rem, 4.4vw, 3.75rem);
  border-radius: 2rem;
  background: var(--sky);
}

.hero-pitch {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 3.5rem;
  min-width: 0;
}

.hero h1 {
  flex: 999 1 32.5rem;
  min-width: 0;
  font-size: clamp(2.6rem, 5.4vw, 4.6rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero .lede {
  flex: 1 1 21.25rem;
  max-width: 37.5rem;
  margin: 0 0 0.375rem;
  color: var(--sky-mute);
}

.hero-links {
  margin: 0.75rem 0 0;
}

.hero-links a {
  color: var(--ink);
}

/* The box that finds a spec. The space above it is where Pekk stands. */
.finder {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  height: 76px;
  margin-top: 70px;
  padding: 0 1rem 0 1.625rem;
  border-radius: 1.375rem;
  background: var(--surface);
  box-shadow: var(--lift);
}

.finder .search {
  height: 100%;
  font-size: 1.25rem;
}

/* Pekk stands on the box, near its left end. */
.pekk-pecks {
  position: absolute;
  bottom: 100%;
  left: 1.625rem;
  width: 100px;
  height: 70px;
}

/* Clear sits in the box while a search or a kind is being looked at. */
.clear {
  flex: none;
  min-height: 44px;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.clear:hover {
  background: var(--pale);
}

/* Searches to try. The script shows them. */
.tries {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.125rem 1.125rem;
  margin: 0;
  color: var(--sky-mute);
}

.try {
  padding: 0.625rem 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-weight: 550;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.try:hover {
  color: var(--sky-mute);
}

/* Once someone searches or picks a kind, the panel steps back to the box
   alone, so that what was found starts near the top of the window. */
.hero.is-listing {
  gap: 0;
  padding: 0;
  border-radius: 0;
  background: none;
}

.hero.is-listing h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hero.is-listing .lede,
.hero.is-listing .tries,
.hero.is-listing .pekk-pecks {
  display: none;
}

.hero.is-listing .finder {
  height: 64px;
  margin-top: 0.75rem;
  border: 1.5px solid var(--ink);
  box-shadow: none;
}

/* The space between the panel and what a spec builds is half the space
   between the page's other parts. */
main > .hero + #specs {
  margin-top: -1.75rem;
}

main > .hero.is-listing + #specs {
  margin-top: -2.5rem;
}

/* What a spec builds, a button for each kind with how many it has. One
   row, which scrolls sideways where it does not fit. */
.filters {
  display: flex;
  gap: 0.5rem;
  margin: 0 -0.25rem;
  padding: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 550;
  font-size: 0.95rem;
  white-space: nowrap;
  cursor: pointer;
}

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

.chip.is-on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.chip-n {
  font-weight: 450;
  font-variant-numeric: tabular-nums;
  opacity: 0.72;
}

/* Where there is a pointer and room, the kinds that do not fit go to a
   second row: a row that scrolls sideways is hard to move with a mouse. */
@media (hover: hover) and (min-width: 56rem) {
  .filters {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

/* The shelves: a heading, and a row of cards. */
#shelves {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  margin-top: 1.75rem;
}

.shelf {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* The specs near a spec, under its page: a shelf like the front page's,
   set off from the spec by a rule. */
.related {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.shelf-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}

.shelf-head h3,
.how h2,
.publish h2,
.related h2 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 720;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.shelf-head h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.75rem;
}

.shelf-n {
  color: var(--mute);
  font-size: 1rem;
  font-weight: 450;
  letter-spacing: 0;
}

.see-all {
  padding: 0.625rem 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-weight: 550;
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  white-space: nowrap;
  cursor: pointer;
}

.see-all:hover {
  color: var(--mute);
}

.shelves-all {
  margin: -1.5rem 0 0;
}

.shelves-all .button {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 1.125rem;
  font-weight: 600;
}

.shelves-all .button:hover {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

/* A card has no box of its own: its picture has a frame and its words sit
   on the page. Four to a row, two on a narrow screen. */
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cards > li {
  display: flex;
  min-width: 0;
}

/* A page of one user's specs lays the same cards out as they come. */
.cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}

/* Platforms and who published a spec, under the summary on a kind hub. */
.card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  color: var(--mute);
  font-size: 0.82rem;
}

.card-platforms + .card-by::before {
  content: "· ";
}

/* The kinds, each with how many specs it has. */
.kind-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: 0 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kind-list a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.kind-list a span {
  color: var(--mute);
  font-weight: 450;
}

.kind-list a:hover {
  color: var(--ink);
}

.kind-list a:hover span {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  border-radius: 1.125rem;
  color: var(--ink);
  text-decoration: none;
}

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

/* The spec's first screenshot, cropped to one shape so the cards line up.
   The frame is there without a picture too. */
.card-shot,
.result-shot {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.125rem;
  background: var(--pale);
}

.card-shot img,
.result-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.card:hover .card-shot,
.card:focus-visible .card-shot,
.result:hover .result-shot {
  border-color: var(--ink);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

.card-name {
  font-weight: 650;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.card-summary,
.result-summary {
  color: var(--mute);
  font-size: 0.93rem;
  line-height: 1.45;
}

/* Two lines of what the spec does, and no more. */
.card-summary,
.result-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--mute);
  font-size: 0.82rem;
}

.card-id,
.result-id {
  min-width: 0;
  overflow: hidden;
  font-family: var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The id takes the room; what the spec builds and its counts sit at the
   other end. */
.card-id {
  flex: 1 1 auto;
}

.card-kind,
.tally {
  flex: none;
  white-space: nowrap;
}

/* What is trending: the first card large, the next three beside it, each
   with its rank. */
.cards-ranked {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
}

.cards-ranked > li:first-child {
  grid-row: 1 / span 3;
}

.cards-ranked > li:first-child .card {
  gap: 1rem;
}

.cards-ranked > li:first-child .card-shot {
  border-radius: 1.375rem;
}

.cards-ranked > li:first-child .card-name {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cards-ranked > li:first-child .card-summary {
  font-size: 1rem;
}

.cards-ranked > li:first-child .card-meta {
  font-size: 0.85rem;
}

.cards-ranked > li:not(:first-child) .card {
  flex-direction: row;
  align-items: center;
  gap: 1.125rem;
}

.cards-ranked > li:not(:first-child) .card-shot {
  flex: none;
  width: clamp(6.5rem, 34%, 12.5rem);
  border-radius: 1rem;
}

.cards-ranked > li:not(:first-child) .card-body {
  flex: 1 1 auto;
}

.cards-ranked > li:not(:first-child) .card-name {
  font-size: 1.1rem;
}

.card-rank {
  margin-right: 0.75rem;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

/* The list a search or a kind finds: how many, then a line for each. */
#results {
  margin-top: 1.25rem;
}

/* Without the script the list is the whole catalog, under the shelves. */
#shelves:not([hidden]) + #results {
  margin-top: 3.5rem;
}

.results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
  min-height: 3rem;
}

.results-bar h3 {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: 0;
}

/* The order of the list. The script shows it. */
.sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--mute);
  font-weight: 550;
  font-size: 0.95rem;
}

.sort select {
  min-height: 44px;
  padding: 0 0.75rem;
  border: 1px solid var(--field);
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.catalog {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.catalog li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) minmax(0, 13rem) 8rem 6.5rem;
  align-items: center;
  column-gap: 1rem;
  padding: 0.875rem 0;
  border-top: 1px solid var(--line);
}

.result {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 1;
  grid-template-columns: subgrid;
  align-items: center;
  column-gap: 1rem;
  color: var(--ink);
  text-decoration: none;
}

.result-shot {
  grid-column: 1;
}

.result-text {
  grid-column: 2;
}

.result-id {
  grid-column: 3;
}

.result-tally {
  grid-column: 5;
}

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

.result-shot {
  border-radius: 0.75rem;
}

.result-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.result-name {
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.3;
}

.result:hover .result-name {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.result-summary {
  font-size: 0.9rem;
  line-height: 1.43;
}

.result-id,
.result-kind,
.result-tally {
  color: var(--mute);
  font-size: 0.82rem;
}

.result-id {
  font-size: 0.8rem;
}

.result-kind,
.result-tally {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The kind sits in its own column, over the empty cell of the spec link,
   so the row still opens the spec and the kind opens its hub. */
a.result-kind {
  grid-column: 4;
  grid-row: 1;
  z-index: 1;
  justify-self: start;
  max-width: 100%;
  color: var(--mute);
  text-decoration: none;
}

a.result-kind:hover {
  color: var(--ink);
  text-decoration: underline;
}

.result-tally {
  text-align: right;
}

/* The words a search found. */
.result mark {
  padding: 0 2px;
  border-radius: 4px;
  background: var(--mark);
  color: var(--ink);
}

/* A search that finds nothing: Pekk asks, and the words say what to do. */
.nothing {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 0;
}

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

.pekk-asks {
  width: 64px;
  height: 56px;
}

/* How it works: three steps. */
.how {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.steps3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18.75rem, 100%), 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps3 li {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  min-width: 0;
  padding: 1.5rem;
  border-radius: 1.5rem;
  background: var(--pale);
}

.steps3 p {
  margin: 0;
  color: var(--mute);
  font-size: 0.98rem;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-head h3 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.step-n {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.875rem;
  height: 1.875rem;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
}

.how > .hint {
  margin: 0;
  font-size: 1rem;
}

/* Connecting an agent: a dark panel, with a button for each agent and the
   command to copy. Without the script every agent's part is shown, one
   under the other. */
.connect {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.75rem 3.5rem;
  padding: clamp(1.375rem, 4.4vw, 3.5rem);
  border-radius: 2rem;
  background: var(--panel);
  color: var(--panel-text);
}

.connect :focus-visible {
  outline-color: var(--panel-text);
}

.connect-copy {
  flex: 1 1 22.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  min-width: 0;
}

.connect h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}

.connect-copy p {
  margin: 0;
  color: var(--panel-mute);
  font-size: 1.05rem;
}

.tabs {
  flex: 1 1 28.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  min-width: 0;
}

.tablist {
  display: none;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.is-tabbed .tablist {
  display: flex;
}

.tablist button {
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--panel-mute);
  border-radius: 0.75rem;
  background: transparent;
  color: var(--panel-text);
  font-weight: 550;
  font-size: 0.95rem;
  cursor: pointer;
}

.tablist button:hover {
  border-color: var(--panel-text);
}

.tablist button.is-on {
  border-color: var(--panel-text);
  background: var(--panel-text);
  color: var(--panel);
}

.panel h3 {
  margin-bottom: 0.375rem;
}

.is-tabbed .panel h3 {
  display: none;
}

.panel p {
  margin: 0 0 0.625rem;
  color: var(--panel-mute);
  font-size: 0.95rem;
}

.panel p code {
  color: var(--panel-text);
}

.well {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem 1rem;
  padding: 0.875rem 0.875rem 0.875rem 1.25rem;
  border-radius: 1.125rem;
  background: var(--panel-well);
}

.well pre {
  flex: 1 1 16.25rem;
  min-width: 0;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.well code {
  font-size: 1em;
}

.well .copy,
.panel .button {
  min-height: 44px;
  padding: 0 1.125rem;
  border-color: var(--panel-text);
  border-radius: 0.75rem;
  background: var(--panel-text);
  color: var(--panel);
  font-size: 0.95rem;
}

.well .copy:hover,
.panel .button:hover {
  border-color: var(--panel-mute);
  background: var(--panel-mute);
  color: var(--panel);
}

.panel .button {
  margin-top: 0.75rem;
  background: transparent;
  color: var(--panel-text);
}

.publish {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
}

.pekk-publish {
  width: 96px;
  height: 84px;
}

.publish-copy {
  flex: 1 1 26.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.publish p {
  max-width: 41.25rem;
  margin: 0;
  color: var(--mute);
  font-size: 1.02rem;
}

.publish .button {
  flex: none;
}

/* A spec's page: the title, a strip of what it is, then two columns. The
   panel that builds the spec stays on screen beside what is read. On a
   narrow screen it comes straight after the title. */
.spec {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.625rem;
  margin: 0.75rem 0 0;
  color: var(--mute);
  font-size: 0.92rem;
}

.breadcrumb a {
  padding: 0.625rem 0;
  color: var(--mute);
}

.breadcrumb [aria-current] {
  color: var(--ink);
}

.spec-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.spec-head h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.7rem);
  line-height: 1.02;
}

.spec-head .lede {
  max-width: 48.75rem;
  margin: 0;
  font-size: 1.25rem;
}

.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(11.875rem, 100%), 1fr));
  margin: 0.5rem 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.strip div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 0.875rem 1.25rem 0.875rem 0;
}

.strip dt {
  color: var(--mute);
  font-size: 0.82rem;
}

.strip dd {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.strip dd code {
  font-weight: 400;
  font-size: 0.95rem;
}

.spec-cols {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 1.25rem;
}

.spec-main,
.spec-plain {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  min-width: 0;
}

.spec-plain {
  gap: 2.75rem;
}

.dock {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1.75rem;
  background: var(--sky);
}

/* Pekk stands on the box that holds the line. */
.dock-top {
  display: flex;
  align-items: flex-end;
  gap: 0.875rem;
  margin-bottom: -1rem;
  padding-left: 1.125rem;
}

.dock-top h2 {
  margin: 0 0 0.625rem;
  font-size: 1.4rem;
  letter-spacing: -0.025em;
}

.pekk-dock {
  width: 64px;
  height: 56px;
}

.dock-line {
  padding: 1rem 1.125rem;
  border-radius: 1.125rem;
  background: var(--surface);
}

.dock-line code {
  display: block;
  font-size: 0.92rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.copy-line {
  width: 100%;
  min-height: 52px;
  border-radius: 1rem;
  font-size: 1.02rem;
}

.dock .hint,
.dock .notice {
  margin: 0;
  color: var(--sky-mute);
  font-size: 0.92rem;
}

.notice strong,
.notice a {
  color: var(--ink);
}

/* A listing's star and how often its spec was pulled. The script shows
   each once it knows what to say. */
.spec-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.spec-stats:not(:has(> :not([hidden]))) {
  display: none;
}

.star {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--sky-mute);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}

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

.star:disabled {
  cursor: default;
  opacity: 0.6;
}

.star svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linejoin: round;
}

.star[aria-pressed="true"] svg {
  fill: currentColor;
}

.star-count {
  color: var(--mute);
  font-weight: 450;
  font-variant-numeric: tabular-nums;
}

.star-count:empty {
  display: none;
}

@media (min-width: 62.5rem) {
  .spec-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
    align-items: start;
    gap: 2.5rem 3rem;
  }

  .dock {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 5.75rem;
    max-height: calc(100vh - 7rem);
    max-height: calc(100dvh - 7rem);
    overflow-y: auto;
  }

  .spec-main {
    grid-column: 1;
    grid-row: 1;
  }
}

/* Screenshots: one large, and the others small under it. A picture is a
   link to itself. The script lets the small ones pick the large one, and
   opens the large one over the page. */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(8.125rem, 100%), 1fr));
  gap: 0.75rem;
}

.shot {
  display: block;
  line-height: 0;
  cursor: zoom-in;
}

.shots .shot,
.shot-stage {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  background: var(--pale);
}

.shots .shot img,
.shot-stage img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
}

.shots .shot:hover,
.shot-stage:hover {
  border-color: var(--ink);
}

.shots:not(.is-gallery) .shot:first-child,
.shot-stage {
  grid-column: 1 / -1;
  border-radius: 1.375rem;
  line-height: 0;
  cursor: zoom-in;
}

.shots:not(.is-gallery) .shot:first-child img,
.shot-stage img {
  object-fit: contain;
  object-position: center;
}

.shots.is-gallery .shot {
  cursor: pointer;
}

.shots.is-gallery .shot[aria-current="true"] {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.md .shot {
  display: inline-block;
  max-width: 100%;
}

.md .shot:hover img {
  border-color: var(--ink);
}

/* The picture over the page. The script makes it; a press beside the
   picture, the Close button or Escape puts it away. It is dark on a light
   page and a dark one alike. */
.viewer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 3.75rem 0.75rem 4rem;
  border: 0;
  background: #101116;
  color: #ffffff;
  color-scheme: dark;
  overflow: hidden;
}

.viewer[open] {
  display: grid;
  place-items: center;
}

.viewer::backdrop {
  background: transparent;
}

html:has(.viewer[open]) {
  overflow: hidden;
}

.viewer-picture {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  min-height: 0;
  max-height: 100%;
  border-radius: 0.5rem;
  background: #ffffff;
  object-fit: contain;
}

.viewer button {
  min-width: 44px;
  min-height: 44px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 0.75rem;
  background: transparent;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

.viewer button:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.viewer button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

.viewer-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  padding: 0 0.9rem;
}

/* Under the picture: a step back, which picture this is, a step on. */
.viewer-bar {
  position: absolute;
  right: 0;
  bottom: 0.6rem;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.viewer-step {
  font-size: 1.5rem;
  line-height: 1;
}

.viewer-count {
  min-width: 4.5rem;
  margin: 0;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* What a person may change: a box to type in, a button for each thing a
   swap can be, a tick box. */
.customize {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  margin: 0;
}

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(17.5rem, 100%), 1fr));
  gap: 1.375rem 1.75rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-label,
.field > span:first-child {
  padding: 0;
  font-weight: 600;
  font-size: 0.98rem;
}

legend.field-label {
  margin-bottom: 0.375rem;
}

.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  height: 48px;
  padding: 0 0.875rem;
  border: 1px solid var(--field);
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
}

.field small,
.toggle small {
  color: var(--mute);
  font-size: 0.88rem;
  font-weight: 400;
}

.swap .seg span {
  min-height: 48px;
  padding: 0 1rem;
  font-size: 0.9rem;
}

.swap small {
  display: block;
  margin-top: 0.375rem;
}

.toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 44px;
  cursor: pointer;
}

.toggle input {
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.toggle > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 600;
  font-size: 0.98rem;
}

/* The files a spec holds. One that can be read on the page opens in
   place. Where there are only a few, the script makes each a button and
   shows the chosen file under them. */
.files,
.history {
  margin: 0;
  padding: 0;
  list-style: none;
}

.files {
  border-bottom: 1px solid var(--line);
}

.files > li {
  border-top: 1px solid var(--line);
}

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.125rem;
  padding: 0.875rem 0;
}

/* A row that does not open starts where the names of the ones that do. */
.files > .file-row {
  padding-left: 1.5rem;
}

.file-path code {
  font-weight: 500;
  font-size: 0.95rem;
}

.file-about {
  color: var(--mute);
  font-size: 0.92rem;
}

.file > summary {
  position: relative;
  padding-left: 1.5rem;
  list-style: none;
  cursor: pointer;
}

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

.file > summary::before {
  content: "";
  position: absolute;
  top: 1.2rem;
  left: 0.15rem;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(-45deg);
}

.file[open] > summary::before {
  top: 1.05rem;
  transform: rotate(45deg);
}

.file > summary:hover .file-path {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.file-body {
  margin: 0.25rem 0 1.25rem;
  padding: 1.375rem 1.375rem 1.125rem;
  border: 1px solid var(--line);
  border-radius: 1.375rem;
  background: var(--surface);
}

.file-body > .hint {
  margin: 0;
}

.file-body > .hint:not(:first-child) {
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--line);
}

/* Markdown is already rendered into the .md above this pre. The pre is
   the source, and stays out of the way. A plain-text file has no .md, so
   its pre is what a reader sees until the script runs. */
.file-body > .md + pre.file-source {
  display: none;
}

/* The file's own text, for a reader whose browser has not run the script. */
.file-body > pre.file-source {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.file-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(12.5rem, 100%), 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.file-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 0;
  min-height: 76px;
  padding: 0.875rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.file-tab:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.file-tab code {
  max-width: 100%;
  font-weight: 500;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.file-tab span {
  font-size: 0.88rem;
  line-height: 1.35;
  opacity: 0.8;
}

.file-tab[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

/* A file that cannot be read on the page is a quieter button: it opens
   the file itself, or names a folder. */
a.file-tab,
div.file-tab {
  background: transparent;
}

div.file-tab {
  cursor: default;
}

div.file-tab:hover {
  border-color: var(--line);
}

.files.is-tabbed,
.files.is-tabbed > li {
  border: 0;
}

.files.is-tabbed > .file-row,
.files.is-tabbed .file > summary {
  display: none;
}

.files.is-tabbed .file-body {
  margin: 0;
}

/* A long file is cut short until the reader asks for the rest. */
.md.is-clipped {
  position: relative;
  max-height: 30rem;
  overflow: hidden;
}

.md.is-clipped::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 6rem;
  background: linear-gradient(transparent, var(--surface));
}

.more {
  min-height: 44px;
  margin-top: 0.75rem;
  padding: 0 1.125rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
}

/* A spec file shown on the page. */
.md {
  font-size: 1rem;
  overflow-wrap: break-word;
}

.md > :first-child {
  margin-top: 0;
}

.md > :last-child {
  margin-bottom: 0;
}

.md h3,
.md h4,
.md h5,
.md h6 {
  margin: 1.5rem 0 0.5rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.md h3 {
  font-size: 1.35rem;
  font-weight: 720;
  letter-spacing: -0.025em;
}

.md h4 {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 1.12rem;
}

.md h5 {
  font-size: 1rem;
}

.md h6 {
  color: var(--mute);
  font-size: 0.95rem;
}

.md ul,
.md ol {
  margin: 0 0 0.9rem;
  padding-left: 1.3rem;
}

.md ul {
  list-style: disc;
}

.md li {
  padding: 0.12rem 0;
}

.md li > ul,
.md li > ol {
  margin-bottom: 0;
}

.md li > p {
  margin-bottom: 0.4rem;
}

.md pre {
  margin: 0 0 0.9rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  background: var(--pale);
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.5;
  overflow-x: auto;
}

.md code {
  padding: 0.05em 0.3em;
  border-radius: 0.3rem;
  background: var(--pale);
}

.md pre code {
  padding: 0;
  background: none;
}

.md blockquote {
  margin: 0 0 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: var(--pale);
  color: var(--mute);
}

.md hr {
  margin: 1.25rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.md img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.md-table {
  margin: 0 0 0.9rem;
  overflow-x: auto;
}

.md table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.md th,
.md td {
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.md th {
  color: var(--mute);
  font-size: 0.85rem;
  font-weight: 550;
}

/* Whether a spec fits and what it needs, side by side where there is room,
   as plain ruled rows. */
.pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18.75rem, 100%), 1fr));
  gap: 2.5rem;
}

.facts {
  margin: 0;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  flex: none;
  color: var(--mute);
}

.facts dd {
  min-width: 0;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

/* Each command or secret stays in one piece where the row has room. */
.facts dd code {
  display: inline-block;
  margin-left: 0.5rem;
  font-weight: 400;
  font-size: 0.86rem;
}

.history + .facts {
  margin-top: 1rem;
}

.history li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.125rem 1.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.history-version {
  flex: none;
  width: 3.25rem;
  font-family: var(--mono);
  font-size: 0.92rem;
}

.history-date {
  flex: none;
  width: 7rem;
  color: var(--mute);
}

.history-note {
  flex: 1 1 16.25rem;
  min-width: 0;
}

.twin {
  margin: 0;
}

.twin a {
  color: var(--mute);
}

/* A line of a list that is not a spec: a bounty. */
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 1rem;
  padding: 1rem 0;
  color: var(--ink);
  text-decoration: none;
}

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

.row-main {
  display: grid;
  gap: 0.15rem;
}

.row-name {
  font-weight: 650;
  font-size: 1.1rem;
}

.row:hover .row-name {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.row-summary,
.row-meta {
  color: var(--mute);
}

.row-meta {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  font-size: 0.92rem;
}

.row .row-price {
  grid-column: 2;
  grid-row: 1;
  font-weight: 650;
}

.request .button {
  margin-top: 0.5rem;
}

/* A page of plain reading, such as how to publish. */
.page-head,
.intro {
  padding-top: 1.5rem;
}

.intro .button {
  margin-top: 1.5rem;
}

.steps,
.rules,
.points {
  margin: 0;
  padding-left: 1.3rem;
}

.steps li,
.rules li,
.points li {
  padding: 0.25rem 0 0.25rem 0.25rem;
}

.says {
  max-width: 32rem;
  min-height: 64px;
  margin: 0.75rem 0;
  padding: 0.5rem 0.5rem 0.5rem 1.125rem;
  border: 1px solid var(--line);
  border-radius: 1.125rem;
  box-shadow: none;
}

.says code {
  flex-basis: 12rem;
  font-size: 0.95rem;
}

.says .copy {
  min-height: 44px;
  padding: 0 1.125rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
}

.sample {
  margin: 0 0 0.9rem;
  padding: 1.125rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1.125rem;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.55;
  overflow-x: auto;
}

.sample code {
  font-size: 1em;
}

/* Bounties */
.progress {
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress li {
  display: grid;
  grid-template-columns: 1.5rem 7rem minmax(0, 1fr);
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--mute);
}

.progress li::before {
  content: "";
  width: 0.8rem;
  height: 0.8rem;
  margin-top: 0.4rem;
  border: 1.5px solid var(--mute);
  border-radius: 50%;
}

.progress li.is-done {
  color: var(--ink);
}

.progress li.is-done::before {
  border-color: var(--pass);
  background: var(--pass);
}

.progress-label {
  font-weight: 650;
}

/* Sign-in and account pages */
main > .account {
  max-width: 30rem;
  padding-top: 2rem;
}

.account h1 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
}

.account-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.account-choice {
  grid-template-columns: 1fr 1fr;
}

.form-error {
  margin: 1.25rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 0.875rem;
  background: var(--pale);
  color: var(--fail);
  font-weight: 650;
}

.plain {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--mute);
}

.plain li + li {
  margin-top: 0.35rem;
}

@media (max-width: 56rem) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* A line of the list drops what the spec builds. */
  .catalog li {
    display: block;
    padding: 0;
  }

  .result {
    display: grid;
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: 5.5rem minmax(0, 1fr) minmax(0, 11rem) 6rem;
    padding: 0.875rem 0;
  }

  .result-shot,
  .result-text,
  .result-id,
  .result-tally {
    grid-column: auto;
    grid-row: auto;
  }

  .result-kind {
    display: none;
  }
}

@media (max-width: 48rem) {
  /* What is trending is one column: the first card, then the other three. */
  .cards-ranked {
    grid-template-columns: minmax(0, 1fr);
  }

  .cards-ranked > li:first-child {
    grid-row: auto;
  }
}

@media (max-width: 40rem) {
  /* A phone. The name stays, and the links wrap onto their own rows when
     they no longer fit beside it. The small search box is left to the
     front page. */
  .masthead-in {
    gap: 0.25rem 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .wordmark {
    min-height: 44px;
  }

  .wordmark svg {
    width: 100px;
    height: 32px;
  }

  .masthead-find {
    display: none;
  }

  .masthead nav {
    gap: 0.125rem;
    font-size: 0.95rem;
  }

  .masthead nav a {
    padding: 0 0.5rem;
  }

  .masthead nav .nav-signin {
    margin-left: 0.25rem;
    padding: 0 0.625rem;
  }

  main {
    gap: 3rem;
    padding-top: 0.75rem;
  }

  /* The panel on a phone: the headline, then the box with Pekk on it. The
     sentence is left to wider screens, so that the specs start sooner. */
  .hero {
    border-radius: 1.5rem;
  }

  .hero .lede {
    display: none;
  }

  .finder,
  .hero.is-listing .finder {
    height: 56px;
    padding: 0 0.375rem 0 1rem;
    border-radius: 1rem;
  }

  .finder {
    margin-top: 56px;
  }

  .finder .search {
    font-size: 1.05rem;
  }

  .pekk-pecks {
    left: 1rem;
    width: 80px;
    height: 56px;
  }

  .shelf-head h3,
  .how h2,
  .publish h2,
  .related h2 {
    font-size: 1.45rem;
  }

  .cards {
    gap: 1.5rem 1rem;
  }

  .card-shot {
    border-radius: 0.875rem;
  }

  .cards-ranked > li:not(:first-child) .card {
    gap: 0.875rem;
  }

  /* A line keeps its picture, its name, three lines of what it does, its
     id and how often it was pulled. */
  .result {
    grid-template-columns: 5.25rem minmax(0, 1fr) auto;
    grid-template-areas:
      "shot text text"
      "shot id tally";
    align-items: start;
    gap: 0.25rem 0.875rem;
  }

  .result-shot {
    grid-area: shot;
    height: 4rem;
    aspect-ratio: auto;
  }

  .result-text {
    grid-area: text;
  }

  .result-id {
    grid-area: id;
  }

  .result-tally {
    grid-area: tally;
  }

  .result-summary {
    font-size: 0.875rem;
    -webkit-line-clamp: 3;
  }

  /* How many were found, with the order beside it. The word "Sort" is
     left to the list itself, which names an order. */
  .results-bar {
    gap: 0.25rem 0.75rem;
    padding-bottom: 0.5rem;
  }

  .sort {
    margin-left: auto;
    font-size: 0;
  }

  .sort select {
    padding: 0 0.5rem;
    font-size: 0.9rem;
  }

  .connect {
    border-radius: 1.5rem;
  }

  .well .copy {
    width: 100%;
  }

  .dock {
    padding: 1.125rem;
    border-radius: 1.5rem;
  }

  .spec-head .lede {
    font-size: 1.1rem;
  }

  /* What the spec is, two to a row. */
  .strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .strip div {
    padding: 0.75rem 1rem 0.75rem 0;
  }

  /* The small screenshots, four to a row. */
  .shots {
    grid-template-columns: repeat(auto-fill, minmax(min(4.75rem, 100%), 1fr));
    gap: 0.5rem;
  }

  .shots .shot {
    border-radius: 0.625rem;
  }

  .facts div {
    flex-direction: column;
    gap: 0.125rem;
  }

  .facts dd {
    text-align: left;
  }

  .progress li {
    grid-template-columns: 1.5rem minmax(0, 1fr);
  }

  .progress-detail {
    grid-column: 2;
  }

  .says .copy {
    width: 100%;
  }
}

@media (max-width: 21.25rem) {
  /* The narrowest screens, where the masthead takes two rows: it scrolls
     away with the page and leaves the window to what is read. */
  .masthead {
    position: static;
  }
}


/* ------------------------------------------------------------------------
   Sheet. A page is a sheet of paper on a ground, set on four columns whose
   edges everything hangs from. One line of display type sits on a hairline;
   facts are a quiet label and a value; a section is a label on the left and
   what it holds on the right. Rules, not boxes. Sky is for the one thing on
   the sheet that is used: the box that finds a spec, the line that builds
   one, the panel a spec is dropped on.

   These rules are laid over the ones above and so come after them. A rule
   here that names something wins over the earlier rule for it.
   ------------------------------------------------------------------------ */
body {
  background: var(--ground);
  font-size: 1rem;
}

/* The masthead sits on the ground and keeps to the sheet's margins. */
.masthead {
  border-bottom: 0;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
}

.masthead-in,
.colophon-in,
main {
  width: calc(100% - 2 * var(--edge));
}

.masthead-in,
.colophon-in {
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.masthead-in {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.wordmark svg {
  width: 125px;
  height: 40px;
}

.masthead nav {
  font-weight: 500;
  font-size: 0.95rem;
}

.masthead nav a {
  border-radius: 0.5rem;
}

.masthead nav a:hover {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}

.masthead nav a[aria-current="page"] {
  text-decoration-thickness: 1.5px;
}

.masthead nav .nav-signin {
  min-height: 40px;
  border-radius: 0.625rem;
}

.masthead nav .nav-signin:hover {
  background: var(--mute);
}

.masthead-find {
  border-radius: 0.625rem;
  background: var(--bg);
}

/* The sheet. */
main {
  gap: 0;
  margin-bottom: 1.5rem;
  padding: var(--pad);
  border-radius: 0.875rem;
  background: var(--bg);
  box-shadow: var(--sheet-shadow);
}

main > section,
main > article {
  max-width: none;
}

.colophon {
  border-top: 0;
}

.colophon-in {
  padding-top: 0.5rem;
  padding-bottom: 2.5rem;
}

.colophon p,
.colophon nav {
  font-size: 0.875rem;
}

.colophon nav {
  font-weight: 500;
}

/* Type. Display, a label, and text; two weights; two tones. */
h1 {
  font-weight: var(--display);
  letter-spacing: -0.05em;
}

h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.button,
.copy,
.more {
  border-radius: 0.625rem;
  font-weight: 600;
}

/* --- Front page -------------------------------------------------------- */

/* The sheet opens the way a title page does: a sentence top right, then
   the headline, large, sitting on a rule. */
.hero {
  gap: 1.5rem;
  padding: 0;
  border-radius: 0;
  background: none;
}

.hero-pitch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 0 var(--gap);
}

.hero .lede {
  grid-column: 3 / span 2;
  grid-row: 1;
  max-width: 30rem;
  margin: 0.25rem 0 0;
  color: var(--mute);
  font-size: 1.0625rem;
  line-height: 1.45;
}

.hero h1 {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: clamp(2rem, 6vw, 5rem);
  padding-bottom: 0.26em;
  border-bottom: 1px solid var(--line);
  font-size: clamp(2.9rem, 8.3vw, 7.5rem);
  letter-spacing: -0.055em;
  line-height: 0.9;
  text-wrap: balance;
}

/* The box that finds a spec is the one thing on the sheet in sky. Pekk
   stands on the rule above its far end. */
.finder {
  height: 72px;
  margin-top: 0;
  border-radius: 0.875rem;
  background: var(--sky);
  box-shadow: none;
}

.finder .search {
  font-size: 1.1875rem;
}

.finder .search::placeholder {
  color: var(--sky-mute);
  opacity: 1;
}

.pekk-pecks {
  bottom: calc(100% + 1.5rem);
  left: auto;
  right: 0.5rem;
}

.tries {
  margin-top: -0.5rem;
  color: var(--mute);
  font-size: 0.95rem;
}

.try {
  font-weight: 500;
}

.hero.is-listing .finder {
  margin-top: 0;
  border: 0;
}

main > .hero + #specs,
main > .hero.is-listing + #specs {
  margin-top: 1.25rem;
}

.chip {
  min-height: 40px;
  padding: 0 0.875rem;
  border-radius: 0.625rem;
  background: transparent;
  font-weight: 500;
  font-size: 0.9rem;
}

/* A shelf: a rule, a label on it, a row of cards on the four columns. */
#shelves {
  gap: 0;
  margin-top: 2.25rem;
}

.shelf,
.related {
  gap: 1.25rem;
  padding: 1.25rem 0 3rem;
  border-top: 1px solid var(--line);
}

.shelf-head h3,
.how h2,
.publish h2,
.related h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.4;
}

.shelf-n {
  font-size: 1.0625rem;
  font-weight: 400;
}

.see-all {
  padding: 0;
  font-weight: 500;
  font-size: 0.95rem;
}

.cards {
  gap: 2rem var(--gap);
}

.cards-ranked {
  gap: 1.25rem var(--gap);
}

.card-shot,
.result-shot,
.cards-ranked > li:first-child .card-shot,
.cards-ranked > li:not(:first-child) .card-shot {
  border-radius: 0.625rem;
}

.card-name {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.005em;
}

.card-summary,
.result-summary {
  font-size: 0.9375rem;
}

.cards-ranked > li:first-child .card-name {
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
}

.cards-ranked > li:not(:first-child) .card-name {
  font-size: 1rem;
}

.card-meta,
.cards-ranked > li:first-child .card-meta {
  font-size: 0.8125rem;
}

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

.shelves-all {
  margin: 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
}

.shelves-all .button {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.shelves-all .button:hover {
  background: none;
  color: var(--mute);
}

/* The list a search finds. */
.results-bar h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.result-name {
  font-weight: 600;
}

/* How it works, and publishing: a rule, then a label and what it says. */
.how,
.publish {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.steps3 li {
  gap: 0.375rem;
  padding: 0;
  border-radius: 0;
  background: none;
}

.step-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.375rem;
}

.step-head h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.step-n {
  display: block;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  color: var(--mute);
  font-weight: 400;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.steps3 p,
.how > .hint {
  font-size: 0.9375rem;
}

.publish-copy p {
  margin: 0;
  color: var(--mute);
}

.publish > .button {
  min-height: 44px;
}

.pekk-publish {
  width: 80px;
  height: 70px;
}

.connect {
  margin-top: 3.5rem;
  border-radius: 0.875rem;
}

.connect h2 {
  font-weight: var(--display);
  letter-spacing: -0.04em;
}

@media (min-width: 56rem) {
  .how,
  .publish {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 1.25rem var(--gap);
  }

  .how > h2 {
    grid-column: 1;
  }

  .steps3 {
    grid-column: 2 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem var(--gap);
  }

  .how > .hint {
    grid-column: 2 / -1;
  }

  .publish-copy {
    display: contents;
  }

  .publish-copy h2 {
    grid-column: 1;
    grid-row: 1;
  }

  .publish-copy p {
    grid-column: 2 / span 2;
    grid-row: 1 / span 2;
  }

  .publish > .button {
    grid-column: 4;
    grid-row: 1 / span 2;
    justify-self: start;
  }

  .pekk-publish {
    grid-column: 1;
    grid-row: 2;
  }
}

/* --- A spec's page ----------------------------------------------------- */

.spec {
  gap: 1.25rem;
}

.breadcrumb {
  margin: 0;
}

.spec-head h1 {
  font-size: clamp(2.7rem, 11.5vw, 3.6rem);
  letter-spacing: -0.05em;
  line-height: 0.96;
  text-wrap: balance;
}

/* What the spec is: a label and a value, a row each. */
.strip {
  display: block;
  padding: 0.75rem 0;
}

.strip div {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 0 var(--gap);
  padding: 0;
  line-height: 1.7;
}

.strip dt {
  font-size: 1rem;
}

.strip dd {
  font-weight: 400;
}

.strip dd code {
  font-size: 0.9rem;
}

.dock {
  gap: 0.875rem;
  padding: 1.25rem;
  border-radius: 0.875rem;
}

.dock-top {
  padding-left: 0.875rem;
}

.dock-top h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.dock-line {
  padding: 0.875rem 1rem;
  border-radius: 0.625rem;
}

.copy-line {
  min-height: 48px;
  border-radius: 0.625rem;
  font-size: 1rem;
}

.dock .hint,
.dock .notice {
  font-size: 0.875rem;
}

/* A section: a rule, its question as a label, its answer. */
.spec-main {
  gap: 0;
}

.spec-main > section,
.pair > section {
  padding: 1.25rem 0 2.5rem;
  border-top: 1px solid var(--line);
}

.spec-main > section > h2,
.pair > section > h2 {
  margin: 0 0 1rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.4;
}

.pair {
  display: block;
}

.facts div {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 0 var(--gap);
  padding: 0;
  border: 0;
  line-height: 1.7;
}

.facts dd {
  font-weight: 400;
  text-align: left;
}

.facts dd code {
  display: block;
  margin: 0;
  font-size: 0.875rem;
}

/* What changed: the version and its date, then the note under them. On a
   wide page the note stands where a fact has its value. */
.history li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0;
  padding: 0 0 0.5rem;
  border: 0;
  line-height: 1.7;
}

.history-note {
  grid-column: 1 / -1;
}

.history-version,
.history-date {
  width: auto;
  color: var(--mute);
  font-family: var(--sans);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.history-date {
  padding-right: var(--gap);
}

.twin {
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.file-tabs {
  grid-template-columns: repeat(auto-fit, minmax(min(10.5rem, 100%), 1fr));
}

.file-tab {
  border-radius: 0.625rem;
}

.related {
  margin-top: 3rem;
  padding-bottom: 0;
}

@media (min-width: 62.5rem) {
  /* The title and the columns under it share the sheet's four columns. */
  .spec {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 0 var(--gap);
  }

  .spec-head,
  .spec-cols {
    display: contents;
  }

  .breadcrumb {
    grid-column: 1 / span 2;
    grid-row: 1;
    font-size: 0.95rem;
  }

  .breadcrumb a {
    padding: 0;
  }

  .strip {
    grid-column: 3 / span 2;
    grid-row: 1;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .strip div,
  .facts div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    line-height: 1.6;
  }

  .history li {
    grid-template-columns: 3.5rem minmax(0, 1fr) calc((100% - var(--gap)) / 2);
    padding: 0;
    line-height: 1.6;
  }

  .history-note {
    grid-column: auto;
  }

  .spec-head h1 {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: clamp(2.5rem, 5vw, 4.5rem);
    padding-bottom: 0.3em;
    border-bottom: 1px solid var(--line);
    font-size: clamp(3rem, 6.6vw, 6rem);
    letter-spacing: -0.055em;
    line-height: 0.94;
  }

  .spec-head.is-long h1 {
    font-size: clamp(2.6rem, 4.9vw, 4.4rem);
    letter-spacing: -0.05em;
  }

  .spec-head .lede {
    grid-column: 2 / span 2;
    grid-row: 3;
    max-width: none;
    padding: 1.5rem 0 2.5rem;
    color: var(--ink);
    font-size: 1.375rem;
    letter-spacing: -0.015em;
    line-height: 1.32;
  }

  .dock {
    grid-column: 4;
    grid-row: 3 / span 2;
    top: 5.5rem;
    margin-top: 1.5rem;
  }

  .dock-line code {
    font-size: 0.8125rem;
  }

  .spec-main {
    grid-column: 1 / span 3;
    grid-row: 4;
  }

  /* Its question on the first column, its answer on the two beside it. */
  .spec-main > section,
  .pair > section {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 var(--gap);
    padding-bottom: 3rem;
  }

  .spec-main > section > h2,
  .pair > section > h2 {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
  }

  .spec-main > section > :not(h2),
  .pair > section > :not(h2) {
    grid-column: 2 / span 2;
    min-width: 0;
  }

  .twin {
    grid-column: 2 / span 2;
  }
}

/* --- A page of reading: publishing, the bounties, a user's specs ------- */

/* The page's name is a line of display type on a hairline, the way a
   spec's is, and what the page is for stands under it. */
.page-head,
.intro {
  padding-top: 0;
}

.page-head .label {
  margin: 0 0 1.25rem;
}

.page-head h1,
.intro h1 {
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--line);
  font-size: clamp(2.7rem, 11.5vw, 3.6rem);
  letter-spacing: -0.05em;
  line-height: 0.96;
}

.page-head .lede,
.intro .lede {
  margin: 0;
  padding: 1.25rem 0 2.5rem;
}

.intro > p:not(.lede) {
  margin: 0 0 2.5rem;
}

/* Then its sections: a rule, a label, what it says. */
.page-head ~ section:not(.wide),
.intro ~ section,
.spec-plain > section {
  padding: 1.25rem 0 2.5rem;
  border-top: 1px solid var(--line);
}

.page-head ~ section:not(.wide) > h2,
.intro ~ section > h2,
.spec-plain > section > h2 {
  margin: 0 0 1rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.4;
}

/* A bounty's page is a spec's page without a line that builds. */
main > .spec-plain {
  max-width: none;
}

.spec-plain {
  gap: 0;
}

.spec-plain > .spec-head {
  margin-bottom: 1.25rem;
}

.spec-plain .strip {
  padding-bottom: 0;
  border-bottom: 0;
}

.progress li:last-child {
  border-bottom: 0;
}

/* The board's rule is the section's own, so its first line has none. */
.intro ~ section > .catalog {
  border-bottom: 0;
}

.intro ~ section > .catalog li:first-child {
  border-top: 0;
}

.intro ~ section > .catalog li:first-child .row {
  padding-top: 0;
}

.intro ~ section > .catalog li:last-child .row {
  padding-bottom: 0;
}

.account .lede + p {
  margin: 1rem 0 0;
}

.request .button {
  margin-top: 0.25rem;
}

@media (min-width: 62.5rem) {
  .page-head,
  .intro,
  .page-head ~ section:not(.wide),
  .intro ~ section,
  .spec-plain > section {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 var(--gap);
  }

  .page-head .label {
    grid-column: 1 / span 2;
    grid-row: 1;
    margin: 0;
  }

  .page-head h1,
  .intro h1 {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: clamp(3rem, 6.6vw, 6rem);
    letter-spacing: -0.055em;
    line-height: 0.94;
  }

  .page-head h1 {
    margin-top: clamp(2.5rem, 5vw, 4.5rem);
  }

  .intro h1 {
    margin-top: clamp(1rem, 2vw, 1.75rem);
  }

  .page-head .lede,
  .intro .lede {
    grid-column: 2 / span 2;
    grid-row: 3;
    max-width: none;
    padding: 1.5rem 0 2.5rem;
    color: var(--ink);
    font-size: 1.375rem;
    letter-spacing: -0.015em;
    line-height: 1.32;
  }

  .intro > p:not(.lede) {
    grid-column: 2 / span 2;
    grid-row: 4;
  }

  /* Its label on the first column, what it says on the two beside it. A
     list of bounties and a sample of a file take the fourth as well. */
  .page-head ~ section:not(.wide),
  .intro ~ section,
  .spec-plain > section {
    padding-bottom: 3rem;
  }

  .spec-plain > section {
    grid-column: 1 / -1;
  }

  .page-head ~ section:not(.wide) > h2,
  .intro ~ section > h2,
  .spec-plain > section > h2 {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
  }

  .page-head ~ section:not(.wide) > :not(h2),
  .intro ~ section > :not(h2),
  .spec-plain > section > :not(h2) {
    grid-column: 2 / span 2;
    min-width: 0;
  }

  .page-head ~ section:not(.wide) > .sample,
  .intro ~ section > .catalog {
    grid-column: 2 / span 3;
  }
}

/* A phone: the sheet keeps a sliver of ground beside it. */
@media (max-width: 40rem) {
  main {
    margin-bottom: 0.75rem;
    border-radius: 0.75rem;
  }

  .hero-pitch {
    display: block;
  }

  .hero h1 {
    margin-top: 0.5rem;
    font-size: clamp(2.9rem, 14.5vw, 4rem);
  }

  .pekk-pecks {
    width: 80px;
    height: 56px;
  }

  .shelf,
  .related {
    padding-bottom: 2.25rem;
  }
}

/* Corners go by rank: the sheet and its panels, then pictures and boxes,
   then controls. */
.says,
.well,
.sample,
.file-body,
.shots .shot,
.shot-stage,
.shots:not(.is-gallery) .shot:first-child {
  border-radius: 0.625rem;
}

.seg span,
.tablist button,
.sort select,
.clear,
.viewer button,
.panel .button,
.says .copy,
.field input[type="text"],
.field input[type="email"] {
  border-radius: 0.5rem;
}

/* Band 2 · Across the sheet. The top of the sheet is sky from edge to edge.
   The headline stands in it, and the box that finds a spec sits on its lower
   edge, half on the sky and half on the paper. */
.hero-pitch {
  margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) 0;
  padding: var(--pad) var(--pad) calc(36px + 2.5rem);
  border-radius: 0.875rem 0.875rem 0 0;
  background: var(--sky);
}

.hero .lede {
  color: var(--sky-mute);
}

.hero h1 {
  padding-bottom: 0;
  border-bottom: 0;
}

/* Without the script there is no box, and the band keeps an even margin. */
.hero-pitch:has(+ .finder[hidden]) {
  padding-bottom: var(--pad);
}

.finder {
  margin-top: calc(-36px - 1.5rem);
  background: var(--surface);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent), var(--lift);
}

.finder .search::placeholder {
  color: var(--mute);
}

/* Pekk stands on the box near its far end and faces into the page. */
.pekk-pecks {
  bottom: 100%;
  right: 1.5rem;
  transform: scaleX(-1);
}

.tries {
  margin-top: 0;
}

.hero.is-listing .hero-pitch {
  margin: 0;
  padding: 0;
  background: none;
}

.hero.is-listing .finder {
  margin-top: 0;
  box-shadow: 0 0 0 1.5px var(--ink);
}

@media (max-width: 40rem) {
  /* Room for Pekk between the headline's last line and the box. */
  .hero-pitch {
    padding-bottom: calc(36px + 3.75rem);
  }

  /* A break that is only for a wide page. */
  .hero h1 br.break-wide {
    display: none;
  }
}

/* The sky has clouds: three, drawn in whole pixels like Pekk and a shade
   lighter than the sky. Each is a picture 300 cells wide with the cloud at
   its left, repeated sideways, and the band moves the three one cell at a
   time, so a cloud that leaves on the right comes back on the left. A cell
   is one of Pekk's pixels. Each cloud keeps to a lane of its own. A cloud
   passes behind the headline and behind Pekk, and no lane crosses the
   sentence.

   The pictures are files beside this one, because the policy for pages
   lets a page load pictures from this site and not ones written into a
   stylesheet. */
.hero-pitch {
  --cloud-cell: 5px;
  --cloud-loop: calc(300 * var(--cloud-cell));
  /* Where each cloud starts and the lane it keeps to: the large one, the
     middle one, the small one. Between a phone and a wide page there is no
     room around the sentence, so there are two: the large one behind the
     headline and the middle one under it, beside Pekk. */
  --cloud-1-x: 560px;
  --cloud-1-y: calc(100% - 143px);
  --cloud-2-x: 440px;
  --cloud-2-y: calc(100% - 42px);
  --cloud-3-x: 0px;
  --cloud-3-y: 0px;
  background-image: url("cloud-large.svg"), url("cloud-middle.svg"), url("cloud-small.svg");
  background-repeat: repeat-x;
  background-size:
    var(--cloud-loop) calc(8 * var(--cloud-cell)),
    var(--cloud-loop) calc(6 * var(--cloud-cell)),
    0 0;
  background-position-x: var(--cloud-1-x), var(--cloud-2-x), var(--cloud-3-x);
  background-position-y: var(--cloud-1-y), var(--cloud-2-y), var(--cloud-3-y);
}

@media (prefers-color-scheme: dark) {
  .hero-pitch {
    background-image:
      url("cloud-large-night.svg"), url("cloud-middle-night.svg"), url("cloud-small-night.svg");
  }
}

/* A wide page has room above the sentence and between it and the headline:
   the small cloud sails over the sentence, the middle one under it, the
   large one behind the headline. */
@media (min-width: 72rem) {
  .hero-pitch {
    --cloud-1-x: 800px;
    --cloud-1-y: calc(100% - 192px);
    --cloud-2-x: 120px;
    --cloud-2-y: calc(var(--pad) + 98px);
    --cloud-3-x: 380px;
    --cloud-3-y: 16px;
    background-size:
      var(--cloud-loop) calc(8 * var(--cloud-cell)),
      var(--cloud-loop) calc(6 * var(--cloud-cell)),
      var(--cloud-loop) calc(4 * var(--cloud-cell));
  }
}

/* A phone has no sentence. Two small clouds stand beside the headline, and
   the large one waits out of sight. Pekk's pixels are 4px there. */
@media (max-width: 40rem) {
  .hero-pitch {
    --cloud-cell: 4px;
    --cloud-1-x: -200px;
    --cloud-1-y: calc(100% - 42px);
    --cloud-2-x: calc(100vw - 96px);
    --cloud-2-y: 23px;
    --cloud-3-x: calc(100vw - 76px);
    --cloud-3-y: calc(100% - 141px);
    background-size:
      var(--cloud-loop) calc(8 * var(--cloud-cell)),
      var(--cloud-loop) calc(6 * var(--cloud-cell)),
      var(--cloud-loop) calc(4 * var(--cloud-cell));
  }
}

/* One cell every 0.6 seconds, in steps: a drawing in pixels goes soft when
   it moves by part of one. The clouds start spread out, so that one is
   nearly always in the sky. Not for a reader who asked for less motion:
   their clouds stay where they stand. */
@media (prefers-reduced-motion: no-preference) {
  .hero-pitch {
    animation: cloud-drift 180s steps(300) infinite;
  }

  @media (max-width: 71.99rem) {
    .hero-pitch {
      --cloud-2-x: -190px;
    }
  }

  @media (max-width: 40rem) {
    .hero-pitch {
      --cloud-1-x: calc(100vw + 290px);
      --cloud-2-x: calc(100vw - 96px);
      --cloud-3-x: calc(100vw - 496px);
    }
  }
}

@keyframes cloud-drift {
  to {
    background-position-x:
      calc(var(--cloud-1-x) + var(--cloud-loop)),
      calc(var(--cloud-2-x) + var(--cloud-loop)),
      calc(var(--cloud-3-x) + var(--cloud-loop));
  }
}

/* While a search is shown the band steps back, and its clouds with it. */
.hero.is-listing .hero-pitch {
  animation: none;
}

/* Forced colours (high contrast on Windows) take every fill away, so a
   button that is pressed, a file that is chosen and a picture that is
   picked are each given a line of their own, and Pekk is drawn in the
   colours of the text. */
@media (forced-colors: active) {
  .chip,
  .seg span,
  .tablist button,
  .file-tab {
    position: relative;
  }

  .chip.is-on::after,
  .seg input:checked + span::after,
  .tablist button.is-on::after,
  .file-tab[aria-pressed="true"]::after {
    content: "";
    position: absolute;
    inset: auto 0.5rem 0.25rem;
    border-bottom: 3px solid;
  }

  .shots.is-gallery .shot[aria-current="true"] {
    outline: 3px solid Highlight;
    outline-offset: -3px;
  }

  /* A panel or a box that was told apart by its fill or its shadow gets
     an edge. */
  .hero,
  .dock,
  .connect,
  .steps3 li,
  .finder,
  .dock-line,
  .well {
    border: 1px solid;
  }

  .hero.is-listing {
    border: 0;
  }

  /* The sheet is told from its ground by an edge, and the band of sky at
     its head by the line under it. The box that finds a spec stands clear
     of that line. */
  main {
    border: 1px solid;
  }

  .hero {
    border: 0;
  }

  .hero-pitch {
    border-bottom: 1px solid;
    background-image: none;
    animation: none;
  }

  .hero.is-listing .hero-pitch {
    border-bottom: 0;
  }

  .finder {
    background: Canvas;
  }

  .px-ink {
    fill: CanvasText;
  }

  .px-white {
    fill: Canvas;
  }
}
