/* Lag NPC website and dashboard
   One wide grotesque (Archivo), a cool concrete page, black ink, and one amber accent.
   Discord's own colors appear only inside the Discord replicas. */

@font-face {
    font-family: "Archivo";
    src: url("fonts/archivo-var.woff") format("woff");
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
}

/* Montserrat is what the bot draws welcome banners with, so the preview matches. */
@font-face {
    font-family: "Montserrat";
    src: url("fonts/montserrat-bold.woff") format("woff");
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Montserrat";
    src: url("fonts/montserrat-regular.woff") format("woff");
    font-weight: 400;
    font-display: swap;
}

:root {
    --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;

    --page: #E8EAEE;
    --surface: #F6F7F9;
    --raised: #FFFFFF;
    --ink: #14161A;
    --ink-2: #2A2E35;
    --muted: #5B616C;
    --line: #C9CDD4;
    --line-soft: #DADDE2;
    --amber: #FFB020;
    --amber-hover: #FFC24D;
    --amber-ink: #2A1C00;
    --amber-wash: rgba(255, 176, 32, 0.16);
    --ok: #1E8F52;
    --ok-wash: rgba(30, 143, 82, 0.12);
    --bad: #C8323A;
    --bad-wash: rgba(200, 50, 58, 0.1);
    --warn: #A86600;
    --warn-wash: rgba(168, 102, 0, 0.12);
    --focus: #FFB020;
    --shadow: 0 1px 2px rgba(20, 22, 26, 0.06);
    --shadow-pop: 0 18px 40px -18px rgba(10, 12, 20, 0.45);

    --dc-bg: #313338;
    --dc-embed: #2B2D31;
    --dc-text: #DBDEE1;
    --dc-muted: #949BA4;
    --dc-white: #F2F3F5;
    --dc-blurple: #5865F2;

    --r-s: 6px;
    --r-m: 10px;
    --wrap: 1180px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --page: #1B1D21;
        --surface: #23262B;
        --raised: #2A2E34;
        --ink: #EEF0F3;
        --ink-2: #D6D9DE;
        --muted: #A2A8B2;
        --line: #3A3F47;
        --line-soft: #2F333A;
        --amber-wash: rgba(255, 176, 32, 0.14);
        --ok: #3CC27A;
        --ok-wash: rgba(60, 194, 122, 0.14);
        --bad: #F0646B;
        --bad-wash: rgba(240, 100, 107, 0.14);
        --warn: #F2B544;
        --warn-wash: rgba(242, 181, 68, 0.14);
        --shadow: none;
        --shadow-pop: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
        --dc-bg: #2B2D31;
        --dc-embed: #232428;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --page: #1B1D21;
    --surface: #23262B;
    --raised: #2A2E34;
    --ink: #EEF0F3;
    --ink-2: #D6D9DE;
    --muted: #A2A8B2;
    --line: #3A3F47;
    --line-soft: #2F333A;
    --amber-wash: rgba(255, 176, 32, 0.14);
    --ok: #3CC27A;
    --ok-wash: rgba(60, 194, 122, 0.14);
    --bad: #F0646B;
    --bad-wash: rgba(240, 100, 107, 0.14);
    --warn: #F2B544;
    --warn-wash: rgba(242, 181, 68, 0.14);
    --shadow: none;
    --shadow-pop: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
    --dc-bg: #2B2D31;
    --dc-embed: #232428;
    color-scheme: dark;
}

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

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font: 400 16px/1.55 var(--font);
    font-stretch: 100%;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

p {
    margin: 0 0 0.75em;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-stretch: 118%;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

code,
kbd {
    font-family: var(--mono);
    font-size: 0.88em;
    background: var(--amber-wash);
    border-radius: 4px;
    padding: 0.1em 0.35em;
    color: var(--ink);
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    background: var(--ink);
    color: var(--page);
    padding: 10px 14px;
    border-radius: var(--r-s);
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 14px;
}

.icon {
    width: 18px;
    height: 18px;
    flex: none;
}

.text-link {
    font-weight: 600;
    font-size: 14px;
    text-decoration: underline;
    text-decoration-color: var(--line);
    text-underline-offset: 3px;
}

.text-link:hover {
    text-decoration-color: currentColor;
}

/* ------------------------------------------------------------- controls */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: var(--r-s);
    border: 2px solid var(--ink);
    background: transparent;
    color: var(--ink);
    font: 700 15px/1 var(--font);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn .icon {
    width: 16px;
    height: 16px;
}

.btn-sm {
    min-height: 36px;
    padding: 0 12px;
    font-size: 14px;
}

.btn-amber {
    background: var(--amber);
    border-color: var(--amber);
    color: var(--amber-ink);
}

.btn-amber:hover {
    background: var(--amber-hover);
    border-color: var(--amber-hover);
}

.btn-line:hover {
    background: var(--ink);
    color: var(--page);
}

.btn-ghost {
    border-color: transparent;
    color: var(--muted);
}

.btn-ghost:hover {
    color: var(--bad);
    background: var(--bad-wash);
}

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

.btn-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--r-s);
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.icon-button:hover {
    background: var(--surface);
    border-color: var(--line);
}

.icon-button.is-small {
    width: 32px;
    height: 32px;
}

.icon-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.theme-icon-moon {
    display: none;
}

:root[data-theme="dark"] .theme-icon-sun {
    display: none;
}

:root[data-theme="dark"] .theme-icon-moon {
    display: block;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-icon-sun {
        display: none;
    }

    :root:not([data-theme="light"]) .theme-icon-moon {
        display: block;
    }
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    font-stretch: 100%;
    letter-spacing: 0;
    vertical-align: middle;
    background: var(--line-soft);
    color: var(--ink-2);
    white-space: nowrap;
}

.pill-amber {
    background: var(--amber);
    color: var(--amber-ink);
}

.pill-ok {
    background: var(--ok-wash);
    color: var(--ok);
}

.pill-bad {
    background: var(--bad-wash);
    color: var(--bad);
}

.pill-warn {
    background: var(--warn-wash);
    color: var(--warn);
}

input,
select,
textarea {
    font: inherit;
    color: var(--ink);
}

input[type="text"],
input[type="url"],
input[type="number"],
input[type="search"],
input:not([type]),
select,
textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    background: var(--raised);
    border: 1px solid var(--line);
    border-radius: var(--r-s);
    font-size: 15px;
}

textarea {
    resize: vertical;
    line-height: 1.5;
}

select {
    appearance: none;
    padding-right: 36px;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px var(--amber-wash);
}

input[type="color"] {
    width: 56px;
    height: 42px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: var(--r-s);
    background: var(--raised);
    cursor: pointer;
}

.input-suffix {
    display: flex;
    align-items: stretch;
}

.input-suffix input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    min-width: 0;
}

.input-suffix span {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-left: 0;
    border-radius: 0 var(--r-s) var(--r-s) 0;
    background: var(--surface);
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 26px;
    flex: none;
}

.switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.switch-track {
    position: absolute;
    inset: 0;
    border-radius: 13px;
    background: var(--line);
    transition: background 0.15s ease;
}

.switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease;
}

.switch input:checked + .switch-track {
    background: var(--ok);
}

