/* Pixel/arcade display font for the voxel theme (headings + UI chrome only). */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  color-scheme: dark;
  --bg: #0f1117;
  --panel: #171a23;
  --panel-2: #1f2330;
  --text: #e7e9ee;
  --muted: #9aa3b2;
  --accent: #4caf50;
  --accent-2: #6c8cff;
  --warn: #e6a700;
  --danger: #e05260;
  --border: #2a2f3d;
  --radius: 12px;
}

/* Light theme — applied via the data-theme attribute on <html>, which the early
   <head> script in base.html sets from a saved choice or the OS preference, and
   the header toggle flips + persists. Single source of light styling. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fa;
  --panel: #ffffff;
  --panel-2: #eef1f6;
  --text: #1b1f27;
  --muted: #5b636f;
  --accent: #2f9e44;
  --accent-2: #3b5bdb;
  --warn: #b07d09;
  --danger: #d6455b;
  --border: #dde2ea;
}
/* Flag pill text tuned for dark — darken for light. (State badges get solid
   light-mode backgrounds in a block after their base rules, below.) */
:root[data-theme="light"] .flag-badge { color: #8a5d00; }
/* Soft drop shadow reads better than a heavy one on light. */
:root[data-theme="light"] .card,
:root[data-theme="light"] .pricing-card { box-shadow: 0 1px 2px rgba(16,24,40,.04); }

/* Header theme toggle (upper-right). */
.theme-toggle {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  padding: 6px; display: inline-flex; align-items: center; border-radius: 8px;
}
.theme-toggle:hover { color: var(--text); background: var(--panel-2); }

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--panel-2); padding: 2px 6px; border-radius: 6px; }

.container { width: 100%; max-width: 880px; margin: 0 auto; padding: 32px 20px; flex: 1; }
.container-home { max-width: 1080px; }

/* Header / footer */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border); background: var(--panel);
}
.site-header .brand { display: inline-flex; align-items: center; gap: 13px; font-weight: 700; font-size: 1.1rem; color: var(--text); }
.site-header .brand:hover { text-decoration: none; }
.brand-logo { width: 28px; height: 28px; flex: none; border-radius: 7px; }
.site-header nav { display: flex; align-items: center; gap: 18px; }

