/* LUN design system. Dark only, matching the brand artwork (violet moon on a night sky).
   System fonts: nothing to license, no third-party requests.
   Order: tokens, base, layout, header, buttons, forms, feedback, data, app pages, tickets, home, docs, footer, motion.
   Radii: panels 20px, cards 16px, controls 12px, buttons and chips are pills. One accent (violet), pink only for boosters.
   Contrast ratios are noted next to text colours (WCAG AA = 4.5:1 text, 3:1 UI boundaries).
   Motion is CSS first; everything decorative stops under prefers-reduced-motion (end of file). */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #06050a;
  --band: #0b0913;          /* alternating section background */
  --surface: #110e1b;       /* panels, tiles */
  --surface-2: #1a1628;     /* inputs, hover, raised */
  --surface-3: #241e3a;     /* pressed, selected */
  --line: #221d33;          /* dividers (decorative) */
  --line-strong: #342c4d;
  --field-line: #776b99;    /* input borders: 3.9:1 on --surface */
  --text: #f1eef8;          /* 18:1 on --bg */
  --text-2: #d6d1e6;        /* long-form body: 12:1 */
  --soft: #8f88a8;          /* large display text only: 6:1 on --bg */
  --muted: #a9a2bf;         /* 8.5:1 on --bg, 7.6:1 on --surface */
  --accent: #a497ff;        /* links: 7.6:1 on --bg */
  --accent-fill: #5b47e6;   /* button bg, white text 6.5:1 */
  --accent-fill-hover: #6a57f0;
  --accent-soft: rgb(124 108 255 / .12);
  --accent-line: #4b3f8f;
  --pink: #ffc6ee;          /* booster perks */
  --glow: rgb(110 90 255 / .55);
  --ok: #6ee7a8;
  --warn: #f5c86b;
  --off: #8f88a8;           /* 5.3:1 on --surface */
  --danger: #ff9e9e;
  --danger-fill: #a3243a;   /* white text 7.5:1 */
  --focus: #ffd65a;
  --grad: linear-gradient(135deg, #7c69ff 0%, #5b47e6 50%, #4532c4 100%);
  --grad-text: linear-gradient(180deg, #ffffff 20%, #c9c1ff 100%);
  --edge: inset 0 1px 0 rgb(255 255 255 / .06);                        /* top highlight on raised surfaces */
  --shadow-1: 0 1px 2px rgb(3 2 8 / .5), 0 8px 24px rgb(3 2 8 / .35);
  --shadow-2: 0 2px 4px rgb(3 2 8 / .5), 0 18px 48px rgb(3 2 8 / .6);
  --shadow-pop: 0 24px 64px rgb(3 2 8 / .8);
  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 16px;
  --r-sm: 12px;
  --gutter: 1.25rem;
  --header-h: 72px;
  --font: system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-out: cubic-bezier(.23, 1, .32, 1);   /* UI enter/press */
  --ease-soft: cubic-bezier(.37, 0, .63, 1);  /* slow loops */
  color-scheme: dark;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 104px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.6 var(--font); min-height: 100dvh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; overflow-x: clip; -webkit-tap-highlight-color: transparent; }
/* Night sky behind every page: two soft glows and a sparse star field. Fixed, painted once, no animation. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1px 1px at 12% 18%, rgb(255 255 255 / .55) 50%, transparent 51%),
    radial-gradient(1px 1px at 31% 62%, rgb(255 255 255 / .35) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 47% 9%, rgb(201 193 255 / .6) 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 41%, rgb(255 255 255 / .3) 50%, transparent 51%),
    radial-gradient(1px 1px at 69% 77%, rgb(255 255 255 / .4) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 83% 24%, rgb(201 193 255 / .5) 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 58%, rgb(255 255 255 / .35) 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 86%, rgb(255 255 255 / .3) 50%, transparent 51%),
    radial-gradient(60rem 40rem at 85% -10%, rgb(91 71 230 / .16), transparent 60%),
    radial-gradient(50rem 36rem at -10% 20%, rgb(74 55 201 / .1), transparent 60%);
}
main { flex: 1; }
main:focus { outline: none; }
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
p + p { margin-top: .75rem; }
strong { font-weight: 650; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: .1em .4em; border-radius: 6px; }
::selection { background: rgb(124 108 255 / .45); color: #fff; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[id] { scroll-margin-top: 104px; }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--focus); color: #14111e; padding: .6rem 1rem; border-radius: var(--r-sm); z-index: 100; font-weight: 600; }
.skip:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.plain { list-style: none; padding: 0; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.mono { font-family: var(--mono); font-size: .85em; }
.nowrap { white-space: nowrap; }
.body { white-space: pre-wrap; overflow-wrap: anywhere; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- 3. Layout ---------- */
.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.btn-row form, .btn-row > form { margin: 0; }

/* ---------- 4. Header: floating glass pill. Brand left, links centred, account right ---------- */
.site-header { position: sticky; top: 0; z-index: 50; padding-top: 14px; transition: transform 260ms var(--ease-out); view-transition-name: site-header; }
.site-header.is-hidden { transform: translateY(calc(-100% - 4px)); }
.site-header .wrap { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; min-height: 58px; padding: 0 .5rem 0 1.1rem; background: rgb(17 14 27 / .72); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); border: 1px solid var(--line-strong); border-radius: 999px; box-shadow: var(--edge), 0 10px 30px rgb(3 2 8 / .5); }
.brand { justify-self: start; display: flex; align-items: center; gap: .55rem; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .14em; }
.brand img { width: 30px; height: 30px; transition: transform 500ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .brand:hover img { transform: rotate(-14deg) scale(1.08); } }
.nav { display: flex; align-items: center; gap: .1rem; margin: 0; list-style: none; padding: 0; }
.nav a { display: block; color: var(--muted); text-decoration: none; padding: .42rem .85rem; border-radius: 999px; font-weight: 550; font-size: .93rem; white-space: nowrap; transition: color 150ms ease, background-color 150ms ease; }
.nav a:hover { color: var(--text); background: rgb(255 255 255 / .05); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-3); box-shadow: var(--edge); }
.nav-end { justify-self: end; display: flex; align-items: center; gap: .5rem; }

