/* ==========================================================================
   Nucifera — site styles
   Layout language from mangowm.github.io (Fumadocs), palette from the
   Nucifera GitBook wiki (dark: mint #70E6AC, light: blue #346DDB).
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg: #0b0b0b;
  --bg-elev: #111111;
  --card: #131313;
  --muted: #1a1a1a;
  --muted-2: #222222;
  --border: #262626;
  --border-strong: #383838;
  --fg: #ececec;
  --fg-muted: #a3a3a3;
  --fg-subtle: #6e6e6e;

  --primary: #dce670;
  --primary-strong: #aebc3c;
  --primary-fg: #15170a;
  --primary-rgb: 220 230 112;
  --online: #cfe35c;
  --danger: #f4736b;
  --danger-rgb: 244 115 107;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --nav-h: 64px;
  /* one page margin: used for the left/right gap AND the gap under the navbar,
     so the top and left margins are always identical */
  --page-margin: clamp(20px, 7vw, 104px);
  /* navbar hugs the screen edges, independent of the page margin */
  --nav-padding: clamp(12px, 1.5vw, 24px);
  --gutter: var(--page-margin);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -16px rgb(0 0 0 / 0.7);
  --shadow-lg: 0 30px 80px -30px rgb(0 0 0 / 0.8);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --bg: #ffffff;
    --bg-elev: #fcfcf8;
    --card: #ffffff;
    --muted: #f6f7ef;
    --muted-2: #edf0de;
    --border: #e6e8d9;
    --border-strong: #d2d6c0;
    --fg: #1c1e16;
    --fg-muted: #5e6153;
    --fg-subtle: #8b8e7e;

    /* #dce670 on white is unreadable (1.4:1), so light mode uses a deeper
       shade of the same hue for text and keeps the bright tone for dark mode */
    --primary: #687010;
    --primary-strong: #4f5609;
    --primary-fg: #ffffff;
    --primary-rgb: 104 112 16;
    --online: #7d8f14;
    --danger: #c2410c;
    --danger-rgb: 194 65 12;

    --shadow: 0 1px 2px rgb(28 30 22 / 0.06), 0 12px 32px -16px rgb(28 30 22 / 0.18);
    --shadow-lg: 0 30px 80px -30px rgb(28 30 22 / 0.35);
  }
}

/* ---------- base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { flex: 1; }

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }

::selection { background: rgb(var(--primary-rgb) / 0.3); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

.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;
}

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 8px 14px; border-radius: var(--radius-sm);
  background: var(--primary); color: var(--primary-fg); font-weight: 600;
}
.skip-link:focus { top: 12px; }

.icon { width: 1em; height: 1em; flex-shrink: 0; }

.container {
  width: 100%;
  max-width: calc(1200px + 2 * var(--page-margin));
  margin-inline: 0;
  padding-inline: var(--page-margin);
}

.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
.mono { font-family: var(--font-mono); }
.accent { color: var(--primary); }

/* grid background — mango's .grid-bg */
.grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.grid-bg.radial {
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
}

