/* HK Grotesk by Hanken Design Co., SIL Open Font License 1.1 */
@font-face {
  font-family: "HK Grotesk";
  src: url("/css/fonts/hk-grotesk/font/hkgrotesk-light-webfont.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HK Grotesk";
  src: url("/css/fonts/hk-grotesk/font/hkgrotesk-regular-webfont.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HK Grotesk";
  src: url("/css/fonts/hk-grotesk/font/hkgrotesk-medium-webfont.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HK Grotesk";
  src: url("/css/fonts/hk-grotesk/font/hkgrotesk-semibold-webfont.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HK Grotesk";
  src: url("/css/fonts/hk-grotesk/font/hkgrotesk-bold-webfont.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Tokens */
:root {
  color-scheme: dark;

  --font: "HK Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #0d0e11;
  --bg-alt: #121419;
  --panel: #15171c;
  --surface: rgb(255 255 255 / 3%);
  --surface-2: rgb(255 255 255 / 6%);
  --ink: #ffffff;
  --ink-2: #e2e5ea;
  --muted: #a9afba;
  --line: rgb(255 255 255 / 14%);
  --line-soft: rgb(255 255 255 / 8%);
  --line-strong: rgb(255 255 255 / 30%);
  --hover: rgb(255 255 255 / 8%);

  --code-bg: rgb(255 255 255 / 9%);
  --code-ink: #f3f4f6;
  --focus: #ffffff;

  --radius: 4px;
  --header-h: 4.25rem;
}

:lang(ja) {
  --font: "HK Grotesk", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif;
}
:lang(ko) {
  --font: "HK Grotesk", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", system-ui, sans-serif;
}
:lang(zh) {
  --font: "HK Grotesk", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif;
}
:lang(ru) {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

::selection {
  color: #000000;
  background: #fff9cd;
}

main {
  flex: 1 0 auto;
}

main:focus {
  outline: none;
}

img,
svg,
video,
picture {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  color: var(--ink);
  line-height: 1.15;
  text-wrap: balance;
}

h1,
h2 {
  font-weight: 300;
  letter-spacing: -0.01em;
}

h3 {
  font-weight: 600;
  letter-spacing: -0.005em;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

:lang(ja) :is(h1, h2, h3, .pill, .typed, .lead, .hero-note, .section-head p, .step p) {
  word-break: auto-phrase;
}

:lang(ko) {
  word-break: keep-all;
}

:lang(ja) :is(h1, h2, h3),
:lang(ko) :is(h1, h2, h3),
:lang(zh) :is(h1, h2, h3) {
  letter-spacing: 0;
  line-height: 1.3;
}

:lang(ja) :is(h1, h2, h3) {
  text-spacing-trim: trim-start;
}

a {
  color: var(--ink);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 0.12em 0.4em;
  border-radius: 3px;
  background: var(--code-bg);
  color: var(--code-ink);
  white-space: nowrap;
}

strong {
  font-weight: 700;
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

:where(a, button, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

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

.container {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-solid {
  fill: currentColor;
  stroke: none;
}

/* While a translation loads, the page stays hidden. The animation shows it
   after 3 seconds if the script never finishes. */
html[data-i18n-pending] body {
  visibility: hidden;
  animation: i18n-reveal 0s linear 3s forwards;
}

@keyframes i18n-reveal {
  to {
    visibility: visible;
  }
}

/* Skip link */
.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: #ffffff;
  color: #0d0e11;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus-visible,
.skip-link:focus {
  transform: none;
}

/* Buttons */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.75rem 1.6rem;
  border: 2px solid #ffffff;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.1s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #ffffff;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}

.btn:hover,
.btn:focus-visible {
  color: #111111;
}

.btn:hover::after,
.btn:focus-visible::after {
  transform: scaleX(1);
}

.btn .icon {
  width: 1.15em;
  height: 1.15em;
}

.btn-sm {
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  border-width: 1.5px;
  font-size: 0.9375rem;
}

.btn-lg {
  min-height: 3.25rem;
  padding: 0.85rem 1.85rem;
  font-size: 1.0625rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--hover);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(13 14 17 / 82%);
  border-bottom: 1px solid var(--line-soft);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header {
    background: rgb(13 14 17 / 45%);
    -webkit-backdrop-filter: saturate(1.2) blur(14px);
    backdrop-filter: saturate(1.2) blur(14px);
  }
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 500;
  font-size: 1.125rem;
  text-decoration: none;
  white-space: nowrap;
}

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

.brand-sm {
  font-size: 1rem;
}

.brand-sm img {
  width: 1.5rem;
  height: 1.5rem;
}

.menu-toggle {
  display: none;
}

.menu-toggle .icon-close,
.menu-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  display: block;
  padding: 0.5rem 0.8rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.menu-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-actions .btn {
  white-space: nowrap;
}

.lang-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
}

html:not(.js) .lang-picker {
  display: none;
}

.lang-picker .icon {
  position: absolute;
  left: 0.75rem;
  width: 1.05rem;
  height: 1.05rem;
  color: var(--muted);
  pointer-events: none;
}

.lang-picker::after {
  content: "";
  position: absolute;
  right: 0.95rem;
  top: 50%;
  width: 0.42rem;
  height: 0.42rem;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.lang-picker select {
  -webkit-appearance: none;
  appearance: none;
  min-height: 2.5rem;
  padding: 0.4rem 2.2rem 0.4rem 2.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}

.lang-picker select:hover {
  border-color: #ffffff;
}

.lang-picker option {
  background: var(--panel);
  color: var(--ink);
}

@media (max-width: 1159px) {
  .js .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .js .site-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin: 0;
    padding: 0.75rem 1rem 1.25rem;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px -12px rgb(0 0 0 / 70%);
  }

  .js .site-menu.is-open {
    display: flex;
  }

  .js .main-nav ul {
    flex-direction: column;
  }

  .js .main-nav a {
    padding: 0.8rem 0.75rem;
    color: var(--ink);
    font-size: 1.0625rem;
  }

  .js .main-nav a:hover {
    background: var(--hover);
  }

  .js .menu-actions {
    flex-wrap: wrap;
  }

  .js .menu-actions > * {
    flex: 1 1 12rem;
  }

  .js .lang-picker select {
    width: 100%;
    min-height: 2.75rem;
  }

  .js .menu-actions .btn {
    min-height: 2.75rem;
  }

  html:not(.js) .header-bar {
    flex-wrap: wrap;
    padding-block: 0.75rem;
  }

  html:not(.js) .site-menu {
    flex-wrap: wrap;
    width: 100%;
    margin: 0;
  }
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  margin-top: calc(-1 * var(--header-h) - 1px);
  padding: calc(var(--header-h) + 2.5rem) 0 6rem;
  overflow: hidden;
  text-align: center;
  background: radial-gradient(circle at 50% 45%, #2a2d34 0%, #131419 58%, #0a0a0d 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero.is-loaded .hero-bg video {
  opacity: 1;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 55% at 50% 50%, rgb(8 9 11 / 35%), transparent 75%),
    linear-gradient(180deg, rgb(8 9 11 / 55%) 0%, rgb(8 9 11 / 45%) 55%, rgb(13 14 17 / 85%) 90%, var(--bg) 100%);
}

.hero-inner {
  width: min(100% - 2rem, 52rem);
  margin-inline: auto;
  text-shadow: 0 1px 14px rgb(0 0 0 / 55%);
}

.pill {
  display: inline-block;
  margin: 0 0 1.75rem;
  padding: 0.35rem 1.1rem;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 1.25rem;
  background: rgb(0 0 0 / 30%);
  color: #ffffff;
  font-size: 0.9375rem;
  line-height: 1.5;
  text-shadow: none;
}

.emoji-inline {
  display: inline-block;
  width: 1.4em;
  height: 1.4em;
  margin: -0.2em 0.1em;
  vertical-align: -0.1em;
  object-fit: contain;
}

.emoji-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.15em;
  vertical-align: middle;
}

.emoji-row picture {
  display: inline-block;
}

.hero h1 {
  margin: 0 0 0.3em;
  font-size: clamp(2.5rem, 1.35rem + 4.3vw, 4.75rem);
  line-height: 1.08;
}

.typed {
  display: grid;
  justify-items: center;
  max-width: 44rem;
  margin: 0 auto 1.75rem;
  color: #e9ebef;
  font-size: clamp(1.375rem, 1.05rem + 1.4vw, 2.25rem);
  font-weight: 300;
  line-height: 1.25;
}

html:not(.js) .typed {
  display: none;
}

.typed-ghosts,
.typed-live {
  grid-area: 1 / 1;
}

.typed-ghosts {
  display: grid;
  justify-items: center;
  visibility: hidden;
}

.typed-ghosts > span {
  grid-area: 1 / 1;
  padding-right: 0.2em;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 0.08em;
  vertical-align: -0.15em;
  background: currentColor;
  animation: blink 0.7s infinite;
}

.typed.is-static .caret {
  display: none;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.lead {
  max-width: 40rem;
  margin: 0 auto;
  color: #e3e6eb;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.6;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.25rem;
  margin-top: 2.25rem;
  text-shadow: none;
}

@media (max-width: 520px) {
  .cta-row .btn {
    flex: 1 1 100%;
  }
}

.hero-note {
  margin: 1.5rem 0 0;
  color: #cfd3da;
  font-size: 0.9375rem;
}

.video-toggle {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 999px;
  background: rgb(10 12 18 / 55%);
  color: #ffffff;
  cursor: pointer;
}

.video-toggle:hover {
  background: rgb(10 12 18 / 85%);
  border-color: #ffffff;
}

.js .video-toggle {
  display: inline-flex;
}

.video-toggle .icon-pause,
.hero.is-playing .video-toggle .icon-play {
  display: none;
}

.hero.is-playing .video-toggle .icon-pause {
  display: block;
}

/* Sections */
.section {
  padding-block: clamp(4rem, 2.5rem + 5vw, 7rem);
}

.section-tight {
  padding-block: clamp(3rem, 2rem + 3vw, 5rem);
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line-soft);
}

.section-head {
  max-width: 44rem;
  margin: 0 auto clamp(2.25rem, 1.5rem + 2vw, 3.5rem);
  text-align: center;
}

.section-head h2 {
  margin-bottom: 0.4em;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
}

.ball {
  position: relative;
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0 auto 1.25rem;
  border: 1.5px solid rgb(255 255 255 / 75%);
  border-radius: 50%;
  background: linear-gradient(to bottom, rgb(255 255 255 / 16%) 0 calc(50% - 1px), rgb(255 255 255 / 75%) calc(50% - 1px) calc(50% + 0.5px), transparent calc(50% + 0.5px));
}

.ball::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.55rem;
  height: 0.55rem;
  border: 1.5px solid rgb(255 255 255 / 75%);
  border-radius: 50%;
  background: var(--bg);
  transform: translate(-50%, -50%);
}

.section-alt .ball::after {
  background: var(--bg-alt);
}

.card {
  padding: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card h3 {
  font-size: 1.3125rem;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.step {
  position: relative;
  text-align: center;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  content: counter(step) / "";
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
}

.step p {
  margin: 0;
  color: var(--ink-2);
}

.step-art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 8rem;
  margin: -0.5rem -0.5rem 1.5rem;
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 55%, rgb(255 255 255 / 7%), rgb(255 255 255 / 2%) 70%);
}

.step-art img {
  width: auto;
  height: auto;
  max-height: 4.75rem;
  filter: drop-shadow(0 6px 10px rgb(0 0 0 / 45%));
}

.art-ball {
  width: 4.75rem;
  rotate: -14deg;
}

.art-row {
  gap: 0.35rem;
  padding-inline: 0.75rem;
}

.art-row img {
  width: 2.75rem;
}

.art-arrow {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--muted);
}

/* Commands */
.cmd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 560px) {
  .cmd-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .cmd-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.cmd-card {
  padding: 1.25rem 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.18s ease;
}

.cmd-names {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}

.cmd-names code,
.config-row dt code {
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--code-bg);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 500;
}

.cmd-desc {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.975rem;
  line-height: 1.5;
}

.apps-card {
  display: grid;
  gap: 2rem;
  align-items: center;
  margin-top: 1.25rem;
}

@media (min-width: 760px) {
  .apps-card {
    grid-template-columns: 1.15fr 1fr;
  }
}

.apps-copy p {
  margin: 0;
  color: var(--ink-2);
}

.context-menu {
  display: grid;
  grid-template-columns: 9rem 10.5rem;
  justify-content: center;
  align-items: start;
  color: #dbdee1;
  font-size: 0.875rem;
  line-height: 1.3;
}

@media (max-width: 419px) {
  .context-menu {
    zoom: 0.88;
  }
}

@media (max-width: 359px) {
  .context-menu {
    zoom: 0.74;
  }
}

.cm-panel {
  padding: 0.4rem;
  border-radius: 8px;
  background: #1e1f22;
  box-shadow: 0 12px 30px rgb(0 0 0 / 50%), 0 0 0 1px rgb(255 255 255 / 10%) inset;
}

.cm-sub {
  position: relative;
  margin-top: 2.6rem;
  margin-left: -1.25rem;
}

.cm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 4px;
  white-space: nowrap;
}

.cm-item img {
  width: 1rem;
  height: 1rem;
}

.cm-item.is-active {
  background: #5865f2;
  color: #ffffff;
}

.cm-chevron {
  width: 0.4rem;
  height: 0.4rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.cm-skel {
  display: block;
  width: 72%;
  height: 0.5rem;
  margin: 0.7rem 0.55rem;
  border-radius: 4px;
  background: #2f3136;
}

.cm-skel-short {
  width: 48%;
}

/* Admins */
.admin-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .admin-grid {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: start;
  }
}

.setup-steps {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
  padding: 0;
  list-style: none;
  counter-reset: setup;
}

.setup-steps li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 0.9rem;
  align-items: start;
  counter-increment: setup;
}

.setup-steps li::before {
  content: counter(setup);
  content: counter(setup) / "";
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  font-weight: 500;
}

.setup-steps li > span {
  padding-top: 0.3rem;
  color: var(--ink-2);
}

.config-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.config-head h3 {
  margin: 0;
}

.perm {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.875rem;
}

.perm .icon {
  width: 1rem;
  height: 1rem;
  color: var(--muted);
}

.config-list {
  margin: 1.25rem 0 0;
}

.config-row {
  display: grid;
  gap: 0.35rem 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line-soft);
}

.config-row:last-child {
  padding-bottom: 0;
}

@media (min-width: 560px) {
  .config-row {
    grid-template-columns: 12rem 1fr;
    align-items: baseline;
  }
}

.config-row dt {
  margin: 0;
}

.config-row dd {
  margin: 0;
  color: var(--ink-2);
}

/* Rewards */
.reward-groups {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem 2.75rem;
  align-items: flex-start;
}

.reward-group .tiles {
  justify-content: center;
}

.group-label {
  margin: 0 0 0.9rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tile {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.tile img {
  width: 3.25rem;
  height: 3.25rem;
  object-fit: contain;
}

.tile-accent {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

@media (max-width: 480px) {
  .tiles {
    gap: 0.5rem;
  }

  .tile {
    width: 3.25rem;
    height: 3.25rem;
  }

  .tile img {
    width: 2.25rem;
    height: 2.25rem;
  }
}

@media (max-width: 389px) {
  .tile {
    width: 2.875rem;
    height: 2.875rem;
  }

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

.section-note {
  max-width: 48rem;
  margin: 2.25rem auto 0;
  color: var(--muted);
  text-align: center;
}

/* Vote */
.vote-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(2rem, 1.4rem + 2.5vw, 3.25rem) clamp(1.25rem, 1rem + 2vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: radial-gradient(80% 120% at 50% 0%, rgb(255 255 255 / 6%), transparent 70%);
  text-align: center;
}

.vote-copy h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
}

.vote-copy p {
  margin: 0;
  color: var(--muted);
}

.vote-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.vote-links .icon {
  width: 1rem;
  height: 1rem;
}

/* Footer */
.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--line-soft);
  background: var(--bg);
  font-size: 0.9375rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
}

.copyright {
  margin: 0;
  color: var(--muted);
}

/* Policy pages */
.page-main {
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) clamp(4rem, 3rem + 3vw, 6rem);
  background: radial-gradient(60rem 26rem at 50% -8rem, rgb(255 255 255 / 7%), transparent 70%);
}

.prose {
  width: min(100% - 2rem, 46rem);
  margin-inline: auto;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.prose h1 {
  margin-bottom: 0.4em;
  font-size: clamp(2.125rem, 1.5rem + 2.4vw, 3.25rem);
  text-align: center;
}

.prose h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  font-weight: 400;
}

.prose .updated {
  margin-bottom: 2.5rem;
  color: var(--muted);
  text-align: center;
}

.prose ul {
  margin: 0 0 1em;
  padding-left: 1.25rem;
}

.prose li {
  margin-block: 0.55rem;
  padding-left: 0.25rem;
}

.prose li::marker {
  color: var(--muted);
}

.policy-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0 0 2rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 0.9375rem;
}

.policy-note .icon {
  margin-top: 0.15rem;
  color: var(--muted);
}

/* 404 */
.notfound {
  display: grid;
  place-items: center;
}

.notfound-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.notfound-ball {
  width: 7rem;
  height: 7rem;
  margin-bottom: 1.25rem;
  rotate: -14deg;
  filter: drop-shadow(0 14px 20px rgb(0 0 0 / 55%));
  animation: wobble 2.6s ease-in-out infinite;
}

.notfound-code {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.3em;
}

.notfound h1 {
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3.75rem);
}

.notfound .lead {
  margin-bottom: 2.25rem;
  color: var(--muted);
}

@keyframes wobble {
  0%,
  60%,
  100% {
    rotate: -14deg;
  }
  70% {
    rotate: 2deg;
  }
  80% {
    rotate: -24deg;
  }
  90% {
    rotate: -8deg;
  }
}

/* Motion */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn:active {
    transform: scale(0.96);
  }

  .cmd-card:hover {
    border-color: var(--line-strong);
  }

  .tile:hover {
    border-color: var(--line-strong);
    transform: translateY(-4px) rotate(-4deg);
  }
}

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

  .caret,
  .notfound-ball {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
