/* Tokens — patina housing, cool paper, ink, cadmium lamp.
   Display: Darker Grotesque. Body: Literata. Tape and commands: Martian Mono. */

:root {
  --patina: #1e6b5c;
  --patina-deep: #143f37;
  --paper: #e4ebe6;
  --slip: #f7f8f6;
  --ink: #14211c;
  --lamp: #f3d34a;
  --display: "Darker Grotesque", "Arial Narrow", "Franklin Gothic Medium", sans-serif;
  --body: "Literata", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --mono: "Martian Mono", "Courier New", monospace;
  --rule: color-mix(in srgb, var(--ink) 14%, transparent);
  --measure: 70rem;
  --gutter: 1.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.55;
  font-optical-sizing: auto;
  overflow-x: clip;
}

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

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

a {
  color: var(--patina-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

:focus {
  outline: none;
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 5;
  background: var(--lamp);
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.skip:focus {
  top: 0.75rem;
}

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

.nameplate {
  background: var(--patina);
  color: var(--slip);
}

.nameplate a {
  color: var(--slip);
  text-decoration: none;
}

.nameplate a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.nameplate :focus-visible {
  outline-color: var(--lamp);
}

.nameplate-inner {
  width: min(var(--measure), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 4.25rem;
  padding-block: 0.75rem;
}

.mark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.mark img {
  width: 2rem;
  height: 2rem;
}

.version {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.nav {
  display: flex;
  gap: 1.15rem;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.hero {
  width: min(var(--measure), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 2.5rem;
  align-items: start;
  padding-block: 4.25rem 3.75rem;
}

.kicker {
  margin: 0 0 0.85rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--patina-deep);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.92;
  margin: 0;
}

h1 {
  font-size: clamp(3.15rem, 6.4vw, 5.05rem);
  max-width: 12em;
}

.lede {
  margin: 1.35rem 0 0;
  max-width: 38rem;
  font-size: 1.2rem;
  line-height: 1.5;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 1.1rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.cmds {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  max-width: 38rem;
}

.cmd {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  background: var(--slip);
  border: 1px solid var(--rule);
  border-radius: 2px;
  min-width: 0;
}

.cmd code,
.snippet code {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
}

.cmd code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding: 0.72rem 0.4rem 0.72rem 0.85rem;
  white-space: nowrap;
}

.copy {
  flex: none;
  align-self: center;
  margin-right: 0.4rem;
  min-height: 2.4rem;
  padding: 0.4rem 0.7rem;
  border-radius: 2px;
  border: 1px solid var(--ink);
  background: var(--slip);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.copy:hover,
.copy.is-copied {
  background: var(--patina);
  border-color: var(--patina);
  color: var(--slip);
}

.copy:active {
  transform: translateY(1px);
}

.fine {
  margin: 0.9rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--ink) 72%, transparent);
}

.hero-bed {
  position: relative;
  min-width: 0;
  background: var(--patina);
  padding: 1.15rem 0 1.15rem 1.15rem;
  /* Paint to the viewport edge without widening the scrollport. */
  box-shadow: 100vw 0 0 var(--patina);
}

.tape {
  margin: 0;
  background: var(--slip);
  border-radius: 2px;
  box-shadow: 7px 7px 0 var(--patina-deep);
  color: var(--ink);
}

.tape-cap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.75rem 0.9rem 0.55rem 1.55rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lamp {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: var(--lamp);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--lamp) 28%, transparent);
  animation: lamp 2.6s steps(1, end) infinite;
}

.roll {
  list-style: none;
  margin: 0;
  padding: 0.15rem 0.85rem 0.95rem 0.7rem;
}

.roll li {
  display: grid;
  grid-template-columns: 0.85rem minmax(0, 1fr);
  gap: 0.45rem;
  align-items: start;
  padding-block: 0.22rem;
  animation: write 0.55s ease both;
}

.roll li:nth-child(1) { animation-delay: 0.05s; }
.roll li:nth-child(2) { animation-delay: 0.16s; }
.roll li:nth-child(3) { animation-delay: 0.27s; }
.roll li:nth-child(4) { animation-delay: 0.38s; }
.roll li:nth-child(5) { animation-delay: 0.49s; }
.roll li:nth-child(6) { animation-delay: 0.6s; }
.roll li:nth-child(7) { animation-delay: 0.78s; }
.roll li:nth-child(8) { animation-delay: 0.9s; }
.roll li:nth-child(9) { animation-delay: 1.02s; }

.hole {
  width: 0.48rem;
  height: 0.48rem;
  margin-top: 0.38em;
  border-radius: 50%;
  background: var(--patina);
  box-shadow: inset 0 1px 0 rgb(0 0 0 / 0.35);
}

.roll code {
  display: block;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.45;
  white-space: nowrap;
  scrollbar-width: thin;
}

.ev {
  color: var(--patina-deep);
  font-weight: 500;
}

.roll .split {
  grid-template-columns: 0.85rem minmax(0, 1fr);
  padding-top: 0.55rem;
}

.roll .split span.note {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--patina-deep);
}

.sheet {
  width: min(var(--measure), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
  padding-bottom: 4.5rem;
}

.block {
  margin-top: 4.5rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--rule);
}

h2 {
  font-size: clamp(2.3rem, 4vw, 3.35rem);
  max-width: 16ch;
  margin-bottom: 1rem;
}

.prose {
  max-width: 40rem;
}

.prose p,
.step p,
.spec dd,
.release p,
.faq-a {
  margin: 0.8rem 0 0;
}

.prose p:first-of-type,
.step p {
  margin-top: 0.45rem;
}

code,
.snippet {
  font-family: var(--mono);
}

p code,
li code,
dd code {
  font-size: 0.86em;
  font-weight: 500;
}

.steps {
  list-style: decimal;
  margin: 1.5rem 0 0;
  padding: 0 0 0 2.6rem;
  max-width: 44rem;
}

.step {
  padding-block: 1.15rem;
  border-top: 1px solid var(--rule);
}

.step:last-child {
  border-bottom: 1px solid var(--rule);
}

.step::marker {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.15rem;
  color: var(--patina);
}

.step h3 {
  font-size: 1.85rem;
  line-height: 1;
}

.spec {
  margin: 1.4rem 0 0;
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  column-gap: 1.25rem;
}

.spec dt {
  margin: 0;
  padding-top: 1.05rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--patina-deep);
}

.spec dd {
  margin: 0;
  padding: 0.95rem 0 1rem;
  border-bottom: 1px solid var(--rule);
}

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  margin-top: 1.4rem;
}