.switch input:checked + .switch-track::after {
    transform: translateX(18px);
}

.switch input:focus-visible + .switch-track {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.switch input:disabled {
    cursor: not-allowed;
}

.switch input:disabled + .switch-track {
    opacity: 0.45;
}

.switch.is-static input {
    pointer-events: none;
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.check-chip {
    position: relative;
    display: inline-flex;
}

.check-chip input {
    position: absolute;
    opacity: 0;
    inset: 0;
    margin: 0;
    cursor: pointer;
}

.check-chip span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--raised);
    font-size: 14px;
    font-weight: 600;
}

.check-chip span::before {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 2px solid var(--line);
}

.check-chip input:checked + span {
    border-color: var(--ink);
    background: var(--amber-wash);
}

.check-chip input:checked + span::before {
    border-color: var(--ink);
    background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.check-chip input:focus-visible + span {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.search-field {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 420px;
}

.search-field .icon {
    position: absolute;
    left: 12px;
    color: var(--muted);
    pointer-events: none;
}

.search-field input {
    padding-left: 38px;
    min-height: 46px;
}

.search-field.is-small input {
    min-height: 38px;
}

/* -------------------------------------------------------- public header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--page) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    font-stretch: 118%;
    font-size: 18px;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.brand img {
    border-radius: 8px;
}

.site-nav {
    display: flex;
    gap: 22px;
    font-size: 15px;
}

.site-nav a {
    text-decoration: none;
    color: var(--muted);
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}

.site-nav a:hover {
    color: var(--ink);
}

.site-nav a[aria-current="page"] {
    color: var(--ink);
    border-bottom-color: var(--amber);
}

.site-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-toggle {
    display: none;
}

/* ------------------------------------------------------------ public body */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 540px);
    gap: 56px;
    align-items: center;
    padding: 56px 0 88px;
}

.hero h1 {
    font-weight: 850;
    font-stretch: 125%;
    font-size: clamp(44px, 6.2vw, 82px);
    line-height: 0.95;
    letter-spacing: -0.035em;
    margin-bottom: 24px;
}

.lede {
    font-size: 19px;
    color: var(--muted);
    max-width: 36em;
    margin-bottom: 28px;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.fine {
    font-size: 14px;
    color: var(--muted);
    max-width: 34em;
}

.live-stats {
    display: flex;
    gap: 32px;
    margin: 36px 0 0;
    padding-top: 18px;
    border-top: 2px solid var(--ink);
    max-width: 460px;
}

.live-stats div {
    display: flex;
    flex-direction: column-reverse;
}

.live-stats dd {
    margin: 0;
    font-weight: 800;
    font-stretch: 118%;
    font-size: 28px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.live-stats dt {
    font-size: 14px;
    color: var(--muted);
}

/* Discord replica */
.dc {
    background: var(--dc-bg);
    color: var(--dc-text);
    border-radius: var(--r-m);
    overflow: hidden;
    box-shadow: var(--shadow-pop);
    font-size: 15px;
    line-height: 1.4;
    font-stretch: 100%;
}

.dc-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 6px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.28);
    font-weight: 700;
    color: var(--dc-white);
    flex-wrap: wrap;
}

.dc-hash {
    color: var(--dc-muted);
    font-size: 20px;
    font-weight: 500;
}