/* Account menu (native details/summary: keyboard and screen-reader friendly without JS) */
.menu { position: relative; }
.menu summary { list-style: none; display: flex; align-items: center; gap: .55rem; padding: .3rem .8rem .3rem .3rem; border-radius: 999px; border: 1px solid var(--line-strong); cursor: pointer; font-weight: 600; font-size: .93rem; transition: background-color 150ms ease, border-color 150ms ease; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: .45rem; height: .45rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); margin-left: .15rem; transition: transform 200ms var(--ease); }
.menu[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.menu summary:hover, .menu[open] summary { background: var(--surface-2); border-color: var(--field-line); }
.menu-name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-list { position: absolute; right: 0; top: calc(100% + .6rem); z-index: 30; min-width: 220px; list-style: none; margin: 0; padding: .4rem; background: rgb(21 17 34 / .98); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--edge), var(--shadow-pop); transform-origin: top right; animation: pop 160ms var(--ease-out); }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; padding: .6rem .8rem; border-radius: 10px; color: var(--text); text-decoration: none; font: inherit; font-size: .95rem; background: none; border: 0; cursor: pointer; transition: background-color 120ms ease; }
.menu-list a:hover, .menu-list button:hover, .menu-list a[aria-current="page"] { background: var(--surface-3); }
.menu-list form { margin: 0; }
.menu-sep { border-top: 1px solid var(--line); margin-top: .3rem; padding-top: .3rem; }
.menu-sep button { color: var(--muted); }
.menu-list .btn-danger { background: var(--danger-fill); color: #fff; justify-content: center; font-weight: 600; border-radius: 999px; }
.menu-list .btn-danger:hover { background: #8a1c30; }

/* Avatars */
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(150deg, #6d5bff, #3d2cc0); color: #fff; font-weight: 700; font-size: .9rem; flex: none; }
img.avatar { display: block; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.4rem; box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--line-strong); }

/* Phone and tablet navigation: one burger with everything */
.burger { display: none; }
@media (max-width: 980px) {
  .site-header .wrap { grid-template-columns: 1fr auto; padding: .45rem .5rem .45rem 1rem; }
  .site-header .wrap > nav, .site-header .nav-end { display: none; }
  .burger { display: block; justify-self: end; }
  .burger > summary { list-style: none; cursor: pointer; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line-strong); transition: background-color 150ms ease, transform 100ms ease; }
  .burger > summary::-webkit-details-marker { display: none; }
  .burger > summary:active { transform: scale(.94); }
  .burger[open] > summary { background: var(--surface-3); }
  /* Three lines that turn into an X */
  .burger-icon, .burger-icon::before, .burger-icon::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform 220ms var(--ease-out), background-color 150ms ease; }
  .burger-icon { position: relative; }
  .burger-icon::before, .burger-icon::after { content: ""; position: absolute; left: 0; }
  .burger-icon::before { top: -6px; }
  .burger-icon::after { top: 6px; }
  .burger[open] .burger-icon { background: transparent; }
  .burger[open] .burger-icon::before { transform: translateY(6px) rotate(45deg); }
  .burger[open] .burger-icon::after { transform: translateY(-6px) rotate(-45deg); }
  .burger-panel { position: absolute; left: 0; right: 0; top: calc(100% + .5rem); max-height: calc(100dvh - 110px); overflow-y: auto; overscroll-behavior: contain; padding: .6rem; border-radius: var(--r-xl); background: #110e1b; border: 1px solid var(--line-strong); box-shadow: var(--edge), var(--shadow-pop); transform-origin: top right; animation: pop 200ms var(--ease-out); }
  .burger-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
  .burger-panel li { animation: rise-sm 320ms var(--ease-out) both; }
  .burger-panel li:nth-child(2) { animation-delay: 25ms; } .burger-panel li:nth-child(3) { animation-delay: 50ms; } .burger-panel li:nth-child(4) { animation-delay: 75ms; }
  .burger-panel li:nth-child(5) { animation-delay: 100ms; } .burger-panel li:nth-child(6) { animation-delay: 125ms; } .burger-panel li:nth-child(n+7) { animation-delay: 150ms; }
  .burger-panel a:not(.btn) { display: flex; align-items: center; min-height: 50px; padding: 0 1rem; border-radius: 14px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.05rem; }
  .burger-panel a:not(.btn):hover, .burger-panel a[aria-current="page"] { background: var(--surface-2); }
  .burger-sep { height: 1px; margin: .4rem 1rem; background: var(--line); animation: none !important; }
  .burger-user { display: flex; align-items: center; gap: .7rem; padding: .6rem 1rem .9rem; border-bottom: 1px solid var(--line); margin-bottom: .4rem; }
  .burger-panel form { margin: 0; }
  .burger-cta { width: 100%; margin-top: .6rem; min-height: 50px; }
}
@media (max-width: 360px) { .brand span { display: none; } }

/* ---------- 5. Buttons (pills) ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.35rem; min-height: 46px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 600; line-height: 1.2; white-space: nowrap; cursor: pointer; text-decoration: none; background: var(--grad); background-origin: border-box; color: #fff; box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), 0 6px 24px rgb(91 71 230 / .35); transition: filter 200ms var(--ease), transform 200ms var(--ease), box-shadow 200ms var(--ease), background-color 150ms ease, border-color 150ms ease; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.btn:hover { filter: brightness(1.12); }
@media (hover: hover) and (pointer: fine) { .btn:not(.btn-ghost):not(.btn-danger):hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 10px 32px rgb(91 71 230 / .55); } }
.btn:active { transform: scale(.97); transition-duration: 100ms; }
.btn-ghost { background: rgb(255 255 255 / .03); border-color: var(--field-line); color: var(--text); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); border-color: #9388b8; filter: none; box-shadow: none; }
.btn-small { min-height: 38px; padding: .4rem 1rem; font-size: .9rem; }
.btn-danger { background: var(--danger-fill); box-shadow: none; }
.btn-danger:hover { background: #8a1c30; filter: none; box-shadow: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; transform: none; filter: none; }
.btn .icon { width: 1.1em; height: 1.1em; }
@media (max-width: 420px) { .btn { white-space: normal; text-align: center; max-width: 100%; } }
/* Pressed and waiting for the server: set by nav.js on submit. The button keeps its value (it isn't disabled). */
.btn.is-busy { pointer-events: none; color: transparent; }
.btn.is-busy::after { content: ""; position: absolute; width: 1.05rem; height: 1.05rem; border-radius: 50%; border: 2px solid rgb(255 255 255 / .35); border-top-color: #fff; animation: spin 700ms linear infinite; }
.arrow-link { font-weight: 600; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }
.arrow-link::after { content: "\2192"; transition: transform 200ms var(--ease); }
.arrow-link:hover::after { transform: translateX(4px); }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--muted); cursor: pointer; transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover, .icon-btn:focus-within { color: var(--text); background: rgb(255 255 255 / .06); }

/* ---------- 6. Forms ---------- */
.field { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: .4rem; min-width: 0; }
label, .label { font-weight: 600; }
.hint { color: var(--muted); font-size: .88rem; font-weight: 400; }
input[type=text], input[type=email], input[type=number], input[type=search], select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--field-line); border-radius: var(--r-sm); padding: .65rem .85rem; min-height: 46px; transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease; }
input::placeholder, textarea::placeholder { color: var(--off); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: #9388b8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(164 151 255 / .32); background: #1d1830; }
select { appearance: none; -webkit-appearance: none; padding-right: 2.4rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23a9a2bf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; background-size: 1rem; }
textarea { min-height: 9rem; resize: vertical; }
input[type=file] { font: inherit; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--field-line); border-radius: 999px; padding: .5rem 1rem; margin-right: .8rem; cursor: pointer; }
.check { display: flex; gap: .75rem; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; flex: none; accent-color: var(--accent-fill); cursor: pointer; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem 1.2rem; margin: 0; min-width: 0; }
legend { font-weight: 600; padding: 0 .4rem; }
details summary { cursor: pointer; color: var(--muted); }
.plain-fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; min-width: 0; }
.plain-fieldset legend { padding: 0; margin-bottom: .2rem; }
.inline-field { display: flex; gap: .6rem; flex-wrap: wrap; }
.inline-field input { flex: 1 1 220px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 600px) { .form-grid { grid-template-columns: minmax(0, 1fr); } .form-grid .span-2 { grid-column: auto; } }
.mono-input { font-family: var(--mono) !important; font-size: .9rem !important; min-height: 5rem !important; }
.ram-field input { max-width: 180px; }
.search { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.search input[type=search] { border-radius: 999px; padding: .45rem 1rem; min-height: 38px; width: min(260px, 100%); }
.good-for-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.good-for-field legend { padding: 0; margin-bottom: .4rem; font-weight: 600; }
.chip-checks { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }

/* ---------- 7. Feedback: alerts, notes, toasts, empty states, chips ---------- */
.alert { display: flex; gap: .7rem; border: 1px solid #7a2c3a; background: rgb(163 36 58 / .18); color: #ffdede; padding: .85rem 1rem; border-radius: var(--r-sm); animation: pop 220ms var(--ease-out); }
.alert::before { content: "!"; flex: none; display: grid; place-items: center; width: 1.35rem; height: 1.35rem; margin-top: .1rem; border-radius: 50%; background: var(--danger-fill); color: #fff; font-weight: 800; font-size: .8rem; }
.info { border: 1px solid #332b55; background: var(--accent-soft); padding: 1rem 1.2rem; border-radius: var(--r-md); }
.info p + p { margin-top: .5rem; }
.toast { display: flex; gap: .6rem; align-items: center; margin: 0; padding: .65rem .9rem; border-radius: var(--r-sm); border: 1px solid #2f6b4f; background: rgb(110 231 168 / .1); color: #c9f5dc; font-size: .92rem; animation: pop 240ms var(--ease-out); }
.toast::before { content: ""; flex: none; width: .55rem; height: .9rem; margin: -.15rem .2rem 0 .25rem; border-right: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(45deg); }
.panel-error { margin: .6rem 0 0; padding: .7rem .9rem; border-radius: var(--r-sm); border: 1px solid #7a5a2c; background: rgb(245 200 107 / .08); font-size: .9rem; }
.panel-error-text { color: var(--warn); max-width: 22ch; }
.busy-note { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0; padding: .8rem 1rem; border-radius: var(--r-sm); border: 1px solid #5c4a28; background: rgb(245 200 107 / .06); }
.busy-note .btn { margin-left: auto; }
.suspended-note { color: #ffd0d0; }
.empty { border: 1px dashed var(--line-strong); border-radius: var(--r-lg); padding: 2.5rem 1.5rem; text-align: center; color: var(--muted); background: radial-gradient(60% 90% at 50% 0%, rgb(124 108 255 / .07), transparent 70%); }
.empty::before { content: ""; display: block; width: 44px; height: 44px; margin: 0 auto .9rem; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface-2) url("/img/logo-64.png") center / 26px no-repeat; box-shadow: var(--edge); opacity: .9; }
.empty strong { display: block; color: var(--text); font-size: 1.1rem; margin-bottom: .35rem; }
.empty .btn-row { justify-content: center; margin-top: 1.1rem; }

/* Status chips (real state only) */
.status { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 600; padding: .24rem .7rem; border-radius: 999px; background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .07); color: var(--off); white-space: nowrap; text-transform: capitalize; }
.status::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.status-running, .status-open, .status-approved, .status-active { color: var(--ok); background: rgb(110 231 168 / .08); border-color: rgb(110 231 168 / .2); }
.status-starting, .status-stopping, .status-pending, .status-installing, .status-restoring_backup { color: var(--warn); background: rgb(245 200 107 / .07); border-color: rgb(245 200 107 / .2); }
.status-suspended, .status-install_failed, .status-reinstall_failed, .status-denied { color: var(--danger); background: rgb(255 158 158 / .07); border-color: rgb(255 158 158 / .2); }
.status-running::before { animation: ping 2.2s ease-out infinite; }
.status-starting::before, .status-stopping::before, .status-installing::before { animation: blink 1.1s ease-in-out infinite; }

/* Role badges. Staff roles use the accent; boosters get the pink tint; the rest stay neutral. */
.badges { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
td .badges { margin: 0; }
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); background: rgb(255 255 255 / .03); white-space: nowrap; }
.badge-founder, .badge-admin, .badge-community_manager, .badge-moderator { color: #d9d3ff; border-color: #5446a8; background: rgb(91 71 230 / .18); }
.badge-support { color: #b9e6ff; border-color: #2f5d78; background: rgb(56 152 204 / .14); }
.badge-supporter { color: var(--pink); border-color: #7a3a67; background: rgb(244 127 255 / .1); }
.badge-escalated, .badge-internal { color: #ffd9a8; border-color: #7a5a2c; background: rgb(245 200 107 / .12); }
.tag { font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .05rem .4rem; border-radius: 6px; background: rgb(91 71 230 / .25); color: #d9d3ff; }

/* Ticket state: whose turn it is */
.ticket-state { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; padding: .2rem .65rem; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line-strong); color: var(--muted); }
.ticket-state::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.ticket-state-action { color: #d9d3ff; border-color: #5446a8; background: rgb(91 71 230 / .2); }
.ticket-state-action::before { animation: ping-violet 2.2s ease-out infinite; }
.ticket-state-waiting { color: var(--warn); border-color: #5c4a28; background: rgb(245 200 107 / .07); }
.ticket-state-closed { color: var(--off); }

/* Addresses: click to copy (nav.js), still selectable without JS */
.address { position: relative; display: inline-block; font-family: var(--mono); font-size: .88rem; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px; padding: .35rem .65rem; justify-self: start; user-select: all; -webkit-user-select: all; transition: border-color 150ms ease; }
.address.is-copyable { cursor: copy; }
.address.is-copyable:hover { border-color: var(--accent); }
.address.is-copied::after { content: "Copied"; position: absolute; left: 50%; bottom: calc(100% + 6px); translate: -50% 0; padding: .2rem .55rem; border-radius: 8px; background: var(--ok); color: #06210f; font: 700 .72rem var(--font); white-space: nowrap; animation: pop 160ms var(--ease-out); }

/* ---------- 8. Page head and panels ---------- */
.page-head { position: relative; isolation: isolate; overflow: hidden; margin-top: calc(var(--header-h) * -1); padding-top: calc(var(--header-h) + 2.75rem); padding-bottom: 2.25rem; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgb(20 16 36 / .9), rgb(6 5 10 / 0)); }
.page-head::before { content: ""; position: absolute; z-index: -1; width: 560px; height: 340px; right: -80px; top: -140px; background: radial-gradient(circle, rgb(91 71 230 / .28), transparent 65%); }
/* faint grid, fading out to the left: ties app pages to the hero */
.page-head::after { content: ""; position: absolute; inset: 0; z-index: -2; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(270deg, #000, transparent 55%); -webkit-mask-image: linear-gradient(270deg, #000, transparent 55%); opacity: .5; }
.page-head .wrap, .page-head .narrow { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; flex-wrap: wrap; }
.page-head .wrap > *, .page-head .narrow > * { animation: rise-sm 500ms var(--ease-out) both; }
.page-head h1 { font-size: clamp(1.9rem, 3.8vw, 2.75rem); font-weight: 700; letter-spacing: -0.035em; }
.page-head p { color: var(--muted); margin-top: .5rem; max-width: 62ch; }
.page-head .row-meta { margin-top: .6rem; }
.crumb { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; font-weight: 550; margin-bottom: .7rem; color: var(--muted); text-decoration: none; padding: .2rem .65rem .2rem .5rem; border-radius: 999px; border: 1px solid var(--line-strong); background: rgb(255 255 255 / .03); transition: color 150ms ease, border-color 150ms ease; }
.crumb::before { content: "\2190"; transition: transform 200ms var(--ease); }
.crumb:hover { color: var(--text); border-color: var(--field-line); }
.crumb:hover::before { transform: translateX(-3px); }
.page-body { padding-block: 2rem 5rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.page-body > * { min-width: 0; } /* wide tables scroll inside their panel instead of widening the page */
.profile-title { display: flex; align-items: center; gap: 1rem; }

.panel { background: linear-gradient(180deg, rgb(255 255 255 / .025), transparent 140px), var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--edge), var(--shadow-1); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem 1rem; padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { font-size: 1.12rem; letter-spacing: -0.01em; }
.panel-head h2:has(.head-icon) { display: flex; align-items: center; gap: .55rem; }
.head-icon { width: 22px; height: 22px; flex: none; color: var(--accent); }
.panel-head .count, .count { color: var(--muted); font-weight: 500; margin-left: .35rem; }
.panel-body { padding: 1.5rem; }
.panel-body > .empty { border: 0; padding: 1.5rem 1rem; background: none; }
.panel-danger { border-color: #4f1f2c; }
.panel-danger .panel-head h2 { color: #ffc9c9; }
.panel-note { padding: .75rem 1.5rem 0; }
.panel-actions { padding-top: 1.1rem; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .panel-head { padding: 1rem 1.1rem; } .panel-body { padding: 1.1rem; } .panel-note { padding-inline: 1.1rem; } }

/* ---------- 9. Rows and tables ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { padding: 1.15rem 1.5rem; display: grid; gap: .45rem; }
.rows > li + li { border-top: 1px solid var(--line); }
.rows > li.is-ended h3 { color: var(--muted); }
.row-top { display: flex; justify-content: space-between; gap: .5rem 1rem; align-items: baseline; flex-wrap: wrap; }
.row-top h3 { font-size: 1.02rem; font-weight: 650; }
.row-end { display: inline-flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.row-meta { color: var(--muted); font-size: .9rem; display: flex; gap: .4rem 1rem; flex-wrap: wrap; align-items: center; margin-top: .25rem; }
.row-meta span[aria-hidden] { opacity: .6; }
.settings-list { list-style: none; padding: 0; margin: .4rem 0 0; }
@media (max-width: 640px) { .rows > li { padding: 1rem 1.1rem; } }

table.list { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.list th, table.list td { text-align: left; padding: .85rem 1.5rem; vertical-align: middle; }
table.list thead th { color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .015); white-space: nowrap; }
table.list tbody tr + tr td { border-top: 1px solid var(--line); }
table.list tbody tr { transition: background-color 150ms ease; }
table.list tbody tr:hover td { background: rgb(255 255 255 / .025); }
.table-scroll { overflow-x: auto; position: relative; -webkit-overflow-scrolling: touch; } /* also contains .sr-only labels inside wide tables */
.cell-title { display: block; font-weight: 650; color: var(--text); }
.cell-sub { display: block; margin-top: .15rem; font-size: .8rem; color: var(--off); }
.cell-actions { width: 1%; text-align: right; padding-right: 1.25rem !important; }
.member-link { color: var(--text); font-weight: 600; text-decoration: none; border-bottom: 1px dashed var(--field-line); }
.member-link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.owner-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .2rem .7rem .2rem .2rem; border-radius: 999px; background: rgb(255 255 255 / .04); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; transition: border-color 150ms ease, background-color 150ms ease; }
.owner-chip .avatar { width: 24px; height: 24px; font-size: .75rem; }
@media (hover: hover) and (pointer: fine) { .owner-chip:hover { border-color: var(--accent); background: var(--accent-soft); } }

/* Staff servers table */
.server-table td, .server-table th { padding: .9rem 1.1rem; }
.server-table th:first-child, .server-table td:first-child { padding-left: 1.5rem; }
.server-table tr.is-ended td, .server-table tr.is-ended .cell-title { color: var(--muted); }
.server-table tr.is-ended .cell-title { font-weight: 500; }
.server-table .address { white-space: nowrap; }
/* Narrower than a wide laptop: each server becomes a labelled card, so menus are never clipped by a scroll box. */
@media (max-width: 1100px) {
  .server-table thead { display: none; }
  .server-table, .server-table tbody, .server-table tr, .server-table td { display: block; width: auto; }
  .server-table tr { position: relative; padding: 1rem 1.1rem; }
  .server-table tbody tr + tr { border-top: 1px solid var(--line); }
  .server-table td { padding: .28rem 0 !important; border: 0 !important; text-align: left; }
  .server-table td[data-label] { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
  .server-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .85rem; }
  .server-table .cell-main { padding-right: 7rem !important; margin-bottom: .35rem; }
  .server-table .cell-actions { position: absolute; top: 1rem; right: 1.1rem; padding: 0 !important; width: auto; }
}

/* ---------- 10. Stats, tabs, filters ---------- */
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.stats li { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem 1.3rem; display: grid; gap: .15rem; box-shadow: var(--edge); animation: rise-sm 500ms var(--ease-out) both; }
.stats li:nth-child(2) { animation-delay: 50ms; } .stats li:nth-child(3) { animation-delay: 100ms; } .stats li:nth-child(4) { animation-delay: 150ms; }
.stats li:first-child { background: radial-gradient(120% 120% at 0% 0%, rgb(91 71 230 / .32), transparent 60%), var(--surface); border-color: var(--accent-line); }
.stat-num { font-size: 2.1rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: .9rem; }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr 1fr; gap: .75rem; } .stat-num { font-size: 1.7rem; } }
.tabs { display: flex; gap: .25rem; padding: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; box-shadow: var(--edge); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .filter a { color: var(--muted); text-decoration: none; padding: .5rem 1rem; border-radius: 999px; font-weight: 600; font-size: .93rem; white-space: nowrap; transition: color 150ms ease, background-color 150ms ease; }
.tabs a:hover, .filter a:hover { color: var(--text); background: rgb(255 255 255 / .04); }
.tabs a[aria-current="page"], .filter a[aria-current="page"] { color: #fff; background: var(--grad); box-shadow: inset 0 1px 0 rgb(255 255 255 / .2); }
.tab-count { font-weight: 500; opacity: .75; margin-left: .2rem; }
.filter { display: flex; flex-wrap: wrap; gap: .2rem; }
.filter a { padding: .3rem .8rem; font-size: .88rem; }

/* ---------- 11. Pop-up menus and confirmations (native details) ---------- */
.action-menu { position: relative; display: inline-block; text-align: left; }
.action-menu > summary { list-style: none; }
.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu > summary::after { content: ""; width: .4rem; height: .4rem; margin-left: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 160ms var(--ease-out); }
.action-menu[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.action-menu[open] > summary { background: var(--surface-2); border-color: var(--accent); }
.action-menu .menu-list { z-index: 20; top: calc(100% + .4rem); min-width: 230px; }
.menu-confirm > summary { list-style: none; cursor: pointer; padding: .6rem .8rem; border-radius: 10px; color: var(--text); font-size: .95rem; }
.menu-confirm > summary::-webkit-details-marker { display: none; }
.menu-confirm > summary:hover { background: var(--surface-3); }
.menu-confirm form { display: grid; gap: .6rem; padding: .5rem .8rem .7rem; border-top: 1px solid var(--line); margin-top: .3rem; }
.menu-confirm form input[type=number] { min-height: 40px; }
.menu-confirm .btn { width: 100%; }
.danger-item { color: var(--danger) !important; }
.inline-confirm { position: relative; }
.inline-confirm summary { list-style: none; }
.inline-confirm summary::-webkit-details-marker { display: none; }
.inline-confirm[open] > form { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 20; width: min(300px, calc(100vw - 2.5rem)); padding: 1rem; background: rgb(21 17 34 / .98); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--edge), var(--shadow-pop); display: grid; gap: .6rem; transform-origin: top right; animation: pop 160ms var(--ease-out); }
.kill-confirm .menu-list { left: 0; right: auto; transform-origin: top left; padding: .75rem; display: grid; gap: .6rem; width: 250px; }
.kill-confirm .menu-list p { margin: 0; color: var(--muted); }
.kill-confirm .menu-list form .btn { width: 100%; }

/* ---------- 12. Dashboard and server pages ---------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 1.5rem; align-items: start; }
.dash-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; min-width: 0; }
.dash-side { display: grid; gap: 1rem; position: sticky; top: 96px; }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } .dash-side { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.usage { display: grid; gap: .7rem; }
.usage-dots { display: flex; gap: .4rem; }
.usage-dots span { flex: 1; height: 8px; border-radius: 999px; background: rgb(255 255 255 / .08); }
.usage-dots span.is-used { background: var(--grad); box-shadow: 0 0 12px rgb(110 90 255 / .5); }
.quick { list-style: none; margin: 0; padding: .4rem; display: grid; gap: .15rem; }
.quick a { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 46px; padding: 0 .85rem; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; transition: background-color 150ms ease; }
.quick a::after { content: "\2192"; color: var(--muted); transition: transform 200ms var(--ease), color 150ms ease; }
.quick a:hover { background: rgb(255 255 255 / .04); }
.quick a:hover::after { transform: translateX(3px); color: var(--accent); }

.my-servers { list-style: none; margin: 0; padding: 1rem; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.my-servers > li { display: grid; }
.server-tile { --tone: var(--line-strong); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: .9rem; padding: 1.05rem 1.15rem 1rem 1.3rem; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: rgb(255 255 255 / .02); color: var(--text); text-decoration: none; transition: border-color 200ms ease, background-color 200ms ease, transform 200ms var(--ease-out), box-shadow 200ms ease; }
.server-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tone); }
a.server-tile:active { transform: scale(.99); }
@media (hover: hover) and (pointer: fine) { a.server-tile:hover { border-color: var(--accent); background: rgb(91 71 230 / .08); transform: translateY(-2px); box-shadow: var(--shadow-2); } a.server-tile:hover .st-go { transform: translateX(3px) rotate(45deg); border-color: var(--accent); } }
.tone-running { --tone: var(--ok); }
.tone-starting, .tone-stopping, .tone-pending, .tone-installing, .tone-restoring_backup { --tone: var(--warn); }
.tone-suspended, .tone-install_failed, .tone-reinstall_failed { --tone: var(--danger); }
.st-main { display: grid; gap: .25rem; min-width: 0; }
.st-main strong { font-size: 1.08rem; overflow-wrap: anywhere; }
.st-main .row-meta { margin: 0; gap: .3rem .5rem; }
.st-main code { font-family: var(--mono); font-size: .82rem; color: var(--text); background: none; padding: 0; }
.st-side { display: flex; align-items: center; gap: .75rem; }
.st-ram { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.st-go { margin-left: auto; width: .5rem; height: .5rem; border-right: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: rotate(45deg); transition: transform 200ms var(--ease), border-color 150ms ease; }

/* Dashboard history: finished things, collapsed at the bottom of their own panel */
.history { border-top: 1px solid var(--line); }
.history > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; padding: .9rem 1.5rem; color: var(--muted); font-weight: 600; font-size: .95rem; transition: color 150ms ease, background-color 150ms ease; }
.history > summary::-webkit-details-marker { display: none; }
.history > summary:hover { color: var(--text); background: rgb(255 255 255 / .02); }
.history > summary::after { content: ""; width: .45rem; height: .45rem; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 200ms var(--ease-out); }
.history[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.history .count { font-weight: 500; }
.history .hint { margin-left: .4rem; font-weight: 400; }
.history .rows { border-top: 1px solid var(--line); }
.history .rows h3 { color: var(--muted); }

/* One server: side menu + section */
.server-page { grid-template-columns: 230px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.side-nav { position: sticky; top: 96px; }
.side-nav ul { list-style: none; margin: 0; padding: .4rem; display: grid; gap: .15rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--edge); }
.side-nav a { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 .85rem; border-radius: 11px; color: var(--muted); font-weight: 600; text-decoration: none; transition: background-color 150ms ease, color 150ms ease; }
.side-nav a:hover { color: var(--text); background: rgb(255 255 255 / .04); }
.side-nav a[aria-current="page"] { color: var(--text); background: rgb(91 71 230 / .18); box-shadow: inset 3px 0 0 var(--accent); }
.server-main .panel-body { display: grid; gap: 1rem; }
.server-body { display: grid; gap: .9rem; }
@media (max-width: 820px) {
  .server-page { grid-template-columns: minmax(0, 1fr); }
  .side-nav { position: static; }
  .side-nav ul { display: flex; overflow-x: auto; scrollbar-width: none; border-radius: 999px; }
  .side-nav ul::-webkit-scrollbar { display: none; }
  .side-nav a { white-space: nowrap; border-radius: 999px; gap: .4rem; }
  .side-nav a[aria-current="page"] { box-shadow: none; }
}

/* Connect line, live usage, power */
.connect { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; font-size: .88rem; color: var(--muted); }
.connect > span:first-child { font-weight: 600; color: var(--text); }
.connect .hint { font-size: .82rem; }
.controls { display: grid; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: rgb(255 255 255 / .02); }
.server-main .controls, .server-body .controls { margin: 0; padding: 0; border: 0; background: none; }
.power { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.power form { margin: 0; }
.meters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
@media (max-width: 760px) { .meters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.meters > li { display: grid; align-content: start; gap: .3rem; padding: .8rem .9rem; border-radius: var(--r-sm); background: rgb(255 255 255 / .03); border: 1px solid var(--line); }
.meter-label { font-size: .72rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.meter-top { display: flex; justify-content: space-between; gap: .5rem; font-size: .8rem; color: var(--muted); margin-bottom: .35rem; }
.meter-val { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.meters .meter-val { color: var(--muted); font-size: .85rem; }
.meters .meter-val strong { color: var(--text); font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; }
.meter { display: block; height: 6px; border-radius: 999px; background: rgb(255 255 255 / .07); overflow: hidden; }
.meters .meter { margin-top: .2rem; }
.meter-fill { display: block; height: 100%; width: var(--pct); border-radius: inherit; background: linear-gradient(90deg, #5b47e6, #9d90ff); transform-origin: left; animation: grow 1s var(--ease-out) both; }
.meter-fill.is-high { background: linear-gradient(90deg, #c2410c, var(--warn)); }
.idle-note { margin: 0; font-size: .82rem; }
.eula { display: grid; gap: .6rem; padding: .9rem 1rem; border-radius: var(--r-sm); border: 1px solid #7a5a2c; background: rgb(245 200 107 / .08); }
.eula p { margin: 0; }

/* Change version or software */
.reinstall-choices { border: 0; margin: 0; padding: 0; display: grid; gap: .5rem; }
.reinstall-choice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--r-sm); transition: border-color 150ms ease, background-color 150ms ease; }
.reinstall-choice:has(input:checked) { border-color: var(--accent); background: rgb(91 71 230 / .1); }
.reinstall-choice select { width: auto; min-width: 9rem; }
.reinstall-choice .version-input { width: 9rem; }
.reinstall-picks { display: flex; flex-wrap: wrap; gap: .5rem; }
.pick { display: grid; gap: .2rem; font-size: .75rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.pick select, .pick input { text-transform: none; letter-spacing: 0; font-weight: 400; min-width: 8.5rem; width: auto; }
.reinstall-warn { margin: 0; padding: .7rem .85rem; border-radius: var(--r-sm); border: 1px solid rgb(255 196 0 / .25); background: rgb(255 196 0 / .06); color: #ffe7a8; }
.backup-choice { border: 1px solid var(--line); border-radius: var(--r-sm); margin: 0; padding: .7rem .9rem .8rem; display: grid; gap: .45rem; }
.backup-choice legend { padding: 0 .3rem; font-weight: 600; font-size: .92rem; }
.backup-choice input:disabled + span { opacity: .5; }

/* ---------- 13. Request form: games expand to show their server types as cards ---------- */
.game-picker { display: grid; gap: .75rem; }
.game-picker > details { border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface-2); transition: border-color 150ms ease; }
.game-picker > details[open] { border-color: #5446a8; }
.game-picker summary { color: var(--text); list-style: none; cursor: pointer; padding: 1rem 1.2rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-weight: 700; font-size: 1.05rem; }
.game-picker summary::-webkit-details-marker { display: none; }
.game-picker summary::after { content: ""; width: .5rem; height: .5rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 200ms var(--ease); }
.game-picker details[open] summary::after { transform: rotate(-135deg); }
.game-picker summary .hint { font-weight: 400; margin-left: auto; }
.cat-desc { padding: 0 1.2rem .75rem; }
.variant-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .75rem; padding: 0 1.2rem 1.2rem; }
.variant-card { position: relative; display: grid; align-content: start; gap: .5rem; padding: 1rem; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); cursor: pointer; font-weight: 400; transition: border-color 150ms ease, background-color 150ms ease, transform 150ms var(--ease-out); }
.variant-card:hover { border-color: var(--field-line); }
.variant-card:active { transform: scale(.985); }
.variant-card input { position: absolute; opacity: 0; pointer-events: none; }
.variant-card strong { font-size: 1rem; }
.variant-card .hint { font-size: .85rem; }
.variant-card:has(input:checked) { border-color: var(--accent); background: rgb(91 71 230 / .16); box-shadow: 0 0 0 1px var(--accent), 0 8px 28px rgb(91 71 230 / .25); }
.variant-card:has(input:checked)::after { content: ""; position: absolute; top: .8rem; right: .8rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--accent-fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 8.5 2.6 2.6L12 5.7'/%3E%3C/svg%3E") center / .8rem no-repeat; animation: pop 160ms var(--ease-out); }
.variant-card:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.fit { display: flex; flex-wrap: wrap; gap: .35rem; }
.fit-tag { display: inline-flex; align-items: center; font-size: .78rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); }
.specs { display: grid; gap: .35rem; margin-top: .25rem; padding-top: .6rem; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
.spec { display: flex; align-items: flex-start; gap: .45rem; line-height: 1.35; }
.spec strong { color: var(--text); font-weight: 650; }
.spec .sup, .sup { display: block; font-size: .8rem; color: var(--pink); }
.spec-icon { width: 16px; height: 16px; flex: none; margin-top: .1rem; color: var(--accent); }
.variant-settings { display: grid; gap: 1rem; border: 1px solid #5446a8; background: rgb(91 71 230 / .08); }
.variant-settings legend { font-weight: 700; }
@media (max-width: 520px) { .variant-cards { padding: 0 .8rem .8rem; } .game-picker summary { padding: .9rem; } .cat-desc { padding-inline: .9rem; } }

/* ---------- 14. Staff panel details ---------- */
.review-flags { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.flag { font-size: .8rem; padding: .25rem .6rem; border-radius: 8px; border: 1px solid var(--line-strong); color: var(--muted); }
.flag a { margin-left: .3rem; }
.flag-ok { color: var(--ok); border-color: rgb(110 231 168 / .3); }
.flag-warn { color: var(--warn); border-color: rgb(245 200 107 / .35); }
.flag-bad { color: #ffb4b4; border-color: rgb(239 68 68 / .5); background: rgb(239 68 68 / .08); }
.game-cat { padding: 1.25rem 1.5rem; }
.game-cat + .game-cat { border-top: 1px solid var(--line); }
.game-cat h3 { font-size: 1.15rem; }
.game-cat h3 .count { font-size: .9rem; }
.variant-rows { margin-top: .75rem; border: 1px solid var(--line); border-radius: 14px; }
.variant-rows > li { padding: .9rem 1.1rem; }
.variant-rows h4 { margin: 0; font-size: 1rem; }
.edit-variant { margin-top: .9rem; }
.games-forms { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .games-forms { grid-template-columns: minmax(0, 1fr); } }
.egg-vars { min-width: 0; }
.egg-vars .list td, .egg-vars .list th { padding: .6rem .7rem; }
.egg-vars .list td input[type=text], .egg-vars .list td select { min-width: 160px; }
.log-list { list-style: none; margin: 0; padding: 0; }
.log-list li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: .7rem 1.5rem; font-size: .93rem; }
.log-list li + li { border-top: 1px solid var(--line); }
.log-list time { color: var(--muted); font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: .82rem; }
@media (max-width: 600px) { .log-list li { grid-template-columns: 1fr; gap: .2rem; padding-inline: 1.1rem; } }

/* ---------- 15. Support: ticket list and the ticket chat ---------- */
.support-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.support-grid > #new { position: sticky; top: 96px; }
@media (max-width: 900px) { .support-grid { grid-template-columns: minmax(0, 1fr); } .support-grid > #new { position: static; } }
.ticket-rows > li { padding: 0; }
.ticket-rows a { display: grid; gap: .3rem; padding: 1rem 1.5rem; color: var(--text); text-decoration: none; transition: background-color 150ms ease; }
.ticket-rows a:hover { background: rgb(255 255 255 / .03); }
.ticket-rows a:hover .ticket-subject { text-decoration: underline; }
.ticket-subject { font-weight: 650; overflow-wrap: anywhere; }
@media (max-width: 640px) { .ticket-rows a { padding: 1rem 1.1rem; } }

.ticket-layout { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); align-items: start; }
.ticket-side { display: grid; gap: 1rem; position: sticky; top: 96px; }
.side-card .panel-head { padding-block: .8rem; }
.side-card .panel-body { display: grid; gap: .6rem; }
.side-member { display: flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none; }
.side-member:hover strong { text-decoration: underline; }
.side-member .avatar { width: 36px; height: 36px; }
.side-sub { font-size: .75rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: .3rem; }
.side-servers { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.side-servers li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 10px; }
.side-servers li > a:first-child { display: grid; gap: .1rem; min-width: 0; color: var(--text); text-decoration: none; font-size: .9rem; }
.side-servers li > a:first-child:hover strong { text-decoration: underline; }
.side-servers .hint { font-size: .78rem; }
.side-panel-link { font-size: .8rem; white-space: nowrap; }
.ticket-nav .ticket-switch { max-height: 360px; overflow: auto; }
.ticket-switch { list-style: none; margin: 0; padding: .4rem; display: grid; gap: .2rem; }
.ticket-switch a { display: grid; gap: .35rem; padding: .7rem .8rem; border-radius: 12px; color: var(--text); text-decoration: none; border: 1px solid transparent; transition: background-color 150ms ease, border-color 150ms ease; }
.ticket-switch a:hover { background: rgb(255 255 255 / .03); }
.ticket-switch a[aria-current="page"] { background: var(--accent-soft); border-color: #3f3470; }
.ts-subject { font-weight: 600; font-size: .93rem; overflow-wrap: anywhere; }
.ts-meta { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted); }

.chat { display: flex; flex-direction: column; min-width: 0; overflow: visible; }
.thread { list-style: none; margin: 0; padding: 1.25rem; display: grid; gap: 1rem; }
.msg { display: flex; align-items: flex-end; gap: .6rem; max-width: min(78%, 640px); animation: rise-sm 360ms var(--ease-out) both; }
.msg.right { justify-self: end; flex-direction: row-reverse; }
.msg-avatar { width: 36px; height: 36px; flex: none; object-fit: cover; border: 1px solid var(--line-strong); background: #1d1832; }
img.avatar.msg-avatar-logo { object-fit: contain; padding: 0; border: 0; border-radius: 0; background: none; transform: scale(1.4); }
.bubble { min-width: 0; padding: .7rem .95rem .8rem; border-radius: 18px; border: 1px solid var(--line-strong); background: var(--surface-2); box-shadow: var(--edge); }
.msg.left .bubble { border-bottom-left-radius: 6px; }
.msg.right .bubble { border-bottom-right-radius: 6px; }
.msg-staff .bubble { background: rgb(91 71 230 / .2); border-color: var(--accent-line); }
.msg-note { max-width: min(88%, 720px); }
.msg-note .bubble { background: rgb(245 200 107 / .07); border: 1px dashed #7a5a2c; box-shadow: none; }
.msg-note header strong { color: var(--warn); }
.msg-bot .bubble { background: rgb(255 255 255 / .03); }
.bubble header { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; font-size: .82rem; color: var(--muted); margin-bottom: .3rem; }
.bubble header strong { color: var(--text); font-size: .9rem; }
.bubble header time { margin-left: auto; padding-left: .5rem; }
.bubble .body { line-height: 1.5; }
.files { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .35rem; }
.files a { display: inline-flex; align-items: center; gap: .35rem; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; font-size: .88rem; }
.files .file-image a { display: block; padding: 0; border: 0; border-radius: 12px; background: none; width: fit-content; }
.file-image img { display: block; max-width: min(100%, 320px); max-height: 240px; width: auto; height: auto; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); transition: filter 150ms ease; }
.file-image a:hover img { filter: brightness(1.1); }
.file-icon { width: 14px; height: 14px; flex: none; }
.system-line { justify-self: center; font-size: .82rem; color: var(--muted); padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px; }

/* Composer pinned to the bottom of the chat while scrolling */
.composer { position: sticky; bottom: 0; display: grid; gap: .5rem; padding: .9rem 1.25rem 1.1rem; border-top: 1px solid var(--line); background: var(--surface); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.composer-box { position: relative; border: 1px solid var(--field-line); border-radius: var(--r-md); background: var(--bg); transition: border-color 150ms ease, box-shadow 150ms ease; }
.composer-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(164 151 255 / .25); }
.composer-box textarea { display: block; width: 100%; min-height: 84px; max-height: 40vh; resize: vertical; border: 0; background: none; padding: .8rem .95rem .2rem; box-shadow: none; outline: none; }
.composer-box textarea:focus { background: none; box-shadow: none; }
.composer-tools { display: flex; align-items: center; gap: .5rem; padding: .35rem .45rem .45rem; }
.file-names { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }
.char-count { font-size: .8rem; font-variant-numeric: tabular-nums; }
.attach:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.attach::after { content: attr(title); position: absolute; bottom: calc(100% + 6px); left: 50%; translate: -50% 4px; padding: .25rem .55rem; border-radius: 8px; background: #000; color: #fff; font-size: .75rem; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 150ms ease, translate 150ms var(--ease-out); }
.attach:hover::after, .attach:focus-within::after { opacity: 1; translate: -50% 0; }
.send-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-left: auto; border: 0; border-radius: 13px; background: var(--grad); color: #fff; cursor: pointer; box-shadow: inset 0 1px 0 rgb(255 255 255 / .22); transition: transform 150ms var(--ease-out), opacity 150ms ease, filter 150ms ease; }
.send-btn svg { width: 18px; height: 18px; }
.send-btn:hover { filter: brightness(1.12); }
.send-btn:active { transform: scale(.92); }
.send-btn:disabled { opacity: .5; cursor: progress; }
.composer-hint { margin: 0; font-size: .8rem; }
.note-hint { display: none; color: var(--warn); }
.mode-switch { display: inline-flex; justify-self: start; gap: .2rem; margin: 0; padding: .2rem; border: 1px solid var(--line-strong); border-radius: 999px; }
.mode-switch label { position: relative; }
.mode-switch input { position: absolute; opacity: 0; }
.mode-switch span { display: block; padding: .3rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: background-color 150ms ease, color 150ms ease; }
.mode-switch input:checked + span { background: var(--accent-fill); color: #fff; }
.mode-switch input[value="yes"]:checked + span { background: #8a6a2a; }
.mode-switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.mode-switch input:disabled + span { opacity: .4; cursor: not-allowed; }
.composer:has(input[name="internal"][value="yes"]:checked) .composer-box { border-color: #7a5a2c; border-style: dashed; background: rgb(245 200 107 / .04); }
.composer:has(input[name="internal"][value="yes"]:checked) .note-hint { display: inline; }

/* Close (x) in the page head, like closing a tab */
.close-ticket { position: relative; align-self: start; }
.close-ticket > summary { list-style: none; border: 1px solid var(--line-strong); }
.close-ticket > summary::-webkit-details-marker { display: none; }
.close-ticket[open] > summary, .close-ticket > summary:hover { color: #fff; background: rgb(239 68 68 / .2); border-color: rgb(239 68 68 / .5); }
.close-pop { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 20; width: min(290px, calc(100vw - 2.5rem)); padding: 1rem; border-radius: var(--r-md); background: rgb(21 17 34 / .98); border: 1px solid var(--line-strong); box-shadow: var(--edge), var(--shadow-pop); transform-origin: top right; animation: pop 160ms var(--ease-out); }
.close-pop label { font-weight: 600; }

@media (max-width: 900px) {
  .ticket-layout { grid-template-columns: minmax(0, 1fr); }
  .ticket-side { position: static; order: 2; }
  .msg { max-width: 92%; }
  .thread { padding: 1rem .8rem; }
  .composer { padding: .8rem; position: static; }
  .composer-box textarea { min-height: 64px; }
  .page-head .wrap:has(> .close-ticket) { position: relative; padding-right: 3.2rem; }
  .page-head .wrap > .close-ticket { position: absolute; top: 0; right: 0; }
}

/* ---------- 16. Homepage ---------- */
.hero { position: relative; isolation: isolate; margin-top: calc(var(--header-h) * -1); padding-top: var(--header-h); overflow: hidden; min-height: 100dvh; display: flex; flex-direction: column; }
/* faint grid that fades out from the top-right, a slow violet glow, and a fade into the next section */
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse 70% 70% at 70% 40%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 40%, #000 20%, transparent 75%); opacity: .7; }
.hero::after { content: ""; position: absolute; z-index: -1; width: 760px; height: 760px; right: -140px; top: -100px; background: radial-gradient(circle, rgb(91 71 230 / .34), transparent 65%); filter: blur(20px); animation: drift 16s var(--ease-soft) infinite alternate; will-change: transform; }
.hero .wrap { flex: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 2rem; align-items: center; padding-block: 2rem 5rem; }
.hero-badge { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1.4rem; padding: .35rem .9rem .35rem .7rem; border-radius: 999px; border: 1px solid var(--accent-line); background: rgb(91 71 230 / .14); color: #d9d3ff; font-size: .85rem; font-weight: 600; text-decoration: none; transition: border-color 150ms ease, background-color 150ms ease; }
a.hero-badge:hover { border-color: var(--accent); background: rgb(91 71 230 / .22); }
.hero h1 { font-size: clamp(2.8rem, 6.4vw, 6rem); font-weight: 750; letter-spacing: -0.045em; line-height: 1.02; }
.hero h1 .soft { display: block; color: var(--soft); font-weight: 300; }
.hero h1 .bright { display: block; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
.hero .lead { font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--muted); max-width: 34rem; margin: 1.5rem 0 2.25rem; }
.hero-copy > * { animation: rise .9s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .07s; }
.hero-copy > :nth-child(3) { animation-delay: .14s; }
.hero-copy > :nth-child(4) { animation-delay: .21s; }
.hero-copy > :nth-child(5) { animation-delay: .28s; }
.hero-copy > :nth-child(6) { animation-delay: .35s; }
.hero-steps { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .4rem; color: var(--muted); font-size: .92rem; }
.hero-steps li { display: inline-flex; align-items: center; gap: .45rem; }
.hero-steps li + li::before { content: ""; width: 1.1rem; height: 1px; margin-right: .1rem; background: var(--line-strong); }
.hero-steps span { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; font-size: .75rem; font-weight: 700; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-strong); }
.hero-steps li:first-child span { background: var(--accent-fill); border-color: transparent; color: #fff; }
@media (max-width: 520px) { .hero-steps { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; } .hero-steps li + li::before { display: none; } }
.live-strip { display: flex; gap: .6rem 1.25rem; flex-wrap: wrap; align-items: center; margin-top: 2rem; color: var(--muted); font-size: .92rem; }
.live-strip strong { color: var(--text); }

/* Isometric tile scene (decorative; the same info is in the sections below) */
.iso { position: relative; height: clamp(400px, calc(100dvh - 260px), 640px); perspective: 2800px; animation: rise 1.1s .15s var(--ease) both; }
.iso-plane { position: absolute; left: 48%; top: 50%; width: 600px; height: 600px; margin: -300px 0 0 -300px; transform-style: preserve-3d; transform: scale(.9) rotateX(48deg) rotateZ(-30deg); }
.iso-plane::before { content: ""; position: absolute; inset: -40px; border: 1px solid var(--line-strong); background-image: linear-gradient(rgb(164 151 255 / .14) 1px, transparent 1px), linear-gradient(90deg, rgb(164 151 255 / .14) 1px, transparent 1px); background-size: 130px 130px; background-position: -1px -1px; mask-image: radial-gradient(circle, #000 45%, transparent 72%); -webkit-mask-image: radial-gradient(circle, #000 45%, transparent 72%); }
.iso-tile { position: absolute; width: 150px; height: 150px; padding: 1.1rem; border-radius: 22px; background: linear-gradient(160deg, #1d1832, #110e1d); border: 1px solid #3b3260; color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .55rem; transform: translateZ(14px); transform-style: preserve-3d; box-shadow: 0 0 0 1px rgb(0 0 0 / .3), 0 30px 60px rgb(3 2 8 / .6); animation: float 9s var(--ease-soft) infinite; will-change: transform; backface-visibility: hidden; }
.iso-tile strong { display: grid; justify-items: center; font-size: 1.12rem; line-height: 1.15; letter-spacing: -0.01em; }
.iso-tile strong span + span { color: var(--muted); font-weight: 600; }
.iso-icon { width: 46px; height: 46px; color: var(--accent); }
.iso-t1 { left: 0; top: 0; animation-delay: -1.5s; }
.iso-t2 { right: 0; top: 0; animation-delay: -3s; }
.iso-t3 { left: 0; bottom: 0; animation-delay: -4.5s; }
.iso-t4 { right: 0; bottom: 0; animation-delay: -6s; }
.iso-main { left: calc(50% - 75px); top: calc(50% - 75px); background: linear-gradient(150deg, #6d5bff, #3d2cc0 60%, #2a1f8a); border-color: #9d90ff; animation: float-main 7.5s var(--ease-soft) infinite; box-shadow: 0 1px 0 #2a1f8a, 0 2px 0 #271d80, 0 4px 0 #241b76, 0 6px 0 #21186c, 0 8px 0 #1e1662, 0 10px 0 #1b1458, 0 0 60px var(--glow), 0 0 140px rgb(110 90 255 / .35); }
.iso-main img { width: 56px; height: 56px; filter: drop-shadow(0 4px 16px rgb(255 255 255 / .35)); }
.iso-main strong span + span { color: #e5e0ff; }
@media (min-width: 1500px) { .iso-plane { left: 53%; transform: scale(1.04) rotateX(48deg) rotateZ(-30deg); } }
@media (min-width: 981px) and (max-width: 1279px) { .iso-plane { left: 46%; transform: scale(.64) rotateX(48deg) rotateZ(-30deg); } }
@media (max-width: 980px) {
  .hero { min-height: auto; }
  .hero .wrap { grid-template-columns: 1fr; padding-block: 2.5rem 1rem; }
  .iso { height: 380px; }
  .iso-plane { left: 50%; width: 500px; height: 500px; margin: -250px 0 0 -250px; transform: scale(.78) rotateX(48deg) rotateZ(-30deg); }
}
@media (max-width: 520px) { .iso { height: 300px; } .iso-plane { width: 450px; height: 450px; margin: -225px 0 0 -225px; transform: scale(.54) rotateX(48deg) rotateZ(-30deg); } }

/* Scroll cue: sits at the bottom of the full-height hero */
.scroll-cue { position: absolute; left: 0; right: 0; bottom: 1.75rem; width: max-content; margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: .6rem; color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; animation: rise 1s .6s var(--ease) both; }
.scroll-cue span { width: 26px; height: 42px; border: 2px solid var(--field-line); border-radius: 999px; position: relative; }
.scroll-cue span::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: wheel 1.8s ease-in-out infinite; }
.scroll-cue:hover { color: var(--text); }
@media (max-height: 640px), (max-width: 980px) { .scroll-cue { display: none; } }

/* Sections */
.section { padding-block: clamp(4rem, 8vw, 7rem); position: relative; }
.section-band { background: linear-gradient(180deg, var(--band), rgb(6 5 10 / 0)); border-top: 1px solid var(--line); }
.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 60rem; }
.section-head.is-centred { margin-inline: auto; text-align: center; }
.section-head.is-centred .section-intro { margin-inline: auto; }
.section-title { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 700; letter-spacing: -0.035em; }
.section-title .soft { color: var(--soft); font-weight: 300; }
.section-intro { color: var(--muted); max-width: 58ch; margin-top: 1rem; font-size: 1.05rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.pulse { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--ok); animation: ping 2.2s ease-out infinite; }

/* Cards that light up under the pointer (nav.js sets --mx/--my; without it the highlight sits top-left) */
.glow-card { position: relative; isolation: isolate; }
.glow-card::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(340px circle at var(--mx, 20%) var(--my, 0%), rgb(124 108 255 / .16), transparent 60%); opacity: 0; transition: opacity 300ms ease; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .glow-card:hover::after { opacity: 1; } }

/* Status summary + official servers */
.status-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 0 0 1.25rem; }
.status-summary li { display: grid; gap: .25rem; padding: 1.2rem 1.4rem; border-radius: var(--r-lg); border: 1px solid var(--line); background: linear-gradient(180deg, rgb(255 255 255 / .035), transparent); box-shadow: var(--edge); }
.sum-num { font-size: 2.3rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.sum-of { font-size: 1.1rem; color: var(--muted); font-weight: 600; margin-left: .15rem; }
.sum-label { color: var(--muted); font-size: .9rem; }
.server-list { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.server { position: relative; background: linear-gradient(180deg, var(--surface), #0d0b15); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4rem 1.5rem; display: grid; align-content: start; gap: .65rem; box-shadow: var(--edge); transition: transform 300ms var(--ease), border-color 300ms var(--ease), box-shadow 300ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .server:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--edge), var(--shadow-2); } }
.server.is-running { border-color: rgb(110 231 168 / .25); }
.server-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.server h3 { font-size: 1.15rem; overflow-wrap: anywhere; }
.server p { color: var(--muted); font-size: .95rem; }
.server-meters { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .2rem; }

/* Feature bento: one tall tile down the left, four small tiles and one wide tile beside it */
.bento { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 1rem; }
.tile { overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); padding: clamp(1.4rem, 3vw, 2rem); display: flex; flex-direction: column; gap: .7rem; box-shadow: var(--edge); transition: border-color 300ms var(--ease), transform 300ms var(--ease), box-shadow 300ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .tile:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: var(--edge), var(--shadow-2); } }
.tile h3 { font-size: 1.25rem; letter-spacing: -0.02em; }
.tile p { color: var(--muted); }
.tile .arrow-link { margin-top: auto; padding-top: .5rem; }
.tile-icon { display: grid; place-items: center; width: 48px; height: 48px; padding: 10px; border-radius: 14px; color: var(--accent); background: rgb(124 108 255 / .12); border: 1px solid rgb(124 108 255 / .22); margin-bottom: .3rem; }
.tile-tall { grid-row: span 3; background: radial-gradient(120% 80% at 0% 0%, rgb(91 71 230 / .38), transparent 60%), linear-gradient(180deg, #15112a, var(--surface)); border-color: #3a3160; }
.tile-tall .tile-icon { width: 56px; height: 56px; background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .14); color: #fff; }
.tile-tall .btn-row { margin-top: auto; padding-top: 1rem; }
.tile-wide { grid-column: span 2; background-image: radial-gradient(rgb(164 151 255 / .14) 1px, transparent 1px); background-size: 18px 18px; background-color: var(--surface); }
@media (max-width: 980px) { .bento { grid-template-columns: 1fr 1fr; } .tile-tall { grid-row: auto; grid-column: span 2; } }
@media (max-width: 620px) { .bento { grid-template-columns: 1fr; } .tile-tall, .tile-wide { grid-column: auto; } }

.timeline { list-style: none; padding: 0; margin: .5rem 0 0; counter-reset: step; }
.timeline li { counter-increment: step; position: relative; padding: 0 0 1.35rem 3.1rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: counter(step); position: absolute; left: 0; top: -.1rem; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: rgb(7 6 11 / .6); border: 1px solid var(--accent); color: var(--text); font-weight: 700; font-size: .88rem; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: calc(1rem - 1px); top: 2.05rem; bottom: .2rem; width: 2px; background: linear-gradient(var(--accent), transparent); opacity: .5; }
.timeline strong { display: block; }
.timeline span { color: var(--muted); font-size: .95rem; }

/* Games you can host */
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 392px)); gap: 1rem; }
.game-card { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); padding: 1.4rem 1.5rem; display: grid; align-content: start; gap: .7rem; box-shadow: var(--edge); transition: border-color 300ms var(--ease), transform 300ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .game-card:hover { border-color: var(--accent-line); transform: translateY(-3px); } }
.game-card h3 { font-size: 1.25rem; }
.game-card p { color: var(--muted); font-size: .95rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 600; padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--line-strong); background: rgb(255 255 255 / .03); color: var(--text-2); }
.game-card .spec-line { margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.game-card .spec-line strong { color: var(--text); }

/* Member vs booster */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; max-width: 860px; margin-inline: auto; }
.plan { position: relative; border-radius: var(--r-xl); border: 1px solid var(--line-strong); background: var(--surface); padding: clamp(1.5rem, 3vw, 2.1rem); display: grid; align-content: start; gap: 1rem; box-shadow: var(--edge), var(--shadow-1); }
.plan h3 { font-size: 1.35rem; }
.plan-price { font-size: 2.2rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1; }
.plan-price small { display: block; margin-top: .45rem; font-size: .9rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.plan li { position: relative; padding-left: 1.7rem; color: var(--text-2); }
.plan li::before { content: ""; position: absolute; left: .25rem; top: .28rem; width: .42rem; height: .78rem; border-right: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(45deg); }
.plan-boost { border-color: #7a3a67; background: radial-gradient(110% 70% at 100% 0%, rgb(244 127 255 / .14), transparent 60%), var(--surface); }
.plan-boost li::before { border-color: var(--pink); }
.plan-flag { position: absolute; top: -.75rem; right: 1.4rem; padding: .2rem .7rem; border-radius: 999px; background: #7a3a67; color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .04em; }
.plan .btn-row { margin-top: .4rem; }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } }

/* The rules, in short */
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 1rem; }
.rule { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); padding: 1.3rem 1.4rem; display: grid; gap: .4rem; align-content: start; box-shadow: var(--edge); }
.rule-num { font-size: 1.9rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rule strong { font-size: 1rem; }
.rule p { color: var(--muted); font-size: .93rem; }
.section-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1.75rem; }
.good-to-know { margin-top: 1.5rem; padding: 1.1rem 1.3rem; border-radius: var(--r-lg); border: 1px dashed var(--line-strong); max-width: 70ch; }
.good-to-know p { color: var(--muted); margin-top: .3rem; }

/* FAQ accordions (native details) */
.faq { display: grid; gap: .6rem; max-width: 820px; }
.faq.is-centred { margin-inline: auto; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--edge); transition: border-color 200ms ease, background-color 200ms ease; }
.faq details[open] { border-color: var(--accent-line); background: #141024; }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.05rem 1.3rem; color: var(--text); font-weight: 650; font-size: 1.02rem; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: .55rem; height: .55rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform 220ms var(--ease); }
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq summary:hover { color: #fff; }
.faq-a { padding: 0 1.3rem 1.2rem; color: var(--text-2); animation: rise-sm 260ms var(--ease-out); }
.faq-a p + p { margin-top: .6rem; }
.faq-group + .faq-group { margin-top: 2.5rem; }
.faq-group h2 { font-size: 1.3rem; margin-bottom: 1rem; }

/* Final call to action */
.final { text-align: center; position: relative; isolation: isolate; overflow: hidden; }
.final::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 55%; width: 900px; height: 500px; transform: translate(-50%, -50%); background: radial-gradient(ellipse, rgb(91 71 230 / .35), transparent 65%); filter: blur(10px); animation: breathe 8s ease-in-out infinite; }
.final img { width: 88px; height: 88px; margin: 0 auto 1.5rem; filter: drop-shadow(0 10px 40px var(--glow)); animation: float-flat 6s ease-in-out infinite; }
.final .section-intro { margin-inline: auto; }
.final .btn-row { justify-content: center; margin-top: 2rem; }

/* ---------- 17. Documents: policies, legal pages, FAQ ---------- */
.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; padding-block: 2.5rem 5rem; }
.doc-nav { position: sticky; top: 96px; display: grid; gap: 1.5rem; max-height: calc(100dvh - 120px); overflow-y: auto; scrollbar-width: thin; }
.doc-nav h2 { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; padding-left: .8rem; }
.doc-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.doc-nav a { display: block; padding: .5rem .8rem; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .93rem; font-weight: 550; transition: color 150ms ease, background-color 150ms ease; }
.doc-nav a:hover { color: var(--text); background: rgb(255 255 255 / .04); }
.doc-nav a[aria-current="page"] { color: var(--text); background: rgb(91 71 230 / .18); box-shadow: inset 3px 0 0 var(--accent); }
.doc-nav .toc a { font-weight: 400; font-size: .88rem; padding-block: .35rem; }
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding-top: 1.5rem; }
  .doc-nav { position: static; max-height: none; overflow: visible; }
  .doc-nav h2 { padding-left: 0; }
  .doc-nav ul { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .doc-nav ul::-webkit-scrollbar { display: none; }
  .doc-nav a { white-space: nowrap; border: 1px solid var(--line-strong); border-radius: 999px; }
  .doc-nav a[aria-current="page"] { box-shadow: none; border-color: var(--accent); }
  .doc-nav .toc-block { display: none; }
}
.doc-layout > *, .doc-nav > nav { min-width: 0; }
.doc { min-width: 0; max-width: 780px; }
.prose { padding-block: 3rem 5rem; }
.doc.prose { padding-block: 0; }
.prose h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); font-weight: 700; letter-spacing: -0.035em; margin-bottom: 1rem; }
.prose h2 { font-size: 1.4rem; margin: 2.75rem 0 .8rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.prose h1 + h2, .prose .updated + h2, .prose .doc-lead + h2 { border-top: 0; padding-top: 0; }
.prose h3 { font-size: 1.08rem; margin: 1.6rem 0 .5rem; letter-spacing: -0.01em; }
.prose p, .prose li { color: var(--text-2); }
.prose > p, .prose > .info, .prose > .alert, .prose > form, .prose > .btn-row, .prose > ul, .prose > ol, .prose > .callout, .prose > .table-scroll { margin-top: 1rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin: .4rem 0; }
.prose li::marker { color: var(--accent); }
.prose table { border-collapse: collapse; width: 100%; font-size: .93rem; }
.prose .table-scroll { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: .7rem .9rem; text-align: left; vertical-align: top; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose th { background: rgb(255 255 255 / .03); color: var(--muted); font-size: .76rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.prose td strong { color: var(--text); }
.updated { display: inline-flex; flex-wrap: wrap; gap: .3rem .8rem; color: var(--muted); font-size: .9rem; }
.doc-lead { font-size: 1.12rem; color: var(--text-2); }
.callout { display: grid; gap: .35rem; padding: 1rem 1.2rem; border-radius: var(--r-md); border: 1px solid #332b55; background: var(--accent-soft); }
.callout > strong { color: var(--text); }
.callout p { margin: 0; }
.callout-warn { border-color: #5c4a28; background: rgb(245 200 107 / .07); }
.callout-warn > strong { color: #ffe7a8; }
/* Only rendered for admins: things the policy can't state until staff decide them */
.callout-staff { border: 1px dashed #7a3a67; background: rgb(244 127 255 / .06); }
.callout-staff > strong { color: var(--pink); }
.prose .glance, .prose .changelog, .prose .doc-cards { padding-left: 0; }
.glance { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.glance li { margin: 0; display: grid; gap: .2rem; align-content: start; padding: 1rem 1.1rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--edge); }
.glance-num { font-size: 1.6rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1.15; color: var(--text); }
.glance-label { color: var(--muted); font-size: .88rem; }
.changelog { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .75rem; }
.changelog li { margin: 0; display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .9rem 1.1rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.changelog time { color: var(--accent); font-weight: 650; font-size: .9rem; }
@media (max-width: 560px) { .changelog li { grid-template-columns: 1fr; gap: .2rem; } }
.doc-cards { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 1rem; }
.doc-cards li { margin: 0; display: grid; }
.doc-card { display: grid; gap: .35rem; align-content: start; padding: 1.3rem 1.4rem; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--edge); transition: border-color 200ms ease, transform 200ms var(--ease-out); }
.doc-card strong { font-size: 1.08rem; }
.doc-card span { color: var(--muted); font-size: .92rem; }
@media (hover: hover) and (pointer: fine) { .doc-card:hover { border-color: var(--accent); transform: translateY(-2px); } }

/* Small centred pages: welcome, join, errors, confirmations */
.centre-page { display: grid; place-items: center; padding-block: clamp(2rem, 8vh, 5rem) 5rem; }
.centre-card { position: relative; isolation: isolate; width: min(620px, 100% - 2 * var(--gutter)); padding: clamp(1.6rem, 4vw, 2.6rem); border-radius: var(--r-xl); border: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--edge), var(--shadow-2); display: grid; gap: 1rem; animation: rise .7s var(--ease) both; }
.centre-card::before { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: radial-gradient(90% 60% at 50% 0%, rgb(91 71 230 / .22), transparent 70%); }
.centre-card > img { width: 56px; height: 56px; filter: drop-shadow(0 8px 28px var(--glow)); }
.centre-card h1 { font-size: clamp(1.7rem, 3.6vw, 2.2rem); letter-spacing: -0.03em; }
.centre-card p { color: var(--text-2); }
.error-ref { color: var(--muted); }
.error-ref code { color: var(--text); padding: .15rem .45rem; user-select: all; -webkit-user-select: all; }

/* ---------- 18. Footer and cookie banner ---------- */
.site-footer { position: relative; border-top: 1px solid var(--line); background: linear-gradient(180deg, #08060e, #040307); padding: 4rem 0 2rem; color: var(--muted); font-size: .95rem; }
.site-footer::before { content: ""; position: absolute; left: 50%; top: -1px; width: min(640px, 80%); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .6; }
.footer-grid { display: grid; gap: 2.5rem 2rem; grid-template-columns: 1.7fr 1fr 1fr 1fr; }
.site-footer h2 { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text); margin-bottom: .9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.site-footer a { color: var(--muted); text-decoration: none; transition: color 150ms ease; }
.site-footer a:hover { color: var(--text); }
.footer-brand { display: grid; gap: 1rem; align-content: start; max-width: 34ch; }
.footer-brand .brand img { width: 34px; height: 34px; }
.footer-brand .btn { justify-self: start; color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--off); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; max-width: none; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
/* Leaves room for the cookie banner while it is showing */
body:has(.cookie-banner) .site-footer { padding-bottom: 12rem; }

.cookie-banner { position: fixed; inset: auto 1rem max(1rem, env(safe-area-inset-bottom)) 1rem; z-index: 90; max-width: 620px; margin-inline: auto; background: rgb(26 22 40 / .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line-strong); border-radius: 22px; padding: 1.15rem 1.3rem; box-shadow: var(--edge), var(--shadow-pop); animation: rise .6s .4s var(--ease) both; }
.cookie-banner h2 { font-size: 1rem; margin-bottom: .3rem; }
.cookie-banner p { margin-bottom: .9rem; color: var(--muted); font-size: .95rem; }
.cookie-banner form { margin: 0; }
.cookie-banner .btn { flex: 1 1 10rem; }

/* Thin bar at the top while the next page loads (nav.js adds .is-leaving) */
.nav-progress { position: fixed; inset: 0 0 auto 0; z-index: 200; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; opacity: 0; pointer-events: none; }
.is-leaving .nav-progress { opacity: 1; animation: load 8s cubic-bezier(.1, .7, .1, 1) forwards; }

/* ---------- 19. Motion ---------- */
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(-4px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes rise-sm { from { opacity: 0; transform: translateY(8px); } }
@keyframes drift { to { transform: translate(-80px, 60px) scale(1.1); } }
@keyframes breathe { 50% { opacity: .6; transform: translate(-50%, -50%) scale(1.08); } }
@keyframes float { 0%, 100% { transform: translateZ(14px); } 50% { transform: translateZ(30px); } }
@keyframes float-main { 0%, 100% { transform: translateZ(30px); } 50% { transform: translateZ(50px); } }
@keyframes float-flat { 50% { transform: translateY(-8px); } }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgb(110 231 168 / .6); } 80%, 100% { box-shadow: 0 0 0 7px rgb(110 231 168 / 0); } }
@keyframes ping-violet { 0% { box-shadow: 0 0 0 0 rgb(164 151 255 / .6); } 80%, 100% { box-shadow: 0 0 0 7px rgb(164 151 255 / 0); } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes load { to { transform: scaleX(.92); } }

/* Sections fade up as they scroll into view. nav.js adds .reveal-wait to elements below the fold and removes it
   when they enter the viewport; without JS nothing is ever hidden. Siblings in a grid follow each other. */
.reveal { transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal-wait { opacity: 0; transform: translateY(22px); }

/* Smooth cross-page transitions where the browser supports them (same-origin navigations only). */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 140ms ease both vt-out; }
::view-transition-new(root) { animation: 260ms var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal-wait { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}

@media print {
  body::before, .site-header, .site-footer, .cookie-banner, .doc-nav, .nav-progress { display: none !important; }
  body { background: #fff; color: #000; }
  .prose p, .prose li, .prose td { color: #000; }
}
