:root {
  color-scheme: dark;
  --ansi-0-black: #000000;
  --ansi-10-lime: #00ff00;
  --ansi-13-fuchsia: #ff00ff;
  --ansi-15-white: #ffffff;
  --ansi-235-gray-15: #262626;
  --ansi-237-gray-23: #3a3a3a;
  --ansi-240-gray-35: #585858;
  --ansi-245-gray-54: #8a8a8a;
  --ansi-248-gray-66: #a8a8a8;
  --ansi-254-gray-89: #e4e4e4;
  --ansi-true-brand: #e4f221;
  --theme-background: var(--ansi-0-black);
  --theme-window-background: var(--ansi-237-gray-23);
  --theme-window-shadow: var(--ansi-235-gray-15);
  --theme-border: var(--ansi-240-gray-35);
  --theme-border-subdued: rgba(58, 58, 58, 0.55);
  --theme-text: var(--ansi-15-white);
  --theme-muted: var(--ansi-248-gray-66);
  --theme-button-background: var(--ansi-235-gray-15);
  --theme-button-foreground: var(--ansi-245-gray-54);
  --theme-focused-foreground: var(--ansi-true-brand);
  --theme-success: var(--ansi-10-lime);
  --line: 1.25rem;
  --font: 16px;
  --mono: Consolas, "SFMono-Regular", Monaco, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    linear-gradient(transparent 24px, rgba(228, 242, 33, 0.07) 25px),
    linear-gradient(90deg, transparent 24px, rgba(228, 242, 33, 0.05) 25px),
    var(--theme-background);
  background-size: 25px 25px;
  color: var(--theme-text);
  font: 400 var(--font)/var(--line) var(--mono);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0;
  padding: var(--line) 1ch calc(var(--line) * 3);
  text-rendering: geometricPrecision;
}

a {
  background: var(--theme-border-subdued);
  color: var(--theme-text);
  text-decoration: none;
}

a:hover,
a:focus,
button:hover,
button:focus,
[tabindex]:focus {
  background: var(--theme-focused-foreground);
  color: var(--ansi-0-black);
  outline: 0;
}

main {
  margin: 0 auto;
  max-width: 118ch;
}

h1,
h2,
h3,
p,
ul,
pre,
table {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 10vw, 7rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.9;
  text-transform: uppercase;
}

h2,
.card-title {
  color: var(--theme-focused-foreground);
  font-size: 1rem;
  font-weight: 400;
  text-transform: uppercase;
}

h3 {
  color: var(--theme-muted);
  font-size: 1rem;
  font-weight: 400;
  text-transform: uppercase;
}

code,
pre {
  font: inherit;
}

