:root {
  --bg: #fff7ec;
  --bg-dots: #f6e3cc;
  --panel: #fffdf9;
  --panel-2: #fdf0e1;
  --line: #3a2117;
  --soft-line: #efdcc6;
  --text: #3a2117;
  --muted: #7d6253;
  --accent: #ff7a45;
  --accent-2: #ffd36e;
  --pink: #ffa3b5;
  --mint: #9fe0c1;
  --accent-ink: #3a2117;
  --term-bg: #2b1a13;
  --term-text: #fcebd9;
  --term-dim: #b69a88;

  --round: ui-rounded, "SF Pro Rounded", "Nunito", "Quicksand", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --shell: min(68rem, 100% - 2.5rem);
  --radius: 1.25rem;
  --pop: 0.3rem 0.3rem 0 var(--line);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1410;
    --bg-dots: #2a1d17;
    --panel: #271b15;
    --panel-2: #33241c;
    --line: #0d0806;
    --soft-line: #3f2d24;
    --text: #fcebd9;
    --muted: #c4a894;
    --term-bg: #140d0a;
    --pop: 0.3rem 0.3rem 0 #000;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 5rem;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--bg-dots) 1.5px, transparent 1.5px);
  background-size: 1.5rem 1.5rem;
  color: var(--text);
  font-family: var(--round);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 0.5rem;
}

code,
kbd,
pre {
  font-family: var(--mono);
}

/* chrome */

.topbar,
main,
.footer {
  width: var(--shell);
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0.75rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0.6rem 0.5rem 0.9rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(0.6rem);
  box-shadow: var(--pop);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.nav a {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
}

.nav a:hover {
  color: var(--text);
  background: var(--panel-2);
}

.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--accent-2);
}

.nav .nav-gh {
  margin-left: 0.25rem;
  border: 2px solid var(--line);
  background: var(--accent);
  color: var(--accent-ink);
}

.nav .nav-gh:hover {
  background: var(--accent-2);
  color: var(--accent-ink);
}

/* hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(3rem, 8vw, 5.5rem) 1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.25rem;
  padding: 0.25rem 0.8rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--accent-2);
  color: var(--accent-ink);
  font-size: 0.8rem;
  font-weight: 700;
}

.chip-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 3.9rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.hl {
  background: linear-gradient(transparent 58%, color-mix(in srgb, var(--pink) 75%, transparent) 58%);
  border-radius: 0.2em;
}

.lede {
  margin: 1.1rem 0 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.hint {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.hint a {
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.hero-art {
  position: relative;
  display: grid;
  justify-items: center;
}

.mascot {
  position: relative;
  z-index: 1;
  width: clamp(7rem, 16vw, 10.5rem);
  height: auto;
  margin-bottom: -1.4rem;
  filter: drop-shadow(0.25rem 0.3rem 0 color-mix(in srgb, var(--line) 22%, transparent));
  animation: bob 3.2s ease-in-out infinite;
}

@keyframes bob {
  50% {
    translate: 0 -0.4rem;
  }
}

.window {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--term-bg);
  box-shadow: var(--pop);
  overflow: hidden;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 2px solid var(--line);
  background: var(--accent-2);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.window-bar i {
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--accent);
}

.window-bar i:nth-child(2) {
  background: var(--panel);
}

.window-bar i:nth-child(3) {
  background: var(--mint);
}

.window-bar span {
  margin-left: auto;
}

.window pre {
  margin: 0;
  padding: 1rem 1.2rem 1.2rem;
  color: var(--term-text);
  font-size: 0.84rem;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.t-prompt {
  color: var(--accent);
  user-select: none;
}

.t-out {
  color: var(--mint);
}

.t-dim {
  color: var(--term-dim);
}

.caret {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  translate: 0 0.18em;
  border-radius: 0.15em;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .caret,
  .mascot {
    animation: none;
  }
}

/* install */

.install {
  margin-top: 1.75rem;
  max-width: 36rem;
}

.tabs {
  display: flex;
  gap: 0.4rem;
}