/* ---------- navbar ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
}

.nav-inner {
  height: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: var(--nav-padding);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.nav-left { justify-self: start; min-width: 0; }
.nav-right { justify-self: end; display: flex; align-items: center; gap: 8px; }

.ip-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: border-color 0.15s, background-color 0.15s;
}
.ip-btn:hover { border-color: rgb(var(--primary-rgb) / 0.45); background: var(--muted-2); }
.ip-btn .copy-icon { color: var(--fg-subtle); transition: color 0.15s; width: 15px; height: 15px; }
.ip-btn:hover .copy-icon,
.ip-btn.copied .copy-icon { color: var(--primary); }

.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg-subtle);
  flex-shrink: 0;
}
[data-state="online"] .status-dot,
.status-dot[data-state="online"] { background: var(--online); }
[data-state="offline"] .status-dot,
.status-dot[data-state="offline"] { background: var(--danger); }
.status-dot[data-state="online"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--muted);
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  white-space: nowrap;
  transition: color 0.15s, background-color 0.15s;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a[aria-current="page"] {
  color: var(--fg);
  background: var(--bg);
  border-color: var(--border);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.store-btn:hover { opacity: 0.9; }
.store-btn .icon { width: 16px; height: 16px; }
.store-btn .ext { width: 14px; height: 14px; opacity: 0.7; }

.menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--muted);
  align-items: center;
  justify-content: center;
}
.menu-btn .icon { width: 18px; height: 18px; }
.menu-btn .icon-close { display: none; }
.menu-btn[aria-expanded="true"] .icon-open { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 12px var(--nav-padding) 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  box-shadow: var(--shadow-lg);
}
.mobile-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  color: var(--fg-muted);
}
.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu a[aria-current="page"] { color: var(--primary); }
.mobile-menu .icon { width: 16px; height: 16px; opacity: 0.6; }

@media (max-width: 920px) {
  .nav-inner { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 440px) {
  .store-btn { width: 38px; padding: 0; justify-content: center; }
  .store-btn .label,
  .store-btn .ext { display: none; }
  .ip-btn { padding: 0 10px 0 12px; gap: 8px; font-size: 12.5px; }
}

/* ---------- buttons, badges ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.15s, background-color 0.15s, border-color 0.15s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
}
.btn-primary:hover { opacity: 0.9; }
.btn-outline {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.btn-outline:hover { background: var(--muted); border-color: var(--border-strong); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgb(var(--primary-rgb) / 0.3);
  background: rgb(var(--primary-rgb) / 0.1);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge[data-state="offline"],
.badge[data-state="error"] {
  border-color: var(--border-strong);
  background: var(--muted);
  color: var(--fg-muted);
}
.badge[data-state="offline"] .dot { background: var(--danger); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
}
.text-link .icon { width: 15px; height: 15px; transition: transform 0.15s; }
.text-link:hover .icon { transform: translateX(3px); }
.inline-link { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgb(var(--primary-rgb) / 0.4); }
.inline-link:hover { text-decoration-color: var(--primary); }

kbd, code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--muted);
}

/* ---------- landing hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  padding-block: var(--page-margin) clamp(48px, 6vw, 80px);
}
.hero + .section { padding-top: clamp(40px, 5vw, 64px); }
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: calc(1280px + 2 * var(--page-margin));
  margin-inline: 0;
  padding-inline: var(--page-margin);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: 72px;
}

.display {
  margin: 24px 0 24px;
  font-size: clamp(2.6rem, 4.6vw + 0.6rem, 4.6rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.display span { display: block; }

.lead {
  max-width: 34rem;
  font-size: clamp(1.05rem, 0.5vw + 0.95rem, 1.25rem);
  color: var(--fg-muted);
  text-wrap: balance;
}
.hero .btn-row { margin-top: 40px; }

.hero-visual { position: relative; padding-bottom: 56px; }
.shot {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--muted);
  box-shadow: var(--shadow-lg);
}
.shot img { width: 100%; height: auto; }
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.45), transparent 45%);
}

/* server list entry — always dark, like the in-game menu */
.server-card {
  position: absolute;
  left: -28px;
  bottom: 0;
  z-index: 2;
  width: min(440px, calc(100% + 28px));
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgb(255 255 255 / 0.12);
  background: rgb(12 12 12 / 0.82);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: #e8e8e8;
  box-shadow: 0 24px 60px -20px rgb(0 0 0 / 0.8);
}
.server-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.server-icon {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #1d1d1d;
  border: 1px solid rgb(255 255 255 / 0.08);
}
.server-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
}
.motd { font-family: var(--font-mono); font-size: 14px; line-height: 1.45; min-width: 0; }
.motd div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #aaaaaa;
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
}
.ping { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.ping i { display: block; width: 3px; background: #3a3a3a; }
.ping i:nth-child(1) { height: 3px; }
.ping i:nth-child(2) { height: 5px; }
.ping i:nth-child(3) { height: 7px; }
.ping i:nth-child(4) { height: 9px; }
.ping i:nth-child(5) { height: 12px; }
[data-state="online"] .ping i { background: var(--online); }
[data-state="offline"] .ping i { background: #6b2222; }

.server-card[data-state="offline"] .motd,
.server-card[data-state="error"] .motd { opacity: 0.45; }

.server-players {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgb(255 255 255 / 0.08);
}
.players-count { display: flex; align-items: baseline; gap: 8px; }
.players-count strong {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.players-count span { font-size: 13px; color: #9a9a9a; }
.player-list { display: flex; align-items: center; justify-content: flex-end; min-width: 0; }
.player-list img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid #111;
  margin-left: -6px;
  background: #222;
}
.player-list .more,
.player-list .empty { font-size: 12.5px; color: #9a9a9a; }
.player-list .more { margin-left: 8px; }
.player-list .empty { text-align: right; }

/* ---------- sections ---------- */

.section { position: relative; padding-block: clamp(72px, 9vw, 112px); }
.section.tight { padding-block: clamp(48px, 6vw, 72px); }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head.left { margin-inline: 0; text-align: left; }
.section-head h2 {
  margin-top: 12px;
  font-size: clamp(1.85rem, 2vw + 1.1rem, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.section-head p { margin-top: 14px; color: var(--fg-muted); text-wrap: balance; }

.card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
}

/* how to join */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step-card { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.step-card .num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}
.step-card h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.step-card p { color: var(--fg-muted); font-size: 15px; }
.step-card .foot { margin-top: auto; padding-top: 8px; }
.step-card .optional {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--muted);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-muted);
  vertical-align: 2px;
}

.ip-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  height: 46px;
  padding: 0 8px 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--muted);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  transition: border-color 0.15s;
}
.ip-field:hover { border-color: rgb(var(--primary-rgb) / 0.45); }
.ip-field .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgb(var(--primary-rgb) / 0.12);
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ip-field .chip .icon { width: 14px; height: 14px; }

/* explore bento */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.feature {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
a.feature:hover { border-color: rgb(var(--primary-rgb) / 0.4); }
.feature-media { position: relative; aspect-ratio: 16 / 7; overflow: hidden; background: var(--muted); }
.feature-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
a.feature:hover .feature-media img { transform: scale(1.04); }
.feature-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--card), transparent 60%);
}
.feature-body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.feature-body h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.feature-body p { color: var(--fg-muted); font-size: 15px; }
.feature-body .text-link { margin-top: auto; padding-top: 8px; }

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgb(var(--primary-rgb) / 0.22);
  background: rgb(var(--primary-rgb) / 0.1);
  color: var(--primary);
  flex-shrink: 0;
}
.icon-tile .icon { width: 20px; height: 20px; }
.icon-tile.danger { border-color: rgb(var(--danger-rgb) / 0.25); background: rgb(var(--danger-rgb) / 0.1); color: var(--danger); }

