@font-face {
  font-family: 'Minecraft Ten';
  src: url('/fonts/minecraft-ten-v2.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: 'Minecraft Seven';
  src: url('/fonts/minecraft-seven-v2.woff') format('woff');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #090909;
  --surface: #101010;
  --surface-raised: #131313;
  --surface-hover: #1a1a1a;
  --line: #252525;
  --line-strong: #2e2e2e;
  --text: #f2f2f2;
  --body: #c9c9c9;
  --muted: #8c8c8c;
  --red: #df1818;
  --red-hover: #ef2424;
  --red-border: #750909;
  --red-shadow: #980c0c;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, 'SF Mono', Menlo, 'DejaVu Sans Mono', monospace;
  --block-l:
    -2px 0 0 #090909, 0 -2px 0 #090909, -2px -2px 0 #090909, 1px 1px 0 #242424,
    2px 2px 0 #242424, 3px 3px 0 #242424, 4px 4px 0 #242424, 5px 5px 0 #242424,
    6px 6px 0 #242424, 7px 7px 0 #242424, 8px 8px 0 #121212, 9px 9px 0 #000000,
    10px 10px 0 #000000;
  --block-s:
    -2px 0 0 #090909, 0 -2px 0 #090909, -2px -2px 0 #090909, 1px 1px 0 #242424,
    2px 2px 0 #242424, 3px 3px 0 #121212, 4px 4px 0 #000000, 5px 5px 0 #000000;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: 'Minecraft Ten', sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #ffffff;
  color: #090909;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.pixel-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  shape-rendering: crispEdges;
}

.shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 0 24px 72px;
}

/* Header */

.top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  padding: 44px 0 30px;
}

.brand {
  display: inline-block;
  line-height: 0;
}

.brand img {
  width: 150px;
  height: auto;
}

.top h1 {
  margin: 22px 0 0;
  color: #ffffff;
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 400;
  line-height: 0.9;
  text-shadow: var(--block-l);
}

.lead {
  max-width: 58ch;
  margin: 20px 0 0;
  color: var(--body);
  font-family: 'Minecraft Seven', sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

.os-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 390px;
}

.os-tab {
  height: 58px;
  padding: 0 12px 5px;
  border: 2px solid #292929;
  border-radius: 0;
  background: #171717;
  box-shadow: inset 0 -5px 0 #0c0c0c;
  color: #d8d8d8;
  font-family: 'Minecraft Ten', sans-serif;
  font-size: 15px;
  line-height: 1;
  text-shadow: 2px 2px 0 #000000;
}

.os-tab:hover {
  background: #202020;
}

.os-tab[aria-selected='true'] {
  border-color: var(--red-border);
  background: var(--red);
  box-shadow: inset 0 -5px 0 var(--red-shadow);
  color: #ffffff;
}

.os-tab:focus-visible,
.jump a:focus-visible,
.copy:focus-visible,
.expand:focus-visible,
.tool:focus-visible,
.empty button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Sticky search bar */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px 0;
  background: var(--background);
}

.search {
  position: relative;
  display: flex;
  min-width: 0;
  height: 62px;
  align-items: center;
  gap: 14px;
  padding: 0 14px 5px 18px;
  border: 2px solid #292929;
  background: #121212;
  box-shadow: inset 0 -5px 0 #0b0b0b;
  cursor: text;
}

.search:focus-within {
  border-color: var(--red);
}

.search .pixel-icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 3px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: 'Minecraft Seven', sans-serif;
  font-size: 18px;
}

