/* ============================================================================
   MCPing — landing page
   ----------------------------------------------------------------------------
   The colour tokens are copied verbatim from the extension (src/styles/tokens
   .css) so the page and the product can never drift apart, including the three
   dark-mode declarations: OS preference guarded against a forced light, and the
   explicit [data-theme="dark"] that must beat an OS-light too.

   What is NOT copied is the type scale. The extension is a 400px popup and its
   13px base is right there and wrong here, so the page gets its own fluid
   --s-* scale. Anything that replicates a piece of the extension's UI (the
   popup mock, the server cards, the MOTD panel) keeps the extension's own
   --t-* sizes, because those replicas have to look like screenshots.
   ========================================================================= */

/* ── Tokens: light is the base definition ──────────────────────────────────── */

:root {
  color-scheme: light;

  --brand: #14a96b;
  --brand-solid: #0b7f4f;
  --brand-solid-hover: #0a7048;
  --brand-text: #0b7f4f;
  --brand-ink: #ffffff;
  --brand-wash: #e7f7ef;
  --brand-ring: rgba(20, 169, 107, 0.3);

  --bg: #f3f6f9;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef2f7;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --overlay: rgba(14, 20, 27, 0.45);

  --ink: #0e141b;
  --ink-2: #4a5666;
  --ink-3: #66748a;

  --online: #16a34a;
  --online-text: #11803a;
  --online-wash: #e7f7ee;
  --offline: #dc2626;
  --offline-text: #dc2626;
  --offline-wash: #fdeceb;
  --warn: #d97706;
  --warn-text: #92400e;
  --warn-wash: #fef4e6;

  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #4a3aa7;
  --series-8: #e34948;
  --chart-surface: #ffffff;
  --chart-grid: #eaeff5;
  --chart-axis: #c9d3e0;
  --chart-gap: rgba(102, 116, 138, 0.13);
  --chart-crosshair: rgba(14, 20, 27, 0.28);

  /* Deliberately dark in both themes: § colour codes are defined against the
     in-game server list, and §0/§f only stay legible on that dark plane. */
  --motd-bg: #10141a;
  --motd-ink: #d9dee6;

  --r-1: 4px;
  --r-2: 6px;
  --r-3: 10px;
  --r-4: 14px;
  --r-5: 22px;
  --shadow-1: 0 1px 2px rgba(14, 20, 27, 0.06), 0 1px 1px rgba(14, 20, 27, 0.04);
  --shadow-2: 0 4px 14px rgba(14, 20, 27, 0.09), 0 1px 3px rgba(14, 20, 27, 0.06);
  --shadow-3: 0 14px 38px rgba(14, 20, 27, 0.16), 0 2px 6px rgba(14, 20, 27, 0.08);
  --shadow-4: 0 40px 90px -30px rgba(14, 20, 27, 0.34), 0 8px 24px -12px rgba(14, 20, 27, 0.18);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  /* Extension scale — used only by the UI replicas. */
  --t-xs: 11px;
  --t-sm: 12px;
  --t-md: 13px;
  --t-lg: 15px;
  --t-xl: 19px;
  --t-2xl: 26px;

  /* Page scale — fluid, clamped so it never collapses or runs away. */
  --s-xs: 0.75rem;
  --s-sm: 0.8125rem;
  --s-md: 0.9375rem;
  --s-lg: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --s-xl: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  --s-2xl: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --s-3xl: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --s-hero: clamp(2.25rem, 1.4rem + 3.6vw, 4rem);

  --wrap: 1140px;
  --gutter: clamp(18px, 4vw, 32px);
  --section-y: clamp(56px, 8vw, 108px);
  --head-h: 60px;
}

/* ── Dark: OS preference, unless the user forced light ─────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;

    --brand: #3dd68c;
    --brand-solid: #3dd68c;
    --brand-solid-hover: #5be3a2;
    --brand-text: #3dd68c;
    --brand-ink: #06291a;
    --brand-wash: rgba(61, 214, 140, 0.12);
    --brand-ring: rgba(61, 214, 140, 0.34);

    --bg: #0c0f14;
    --surface: #161a21;
    --surface-2: #1c222b;
    --surface-3: #232a35;
    --border: #262e3a;
    --border-strong: #35404f;
    --overlay: rgba(0, 0, 0, 0.62);

    --ink: #e9eef6;
    --ink-2: #9aa7b8;
    --ink-3: #7b8899;

    --online: #22c55e;
    --online-text: #22c55e;
    --online-wash: rgba(34, 197, 94, 0.14);
    --offline: #ef4444;
    --offline-text: #f87171;
    --offline-wash: rgba(239, 68, 68, 0.14);
    --warn: #f59e0b;
    --warn-text: #f59e0b;
    --warn-wash: rgba(245, 158, 11, 0.14);

    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #008300;
    --series-7: #9085e9;
    --series-8: #e66767;
    --chart-surface: #161a21;
    --chart-grid: #232a35;
    --chart-axis: #35404f;
    --chart-gap: rgba(154, 167, 184, 0.1);
    --chart-crosshair: rgba(233, 238, 246, 0.3);

    --motd-bg: #0c0f14;
    --motd-ink: #d9dee6;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 4px 14px rgba(0, 0, 0, 0.42), 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-3: 0 14px 38px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35);
    --shadow-4: 0 40px 90px -30px rgba(0, 0, 0, 0.8), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  }
}

/* ── Dark: explicit user choice, which must beat an OS-light too ───────────── */
:root[data-theme="dark"] {
  color-scheme: dark;

  --brand: #3dd68c;
  --brand-solid: #3dd68c;
  --brand-solid-hover: #5be3a2;
  --brand-text: #3dd68c;
  --brand-ink: #06291a;
  --brand-wash: rgba(61, 214, 140, 0.12);
  --brand-ring: rgba(61, 214, 140, 0.34);

  --bg: #0c0f14;
  --surface: #161a21;
  --surface-2: #1c222b;
  --surface-3: #232a35;
  --border: #262e3a;
  --border-strong: #35404f;
  --overlay: rgba(0, 0, 0, 0.62);

  --ink: #e9eef6;
  --ink-2: #9aa7b8;
  --ink-3: #7b8899;

  --online: #22c55e;
  --online-text: #22c55e;
  --online-wash: rgba(34, 197, 94, 0.14);
  --offline: #ef4444;
  --offline-text: #f87171;
  --offline-wash: rgba(239, 68, 68, 0.14);
  --warn: #f59e0b;
  --warn-text: #f59e0b;
  --warn-wash: rgba(245, 158, 11, 0.14);

  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #008300;
  --series-7: #9085e9;
  --series-8: #e66767;
  --chart-surface: #161a21;
  --chart-grid: #232a35;
  --chart-axis: #35404f;
  --chart-gap: rgba(154, 167, 184, 0.1);
  --chart-crosshair: rgba(233, 238, 246, 0.3);

  --motd-bg: #0c0f14;
  --motd-ink: #d9dee6;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 4px 14px rgba(0, 0, 0, 0.42), 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-3: 0 14px 38px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-4: 0 40px 90px -30px rgba(0, 0, 0, 0.8), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */

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

html,
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor targets must clear the sticky header. */
  scroll-padding-top: calc(var(--head-h) + 16px);
}

