@font-face {
  font-family: CoffeeDisplay;
  src: url("./assets/display.woff2") format("woff2");
  font-display: swap;
}

/* Base colors mirror the launcher theme in src/styles.css. */
:root {
  font-family: "Bahnschrift", "Trebuchet MS", "Segoe UI", sans-serif;
  color-scheme: dark;
  --bg: #0f0b08;
  --panel: rgba(32, 22, 16, 0.92);
  --surface: rgba(32, 22, 16, 0.98);
  --text: #f4e9dd;
  --muted: #c8b7a6;
  --line: rgba(244, 233, 221, 0.16);
  --accent: #c07a3c;
  --accent-strong: #e7b88a;
  --warning: #f3b255;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.56);
  --soft: rgba(255, 241, 227, 0.08);
  --callout: rgba(192, 122, 60, 0.14);
  --warning-soft: rgba(243, 178, 85, 0.12);
  --step: #4b301e;
  --banner: #301b0f;
  --banner-text: #f4e9dd;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a {
  color: var(--accent-strong);
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 24px 15px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px 24px;
  text-decoration: none;
  color: var(--text);
  font-family: CoffeeDisplay, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 19px;
  line-height: 1.15;
}
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  object-fit: cover;
}
.brand small {
  display: block;
  color: var(--muted);
  font:
    600 11px "Segoe UI",
    sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 3px;
}
.nav-link {
  display: block;
  padding: 9px 12px;
  color: var(--text);
  text-decoration: none;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  margin: 1px 0;
}
.nav-link:hover {
  background: var(--soft);
}
.nav-link.active {
  background: var(--soft);
  color: var(--accent-strong);
  box-shadow: inset 3px 0 var(--accent);
}
.nav-group {
  border-top: 1px solid var(--line);
  padding: 4px 0;
}
.nav-group-title {
  min-width: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}
.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 7px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.nav-group-toggle:hover,
.nav-group-toggle:focus-visible {
  background: var(--soft);
}
.nav-group-toggle[aria-expanded="true"] {
  background: var(--soft);
  color: var(--accent-strong);
}
.nav-group-toggle:focus-visible,
.nav-group-links .nav-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
}
.nav-chevron {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}
.nav-group-toggle[aria-expanded="true"] .nav-chevron {
  transform: rotate(225deg);
}
.nav-group-links {
  margin: 3px 0 5px 18px;
  padding-left: 7px;
  border-left: 1px solid var(--line);
}
.nav-group-links .nav-link {
  margin: 1px 0;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.4;
}
.main {
  min-width: 0;
}
.topbar {
  height: 76px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 clamp(20px, 4vw, 62px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}
.search-wrap {
  width: min(430px, 100%);
  position: relative;
  margin-left: auto;
}
.search-wrap::before {
  content: "⌕";
  position: absolute;
  left: 14px;
  top: 6px;
  color: var(--muted);
  font-size: 23px;
  line-height: 1;
}
.search {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px 0 42px;
  font-size: 14px;
}
.search::placeholder {
  color: var(--muted);
}
.search-results {
  position: absolute;
  top: 46px;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 7px;
  padding: 6px;
  max-height: 370px;
  overflow: auto;
}
.result-link {
  display: block;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 5px;
}
.result-link:hover,
.result-link:focus {
  background: var(--soft);
}
.result-link strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}
.result-link span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.no-results {
  position: absolute;
  top: 46px;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 16px;
  color: var(--muted);
  font-size: 14px;
}
#menu-button {
  display: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 7px 10px;
  color: var(--text);
}
.content {
  max-width: 1030px;
  margin: auto;
  padding: 52px clamp(24px, 5vw, 70px) 96px;
}
.article[data-page] {
  overflow-wrap: anywhere;
  scroll-margin-top: 100px;
}
.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: var(--accent-strong);
  margin: 0 0 11px;
}
.article h1 {
  font-family: CoffeeDisplay, "Segoe UI", sans-serif;
  font-size: clamp(34px, 4vw, 49px);
  line-height: 1.12;
  letter-spacing: 0;
  margin: 0 0 14px;
  font-weight: 800;
}
.intro {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 710px;
  margin: 0 0 33px;
}
.article h2 {
  font-family: CoffeeDisplay, "Segoe UI", sans-serif;
  font-size: 23px;
  line-height: 1.3;
  margin: 40px 0 14px;
}
.article h3 {
  font-size: 16px;
  margin: 23px 0 7px;
}
.article p {
  max-width: 750px;
}
.article ol,
.article ul {
  max-width: 760px;
  padding-left: 23px;
}
.article li {
  padding-left: 4px;
  margin: 9px 0;
}
.article li::marker {
  color: var(--accent-strong);
  font-weight: 800;
}
.article strong {
  color: var(--text);
}
.article code {
  background: var(--soft);
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 0.92em;
}
.article pre {
  max-width: 750px;
  margin: 20px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.article pre code {
  padding: 0;
  background: transparent;
}
.article a {
  font-weight: 650;
  text-underline-offset: 3px;
}
.rule {
  height: 1px;
  background: var(--line);
  margin: 32px 0;
}
.callout {
  border-left: 3px solid var(--accent);
  background: var(--callout);
  padding: 15px 18px;
  margin: 25px 0;
  max-width: 750px;
  border-radius: 0 6px 6px 0;
}
.callout.warning {
  border-color: var(--warning);
  background: var(--warning-soft);
}
.callout p {
  margin: 0;
}
.steps {
  counter-reset: step;
  list-style: none !important;
  padding: 0 !important;
  max-width: 750px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 13px 15px 13px 50px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.steps li:first-child {
  border-top: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 14px;
  left: 8px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--step);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 30px 0;
}
.guide-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 20px;
  text-decoration: none;
  min-height: 126px;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.guide-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.guide-card .num {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent-strong);
  font-weight: 800;
  margin-bottom: 12px;
}
.guide-card strong {
  display: block;
  font-size: 17px;
  color: var(--text);
}
.guide-card span:last-child {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}
.home-banner {
  background: var(--banner);
  color: var(--banner-text);
  border-radius: 7px;
  padding: 35px 38px;
  display: grid;
  grid-template-columns: 1fr 142px;
  gap: 20px;
  align-items: center;
}
.home-banner h1,
.home-banner .intro,
.home-banner .eyebrow {
  color: var(--banner-text);
}
.home-banner .intro {
  margin: 0;
}
.home-banner img {
  width: 142px;
  height: 142px;
  object-fit: cover;
  border-radius: 8px;
  background: #fff;
}
.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.mini-links a {
  display: inline-flex;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  text-decoration: none;
  font-size: 13px;
}
.mini-links a:hover {
  background: var(--soft);
}
.article-footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding-top: 19px;
  font-size: 13px;
  color: var(--muted);
}

