@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito/Nunito-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito/Nunito-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito/Nunito-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Minecraft";
  src: url("../fonts/minecraft.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1a1d21;
  --ink-soft: #4a5057;
  --muted: #767d85;
  --hairline: #e4e7ea;
  --paper: #ffffff;
  --accent: #1a1d21;
  --accent-contrast: #ffffff;
  --mark: #2e9dff;
  --max-width: 720px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background-color: rgba(255, 255, 85, 0.35);
}

::-moz-selection {
  background-color: rgba(255, 255, 85, 0.35);
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.masthead {
  border-bottom: 1px solid var(--hairline);
}

.masthead__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 36px;
  text-align: center;
}

.doc-title {
  margin: 0 0 16px;
  font-family: "Minecraft", sans-serif;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: 0.05em;
  color: var(--ink);
}

.doc-intro {
  margin: 0 auto;
  max-width: 70ch;
  color: var(--ink-soft);
}

.doc {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 36px 24px 80px;
  text-align: center;
}

.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 48px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
}

.tab-btn {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}

.tab-btn:hover {
  color: var(--ink-soft);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.panel > * {
  max-width: 100ch;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.category {
  margin: 0 0 44px;
}

.category h2 {
  margin: 0 0 14px;
  font-size: 1.20rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-align: center;
  border: 1px solid var(--mark);
  border-radius: 6px;
  padding: 10px 16px;
}

.category__desc {
  margin: 0 0 18px;
  color: var(--ink-soft);
}

.rule-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rule-list li {
  margin: 0 0 12px;
}

.rule-list .rule-title {
  font-weight: 700;
  color: var(--ink);
}

.rule-list .rule-desc {
  color: var(--ink-soft);
}

.rule-list a {
  color: var(--mark);
  text-decoration: none;
  border-bottom: 1px solid rgba(46, 157, 255, 0.35);
  transition: border-color 120ms ease;
}

.rule-list a:hover {
  border-bottom-color: var(--mark);
}

.footnote {
  margin-top: 48px;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.footnote strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-weight: 700;
}

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

@media (max-width: 520px) {
  .masthead__inner {
    padding: 32px 18px 28px;
  }

  .doc {
    padding: 28px 18px 64px;
  }

  .doc-title {
    font-size: 1.6rem;
  }
}