.search input::placeholder {
  color: #767676;
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.key {
  display: grid;
  min-width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0 8px 3px;
  border: 2px solid #333333;
  background: #1b1b1b;
  box-shadow: inset 0 -3px 0 #0d0d0d;
  color: #9d9d9d;
  font-family: 'Minecraft Seven', sans-serif;
  font-size: 13px;
  line-height: 1;
}

.jump {
  display: flex;
  gap: 8px;
}

.jump a {
  display: flex;
  height: 62px;
  align-items: center;
  gap: 12px;
  padding: 0 18px 5px;
  border: 2px solid #292929;
  background: #171717;
  box-shadow: inset 0 -5px 0 #0c0c0c;
  color: #e6e6e6;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  text-shadow: 2px 2px 0 #000000;
}

.jump a:hover {
  background: #202020;
}

.jump a span {
  color: var(--muted);
  font-family: 'Minecraft Seven', sans-serif;
  font-size: 14px;
  text-shadow: none;
}

/* Sections */

.section {
  padding-top: 36px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 400;
  line-height: 0.95;
  text-shadow: var(--block-l);
}

.section-hint {
  margin: 0;
  color: var(--muted);
  font-family: 'Minecraft Seven', sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

.section-hint b {
  color: #dcdcdc;
  font-weight: 400;
}

/* Commands */

.commands {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cmd {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 14px;
  padding: 20px 20px 22px;
  border: 2px solid var(--line);
  background: var(--surface);
  box-shadow: inset 0 -5px 0 #0b0b0b;
}

.cmd[data-first='true'],
.tool[data-first='true'] {
  border-color: var(--red);
}

.cmd-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}

.cmd-title {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.cmd h3 {
  margin: 0;
  color: #ffffff;
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
  text-shadow: var(--block-s);
}

.cmd-shell {
  margin: 0;
  color: var(--muted);
  font-family: 'Minecraft Seven', sans-serif;
  font-size: 13px;
  line-height: 1.2;
}

.cmd-desc {
  margin: 0;
  color: var(--body);
  font-family: 'Minecraft Seven', sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.copy {
  display: flex;
  height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 16px 5px 14px;
  border: 2px solid var(--red-border);
  border-radius: 0;
  background: var(--red);
  box-shadow: inset 0 -5px 0 var(--red-shadow);
  color: #ffffff;
  font-family: 'Minecraft Ten', sans-serif;
  font-size: 15px;
  line-height: 1;
  text-shadow: 2px 2px 0 #680707;
  white-space: nowrap;
}

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

.copy[data-state='done'] {
  border-color: #a9a9a9;
  background: #f4f4f4;
  box-shadow: inset 0 -5px 0 #bdbdbd;
  color: #151515;
  text-shadow: none;
}

.copy[data-state='failed'] {
  border-color: #3a3a3a;
  background: #1d1d1d;
  box-shadow: inset 0 -5px 0 #0c0c0c;
  text-shadow: 2px 2px 0 #000000;
}

.path {
  display: grid;
  gap: 8px;
}

.path span {
  color: var(--muted);
  font-family: 'Minecraft Seven', sans-serif;
  font-size: 13px;
  line-height: 1;
}

.path input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 2px solid #2c2c2c;
  border-radius: 0;
  outline: 0;
  background: #0b0b0b;
  font-family: var(--mono);
  font-size: 14px;
}

.path input:focus {
  border-color: var(--red);
}

/* Collapsed code shows exactly four whole lines. Overflow clips at the padding box, so the bottom spacing is a
   background-coloured border and the visible edge line is a shadow below it. */
.code {
  max-height: calc(6em + 26px);
  margin: 0;
  overflow: hidden;
  padding: 12px 14px 0;
  border: 2px solid #1c1c1c;
  border-bottom: 12px solid #060606;
  box-shadow: 0 2px 0 #1c1c1c;
  background: #060606;
  color: #d6d6d6;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  tab-size: 2;
}

.code[data-expanded='true'] {
  max-height: 420px;
  padding-bottom: 12px;
  border-bottom: 2px solid #1c1c1c;
  box-shadow: none;
  overflow: auto;
  scrollbar-color: var(--red) #171717;
  scrollbar-width: thin;
}

.code:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.expand {
  justify-self: start;
  margin: -6px 0 0;
  padding: 4px 0;
  border: 0;
  background: none;
  color: #a9a9a9;
  font-family: 'Minecraft Seven', sans-serif;
  font-size: 13px;
  line-height: 1;
  text-decoration: underline;
  text-decoration-color: #4a4a4a;
  text-underline-offset: 4px;
}

.expand:hover {
  color: #ffffff;
}

/* Tools */

.group + .group {
  margin-top: 26px;
}

.group h3 {
  margin: 0 0 10px;
  color: #d8d8d8;
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
  text-shadow: 2px 2px 0 #000000;
}

.tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 8px;
}

.tool {
  display: grid;
  min-width: 0;
  min-height: 88px;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: center;
  gap: 16px;
  padding: 14px 14px 18px 18px;
  border: 2px solid var(--line);
  background: var(--surface-raised);
  box-shadow: inset 0 -5px 0 #0b0b0b;
  color: inherit;
  text-decoration: none;
}

.tool:hover {
  background: var(--surface-hover);
}

.tool-copy {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.tool strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.05;
  text-overflow: ellipsis;
  text-shadow: 2px 2px 0 #000000;
  white-space: nowrap;
}

.tool small {
  color: #bdbdbd;
  font-family: 'Minecraft Seven', sans-serif;
  font-size: 13px;
  line-height: 1.35;
}

.tool-host {
  color: #6f6f6f;
  font-family: 'Minecraft Seven', sans-serif;
  font-size: 12px;
  line-height: 1;
}

.tool-action {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding-bottom: 4px;
  border: 2px solid #333333;
  background: #1d1d1d;
  box-shadow: inset 0 -4px 0 #0c0c0c;
  color: #e6e6e6;
}

.tool:hover .tool-action,
.tool[data-first='true'] .tool-action {
  border-color: var(--red-border);
  background: var(--red);
  box-shadow: inset 0 -4px 0 var(--red-shadow);
  color: #ffffff;
}

/* Empty state */

.empty {
  display: grid;
  justify-items: start;
  gap: 18px;
  margin-top: 36px;
  padding: 30px;
  border: 2px solid var(--line);
  background: var(--surface);
}

.empty p {
  margin: 0;
  color: var(--body);
  font-family: 'Minecraft Seven', sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

.empty strong {
  color: #ffffff;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  text-shadow: var(--block-s);
}

.empty button {
  height: 48px;
  padding: 0 18px 5px;
  border: 2px solid #a9a9a9;
  border-radius: 0;
  background: #f4f4f4;
  box-shadow: inset 0 -5px 0 #bdbdbd;
  color: #151515;
  font-family: 'Minecraft Ten', sans-serif;
  font-size: 15px;
  line-height: 1;
}

.empty button:hover {
  background: #ffffff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 980px) {
  .top {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 26px;
  }

  .os-switch {
    width: 100%;
  }

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

@media (max-width: 720px) {
  html {
    scroll-padding-top: 88px;
  }

  .shell {
    padding: 0 12px 48px;
  }

  .top {
    padding: 28px 0 18px;
  }

  .brand img {
    width: 120px;
  }

  .lead {
    font-size: 14px;
  }

  .os-tab {
    height: 52px;
    font-size: 14px;
  }

  .bar {
    grid-template-columns: minmax(0, 1fr);
    padding: 8px 0;
  }

  .search {
    height: 56px;
  }

  .search input {
    font-size: 16px;
  }

  .key,
  .jump {
    display: none;
  }

  .section {
    padding-top: 24px;
  }

  .cmd {
    padding: 16px 14px 18px;
  }

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

  .copy {
    justify-content: center;
  }

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

  .tool {
    padding: 12px 12px 16px 14px;
  }
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