.dc-tabs {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.dc-tabs button {
    font: 600 12px/1 var(--font);
    color: var(--dc-muted);
    background: transparent;
    border: 0;
    border-radius: 4px;
    padding: 8px 10px;
    cursor: pointer;
}

.dc-tabs button:hover {
    color: var(--dc-white);
}

.dc-tabs button[aria-selected="true"] {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.dc-body {
    height: 372px;
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

.dc.is-compact .dc-body {
    height: auto;
    padding: 14px;
}

.dc-scene {
    display: none;
    flex-direction: column;
    gap: 14px;
}

.dc-scene.is-on {
    display: flex;
}

.dc-scene.is-on .dc-msg {
    animation: dc-pop 0.35s ease both;
}

.dc-scene.is-on .dc-msg:nth-child(2) {
    animation-delay: 0.8s;
}

.dc-scene.is-on .dc-msg:nth-child(3) {
    animation-delay: 1.6s;
}

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

.dc-msg {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
}

.dc-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
    background: var(--av, #36393F);
    overflow: hidden;
}

.dc-avatar img {
    width: 40px;
    height: 40px;
}

.dc-name {
    font-weight: 600;
    color: var(--dc-white);
}

.dc-name time {
    font-size: 12px;
    font-weight: 400;
    color: var(--dc-muted);
    margin-left: 6px;
}

.dc-app {
    font-size: 10px;
    font-weight: 700;
    background: var(--dc-blurple);
    color: #fff;
    border-radius: 3px;
    padding: 1px 4px;
    margin-left: 5px;
    vertical-align: 2px;
}

.dc-sys {
    color: var(--dc-muted);
    font-size: 14px;
}

.dc-sys b {
    color: var(--dc-white);
}

.dc-mention {
    background: rgba(88, 101, 242, 0.3);
    color: #C9CDFB;
    border-radius: 3px;
    padding: 0 2px;
}

.dc-struck {
    color: var(--dc-muted);
    text-decoration: line-through;
    font-size: 14px;
}

.dc-slash {
    font-size: 13px;
    color: var(--dc-muted);
}

.dc-slash code {
    background: rgba(88, 101, 242, 0.3);
    color: #C9CDFB;
    font-family: var(--font);
}

.dc-embed {
    margin-top: 6px;
    background: var(--dc-embed);
    border-left: 4px solid var(--amber);
    border-radius: 4px;
    padding: 10px 14px;
    max-width: 440px;
    overflow-wrap: anywhere;
}

.dc-embed.is-bad {
    border-left-color: #F23F43;
}

.dc-embed.is-ok {
    border-left-color: #23A55A;
}

.dc-embed h4 {
    font-size: 15px;
    color: #fff;
    margin-bottom: 4px;
    font-stretch: 100%;
    letter-spacing: 0;
    line-height: 1.3;
}

.dc-embed p {
    margin: 0;
    font-size: 14px;
    white-space: pre-wrap;
}

.dc-quote {
    margin-top: 8px;
    padding-left: 10px;
    border-left: 3px solid #4E5058;
    font-size: 14px;
}

.dc-embed-image {
    margin-top: 10px;
    border-radius: 4px;
    max-height: 220px;
    object-fit: cover;
}

.dc-embed-footer {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--dc-muted);
}

.dc-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
    margin-top: 8px;
    font-size: 13px;
}

.dc-fields b {
    display: block;
    color: #fff;
    font-size: 12px;
}

.dc-banner {
    margin-top: 8px;
    border-radius: 6px;
    background: linear-gradient(120deg, #1E3A5F, #0F1B2D);
    min-height: 116px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    max-width: 420px;
}

.dc-banner.is-large {
    max-width: none;
}

.dc-ring {
    width: 70px;
    height: 70px;
    flex: none;
    border-radius: 50%;
    background: #E67E22;
    border: 4px solid #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 28px;
    color: #fff;
}

.dc-banner strong {
    display: block;
    font-weight: 900;
    font-size: 30px;
    font-stretch: 122%;
    color: #fff;
    line-height: 1;
}

.dc-banner small {
    color: #CFD8E6;
    font-size: 16px;
}

.dc-player {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dc-player h4 {
    margin: 0;
}

.dc-player p {
    font-size: 13px;
}

.dc-art {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    background: linear-gradient(135deg, #7B2FF7, #F107A3);
    flex: none;
}

.dc-bar-track {
    height: 4px;
    background: #4E5058;
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.dc-bar-track i {
    display: block;
    width: 34%;
    height: 100%;
    background: #fff;
}

.dc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.dc-buttons span {
    background: #4E5058;
    color: #fff;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
}

.dc-buttons span.is-primary {
    background: var(--dc-blurple);
}

.band {
    padding: 80px 0;
    border-top: 2px solid var(--ink);
}

.band h2,
.page-intro h1 {
    font-weight: 850;
    font-stretch: 122%;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}

.section-lede {
    color: var(--muted);
    font-size: 18px;
    max-width: 38em;
    margin: 0;
}

.feature-index {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 0 48px;
    margin: 40px 0 36px;
}

.feature-index h3 {
    font-size: 20px;
    font-stretch: 112%;
    padding: 22px 0;
    border-top: 1px solid var(--line);
}

.feature-index ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.feature-index li {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
}

.feature-index li p {
    margin: 0;
    color: var(--muted);
}

.feature-index.is-full {
    margin-top: 8px;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
    gap: 56px;
    align-items: center;
}

.points {
    list-style: none;
    padding: 0;
    margin: 28px 0 32px;
    display: grid;
    gap: 18px;
}

.points li {
    padding-left: 18px;
    border-left: 3px solid var(--amber);
}

.points b {
    display: block;
}

.points span {
    color: var(--muted);
}

.mock-editor {
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: var(--r-m);
    padding: 18px;
    display: grid;
    gap: 14px;
}

.mock-editor-head {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.mock-editor-head span {
    color: var(--muted);
    font-weight: 500;
    font-size: 14px;
}

.mock-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.mock-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mock-grid small,
.mock-wide small {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}

.mock-input {
    display: block;
    border: 1px solid var(--line);
    background: var(--raised);
    border-radius: var(--r-s);
    padding: 9px 12px;
    font-size: 14px;
}

.mock-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.command-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 32px;
}

.command-chips code {
    font-size: 15px;
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 9px 12px;
    border-radius: var(--r-s);
}

.final-cta {
    background: var(--ink);
    color: var(--page);
    border-radius: var(--r-m);
    padding: 52px;
    display: flex;
    gap: 32px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.final-cta h2 {
    margin: 0;
}

.final-cta p {
    margin: 10px 0 0;
    opacity: 0.72;
}

.page-intro {
    padding-top: 48px;
    padding-bottom: 32px;
}

.page-intro .lede {
    margin-bottom: 24px;
}

.page-intro.is-message {
    padding-top: 96px;
    padding-bottom: 120px;
    max-width: 760px;
}

.filter-empty {
    color: var(--muted);
    padding: 24px 0;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 80px;
    font-size: 15px;
}

.compare-table th,
.compare-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.compare-table thead th {
    font-size: 14px;
    color: var(--muted);
    border-bottom: 2px solid var(--ink);
}

.compare-table td {
    width: 140px;
    text-align: center;
}

.compare-table thead th:not(:first-child) {
    text-align: center;
}

.compare-table tbody th {
    font-weight: 500;
}

.compare-table .is-yes {
    color: var(--ok);
}

.compare-table .is-yes .icon {
    margin: 0 auto;
}

.compare-table .is-no {
    color: var(--muted);
}

.command-group {
    margin-bottom: 40px;
}

.command-group h2 {
    font-size: 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ink);
}

.command-group h2 span {
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
    font-stretch: 100%;
}

.command-group dl {
    margin: 0;
}

.command-row {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line-soft);
}

.command-row dt {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.command-row dd {
    margin: 0;
    color: var(--muted);
}

.steps {
    list-style: none;
    counter-reset: step;
    margin: 0 0 56px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.steps li {
    counter-increment: step;
    border-top: 2px solid var(--ink);
    padding-top: 16px;
}

.steps li::before {
    content: counter(step);
    display: block;
    font-weight: 850;
    font-stretch: 125%;
    font-size: 40px;
    line-height: 1;
    color: var(--amber);
    margin-bottom: 12px;
    -webkit-text-stroke: 1px var(--ink);
}

.steps h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.steps p {
    color: var(--muted);
}

.guide-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 48px;
    padding-bottom: 80px;
}

.guide-toc {
    position: sticky;
    top: 92px;
    align-self: start;
    display: grid;
    gap: 8px;
    font-size: 15px;
}

.guide-toc strong {
    margin-bottom: 4px;
}

.guide-toc a {
    color: var(--muted);
    text-decoration: none;
}

.guide-toc a:hover {
    color: var(--ink);
}

.guide-body {
    max-width: 720px;
}

.guide-body section {
    padding: 0 0 32px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 90px;
}

.guide-body h2 {
    font-size: 26px;
    margin-bottom: 14px;
}

.guide-body p {
    color: var(--ink-2);
}

.status-banner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 20px;
    border-radius: var(--r-m);
    border: 2px solid var(--ink);
    background: var(--surface);
    max-width: 760px;
}

.status-banner strong {
    font-size: 18px;
}

.status-banner p {
    margin: 2px 0 0;
    color: var(--muted);
}

.status-banner .status-dot {
    margin-top: 6px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--line);
    flex: none;
    display: inline-block;
}

.status-dot.is-ok,
.status-banner.is-ok .status-dot {
    background: var(--ok);
    box-shadow: 0 0 0 4px var(--ok-wash);
}

.status-dot.is-bad,
.status-banner.is-bad .status-dot {
    background: var(--bad);
    box-shadow: 0 0 0 4px var(--bad-wash);
}

.status-banner.is-warn .status-dot {
    background: var(--warn);
    box-shadow: 0 0 0 4px var(--warn-wash);
}

.status-list {
    border-top: 2px solid var(--ink);
    margin-bottom: 32px;
}

.status-row {
    display: grid;
    grid-template-columns: 20px 240px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.status-row span:last-child {
    color: var(--muted);
}

.status-metrics,
.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 40px;
    margin: 0 0 32px;
    align-items: flex-end;
}

.status-metrics div,
.stat-row div {
    display: flex;
    flex-direction: column-reverse;
}

.status-metrics dd,
.stat-row dd {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    font-stretch: 118%;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.status-metrics dt,
.stat-row dt {
    font-size: 14px;
    color: var(--muted);
}

.stat-row .stat-note {
    margin-left: auto;
    font-size: 13px;
    color: var(--muted);
    flex-direction: row;
}

.status-subhead {
    font-size: 22px;
    margin: 8px 0 12px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    margin-bottom: 80px;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 11px 10px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
}

.data-table thead th {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    border-bottom: 1px solid var(--line);
}

.data-table tbody th {
    font-weight: 600;
}

.prose {
    max-width: 720px;
    padding-top: 48px;
    padding-bottom: 80px;
}

.prose h1 {
    font-size: clamp(32px, 4vw, 48px);
    margin-bottom: 6px;
}

.prose-meta {
    color: var(--muted);
    margin-bottom: 32px;
}

.prose h2 {
    font-size: 21px;
    margin: 28px 0 8px;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    padding: 40px 0 56px;
    color: var(--muted);
    font-size: 14px;
}

.site-footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px 40px;
}

.footer-brand p {
    margin: 10px 0 0;
    max-width: 30em;
}

.footer-brand .brand {
    color: var(--ink);
    font-size: 16px;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    align-content: flex-start;
    justify-content: flex-end;
}

.site-footer nav a {
    text-decoration: none;
}

.site-footer nav a:hover {
    color: var(--ink);
}

.footer-legal {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 20px;
    border-top: 1px solid var(--line-soft);
}

.toast-stack {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 60;
    display: grid;
    gap: 8px;
    width: min(420px, calc(100vw - 32px));
}

.toast {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 12px 12px 14px;
    background: var(--ink);
    color: var(--page);
    border-radius: var(--r-m);
    box-shadow: var(--shadow-pop);
    font-size: 15px;
    animation: toast-in 0.25s ease both;
}

.toast > .icon {
    margin-top: 2px;
}

.toast.is-ok > .icon {
    color: #4ADE80;
}

.toast.is-bad > .icon {
    color: #FF8A8F;
}

.toast span {
    flex: 1;
}

.toast-close {
    background: transparent;
    border: 0;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 2px;
}

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

/* ------------------------------------------------------------ dashboard */

.is-app {
    min-height: 100vh;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 60px;
    padding: 0 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.topbar-spacer {
    flex: 1;
}

.server-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 6px 10px 6px 6px;
    border-radius: var(--r-s);
    text-decoration: none;
    font-weight: 700;
    border: 1px solid var(--line);
    background: var(--raised);
    max-width: 280px;
}

.server-switch span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.server-switch:hover {
    border-color: var(--ink);
}

.guild-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex: none;
    object-fit: cover;
}

.guild-icon.is-small {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.guild-icon.is-initials {
    display: grid;
    place-items: center;
    background: var(--ink);
    color: var(--page);
    font-weight: 800;
    font-size: 15px;
}

.guild-icon.is-small.is-initials {
    font-size: 11px;
}

.palette-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-s);
    background: var(--raised);
    color: var(--muted);
    font: 500 14px var(--font);
    cursor: pointer;
    min-width: 220px;
}

.palette-trigger kbd {
    margin-left: auto;
    font-size: 11px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.account-menu {
    position: relative;
}

.account-menu summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 4px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

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

.account-menu summary:hover {
    background: var(--line-soft);
}

.account-menu summary img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.account-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    width: 230px;
    background: var(--raised);
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    box-shadow: var(--shadow-pop);
    padding: 6px;
    display: grid;
    z-index: 40;
}

.account-menu-who {
    padding: 8px 10px 10px;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 4px;
}

.account-menu-who strong,
.account-menu-who small {
    display: block;
}

.account-menu-who small {
    color: var(--muted);
}

.account-menu-panel a,
.account-menu-panel button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border-radius: var(--r-s);
    text-decoration: none;
    border: 0;
    background: transparent;
    font: 500 15px var(--font);
    color: var(--ink);
    cursor: pointer;
    text-align: left;
}

