:root {
    color-scheme: dark;
    --cs-bg: #171116;
    --cs-surface: #241820;
    --cs-surface-raised: #33212A;
    --cs-border: #59404A;
    --cs-text: #FFF4D8;
    --cs-text-muted: #D1BFA5;
    --cs-cheddar: #F2AD38;
    --cs-cheddar-hover: #FFC65B;
    --cs-cheese: #FFD166;
    --cs-cheese-hover: #FFDF8C;
    --cs-plum: #542B3A;
    --cs-plum-hover: #71374A;
    --cs-danger: #FF8F86;
    --cs-success: #A8D992;
    --cs-border-soft: rgba(89, 64, 74, 0.78);
    --cs-cheese-glow: rgba(255, 209, 102, 0.09);
    --background: var(--cs-bg);
    --surface: var(--cs-surface);
    --surface-raised: var(--cs-surface-raised);
    --text: var(--cs-text);
    --muted: var(--cs-text-muted);
    --accent: var(--cs-cheddar);
    --accent-soft: var(--cs-surface-raised);
    --border: var(--cs-border);
    --warning: var(--cs-cheese);
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; background: var(--cs-bg); }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--cs-text);
    font-family: "DM Sans", Arial, sans-serif;
    background: radial-gradient(ellipse at 50% 5%, var(--cs-cheese-glow), transparent 38rem), var(--cs-bg);
}

button, input, textarea { font: inherit; }
button { color: inherit; }
.page-shell { width: min(100% - 48px, 1040px); margin: 0 auto; }

.topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--cs-border);
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--cs-text); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; display: block; object-fit: contain; border-radius: 9px; }
.brand-light { color: var(--cs-text-muted); font-weight: 500; }
.server-status, .eyebrow, .card-kicker { font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.server-status { display: inline-flex; align-items: center; gap: 8px; color: var(--cs-text-muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cs-cheddar); box-shadow: 0 0 12px rgba(242, 173, 56, .35); }

.hero { padding: 75px 0 50px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 19px; color: var(--cs-cheese); }
.eyebrow-line { width: 23px; height: 1px; background: currentColor; }
h1 { margin: 0; font-size: clamp(43px, 7vw, 72px); font-weight: 600; letter-spacing: -.065em; line-height: 1; }
h1 span { color: var(--cs-cheese); }
.hero-copy { max-width: 660px; margin: 22px 0 0; color: var(--cs-text-muted); font-size: 16px; line-height: 1.7; }

.directory { padding-bottom: 80px; }
.directory-toolbar { display: grid; gap: 17px; padding: 18px; border: 1px solid var(--cs-border); border-radius: 13px; background: var(--cs-surface); }
.search-box { min-height: 50px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 1px solid var(--cs-border); border-radius: 9px; background: var(--cs-bg); }
.search-icon { color: var(--cs-cheese); font-size: 24px; line-height: 1; transform: rotate(-20deg); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--cs-text); background: transparent; font-size: 14px; }
.search-box input::placeholder { color: var(--cs-text-muted); }
kbd { min-width: 23px; padding: 3px 6px; border: 1px solid var(--cs-border); border-radius: 5px; color: var(--cs-text-muted); text-align: center; font: 11px "DM Mono", Consolas, monospace; }
.category-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-button { padding: 8px 11px; border: 1px solid var(--cs-border); border-radius: 7px; color: var(--cs-text-muted); background: transparent; cursor: pointer; font-size: 11px; transition: color .16s ease, background .16s ease, border-color .16s ease; }
.filter-button:hover { border-color: var(--cs-cheese); color: var(--cs-text); }
.filter-button.active { border-color: var(--cs-cheese); color: var(--cs-cheese); background: var(--cs-surface-raised); }

.results-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 31px 0 15px; }
.card-kicker { margin: 0 0 5px; color: var(--cs-cheese); font-size: 9px; }
.results-heading h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.04em; }
.result-count { color: var(--cs-text-muted); font-size: 12px; }
.command-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; align-items: start; }
.command-card { min-width: 0; padding: 20px; border: 1px solid var(--cs-border); border-radius: 12px; background: linear-gradient(145deg, rgba(255, 244, 216, .035), transparent 70%), var(--cs-surface); box-shadow: 0 12px 35px rgba(0, 0, 0, .18); }
.command-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.command-card h3 { margin: 0; color: var(--cs-text); font: 500 18px "DM Mono", Consolas, monospace; letter-spacing: -.04em; overflow-wrap: anywhere; }
.status { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; padding: 5px 7px; border: 1px solid var(--cs-border); border-radius: 999px; color: var(--cs-text-muted); background: var(--cs-surface-raised); font-size: 9px; font-weight: 600; white-space: nowrap; }
.status > span { width: 6px; height: 6px; border-radius: 50%; background: var(--cs-text-muted); }
.status-verified { border-color: var(--cs-success); color: var(--cs-success); background: var(--cs-surface-raised); }
.status-verified > span { background: var(--cs-success); }
.status-needs-testing { border-color: var(--cs-cheddar); color: var(--cs-cheddar); background: var(--cs-surface-raised); }
.status-needs-testing > span { background: var(--cs-cheddar); }
.status-unconfirmed { border-color: var(--cs-danger); color: var(--cs-danger); background: var(--cs-surface-raised); }
.status-unconfirmed > span { background: var(--cs-danger); }
.command-description { margin: 14px 0 15px; color: var(--cs-text-muted); font-size: 12px; line-height: 1.65; }
.command-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--cs-border-soft); }
.copy-button, .details-toggle { padding: 7px 9px; border: 1px solid var(--cs-border); border-radius: 6px; background: var(--cs-surface-raised); cursor: pointer; font-size: 10px; }
.copy-button { color: var(--cs-cheese); }
.details-toggle { color: var(--cs-text); }
.copy-button:hover, .details-toggle:hover { border-color: var(--cs-cheddar); }
.details-toggle span { margin-left: 4px; color: var(--cs-cheese); }
.command-details { margin-top: 15px; padding-top: 2px; border-top: 1px solid var(--cs-border-soft); }
.command-details dl { display: grid; gap: 0; margin: 0; }
.command-details dl > div { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--cs-border-soft); }
.command-details dl > div:last-child { border-bottom: 0; }
.command-details dt { color: var(--cs-text-muted); font-size: 10px; font-weight: 600; }
.command-details dd { min-width: 0; margin: 0; color: var(--cs-text); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.no-alias { color: var(--cs-text-muted); font-size: 10px; }
.empty-state, .loading-note { grid-column: 1 / -1; margin: 0; padding: 30px; border: 1px dashed var(--cs-border); border-radius: 10px; color: var(--cs-text-muted); text-align: center; font-size: 13px; }
.search-box:focus-within { border-color: var(--cs-cheddar); box-shadow: 0 0 0 3px rgba(242, 173, 56, .18); }

:focus-visible { outline: 2px solid var(--cs-cheddar); outline-offset: 3px; }
a { color: var(--cs-cheese); text-underline-offset: 3px; }
a:hover { color: var(--cs-cheese-hover); }

@media (max-width: 760px) {
    .page-shell { width: min(100% - 32px, 620px); }
    .hero { padding: 60px 0 38px; }
    .command-grid { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
    .page-shell { width: calc(100% - 24px); }
    .topbar { min-height: 66px; }
    .server-status { font-size: 8px; }
    .directory-toolbar { padding: 12px; }
    .filter-button { font-size: 10px; }
    .command-card { padding: 16px; }
    .command-details dl > div { grid-template-columns: 82px minmax(0, 1fr); gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; }
}