/* Always dark: the pedal's yellow body and dark screen sit best on it. */
:root {
  color-scheme: dark; /* the browser's own parts (scrollbars, controls) too */
  --bg: #161716;
  --fg: #ececea;
  --muted: #a5a5a0;
  --card: #1f201f;
  --line: #353633;
  --accent: #6fd6cf;
  --accent-fg: #0d1716;
  --pedal: #c3982e; /* the looper's yellow body, from photos of it */
  /* The body's colours along the bottom edge of photos of the pedal (averaged over three, darker
     towards the sides): the screens and the patcher in one piece. */
  --pedal-body: linear-gradient(
    90deg,
    #957016 0%,
    #976d16 5%,
    #a0751a 10%,
    #aa7f1e 15%,
    #b58926 25%,
    #bd912c 35%,
    #c3982e 45%,
    #c3982d 55%,
    #c2982d 65%,
    #c19a2b 75%,
    #b48b22 85%,
    #aa811d 90%,
    #a17719 95%,
    #9d7517 100%
  );
  --radius: 10px; /* boxes: the screens, cards, the patch step */
  --radius-small: 6px; /* what sits in or beside them: the console, the arrows */
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --term-bg: #0f110f;
  --term-fg: #d9dcd6;
  --term-muted: #8b918a;
  --term-ok: #7ed39a;
  --term-err: #ff8a80;
}
* {
  box-sizing: border-box;
}
/* Sizes are in rem: 16 px on laptops, growing with a larger window up to 20 px, but only as far
   as its height allows: the steps, also with the flashing steps open (about 65rem), fit without
   scrolling. */
html {
  font-size: clamp(16px, min(1.1vw, 1.45vh), 20px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    1rem/1.55 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
}
/* The footer at the window's bottom edge when the page is shorter than the window. */
main {
  max-width: 46rem;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  padding: 2rem 1rem 1rem;
}
/* Wide screens: the screens with the patcher and what it does on the left, the steps on the right,
   under the header on one line; the footer in the same two columns. */
@media (min-width: 60rem) {
  main {
    max-width: 72rem;
    padding-block: 1rem;
  }
  header {
    align-items: baseline;
  }
  header h1 {
    margin: 0;
    font-size: 1.6rem;
  }
  /* One line: the subtitle takes the room between the name and the version, wrapping if needed. */
  header .sub {
    flex: 1 1 0;
  }
  /* The version on the name's and the subtitle's baseline. */
  header .meta {
    align-self: baseline;
  }
  .columns,
  footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 3rem;
  }
}
h1 {
  font-size: 1.9rem;
  margin: 0;
  letter-spacing: -0.01em;
}
.step h2 {
  font-size: 1.2rem;
  margin: 0 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.sub {
  color: var(--muted);
  margin: 0;
}
/* The name with the version and the GitHub mark at the right end of its line; the subtitle under
   them (on wide screens, between them). */
header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-bottom: 1.25rem;
}
@media (width < 60rem) {
  header .sub {
    flex-basis: 100%;
    order: 1;
  }
}
/* Too narrow for the name and the version on one line: the version and the GitHub mark under the
   subtitle, at its left edge. */
