/* NeoBan.
 *
 * Flat and dark. No gradients on surfaces, no drop shadows, no rounded-everything: a panel is a
 * solid fill with a one-pixel border, and depth is done with the border rather than with a blur.
 * The only gradient in the whole site is the mark itself, which is the artwork, and the only glow
 * is the one behind it.
 *
 * Purple is the interface colour — links, focus, the current item, anything you can press. Orange
 * is the mark's colour and is used sparingly beside it, so the two never compete for the same job.
 *
 * Written out rather than pulled from a framework. The site is a dozen pages of forms; a classless
 * framework would be eighty kilobytes to restyle and then fight.
 */

:root {
    color-scheme: dark;

    --bg: #08070a;
    --bg-glow-1: rgba(168, 85, 247, 0.16);
    --bg-glow-2: rgba(255, 113, 0, 0.10);

    --panel: #111014;
    --panel-2: #17151c;
    --line: #26222e;
    --line-bright: #362f42;

    --text: #ece9f1;
    --muted: #918aa0;
    --dim: #6d6679;

    --accent: #a855f7;
    --accent-dim: #7c3aed;
    --accent-soft: rgba(168, 85, 247, 0.13);
    --orange: #ff7100;
    --orange-soft: rgba(255, 113, 0, 0.13);

    --ok: #34d399;
    --warn: #fbbf24;
    --bad: #fb7185;

    --radius: 10px;
    --gap: 1.25rem;

    --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
    --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    /* The two glows from the supplied preview, fixed so they sit behind the page rather than
       scrolling away from it. */
    background:
        radial-gradient(circle at 18% -10%, var(--bg-glow-1), transparent 45%),
        radial-gradient(circle at 88% 8%, var(--bg-glow-2), transparent 40%),
        var(--bg);
    background-attachment: fixed;
}

h1, h2, h3 {
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
    font-weight: 650;
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }

p { margin: 0 0 0.75rem; }
p:last-child { margin-bottom: 0; }

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

a:hover {
    text-decoration: underline;
}

code {
    font-family: var(--mono);
    font-size: 0.85em;
    color: var(--text);
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 0.1rem 0.35rem;
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 2rem 0;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.wrap {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding-inline: 20px;
}

.muted { color: var(--muted); }
.dim { color: var(--dim); font-size: 0.85rem; }

/* Visible to a screen reader and to nobody else: for a label whose field is obvious by position
   and would only repeat itself on screen. Clipped rather than display:none, which is skipped. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ----------------------------------------------------------------- top bar */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 7, 10, 0.85);
    backdrop-filter: blur(12px);
}

.topbar .wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 68px;
}

/* The mark is the home link. It carries no text: the icon is the brand and the word is the
   wordmark on the landing page, so repeating it here would say the same thing twice. */
.brand {
    display: inline-flex;
    align-items: center;
    flex: none;
}

.brand img {
    display: block;
    width: 40px;
    height: 40px;
}

.topbar nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.topbar nav form {
    display: flex;
}