body {
  font-family: var(--font);
  font-size: var(--s-md);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: var(--brand-text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: var(--r-1);
}

::selection {
  background: var(--brand-ring);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 99px;
}

/* ── Type helpers ──────────────────────────────────────────────────────────── */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: var(--s-xs);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-text);
}

.eyebrow::before {
  content: "";
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

.h1 {
  font-size: var(--s-hero);
  font-weight: 820;
  letter-spacing: -0.032em;
  line-height: 1.03;
}

.h2 {
  font-size: var(--s-3xl);
  font-weight: 760;
  letter-spacing: -0.028em;
  line-height: 1.12;
}

.h3 {
  font-size: var(--s-xl);
  font-weight: 680;
  letter-spacing: -0.015em;
  line-height: 1.28;
}

.h4 {
  font-size: var(--s-lg);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.lede {
  font-size: var(--s-xl);
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 62ch;
  text-wrap: pretty;
}

.dim {
  color: var(--ink-2);
}

.mute {
  color: var(--ink-3);
}

.mono {
  font-family: var(--font-mono);
}

.num {
  font-variant-numeric: tabular-nums;
}

/* Latin-script data inside prose that may be RTL — see src/styles/base.css. */
.ltr,
.num,
.srv-players,
.mono {
  direction: ltr;
  unicode-bidi: isolate;
}

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

.stack {
  display: flex;
  flex-direction: column;
}

.stack-gap {
  gap: 14px;
}

.spacer {
  flex: 1;
}

.accent {
  background: linear-gradient(100deg, var(--brand-text), var(--brand) 45%, var(--brand-text));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Layout ────────────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap-narrow {
  max-width: 820px;
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

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

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: clamp(28px, 4vw, 48px);
  max-width: 68ch;
}

/* Used where the section head is followed by more copy rather than by a grid. */
.section-head.is-flush {
  margin-bottom: 0;
}

.lede-note {
  margin-top: 26px;
  font-size: var(--s-lg);
}

.pixel {
  image-rendering: pixelated;
}

.table-scroll {
  overflow-x: auto;
}

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-2);
  background: var(--brand-solid);
  color: var(--brand-ink);
  font-weight: 650;
  transition: top var(--dur-2) var(--ease);
}

.skip:focus {
  top: 12px;
  text-decoration: none;
}

/* ── Buttons (extension components.css, scaled up for a page) ──────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-2);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--s-md);
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease),
    color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease);
}

.btn:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn-primary {
  background: var(--brand-solid);
  border-color: transparent;
  color: var(--brand-ink);
  box-shadow: 0 1px 2px rgba(14, 20, 27, 0.14), 0 8px 22px -10px var(--brand-ring);
}

.btn-primary:hover {
  background: var(--brand-solid-hover);
  border-color: transparent;
  box-shadow: 0 2px 4px rgba(14, 20, 27, 0.16), 0 14px 30px -12px var(--brand-ring);
}

.btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}

.btn-quiet:hover {
  background: var(--surface-3);
  border-color: transparent;
  color: var(--ink);
}

.btn-lg {
  height: 48px;
  padding: 0 24px;
  font-size: var(--s-lg);
  border-radius: var(--r-3);
}

.btn-sm {
  height: 30px;
  padding: 0 11px;
  font-size: var(--s-sm);
  gap: 6px;
}

.btn-sm svg {
  width: 14px;
  height: 14px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: var(--r-2);
  color: var(--ink-2);
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease), transform var(--dur-2) var(--ease);
}

.icon-btn:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

/* ── Cards ─────────────────────────────────────────────────────────────────── */

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-1);
}

.card-pad {
  padding: clamp(18px, 2.4vw, 26px);
}

/* A quiet brand-tinted halo that only appears on hover — the whole "portfolio"
   feel of the grid comes from this one rule plus the lift. */
.card-lift {
  transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3) var(--ease-out),
    border-color var(--dur-2) var(--ease);
}

.card-lift:hover {
  transform: translateY(-3px);
  border-color: var(--brand-ring);
  box-shadow: var(--shadow-3);
}

.pixel-rule {
  height: 2px;
  border: 0;
  background-image: linear-gradient(90deg, var(--border-strong) 50%, transparent 0);
  background-size: 4px 2px;
}

/* ── Header ────────────────────────────────────────────────────────────────── */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--head-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}

.site-head.is-stuck {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.head-in {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 760;
  font-size: var(--s-lg);
  letter-spacing: -0.02em;
  flex: none;
}

.brand:hover {
  text-decoration: none;
}

.brand svg,
.brand img {
  width: 26px;
  height: 26px;
  flex: none;
  image-rendering: pixelated;
}

.head-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline-start: 14px;
  flex: 1;
  min-width: 0;
}

.head-nav a {
  padding: 7px 10px;
  border-radius: var(--r-2);
  color: var(--ink-2);
  font-size: var(--s-sm);
  font-weight: 550;
  white-space: nowrap;
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}

.head-nav a:hover {
  color: var(--ink);
  background: var(--surface-3);
  text-decoration: none;
}

.head-nav a.is-current {
  color: var(--brand-text);
  background: var(--brand-wash);
}

.head-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  margin-inline-start: auto;
}

/* Segmented theme control — the extension's own pattern. */
.segmented {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  border-radius: var(--r-2);
  background: var(--surface-3);
  border: 1px solid var(--border);
}

.segmented button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 26px;
  border-radius: var(--r-1);
  color: var(--ink-3);
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}

.segmented button svg {
  width: 15px;
  height: 15px;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

/* ── Language menu ─────────────────────────────────────────────────────────── */

.lang {
  position: relative;
  flex: none;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--r-2);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--s-sm);
  font-weight: 600;
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}

.lang-btn:hover {
  border-color: var(--border-strong);
}