.tab {
  padding: 0.35rem 0.9rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-family: var(--round);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.tab[aria-selected="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}

.code {
  position: relative;
  margin-top: 0.6rem;
  padding: 0.95rem 1rem;
  border: 2px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
  box-shadow: var(--pop);
}

.code pre {
  margin: 0;
  padding-right: 4.5rem;
  font-size: 0.85rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.prompt {
  color: var(--accent);
  user-select: none;
}

.copy {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  translate: 0 -50%;
  padding: 0.3rem 0.75rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--accent-2);
  color: var(--accent-ink);
  font-family: var(--round);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.copy:hover {
  background: var(--accent);
}

/* sections */

main {
  padding-bottom: 4rem;
}

h2 {
  margin: 5rem 0 1.5rem;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h3 {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
  font-weight: 800;
}

.page-title {
  margin: 3.5rem 0 0.5rem;
  font-size: clamp(2rem, 5vw, 2.8rem);
}

main p code,
main dd code,
.hint code {
  padding: 0.05rem 0.35rem;
  border-radius: 0.4rem;
  background: var(--panel-2);
  font-size: 0.85em;
}

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

.feature,
.mode,
.cheat,
.step {
  padding: 1.25rem 1.3rem 1.3rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--pop);
}

.feature {
  transition: translate 0.15s ease, box-shadow 0.15s ease;
}

@media (hover: hover) {
  .feature:hover {
    translate: -0.12rem -0.12rem;
    box-shadow: 0.42rem 0.42rem 0 var(--line);
  }
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 0.75rem;
  border: 2px solid var(--line);
  border-radius: 0.85rem;
  background: var(--accent-2);
  font-size: 1.3rem;
}

.feature:nth-child(3n + 2) .feature-icon {
  background: var(--pink);
}

.feature:nth-child(3n) .feature-icon {
  background: var(--mint);
}

.feature p,
.mode p,
.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.modes,
.cheats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.mode .mode-tag {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.1rem 0.65rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--mint);
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mode .mode-tag-alt {
  background: var(--pink);
}

.mode h3 code {
  color: var(--accent);
}

.mode pre,
.step pre {
  margin: 0.4rem 0 0.8rem;
  padding: 0.8rem 0.95rem;
  border-radius: 0.85rem;
  background: var(--term-bg);
  color: var(--term-text);
  font-size: 0.8rem;
  line-height: 1.7;
  overflow-x: auto;
}

.cheat dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.55rem 1rem;
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
}

.cheat dt {
  font-weight: 700;
  white-space: nowrap;
}

.cheat dt code {
  color: var(--accent);
  font-weight: 700;
}

.cheat dd {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.cheat dd b {
  color: var(--text);
}

kbd {
  display: inline-block;
  min-width: 1.6rem;
  padding: 0 0.4rem;
  border: 2px solid var(--line);
  border-bottom-width: 3px;
  border-radius: 0.45rem;
  background: var(--panel-2);
  font-size: 0.78rem;
  text-align: center;
}

.steps {
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 2.2rem;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -1.1rem;
  left: 1.2rem;
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
}

/* releases */

.release {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.65rem;
}

.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.9rem;
  color: var(--muted);
}

.release-head strong {
  padding: 0.1rem 0.65rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--accent-2);
  color: var(--accent-ink);
}

.release-row {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.65rem 0.7rem 0.65rem 1.1rem;
  border: 2px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
  box-shadow: 0.2rem 0.2rem 0 var(--line);
}

.release-row .name {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  overflow-x: auto;
  white-space: nowrap;
}

.release-row .size {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.release-empty {
  color: var(--muted);
}

a.release-empty {
  font-weight: 700;
  color: var(--accent);
}

.button {
  padding: 0.3rem 0.9rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.button:hover {
  background: var(--accent-2);
  color: var(--accent-ink);
}

/* changelog */

.lede a {
  font-weight: 700;
  color: var(--accent);
}

.changelog {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}

.entry {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--pop);
  overflow: hidden;
}

.entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
  position: relative;
  padding: 0.9rem 3.6rem 0.9rem 1.2rem;
  cursor: pointer;
  list-style: none;
}

.entry-head::-webkit-details-marker {
  display: none;
}

.entry-head::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 1rem;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--panel-2);
  font-weight: 800;
  line-height: 1;
}