.account-menu-panel a:hover,
.account-menu-panel button:hover {
    background: var(--surface);
}

.account-menu-panel form {
    margin: 0;
}

.app-body {
    display: grid;
    grid-template-columns: 244px minmax(0, 1fr);
    min-height: calc(100vh - 60px);
    background: linear-gradient(90deg, var(--surface) 243px, var(--line) 243px, var(--line) 244px, transparent 244px);
}

.app-sidebar {
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 16px 12px 40px;
    border-right: 1px solid var(--line);
    background: var(--surface);
}

.nav-group {
    margin-bottom: 14px;
}

.nav-group-label {
    display: block;
    padding: 0 10px 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.app-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--r-s);
    text-decoration: none;
    font-size: 15px;
    color: var(--ink-2);
}

.app-sidebar a .icon {
    color: var(--muted);
}

.app-sidebar a:hover {
    background: var(--line-soft);
    color: var(--ink);
}

.app-sidebar a[aria-current="page"] {
    background: var(--ink);
    color: var(--page);
    font-weight: 600;
}

.app-sidebar a[aria-current="page"] .icon {
    color: var(--amber);
}

.nav-dot {
    margin-left: auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid var(--line);
}

.nav-dot.is-on {
    background: var(--ok);
    border-color: var(--ok);
}

.nav-dot.is-amber {
    background: var(--amber);
    border-color: var(--amber);
}

.sidebar-toggle,
.sidebar-scrim {
    display: none;
}

.app-main {
    padding: 28px 36px 120px;
    max-width: 1080px;
    width: 100%;
}

.page-head {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-head h1 {
    font-size: 32px;
    font-weight: 850;
    font-stretch: 120%;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

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

.card {
    background: var(--raised);
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 16px;
    padding: 18px 22px 0;
}

.card-head h2 {
    font-size: 18px;
    font-stretch: 112%;
}

.card-head p {
    flex-basis: 100%;
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 14px;
    order: 3;
}

.card-head > .text-link,
.card-head-actions {
    margin-left: auto;
}

.card-head-actions {
    display: flex;
    gap: 8px;
}

.card-body {
    padding: 12px 22px 20px;
}

.setting-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 24px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--line-soft);
}

.setting-row:last-child {
    border-bottom: 0;
}

.setting-row.is-field {
    grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
}

.setting-row.is-block {
    grid-template-columns: minmax(0, 1fr);
}

.setting-text label {
    font-weight: 600;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.setting-text p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 14px;
    max-width: 60ch;
}

.setting-command {
    font-size: 13px !important;
}

.setting-row.is-disabled .setting-text {
    opacity: 0.6;
}

.row-group-label {
    font-size: 13px;
    font-weight: 700;
    font-stretch: 100%;
    letter-spacing: 0;
    color: var(--muted);
    margin: 18px 0 0;
    padding-bottom: 4px;
}

.row-group-label:first-child {
    margin-top: 4px;
}

.inline-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.inline-fields label {
    display: grid;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    flex: 1 1 140px;
}

.inline-fields.is-pair label {
    flex: 1 1 200px;
}

.callout {
    padding: 14px 16px;
    border-radius: var(--r-m);
    border: 1px solid var(--line);
    border-left: 4px solid var(--amber);
    background: var(--surface);
    margin-bottom: 20px;
    font-size: 15px;
}

.callout.is-muted {
    border-left-color: var(--line);
    color: var(--ink-2);
}

.callout.is-bad {
    border-left-color: var(--bad);
    background: var(--bad-wash);
}

.empty-state {
    text-align: center;
    padding: 28px 16px;
    max-width: 520px;
    margin: 0 auto;
}

.empty-state strong {
    display: block;
    font-size: 17px;
    margin-bottom: 6px;
}

.empty-state p {
    color: var(--muted);
}

.empty-state .btn {
    margin: 4px;
}

.save-bar {
    position: sticky;
    bottom: 16px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 10px 18px;
    margin-top: 8px;
    background: var(--raised);
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    box-shadow: var(--shadow-pop);
}