.check-list { display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; }
.check-list .icon { width: 18px; height: 18px; margin-top: 3px; }
.check-list.bad .icon { color: var(--danger); }
.check-list.good .icon { color: var(--primary); }

/* callouts */
.callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid rgb(var(--primary-rgb) / 0.25);
  background: rgb(var(--primary-rgb) / 0.06);
  font-size: 15px;
}
.callout > .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--primary); }
.callout strong { display: block; font-weight: 600; margin-bottom: 2px; }
.callout p { color: var(--fg-muted); }
.callout.danger { border-color: rgb(var(--danger-rgb) / 0.3); background: rgb(var(--danger-rgb) / 0.07); }
.callout.danger > .icon { color: var(--danger); }

/* ---------- page header (sub pages) ---------- */

.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--page-margin) clamp(48px, 6vw, 72px);
  border-bottom: 1px solid var(--border);
}
.page-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 48px;
}
.page-hero .display { font-size: clamp(2.4rem, 4vw + 0.8rem, 4rem); margin-block: 20px; }
.page-hero .lead { max-width: 40rem; }
.page-hero .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-muted);
  transition: color 0.15s, border-color 0.15s;
}
.chip-link:hover { color: var(--fg); border-color: var(--border-strong); }
.chip-link .icon { width: 15px; height: 15px; color: var(--primary); }