.lang-btn[aria-expanded="true"] {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.lang-btn svg {
  width: 15px;
  height: 15px;
  color: var(--ink-3);
  flex: none;
}

.lang-btn .chev {
  transition: transform var(--dur-2) var(--ease);
}

.lang-btn[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

.lang-pop {
  position: absolute;
  z-index: 60;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  min-width: 208px;
  max-height: 330px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  animation: drop var(--dur-2) var(--ease-out);
}

@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.lang-pop ul {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.lang-pop a,
.lang-pop li > span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--r-2);
  font-size: var(--s-sm);
  color: var(--ink-2);
  white-space: nowrap;
}

.lang-pop a:hover {
  background: var(--surface-3);
  color: var(--ink);
  text-decoration: none;
}

.lang-pop [aria-current="page"] {
  color: var(--brand-text);
  font-weight: 650;
  background: var(--brand-wash);
}

.lang-pop .is-soon {
  color: var(--ink-3);
  cursor: default;
}

.lang-pop .is-soon i {
  margin-inline-start: auto;
  font-style: normal;
  font-size: var(--s-xs);
  color: var(--ink-3);
  opacity: 0.8;
}

.lang-code {
  display: grid;
  place-items: center;
  width: 22px;
  height: 16px;
  flex: none;
  border-radius: 3px;
  background: var(--surface-3);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.lang-pop [aria-current="page"] .lang-code {
  background: var(--brand-solid);
  color: var(--brand-ink);
}

/* Burger — only below the nav breakpoint. */
.burger {
  display: none;
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-block: clamp(44px, 7vw, 86px) clamp(48px, 7vw, 92px);
  overflow: hidden;
  isolation: isolate;
}

/* Two soft emerald washes and a pixel grid. The grid is a repeating-linear
   gradient rather than an image: it costs nothing, it scales, and it is the one
   texture that says "Minecraft" without a single block sprite. */
.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto;
  height: 780px;
  z-index: -2;
  background:
    radial-gradient(46% 40% at 22% 22%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
    radial-gradient(38% 44% at 82% 8%, color-mix(in srgb, var(--series-1) 14%, transparent), transparent 72%);
  filter: blur(6px);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(0deg, color-mix(in srgb, var(--ink) 4.5%, transparent) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink) 4.5%, transparent) 0 1px, transparent 1px 40px);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 22%, #000, transparent 78%);
  mask-image: radial-gradient(70% 60% at 50% 22%, #000, transparent 78%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px 0 8px;
  border-radius: 99px;
  border: 1px solid var(--brand-ring);
  background: var(--brand-wash);
  color: var(--brand-text);
  font-size: var(--s-xs);
  font-weight: 650;
  letter-spacing: 0.01em;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--online);
  animation: halo 2.4s var(--ease) infinite;
}

@keyframes halo {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--online) 55%, transparent);
  }
  70%,
  100% {
    box-shadow: 0 0 0 7px transparent;
  }
}

.hero h1 {
  max-width: 16ch;
}

.hero .lede {
  max-width: 54ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-version {
  font-size: var(--s-xs);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--r-1);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  font-size: var(--s-xs);
  font-weight: 600;
  white-space: nowrap;
}

.chip svg {
  width: 12px;
  height: 12px;
  color: var(--brand-text);
  flex: none;
}

/* ── Hero art: a browser frame holding a replica of the popup ─────────────── */

/* A column, not a row: the caption below the replica is a sibling of the frame,
   and in a row it would take half the width away from it. */
.hero-art {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  perspective: 1400px;
}

.frame {
  width: 100%;
  max-width: 430px;
  border-radius: var(--r-4);
  border: 1px solid var(--border);
  background: var(--surface-3);
  box-shadow: var(--shadow-4);
  overflow: hidden;
  transform: rotateY(-7deg) rotateX(3deg) translateZ(0);
  transform-style: preserve-3d;
  transition: transform 400ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .hero-art:hover .frame {
    transform: rotateY(0deg) rotateX(0deg);
  }
}

.frame-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  background: var(--surface-3);
  border-bottom: 1px solid var(--border);
}

.frame-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
  flex: none;
}

.frame-url {
  flex: 1;
  height: 21px;
  margin-inline: 6px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.frame-puzzle {
  flex: none;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: var(--r-1);
  color: var(--brand-text);
  background: var(--surface);
  animation: ping-ring 2.8s var(--ease) infinite;
}

.frame-puzzle svg {
  width: 15px;
  height: 15px;
}

@keyframes ping-ring {
  0% {
    box-shadow: 0 0 0 0 var(--brand-ring);
  }
  55%,
  100% {
    box-shadow: 0 0 0 11px transparent;
  }
}

/* ── Popup replica ─────────────────────────────────────────────────────────── */
/* Everything below uses the extension's --t-* scale on purpose: this block has
   to be mistaken for a screenshot. */

.pop {
  font-size: var(--t-md);
  background: var(--bg);
}

.pop-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.pop-head .brand-name {
  font-size: var(--t-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pop-head img {
  image-rendering: pixelated;
}

.pop-head .spacer {
  flex: 1;
}

.pop-head .icon-btn {
  width: 28px;
  height: 28px;
}

.pop-head .icon-btn svg {
  width: 15px;
  height: 15px;
}

.pop-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.srv {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  overflow: hidden;
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}

.srv:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-1);
}

.srv-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px;
  text-align: start;
}

.favicon {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: var(--r-1);
  background: var(--surface-3);
  image-rendering: pixelated;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: var(--t-lg);
  font-weight: 800;
  color: var(--ink-3);
  text-transform: uppercase;
  overflow: hidden;
}

.favicon img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.favicon-lg {
  width: 48px;
  height: 48px;
}

.srv-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.srv-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.srv-name {
  font-size: var(--t-md);
  font-weight: 650;
  letter-spacing: -0.008em;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 7px 0 6px;
  border-radius: var(--r-1);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--surface-3);
  color: var(--ink-2);
  white-space: nowrap;
  flex: none;
}

.pill.is-online {
  background: var(--online-wash);
  color: var(--online-text);
}

.pill.is-offline {
  background: var(--offline-wash);
  color: var(--offline-text);
}

.dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--ink-3);
}

.dot.is-online {
  background: var(--online);
  animation: halo 2.4s var(--ease) infinite;
}

.dot.is-offline {
  background: var(--offline);
  animation: blink 1.6s steps(1, end) infinite;
}

@keyframes blink {
  0%,
  55% {
    opacity: 1;
  }
  56%,
  100% {
    opacity: 0.28;
  }
}

.motd {
  background: var(--motd-bg);
  color: var(--motd-ink);
  border-radius: var(--r-1);
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  line-height: 1.5;
  overflow: hidden;
}

.motd .motd-line {
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}

.motd b {
  font-weight: 700;
}

.motd .obf {
  animation: obf 0.6s steps(1, end) infinite;
}

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

.srv-metrics {
  display: flex;
  align-items: center;
  gap: 8px;
}

.srv-players {
  font-size: var(--t-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.srv-players small {
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-3);
}

.spark {
  width: 54px;
  height: 16px;
  flex: none;
  opacity: 0.9;
}

.srv-meta {
  font-size: var(--t-xs);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.capacity {
  position: relative;
  height: 4px;
  border-radius: 99px;
  background: var(--surface-3);
  overflow: hidden;
}

.capacity > i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--brand);
  transition: width 900ms var(--ease-out);
}

.capacity.is-full > i {
  background: var(--warn);
}

.pop-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 8px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: var(--t-xs);
  color: var(--ink-3);
}

.pop-foot .spacer {
  flex: 1;
}