.save-bar-text {
    flex: 1;
    color: var(--muted);
    font-size: 14px;
}

.save-bar [data-discard] {
    visibility: hidden;
}

.save-bar.is-dirty {
    background: var(--ink);
    border-color: var(--ink);
}

.save-bar.is-dirty .save-bar-text {
    color: var(--page);
    font-weight: 600;
}

.save-bar.is-dirty [data-discard] {
    visibility: visible;
    color: var(--page);
    border-color: color-mix(in srgb, var(--page) 40%, transparent);
}

.overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 20px;
}

.overview-grid .is-wide {
    grid-column: 1 / -1;
}

.check-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.check-list li {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--line-soft);
}

.check-list li:last-child {
    border-bottom: 0;
}

.all-good {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--ok);
    font-weight: 600;
    margin: 8px 0;
}

.module-list {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 20px;
}

.module-list li {
    break-inside: avoid;
}

.module-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-soft);
    text-decoration: none;
    font-size: 15px;
}

.module-list a:hover span:first-child {
    text-decoration: underline;
}

.facts {
    margin: 0;
}

.facts div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line-soft);
}

.facts div:last-child {
    border-bottom: 0;
}

.facts dt {
    color: var(--muted);
}

.facts dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

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

.cases-table {
    margin-bottom: 0;
    font-size: 14px;
}

.cases-table td {
    vertical-align: middle;
}

.cases-table tr.is-inactive td {
    opacity: 0.55;
}

.cell-main {
    display: block;
    font-weight: 600;
}

.cell-sub {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.cell-reason {
    max-width: 280px;
    overflow-wrap: anywhere;
}

.table-search {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.table-search .search-field {
    flex: 1 1 260px;
}

.row-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.row-list li {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line-soft);
}

.row-list li:last-child {
    border-bottom: 0;
}

.row-list form {
    margin: 0;
}

.row-list-main {
    flex: 1;
    min-width: 0;
    display: grid;
}

.row-list-main span {
    color: var(--muted);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin-top: 14px;
}

.inline-form label {
    display: grid;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    flex: 1 1 160px;
}

.inline-form.is-row {
    margin: 0;
    width: 100%;
    align-items: center;
}

.inline-form.is-row input {
    flex: 1 1 200px;
    width: auto;
}

.leaderboard {
    list-style: none;
    margin: 0;
    padding: 0;
}

.leaderboard li {
    display: grid;
    grid-template-columns: 28px 36px minmax(0, 1fr) 150px 90px;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
}

.leaderboard img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.lb-rank {
    font-weight: 800;
    font-stretch: 118%;
    color: var(--muted);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.leaderboard li:nth-child(-n+3) .lb-rank {
    color: var(--ink);
}

.lb-name {
    min-width: 0;
}

.lb-name strong,
.lb-name small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-name small {
    color: var(--muted);
}

.lb-level {
    display: grid;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
}

.lb-xp {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.meter {
    display: block;
    height: 6px;
    border-radius: 3px;
    background: var(--line-soft);
    overflow: hidden;
}

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

.logging-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}

.logging-sample {
    position: sticky;
    top: 80px;
}

.sample-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 8px;
}

.history-tools {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.history-tools .search-field {
    flex: 1 1 240px;
}

.select-small select {
    min-height: 38px;
    width: auto;
}

.audit-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.audit-list li {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    padding: 12px 0 12px 12px;
    border-bottom: 1px solid var(--line-soft);
    border-left: 3px solid var(--event, var(--line));
}

.audit-list time {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
}

.audit-list time small {
    display: block;
    color: var(--muted);
    font-weight: 500;
}

.audit-list strong {
    display: block;
    margin-bottom: 2px;
}

.audit-list p {
    margin: 0;
    color: var(--ink-2);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.preset-list {
    display: grid;
    gap: 0;
}

.preset {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 20px;
    align-items: end;
    padding: 16px 0;
    border-bottom: 1px solid var(--line-soft);
}

.preset:last-child {
    border-bottom: 0;
}

.preset-text p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.preset-fields {
    grid-column: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preset-fields label {
    display: grid;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    flex: 1 1 160px;
}

.preset-fields label.is-wide {
    flex-basis: 100%;
}

.preset > .btn {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
}

.preset.is-recommended {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: var(--raised);
    border-left: 3px solid var(--amber);
}

.preset.is-recommended:last-child {
    border-bottom: 1px solid var(--line-soft);
}

.two-up {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 20px;
}

.two-up.is-wide-left {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

.upload-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.upload-form input[type="file"] {
    flex: 1 1 220px;
    font-size: 14px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.stack-form {
    display: grid;
    gap: 12px;
}

.stack-form label {
    display: grid;
    gap: 4px;
    font-weight: 600;
    font-size: 14px;
}

/* Welcome banner preview */
.banner-preview-canvas {
    position: relative;
    container-type: inline-size;
    aspect-ratio: 5 / 2;
    border-radius: var(--r-s);
    overflow: hidden;
    background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 10px, var(--line-soft) 10px, var(--line-soft) 20px);
    border: 1px solid var(--line);
}

.banner-preview-bg {
    position: absolute;
    inset: 0;
    background-size: 100% 100%;
}

.banner-preview-avatar {
    position: absolute;
    left: 6%;
    top: 21.25%;
    width: 23%;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
}

.banner-preview-text {
    position: absolute;
    left: 34%;
    right: 4%;
    top: 27.5%;
    font-family: "Montserrat", var(--font);
    line-height: 1;
}

.banner-preview-text div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

.banner-preview-text div + div {
    margin-top: 2.5cqw;
}

.banner-preview-empty {
    position: absolute;
    inset: auto 0 10px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}

/* Embed builder */
.embed-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
}

.logging-sample.is-sticky {
    top: 80px;
}

/* Server picker */
.picker {
    padding-top: 40px;
    padding-bottom: 80px;
}

.picker-head {
    display: flex;
    gap: 24px;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.picker-head h1 {
    font-size: 40px;
    font-weight: 850;
    font-stretch: 122%;
    margin-bottom: 10px;
}

.picker-head .lede {
    margin: 0;
    font-size: 17px;
}

.picker-head .search-field {
    flex: 0 1 340px;
}

.picker-section {
    margin-bottom: 36px;
}

.picker-section h2 {
    font-size: 18px;
    padding-bottom: 10px;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--ink);
}

.picker-section h2 span {
    color: var(--muted);
    font-weight: 600;
    font-stretch: 100%;
    font-size: 15px;
}

.server-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.server-tile {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: var(--r-m);
    border: 1px solid var(--line);
    background: var(--raised);
    text-decoration: none;
    min-height: 74px;
}

a.server-tile:hover {
    border-color: var(--ink);
    box-shadow: 0 0 0 1px var(--ink);
}

.server-tile > span:not(.guild-icon) {
    flex: 1;
    min-width: 0;
}

.server-tile strong,
.server-tile small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.server-tile small {
    color: var(--muted);
    font-size: 13px;
}

.server-grid.is-muted .guild-icon {
    filter: grayscale(0.7);
    opacity: 0.85;
}

/* Command palette */
.palette {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(10, 12, 16, 0.45);
    display: grid;
    place-items: start center;
    padding: 12vh 16px 16px;
}

.palette[hidden] {
    display: none;
}

.palette-box {
    width: min(620px, 100%);
    background: var(--raised);
    border-radius: var(--r-m);
    box-shadow: var(--shadow-pop);
    border: 1px solid var(--line);
    overflow: hidden;
}

.palette-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
}

.palette-input input {
    border: 0;
    min-height: 56px;
    background: transparent;
    font-size: 17px;
    padding-left: 0;
    box-shadow: none !important;
}

.palette-results {
    max-height: 50vh;
    overflow-y: auto;
    padding: 6px;
}

.palette-result {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--r-s);
    text-decoration: none;
}

.palette-result small {
    color: var(--muted);
}

.palette-result[aria-selected="true"],
.palette-result:hover {
    background: var(--amber-wash);
}

.palette-result span {
    display: grid;
}

.palette-result em {
    font-style: normal;
    font-size: 12px;
    color: var(--muted);
    align-self: center;
}

.palette-empty {
    padding: 18px;
    color: var(--muted);
}

/* ------------------------------------------------------------------ music */

.subnav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    margin: -8px 0 22px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
}

.subnav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 15px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
}