.content.has-community {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 44px;
  max-width: 1400px;
  padding: 46px 44px 70px;
  align-items: start;
}
.has-community .home-banner {
  padding: 27px 28px;
  grid-template-columns: 1fr 84px;
}
.has-community .home-banner img {
  width: 84px;
  height: 84px;
}
.has-community .home-banner h1 {
  font-size: 42px;
}
.has-community .home-banner .intro {
  font-size: 16px;
}
.community {
  position: sticky;
  top: 100px;
  max-height: calc(100dvh - 124px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
  min-width: 0;
  border-left: 1px solid var(--line);
  padding-left: 27px;
  padding-right: 18px;
  margin-left: -28px;
  margin-right: -18px;
}
.community h2 {
  font:
    800 25px/1.3 CoffeeDisplay,
    "Segoe UI",
    sans-serif;
  margin: 0 0 12px;
}
.community .eyebrow {
  letter-spacing: 0;
}
.community-intro {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 24px;
}
.community-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
  min-height: 38px;
}
.community-install {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  min-height: 38px;
  margin-bottom: 22px;
  padding: 8px 13px;
  border: 1px solid #8a6242;
  border-radius: 6px;
  background: #302116;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.community-install svg {
  flex: 0 0 17px;
}
.community-install:hover {
  background: #402b1c;
  border-color: var(--accent-strong);
}
#community-current {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-strong);
}
#community-switch {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  color: var(--text);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0;
}
#community-switch:hover {
  border-color: var(--accent);
  background: var(--callout);
}
#community-switch[aria-disabled="true"] {
  cursor: wait;
}
#community-switch svg {
  transform: rotate(90deg);
}
.community-stack {
  position: relative;
  height: 494px;
  isolation: isolate;
  margin: 0 10px 0 0;
  overflow: clip;
  overflow-clip-margin: 24px;
}
.discord-card {
  position: absolute;
  inset: 0 0 auto;
  height: 432px;
  display: flex;
  flex-direction: column;
  background: #211a15;
  border: 1px solid #705039;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 35px #0005;
  transform-origin: 50% 30%;
  transition:
    transform 300ms cubic-bezier(0.22, 0.8, 0.3, 1),
    background 350ms;
}
.discord-card.is-front {
  z-index: 2;
  transform: translateY(54px);
}
.discord-card.is-back {
  z-index: 1;
  transform: translate(8px, 0) rotate(-3deg);
  background: #30231a;
}
.discord-card.is-leaving {
  transform: translate(62%, 58px) rotate(8deg);
}
.discord-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 14px;
  min-height: 76px;
  background: #302116;
  border-bottom: 1px solid var(--line);
}
.discord-heading img {
  object-fit: cover;
  border-radius: 6px;
}
.discord-heading div {
  min-width: 0;
  flex: 1;
}
.discord-heading h3 {
  font:
    800 16px/1.3 CoffeeDisplay,
    "Segoe UI",
    sans-serif;
  margin: 0;
  overflow-wrap: anywhere;
}
.discord-heading p {
  color: var(--muted);
  margin: 3px 0 0;
  font-size: 11px;
}
.discord-badge {
  color: var(--accent-strong);
  font-size: 10px;
}
.discord-server-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  background: #454b39;
  color: #e0e9cf;
  border-radius: 6px;
  font-size: 22px;
  font-weight: 800;
}
.discord-members {
  padding: 16px;
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.discord-presence {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 15px;
}
.discord-presence.is-online::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ac28e;
  margin-right: 7px;
}
.discord-members ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.discord-members li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 9px;
  font-size: 13px;
}
.discord-members li img {
  flex: 0 0 28px;
  border-radius: 50%;
  background: var(--soft);
}
.discord-members li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.discord-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px;
  border-top: 1px solid var(--line);
  background: #2b2018;
}
.discord-footer > span {
  font-size: 11px;
  color: var(--muted);
}
.discord-footer a {
  padding: 8px 10px;
  border-radius: 5px;
  background: #c8976d;
  color: #1b120c;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.discord-footer a:hover {
  background: #e7b88a;
}
.community-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 1250px) {
  .content.has-community {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    padding: 32px 24px 70px;
  }
  .community {
    padding-left: 18px;
    margin-left: -19px;
  }
  .discord-badge {
    display: none;
  }
}
@media (max-width: 700px) {
  .content.has-community {
    display: block;
    max-width: 1030px;
  }
  .community {
    position: static;
    max-height: none;
    overflow: visible;
    width: min(100%, 370px);
    margin: 40px 0 0;
    padding: 28px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 1100px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    z-index: 10;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 88vw);
    height: auto;
    box-shadow: var(--shadow);
    transform: translateX(-110%);
    transition: transform 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .nav-group-toggle {
    min-height: 42px;
  }
  .nav-group-links .nav-link {
    display: flex;
    align-items: center;
    min-height: 40px;
  }
  #menu-button {
    display: block;
  }
  .topbar {
    height: 64px;
    padding: 0 18px;
  }
  .topbar-label {
    display: none;
  }
  .content {
    padding: 30px 20px 70px;
  }
  .content.has-community {
    padding: 30px 20px 70px;
  }
  .community {
    top: 88px;
    max-height: calc(100dvh - 108px);
  }
  .article[data-page] {
    scroll-margin-top: 82px;
  }
  .home-banner {
    grid-template-columns: 1fr 82px;
    padding: 26px;
  }
  .home-banner img {
    width: 82px;
    height: 82px;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .guide-card {
    min-height: 0;
  }
  .article h1 {
    font-size: 35px;
  }
}
@media (max-width: 700px) {
  .community {
    max-height: none;
  }
}
@media (max-width: 480px) {
  .sidebar {
    width: min(300px, 92vw);
    padding: 18px 12px;
  }
  .home-banner {
    display: block;
  }
  .home-banner img {
    display: none;
  }
  .search-wrap {
    width: auto;
    flex: 1;
  }
  .topbar {
    gap: 10px;
  }
  .intro {
    font-size: 16px;
  }
  .article h1 {
    font-size: 32px;
  }
  .content {
    padding: 28px 18px 65px;
  }
  .content.has-community {
    padding: 28px 18px 65px;
  }
  .has-community .home-banner {
    display: block;
    padding: 26px;
  }
  .has-community .home-banner img {
    display: none;
  }
  .has-community .home-banner h1 {
    font-size: 32px;
  }
  .discord-badge {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .nav-chevron,
  .discord-card {
    transition: none;
  }
}
@media (max-width: 340px) {
  .topbar {
    padding: 0 10px;
    gap: 6px;
  }
  .search-wrap {
    min-width: 96px;
  }
}
@media print {
  :root {
    color-scheme: light;
    --bg: #fff;
    --surface: #fff;
    --text: #2a2018;
    --muted: #6a594a;
    --line: rgba(76, 55, 36, 0.16);
    --accent: #8b5a2b;
    --accent-strong: #6a3f1e;
    --callout: #fff;
    --warning-soft: #fff;
    --banner: #fff;
    --banner-text: #2a2018;
  }
  .sidebar,
  .topbar,
  .community {
    display: none;
  }
  .shell {
    display: block;
  }
  .content {
    padding: 0;
    max-width: none;
  }
  .article[hidden] {
    display: none !important;
  }
  body {
    background: #fff;
  }
}