.pop-foot .btn {
  height: 26px;
  padding: 0 9px;
  font-size: var(--t-sm);
  border-radius: var(--r-2);
}

/* ── Popup replica: the parts a page does not otherwise have ───────────────── */
/* Inside `.pop` the extension's own sizes apply, because this block has to be
   mistaken for a screenshot of a 400px popup rather than for part of the page.
   The page's own --s-* scale would make every control here two sizes too big. */

.pop .btn {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-2);
  font-size: var(--t-md);
  font-weight: 550;
  gap: 6px;
}

.pop .btn-sm {
  height: 26px;
  padding: 0 9px;
  font-size: var(--t-sm);
  gap: 5px;
}

.pop .btn svg {
  width: 13px;
  height: 13px;
}

.pop .btn-danger {
  color: var(--offline-text);
  border-color: var(--border);
}

.pop .btn-danger:hover {
  background: var(--offline-wash);
  border-color: var(--offline);
}

.pop .hint {
  font-size: var(--t-xs);
}

.pop .label {
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink-2);
}

.pop .input {
  height: 32px;
  padding: 0 10px;
  font-size: var(--t-md);
  border-radius: var(--r-2);
}

.pop .field {
  gap: 5px;
}

/* The extension's quiet eyebrow, not the page's brand-coloured one. */
.pop-eyebrow {
  display: block;
  margin-bottom: 5px;
  font-size: var(--t-xs);
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.srv-chevron {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 9px;
  color: var(--ink-3);
  transition: transform var(--dur-2) var(--ease);
}

.srv.is-open {
  border-color: var(--brand-ring);
}

.srv.is-open .srv-chevron {
  transform: rotate(180deg);
}

button.srv-main {
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.favicon-fallback {
  display: grid;
  place-items: center;
  font-size: var(--t-lg);
  font-weight: 800;
  color: var(--ink-3);
  text-transform: uppercase;
}

.rise {
  animation: rise var(--dur-3) var(--ease-out) backwards;
}

/* ── Expanded card detail ──────────────────────────────────────────────────── */

.srv-detail {
  padding: 2px 10px 10px 54px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: rise var(--dur-2) var(--ease-out);
}

.detail-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: var(--t-sm);
}

.detail-grid dt {
  color: var(--ink-3);
  white-space: nowrap;
}

.detail-grid dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-address {
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-address code {
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  direction: ltr;
  unicode-bidi: isolate;
}

.copy-btn {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: var(--r-1);
  color: var(--ink-3);
}

.copy-btn:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.sample {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pop .tag {
  height: 18px;
  padding: 0 6px;
  font-size: var(--t-xs);
}

.detail-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── Popup empty state ─────────────────────────────────────────────────────── */

.pop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 30px 22px;
}

.pop-empty svg {
  color: var(--ink-3);
  opacity: 0.7;
  margin-bottom: 2px;
}

.pop-empty-title {
  font-size: var(--t-lg);
  font-weight: 650;
}

.pop-empty-body {
  font-size: var(--t-sm);
  color: var(--ink-3);
  max-width: 30ch;
  line-height: 1.5;
}

/* ── Popup toasts ──────────────────────────────────────────────────────────── */

.pop {
  position: relative;
}

.pop-toasts {
  position: absolute;
  left: 50%;
  bottom: 46px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translateX(-50%);
  pointer-events: none;
}

.pop-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 300px;
  padding: 7px 12px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--surface);
  font-size: var(--t-sm);
  font-weight: 550;
  box-shadow: var(--shadow-3);
  animation: toast-in var(--dur-3) var(--ease-out);
}

.pop-toast.is-out {
  animation: toast-out var(--dur-2) var(--ease) forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
  }
}

/* ── The add / edit dialog, drawn inside the popup ─────────────────────────── */

.pop-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 14px;
  /* Its own vanishing point, steeper than the frame's, so the panel reads as
     sitting above the popup rather than lying on it. */
  perspective: 900px;
  perspective-origin: 50% 0%;
}

.pop-overlay.is-out {
  animation: pop-fade var(--dur-2) var(--ease) forwards;
}

@keyframes pop-fade {
  to {
    opacity: 0;
  }
}

.pop-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: pop-fade-in var(--dur-2) var(--ease) reverse forwards;
}

@keyframes pop-fade-in {
  to {
    opacity: 0;
  }
}

.pop-modal {
  position: relative;
  width: 100%;
  max-width: 340px;
  transform: rotateX(9deg) translateZ(0);
  transform-origin: 50% 0%;
  transition: transform var(--dur-3) var(--ease-out);
  animation: pop-modal-in var(--dur-3) var(--ease-out);
}

/* Tilted looks good; tilted while you type does not. It lies flat as soon as
   anything inside it takes focus. */
.pop-modal:focus-within {
  transform: rotateX(0deg);
}

@keyframes pop-modal-in {
  from {
    opacity: 0;
    transform: rotateX(22deg) translateY(-14px) scale(0.95);
  }
}

.pop-panel {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}

.pop-panel-head {
  padding: 14px 16px 0;
}

.pop-panel-head h3 {
  font-size: var(--t-lg);
  font-weight: 650;
  letter-spacing: -0.008em;
}

.pop-panel-body {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: var(--t-md);
}

.pop-panel-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 16px 14px;
}

.pop-panel .segmented button {
  height: 24px;
  font-size: var(--t-sm);
}

.pop-error {
  color: var(--offline-text);
}

.pop-result:empty {
  display: none;
}

.pop-result.is-good {
  color: var(--online-text);
}

.pop-result.is-bad {
  color: var(--offline-text);
}

.pop-result.is-warn {
  color: var(--warn-text);
}

/* ── Hero: the caption under the replica ───────────────────────────────────── */

.hero-mock-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  font-size: var(--s-xs);
  color: var(--ink-3);
  text-align: center;
}

.hero-mock-hint svg {
  color: var(--brand-text);
  flex: none;
}

.pop-reset {
  padding: 2px 8px;
  border-radius: var(--r-1);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  font-size: var(--s-xs);
  font-weight: 600;
  cursor: pointer;
}

.pop-reset:hover {
  color: var(--brand-text);
  border-color: var(--brand);
}

/* ── Store button pair ─────────────────────────────────────────────────────── */

.store-pair {
  display: contents;
}

/* ── Stat strip ────────────────────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  margin-top: clamp(36px, 5vw, 60px);
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  background: var(--border);
  overflow: hidden;
}

.stat {
  background: var(--surface);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat b {
  font-size: var(--s-3xl);
  font-weight: 780;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--brand-text);
}

.stat span {
  font-size: var(--s-sm);
  font-weight: 650;
}

.stat em {
  font-style: normal;
  font-size: var(--s-xs);
  color: var(--ink-3);
}

/* ── Live ping demo ────────────────────────────────────────────────────────── */

.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 28px);
  align-items: start;
}

.demo-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > label,
.label {
  font-size: var(--s-sm);
  font-weight: 650;
  color: var(--ink-2);
}