.subnav a .icon {
    width: 16px;
    height: 16px;
}

.subnav a:hover {
    color: var(--ink);
}

.subnav a[aria-current="page"] {
    color: var(--ink);
    border-bottom-color: var(--amber);
}

.music-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}

.music-shell > :only-child,
.music-shell > .card,
.music-shell > .two-up,
.music-shell > .table-search,
.music-shell > .callout,
.music-shell > .station-grid,
.music-shell > .pager,
.music-shell > .empty-state,
.music-shell > p,
.music-shell > .spotify-head {
    grid-column: 1 / -1;
}

.player {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    padding: 28px;
    border-radius: var(--r-m);
    background: #15171B;
    color: #F3F4F6;
    overflow: hidden;
    min-height: 320px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.player-glow {
    position: absolute;
    inset: -40px;
    z-index: -1;
    opacity: 0.45;
}

.player-glow img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(60px) saturate(1.4);
}

.player-glow::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(21, 23, 27, 0.4), rgba(21, 23, 27, 0.85));
}

.player-art img {
    width: 240px;
    height: 240px;
    border-radius: var(--r-m);
    object-fit: cover;
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8);
}

.player.is-idle .player-art img {
    opacity: 0.6;
}

.player-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(243, 244, 246, 0.72);
    margin-bottom: 10px;
}

.player-status .status-dot {
    width: 9px;
    height: 9px;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: none;
}

.player-status .status-dot.is-ok {
    background: #4ADE80;
}

.player h2 {
    font-size: clamp(24px, 3vw, 34px);
    font-stretch: 112%;
    line-height: 1.1;
    margin-bottom: 6px;
    overflow-wrap: anywhere;
}

.player-artist {
    color: rgba(243, 244, 246, 0.72);
    margin-bottom: 18px;
}

.player-progress input[type="range"],
.player-volume input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 20px;
    background: transparent;
    padding: 0;
    border: 0;
    min-height: 0;
    cursor: pointer;
    --fill: 0%;
}

.player-progress input[type="range"]::-webkit-slider-runnable-track,
.player-volume input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--amber) var(--fill), rgba(255, 255, 255, 0.2) var(--fill));
}

.player-progress input[type="range"]::-moz-range-track,
.player-volume input[type="range"]::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
}

.player-progress input[type="range"]::-moz-range-progress,
.player-volume input[type="range"]::-moz-range-progress {
    height: 4px;
    border-radius: 2px;
    background: var(--amber);
}

.player-progress input[type="range"]::-webkit-slider-thumb,
.player-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -5px;
    border-radius: 50%;
    background: #fff;
    border: 0;
}

.player-progress input[type="range"]::-moz-range-thumb,
.player-volume input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 0;
}

.player-progress input:disabled {
    opacity: 0.4;
    cursor: default;
}

.player-times {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(243, 244, 246, 0.64);
    font-variant-numeric: tabular-nums;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 14px 0 12px;
}

.player-controls .icon-button {
    color: #F3F4F6;
}

.player-controls .icon-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: transparent;
}

.play-button {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 0;
    background: var(--amber);
    color: var(--amber-ink);
    cursor: pointer;
    margin: 0 6px;
}

.play-button:hover {
    background: var(--amber-hover);
}

.play-button .icon {
    width: 22px;
    height: 22px;
}

.play-button .icon-play {
    display: none;
    margin-left: 3px;
}

.play-button[data-player-action="resume"] .icon-play {
    display: block;
}

.play-button[data-player-action="resume"] .icon-pause {
    display: none;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 260px;
    color: rgba(243, 244, 246, 0.8);
}

.player-volume output {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    min-width: 40px;
}

.player-feedback {
    min-height: 1.4em;
    margin: 8px 0 0;
    font-size: 14px;
}

.player .player-feedback {
    color: rgba(243, 244, 246, 0.8);
}

.player-feedback.is-error {
    color: var(--bad);
}

.player .player-feedback.is-error {
    color: #FF8A8F;
}

.up-next {
    background: var(--raised);
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    padding: 16px;
}

.up-next-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.up-next-head h2 {
    font-size: 17px;
}

.up-next-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.up-next-list li {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-soft);
    min-width: 0;
}

.up-next-list li:last-child {
    border-bottom: 0;
}

.up-next-list img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    flex: none;
}

.up-next-list span {
    min-width: 0;
}

.up-next-list strong,
.up-next-list small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}

.up-next-list small {
    color: var(--muted);
    font-size: 13px;
}

.up-next-list .is-empty {
    color: var(--muted);
    font-size: 14px;
}

.queue-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.queue-item {
    display: grid;
    grid-template-columns: 20px 28px 44px minmax(0, 1fr) 32px;
    gap: 10px;
    align-items: center;
    padding: 8px 6px;
    border-bottom: 1px solid var(--line-soft);
    border-radius: var(--r-s);
    background: var(--raised);
    cursor: grab;
}

.queue-item.is-dragging {
    opacity: 0.5;
    box-shadow: 0 0 0 2px var(--amber);
}

.queue-grip {
    color: var(--muted);
    display: grid;
}

.queue-pos {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    text-align: right;
    font-size: 14px;
}

.queue-item img {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    object-fit: cover;
}

.queue-text {
    min-width: 0;
}

.queue-text strong,
.queue-text small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-text small {
    color: var(--muted);
    font-size: 13px;
}

.queue-empty {
    color: var(--muted);
    padding: 20px 0;
    text-align: center;
}

.playlist-list {
    display: grid;
    gap: 8px;
}

.playlist {
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    padding: 0 14px;
}

.playlist summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    cursor: pointer;
    list-style: none;
}

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

.playlist[open] summary {
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 12px;
}

.playlist > form {
    margin-bottom: 12px;
}

.station-grid {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.station {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    background: var(--raised);
    min-width: 0;
}

.station img,
.station-mark {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    flex: none;
    display: grid;
    place-items: center;
    background: var(--surface);
    color: var(--muted);
}

.station-text {
    flex: 1;
    min-width: 0;
}

.station-text strong,
.station-text small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-text small {
    color: var(--muted);
    font-size: 13px;
}

.spotify-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    background: var(--raised);
    margin-bottom: 14px;
}