.opal-hero {
  position: relative;
  width: clamp(160px, 22vw, 260px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.opal-hero img { position: relative; width: 78%; animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* ---------- economy ---------- */

.split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; }
.frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--muted);
}
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; }
.frame.contain img { object-fit: contain; padding: 4%; }
.frame.natural img { height: auto; }
.frame.natural.contain img { padding: 0; }
.frame figcaption,
.caption {
  font-size: 13px;
  color: var(--fg-subtle);
}
.frame figcaption {
  position: absolute;
  left: 12px;
  bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.6);
  color: #e6e6e6;
  font-size: 12px;
  font-weight: 500;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.depth-card { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.depth-card h3 { font-size: 17px; font-weight: 600; }
.depth {
  position: relative;
  flex: 1;
  min-height: 250px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
}
.depth-track {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    repeating-linear-gradient(to bottom, transparent 0 11px, rgb(0 0 0 / 0.12) 11px 12px),
    linear-gradient(to bottom, #7d7d7d 0%, #636363 12%, #4a4a4f 14%, #3b3b40 96%, #1c1c1c 96%);
}
.depth-band {
  position: absolute;
  left: 0;
  right: 0;
  /* Y -32 … -63 on a 0 … -64 scale */
  top: 50%;
  bottom: 1.5625%;
  background: rgb(var(--primary-rgb) / 0.45);
  box-shadow: inset 0 0 0 2px rgb(var(--primary-rgb) / 0.9);
}
.depth-best {
  position: absolute;
  left: -4px;
  right: -4px;
  top: 75%;
  height: 3px;
  margin-top: -1.5px;
  background: #fff;
}
.depth-labels { position: relative; font-size: 13px; }
.depth-labels > span {
  position: absolute;
  left: 0;
  transform: translateY(-50%);
  white-space: nowrap;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}
.depth-labels .mono { font-weight: 600; color: var(--fg); margin-right: 6px; }
.depth-labels .best { color: var(--primary); font-weight: 600; }
.depth-labels .best .mono { color: var(--primary); }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.fact { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.fact .big {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.fact h3 { font-size: 16px; font-weight: 600; }
.fact p { color: var(--fg-muted); font-size: 14.5px; }

.uses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.use { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.use h3 { font-size: 17px; font-weight: 600; margin-top: 4px; }
.use p { color: var(--fg-muted); font-size: 15px; }

.tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; align-items: stretch; }
.tools-copy { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.tools-copy h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.tools-copy p { color: var(--fg-muted); }
.tools-media { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.progress-demo {
  margin-top: auto;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--muted);
}
.progress-demo .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
}
.progress-demo .row img { width: 22px; height: 22px; }
.progress-demo .row span { display: inline-flex; align-items: center; gap: 8px; }
.progress-track {
  position: relative;
  height: 10px;
  margin-top: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--muted-2);
  border: 1px solid var(--border);
}
.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 64%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-strong), var(--primary));
  animation: fill 4.5s cubic-bezier(0.5, 0, 0.3, 1) infinite;
}
@keyframes fill {
  0% { width: 0; }
  80% { width: 100%; opacity: 1; }
  92% { width: 100%; opacity: 0; }
  100% { width: 0; opacity: 0; }
}

/* ---------- tabs (segmented, like mango's layout toggle) ---------- */

.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--muted);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  white-space: nowrap;
  transition: color 0.15s, background-color 0.15s;
}
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] {
  color: var(--fg);
  background: var(--bg);
  border-color: var(--border);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
}
.tab-panel { animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; } }

/* ---------- docs layout (custom content) ---------- */

.docs {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 64px;
  padding-block: 56px 96px;
}
.toc {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
  align-self: start;
}
.toc-title {
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.toc ol { border-left: 1px solid var(--border); }
.toc a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 16px;
  border-left: 1px solid transparent;
  font-size: 14px;
  color: var(--fg-muted);
  transition: color 0.15s, border-color 0.15s;
}
.toc a:hover { color: var(--fg); }
.toc a.active { color: var(--primary); border-left-color: var(--primary); }
.toc ol ol { border-left: 0; }
.toc ol ol a { padding-left: 30px; font-size: 13px; }