.hint {
  font-size: var(--s-xs);
  color: var(--ink-3);
  line-height: 1.5;
}

.input {
  height: 42px;
  width: 100%;
  padding: 0 12px;
  border-radius: var(--r-2);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--s-md);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}

.input::placeholder {
  color: var(--ink-3);
}

.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.input[aria-invalid="true"] {
  border-color: var(--offline);
}

.seg-radio {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  border-radius: var(--r-2);
  background: var(--surface-3);
  border: 1px solid var(--border);
  align-self: flex-start;
}

/* The selected state is carried by `input:checked + span`, not by `:has()` on
   the label. An adjacent-sibling rule is invalidated reliably by every engine,
   including when the checked state is changed from script rather than by a
   click, which `:has()` is not. */
.seg-radio label {
  position: relative;
  display: grid;
  cursor: pointer;
}

.seg-radio input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.seg-radio span {
  display: grid;
  place-items: center;
  min-width: 78px;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--r-1);
  font-size: var(--s-sm);
  font-weight: 650;
  color: var(--ink-2);
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}

.seg-radio label:hover span {
  color: var(--ink);
}

.seg-radio input:checked + span {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

.seg-radio input:focus-visible + span {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-1);
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: var(--s-xs);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}

.chip-btn:hover {
  color: var(--ink);
  border-color: var(--brand);
  background: var(--brand-wash);
}

.demo-out {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* The result card is a scaled-up server card, using the extension's own parts. */
.result {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: rise var(--dur-3) var(--ease-out);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.result-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.result-id {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-name {
  font-size: var(--s-xl);
  font-weight: 700;
  letter-spacing: -0.018em;
  overflow-wrap: anywhere;
}

.result-addr {
  font-family: var(--font-mono);
  font-size: var(--s-sm);
  color: var(--ink-3);
  overflow-wrap: anywhere;
}

.result-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
}

.metric {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.metric .k {
  font-size: var(--s-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.metric .v {
  font-size: var(--s-2xl);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric .v small {
  font-size: var(--s-md);
  font-weight: 500;
  color: var(--ink-3);
}

.sample {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-1);
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: var(--s-xs);
  font-weight: 600;
  white-space: nowrap;
}

.result-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: var(--s-xs);
  color: var(--ink-3);
}

/* Placeholder / error / offline states share one shell. */
.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 40px 26px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-4);
  background: var(--surface-2);
  min-height: 260px;
}

.state svg {
  width: 34px;
  height: 34px;
  color: var(--ink-3);
  opacity: 0.7;
}

.state.is-offline {
  border-color: color-mix(in srgb, var(--offline) 40%, transparent);
  background: var(--offline-wash);
}

.state.is-offline svg {
  color: var(--offline-text);
  opacity: 1;
}

.state .state-title {
  font-size: var(--s-lg);
  font-weight: 680;
}

.state .state-body {
  font-size: var(--s-sm);
  color: var(--ink-2);
  max-width: 44ch;
}

.state.is-offline .state-body {
  color: var(--offline-text);
}

/* Skeleton while the request is in flight — the extension's shimmer. */
.skeleton {
  border-radius: var(--r-1);
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

.sk-row {
  display: flex;
  gap: 14px;
  padding: 16px;
}

.sk-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.spin {
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Feature grid ──────────────────────────────────────────────────────────── */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 14px;
}

.feature {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-2);
  background: var(--brand-wash);
  color: var(--brand-text);
  margin-bottom: 4px;
  transition: transform var(--dur-3) var(--ease-out);
}

.feature-icon svg {
  width: 21px;
  height: 21px;
}

.card-lift:hover .feature-icon {
  transform: scale(1.08) rotate(-4deg);
}

.feature p {
  font-size: var(--s-sm);
  color: var(--ink-2);
  line-height: 1.6;
}

/* ── Honest history ────────────────────────────────────────────────────────── */

.states-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.state-card {
  display: flex;
  gap: 11px;
  padding: 15px 16px;
  border-radius: var(--r-3);
  border: 1px solid var(--border);
  background: var(--surface);
}

.state-card .swatch {
  width: 4px;
  border-radius: 99px;
  flex: none;
  background: var(--ink-3);
}

.state-card[data-state="online"] .swatch {
  background: var(--series-3);
}

.state-card[data-state="down"] .swatch {
  background: var(--offline);
}

.state-card[data-state="unobserved"] .swatch {
  background: repeating-linear-gradient(
    -45deg,
    var(--border-strong) 0 3px,
    transparent 3px 6px
  );
}

.state-card b {
  display: block;
  font-size: var(--s-md);
  font-weight: 680;
}

.state-card p {
  font-size: var(--s-sm);
  color: var(--ink-2);
  line-height: 1.55;
}

.chart-card {
  padding: clamp(14px, 2vw, 20px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chart-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.chart-bar .spacer {
  flex: 1;
}

.toggle-2 {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  border-radius: var(--r-2);
  background: var(--surface-3);
  border: 1px solid var(--border);
}

.toggle-2 button {
  height: 30px;
  padding: 0 14px;
  border-radius: var(--r-1);
  font-size: var(--s-sm);
  font-weight: 650;
  color: var(--ink-3);
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}

.toggle-2 button:hover {
  color: var(--ink);
}

.toggle-2 button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

.toggle-2 button[aria-pressed="true"][data-mode="mcping"] {
  color: var(--brand-text);
}

.chart-host {
  position: relative;
  width: 100%;
  height: clamp(260px, 34vw, 380px);
}

.chart-host canvas {
  width: 100%;
  height: 100%;
}

.chart-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  min-width: 132px;
  padding: 8px 10px;
  border-radius: var(--r-2);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  font-size: var(--t-sm);
}

.chart-tip-head {
  font-size: var(--t-xs);
  color: var(--ink-3);
  margin-bottom: 5px;
  white-space: nowrap;
}

.chart-tip-row {
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.6;
}

.chart-tip-row i {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 2px;
  border: 1.5px solid transparent;
}

.chart-tip-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-2);
}

.chart-tip-row b {
  font-variant-numeric: tabular-nums;
}

.chart-tip-row b.is-down {
  color: var(--offline-text);
  font-weight: 600;
}

.chart-tip-row b.is-nodata {
  color: var(--ink-3);
  font-weight: 500;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.legend button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--r-1);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--s-xs);
  font-weight: 650;
  color: var(--ink-2);
  transition: opacity var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}

.legend button:hover {
  border-color: var(--border-strong);
}

.legend button[aria-pressed="false"] {
  opacity: 0.45;
}

.legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex: none;
}

.chart-caption {
  font-size: var(--s-sm);
  color: var(--ink-2);
  line-height: 1.55;
  min-height: 3em;
  padding-inline-start: 12px;
  border-inline-start: 3px solid var(--brand);
}

.chart-caption.is-other {
  border-inline-start-color: var(--warn);
}