.pager {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--muted);
}

.preset-choice {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}

.preset-option {
    display: grid;
    gap: 2px;
    text-align: left;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    background: var(--raised);
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

.preset-option small {
    color: var(--muted);
}

.preset-option:hover {
    border-color: var(--ink);
}

.preset-option[aria-pressed="true"] {
    border-color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--ink);
    background: var(--amber-wash);
}

.bar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bar-list li {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 44px;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
}

.bar-list b {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.source-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

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

@media (max-width: 1100px) {
    .logging-layout,
    .embed-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .logging-sample {
        position: static;
        order: -1;
    }

    .logging-layout .logging-sample {
        order: 0;
    }

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

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

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

    .feature-index h3 {
        border-top: 2px solid var(--ink);
        margin-top: 20px;
    }

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

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

    .guide-toc {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 8px 16px;
    }

    .app-body {
        grid-template-columns: minmax(0, 1fr);
        background: none;
    }

    .app-sidebar {
        position: fixed;
        top: 60px;
        left: 0;
        bottom: 0;
        height: auto;
        width: 280px;
        z-index: 35;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: var(--shadow-pop);
    }

    .has-sidebar.sidebar-open .app-sidebar {
        transform: none;
    }

    .sidebar-toggle {
        display: inline-grid;
    }

    .has-sidebar.sidebar-open .sidebar-scrim {
        display: block;
        position: fixed;
        inset: 60px 0 0;
        z-index: 34;
        background: rgba(10, 12, 16, 0.4);
    }

    .app-main {
        padding: 24px 20px 120px;
    }

    .palette-trigger {
        min-width: 0;
    }

    .overview-grid,
    .two-up,
    .two-up.is-wide-left {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hide-sm {
        display: none !important;
    }

    .site-header-inner {
        gap: 12px;
        height: 60px;
    }

    .nav-toggle {
        display: inline-grid;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--page);
        border-bottom: 1px solid var(--line);
        padding: 8px 16px 16px;
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        padding: 12px 0;
        border-bottom: 1px solid var(--line-soft);
    }

    .site-nav a[aria-current="page"] {
        border-bottom-color: var(--line-soft);
        font-weight: 700;
    }

    .hero {
        padding: 24px 0 56px;
        gap: 36px;
    }

    .lede {
        font-size: 17px;
    }

    .live-stats {
        gap: 22px;
    }

    .live-stats dd {
        font-size: 24px;
    }

    .dc-body {
        height: 352px;
        padding: 10px 12px 14px;
    }

    .dc-tabs {
        margin-left: 0;
        width: 100%;
    }

    .dc-banner {
        min-height: 96px;
        padding: 12px 14px;
    }

    .dc-ring {
        width: 54px;
        height: 54px;
        font-size: 22px;
    }

    .dc-banner strong {
        font-size: 24px;
    }

    .band {
        padding: 56px 0;
    }

    .feature-index li,
    .command-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

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

    .final-cta {
        padding: 32px 22px;
    }

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

    .compare-table td {
        width: 74px;
    }

    .compare-table th,
    .compare-table td {
        padding: 12px 6px;
    }

    .status-row {
        grid-template-columns: 20px minmax(0, 1fr);
    }

    .status-row span:last-child {
        grid-column: 2;
    }

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

    .site-footer nav {
        justify-content: flex-start;
    }

    .app-topbar {
        gap: 6px;
        padding: 0 8px;
    }

    .server-switch {
        max-width: 46vw;
    }

    .palette-trigger {
        border: 0;
        background: transparent;
        padding: 0 8px;
    }

    .page-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-head h1 {
        font-size: 26px;
    }

    .card-head,
    .card-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .setting-row,
    .setting-row.is-field {
        grid-template-columns: minmax(0, 1fr);
    }

    .setting-row:not(.is-field):not(.is-block) {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .module-list {
        columns: 1;
    }

    .check-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .leaderboard li {
        grid-template-columns: 24px 32px minmax(0, 1fr) 70px;
    }

    .leaderboard .lb-level {
        display: none;
    }

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

    .preset > .btn {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
    }

    .player {
        grid-template-columns: minmax(0, 1fr);
        padding: 20px;
        text-align: center;
    }

    .player-art img {
        width: min(220px, 60vw);
        height: auto;
        aspect-ratio: 1;
        margin: 0 auto;
    }

    .player-status,
    .player-controls {
        justify-content: center;
    }

    .player-volume {
        margin: 0 auto;
    }

    .save-bar {
        bottom: 8px;
    }

    .save-bar-text {
        font-size: 13px;
    }

    .picker-head h1 {
        font-size: 30px;
    }

    .stat-row .stat-note {
        margin-left: 0;
        width: 100%;
    }

    /* Cases become stacked cards on phones instead of a squeezed table. */
    .cases-table thead {
        display: none;
    }

    .cases-table,
    .cases-table tbody,
    .cases-table tr,
    .cases-table td {
        display: block;
    }

    .cases-table tr {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 4px 10px;
        padding: 12px 0;
        border-bottom: 1px solid var(--line-soft);
    }

    .cases-table td {
        padding: 0;
        border: 0;
    }

    .cases-table td:nth-child(3) {
        grid-column: 3;
        grid-row: 1;
    }

    .cases-table td:nth-child(4) {
        grid-column: 1 / -1;
        max-width: none;
    }

    .cases-table td:nth-child(5),
    .cases-table td:nth-child(6) {
        grid-column: auto / span 1;
        color: var(--muted);
        font-size: 13px;
    }

    .cases-table td:nth-child(5) {
        grid-column: 1 / 3;
    }

    .cases-table td:nth-child(7) {
        grid-column: 1 / -1;
    }

    .save-bar:not(.is-dirty) .save-bar-text {
        display: none;
    }

    .save-bar:not(.is-dirty) {
        justify-content: flex-end;
    }

    .app-body {
        overflow-x: clip;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- multi-role picker ---------- */
.role-picker {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.role-picker-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}

.role-picker-head .search-field {
    flex: 1 1 220px;
    max-width: 320px;
}

.role-picker-count {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.role-picker-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 2px;
    overscroll-behavior: contain;
}

.role-chip span {
    min-height: 32px;
    font-size: 13px;
}

.role-chip span::before {
    display: none;
}

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

.role-chip input:checked + span {
    border-color: var(--ink);
    background: var(--amber-wash);
    box-shadow: inset 0 0 0 1px var(--ink);
}

.role-chip[hidden] {
    display: none;
}

/* ---------- owner panel ---------- */
.owner-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--amber);
    color: var(--amber-ink, #14161A);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.owner-badge .icon {
    width: 14px;
    height: 14px;
}

.picker-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.pill-info {
    background: var(--amber-wash);
    color: var(--ink);
}

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

.owner-servers {
    list-style: none;
    margin: 0 0 60px;
    padding: 0;
    display: grid;
    gap: 10px;
}

.owner-server {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: var(--raised);
}

.owner-server[hidden] {
    display: none;
}

.owner-server-main {
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 0;
    flex: 1 1 380px;
}

.owner-server-main strong {
    display: block;
    font-size: 16px;
}

.owner-server-main small {
    display: block;
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.owner-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.owner-pills .pill {
    white-space: normal;
}

.owner-server-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.owner-inline,
.owner-menu-form {
    margin: 0;
    display: inline-flex;
}

.btn.is-danger {
    color: var(--bad);
}

.owner-menu {
    position: relative;
}

.owner-menu > summary {
    list-style: none;
    cursor: pointer;
}

.owner-menu > summary::-webkit-details-marker {
    display: none;
}

.owner-menu-panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    right: 0;
    min-width: 170px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--raised);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    display: grid;
}

.owner-menu-item {
    width: 100%;
    text-align: left;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: none;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
}

.owner-menu-item:hover,
.owner-menu-item:focus-visible {
    background: var(--amber-wash);
}

.radio-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.radio-card {
    position: relative;
    display: block;
}

.radio-card input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
}

.radio-card span {
    display: grid;
    gap: 4px;
    height: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.radio-card small {
    color: var(--muted);
    font-size: 13px;
}

.radio-card input:checked + span {
    border-color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--ink);
    background: var(--amber-wash);
}

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

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin: 4px 0;
}