code {
  background: var(--theme-button-background);
  color: var(--ansi-254-gray-89);
  padding: 0 0.5ch;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

ul {
  list-style: none;
  padding: 0;
}

li::before {
  color: var(--theme-focused-foreground);
  content: "> ";
}

details {
  border-top: 1px solid var(--theme-border);
  padding-top: calc(var(--line) / 2);
}

details + details {
  margin-top: calc(var(--line) / 2);
}

summary {
  color: var(--theme-focused-foreground);
  cursor: pointer;
  text-transform: uppercase;
}

.window {
  background: var(--theme-window-background);
  box-shadow: 1ch var(--line) 0 0 var(--theme-window-shadow);
  margin: 0 1ch calc(var(--line) * 3) 0;
  min-width: min(24ch, 100%);
  padding: var(--line) min(2ch, 4vw);
}

.bar {
  align-items: stretch;
  border-bottom: 1px solid var(--theme-border);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: calc(var(--line) * -1) min(-2ch, -4vw) var(--line);
}

.bar a,
.bar span {
  background: var(--theme-button-background);
  display: block;
  min-height: calc(var(--line) * 2);
  overflow: hidden;
  padding: calc(var(--line) / 2) 1ch;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.bar span {
  color: var(--theme-muted);
}

.brand {
  display: grid;
  gap: var(--line);
  grid-template-columns: minmax(0, 1fr) minmax(30ch, 42ch);
}

.lede {
  color: var(--ansi-254-gray-89);
  max-width: 68ch;
}

.muted {
  color: var(--theme-muted);
}

.badge {
  background: var(--theme-border);
  color: var(--theme-text);
  display: inline-block;
  margin-left: 1ch;
  padding: 0 1ch;
  text-transform: uppercase;
}

.terminal {
  background: var(--ansi-0-black);
  border: 1px solid var(--theme-border);
  color: var(--theme-success);
  overflow-x: auto;
  padding: var(--line) 2ch;
}

.grid {
  display: grid;
  gap: var(--line) 2ch;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.card {
  position: relative;
}

.frame-top {
  align-items: end;
  display: flex;
}

.frame-top::before,
.frame-top::after {
  border-top: 2px solid var(--theme-text);
  content: "";
  flex: 1;
  height: calc(var(--line) / 2);
}

.frame-top::before {
  border-left: 2px solid var(--theme-text);
}

.frame-top::after {
  border-right: 2px solid var(--theme-text);
}

.card-title {
  color: var(--theme-text);
  padding: 0 1ch;
  white-space: nowrap;
}

.card-body {
  border-bottom: 2px solid var(--theme-text);
  border-left: 2px solid var(--theme-text);
  border-right: 2px solid var(--theme-text);
  min-height: calc(var(--line) * 5);
  padding: calc(var(--line) / 2) 2ch var(--line);
}

.card-body > * + * {
  margin-top: var(--line);
}

.actions {
  display: grid;
  gap: 1px;
}

.action {
  background: transparent;
  border: 0;
  color: var(--theme-text);
  display: grid;
  font: inherit;
  grid-template-columns: 3ch minmax(0, 1fr) auto;
  padding: 0;
  text-align: left;
  width: 100%;
}

.action b,
.action kbd {
  background: var(--theme-button-foreground);
  color: var(--theme-text);
  font: inherit;
  font-weight: 400;
  min-width: 3ch;
  padding: 0 0.5ch;
  text-align: center;
}

.action span {
  background: var(--theme-button-background);
  overflow-wrap: anywhere;
  padding: 0 1ch;
}

.action:hover b,
.action:focus b,
.action:hover kbd,
.action:focus kbd,
.action[aria-current="true"] b,
.action[aria-current="true"] kbd {
  background: var(--theme-focused-foreground);
  color: var(--ansi-0-black);
}

.spec {
  border-collapse: collapse;
  width: 100%;
}

.spec th,
.spec td {
  border-bottom: 1px solid var(--theme-border);
  font-weight: 400;
  padding: 0 1ch 0 0;
  text-align: left;
  vertical-align: top;
}

.spec th {
  color: var(--theme-focused-foreground);
  text-transform: uppercase;
}

.section {
  margin-top: calc(var(--line) * 2);
}

.section > h2 {
  margin-bottom: var(--line);
}

.doc {
  max-width: 78ch;
}

.doc > * + * {
  margin-top: var(--line);
}

.doc h1 {
  color: var(--theme-focused-foreground);
  font-size: 2rem;
  line-height: calc(var(--line) * 2);
}

.doc h2 {
  margin-top: calc(var(--line) * 2);
}

.doc h3 {
  margin-top: var(--line);
}

.doc pre {
  background: var(--ansi-0-black);
  border: 1px solid var(--theme-border);
  color: var(--theme-success);
  overflow-x: auto;
  padding: var(--line) 2ch;
}

.doc p,
.doc li {
  color: var(--ansi-254-gray-89);
}

.doc details {
  margin-top: var(--line);
}

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

@media (max-width: 860px) {
  .brand,
  .grid,
  .grid.two {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 540px) {
  body {
    padding: var(--line) 0.75ch calc(var(--line) * 2);
  }

  .window {
    box-shadow: 0.75ch calc(var(--line) * 0.75) 0 0 var(--theme-window-shadow);
    margin-right: 0.75ch;
    padding-left: 1ch;
    padding-right: 1ch;
  }

  .bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-left: -1ch;
    margin-right: -1ch;
  }
}