/* ── Alerts ────────────────────────────────────────────────────────────────── */

.alerts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
}

.rules {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 22px;
}

.notif-cta-row {
  margin-top: 22px;
}

.rules li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--s-md);
  color: var(--ink-2);
}

.rules svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 3px;
  color: var(--brand-text);
}

.notif-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  justify-content: flex-end;
}

/* A Chrome-style notification, not a copy of the extension's own toast: this
   is what the OS actually draws. */
.notif {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 15px;
  border-radius: var(--r-3);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  animation: notif-in 420ms var(--ease-out) backwards;
}

.notif.is-out {
  animation: notif-out var(--dur-3) var(--ease) forwards;
}

@keyframes notif-in {
  from {
    opacity: 0;
    transform: translateX(18px) scale(0.97);
  }
}

@keyframes notif-out {
  to {
    opacity: 0;
    transform: translateX(14px) scale(0.98);
  }
}

.notif-icon {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: var(--r-2);
  background: var(--surface-3);
  display: grid;
  place-items: center;
  image-rendering: pixelated;
  overflow: hidden;
}

.notif-icon img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-size: var(--s-md);
  font-weight: 680;
  line-height: 1.35;
}

.notif-text {
  font-size: var(--s-sm);
  color: var(--ink-2);
}

.notif-app {
  font-size: var(--s-xs);
  color: var(--ink-3);
  margin-top: 4px;
}

.notif[data-kind="offline"] .notif-icon {
  background: var(--offline-wash);
  color: var(--offline-text);
}

.notif[data-kind="online"] .notif-icon {
  background: var(--online-wash);
  color: var(--online-text);
}

.notif[data-kind="peak"] .notif-icon {
  background: var(--warn-wash);
  color: var(--warn-text);
}

.notif svg {
  width: 19px;
  height: 19px;
}

/* ── The guided tour ───────────────────────────────────────────────────────── */

.tour {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.tour-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.tour-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tour-tab {
  height: 28px;
  padding: 0 11px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-3);
  font-size: var(--s-xs);
  font-weight: 650;
  white-space: nowrap;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}

.tour-tab:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

.tour-tab[aria-pressed="true"] {
  background: var(--brand-wash);
  border-color: var(--brand-ring);
  color: var(--brand-text);
}

/* All four copy blocks are stacked in one grid cell so the column never
   changes height as the tour advances — a section that jumps every seven
   seconds is unreadable. */
.tour-copy {
  display: grid;
  min-height: 210px;
}

.tour-copy-item {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out);
  pointer-events: none;
}

.tour-copy-item.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.tour-copy-item p {
  font-size: var(--s-md);
  color: var(--ink-2);
  line-height: 1.65;
}

.tour-step {
  font-family: var(--font-mono);
  font-size: var(--s-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brand-text);
}

.tour-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tour-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 28px;
  padding: 0 11px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  font-size: var(--s-xs);
  font-weight: 600;
}

.tour-play:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

.tour-track {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: var(--surface-3);
  overflow: hidden;
}

.tour-track > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--brand);
}

/* ── The stage ─────────────────────────────────────────────────────────────── */

.tour-stage-wrap {
  position: relative;
  perspective: 1600px;
}

.tour-stage {
  position: relative;
  /* One shape for all four scenes, so the section never changes height while it
     plays. A little taller than the 16:10 of the store screenshots, because the
     popup with a card unfolded is the tallest thing the stage has to hold. */
  aspect-ratio: 7 / 5;
  min-height: 320px;
}

/* Absolute, not stacked in a grid cell: a grid item's content contributes to
   the row's min-content height, which would let the tallest scene overrule the
   aspect ratio and make the stage change shape between scenes. */
.tour-scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out);
  pointer-events: none;
  min-width: 0;
  min-height: 0;
}

.tour-scene.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Scenes 1 & 2: the popup in a small browser frame, centred.
   tour.js sets `transform: scale(…)` here when the popup with a card unfolded
   is taller than the stage. Shrinking it a few percent beats both clipping it
   and letting the section change height mid-play. It is never scaled up. */
.tour-frame {
  width: min(100%, 372px);
  border-radius: var(--r-4);
  border: 1px solid var(--border);
  background: var(--surface-3);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  transform-origin: center;
}

/* Scenes 3 & 4: a full extension page, scaled to fit the stage. */
.tour-page {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-4);
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  font-size: var(--t-md);
}

.tour-page-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 9px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.tour-page-head img {
  image-rendering: pixelated;
}

.tour-brand {
  font-size: var(--t-md);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tour-crumb {
  font-size: var(--t-md);
  color: var(--ink-3);
}

.tour-page-head .icon-btn {
  width: 24px;
  height: 24px;
  color: var(--ink-3);
}

.tour-page-body {
  flex: 1;
  min-height: 0;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.tour-settings {
  flex-direction: row;
  gap: 8px;
  align-items: stretch;
}

.tour-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tour-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.tour-seg {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  border-radius: var(--r-2);
  background: var(--surface-3);
  border: 1px solid var(--border);
}

.tour-seg button {
  height: 22px;
  padding: 0 9px;
  border-radius: var(--r-1);
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--ink-3);
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}

.tour-seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

.tour-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--r-2);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  font-size: var(--t-xs);
  font-weight: 600;
  white-space: nowrap;
}

.tour-chip.is-brand {
  background: var(--brand-solid);
  border-color: transparent;
  color: var(--brand-ink);
}

.tour-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  flex: none;
}

.tour-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: 8px 10px;
  min-width: 0;
}