.inline-form label.is-grow {
    flex: 3 1 240px;
}

.error-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: grid;
}

.error-list li {
    border-bottom: 1px solid var(--line-soft);
}

.error-list summary {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    align-items: baseline;
    padding: 10px 0;
    cursor: pointer;
    font-size: 14px;
}

.error-when {
    color: var(--muted);
    font-size: 12px;
    min-width: 70px;
}

.error-text {
    color: var(--ink-2);
    flex: 1 1 260px;
    overflow-wrap: anywhere;
}

.error-guild {
    font-size: 12px;
}

.error-list pre {
    margin: 0 0 12px;
    padding: 12px;
    max-height: 320px;
    overflow: auto;
    border-radius: 10px;
    background: var(--surface);
    font-family: var(--mono);
    font-size: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.data-table.is-compact {
    margin-bottom: 0;
}

.data-table.is-compact .cell-sub {
    display: block;
    color: var(--bad);
    font-weight: 400;
    font-size: 12px;
}

@media (max-width: 700px) {
    .owner-server-actions {
        width: 100%;
    }

    .owner-menu-panel {
        left: 0;
        right: auto;
    }

    .data-table.is-compact th,
    .data-table.is-compact td {
        padding: 9px 6px;
        font-size: 13px;
    }
}

.app-main .status-banner {
    margin-bottom: 24px;
}

.field-help {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.status-help {
    margin: 20px 0 80px;
}

/* Owner panel looks different from a server's dashboard: dark chrome with an amber edge,
   in both light and dark mode, so it's always clear you're acting as the bot owner. */
.is-owner .app-topbar,
.is-owner .app-sidebar {
    --ink: #EEF0F3;
    --ink-2: #C9CDD4;
    --muted: #9AA1AC;
    --line: #3A3F47;
    --line-soft: #2C3036;
    --surface: #1B1D21;
    --raised: #23262B;
    --page: #121417;
    background: #121417;
    color: var(--ink);
}

.is-owner .app-topbar {
    border-bottom: 3px solid var(--amber);
}

.is-owner .app-sidebar {
    border-right-color: #2C3036;
}

.is-owner .app-sidebar a[aria-current="page"] {
    background: var(--amber);
    color: #2A1C00;
}

.is-owner .app-sidebar a[aria-current="page"] .icon {
    color: #2A1C00;
}

.owner-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: -8px 0 18px;
    padding: 9px 14px;
    border-radius: 10px;
    background: #121417;
    color: #EEF0F3;
    font-size: 14px;
    border-left: 3px solid var(--amber);
}

.owner-strip .icon {
    width: 16px;
    height: 16px;
    color: var(--amber);
}

.owner-strip a {
    margin-left: auto;
    color: var(--amber);
    font-weight: 700;
}

.back-link {
    margin: 0 0 8px;
    font-size: 14px;
}

.back-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    text-decoration: none;
}

.back-link .icon {
    width: 16px;
    height: 16px;
}

.owner-server-head h1 {
    margin-bottom: 2px;
}

/* ---------- insights ---------- */
.viz-card {
    --series-1: #B87500;
    --series-2: #2A78D6;
}

@media (prefers-color-scheme: dark) {
    :root:where(:not([data-theme="light"])) .viz-card {
        --series-1: #C98500;
        --series-2: #3987E5;
    }
}

:root[data-theme="dark"] .viz-card {
    --series-1: #C98500;
    --series-2: #3987E5;
}

.range-tabs {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--raised);
}

.range-tabs a {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
    text-decoration: none;
}

.range-tabs a[aria-current="page"] {
    background: var(--ink);
    color: var(--page);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.kpi {
    display: grid;
    gap: 2px;
    align-content: start;
    padding: 14px 16px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: var(--raised);
}

.kpi-label {
    font-size: 13px;
    color: var(--muted);
}

.kpi strong {
    font-size: 26px;
    font-weight: 800;
    font-stretch: 112%;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.delta {
    font-size: 12px;
    font-weight: 700;
}

.delta.is-up {
    color: var(--ok);
}

.delta.is-down {
    color: var(--bad);
}

.delta.is-neutral {
    color: var(--muted);
}

.viz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
    gap: 0 18px;
}

.viz-frame {
    margin-top: 6px;
}

.viz-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.viz-svg .viz-gridline {
    stroke: var(--line-soft);
    stroke-width: 1;
}

.viz-axis {
    fill: var(--muted);
    font-size: 12px;
    font-family: var(--font);
}

.viz-s1 {
    fill: var(--series-1);
    background: var(--series-1);
}

.viz-s2 {
    fill: var(--series-2);
    background: var(--series-2);
}

.viz-line {
    fill: none;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.viz-s1-stroke {
    stroke: var(--series-1);
}

.viz-s2-stroke {
    stroke: var(--series-2);
}

.viz-end {
    stroke: var(--raised);
    stroke-width: 2;
}

.viz-hit {
    fill: transparent;
}

.viz-hit:hover {
    fill: var(--ink);
    fill-opacity: 0.06;
}

.viz-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 13px;
    color: var(--ink-2);
}

.viz-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.viz-legend i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.viz-table {
    margin-top: 8px;
    font-size: 13px;
}

.viz-table summary {
    cursor: pointer;
    color: var(--muted);
}

.viz-table table {
    margin-top: 8px;
}

.viz-table .data-table th,
.viz-table .data-table td {
    padding: 6px 8px;
}

.rank-bars {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.rank-bars li {
    display: grid;
    grid-template-columns: minmax(90px, 160px) 1fr auto;
    gap: 12px;
    align-items: center;
    font-size: 14px;
}

.rank-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-track {
    height: 10px;
    border-radius: 999px;
    background: var(--line-soft);
    overflow: hidden;
}

.rank-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--series-1);
}

.rank-value {
    font-variant-numeric: tabular-nums;
    color: var(--ink-2);
    min-width: 40px;
    text-align: right;
}

.insights-note {
    margin: 8px 0 60px;
}

.is-owner .app-body {
    background: linear-gradient(90deg, #121417 244px, transparent 244px);
}

@media (max-width: 980px) {
    .is-owner .app-body {
        background: none;
    }
}
