/* Tool pages (/tools/<name>/): the same look as the landing (style.css is loaded first) but a normal scrolling page,
   no canvas and no animation. Space on the 4 px scale. Colours only from style.css :root. */

html:has(body.page) {
  height: auto;
}
body.page {
  height: auto;
  min-height: 100svh;
  overflow: visible;
  background:
    radial-gradient(ellipse 60% 50% at 85% 0%, color-mix(in srgb, var(--ember) 14%, transparent), transparent 70%),
    var(--bg);
}

.pg {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: var(--s5) var(--s6) var(--s6);
}
.pg-wrap {
  width: min(100%, 72rem);
  margin-inline: auto;
}
.pg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  width: min(100%, 72rem);
  margin-inline: auto;
}
.pg-nav {
  display: flex;
  align-items: center;
  gap: var(--s5);
}
.pg-nav .link-ember {
  color: var(--ember);
}

.kicker {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-size: 0.875rem;
  color: var(--bone-soft);
}
.kicker .state {
  color: var(--bone);
}
.kicker .state::before {
  background: var(--ember);
  border-color: var(--ember);
}
.pg h1 {
  margin-top: var(--s3);
  font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.pg .lead {
  max-width: 34rem;
  margin-top: var(--s4);
  font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.25rem);
  line-height: 1.55;
  color: color-mix(in srgb, var(--bone) 92%, transparent);
  text-wrap: pretty;
}
.pg .actions {
  margin-top: var(--s5);
}
.pg h2 {
  font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.pg p {
  text-wrap: pretty;
}
.muted {
  color: var(--bone-soft);
}
.pg a:not(.btn, .link, .brand) {
  text-underline-offset: 3px;
}

/* the box with the command */
.box {
  padding: var(--s5);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--bone-dim);
  border-radius: 4px;
}
.box h2 {
  font-size: 1.25rem;
}
.box p {
  margin-top: var(--s3);
  line-height: 1.6;
  color: var(--bone-soft);
}
.cmd {
  display: flex;
  align-items: stretch;
  gap: var(--s2);
  margin-top: var(--s4);
}
.cmd code {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: var(--s3) var(--s4);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--bone);
  background: var(--bg);
  border: 1px solid var(--bone-dim);
  border-radius: 4px;
  overflow-wrap: anywhere;
}
.cmd .btn {
  flex: none;
}
.cmd-status {
  min-height: 1.5em;
  margin-top: var(--s2);
  font-size: 0.875rem;
  color: var(--bone-soft);
}
.cmd .btn.is-copied {
  border-color: var(--ember);
}
.note {
  padding-left: var(--s4);
  border-left: 2px solid var(--ember);
}

.pg-foot {
  margin-top: auto;
  padding-top: var(--s6);
  width: min(100%, 72rem);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s2) var(--s5);
  font-size: 0.875rem;
  color: var(--bone-soft);
}
.pg-foot a {
  color: var(--bone);
}

/* ---------- the page: sections and a screenshot ---------- */

.vb .hero {
  padding-block: var(--s8) var(--s7);
  text-align: center;
}
.vb .hero .kicker,
.vb .hero .actions {
  justify-content: center;
}
.vb .hero .lead {
  margin-inline: auto;
}
.vb .shot {
  margin: 0 auto;
  width: min(100%, 64rem);
}
.vb .shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--bone-dim);
  border-radius: 4px;
  background: var(--bone);
}
.vb .shot figcaption {
  margin-top: var(--s2);
  font-size: 0.875rem;
  text-align: center;
  color: var(--bone-soft);
}
.vb .sec {
  width: min(100%, 72rem);
  margin: var(--s8) auto 0;
}
.vb .sec > p {
  max-width: 40rem;
  margin-top: var(--s3);
  line-height: 1.6;
  color: var(--bone-soft);
}
.vb .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--s4);
  margin-top: var(--s5);
  padding: 0;
  list-style: none;
}
.vb .grid li {
  padding: var(--s5);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--bone-dim);
  border-radius: 4px;
}
.vb .grid h3 {
  font-size: 1.0625rem;
  font-weight: 600;
}
.vb .grid p {
  margin-top: var(--s2);
  line-height: 1.55;
  color: var(--bone-soft);
}
.vb .two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s7);
  align-items: start;
}
.vb .two .box {
  margin: 0;
}
.vb .two h2 + p {
  margin-top: var(--s3);
  line-height: 1.6;
}
.vb .two .note {
  margin-top: var(--s4);
  color: var(--bone-soft);
  line-height: 1.6;
}
.vb .support {
  padding: var(--s6);
  border: 1px solid var(--bone-dim);
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
}
.vb .support p {
  max-width: 36rem;
  margin: 0;
}
.vb .support h2 {
  margin-bottom: var(--s2);
}

@media (max-width: 900px) {
  .vb .two {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s5);
  }
}
@media (max-width: 700px) {
  .pg {
    padding: var(--s4) var(--s4) var(--s5);
  }
  .pg-nav {
    gap: var(--s4);
  }
  .pg-nav .hide-sm {
    display: none;
  }
  .box {
    padding: var(--s4);
  }
  .cmd {
    flex-direction: column;
  }
  .vb .hero {
    padding-block: var(--s6) var(--s5);
    text-align: left;
  }
  .vb .hero .kicker,
  .vb .hero .actions {
    justify-content: flex-start;
  }
  .vb .sec {
    margin-top: var(--s7);
  }
  .vb .support {
    padding: var(--s4);
  }
  .pg .actions .btn {
    flex: 1 1 auto;
  }
}

.cmd .btn[hidden] {
  display: none;
}