.topbar nav a {
    padding: 0.4rem 0.75rem;
    border-radius: 7px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.topbar nav a:hover {
    color: var(--text);
    background: var(--panel-2);
    text-decoration: none;
}

.topbar nav a[aria-current="page"] {
    color: var(--text);
    background: var(--accent-soft);
}

/* The signed-in name, between the buttons and the sign-out. Not a link: it is a label. */
.whoami {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0.75rem;
    margin-left: 0.4rem;
    border-left: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.whoami strong {
    color: var(--text);
    font-weight: 600;
}

/* ------------------------------------------------------------------ buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: var(--accent);
    color: #120a1d;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn:hover {
    background: var(--accent-dim);
    border-color: var(--accent-dim);
    color: #fff;
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    border-color: var(--line-bright);
    color: var(--text);
}

.btn-ghost:hover {
    background: var(--panel-2);
    border-color: var(--accent);
    color: var(--text);
}

.btn-danger {
    background: transparent;
    border-color: var(--line-bright);
    color: var(--bad);
}

.btn-danger:hover {
    background: rgba(251, 113, 133, 0.12);
    border-color: var(--bad);
    color: var(--bad);
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.82rem;
}

.btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

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

.hero {
    min-height: calc(100vh - 68px);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 3rem 0 4rem;
}

.hero-mark {
    width: min(78vw, 620px);
    margin: 0 auto 1.75rem;
    /* The one glow in the site, and it belongs to the artwork rather than to a surface. */
    filter: drop-shadow(0 0 22px rgba(255, 113, 0, 0.20))
            drop-shadow(0 0 44px rgba(168, 85, 247, 0.16));
    animation: float 6s ease-in-out infinite;
}

.hero-mark img {
    display: block;
    width: 100%;
    height: auto;
}

.hero p.lead {
    max-width: 46ch;
    margin: 0 auto 2rem;
    font-size: 1.05rem;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-mark { animation: none; }
}

/* ------------------------------------------------------------------ layout */

.page {
    padding: 2.5rem 0 4rem;
    /* The top bar is sticky, so an anchored jump has to stop short of it or it lands with the
       heading hidden underneath. */
    scroll-margin-top: 84px;
}

.page-head {
    margin-bottom: 1.75rem;
}

.page-head p {
    color: var(--muted);
    margin: 0;
}

/* Every section is spaced from whatever precedes it, not only from another section — the first
   one usually follows a stat row or a page heading, and those need the same air. */
section {
    margin-top: 2.5rem;
}

section:first-child {
    margin-top: 0;
}

/* The account and admin areas: a sidebar of sections and the section itself. */
.error-report { margin-bottom: 1rem; }
.error-report summary { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; cursor: pointer; }
.stack-trace { overflow: auto; max-height: 32rem; padding: 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.shell {
    display: grid;
    grid-template-columns: 216px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    padding: 2.5rem 0 4rem;
}

.sidebar {
    position: sticky;
    top: 88px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.5rem;
}

.sidebar h2 {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dim);
    margin: 0.75rem 0.75rem 0.5rem;
    font-weight: 600;
}

.sidebar a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 7px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar a:hover {
    background: var(--panel-2);
    color: var(--text);
    text-decoration: none;
}

/* The current section. A left bar rather than a filled block: it marks the row without turning
   the sidebar into a wall of colour. */
.sidebar a[aria-current="page"] {
    background: var(--accent-soft);
    color: var(--text);
    box-shadow: inset 2px 0 0 var(--accent);
}

.sidebar .rule {
    height: 1px;
    background: var(--line);
    margin: 0.5rem 0.4rem;
}

@media (max-width: 820px) {
    .shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }

    .sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .sidebar h2, .sidebar .rule { display: none; }
    .sidebar a { flex: 1 1 auto; text-align: center; }
}

/* ------------------------------------------------------------------ panels */

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.panel + .panel {
    margin-top: 1rem;
}

.panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.panel-head h2, .panel-head h3 {
    margin: 0;
}