.install-grid h3 {
  font-size: 1.7rem;
  margin-bottom: 0.45rem;
}

.snippet {
  position: relative;
  margin: 0.7rem 0 0;
  background: var(--slip);
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.snippet pre {
  margin: 0;
  padding: 0.95rem 5.5rem 0.95rem 1rem;
  overflow-x: auto;
  max-width: 100%;
}

.snippet code {
  font-size: 0.78rem;
  white-space: pre;
}

.snippet .copy {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
}

.table-wrap {
  margin-top: 0.8rem;
  max-width: 100%;
  overflow-x: auto;
}

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

th,
td {
  text-align: left;
  padding: 0.55rem 0.7rem 0.55rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--patina-deep);
}

td code {
  font-size: 0.78rem;
  white-space: nowrap;
}

.release {
  max-width: 42rem;
}

.faq {
  margin: 1.2rem 0 0;
  padding: 0;
}

.faq-item {
  padding: 1.05rem 0;
  border-top: 1px solid var(--rule);
}

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

.faq-q {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.6rem 0 2.2rem;
}

.site-footer .sheet {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  align-items: baseline;
  padding-bottom: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.site-footer p {
  margin: 0;
}

@keyframes write {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes lamp {
  0%, 62% { opacity: 1; }
  63%, 100% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .roll li,
  .lamp {
    animation: none;
  }

  .copy:active {
    transform: none;
  }
}

@media (max-width: 880px) {
  .hero-bed {
    margin-inline: calc(var(--gutter) * -1);
    margin-block: 0;
    padding: 1.35rem var(--gutter);
    box-shadow: none;
  }

  .nameplate-inner {
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
  }

  .nav {
    margin-left: 0;
    width: 100%;
    padding-bottom: 0.35rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 2.6rem 2.2rem;
    gap: 2rem;
  }

  h1 {
    max-width: 14ch;
  }

  .spec {
    grid-template-columns: minmax(0, 1fr);
  }

  .spec dt {
    padding-top: 0.95rem;
    padding-bottom: 0;
  }

  .spec dd {
    padding-top: 0.3rem;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 1.05rem;
  }

  .cmd code {
    white-space: normal;
    overflow-x: visible;
  }

  .snippet pre {
    padding-right: 1rem;
    padding-bottom: 3.1rem;
  }

  .snippet .copy {
    top: auto;
    bottom: 0.4rem;
  }
}