.tour-tile-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tour-tile-value {
  display: block;
  font-size: var(--t-xl);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* A number that changes should be seen changing. */
.tour-tile-value.is-bump {
  animation: bump 420ms var(--ease-out);
}

@keyframes bump {
  0% {
    transform: translateY(5px);
    opacity: 0.4;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

.tour-stats-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.tour-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: 8px;
  min-width: 0;
  min-height: 0;
}

.tour-chart-host {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 140px;
}

.tour-chart-host canvas {
  width: 100%;
  height: 100%;
}

.tour-series-panel {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px;
  overflow: hidden;
}

.tour-series {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 4px;
  border-radius: var(--r-2);
  transition: opacity var(--dur-3) var(--ease);
}

.tour-series.is-off {
  opacity: 0.34;
}

.tour-check {
  display: grid;
  place-items: center;
  width: 13px;
  height: 13px;
  flex: none;
  border-radius: 3px;
  border: 1.5px solid var(--border-strong);
  background: var(--brand-solid);
  color: var(--brand-ink);
  transition: background var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}

.tour-series.is-off .tour-check {
  background: transparent;
  color: transparent;
  border-color: var(--border-strong);
}

.tour-swatch {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 2px;
}

.tour-series.is-off .tour-swatch {
  background: var(--ink-3) !important;
}

.tour-series-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tour-series-name {
  font-size: var(--t-xs);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tour-series-sub {
  font-size: 10px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.tour-series-value {
  flex: none;
  font-size: var(--t-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── Tour: the settings scene ──────────────────────────────────────────────── */

.tour-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: 10px 12px;
  flex: none;
}

.tour-panel h4 {
  font-size: var(--t-sm);
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.tour-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tour-panel-head h4 {
  margin: 0;
}

.tour-srv-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tour-srv-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  background: var(--surface);
  transition: transform 420ms var(--ease-out), box-shadow 420ms var(--ease-out), border-color 420ms var(--ease);
}

/* The reordering beat: one row lifts and swaps with the one above it. */
.tour-srv-row.is-lifting {
  transform: translateY(-38px);
  border-color: var(--brand-ring);
  box-shadow: var(--shadow-2);
  z-index: 2;
}

.tour-srv-row.is-shifting {
  transform: translateY(38px);
}

.tour-drag {
  color: var(--ink-3);
  flex: none;
  display: grid;
  place-items: center;
}

.tour-srv-icon {
  width: 22px;
  height: 22px;
  font-size: var(--t-sm);
}

.tour-srv-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tour-srv-name {
  font-size: var(--t-sm);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tour-srv-host {
  font-size: 10px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tour-srv-row .icon-btn {
  width: 24px;
  height: 24px;
  color: var(--ink-3);
}

.tour-setting {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--border);
  font-size: var(--t-sm);
}

.tour-panel > .tour-setting:first-of-type {
  border-top: 0;
}

.tour-setting-label {
  flex: 1;
  min-width: 0;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tour-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--r-2);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: var(--t-xs);
  color: var(--ink);
}

.tour-select svg {
  color: var(--ink-3);
}

.tour-switch {
  position: relative;
  flex: none;
  width: 32px;
  height: 18px;
  border-radius: 99px;
  background: var(--border-strong);
  transition: background var(--dur-3) var(--ease);
}

.tour-switch > i {
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform var(--dur-3) var(--ease-out);
}

.tour-switch.is-on {
  background: var(--brand-solid);
}

.tour-switch.is-on > i {
  transform: translateX(14px);
}

[dir="rtl"] .tour-switch.is-on > i {
  transform: translateX(-14px);
}

@media (max-width: 1080px) {
  .tour {
    grid-template-columns: minmax(0, 1fr);
  }

  .tour-copy {
    min-height: 190px;
  }
}

@media (max-width: 640px) {
  .tour-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tour-stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* At this width the two full-page scenes are already at the edge of legible.
     The series panel and the toolbar's secondary controls are the parts a
     visitor does not need in order to understand the screen. */
  .tour-series-panel,
  .tour-toolbar .tour-chip,
  .tour-toolbar .tour-seg:nth-of-type(2) {
    display: none;
  }

  .tour-stage {
    aspect-ratio: 4 / 5;
  }

  .tour-page-body {
    padding: 10px;
  }
}

/* ── Privacy block ─────────────────────────────────────────────────────────── */

.privacy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 28px);
  align-items: start;
}

.perm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--s-sm);
}

.perm-table caption {
  text-align: start;
  font-size: var(--s-lg);
  font-weight: 680;
  padding-bottom: 12px;
}

.perm-table th {
  text-align: start;
  font-size: var(--s-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.perm-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--ink-2);
}

.perm-table tr:last-child td {
  border-bottom: 0;
}

.perm-table code {
  font-family: var(--font-mono);
  font-size: var(--s-xs);
  font-weight: 650;
  color: var(--brand-text);
  background: var(--brand-wash);
  padding: 2px 6px;
  border-radius: var(--r-1);
  white-space: nowrap;
}

.callout {
  display: flex;
  gap: 13px;
  padding: 17px 19px;
  border-radius: var(--r-3);
  border: 1px solid var(--brand-ring);
  background: var(--brand-wash);
}

.callout svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 2px;
  color: var(--brand-text);
}

.callout b {
  display: block;
  font-size: var(--s-md);
  font-weight: 680;
  margin-bottom: 3px;
}

.callout p {
  font-size: var(--s-sm);
  color: var(--ink-2);
  line-height: 1.6;
}

.api-card h3 {
  margin-bottom: 8px;
}

.api-card p {
  font-size: var(--s-sm);
  color: var(--ink-2);
  line-height: 1.65;
}

.api-card p + p {
  margin-top: 14px;
}

/* ── Install ───────────────────────────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.step .n {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-2);
  background: var(--brand-solid);
  color: var(--brand-ink);
  font-size: var(--s-sm);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-bottom: 5px;
}

.step p {
  font-size: var(--s-sm);
  color: var(--ink-2);
  line-height: 1.6;
}

.browsers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.browsers span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--s-sm);
  font-weight: 600;
  color: var(--ink-2);
}

.browsers svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.browsers-note {
  flex: 1 1 260px;
}

/* ── Changelog ─────────────────────────────────────────────────────────────── */

.log {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rel {
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--dur-2) var(--ease);
}

.rel[open] {
  border-color: var(--brand-ring);
  box-shadow: var(--shadow-2);
}

.rel summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.rel summary::-webkit-details-marker {
  display: none;
}

.rel summary:hover {
  background: var(--surface-2);
}

.rel-v {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--r-1);
  background: var(--surface-3);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: var(--s-xs);
  font-weight: 700;
  flex: none;
}

.rel[data-current="true"] .rel-v {
  background: var(--brand-solid);
  color: var(--brand-ink);
}

.rel-sum {
  flex: 1;
  min-width: 0;
  font-size: var(--s-md);
  font-weight: 620;
}

.rel-date {
  font-size: var(--s-xs);
  color: var(--ink-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rel-chev {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--ink-3);
  transition: transform var(--dur-2) var(--ease);
}

.rel[open] .rel-chev {
  transform: rotate(180deg);
}

.rel-body {
  padding: 4px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: rise var(--dur-3) var(--ease-out);
}

.rel-group h4 {
  font-size: var(--s-xs);
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brand-text);
  margin-bottom: 8px;
}

.rel-group ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rel-group li {
  position: relative;
  padding-inline-start: 18px;
  font-size: var(--s-sm);
  color: var(--ink-2);
  line-height: 1.65;
}

.rel-group li::before {
  content: "";
  position: absolute;
  inset-inline-start: 3px;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--border-strong);
}

.log-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}

/* ── FAQ ───────────────────────────────────────────────────────────────────── */

.faq {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px 20px;
  align-items: start;
}

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

.qa summary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 2px;
  cursor: pointer;
  list-style: none;
  font-size: var(--s-md);
  font-weight: 650;
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa summary:hover {
  color: var(--brand-text);
}

.qa .qa-mark {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 3px;
  color: var(--ink-3);
  transition: transform var(--dur-2) var(--ease), color var(--dur-1) var(--ease);
}

.qa[open] .qa-mark {
  transform: rotate(45deg);
  color: var(--brand-text);
}