/* Hamburger toggle — hidden on desktop, shown on narrow screens. */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; flex: none;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
}
.nav-toggle:hover { background: var(--bg); }
.nav-toggle-bar {
  display: block; width: 100%; height: 2px; border-radius: 2px; background: var(--text);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-footer {
  padding: 20px; color: var(--muted);
  border-top: 1px solid var(--border); font-size: .9rem;
  display: flex; flex-wrap: wrap; gap: 10px 0;
  align-items: center; justify-content: center;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.footer-build { opacity: .6; font-variant-numeric: tabular-nums; }
/* Vertical bar between each footer element. */
.site-footer > * + * {
  margin-left: 20px; padding-left: 20px;
  border-left: 1px solid var(--border);
}
/* Trademark / non-affiliation notice under the footer row. */
.footer-disclaimer {
  max-width: 760px; margin: 0 auto; padding: 0 20px 24px;
  text-align: center; color: var(--muted); opacity: .7;
  font-size: .78rem; line-height: 1.5;
}

/* Legal pages (Terms / Privacy / AUP) — readable prose column. */
.legal { max-width: 760px; margin: 0 auto; }
.legal h1 { margin-bottom: 4px; }
.legal h2 { margin-top: 28px; font-size: 1.15rem; }
.legal p, .legal li { line-height: 1.6; }
.legal ul { padding-left: 22px; }
.legal li { margin: 4px 0; }

/* Buttons */
.btn {
  display: inline-block; background: var(--accent-2); color: #fff; border: none;
  padding: 10px 18px; border-radius: var(--radius); font-size: 1rem; cursor: pointer;
  font-weight: 600; transition: filter .15s ease;
  /* Normalize so <a class="btn"> matches <button class="btn"> exactly. */
  line-height: 1.4; box-sizing: border-box; vertical-align: middle; text-align: center;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:disabled, .btn[disabled] { opacity: .4; cursor: not-allowed; filter: none; }
.btn-large { padding: 13px 24px; font-size: 1.05rem; }
.btn-small { padding: 6px 12px; font-size: .9rem; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-start { background: var(--accent); }
/* Fixed bright amber (not --warn, which darkens in light mode and muddied the
   dark button text). Dark text on bright amber reads clearly in both themes. */
.btn-warn { background: #e6a700; color: #1a1a1a; }
.btn-stop { background: var(--danger); }
.link-btn { background: none; border: none; color: var(--accent-2); cursor: pointer; font-size: 1rem; padding: 0; }
form.inline { display: inline; }

/* Hero */
.hero { text-align: center; padding: 48px 0 24px; }
.hero h1 { font-size: 2.6rem; margin: 0 0 16px; line-height: 1.15; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 560px; margin: 0 auto 28px; }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Hero layout (homepage) — single full-width column now that the fake
   product-panel visual is gone. The lead keeps its own readable max-width. */
.hero-layout { text-align: left; }

/* Marketing/SEO pages (hosting/<type>, alternatives/<name>): a centered hero —
   heading, lead, then one clear CTA — rather than a wide left/right split. */
.mkt-hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 14px; max-width: 720px; margin: 0 auto;
}
.mkt-hero-cta { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mkt-hero-cta .hero-demo { align-items: center; }

/* Hero "voxel" backdrop (A/B variant hero_background=voxel) — a faint block grid
   that nods to Minecraft without any copyrighted art, masked so it fades out
   behind the hero copy and never fights the CTA. */
.hero-has-voxel { position: relative; isolation: isolate; }
.hero-voxel {
  position: absolute; inset: -1px; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--accent) 16%, transparent) 1.5px, transparent 1.5px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, transparent) 1.5px, transparent 1.5px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(140% 120% at 80% -10%, #000 0%, #000 18%, transparent 85%);
  mask-image: radial-gradient(140% 120% at 80% -10%, #000 0%, #000 18%, transparent 85%);
}
.hero-copy .lead { margin-left: 0; margin-right: 0; max-width: 540px; }
.hero-copy .cta-row { justify-content: flex-start; }
.hero-copy .hero-trust { justify-content: flex-start; }
.hero-copy .hero-demo { align-items: flex-start; }
.hero-art { display: flex; justify-content: center; }
.panel-preview {
  width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; text-align: left; box-shadow: 0 12px 30px rgba(0,0,0,.28);
}
.pp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pp-name { font-weight: 600; font-size: .95rem; }
.pp-pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  background: rgba(76,175,80,.14); color: var(--accent);
  font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px;
}
.pp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.pp-stats > div { background: var(--panel-2); border-radius: 10px; padding: 9px 10px; }
.pp-k { display: block; color: var(--muted); font-size: .72rem; }
.pp-v { display: block; font-size: 1.05rem; font-weight: 600; margin-top: 2px; }
.pp-console {
  margin: 0; background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 12px; font-size: .78rem; line-height: 1.7; color: var(--muted);
  white-space: pre-wrap; overflow: hidden;
}
.pp-t { color: var(--accent); }
.pp-actions { display: flex; gap: 8px; margin-top: 12px; }
.pp-actions span {
  flex: 1; text-align: center; font-size: .78rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 0;
}

/* Trust strip */
.trust-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-top: 36px;
}
.trust-item {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; text-align: center;
}
.trust-item strong { display: block; font-size: 1.2rem; color: var(--text); }
.trust-item span { display: block; color: var(--muted); font-size: .85rem; margin-top: 3px; }

@media (max-width: 760px) {
  .hero-layout { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .hero-copy .lead { margin-left: auto; margin-right: auto; }
  .hero-copy .cta-row, .hero-copy .hero-trust { justify-content: center; }
  .hero-copy .hero-demo { align-items: center; }
  .hero-art { order: 2; }
}

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 40px; }
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.card h3 { margin: 0 0 8px; }
.card p { color: var(--muted); margin: 0; }

/* Plan cards (homepage + hosting "plans that run X"): the grid already makes
   them equal height, so make each a column and push the CTA to the bottom — that
   way the buttons line up across cards even when the spec line wraps differently. */
.plan-strip .card { display: flex; flex-direction: column; }
.plan-strip .card .btn { margin-top: auto; align-self: flex-start; }
.plan-strip .card p { margin-bottom: 16px; }

/* Homepage feature-card icon badges */
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; margin-bottom: 16px;
  border-radius: 14px; border: 1px solid var(--border);
}
.feature-icon svg { width: 30px; height: 30px; display: block; }
.fi-ram  { color: #4caf50; background: rgba(76, 175, 80, .14); }
.fi-disk { color: #6c8cff; background: rgba(108, 140, 255, .14); }
.fi-up   { color: #e6a700; background: rgba(230, 167, 0, .14); }

/* Auth forms */
.auth-card {
  max-width: 420px; margin: 24px auto; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
}
.auth-card h1 { margin-top: 0; }

/* Passkeys */
.auth-divider {
  display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--muted);
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn-passkey { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.passkey-icon { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.passkey-msg { margin-top: 10px; }
.account-head { margin-bottom: 18px; }
.account-head h1 { margin-bottom: 4px; }
.passkey-list { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.passkey-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px;
}
.passkey-meta { display: flex; flex-direction: column; gap: 2px; }
.passkey-row form { margin: 0; }
.passkey-add { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.passkey-add input[type=text] {
  flex: 1; min-width: 200px; margin-top: 0; padding: 10px 12px; font-size: 1rem;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; color: var(--text);
}
.passkey-add input[type=text]:focus { outline: none; border-color: var(--accent-2); }
.passkey-add input[type=text]::placeholder { color: var(--muted); }
.passkey-add .btn { flex: none; }
.account-section + .account-section { margin-top: 18px; }
.password-form { max-width: 380px; }
form label { display: block; margin-bottom: 16px; font-weight: 600; }
form input[type=email], form input[type=password], form input[type=text] {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 1rem; font-weight: 400;
}

/* Visible keyboard-focus ring for every interactive control (WCAG 2.4.7).
   :where() keeps the base rule at specificity 0 so component colors still win;
   the explicit selectors re-assert a ring on inputs that clear their outline. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
.passkey-add input[type=text]:focus-visible,
.egg-search:focus-visible,
form input:focus-visible, form select:focus-visible, form textarea:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 1px;
  border-color: var(--accent-2);
}

.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* Flash messages */
.flashes { margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.flash { padding: 12px 16px; border-radius: 8px; border: 1px solid var(--border); }
.flash-success { background: rgba(76,175,80,.12); border-color: var(--accent); }
.flash-error { background: rgba(224,82,96,.12); border-color: var(--danger); }
.flash-info { background: var(--panel-2); }

/* Destructive-action confirm dialog (controls.js; replaces native confirm()).
   A <dialog> opened with showModal() — lives in the top layer so it sits above
   other modals (e.g. the server-settings dialog) without z-index juggling. */
.confirm-dialog {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: calc(100% - 40px); max-width: 420px; margin: 0;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 22px 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, .4);
}
.confirm-dialog::backdrop { background: rgba(8, 10, 15, .6); }
.confirm-msg { margin: 0 0 18px; color: var(--text); line-height: 1.5; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Dashboard */
.dash-head { margin-bottom: 20px; }
.dash-head h1 { margin-bottom: 4px; }
.empty-state { text-align: center; }
.empty-state form { max-width: 340px; margin: 18px auto 0; text-align: left; }
.server-card .status-row { display: flex; align-items: center; gap: 14px; }
.server-card .status-row h2 { margin: 0; }
.connect { font-size: 1.05rem; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.metrics dt { color: var(--muted); font-size: .85rem; }
.metrics dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 600; }
.power-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.eula-note { margin: 4px 2px 0; }
.eula-note a { color: var(--accent); }

/* Signup honeypot — off-screen, not display:none (some bots skip hidden fields). */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* State badge */
.state-badge { padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 700; text-transform: uppercase; }
.state-running { background: rgba(76,175,80,.18); color: #7ddc81; }
.state-starting, .state-stopping { background: rgba(230,167,0,.18); color: #f0c75e; }
.state-offline, .state-stopped { background: rgba(224,82,96,.18); color: #f08a94; }
.state-installing { background: rgba(91,140,255,.18); color: #93b3ff; }
.state-unknown { background: var(--panel-2); color: var(--muted); }
/* Light mode: the dark-tuned tints wash out on white, so use solid colours with
   white text (placed after the base rules so they win the cascade). */
:root[data-theme="light"] .state-running { background: #1e7e34; color: #fff; }
:root[data-theme="light"] .state-starting,
:root[data-theme="light"] .state-stopping { background: #9a6a00; color: #fff; }
:root[data-theme="light"] .state-offline,
:root[data-theme="light"] .state-stopped { background: #c1374c; color: #fff; }
:root[data-theme="light"] .state-installing { background: #3457b8; color: #fff; }

/* Cards stack with a gap on the dashboard */
.server-card, .panel-card, .danger-zone { margin-bottom: 18px; }
.panel-card h2, .danger-zone h2 { margin-top: 0; }
.panel-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.danger-zone { border-color: rgba(224,82,96,.4); }

/* Panel credentials block */
.panel-creds { margin: 6px 0 14px; }
.panel-creds dl { display: grid; gap: 8px; margin: 0 0 8px; }
.panel-creds dt { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.panel-creds dd { margin: 2px 0 0; }
.panel-creds code { font-size: 1rem; word-break: break-all; }

/* Console link on the dashboard */
.console-link { margin: 16px 0 4px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Console power buttons */
.console-power { margin-bottom: 16px; }

/* File manager */
.files-head { margin-bottom: 18px; }
.back-link { display: inline-block; margin-bottom: 12px; }
.path-pill { background: var(--panel-2); padding: 6px 12px; border-radius: 8px; word-break: break-all; font-size: .9rem; }
.edit-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.edit-titlebar h1 { margin: 0; font-size: 1.5rem; }

/* Files bar: breadcrumb + actions */
.files-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 1.05rem; }
.breadcrumb .crumb { color: var(--accent-2); }
.breadcrumb .current { color: var(--text); font-weight: 600; }
.breadcrumb .sep { color: var(--muted); }
.files-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.files-actions label.btn { cursor: pointer; }
.btn-locked { opacity: .75; }
.lock-badge {
  display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--border);
  font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
}

/* File listing table */
.files-card { padding: 4px 0; }
.files-table { width: 100%; border-collapse: collapse; }
.files-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.files-table tr:last-child td { border-bottom: none; }
.file-row:hover { background: var(--panel-2); }
.fname a { color: var(--text); }
.fname a:hover { color: var(--accent-2); text-decoration: none; }
.files-table .num { text-align: right; white-space: nowrap; color: var(--muted); width: 1%; }
.files-table .modified { white-space: nowrap; }
.empty-row { text-align: center; padding: 18px; }

/* Row actions: subtle, emphasised on row hover */
.row-actions { text-align: right; white-space: nowrap; width: 1%; }
.row-actions > .link-btn, .row-actions > form.inline { opacity: .4; transition: opacity .12s ease; }
.row-actions > form.inline { display: inline; margin-left: 14px; }
.file-row:hover .row-actions > .link-btn,
.file-row:hover .row-actions > form.inline { opacity: 1; }
.link-danger { color: var(--danger); }
.zone-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* Text editor */
.file-editor {
  width: 100%; min-height: 55vh; resize: vertical; box-sizing: border-box;
  background: #0b0d13; color: #cdd3df; border: 1px solid var(--border); border-radius: 8px;
  padding: 14px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .86rem; line-height: 1.5; white-space: pre; tab-size: 2;
}
.editor-actions { display: flex; gap: 10px; margin-top: 14px; }

/* Live console page */
.console-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.console-head h1 { margin: 6px 0 0; font-size: 1.5rem; }
.console-wrap { padding: 0; overflow: hidden; }
.console-heading { margin: 6px 2px 10px; font-size: 1.2rem; }
.console-output {
  margin: 0; padding: 16px; height: 60vh; min-height: 320px; overflow-y: auto;
  background: #0b0d13; color: #cdd3df; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .86rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word;
  border-bottom: 1px solid var(--border);
}
.console-input { display: flex; align-items: center; gap: 8px; padding: 12px 14px; }
.console-input .prompt { color: var(--accent); font-family: ui-monospace, monospace; font-weight: 700; }
.console-input input {
  flex: 1; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 9px 12px; font-family: ui-monospace, monospace; font-size: .9rem;
}
.console-input input:disabled { opacity: .6; }

/* Loading overlay + spinner */
.loading-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(8,10,15,.72); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
}
.loading-overlay[hidden] { display: none; }
.loading-box {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 36px; text-align: center; color: var(--text);
}
.loading-box p { margin: 14px 0 0; }
.spinner {
  width: 40px; height: 40px; margin: 0 auto; border-radius: 50%;
  border: 4px solid var(--border); border-top-color: var(--accent-2);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Wide layout (dashboard / manage / plans) ============================ */
.container-wide { max-width: 1180px; }

/* Plan summary bar */
.plan-bar { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 26px; }
.plan-bar-main { display: flex; align-items: baseline; gap: 12px; }
.plan-label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.plan-name { margin: 0; font-size: 1.4rem; }
.plan-meta { color: var(--accent); font-weight: 600; }
.plan-bar-stats { display: flex; gap: 28px; }
.plan-bar-stats > div { display: flex; flex-direction: column; }
.stat-num { font-size: 1.15rem; font-weight: 700; }
.stat-label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }

.dash-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 8px 0 18px; }
.dash-section-head h1 { margin: 0; font-size: 1.6rem; }
.new-server-form { max-width: 420px; margin-bottom: 22px; }
.new-server-form .form-actions { display: flex; gap: 10px; margin-top: 4px; }

/* Server grid (hub) */
.server-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; align-items: start; }
.server-card { display: flex; flex-direction: column; gap: 14px; }
.server-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.server-card-head h3 { margin: 0; font-size: 1.25rem; }
.server-card-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.type-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
  font-size: .75rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap;
}
.server-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.card-links { display: flex; gap: 8px; }
.card-status { min-height: 64px; }

/* Edit (gear) → modal dialog on the server card */
.btn-game { background: var(--accent-2); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; flex: none;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px;
  color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.icon-btn:hover { color: var(--accent-2); border-color: var(--accent-2); background: var(--panel); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* The card's settings gear is the primary per-server control, so it's a touch
   larger and accent-tinted by default (the shared close button stays subtle). */
.icon-btn.card-gear {
  width: 38px; height: 38px;
  color: var(--accent-2); border-color: var(--accent-2);
  background: var(--panel);
}
.icon-btn.card-gear:hover { background: var(--accent-2); color: #fff; }
.icon-btn.card-gear svg { width: 20px; height: 20px; }
.edit-dialog {
  border: none; background: var(--panel); color: var(--text);
  border-radius: 16px; padding: 0; width: 520px; max-width: 92vw;
  /* Anchor near the top of the viewport so switching tabs (which changes the
     content height) doesn't re-center the dialog and make the tab bar jump.
     Only the body below resizes, and it has a floor + scroll (see .edit-dialog-body). */
  margin: 8vh auto auto;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
  /* Fade + lift in/out (degrades to instant on older browsers). */
  opacity: 0; transform: translateY(10px) scale(.97);
  transition: opacity .18s ease, transform .18s ease,
              overlay .18s ease allow-discrete, display .18s ease allow-discrete;
}
.edit-dialog[open] { opacity: 1; transform: none; }
@starting-style { .edit-dialog[open] { opacity: 0; transform: translateY(10px) scale(.97); } }
.edit-dialog::backdrop {
  background: rgba(8, 10, 16, .55); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .18s ease, overlay .18s ease allow-discrete, display .18s ease allow-discrete;
}
.edit-dialog[open]::backdrop { opacity: 1; }
@starting-style { .edit-dialog[open]::backdrop { opacity: 0; } }

.edit-dialog-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.edit-dialog-head h3 { margin: 0; font-size: 1.05rem; }
/* A height floor keeps the dialog near-constant between tabs (so it barely
   resizes), and overflow lets an unusually tall tab scroll instead of growing
   off-screen. Combined with the top anchor above, the tab bar never moves. */
.edit-dialog-body { padding: 4px 18px 14px; min-height: 250px; max-height: 62vh; overflow-y: auto; }
.edit-dialog-body form { margin: 0; }

/* Tabbed sections inside the server-settings dialog. */
.edit-tabs {
  display: flex; gap: 2px; padding: 0 12px; overflow-x: auto;
  border-bottom: 1px solid var(--border);
}
.edit-tab {
  appearance: none; background: none; border: none; cursor: pointer;
  padding: 11px 12px; margin-bottom: -1px; font: inherit; font-size: .85rem;
  font-weight: 600; color: var(--muted); white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.edit-tab:hover { color: var(--text); }
.edit-tab.is-active { color: var(--accent-2); border-bottom-color: var(--accent-2); }
.edit-panel[hidden] { display: none; }

.edit-section { padding: 14px 0; border-bottom: 1px solid var(--border); }
.edit-section:last-child { border-bottom: none; padding-bottom: 2px; }
.edit-section-label {
  margin: 0 0 9px; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted);
}

.edit-rename { display: flex; gap: 8px; }
.edit-rename input[type=text] { flex: 1; margin-top: 0; }
.edit-rename .btn { flex: none; }

/* Subdomain (custom address) editor in the server card's edit dialog. */
.edit-subdomain { display: flex; gap: 8px; align-items: stretch; }
.edit-subdomain .btn { flex: none; }
.subdomain-field {
  flex: 1; display: flex; align-items: stretch; min-width: 0;
  border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2);
  overflow: hidden;
}
.subdomain-field input[type=text] {
  flex: 1; min-width: 0; margin-top: 0; border: none; background: transparent;
  border-radius: 0; text-align: right;
}
.subdomain-field input[type=text]:focus { outline: none; }
.subdomain-field:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2) inset; }
.subdomain-suffix {
  display: flex; align-items: center; padding: 0 10px 0 2px;
  color: var(--muted); font-size: .9rem; white-space: nowrap; background: transparent;
}

.edit-resize-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.edit-resize label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .85rem; }
.edit-resize select {
  width: 100%; padding: 9px 10px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: .95rem;
}
.edit-resize .btn { width: 100%; }

.edit-actions { display: flex; gap: 10px; }
.edit-actions form { flex: 1; }
.edit-actions .btn { width: 100%; }

/* Shared by the admin manage page's rename form. */
.rename-form { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.rename-form input[type=text] { flex: 1; margin-top: 0; }

/* Status row + connect address */
.status-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.connect-addr { background: var(--panel-2); padding: 3px 10px; border-radius: 6px; font-size: .9rem; }
.copy-addr {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
  font: 600 .76rem system-ui, sans-serif; padding: 4px 9px; border-radius: 6px; cursor: pointer;
  transition: color .12s ease, border-color .12s ease;
}
.copy-addr:hover { color: var(--text); border-color: var(--accent-2); }
.copy-addr.copied { color: var(--accent); border-color: var(--accent); }

/* Manage page two-column */
.manage-head { margin-bottom: 18px; }
.manage-head h1 { margin: 8px 0 0; font-size: 1.7rem; }
.manage-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
.manage-main { display: flex; flex-direction: column; gap: 18px; }
.tool-row { display: flex; gap: 10px; flex-wrap: wrap; }
.panel-recommend h2 { margin-top: 0; }
.panel-recommend p { margin-bottom: 16px; }

/* Pricing */
.plans-head { text-align: center; margin: 8px 0 30px; }
.plans-head h1 { font-size: 2.1rem; margin-bottom: 8px; }
.plans-head p { max-width: 540px; margin: 0 auto; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; align-items: stretch; max-width: 1180px; margin: 0 auto; padding-top: 14px; }

.pricing-card {
  position: relative; display: flex; flex-direction: column; text-align: center;
  padding: 30px 26px; border-radius: 16px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.pricing-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,.35); }

.pricing-card.is-popular {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 1px var(--accent-2) inset, 0 14px 38px rgba(108,140,255,.18);
}
.pricing-card.is-popular:hover { box-shadow: 0 0 0 1px var(--accent-2) inset, 0 22px 48px rgba(108,140,255,.28); }
.pricing-card.is-current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

.popular-ribbon {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent-2); color: #fff; font-size: .72rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; padding: 5px 16px; border-radius: 999px;
  white-space: nowrap; box-shadow: 0 4px 12px rgba(108,140,255,.4);
}
.current-pill {
  position: absolute; top: 14px; right: 14px; background: #4caf50; color: #06250a;
  font-size: .68rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; text-transform: uppercase;
}
.soon-ribbon {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: #e6a700; color: #1a1a1a; font-size: .72rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; padding: 5px 16px; border-radius: 999px;
  white-space: nowrap; box-shadow: 0 4px 12px rgba(230,167,0,.35);
}
.pricing-card.is-soon { opacity: .8; }
.pricing-card.is-soon:hover { transform: none; box-shadow: none; }

.plan-title { margin: 6px 0 10px; font-size: 1.35rem; }
.price { margin-bottom: 6px; line-height: 1; }
.price-amount { font-size: 2.9rem; font-weight: 800; letter-spacing: -.02em; }
.price-per { color: var(--muted); font-size: 1rem; font-weight: 600; margin-left: 2px; }
/* Monthly-equivalent of a multi-month (quarterly) price. */
.price-monthly { display: block; margin-top: 4px; font-size: .82rem; font-weight: 400; color: var(--muted); }
/* Reserve two lines so a 1-line description doesn't push its card's feature
   list up out of alignment with the 2-line ones (keeps the rows lined up like
   a table across cards). */
.plan-desc { min-height: 54px; margin-top: 4px; }

.feature-list { list-style: none; padding: 0; margin: 18px 0 24px; text-align: left; }
.feature-list li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--border); color: var(--muted); line-height: 1.4; }
.feature-list li:last-child { border-bottom: none; }
.feature-list li strong { color: var(--text); }
.feature-list .tick { color: var(--accent); font-weight: 800; flex: none; width: 1.3em; text-align: center; }
.feature-list .tick-muted { color: var(--warn); }

/* Free-plan idle note (dashboard) */
.idle-note {
  background: var(--panel-2); border: 1px solid var(--border); border-left: 3px solid var(--warn);
  border-radius: 8px; padding: 12px 16px; color: var(--muted); margin: -8px 0 22px;
}
.idle-note strong { color: var(--text); }

.plan-cta { margin-top: auto; }
.plan-cta .btn, .plan-cta form { width: 100%; }
.portal-link { margin-top: 10px; }
.portal-link .link-btn { width: auto; }
.plans-note { text-align: center; margin-top: 26px; }

/* ===== Build a server page ================================================= */
.build-head { margin-bottom: 26px; }
.build-head h1 { margin: 8px 0 6px; font-size: 1.8rem; }
.build-form { max-width: 840px; }
.build-step { margin-bottom: 30px; }
.step-label { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin: 0 0 14px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-2); color: #fff; font-size: .9rem; font-weight: 700; flex: none; }

.egg-search {
  width: 100%; max-width: 400px; margin: 0 0 14px; padding: 10px 14px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 1rem;
}
/* Scrollable picker sized to ~3 rows; the rest scroll into view. */
.egg-scroll {
  max-height: 31rem; overflow-y: auto; overflow-x: hidden;
  padding: 6px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg);
}
.egg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.egg-card[hidden] { display: none; }
.egg-empty { padding: 18px 6px 8px; text-align: center; }
.egg-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--panel); cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.egg-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.egg-card input { position: absolute; opacity: 0; pointer-events: none; }
.egg-card.selected { border-color: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2) inset; }
/* Types the current plan can't run (not enough RAM) — shown as a locked upsell. */
.egg-card.locked { opacity: .55; cursor: not-allowed; }
.egg-card.locked:hover { transform: none; box-shadow: none; }
.egg-lock { margin-left: 6px; font-style: normal; font-size: .66rem; font-weight: 700; text-transform: uppercase; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; vertical-align: middle; white-space: nowrap; }
.egg-icon { line-height: 0; }
.egg-icon svg { width: 42px; height: 42px; display: block; }
.egg-name { font-weight: 700; font-size: 1.05rem; }
.egg-rec { margin-left: 6px; font-style: normal; font-size: .66rem; font-weight: 700; text-transform: uppercase; color: var(--accent-2); border: 1px solid var(--accent-2); border-radius: 999px; padding: 1px 7px; vertical-align: middle; }
.egg-desc {
  color: var(--muted); font-size: .9rem;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.egg-check { position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-2); color: #fff; display: none; align-items: center; justify-content: center; font-size: .78rem; font-weight: 800; }
.egg-card.selected .egg-check { display: flex; }
@media (max-width: 820px) { .egg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .egg-grid { grid-template-columns: 1fr; } }

.build-name { width: 100%; max-width: 400px; padding: 11px 14px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 1rem; }
.build-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.summary-plan { font-weight: 700; font-size: 1.05rem; }

/* Resize form (manage page) */
.resize-card h2 { margin-top: 0; }
.resize-form { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin: 10px 0; }
.resize-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
.resize-form select { padding: 9px 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 1rem; min-width: 120px; }

/* ===== Admin console ====================================================== */
.admin-head { margin-bottom: 20px; }
.admin-head h1 { margin-bottom: 4px; }
.admin-stats { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.stat-card {
  flex: 1; min-width: 130px; display: flex; flex-direction: column; gap: 2px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px;
  text-align: left; font: inherit; color: inherit; cursor: pointer; text-decoration: none;
  transition: border-color .12s ease, box-shadow .12s ease, transform .08s ease;
}
.stat-card:hover { border-color: var(--accent-2); }
.stat-card:active { transform: translateY(1px); }
.stat-card .stat-num { font-size: 1.7rem; font-weight: 800; }
.stat-card .stat-sub { font-size: 1rem; font-weight: 600; color: var(--muted); }
.stat-card.stat-warn { border-color: var(--warn); }
.stat-card.stat-warn .stat-num { color: var(--warn); }

.admin-table-card { padding: 4px 0; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th { text-align: left; padding: 10px 14px; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .num { text-align: right; }
.admin-table .mono { font-family: ui-monospace, monospace; }
.admin-table [data-copy] { cursor: pointer; }
.admin-table [data-copy]:hover { color: var(--text); }
.admin-table .row-flagged { background: rgba(230,167,0,.07); }
/* Soft-deleted server rows in the admin server list: kept for the record, but dimmed
   and muted so they read as inactive. */
.admin-table .row-deleted { opacity: .6; }
.admin-table .row-deleted td:first-child,
.admin-table .row-deleted td:nth-child(2) { text-decoration: line-through; text-decoration-color: var(--muted); }
/* Source badges in the power-event audit log. */
.source-badge {
  display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; border: 1px solid var(--border); color: var(--muted);
  text-transform: capitalize;
}
.source-badge.source-admin { color: #f0c75e; border-color: rgba(230,167,0,.4); background: rgba(230,167,0,.12); }
.source-badge.source-idle { color: var(--muted); }
.source-badge.source-share { color: var(--accent-2); border-color: var(--accent-2); }
.source-badge.source-demo { color: var(--accent); border-color: var(--accent); }
.flag-badge { display: inline-block; background: rgba(230,167,0,.18); color: #f0c75e; border: 1px solid rgba(230,167,0,.4); font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-right: 4px; }
.ok-dot { color: var(--accent); font-size: .8rem; }
/* Live player count per server (polled via the Minecraft Server List Ping). */
.players-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: .82rem;
  font-weight: 700; padding: 2px 9px 2px 7px; border-radius: 999px;
  border: 1px solid var(--border);
}
.players-badge .players-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.players-online { background: rgba(76,175,80,.16); color: #4caf50; border-color: rgba(76,175,80,.4); }
.players-online .players-dot { background: #4caf50; box-shadow: 0 0 0 3px rgba(76,175,80,.18); }
/* Dark-theme green text fails AA on the light composited fill — darken it. */
:root[data-theme="light"] .players-online { background: #e3f3e5; color: #1e7e34; border-color: #9bd3a3; }
.players-empty { color: var(--muted); }
.players-empty .players-dot { background: var(--muted); opacity: .6; }
.players-names {
  margin-top: 3px; max-width: 220px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
/* Node resource-usage bars (admin nodes view). */
.usage { min-width: 150px; }
.usage-bar {
  height: 8px; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 999px; overflow: hidden;
}
.usage-fill { display: block; height: 100%; background: var(--accent); }
.usage-fill.usage-high { background: var(--warn); }
.usage-text { display: block; margin-top: 4px; }
.usage-live { display: block; margin-top: 1px; opacity: .85; }
.admin-table-note { padding: 8px 14px 2px; margin: 0; }
/* Control-plane host row on the nodes page — set apart from the Wings workers. */
.admin-table tr.node-host { background: rgba(125,125,255,.06); }
.admin-table tr.node-host td:first-child { box-shadow: inset 3px 0 0 var(--accent-2); }
/* Admin console sub-navigation (separate pages replaced the old in-page tabs). */
.admin-subnav {
  display: flex; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 22px;
  border-bottom: 1px solid var(--border); padding-bottom: 12px;
}
.admin-subnav a {
  padding: 6px 12px; border-radius: 999px; font-size: .86rem; font-weight: 600;
  color: var(--muted); text-decoration: none; border: 1px solid transparent;
  transition: color .12s ease, background .12s ease, border-color .12s ease;
}
.admin-subnav a:hover { color: var(--text); background: var(--panel); }
.admin-subnav a.is-active {
  color: var(--text); background: var(--panel); border-color: var(--accent-2);
}
/* Player-traffic analytics page (/admin/players). */
.players-card { padding: 16px 20px 20px; }
.players-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  justify-content: space-between; margin-bottom: 8px;
}
.players-stats { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.players-stats strong { font-size: 1.05rem; }
.players-range { display: flex; gap: 6px; }
.players-chart-title { font-size: .95rem; margin: 22px 0 6px; }
.players-chart { width: 100%; height: auto; display: block; }
.players-axis { fill: var(--muted); font-size: 12px; }

/* Inline plan override in the admin users table. */
.admin-plan-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.admin-plan-form select {
  padding: 5px 8px; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: .85rem;
}

/* Add-user form at the top of the admin users view. */
.admin-add-user {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px 14px 4px; margin: 0;
}
.admin-add-user input,
.admin-add-user select {
  padding: 7px 10px; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: .9rem;
}
.admin-add-user .admin-add-email { flex: 1 1 240px; min-width: 0; }
.admin-add-note { padding: 0 14px 8px; margin: 0; }

/* Inline re-assign-owner control in the admin servers table. */
.admin-row-actions { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-reassign-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.admin-reassign-email {
  width: 150px; max-width: 150px; padding: 5px 8px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: .85rem;
}

/* ===== Demo servers ======================================================= */
.demo-cta { margin-top: 18px; }
.btn-demo { background: var(--accent); }
/* Prominent primary hero CTA (the low-friction "try a demo" path). */
.btn-hero { padding: 16px 34px; font-size: 1.25rem; box-shadow: 0 8px 24px rgba(76, 175, 80, .3); }
.hero-demo { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; margin: 0; }
.g-recaptcha { margin: 8px 0; }
.verify-form { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 4px; }
.hero .demo-sub { margin: 12px 0 22px; }
.cta-secondary .btn { padding: 9px 18px; font-size: .95rem; }
/* Demo teaser panel beneath the pricing grid — aligned to the grid's width. */
.demo-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap; max-width: 1180px; margin: 24px auto 0; border-left: 4px solid var(--accent);
}
.demo-panel h2 { margin: 0 0 6px; }
.demo-panel-text { max-width: 640px; }
.demo-panel-text p { margin: 0; }
.demo-panel-cta { flex-shrink: 0; }

/* Plan waitlist (coming-soon tiers). */
.waitlist-form { display: flex; flex-direction: column; gap: 8px; }
.waitlist-card {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap; margin-top: 24px; border-left: 4px solid var(--accent-2);
}
.waitlist-card h2 { margin: 0 0 6px; }
.waitlist-text { max-width: 640px; }
.waitlist-text p { margin: 0; }
.waitlist-cta { flex-shrink: 0; }

/* Email-confirmation prompt on the dashboard. */
.verify-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap; margin-top: 18px; border-left: 4px solid var(--warn);
}
.verify-text p { margin: 4px 0 0; }

/* "Need help?" support banner at the foot of the dashboard. */
.support-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap; margin-top: 28px; border-left: 4px solid var(--accent);
}
.support-banner-text strong { display: block; }
.support-banner-text p { margin: 4px 0 0; }
.support-banner-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.support-mail-btn { display: inline-flex; align-items: center; gap: 8px; }
.support-mail-icon { width: 18px; height: 18px; flex: none; }

/* Live-chat corner widget (see static/support-chat.js): a small docked window in
   the bottom-right that frames the standalone support chat. */
#cs-chat-widget {
  position: fixed; right: 20px; bottom: 20px; z-index: 1000;
  width: 384px; max-width: calc(100vw - 32px);
  height: 564px; max-height: calc(100vh - 90px);
  display: none; border-radius: 14px; overflow: hidden;
  background: var(--panel); box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
#cs-chat-widget.open { display: block; }
#cs-chat-widget iframe { width: 100%; height: 100%; border: none; display: block; }
.cs-chat-close {
  position: absolute; top: 9px; right: 10px; z-index: 2;
  width: 24px; height: 24px; padding: 0; border: none; border-radius: 7px; cursor: pointer;
  background: rgba(0, 0, 0, .35); color: #fff; font-size: 13px; line-height: 24px;
}
.cs-chat-close:hover { background: rgba(0, 0, 0, .55); }
@media (max-width: 440px) {
  #cs-chat-widget { right: 8px; bottom: 8px; width: calc(100vw - 16px); }
}

/* Post-checkout thank-you / conversion page. */
.success-page { max-width: 460px; margin: 48px auto; text-align: center; }
.success-page .success-emoji { font-size: 2.6rem; line-height: 1; }
.success-page h1 { margin: 10px 0 6px; }
.success-page .btn { margin-top: 18px; }
/* Thank-you banner shown to paid users (dismissible per plan). */
.plan-thanks {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 18px; padding: 14px 16px; border-radius: 12px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent);
  border: 1px solid var(--border); border-left: 4px solid var(--accent-2);
}
.plan-thanks-icon { font-size: 1.5rem; line-height: 1; }
.plan-thanks-text { flex: 1; min-width: 220px; }
.plan-thanks-text p { margin: 3px 0 0; }
.plan-thanks-close {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 1rem; padding: 4px 8px; border-radius: 8px; line-height: 1;
}
.plan-thanks-close:hover { color: var(--text); background: var(--panel-2); }
.demo-head { margin-bottom: 18px; }
.demo-head h1 { margin-bottom: 4px; }
.demo-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-bottom: 22px; border-left: 4px solid var(--accent);
}
.demo-banner p { margin: 4px 0 0; }
.demo-banner-cta { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.price-note { color: var(--muted); font-size: .85rem; }
.price-note strong { color: var(--accent); }
#demo-countdown { color: var(--accent); font-variant-numeric: tabular-nums; }

/* Inline "opens in a new tab" glyph that inherits the link's colour + size. */
.ext-icon {
  width: .82em; height: .82em; margin-left: 3px; vertical-align: -1px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.claim-card { border-color: var(--accent); }

@media (max-width: 820px) {
  .manage-grid { grid-template-columns: 1fr; }
  .server-grid { grid-template-columns: 1fr; }
  .plan-bar-stats { gap: 18px; }
}

/* Mobile nav: collapse the links behind a hamburger so each item is a big,
   easy-to-tap full-width row instead of a cramped horizontal strip. */
@media (max-width: 680px) {
  .site-header { position: relative; }
  .nav-toggle { display: flex; }
  .site-header nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 6px 0; background: var(--panel);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
  }
  .site-header nav.open { display: flex; }
  .site-header nav a,
  .site-header nav .link-btn {
    display: block; width: 100%; box-sizing: border-box;
    padding: 14px 24px; font-size: 1.05rem; text-align: left;
    color: var(--text); border-radius: 0;
  }
  .site-header nav a:hover,
  .site-header nav .link-btn:hover { background: var(--bg); text-decoration: none; }
  .site-header nav .inline { display: block; width: 100%; }
  /* The Sign-up CTA keeps its button look, full width within the menu. */
  .site-header nav .btn-small {
    margin: 8px 24px; padding: 12px 18px; width: auto;
    text-align: center; color: #fff;
  }
}
@media (max-width: 540px) {
  .hero h1 { font-size: 2rem; }
  .metrics { grid-template-columns: 1fr; }
  .plan-bar { gap: 14px; }
}

/* ---- Marketing pages (/hosting/*, /alternatives/*) + sitewide footer nav ---- */
.footer-nav {
  text-align: center; font-size: .85rem; color: var(--muted);
  padding: 14px 20px 0;
}
.footer-nav p { margin: 4px 0; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); text-decoration: underline; }
.footer-nav-label { opacity: .7; margin-right: 6px; }

.marketing-prose, .marketing-why, .marketing-faq, .plan-strip, .compare-section {
  margin: 48px 0;
}
.marketing-prose p { max-width: 70ch; }
.marketing-faq h3 { margin: 22px 0 6px; font-size: 1.05rem; }
.marketing-faq p { max-width: 70ch; margin-top: 0; }

.compare-table {
  width: 100%; border-collapse: collapse; font-size: .95rem;
}
.compare-table th, .compare-table td {
  padding: 12px 14px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.compare-table thead th { font-size: 1rem; }
.compare-table tbody th { color: var(--muted); font-weight: 600; white-space: nowrap; }
/* Wide comparison tables scroll horizontally on phones instead of forcing the
   whole page to overflow. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 540px) {
  .compare-table tbody th { white-space: normal; }
  .compare-table { font-size: .85rem; }
  .compare-table th, .compare-table td { padding: 9px 8px; }
}

/* Referral section on the account page. */
.referral-link-row { display: flex; gap: 8px; margin: 10px 0; }
.referral-link-row input {
  flex: 1; min-width: 0; font-variant-ligatures: none;
}

/* ---- Homepage: trust row, how-it-works steps, type links, bottom CTA ---- */
.hero-trust {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
  gap: 6px 22px; margin: 22px 0 0; padding: 0;
  color: var(--muted); font-size: .9rem;
}
.hero-trust li::before { content: "✓ "; color: var(--accent); }

.how-steps { margin: 56px 0; }
.how-steps h2, .type-links h2, .bottom-cta h2 { text-align: center; }
.steps {
  list-style: none; counter-reset: step;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px; margin: 28px 0 0; padding: 0;
}
.steps li {
  counter-increment: step;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.steps li::before {
  content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: .9rem;
  margin-bottom: 10px;
}
.steps h3 { margin: 0 0 8px; }
.steps p { color: var(--muted); margin: 0; }
.steps code { font-size: .85em; }

.type-links { margin: 56px 0; text-align: center; }
.type-links > p { margin: 8px auto; max-width: 70ch; }
.type-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 18px 0 10px; }

.bottom-cta { text-align: center; margin: 64px 0 28px; }

/* ---- Public share page (/s/<token>) + owner share controls ---------------- */
.share-head { margin-bottom: 18px; }
.share-head h1 { margin: 2px 0 6px; }
.share-eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .08em;
  font-size: .72rem; font-weight: 700; color: var(--accent);
}
.share-card { display: flex; flex-direction: column; gap: 14px; }
.share-status-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.player-count { font-size: 1.05rem; color: var(--text); }
.player-count strong { font-size: 1.25rem; }

.share-connect { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.share-connect .muted { white-space: nowrap; }

.player-roster { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.player-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.player-chip {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 12px; font-size: .85rem; color: var(--text);
}

.share-wake { margin-top: 4px; }
.share-wake p { margin: 8px 0 0; }
.share-join { margin-top: 18px; }
.share-cta { text-align: center; margin: 22px 0 8px; }

/* Owner-facing "Share with friends" controls (manage page + card dialog). */
.share-link-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.share-link-input {
  flex: 1 1 260px; min-width: 0; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 9px 12px;
  font-family: ui-monospace, monospace; font-size: .85rem;
}
.share-link-input:focus { outline: none; border-color: var(--accent-2); }
.share-owner h2 { margin-top: 0; }

/* Per-server Discord notifications card (manage page). */
.discord-card h2 { margin-top: 0; }
.discord-form { display: flex; flex-direction: column; gap: 14px; margin: 12px 0 6px; }
.discord-url-label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
.discord-url-label input {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 9px 12px;
  font-family: ui-monospace, monospace; font-size: .85rem;
}
.discord-url-label input:focus { outline: none; border-color: var(--accent-2); }
.discord-toggles { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.discord-toggles legend { padding: 0; margin-bottom: 2px; }
.discord-toggles .toggle-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .92rem; }
.discord-toggles .toggle-row input[type=checkbox] { margin-top: 3px; flex: 0 0 auto; accent-color: var(--accent-2); width: 16px; height: 16px; }
.discord-toggles .toggle-row .muted { font-weight: 400; }
.discord-form .btn { align-self: flex-start; }

/* Same controls inside the dashboard card's edit dialog (narrower). */
.edit-discord { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.edit-discord input[type=url] {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 8px 10px; width: 100%;
  font-family: ui-monospace, monospace; font-size: .8rem;
}
.edit-discord input[type=url]:focus { outline: none; border-color: var(--accent-2); }
.edit-discord .discord-toggles { gap: 8px; }
.edit-discord .toggle-row { font-size: .85rem; }
.edit-discord .btn { align-self: flex-start; }

/* ============================================================================
   VOXEL / GAMING THEME  (preview — not yet committed)
   A Minecraft-GUI-inspired skin layered over the base styles: blocky corners,
   chunky beveled buttons, hard (blur-free) drop shadows, a pixel display font
   for headings + UI chrome, and a faint block-grid page backdrop. Body copy
   stays in the readable sans for legibility. Works in both themes.
   ============================================================================ */
:root {
  --radius: 3px;                  /* blocky corners everywhere via the token */
  --pixel: 'Press Start 2P', 'Courier New', ui-monospace, monospace;
  --vox-edge: rgba(0,0,0,.45);    /* dark bevel edge on buttons */
  --vox-shadow: rgba(0,0,0,.38);  /* hard, blur-free drop shadow */
}
:root[data-theme="light"] {
  --vox-edge: rgba(0,0,0,.30);
  --vox-shadow: rgba(20,30,50,.20);
}

/* Faint voxel block-grid behind the whole page (fixed, non-interactive). */
body { position: relative; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--accent) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 7%, transparent) 1px, transparent 1px);
  background-size: 38px 38px;
}

/* Pixel display font for headings + UI chrome (short text only; body stays sans).
   Press Start 2P renders large + single-weight, so sizes are scaled down. */
h1, h2, h3, .brand, .plan-title, .price-amount, .step-label,
.build-head h1, .hero h1, .trust-item strong {
  font-family: var(--pixel);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.55;
}
.hero h1 { font-size: 1.6rem; line-height: 1.7; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.1rem; line-height: 1.6; }
h3 { font-size: .92rem; line-height: 1.6; }
.price-amount { font-size: 1.7rem; }
.trust-item strong { font-size: 1rem; }
.site-header .brand { font-size: .9rem; }
.brand-logo { border-radius: 2px; }

/* ---- Minecraft-style chunky beveled buttons ---- */
.btn {
  font-family: var(--pixel);
  font-size: .72rem; font-weight: 400; line-height: 1.5;
  border-radius: 2px;
  border: 2px solid var(--vox-edge);
  box-shadow:
    inset 2px 2px 0 rgba(255,255,255,.22),
    inset -2px -2px 0 rgba(0,0,0,.32),
    0 4px 0 var(--vox-shadow);
  transition: transform .05s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.1); }
.btn:active {
  transform: translateY(3px);
  box-shadow:
    inset 2px 2px 0 rgba(255,255,255,.18),
    inset -2px -2px 0 rgba(0,0,0,.32),
    0 1px 0 var(--vox-shadow);
}
.btn-large { font-size: .8rem; padding: 15px 24px; }
.btn-small { font-size: .6rem; padding: 9px 13px; }
.btn-ghost {
  border-color: var(--border);
  box-shadow:
    inset 2px 2px 0 rgba(255,255,255,.10),
    inset -2px -2px 0 rgba(0,0,0,.20),
    0 4px 0 var(--vox-shadow);
}
.link-btn { font-family: var(--pixel); font-size: .68rem; }

/* ---- Blocky panels: hard shadow, thicker border, square-ish corners ---- */
.card, .pricing-card, .trust-item, .auth-card, .demo-banner, .demo-panel,
.console-wrap, .file-editor, .files-card, .egg-card, .admin-table-card,
.compare-table, .feature-icon {
  border-radius: 3px;
  border-width: 2px;
  box-shadow: 0 4px 0 var(--vox-shadow);
}
.feature-icon { border-radius: 4px; box-shadow: none; }
:root[data-theme="light"] .card,
:root[data-theme="light"] .pricing-card { box-shadow: 0 4px 0 var(--vox-shadow); }

/* ---- Blocky inset inputs ---- */
form input[type=email], form input[type=password], form input[type=text],
.egg-search, .passkey-add input[type=text], .share-link-input {
  border-radius: 2px;
  border-width: 2px;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,.22);
}

/* ---- Squared pills / chips / ribbons / badges ---- */
.hero-trust li, .state-badge, .players-badge, .flag-badge, .player-chip,
.popular-ribbon, .current-pill, .soon-ribbon, .pp-pill, code, .step-num {
  border-radius: 2px;
}
.step-num { border-radius: 3px; }

/* ---- Pixel nav + section header borders ---- */
.site-header { border-bottom-width: 2px; }
.site-footer { border-top-width: 2px; }
.site-header nav a { font-family: var(--pixel); font-size: .6rem; }

/* ----------------------------------------------------------------------------
   VOXEL POLISH — finishing touches (preview)
   ---------------------------------------------------------------------------- */
:root { --vox-text-shadow: 2px 2px 0 rgba(0,0,0,.5); }
:root[data-theme="light"] { --vox-text-shadow: 2px 2px 0 rgba(0,0,0,.13); }

/* Minecraft's signature offset text-shadow on the pixel display type. */
h1, h2, h3, .brand, .plan-title, .price-amount, .step-label { text-shadow: var(--vox-text-shadow); }
.hero h1 { text-shadow: 3px 3px 0 rgba(0,0,0,.45); }
/* Button labels are white-on-colour, so a fixed dark shadow reads in both themes. */
.btn { text-shadow: 1px 1px 0 rgba(0,0,0,.45); }
.btn-ghost { text-shadow: var(--vox-text-shadow); }

/* HUD-style pixel numbers for stats / metrics. */
.stat-num, .metrics dd, .plan-name { font-family: var(--pixel); font-weight: 400; }
.metrics dd { font-size: .95rem; }
.stat-num { font-size: .9rem; }

/* Inventory-slot bevel: a faint inner highlight on top of the hard drop shadow
   (only visible on the dark panels; invisible on white, which is fine). */
.card, .pricing-card, .auth-card, .trust-item, .demo-banner, .demo-panel,
.server-card, .panel-card, .danger-zone {
  box-shadow: 0 4px 0 var(--vox-shadow), inset 1px 1px 0 rgba(255,255,255,.06);
}

/* Square the remaining pills + dashboard/file chips. */
.type-badge, .lock-badge, .path-pill, .pp-pill { border-radius: 2px; }

/* Console command input: squared + inset like the other fields. */
.console-input input {
  border-radius: 2px; border-width: 2px; box-shadow: inset 2px 2px 0 rgba(0,0,0,.22);
}
.console-output, .file-editor { border-radius: 3px; }

/* Loading dialog: blocky to match. */
.loading-box { border-radius: 3px; border-width: 2px; box-shadow: 0 6px 0 var(--vox-shadow); }

/* Green selection + a blocky scrollbar. */
::selection { background: var(--accent); color: #06210b; }
* { scrollbar-width: thin; scrollbar-color: var(--border) var(--panel); }
::-webkit-scrollbar { width: 13px; height: 13px; }
::-webkit-scrollbar-track { background: var(--panel); }
::-webkit-scrollbar-thumb { background: var(--border); border: 3px solid var(--panel); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-2); }

/* ---- Summer sale banner + sale pricing (warm sun theme; reads in both modes) ---- */
.summer-banner {
  display: flex; align-items: center; gap: 16px; max-width: 1180px; margin: 0 auto 22px;
  padding: 14px 20px; border-radius: 3px; border: 2px solid #e6a700;
  background: linear-gradient(100deg, #ff9d2e, #ffd23f);
  box-shadow: 0 4px 0 var(--vox-shadow);
}
.summer-banner .sun {
  width: 42px; height: 42px; flex: none; color: #fff7da;
  filter: drop-shadow(0 1px 0 rgba(120,70,0,.4)); animation: sun-spin 28s linear infinite;
}
@keyframes sun-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .summer-banner .sun { animation: none; } }
.summer-banner-text { display: flex; flex-direction: column; gap: 3px; }
.summer-banner-text strong { font-family: var(--pixel); font-size: .82rem; color: #2a1900; text-shadow: 1px 1px 0 rgba(255,255,255,.4); }
.summer-banner-text span { font-size: .9rem; color: #5a3c00; }

/* Upcoming (post-sale) price note under the current price. Fixed two-line height
   so the three plans' feature lists start at the same Y (the free card renders an
   invisible .is-blank copy to reserve the same space). */
.price-future { display: block; margin-top: 6px; min-height: 2.7em; color: var(--muted); font-size: .82rem; line-height: 1.35; }
.price-future::before { content: "↑ "; color: var(--warn); font-weight: 700; }
.price-future.is-blank { visibility: hidden; }

/* ============================================================================
   MINECRAFT SKY HEADER + DIRT FOOTER
   Bookends the page like a Minecraft world: a sky (with blocky clouds) up top,
   a grass-topped dirt ground at the bottom. Pure CSS + tiny inline-SVG textures
   — no external assets. Body text keeps the theme tokens, which already read on
   both skies, so only the surfaces change (and the mobile nav dropdown, which
   repaints over a panel background, is untouched).
   ============================================================================ */

/* ---- Sky header: dusk by default (dark theme), bright day sky in light ---- */
.site-header {
  position: relative;                 /* NOT overflow:hidden — would clip the
                                         absolute mobile nav dropdown. */
  background: linear-gradient(180deg, #16284c 0%, #20396a 60%, #2a4c80 100%);
  border-bottom: 3px solid #3f6f2c;   /* grassy horizon line under the sky */
}
:root[data-theme="light"] .site-header {
  background: linear-gradient(180deg, #74c4ff 0%, #a6dcff 60%, #c8ecff 100%);
  border-bottom-color: #5f9a3e;
}
/* A pixel sun on the left, with a few blocky clouds drifting toward the middle.
   Both sit behind the header content; clouds are masked so they fade out before
   the right side, keeping the nav links on clear sky. */
.site-header::after {                          /* the celestial body in the sky */
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  top: 50%; left: 30%; width: 30px; height: 30px; transform: translateY(-50%);
  border-radius: 8px;
  /* Default (dusk / dark theme): a pale blocky moon with a couple of craters. */
  background:
    radial-gradient(circle at 64% 36%, rgba(150,165,205,.55) 0 3px, transparent 4px),
    radial-gradient(circle at 38% 61%, rgba(150,165,205,.45) 0 2px, transparent 3px),
    #d7deef;
  border: 2px solid #c2cbe2;
  box-shadow: 0 0 0 5px rgba(200,212,240,.14), 0 0 16px 6px rgba(170,190,240,.30);
}
:root[data-theme="light"] .site-header::after {  /* day sky: a warm sun */
  background: #ffe36b; border-color: #ffd23f;
  box-shadow: 0 0 0 5px rgba(255,225,110,.20), 0 0 16px 6px rgba(255,205,75,.38);
}
.site-header::before {                         /* a couple of clouds in the centre, clear of brand + nav */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='60'%3E%3Cg fill='%23ffffff'%3E%3Crect x='6' y='30' width='62' height='13'/%3E%3Crect x='20' y='22' width='38' height='8'/%3E%3Crect x='176' y='34' width='54' height='11'/%3E%3Crect x='188' y='27' width='30' height='7'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 44% center; background-size: auto 62%;
  opacity: .55;
}
:root[data-theme="light"] .site-header::before { opacity: .9; }
.site-header > * { position: relative; z-index: 1; }  /* content above sky art */
/* Lift the logo off the sky with a soft drop shadow. */
.site-header .brand-logo { filter: drop-shadow(0 2px 6px rgba(0,0,0,.55)); }
/* Below ~900px the sun (at left:30%) would drift behind the brand wordmark, so
   drop it across tablet/phone widths and keep it only on genuinely wide headers. */
@media (max-width: 900px) { .site-header::after { display: none; } }

/* ---- Contrast chip behind the header nav so the links read on the sky.
   Desktop only — the mobile nav is a separate dropdown over a solid panel. ---- */
@media (min-width: 681px) {
  .site-header nav {
    background: rgba(6,14,30,.26);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 4px;
    padding: 6px 14px;
  }
  :root[data-theme="light"] .site-header nav {
    background: rgba(255,255,255,.6);
    border-color: rgba(20,40,80,.14);
  }
}

/* ---- Decorative pixel scene (oak tree + lit torch) in the hero's open right
   side. Purely cosmetic, behind the copy, and dropped on narrow screens where
   the hero stacks to a single column. ---- */
.hero { position: relative; }
.hero-copy { position: relative; z-index: 1; }
.hero-scene {
  position: absolute; right: 0; bottom: 0; z-index: 0; pointer-events: none;
  width: 230px; height: 205px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='230' viewBox='0 0 260 230'%3E%3Cg fill='%235f9a3e'%3E%3Crect x='150' y='34' width='86' height='74'/%3E%3Crect x='138' y='48' width='12' height='46'/%3E%3Crect x='236' y='48' width='12' height='46'/%3E%3Crect x='162' y='22' width='62' height='12'/%3E%3C/g%3E%3Cg fill='%234e7d31'%3E%3Crect x='150' y='34' width='14' height='14'/%3E%3Crect x='196' y='60' width='14' height='14'/%3E%3Crect x='172' y='86' width='14' height='14'/%3E%3Crect x='220' y='80' width='12' height='12'/%3E%3C/g%3E%3Cg fill='%2374b54a'%3E%3Crect x='178' y='44' width='12' height='12'/%3E%3Crect x='210' y='40' width='10' height='10'/%3E%3Crect x='158' y='70' width='10' height='10'/%3E%3C/g%3E%3Crect x='184' y='108' width='20' height='74' fill='%236b4a2b'/%3E%3Crect x='184' y='108' width='7' height='74' fill='%235a3d22'/%3E%3Crect x='60' y='142' width='8' height='40' fill='%236b4a2b'/%3E%3Crect x='60' y='142' width='3' height='40' fill='%235a3d22'/%3E%3Crect x='52' y='120' width='24' height='26' fill='%23ffd23f' fill-opacity='0.22'/%3E%3Crect x='57' y='130' width='12' height='14' fill='%23ff9d2e'/%3E%3Crect x='60' y='124' width='7' height='14' fill='%23ffd23f'/%3E%3Crect x='61' y='120' width='4' height='8' fill='%23fff3b0'/%3E%3Crect x='120' y='166' width='3' height='16' fill='%233f7a2a'/%3E%3Crect x='115' y='171' width='5' height='3' fill='%234f8a2c'/%3E%3Cg fill='%23d6453b'%3E%3Crect x='117' y='154' width='8' height='8'/%3E%3Crect x='113' y='156' width='4' height='4'/%3E%3Crect x='125' y='156' width='4' height='4'/%3E%3Crect x='118' y='150' width='6' height='4'/%3E%3C/g%3E%3Crect x='119' y='156' width='4' height='4' fill='%23ffd23f'/%3E%3Crect x='46' y='182' width='214' height='9' fill='%235f9a3e'/%3E%3Crect x='46' y='191' width='214' height='12' fill='%236f4a2c'/%3E%3Crect x='38' y='187' width='8' height='8' fill='%235f9a3e'/%3E%3Crect x='38' y='195' width='8' height='8' fill='%236f4a2c'/%3E%3Crect x='30' y='193' width='8' height='7' fill='%235f9a3e'/%3E%3Crect x='30' y='200' width='8' height='3' fill='%236f4a2c'/%3E%3Crect x='24' y='198' width='6' height='5' fill='%235f9a3e'/%3E%3C/svg%3E") no-repeat right bottom / contain;
  opacity: .92;
}
@media (max-width: 980px) { .hero-scene { display: none; } }

/* SEO "Launch a server" button: icon sized + aligned with the label. */
.cta-launch { display: inline-flex; align-items: center; gap: 9px; }
.cta-launch svg { width: 20px; height: 20px; flex: none; }

/* ---- Dirt footer: grass strip on top, tiled dirt-block texture below ---- */
.site-footer {
  position: relative;
  border-top: 0; padding: 36px 20px 88px;          /* thicker, with room for the stone layer */
  color: #efe3d2;                                  /* cream — legible on dirt */
  background-color: #6f4a2c;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Crect width='32' height='32' fill='%236f4a2c'/%3E%3Cg fill='%235d3d23'%3E%3Crect x='0' y='0' width='8' height='8'/%3E%3Crect x='16' y='8' width='8' height='8'/%3E%3Crect x='8' y='20' width='8' height='8'/%3E%3Crect x='24' y='24' width='8' height='8'/%3E%3C/g%3E%3Cg fill='%23805739'%3E%3Crect x='24' y='4' width='8' height='8'/%3E%3Crect x='8' y='8' width='4' height='4'/%3E%3Crect x='20' y='16' width='8' height='4'/%3E%3Crect x='0' y='24' width='6' height='6'/%3E%3C/g%3E%3Cg fill='%234c3119'%3E%3Crect x='14' y='2' width='3' height='3'/%3E%3Crect x='28' y='14' width='3' height='3'/%3E%3Crect x='4' y='16' width='3' height='3'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 34px 34px;
  text-shadow: 1px 1px 0 rgba(0,0,0,.45);
}
.site-footer > * { position: relative; z-index: 1; }   /* text above the layers */
.site-footer::before {                             /* grass-block top surface */
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px; z-index: 0;
  background: #5f9a3e; box-shadow: inset 0 -2px 0 rgba(0,0,0,.28);
}
.site-footer::after {                              /* stone + ore layer beneath the dirt */
  content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 64px; z-index: 0;
  background-color: #6f6f6f; background-repeat: repeat-x; background-size: auto 64px;
  box-shadow: inset 0 3px 0 rgba(0,0,0,.32);        /* dirt → stone seam */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='64'%3E%3Crect width='200' height='64' fill='%236f6f6f'/%3E%3Cg fill='%235b5b5b'%3E%3Crect x='0' y='0' width='18' height='18'/%3E%3Crect x='34' y='28' width='16' height='16'/%3E%3Crect x='70' y='10' width='14' height='14'/%3E%3Crect x='110' y='40' width='18' height='16'/%3E%3Crect x='150' y='6' width='16' height='16'/%3E%3Crect x='180' y='34' width='16' height='16'/%3E%3Crect x='88' y='46' width='14' height='14'/%3E%3C/g%3E%3Cg fill='%23666666'%3E%3Crect x='20' y='40' width='14' height='14'/%3E%3Crect x='52' y='4' width='14' height='14'/%3E%3Crect x='126' y='14' width='16' height='14'/%3E%3Crect x='166' y='44' width='14' height='14'/%3E%3Crect x='96' y='4' width='12' height='12'/%3E%3C/g%3E%3Cg fill='%23838383'%3E%3Crect x='14' y='22' width='10' height='10'/%3E%3Crect x='44' y='46' width='10' height='10'/%3E%3Crect x='78' y='30' width='10' height='10'/%3E%3Crect x='118' y='4' width='10' height='10'/%3E%3Crect x='142' y='34' width='10' height='10'/%3E%3Crect x='186' y='14' width='10' height='10'/%3E%3Crect x='104' y='28' width='8' height='8'/%3E%3C/g%3E%3Cg fill='%23474747'%3E%3Crect x='30' y='0' width='2' height='28'/%3E%3Crect x='30' y='26' width='14' height='2'/%3E%3Crect x='96' y='20' width='2' height='26'/%3E%3Crect x='158' y='24' width='2' height='30'/%3E%3Crect x='158' y='24' width='12' height='2'/%3E%3C/g%3E%3Cg fill='%232b2b2b'%3E%3Crect x='58' y='40' width='9' height='9'/%3E%3Crect x='66' y='46' width='5' height='5'/%3E%3C/g%3E%3Crect x='134' y='44' width='8' height='8' fill='%23c9a079'/%3E%3C/svg%3E");
}
.site-footer a { color: #ffe9c7; }
.site-footer a:hover { color: #fff; }
.site-footer > * + * { border-left-color: rgba(0,0,0,.3); }
.footer-build { color: #dcc8ac; opacity: 1; }


/* Footer ground scene: a pixel oak rooted in the grass, with a small torch
   jutting out of its trunk near the base. Wide screens only (need edge room). */
.footer-tree, .footer-torch { display: none; }
@media (min-width: 1100px) {
  /* No drop-shadow on the scene: flat pixel art suits the Minecraft look, and a
     shadow on the tree showed through as a dark wedge beside the rotated torch
     where the torch's opaque stick clipped it against the pale birch trunk. */
  .footer-tree, .footer-torch {
    display: block; position: absolute; z-index: 0; pointer-events: none;
    background: bottom center / contain no-repeat;
  }
  /* Oak on the left, trunk planted in the grass (bottom sits ~6px into the footer). */
  .footer-tree {
    left: 22px; top: -184px; width: 118px; height: 190px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='118' height='190'%3E%3Cg fill='%235f9a3e'%3E%3Crect x='20' y='30' width='80' height='68'/%3E%3Crect x='8' y='46' width='14' height='44'/%3E%3Crect x='98' y='46' width='14' height='44'/%3E%3Crect x='36' y='16' width='48' height='16'/%3E%3C/g%3E%3Cg fill='%234e7d31'%3E%3Crect x='20' y='30' width='16' height='16'/%3E%3Crect x='64' y='52' width='16' height='16'/%3E%3Crect x='40' y='80' width='16' height='16'/%3E%3Crect x='84' y='72' width='14' height='14'/%3E%3Crect x='8' y='62' width='12' height='12'/%3E%3C/g%3E%3Cg fill='%2374b54a'%3E%3Crect x='48' y='38' width='14' height='14'/%3E%3Crect x='78' y='32' width='12' height='12'/%3E%3Crect x='28' y='44' width='12' height='12'/%3E%3Crect x='90' y='58' width='10' height='10'/%3E%3C/g%3E%3Crect x='50' y='96' width='22' height='94' fill='%23e7e1d2'/%3E%3Crect x='64' y='96' width='8' height='94' fill='%23d2cab4'/%3E%3Cg fill='%23232323'%3E%3Crect x='52' y='110' width='8' height='4'/%3E%3Crect x='61' y='128' width='6' height='3'/%3E%3Crect x='51' y='145' width='5' height='4'/%3E%3Crect x='60' y='161' width='8' height='3'/%3E%3Crect x='53' y='177' width='6' height='4'/%3E%3C/g%3E%3C/svg%3E");
  }
  /* Small torch mounted partway up the trunk, almost upright (~15deg from vertical). */
  .footer-torch {
    z-index: 1; left: 52px; top: -78px; width: 20px; height: 34px;
    transform-origin: bottom left; transform: rotate(15deg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='34'%3E%3Crect x='2' y='0' width='16' height='16' fill='%23ffd23f' fill-opacity='0.22'/%3E%3Crect x='6' y='6' width='8' height='9' fill='%23ff9d2e'/%3E%3Crect x='8' y='2' width='5' height='9' fill='%23ffd23f'/%3E%3Crect x='9' y='0' width='3' height='5' fill='%23fff3b0'/%3E%3Crect x='8' y='13' width='5' height='21' fill='%236b4a2b'/%3E%3C/svg%3E");
  }
}