.entry[open] .entry-head {
  border-bottom: 2px dashed var(--soft-line);
}

.entry[open] .entry-head::after {
  content: "−";
  background: var(--accent-2);
  color: var(--accent-ink);
}

.entry-version {
  padding: 0.1rem 0.7rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 800;
}

.entry-unreleased {
  background: var(--panel-2);
  color: var(--text);
  border-style: dashed;
}

.entry-items:last-child {
  margin-bottom: 1.2rem;
}

.entry-date,
.entry-counts {
  color: var(--muted);
  font-size: 0.85rem;
}

.entry-date {
  font-family: var(--mono);
}

.entry-section {
  width: fit-content;
  margin: 1.1rem 1.2rem 0.55rem;
  padding: 0.05rem 0.65rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--accent-ink);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.entry-added {
  background: var(--mint);
}

.entry-changed {
  background: var(--accent-2);
}

.entry-fixed {
  background: var(--pink);
}

.entry-items {
  display: grid;
  gap: 0.5rem;
  margin: 0.9rem 1.2rem 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.93rem;
  overflow-wrap: anywhere;
}

.entry-section + .entry-items {
  margin-top: 0;
}

.entry-items li::marker {
  color: var(--accent);
}

.entry-items strong {
  color: var(--text);
}

.entry-items code {
  padding: 0.05rem 0.35rem;
  border-radius: 0.4rem;
  background: var(--panel-2);
  color: var(--text);
  font-size: 0.85em;
}

.entry-link {
  display: inline-block;
  margin: 1.1rem 1.2rem 1.2rem;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
}

/* footer */

.footer {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem 1.6rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.88rem;
}

.footer p {
  margin: 0;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 800;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-weight: 700;
}

.footer-note {
  font-size: 0.8rem;
}

/* tablets */

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

  .hero-art {
    justify-self: center;
    width: min(100%, 34rem);
  }
}

@media (max-width: 44rem) {
  .cheats {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav {
    flex-wrap: nowrap;
  }

  .nav a:not(.nav-gh, [data-nav]) {
    display: none;
  }
}

/* phones */

@media (max-width: 36rem) {
  :root {
    --shell: calc(100% - 1.5rem);
    --radius: 1rem;
  }

  .topbar {
    padding-left: 0.7rem;
  }

  .nav a {
    padding-inline: 0.65rem;
  }

  .chip {
    font-size: 0.74rem;
  }

  .hero {
    gap: 2.5rem;
    padding-top: 2.25rem;
  }

  .lede {
    font-size: 1rem;
  }

  .code pre {
    font-size: 0.8rem;
  }

  .window pre {
    padding: 0.85rem 0.95rem 1rem;
    font-size: 0.75rem;
  }

  h2 {
    margin: 3.5rem 0 1.1rem;
  }

  .features,
  .steps,
  .modes,
  .cheats {
    gap: 0.9rem;
  }

  .steps {
    row-gap: 1.75rem;
  }

  .feature,
  .mode,
  .cheat,
  .step {
    padding: 1rem 1.05rem 1.1rem;
  }

  .step {
    padding-top: 1.9rem;
  }

  .cheat dl {
    gap: 0.5rem 0.75rem;
    font-size: 0.88rem;
  }

  .release-row {
    flex-wrap: wrap;
  }

  .release-row .name {
    flex-basis: 100%;
  }

  .release-row .button {
    margin-left: auto;
  }

  .footer {
    padding: 1.2rem 1.25rem;
  }

  .entry-head {
    padding: 0.8rem 3.2rem 0.8rem 1rem;
  }

  .entry-head::after {
    right: 0.8rem;
  }

  .entry-section,
  .entry-items,
  .entry-link {
    margin-inline: 1rem;
  }
}

@media (max-width: 26rem) {
  .brand-name {
    display: none;
  }

  .nav {
    font-size: 0.85rem;
  }

  .nav a {
    padding-inline: 0.5rem;
  }
}