.grid-2 {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

/* ------------------------------------------------------------------- plans */

.plans {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.plan {
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
}

/* The plan somebody is most likely to want. One border colour, no badge, no "most popular". */
.plan.featured {
    border-color: var(--accent-dim);
}

.plan h3 {
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
}

.plan .kind {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.price {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.price b {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.price span {
    color: var(--muted);
    font-size: 0.85rem;
}

.plan ul {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.plan li {
    padding-left: 1.1rem;
    position: relative;
    margin-bottom: 0.4rem;
}

.plan li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.plan form, .plan .plan-foot, .plan > .btn {
    margin-top: auto;
}

.plan > .btn {
    width: 100%;
}

/* ----------------------------------------------------------------- confirm */

/* The purchase confirmation. A native <dialog>, so the backdrop, the focus trap and Escape are
   the browser's job rather than ours. */
.confirm {
    width: min(92vw, 27rem);
    padding: 1.5rem;
    border: 1px solid var(--line-bright);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--text);
}

.confirm::backdrop {
    background: rgba(4, 3, 6, 0.72);
}

.confirm h3 {
    margin-bottom: 0.25rem;
}

.confirm > form > p {
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.confirm table {
    margin-bottom: 1.25rem;
}

/* The consequence worth reading before the money moves. Orange rather than purple: it is the
   one thing on the page that is telling rather than offering. */
.confirm .note {
    margin-bottom: 1.25rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line-bright);
    border-left: 3px solid var(--orange);
    border-radius: 8px;
    background: var(--panel-2);
    color: var(--muted);
    font-size: 0.86rem;
}

.confirm-actions {
    justify-content: flex-end;
}

/* -------------------------------------------------------------------- stat */

.stats {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
}

.stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
}

.stat b {
    display: block;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.stat span {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--dim);
}

/* The headline number on a page: the credit balance, the seat count. */
.figure {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

.figure b {
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
}

.figure span {
    color: var(--muted);
    font-size: 0.9rem;
}

/* ------------------------------------------------------------------ tables */

.scroll {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    text-align: left;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

thead th {
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--dim);
    font-weight: 600;
    border-bottom-color: var(--line-bright);
}

tbody tr:last-child th,
tbody tr:last-child td {
    border-bottom: 0;
}

/* Label/value rows, so the labels stop growing with the longest one. */
tbody th[scope="row"] {
    width: 1%;
    white-space: nowrap;
    color: var(--muted);
    font-weight: 500;
}

table form {
    margin: 0;
}

/* ------------------------------------------------------------------ badges */

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border: 1px solid currentColor;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-ok       { color: var(--ok); }
.badge-accent   { color: var(--accent); }
.badge-warn     { color: var(--warn); }
.badge-bad      { color: var(--bad); }
.badge-idle     { color: var(--dim); }

/* ------------------------------------------------------------------- forms */

form { margin: 0; }

label {
    display: block;
    margin-bottom: 0.9rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
}

input[type="text"],
input[type="search"],
input[type="number"],
input[type="email"] {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.55rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--line-bright);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-size: 0.92rem;
}

input::placeholder {
    color: var(--dim);
}

input:focus {
    border-color: var(--accent);
    outline: none;
}

.row {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.row > label {
    flex: 1 1 12rem;
    margin-bottom: 0;
}

.form-grid {
    display: grid;
    gap: 0 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}

/* ------------------------------------------------------------------- flash */

.flash {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    margin: 1.25rem 0 0;
    padding: 0.8rem 1rem;
    border: 1px solid var(--line-bright);
    border-left-width: 3px;
    border-radius: 8px;
    background: var(--panel);
    font-size: 0.92rem;
}

.flash-success { border-left-color: var(--ok); }
.flash-error   { border-left-color: var(--bad); }

/* ------------------------------------------------------------------ misc */

/* A secret shown exactly once: an API key or a voucher code. */
.secret {
    display: block;
    margin: 0.75rem 0;
    padding: 0.8rem;
    background: var(--bg);
    border: 1px solid var(--accent-dim);
    border-radius: 8px;
    font-family: var(--mono);
    font-size: 0.88rem;
    color: var(--text);
    word-break: break-all;
    user-select: all;
}

.empty {
    padding: 2.25rem 1rem;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line-bright);
    border-radius: var(--radius);
}

.empty p { margin-bottom: 1rem; }
.empty p:last-child { margin-bottom: 0; }

.stack > * + * {
    margin-top: 1rem;
}

/* A row of two things that should sit apart, wrapping to a stack when narrow. */
.between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Seats used out of seats available: a bar, because "1 of 1" reads as a fraction only after
   you have thought about it, and the bar reads as full immediately. */
.meter {
    height: 6px;
    border-radius: 3px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    overflow: hidden;
    margin-top: 0.5rem;
}

.meter i {
    display: block;
    height: 100%;
    background: var(--accent);
}

.meter.full i {
    background: var(--orange);
}

footer.foot {
    border-top: 1px solid var(--line);
    padding: 1.5rem 0;
    color: var(--dim);
    font-size: 0.82rem;
}

footer.foot .wrap {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* ------------------------------------------------------------------ Minecraft accounts */

/* The empty state is three numbered steps, because an empty list is the moment somebody needs
   to be told where accounts come from — and it is not this page. */
.mc-steps {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}

.mc-step {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.mc-step b {
    display: inline-grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    margin-bottom: 0.75rem;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.9rem;
}

.mc-step h3 { font-size: 1rem; }
.mc-step p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.mc-accounts {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}

/* Panels stacked in a column are spaced by the rule above; panels in a grid are spaced by the
   grid's gap, and the extra margin pushed every second one out of line with its row. */
.grid-2 > .panel + .panel,
.mc-accounts > .panel + .panel { margin-top: 0; }

.mc-account {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
        "avatar who    badge"
        "meta   meta   meta"
        "remove remove remove";
    gap: 0.9rem 0.85rem;
    align-items: center;
}

/* Orange, the mark's colour, rather than the purple used for things you press: the monogram is
   identity, not a control. */
.mc-avatar {
    grid-area: avatar;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 8px;
    background: var(--orange-soft);
    border: 1px solid rgba(255, 113, 0, 0.35);
    color: var(--orange);
    font-weight: 700;
    font-size: 1.15rem;
}

.mc-account-stale .mc-avatar {
    background: var(--panel-2);
    border-color: var(--line-bright);
    color: var(--dim);
}

.mc-who { grid-area: who; min-width: 0; }
.mc-who h3 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }

.mc-uuid {
    display: block;
    /* Metadata, not a code sample: none of the inline-code box. */
    background: none;
    border: 0;
    padding: 0;
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mc-account > .badge { grid-area: badge; }

/* Two of them now: which kind of account this is, and how it is doing. Stacked and right-aligned
   so the pair reads as one column however long either word is. */
.mc-badges {
    grid-area: badge;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

/* Filled rather than outlined, unlike the status badges beside it: the kind is a fact about the
   account and the status is a condition, and one of the two should not look clickable-adjacent. */
.mc-kind {
    border-color: transparent;
    font-weight: 700;
}

.mc-kind-microsoft { background: var(--orange-soft); color: var(--orange); }
.mc-kind-offline   { background: var(--accent-soft); color: var(--accent); }

/* The two pasted-token kinds share a colour, and it is the warning one: what they have in common
   is that they stop working tomorrow, which is the thing worth noticing in a list. */
.mc-kind-session_token,
.mc-kind-xbox_token { background: rgba(251, 191, 36, 0.13); color: var(--warn); }

/* One field and a button on one line, wrapping to two on a narrow screen rather than shrinking the
   field to nothing. */
.mc-add {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin: 1rem 0 0.75rem;
}

.mc-add input {
    flex: 1 1 12rem;
    min-width: 0;
    margin: 0;
    font-family: var(--mono);
}

.mc-add .btn { flex: 0 0 auto; }

/* The kind picker keeps its own width; the field takes the rest. */
.mc-add select { flex: 0 0 auto; margin: 0; }

.mc-meta {
    grid-area: meta;
    display: flex;
    /* Four facts now, and a card is as narrow as one column of the grid: they wrap rather than
       squeezing the labels into two lines each. */
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin: 0;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
}

.mc-meta dt { color: var(--dim); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.mc-meta dd { margin: 0; font-size: 0.9rem; }

.mc-remove { grid-area: remove; justify-self: end; margin: 0; }

/* ------------------------------------------------------------------ 2026 UI */

/* A restrained application shell: neutral surfaces, clear hierarchy, and no decorative motion. */
:root {
    --bg: #0b0d10;
    --bg-glow-1: transparent;
    --bg-glow-2: transparent;
    --panel: #12151a;
    --panel-2: #181c22;
    --line: #262b33;
    --line-bright: #343b46;
    --text: #f3f4f6;
    --muted: #a1a8b3;
    --dim: #737b87;
    --accent: #8b7cf6;
    --accent-dim: #7567dd;
    --accent-soft: rgba(139, 124, 246, 0.12);
    --radius: 8px;
}

body {
    background: var(--bg);
    font-size: 14px;
    line-height: 1.55;
}

h1 { font-size: clamp(1.65rem, 2vw, 2rem); }
h2 { font-size: 1.05rem; }

.wrap { max-width: 1180px; }

.topbar {
    background: rgba(11, 13, 16, 0.94);
    backdrop-filter: blur(16px);
}

.topbar .wrap { height: 60px; }
.brand img { width: 36px; height: 36px; }

.topbar nav a {
    padding: 0.45rem 0.7rem;
    font-size: 0.86rem;
}

.topbar nav a[aria-current="page"] {
    background: transparent;
    color: var(--text);
}

.topbar nav a[aria-current="page"]::after {
    content: "";
    display: block;
    height: 2px;
    margin-top: 0.25rem;
    border-radius: 1px;
    background: var(--accent);
}

.user-chip {
    max-width: 15rem;
    margin-left: 0.35rem;
    padding-left: 0.8rem;
    overflow: hidden;
    border-left: 1px solid var(--line);
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--line-bright);
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.fallback-nav { display: flex; align-items: center; gap: 1rem; height: 60px; }

.hero {
    min-height: min(760px, calc(100vh - 60px));
    padding-block: 4.5rem;
}

.hero-mark {
    margin-bottom: 2rem;
    filter: none;
    animation: none;
}

.hero p.lead { font-size: 1rem; }

.shell {
    grid-template-columns: 205px minmax(0, 1fr);
    gap: 2.5rem;
    padding-block: 2.25rem 4rem;
    padding-inline: 20px;
}

.sidebar {
    top: 80px;
    padding: 0;
    border: 0;
    background: transparent;
}

.sidebar-title {
    margin: 0 0 1.1rem;
    color: var(--text);
    font-size: 1rem;
    font-weight: 650;
}

.nav-label {
    margin: 0.9rem 0.65rem 0.3rem;
    color: var(--dim);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.sidebar a {
    padding: 0.48rem 0.65rem;
    border-radius: 6px;
    font-size: 0.86rem;
}

.sidebar a[aria-current="page"] {
    box-shadow: none;
    background: var(--panel-2);
    color: var(--text);
}

.sidebar .rule { margin: 0.85rem 0; }

.page-head {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}

section { margin-top: 2rem; }

.panel, .plan, .stat, .mc-step, .mc-account {
    border-color: var(--line);
    box-shadow: none;
}

.panel { padding: 1.1rem; }
.stats { gap: 0.6rem; }
.stat { padding: 0.9rem; }
.stat b { font-size: 1.45rem; }

.btn {
    min-height: 36px;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    color: #fff;
}

.btn:hover { color: #fff; }
.btn-ghost { color: var(--text); }

th, td { padding: 0.65rem 0.75rem; }
tbody tr:hover { background: rgba(255, 255, 255, 0.018); }

.section-head, .node-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.section-head { margin-bottom: 0.75rem; }
.section-head h2 { margin: 0; }
.node-status { color: var(--muted); font-size: 0.85rem; }

.key-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 1.25rem;
}

.key-values span, .key-values strong { display: block; }
.key-values span { color: var(--dim); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.key-values strong { margin-top: 0.2rem; font-size: 0.92rem; font-weight: 600; }

.diagnostics {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.diagnostics > summary {
    width: fit-content;
    color: var(--muted);
    cursor: pointer;
    font-weight: 600;
}

.build-chip {
    margin-left: 0.35rem;
    padding: 0.15rem 0.4rem;
    border: 1px solid var(--line-bright);
    border-radius: 5px;
    background: var(--panel);
    color: var(--muted);
    font: 0.72rem var(--mono);
    cursor: pointer;
}

.build-chip:hover, .build-chip.is-copied { border-color: var(--accent); color: var(--text); }

@media (max-width: 820px) {
    .topbar .wrap { flex-wrap: wrap; height: auto; min-height: 60px; padding-block: 10px; }
    .nav-toggle { display: inline-flex; }
    .topbar nav {
        display: none;
        width: 100%;
        margin: 0;
        padding: 0.5rem 0 0.25rem;
        border-top: 1px solid var(--line);
    }
    .topbar nav.is-open { display: flex; }
    .user-chip { margin-left: auto; }
    .shell { padding-inline: 20px; }
    .sidebar { display: block; overflow-x: auto; white-space: nowrap; }
    .sidebar-title, .nav-label, .sidebar .rule { display: none; }
    .nav-group { display: inline-flex; gap: 0.2rem; margin-right: 0.35rem; }
    .sidebar a { display: inline-block; }
}

@media (max-width: 520px) {
    .topbar nav { align-items: stretch; flex-direction: column; }
    .topbar nav a { width: 100%; }
    .user-chip { width: 100%; max-width: none; margin: 0.4rem 0 0; padding: 0.6rem 0; border: 0; }
    .shell { padding-inline: 16px; }
    .page { padding-block: 2rem 3rem; }
}

/* ------------------------------------------------------------------- cosmetics */

select,
input[type="file"] {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.5rem 0.65rem;
    background: var(--bg);
    border: 1px solid var(--line-bright);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-size: 0.92rem;
}

select:focus,
input[type="file"]:focus {
    border-color: var(--accent);
    outline: none;
}

label.check {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    color: var(--text);
}

.pixelated {
    image-rendering: pixelated;
}

.cosmetic-summary {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.cosmetic-summary .btn {
    margin-left: auto;
}

.cosmetic-filter {
    display: flex;
    gap: 0.4rem;
    margin: var(--gap) 0;
    flex-wrap: wrap;
}

.cosmetic-filter a {
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.88rem;
}

.cosmetic-filter a[aria-current="page"] {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--text);
}

.cosmetic-grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}

.cosmetic-card {
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.cosmetic-card.is-equipped {
    border-color: var(--accent);
}

.cosmetic-preview {
    display: grid;
    place-items: center;
    padding: 1rem;
    background:
        radial-gradient(circle at 50% 40%, var(--accent-soft), transparent 70%),
        var(--panel-2);
    border-bottom: 1px solid var(--line);
}

.cosmetic-preview canvas {
    width: 160px;
    height: 160px;
    image-rendering: pixelated;
}

.cosmetic-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.9rem 1rem 1rem;
    flex: 1;
}

.cosmetic-body p {
    margin: 0;
}

.cosmetic-title {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
}

.cosmetic-title h3 {
    margin: 0;
    font-size: 1rem;
}

.cosmetic-meta {
    font-size: 0.85rem;
}

.cosmetic-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: auto;
}

.cosmetic-thumb {
    width: 64px;
    height: 32px;
    object-fit: contain;
    background: var(--panel-2);
    border-radius: 4px;
}

.cosmetic-templates {
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.cosmetic-templates img {
    width: 100%;
    background:
        repeating-conic-gradient(var(--panel-2) 0% 25%, var(--bg) 0% 50%) 0 0 / 16px 16px;
    border-radius: 6px;
}

.cosmetic-templates h3 {
    margin-top: 0;
}

.cosmetic-default {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin: 0 0.5rem 0.5rem 0;
}

.cosmetic-tints {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
}

.cosmetic-tints input[type="color"] {
    width: 3rem;
    height: 2rem;
    padding: 0;
    border: none;
    background: none;
}

/* ------------------------------------------------------------------ support */

textarea {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.65rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--line-bright);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-size: 0.92rem;
    line-height: 1.55;
    resize: vertical;
}

textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.inline-form { display: inline; margin: 0; }

/* Customer page */
.support-notice {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--gap);
    border-left: 3px solid var(--accent);
}
.support-notice h3 { margin: 0 0 0.35rem; }
.support-notice p { margin: 0; }

.support-form { display: grid; gap: 1.1rem; }
.support-form .between p { margin: 0; }

.support-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    border: 0;
}
.support-categories legend { margin-bottom: 0.6rem; font-weight: 600; color: var(--text); }
.support-category {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    cursor: pointer;
}
.support-category:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.support-category input { margin-top: 0.2rem; accent-color: var(--accent); }
.support-category strong, .support-category .dim { display: block; }
.support-category .dim { font-size: 0.82rem; margin-top: 0.15rem; }

/* Queue */
.support-stats { margin-bottom: var(--gap); }
.support-stats a.stat { color: inherit; text-decoration: none; }
.support-stats a.stat:hover { border-color: var(--line-bright); }
.stat-warn b { color: var(--warn); }
.stat-bad b { color: var(--bad); }
.support-views { margin-bottom: 0.75rem; }
.support-filters { margin-bottom: 1.25rem; align-items: flex-end; }
.support-filters select, .support-filters input { margin-top: 0; }

.ticket-number {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--muted);
    margin-right: 0.35rem;
}
.ticket-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-top: 0.2rem; font-size: 0.8rem; }
.ticket-table tr.is-waiting td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
.ticket-waiting { font-size: 0.75rem; margin-top: 0.2rem; color: var(--orange); }

.tag {
    display: inline-block;
    padding: 0.05rem 0.45rem;
    border-radius: 4px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.72rem;
    text-decoration: none;
}
.tag:hover { color: var(--text); }

.priority { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; }
.priority-low { color: var(--dim); }
.priority-normal { color: var(--muted); }
.priority-high { color: var(--warn); }
.priority-urgent { color: var(--bad); }

/* Ticket */
.ticket-head h1 { margin-bottom: 0.4rem; }
.ticket-head > p:first-child { margin: 0 0 0.35rem; font-size: 0.85rem; }
.ticket-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.85rem; }

.ticket-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 21rem);
    gap: var(--gap);
    align-items: start;
}
@media (max-width: 1100px) {
    .ticket-layout { grid-template-columns: minmax(0, 1fr); }
}
.ticket-main { display: grid; gap: var(--gap); min-width: 0; }
.ticket-side { display: grid; gap: var(--gap); min-width: 0; }
.ticket-side h3 { margin: 0 0 0.6rem; }
.ticket-side form.panel { display: grid; gap: 0.7rem; }
.ticket-side label { font-size: 0.85rem; }
.ticket-side select { width: 100%; margin-top: 0.3rem; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.message {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}
.is-customer .message { border-left: 3px solid var(--orange); }
.is-staff .message { border-left: 3px solid var(--accent); }
.is-note .message {
    border: 1px dashed rgba(251, 191, 36, 0.55);
    background: rgba(251, 191, 36, 0.06);
}
.message-head { display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: 0.75rem; }
.message-head strong { margin-right: 0.35rem; }
.message-head .dim { font-size: 0.8rem; }
.avatar {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--panel-2);
    border: 1px solid var(--line-bright);
    font-weight: 700;
    font-size: 0.85rem;
}
.is-staff .avatar { background: var(--accent-soft); color: var(--accent); }
.is-customer .avatar { background: var(--orange-soft); color: var(--orange); }
.message-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 0.93rem;
    line-height: 1.6;
}
.timeline-event {
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.2rem 0.4rem 0.2rem 1rem;
    border-left: 2px solid var(--line-bright);
    font-size: 0.82rem;
    color: var(--muted);
}

.attachments, .deliveries, .participants, .ticket-history { list-style: none; margin: 0; padding: 0; }
.attachments { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.9rem; font-size: 0.85rem; }
.attachments li { display: grid; gap: 0.2rem; max-width: 12rem; }
.attachment-thumb img {
    display: block;
    max-width: 12rem;
    max-height: 8rem;
    border-radius: 6px;
    border: 1px solid var(--line);
}
.deliveries {
    margin-top: 0.9rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 0.35rem;
    font-size: 0.8rem;
}
.deliveries li { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }

.composer h3 { margin: 0; }
.composer { display: grid; gap: 0.7rem; }
.composer-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.composer-canned select { margin-top: 0; min-width: 14rem; }
.composer-hint { margin: 0; font-size: 0.8rem; }
.composer-status { display: flex; gap: 0.5rem; align-items: center; font-size: 0.85rem; }
.composer-status select { margin-top: 0; width: auto; }
.composer-note { border-style: dashed; }

.participants { display: grid; gap: 0.9rem; margin: 0.75rem 0; }
.participants li.is-removed strong { color: var(--dim); text-decoration: line-through; }
.participant-add { margin: 0; }
.participant-add input { margin-top: 0; }
input[type="email"] { box-sizing: border-box; }

.account-card {
    margin-top: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
    font-size: 0.85rem;
}
.account-card-head { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.account-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 0.75rem;
    margin: 0.65rem 0;
}
.account-facts dt { color: var(--dim); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.account-facts dd { margin: 0.1rem 0 0; font-weight: 600; }

.ticket-history { display: grid; gap: 0.6rem; font-size: 0.86rem; }

/* Held mail */
.held-mail { margin-bottom: 0.75rem; }
.held-mail summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    cursor: pointer;
}
.held-body {
    margin: 0.9rem 0;
    padding: 0.85rem;
    max-height: 22rem;
    overflow: auto;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.held-actions { gap: 1rem; flex-wrap: wrap; }
.held-actions form { margin: 0; }
.held-actions input { margin-top: 0; }

.canned-preview { font-size: 0.8rem; max-width: 34rem; }