.qa p {
  padding: 0 2px 18px 30px;
  font-size: var(--s-sm);
  color: var(--ink-2);
  line-height: 1.7;
  animation: rise var(--dur-3) var(--ease-out);
}

[dir="rtl"] .qa p {
  padding: 0 30px 18px 2px;
}

/* ── Final CTA ─────────────────────────────────────────────────────────────── */

.cta-card {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  border-radius: var(--r-5);
  border: 1px solid var(--brand-ring);
  background: var(--surface);
}

.cta-card::before {
  content: "";
  position: absolute;
  inset: -60% 10% auto;
  height: 420px;
  z-index: 0;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 20%, transparent), transparent);
  pointer-events: none;
}

.cta-card > * {
  position: relative;
  z-index: 1;
}

.cta-card .lede {
  max-width: 48ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.discord-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  margin-top: 16px;
}

.discord-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: var(--r-2);
  background: var(--brand-wash);
  color: var(--brand-text);
}

.discord-mark svg {
  width: 26px;
  height: 26px;
}

.discord-copy {
  flex: 1;
  min-width: 0;
  text-align: start;
}

.discord-copy p {
  font-size: var(--s-sm);
  color: var(--ink-2);
  line-height: 1.55;
}

/* ── Footer ────────────────────────────────────────────────────────────────── */

.site-foot {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding-block: clamp(36px, 5vw, 56px) 26px;
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.foot-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.foot-brand p {
  font-size: var(--s-sm);
  color: var(--ink-2);
  max-width: 34ch;
}

.foot-col h3 {
  font-size: var(--s-xs);
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 11px;
}

.foot-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.foot-col a {
  font-size: var(--s-sm);
  color: var(--ink-2);
}

.foot-col a:hover {
  color: var(--brand-text);
}

.foot-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.foot-langs a,
.foot-langs span {
  font-size: var(--s-xs);
  color: var(--ink-3);
  padding: 3px 7px;
  border-radius: var(--r-1);
  background: var(--surface-3);
}

.foot-langs a:hover {
  color: var(--brand-text);
  text-decoration: none;
}

.foot-langs [aria-current="page"] {
  color: var(--brand-text);
  font-weight: 700;
}

.foot-bottom {
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}

.foot-bottom p {
  font-size: var(--s-xs);
  color: var(--ink-3);
  max-width: 70ch;
}

/* Mojang usage guidelines require this notice wherever the product is shown. */
.disclaimer {
  font-size: 10px !important;
  letter-spacing: 0.03em;
  line-height: 1.6;
  opacity: 0.85;
}

/* ── Scroll reveal ─────────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms var(--ease-out), transform 620ms var(--ease-out);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
  /* Failsafe. If site.js never runs — a module error, a blocked script, an
     engine without IntersectionObserver — the whole page would otherwise stay
     invisible. Four seconds in, everything appears regardless. */
  animation: reveal-failsafe 1ms linear 4s forwards;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  animation: none;
}

@keyframes reveal-failsafe {
  to {
    opacity: 1;
    transform: none;
  }
}

/* No JS at all? Show everything immediately. `.js` is stamped by the inline
   head script, so its absence means scripting is off. */
html:not(.js) .reveal {
  opacity: 1;
  transform: none;
  animation: none;
}

/* ── Legal / privacy page ──────────────────────────────────────────────────── */

.doc {
  max-width: 760px;
  margin-inline: auto;
  padding-block: clamp(36px, 6vw, 72px) clamp(48px, 7vw, 88px);
}

.doc h1 {
  font-size: var(--s-3xl);
  font-weight: 780;
  letter-spacing: -0.028em;
  margin-bottom: 8px;
}

.doc .updated {
  font-size: var(--s-sm);
  color: var(--ink-3);
  margin-bottom: 28px;
}

.doc h2 {
  font-size: var(--s-xl);
  font-weight: 700;
  letter-spacing: -0.016em;
  margin-top: 36px;
  margin-bottom: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.doc h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.doc p,
.doc li {
  font-size: var(--s-md);
  color: var(--ink-2);
  line-height: 1.75;
}

.doc p + p {
  margin-top: 12px;
}

.doc ul {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 12px;
}

.doc ul li {
  position: relative;
  padding-inline-start: 18px;
}

.doc ul li::before {
  content: "";
  position: absolute;
  inset-inline-start: 3px;
  top: 0.66em;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--brand);
}

.doc strong {
  color: var(--ink);
  font-weight: 650;
}

.doc code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--brand-text);
  background: var(--brand-wash);
  padding: 2px 6px;
  border-radius: var(--r-1);
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: var(--s-sm);
}

.doc th {
  text-align: start;
  font-size: var(--s-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.doc td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--ink-2);
}

.doc-langs {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  border-radius: var(--r-2);
  background: var(--surface-3);
  border: 1px solid var(--border);
  margin-bottom: 26px;
}

.doc-langs button {
  height: 30px;
  padding: 0 14px;
  border-radius: var(--r-1);
  font-size: var(--s-sm);
  font-weight: 650;
  color: var(--ink-3);
}

.doc-langs button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--s-sm);
  font-weight: 600;
  margin-bottom: 22px;
}

.back-link svg {
  width: 15px;
  height: 15px;
}

[dir="rtl"] .back-link svg,
[dir="rtl"] .rel-chev {
  transform: scaleX(-1);
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .head-nav {
    display: none;
  }

  .burger {
    display: inline-flex;
  }

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

  .hero-art {
    order: -1;
    perspective: none;
  }

  .frame {
    transform: none;
    max-width: 400px;
  }

  .alerts-grid,
  .privacy-grid,
  .demo-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

/* The mobile menu is the nav list, revealed under the header. */
.mob-nav {
  position: fixed;
  z-index: 49;
  inset: var(--head-h) 0 auto;
  padding: 12px var(--gutter) 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: drop var(--dur-2) var(--ease-out);
}

.mob-nav a {
  padding: 11px 12px;
  border-radius: var(--r-2);
  color: var(--ink);
  font-size: var(--s-md);
  font-weight: 600;
}

.mob-nav a:hover {
  background: var(--surface-3);
  text-decoration: none;
}

.mob-nav .btn {
  margin-top: 8px;
}

@media (max-width: 760px) {
  :root {
    --head-h: 56px;
  }

  .brand span {
    display: none;
  }

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

  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .shots > :first-child {
    grid-column: auto;
  }

  .hero-cta .btn {
    flex: 1 1 auto;
  }

  /* The header's install button is one short word in English and a long one in
     German, Russian or Indonesian, which is enough to push the row past 375px.
     Hidden here rather than shrunk: the burger menu carries its own install
     button, and the hero's pair of store buttons is right below the fold. */
  .head-tools > .btn {
    display: none;
  }
}

@media (max-width: 420px) {
  .stats {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Motion & print ────────────────────────────────────────────────────────── */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-head,
  .hero-art,
  .demo-grid,
  .chart-card,
  .lightbox {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