.doc-section { padding-bottom: 72px; margin-bottom: 72px; border-bottom: 1px solid var(--border); }
.doc-section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.doc-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 32px; }
.doc-head h2 { font-size: clamp(1.6rem, 1.2vw + 1.1rem, 2rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
.doc-head p { margin-top: 6px; color: var(--fg-muted); }
.doc-head .icon-tile { margin-top: 2px; }

.stack { display: flex; flex-direction: column; gap: 16px; }

.item { overflow: hidden; }
.item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 22px 24px 18px;
}
.item-head h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.item-head p { margin-top: 4px; color: var(--fg-muted); font-size: 15px; max-width: 34rem; }
.item-media { padding: 0 12px 12px; }
.item-media .frame { aspect-ratio: 16 / 9; }
.item-note { padding: 0 24px 22px; color: var(--fg-muted); font-size: 15px; }
.tab-panel .item-note { padding: 16px 12px 4px; }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.media-card { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.media-card .caption { padding: 0 6px 4px; }

.portal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.prose-card { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.prose-card h3 { font-size: 17px; font-weight: 600; }
.prose-card p { color: var(--fg-muted); font-size: 15px; }

@media (max-width: 960px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
  .toc {
    top: var(--nav-h);
    z-index: 20;
    margin-inline: calc(var(--gutter) * -1);
    margin-bottom: 40px;
    padding: 10px var(--gutter);
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .toc::-webkit-scrollbar { display: none; }
  .toc-title { display: none; }
  .toc ol { display: flex; gap: 6px; border-left: 0; }
  .toc ol ol { display: none; }
  .toc a {
    margin: 0;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--muted);
    font-size: 13px;
    white-space: nowrap;
  }
  .toc a.active { border-color: rgb(var(--primary-rgb) / 0.4); background: rgb(var(--primary-rgb) / 0.1); }
  html:has(.docs) { scroll-padding-top: calc(var(--nav-h) + 72px); }
}

/* ---------- rules ---------- */

/* full container width so the left edge lines up with the page title,
   with the reading column capped on the children */
.rules-wrap > .rule-group,
.rules-wrap > .callout { max-width: 860px; }
.rule-group + .rule-group { margin-top: 64px; }
.rule-group-head { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.rule-group-head h2 { font-size: clamp(1.5rem, 1vw + 1.1rem, 1.85rem); font-weight: 700; letter-spacing: -0.02em; }

.stepper { counter-reset: step; }
.step {
  position: relative;
  padding-left: 60px;
  padding-bottom: 36px;
  counter-increment: step;
}
.step:last-child { padding-bottom: 0; }
.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgb(var(--primary-rgb) / 0.3);
  background: rgb(var(--primary-rgb) / 0.1);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
}
.step::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 46px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}
.step:last-child::after { display: none; }
.step h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; padding-top: 5px; }
.step > p { margin-top: 6px; color: var(--fg-muted); }
.mods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.mods .card { padding: 20px; }
.mods h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mods h4 .icon { width: 16px; height: 16px; }
.mods .bad h4 { color: var(--danger); }
.mods .good h4 { color: var(--primary); }
.mods .check-list li { font-size: 14.5px; color: var(--fg-muted); }
.mods .check-list .icon { width: 16px; height: 16px; margin-top: 4px; }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--border); padding-block: clamp(48px, 5vw, 64px) 40px; font-size: 14px; }

/* community call to action, in footer format */
.footer-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  padding-bottom: 36px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border);
}
.footer-cta h2 {
  font-size: clamp(1.4rem, 1.2vw + 1rem, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.footer-cta p { margin-top: 8px; max-width: 46ch; font-size: 15px; color: var(--fg-muted); }
.footer > .container { max-width: none; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.brand img { width: 26px; height: 26px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--fg-muted); }
.footer-links a:hover { color: var(--fg); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--fg-subtle);
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.toast.show { transform: none; opacity: 1; }
.toast .icon { width: 16px; height: 16px; }

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .hero { padding-block: var(--page-margin) 80px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 56px; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero .btn-row { justify-content: center; }
  .hero-visual { max-width: 680px; width: 100%; margin-inline: auto; padding-bottom: 0; }
  .server-card { position: relative; left: auto; bottom: auto; width: auto; margin: -56px 16px 0; text-align: left; }
  .steps, .uses, .facts { grid-template-columns: minmax(0, 1fr); }
  .tools, .portal-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .bento, .split, .two-col, .mods { grid-template-columns: minmax(0, 1fr); }
  .page-hero-inner { grid-template-columns: minmax(0, 1fr); }
  .opal-hero { display: none; }
  .depth { min-height: 220px; }
  .item-head { padding: 18px 18px 14px; }
  .item-media { padding: 0 8px 8px; }
  .step { padding-left: 52px; }
  .btn { height: 46px; padding: 0 22px; }
  .hero .btn-row .btn { flex: 1 1 200px; }
}

@media (max-width: 480px) {
  .footer-cta .btn-row { width: 100%; }
  .footer-cta .btn-row .btn { flex: 1 1 100%; }
  .server-card { margin: -40px 0 0; }
  .server-players { flex-direction: column; align-items: flex-start; gap: 10px; }
  .player-list { justify-content: flex-start; }
  .player-list .empty { text-align: left; }
  .server-row { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; }
  .server-icon { width: 44px; height: 44px; }
  .motd, .server-head { font-size: 13px; }
  .players-count strong { font-size: 24px; }
  .doc-head { flex-direction: column; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .progress-fill { width: 64%; }
}