@media (width < 28rem) {
  header .meta {
    order: 2;
    margin-left: 0;
  }
}
.meta {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}
.version {
  color: var(--muted);
  font-weight: 600;
}
.repo {
  display: flex;
  color: var(--muted);
}
.repo:hover,
.repo:focus-visible {
  color: var(--fg);
}
.repo svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}
section {
  margin: 0 0 1.25rem;
}
.about > :last-child {
  margin-bottom: 0;
}
.screens {
  position: relative;
  margin: 0;
}
.slides {
  display: flex;
  overflow-x: auto;
  border-radius: var(--radius) var(--radius) 0 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.slides::-webkit-scrollbar {
  display: none;
}
/* Each screen in the pedal's body, laid out like the photos of it (1200 x 614): the bezel round
   the display, the display (960 x 376) at 120, 121; a little lighter towards the top, as lit from
   above, and square at the bottom: the patcher continues it. */
.slides figure {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: start;
  position: relative;
  aspect-ratio: 1200 / 614;
  background: linear-gradient(rgb(255 255 255 / 0.1), transparent 70%), var(--pedal-body);
  isolation: isolate; /* the glass below blends with the screen only */
}
.slides figure::before {
  content: "";
  position: absolute;
  inset: 10.4% 5.5% 9.9% 5.6%;
  border-radius: 0.6% / 1.2%;
  background: #080808;
  box-shadow:
    inset 0 1px 2px rgb(0 0 0 / 0.6),
    0 1px 0 rgb(255 255 255 / 0.25);
}
.slides img,
.slides figure::after {
  position: absolute;
  left: 10%;
  top: 19.7%;
  width: 80%;
  height: auto;
  aspect-ratio: 960 / 376;
}
/* The display's glass: black lifted to the backlight's grey, lighter towards the top left; a screen
   blend keeps what is lit as it is. */
.slides figure::after {
  content: "";
  background: linear-gradient(160deg, #24282c, #15171a 50%, #111315);
  mix-blend-mode: screen;
  pointer-events: none;
}
/* Arrows in the pedal's yellow beside the screen: the strip is about 5.5 % of the slide's width on
   each side, the screen's middle at half its height. In percent of the slide, so they stay in the
   strip at any width: a tall box filling the strip's width, the chevron a
   translucent gray that takes on the yellow, solid on hover. */
.arrow {
  --width: 5.2%;
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: var(--width);
  height: 32%;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-small);
  background: none;
  color: rgb(30 30 30 / 0.6);
  cursor: pointer;
}
.arrow:hover,
.arrow:focus-visible {
  background: rgb(0 0 0 / 0.12);
  color: #1f1a0c;
}
.arrow svg {
  width: 80%;
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.prev {
  left: calc(2.8% - var(--width) / 2);
}
.next {
  right: calc(2.8% - var(--width) / 2);
}
/* The steps as a timeline: numbered badges on a rail along the column's left edge, the content
   beside it. Only the patch step is a box; rolling back hangs off the rail with a dashed line, a
   way back rather than a fourth step. */
.work {
  --rail: 2.75rem;
  --gap: 2rem;
}
/* One column: space between the mods and the steps. */
@media (width < 60rem) {
  .work {
    margin-top: 2.5rem;
  }
}
.work > * {
  margin: 0 0 var(--gap);
}
.work > :last-child {
  margin-bottom: 0;
}
.step {
  position: relative;
  margin-left: var(--rail);
}
.step .n {
  position: absolute;
  left: calc(-1 * var(--rail));
}
.step::before {
  content: "";
  position: absolute;
  left: calc(1.7rem / 2 - var(--rail) - 1px);
  top: 0;
  bottom: calc(-1 * var(--gap));
  border-left: 2px solid var(--line);
}
.s1::before {
  top: 1rem;
}
.s3::before {
  bottom: 0;
}
.back::before {
  top: calc(-1 * var(--gap));
  bottom: auto;
  height: calc(var(--gap) + 0.5rem);
  border-left-style: dashed;
}
.back .n {
  background: var(--bg);
  border: 2px solid var(--line);
  color: var(--muted);
}
/* The text right under its title. */
.step > p {
  margin: 0;
}
.step details {
  margin-top: 0.5rem;
}
/* The flashing steps: what to do in the item's first line, what to expect or leave alone muted
   under it; the updater's warning per OS, labelled like the cards. */
.s3 li {
  margin: 0.7rem 0;
}
.s3 li::marker {
  color: var(--muted);
}
.s3 .detail {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.s3 .os {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0.15rem 0.75rem;
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}
.s3 .os dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.s3 .os dd {
  margin: 0;
}
@media (max-width: 30rem) {
  .work {
    --rail: 2.25rem;
  }
}
/* Titled and spaced like a step, then the cards. */
.intro h2 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
}
.intro p {
  margin: 0;
}
/* Cards side by side share their rows (subgrid): name, then Default and Patched, each a label and
   its text, so both Patched blocks start at the same height. */
.mods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.mod {
  display: grid;
  grid-row: span 5;
  grid-template-rows: subgrid;
  row-gap: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}
/* The name as on the pedal. */
.mod h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.mod dl {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  row-gap: 0;
  margin: 0;
}
.mod dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mod dt + dd + dt {
  color: var(--accent);
}
.mod dd {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  line-height: 1.45;
}
.mod dd:last-child {
  margin-bottom: 0;
}
/* The patcher, right under the screens in the same body colours, without a seam: the screen
   above, the box below read as one pedal. Its console dark like the pedal's screen and also the
   drop area, dark ink on the yellow. */
.patcher {
  --ink: #1f1a0c;
  margin: 0 0 1rem;
  background: var(--pedal-body);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 1rem 1.25rem 1.1rem;
  color: var(--ink);
}
.n {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.95rem;
}
/* Links told apart by their colour, underlined only on hover. */
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover,
a:focus-visible {
  text-decoration: underline;
}
code {
  font: 0.9em var(--mono);
  overflow-wrap: anywhere;
}
ol,
ul {
  padding-left: 1.4rem;
}
li {
  margin: 0.25rem 0;
}
/* The console is also the drop area. Until a file arrives its prompt's label covers it, so a click
   anywhere opens the file picker; a file dragged over it lights up its edge. */
.console {
  position: relative;
}
.console input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.log {
  list-style: none;
  margin: 0;
  min-height: 4.5rem;
  padding: 0.8rem 1rem;
  background: var(--term-bg);
  color: var(--term-fg);
  border: 2px solid var(--term-bg);
  border-radius: var(--radius-small);
  font: 0.82rem/1.6 var(--mono);
  overflow-wrap: anywhere;
  white-space: pre-line;
  /* Set into the pedal's body like its screen: shaded under the top edge, lit along the bottom. */
  box-shadow:
    inset 0 2px 6px rgb(0 0 0 / 0.7),
    0 1px 0 rgb(255 255 255 / 0.22);
}
.console:has(.prompt):hover .log,
.console:focus-within .log {
  border-color: var(--term-muted);
}
.console.over .log {
  border-color: var(--term-ok);
  border-style: dashed;
}
.log .prompt label {
  cursor: pointer;
}
.log .prompt label::after {
  content: "";
  position: absolute;
  inset: 0;
}
.log .prompt::after {
  content: "▌";
  margin-left: 0.3em;
  color: var(--term-ok);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .log .prompt::after {
    animation: none;
  }
}
.log li {
  margin: 0;
  padding-left: 1.4em;
  text-indent: -1.4em;
}
.log li::before {
  content: "› ";
  display: inline-block;
  width: 1.4em;
  text-indent: 0;
  color: var(--term-muted);
}
.log .busy,
.log .info {
  color: var(--term-muted);
}
.log .done {
  color: var(--term-ok);
}
.log .done::before {
  content: "✓ ";
  color: var(--term-ok);
}
.log .error {
  color: var(--term-err);
}
.log .error::before {
  content: "✗ ";
  color: var(--term-err);
}
summary {
  cursor: pointer;
  font-weight: 600;
}
/* Pushed down by the free space, at least 2rem under the columns. */
.columns {
  margin-bottom: 2rem;
}
footer {
  margin-top: auto;
  display: grid;
  gap: 0.4rem 3rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}
footer p {
  margin: 0;
}
