/* ==========================================================================
   Neos Community Site — interface
   Hand-built design system: midnight navy, aurora ribbons, hairline glass.
   ========================================================================== */

:root {
    --bg:            #050810;
    --bg-deep:       #03050b;
    --panel:         rgba(17, 26, 44, 0.72);
    --panel-2:       rgba(22, 33, 54, 0.6);
    --panel-solid:   #0a1120;
    --line:          rgba(150, 186, 240, 0.18);
    --line-2:        rgba(140, 178, 235, 0.26);
    --line-hot:      rgba(90, 165, 255, 0.55);

    --text:          #eaf1fb;
    --text-2:        #c3d0e4;
    --muted:         #8698b6;

    --blue:          #2c74ff;
    --blue-2:        #58a0ff;
    --cyan:          #4fe3ff;
    --violet:        #7d6bff;
    --green:         #37d69b;
    --amber:         #f6b545;
    --red:           #ff6070;
    --discord:       #5865f2;

    --grad-hot:      linear-gradient(120deg, #2c74ff 0%, #22a7f0 52%, #4fe3ff 100%);
    --grad-line:     linear-gradient(90deg, transparent, rgba(90, 165, 255, 0.45), transparent);

    --r-lg: 20px;
    --r:    14px;
    --r-sm: 10px;

    --sh-1: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
    --sh-2: 0 26px 70px -34px rgba(0, 0, 0, 0.95);
    --sh-glow: 0 18px 46px -22px rgba(44, 116, 255, 0.55);

    --shell: 1200px;
    /* One typeface site-wide: Poppins (bold, uppercase-friendly, true italics). */
    --font:    'Poppins', 'Segoe UI', system-ui, sans-serif;
    --head:    var(--font);
    --body:    var(--font);
    --mono:    var(--font);
    --display: var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.66;
    letter-spacing: 0.005em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1 0 auto; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea, optgroup { font: inherit; }
code { font-family: var(--mono); font-size: 0.86em; color: var(--cyan); background: rgba(79, 227, 255, 0.08); padding: 0.12em 0.4em; border-radius: 6px; }
::selection { background: rgba(44, 116, 255, 0.4); color: #fff; }

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

h1, h2, h3, h4 {
    font-family: var(--head);
    line-height: 1.12;
    margin: 0 0 0.45em;
    letter-spacing: -0.025em;
    font-weight: 700;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.h1 { font-size: clamp(2.1rem, 4.6vw, 3.35rem); }
.h2 { font-size: clamp(1.55rem, 2.9vw, 2.1rem); }
.h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.015em; }
.h4 {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
    margin-bottom: 0.9em;
}

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.ta-r  { text-align: right; }
.link  {
    color: var(--blue-2);
    font-weight: 600;
    font-family: var(--head);
    font-size: 0.92rem;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.link:hover { color: var(--cyan); border-color: rgba(79, 227, 255, 0.5); }

.prose { color: var(--text-2); }
.prose.small { font-size: 0.93rem; line-height: 1.68; }

.lede {
    max-width: 62ch;
    font-size: 1.06rem;
    color: var(--text-2);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--head);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--blue-2);
    margin-bottom: 0.85em;
}
.eyebrow.small { font-size: 0.66rem; margin: 0 0 0.7em; color: var(--muted); }
.eyebrow .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 0 4px rgba(79, 227, 255, 0.14);
}

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 24px; }
.section { padding: 62px 0; position: relative; }
.section-tight { padding: 30px 0 0; }
.narrow { max-width: 640px; }

/* ---------- aurora backdrop ---------- */
.aurora {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(1100px 620px at 84% -14%, rgba(44, 116, 255, 0.24), transparent 68%),
        radial-gradient(820px 480px at 4% -4%, rgba(79, 227, 255, 0.13), transparent 70%),
        radial-gradient(900px 700px at 50% 108%, rgba(125, 107, 255, 0.12), transparent 72%),
        linear-gradient(180deg, #070c18 0%, #050810 44%, var(--bg-deep) 100%);
}

/* faint engineering grid keeps the dark space from looking empty */
.aurora::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(140, 178, 235, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(140, 178, 235, 0.045) 1px, transparent 1px);
    background-size: 74px 74px;
    mask-image: radial-gradient(1200px 700px at 50% 0%, #000 0%, transparent 78%);
    -webkit-mask-image: radial-gradient(1200px 700px at 50% 0%, #000 0%, transparent 78%);
}

.aurora-band {
    position: absolute;
    left: -20%;
    width: 140%;
    height: 150px;
    filter: blur(30px);
    border-radius: 50%;
    opacity: 0.5;
    mix-blend-mode: screen;
    will-change: transform;
}
.band-1 {
    top: -60px;
    background: linear-gradient(100deg, transparent 6%, rgba(44, 116, 255, 0.6) 30%, rgba(79, 227, 255, 0.5) 56%, transparent 90%);
    animation: drift 26s ease-in-out infinite;
}
.band-2 {
    top: 90px;
    height: 118px;
    opacity: 0.32;
    background: linear-gradient(82deg, transparent 10%, rgba(125, 107, 255, 0.55) 38%, rgba(44, 116, 255, 0.42) 68%, transparent 94%);
    animation: drift 34s ease-in-out infinite reverse;
}
.band-3 {
    top: 250px;
    height: 84px;
    opacity: 0.18;
    background: linear-gradient(90deg, transparent 14%, rgba(79, 227, 255, 0.45) 48%, transparent 88%);
    animation: drift 42s ease-in-out infinite;
}

.aurora-stars {
    position: absolute;
    inset: 0;
    opacity: 0.45;
    background-image:
        radial-gradient(1.2px 1.2px at 12% 18%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 31% 7%, rgba(255,255,255,0.55), transparent),
        radial-gradient(1.2px 1.2px at 58% 24%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 79% 11%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 91% 31%, rgba(255,255,255,0.45), transparent),
        radial-gradient(1px 1px at 21% 43%, rgba(255,255,255,0.35), transparent),
        radial-gradient(1px 1px at 68% 49%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 44% 62%, rgba(255,255,255,0.22), transparent);
}

@keyframes drift {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(-3deg) scaleY(1); }
    50%      { transform: translate3d(-6%, 34px, 0) rotate(2.5deg) scaleY(1.2); }
}

/* ---------- entrance polish ----------
   Content is never hidden by scripts: elements animate in from a visible
   baseline, so a slow connection or blocked JS can never leave a blank page. */
[data-reveal] { animation: rise 0.6s cubic-bezier(.22,.61,.36,1) both; }
@keyframes rise {
    from { opacity: 0.001; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .aurora-band { animation: none; }
    html { scroll-behavior: auto; }
    [data-reveal] { animation: none; }
    * { transition-duration: 0.01ms !important; }
}

/* ---------- buttons ---------- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 22px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    font-family: var(--head);
    font-size: 0.92rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.16s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.22s ease, color 0.2s ease;
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 9px 16px; font-size: 0.86rem; }

.btn-primary {
    border-color: transparent;
    background: var(--grad-hot);
    color: #04101f;
    box-shadow: var(--sh-glow);
}
.btn-primary:hover { box-shadow: 0 22px 52px -20px rgba(79, 227, 255, 0.7); }

.btn-ghost { background: rgba(255, 255, 255, 0.035); }
.btn-ghost:hover { background: rgba(88, 160, 255, 0.14); border-color: var(--line-hot); }

.btn-discord { background: var(--discord); border-color: transparent; color: #fff; box-shadow: 0 16px 40px -22px rgba(88, 101, 242, 0.9); }
.btn-discord:hover { background: #4a56e6; }

/* Sign-in button — clean emerald-green, no brand iconography */
.btn-signin {
    background: linear-gradient(180deg, #16d17a, #0fa866);
    border-color: transparent;
    color: #fff;
    font-weight: 700;
    letter-spacing: .01em;
    box-shadow: 0 14px 34px -20px rgba(22, 209, 122, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform .18s ease, box-shadow .25s ease, background .25s ease;
}
.btn-signin:hover {
    background: linear-gradient(180deg, #1ae88a, #12bd77);
    box-shadow: 0 18px 40px -18px rgba(22, 209, 122, 1), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}
.btn-signin:active { transform: translateY(0); box-shadow: 0 8px 20px -14px rgba(22, 209, 122, 0.9); }



.btn-danger { border-color: rgba(255, 96, 112, 0.4); color: #ffb4bc; background: rgba(255, 96, 112, 0.08); }
.btn-danger:hover { background: rgba(255, 96, 112, 0.18); }

.is-disabled { opacity: 0.42; pointer-events: none; }

.row-gap { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- surfaces ---------- */
.card, .panel {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--sh-1), var(--sh-2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.panel { padding: 26px 28px; border-radius: var(--r-lg); }
.card  { padding: 22px; transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease; }

/* hairline highlight along the top edge of every surface */
.card::before, .panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(160, 205, 255, 0.36), transparent);
    border-radius: inherit;
}

.card:hover {
    border-color: var(--line-2);
    transform: translateY(-3px);
    box-shadow: var(--sh-1), 0 34px 74px -34px rgba(0, 0, 0, 1);
}

.flash {
    margin: 18px 0 0;
    padding: 13px 18px;
    border-radius: var(--r);
    border: 1px solid rgba(55, 214, 155, 0.32);
    background: rgba(55, 214, 155, 0.1);
    color: #b7f2da;
    font-size: 0.94rem;
}
.flash-error { border-color: rgba(255, 96, 112, 0.35); background: rgba(255, 96, 112, 0.1); color: #ffc0c7; }

/* ---------- topbar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}
.topbar.is-stuck {
    background: rgba(6, 10, 20, 0.82);
    border-bottom-color: var(--line);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.topbar-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 78px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-logo {
    width: 44px; height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(44, 116, 255, 0.5));
}
.brand-text { display: grid; line-height: 1.05; font-family: var(--head); }
.brand-text strong { font-size: 1.02rem; font-weight: 750; letter-spacing: -0.02em; }
.brand-text em {
    font-style: normal;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.34em;
    color: var(--blue-2);
}

.nav { display: flex; align-items: center; gap: 26px; }
.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-link {
    position: relative;
    padding: 9px 14px;
    border-radius: 999px;
    font-family: var(--head);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-2);
    transition: color 0.2s ease, background 0.2s ease;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-link.is-active { color: var(--text); }
.nav-link.is-active::after {
    content: "";
    position: absolute;
    left: 14px; right: 14px; bottom: 1px;
    height: 2px;
    border-radius: 2px;
    background: var(--grad-hot);
}
.nav-link-out::before {
    content: "";
    display: inline-block;
    width: 6px; height: 6px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--discord);
    vertical-align: 1px;
}

.nav-side { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
    display: none;
    width: 44px; height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    padding: 11px 11px;
}
.nav-toggle span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* user chip + dropdown */
.user-menu { position: relative; }
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 5px 13px 5px 5px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.user-chip:hover { border-color: var(--line-hot); background: rgba(88, 160, 255, 0.12); }
.user-chip img { width: 30px; height: 30px; border-radius: 50%; }
.user-chip-name { font-family: var(--head); font-size: 0.88rem; font-weight: 650; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip svg { opacity: 0.6; transition: transform 0.2s ease; }
.user-menu.is-open .user-chip svg { transform: rotate(180deg); }

.user-drop {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 234px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: rgba(9, 15, 27, 0.97);
    box-shadow: var(--sh-2);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 70;
}
.user-menu.is-open .user-drop { opacity: 1; visibility: visible; transform: none; }
.user-drop-head {
    display: grid;
    gap: 2px;
    padding: 10px 12px 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
}
.user-drop-head strong { font-family: var(--head); }
.user-drop a {
    display: block;
    padding: 9px 12px;
    border-radius: var(--r-sm);
    font-size: 0.92rem;
    color: var(--text-2);
    transition: background 0.16s ease, color 0.16s ease;
}
.user-drop a:hover { background: rgba(88, 160, 255, 0.14); color: var(--text); }
.user-drop a.danger { color: #ff97a2; }
.user-drop a.danger:hover { background: rgba(255, 96, 112, 0.14); color: #ffc0c7; }

/* ---------- hero ---------- */
.hero { padding: 58px 0 56px; }
.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: center;
    gap: 48px;
}
.hero-title { font-size: clamp(2.3rem, 5.1vw, 3.9rem); margin-bottom: 0.35em; }
.hero-title::after {
    content: "";
    display: block;
    width: 92px;
    height: 3px;
    margin-top: 26px;
    border-radius: 3px;
    background: var(--grad-hot);
}
.hero-sub { max-width: 52ch; font-size: 1.1rem; color: var(--text-2); margin-bottom: 1.8em; }

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 40px;
    margin: 42px 0 0;
    padding-top: 26px;
    border-top: 1px solid var(--line);
}
.hero-stats div { display: grid; gap: 2px; }
.hero-stats dt {
    font-family: var(--head);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.19em;
    text-transform: uppercase;
    color: var(--muted);
}
.hero-stats dd {
    margin: 0;
    font-family: var(--head);
    font-size: 1.6rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.hero-art { position: relative; justify-self: center; }
.hero-art::before {
    content: "";
    position: absolute;
    inset: 6% 6%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(44, 116, 255, 0.42), transparent 66%);
    filter: blur(38px);
}
.hero-art img {
    position: relative;
    width: 100%;
    max-width: 470px;
    filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.7));
    animation: float 9s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(-8px); }
    50%      { transform: translateY(8px); }
}
@media (prefers-reduced-motion: reduce) { .hero-art img { animation: none; } }

/* ---------- page head (inner pages) ---------- */
.page-head {
    padding: 56px 0 12px;
    position: relative;
}
.page-head .h1 { margin-bottom: 0.4em; }
.page-head::after {
    content: "";
    display: block;
    max-width: var(--shell);
    margin: 40px auto 0;
    height: 1px;
    background: var(--grad-line);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}
.section-head .h2 { margin-bottom: 0; }
.section-head > p { max-width: 40ch; margin: 0; font-size: 0.94rem; }

/* ---------- pills / tags ---------- */
.pill, .tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: rgba(255, 255, 255, 0.04);
    font-family: var(--head);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-2);
    white-space: nowrap;
}
.pill-pending  { border-color: rgba(246, 181, 69, 0.4);  background: rgba(246, 181, 69, 0.1);  color: #ffd894; }
.pill-approved { border-color: rgba(55, 214, 155, 0.42); background: rgba(55, 214, 155, 0.1); color: #9df0cd; }
.pill-denied   { border-color: rgba(255, 96, 112, 0.42); background: rgba(255, 96, 112, 0.1); color: #ffb1b9; }

.tag-blue   { border-color: rgba(88, 160, 255, 0.45);  background: rgba(88, 160, 255, 0.12);  color: #b6d4ff; }
.tag-cyan   { border-color: rgba(79, 227, 255, 0.42);  background: rgba(79, 227, 255, 0.1);   color: #a7ecfb; }
.tag-green  { border-color: rgba(55, 214, 155, 0.42);  background: rgba(55, 214, 155, 0.1);   color: #9df0cd; }
.tag-amber  { border-color: rgba(246, 181, 69, 0.42);  background: rgba(246, 181, 69, 0.1);   color: #ffd894; }
.tag-violet { border-color: rgba(125, 107, 255, 0.45); background: rgba(125, 107, 255, 0.14); color: #cbc3ff; }
.tag-red    { border-color: rgba(255, 96, 112, 0.42);  background: rgba(255, 96, 112, 0.1);   color: #ffb1b9; }

.chip, .role-chip, .dept-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.85rem;
    color: var(--text-2);
}
.role-chip { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.chip-grid, .role-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- logo marks ---------- */
.mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 46px; height: 46px;
    border-radius: 13px;
    border: 1px solid var(--line-2);
    background: linear-gradient(160deg, rgba(44, 116, 255, 0.22), rgba(12, 19, 33, 0.9));
    overflow: hidden;
    box-shadow: var(--sh-1);
}
.mark img { width: 100%; height: 100%; object-fit: cover; }
.mark-text {
    font-family: var(--head);
    font-weight: 750;
    font-size: 0.86rem;
    letter-spacing: 0.02em;
    color: var(--blue-2);
}
.mark-sm { width: 38px; height: 38px; border-radius: 11px; }
.mark-sm .mark-text { font-size: 0.74rem; }
.mark-lg { width: 58px; height: 58px; border-radius: 16px; }
.mark-lg .mark-text { font-size: 1rem; }
.mark-xl { width: 92px; height: 92px; border-radius: 22px; }
.mark-xl .mark-text { font-size: 1.5rem; }
.avatar-xs { width: 28px; height: 28px; border-radius: 50%; }

/* ---------- pillars strip ---------- */
.pillars-wrap {
    padding: 8px 0 18px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(12, 20, 35, 0.55), rgba(6, 10, 20, 0.2));
}
.pillars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}
.pillar { padding: 30px 30px 30px 0; }
.pillar + .pillar { padding-left: 30px; border-left: 1px solid var(--line); }
.pillar .h3 { margin-bottom: 0.4em; }
.pillar-ico {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    margin-bottom: 16px;
    border-radius: 12px;
    border: 1px solid rgba(88, 160, 255, 0.34);
    background: linear-gradient(160deg, rgba(44, 116, 255, 0.26), rgba(12, 19, 33, 0.7));
    color: var(--cyan);
}
@media (max-width: 880px) {
    .pillars { grid-template-columns: 1fr; }
    .pillar { padding: 24px 0; }
    .pillar + .pillar { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- updates ---------- */
.update-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.update-card { display: flex; flex-direction: column; gap: 12px; padding-left: 24px; }
.update-card::after {
    content: "";
    position: absolute;
    left: 0; top: 22px; bottom: 22px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--grad-hot);
    opacity: 0.75;
}
.update-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.update-card h3 { margin: 0; font-size: 1.1rem; }

/* ---------- discord panel ---------- */
.discord-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: 34px;
    align-items: center;
    padding: 36px;
    overflow: hidden;
}
.discord-panel::after {
    content: "";
    position: absolute;
    right: -80px; top: -120px;
    width: 340px; height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(88, 101, 242, 0.3), transparent 64%);
    filter: blur(14px);
    pointer-events: none;
}
.discord-copy .h2 { margin-bottom: 0.4em; }
.discord-copy p { max-width: 54ch; }
.discord-copy .btn { margin-top: 22px; }
.discord-counts { display: grid; gap: 14px; position: relative; }
.count-box {
    display: grid;
    gap: 4px;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: rgba(255, 255, 255, 0.03);
}
.count-box strong {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--head);
    font-size: 1.85rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.count-box span {
    font-family: var(--head);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}
.live-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(55, 214, 155, 0.16);
    animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(55, 214, 155, 0.18); }
    50%      { box-shadow: 0 0 0 8px rgba(55, 214, 155, 0.05); }
}

/* ---------- featured department ---------- */
.featured {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 30px;
    padding: 34px 36px;
    align-items: start;
}
.featured-body .h3 { font-size: 1.5rem; margin-bottom: 0.5em; }
.featured-body .row-gap { margin-top: 22px; }

/* ---------- departments ---------- */
.dept-grid, .app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}
.dept-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 26px;
}
.dept-card h2, .app-card h2 { margin: 6px 0 0; }
.dept-card .prose { flex: 1 0 auto; }
.dept-card.is-featured { border-color: rgba(88, 160, 255, 0.4); box-shadow: var(--sh-1), 0 30px 70px -34px rgba(44, 116, 255, 0.55); }
.ribbon {
    position: absolute;
    top: 18px; right: 18px;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--grad-hot);
    color: #04101f;
    font-family: var(--head);
    font-size: 0.63rem;
    font-weight: 750;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ---------- applications ---------- */
.app-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; }
.app-card-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.app-card .prose { flex: 1 0 auto; }
.app-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.status-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: rgba(255, 255, 255, 0.025);
}
.status-main { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; }
.status-main strong { font-family: var(--head); }
.note { font-size: 0.9rem; color: var(--text-2); font-style: italic; }

.signin-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.signin-panel .h3 { margin-bottom: 0.3em; }

/* ---------- apply form ---------- */
.apply-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding: 52px 0 30px;
}
.apply-head .h1 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin-bottom: 0.25em; }

.form { display: grid; gap: 20px; }
.form-intro {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding-bottom: 18px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line);
}
.form-grid, .field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; align-items: start; }
.field-row > .field { min-width: 0; }
.form-inset { display: grid; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(255, 255, 255, 0.02); }

.field { display: grid; gap: 8px; }
.field > label, .field-row > label {
    font-family: var(--head);
    font-size: 0.9rem;
    font-weight: 650;
    color: var(--text);
}
.field .req { color: var(--cyan); margin-left: 3px; }
.field-help { font-size: 0.85rem; color: var(--muted); margin: -4px 0 2px; }

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]),
textarea, select {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--line-2);
    border-radius: var(--r-sm);
    background: rgba(4, 8, 16, 0.72);
    color: var(--text);
    font-family: var(--body);
    font-size: 0.96rem;
    line-height: 1.5;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
input[type="file"] {
    width: 100%;
    font-size: 0.9rem;
    color: var(--text-2);
}
input:hover:not(:focus):not([type="checkbox"]):not([type="radio"]),
textarea:hover:not(:focus), select:hover:not(:focus) { border-color: var(--line-hot); }
input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px #0a1120 inset;
    caret-color: var(--text);
}
textarea { min-height: 128px; resize: vertical; line-height: 1.62; }
textarea[rows="2"] { min-height: 76px; }
textarea[rows="3"] { min-height: 98px; }
input[readonly], input:disabled, textarea:disabled, select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
input[type="number"] { font-variant-numeric: tabular-nums; }
input::placeholder, textarea::placeholder { color: rgba(134, 152, 182, 0.7); }
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--line-hot);
    box-shadow: 0 0 0 3px rgba(44, 116, 255, 0.16);
    background: rgba(6, 12, 24, 0.9);
}

select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 42px;
    cursor: pointer;
}
select option { background: var(--panel-solid); color: var(--text); }
.select-wrap { position: relative; }
.select-wrap::after {
    content: "";
    position: absolute;
    right: 16px; top: 50%;
    width: 8px; height: 8px;
    margin-top: -6px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    pointer-events: none;
}

.choice-row { display: grid; gap: 8px; }
.choice {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    font-size: 0.94rem;
    transition: border-color 0.18s ease, background 0.18s ease;
}
.choice:hover { border-color: var(--line-hot); background: rgba(88, 160, 255, 0.1); }
.choice input { accent-color: var(--blue); width: 17px; height: 17px; margin: 0; }

.form-foot, .form-foot-wide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}
.inline-form { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-row .field { min-width: 180px; }

/* ---------- leaderboard ---------- */
.rank {
    font-family: var(--head);
    font-weight: 750;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    color: var(--blue-2);
}
.rank-big { font-size: 1.5rem; }

.you-row { display: flex; align-items: center; gap: 18px; }
.you-row img { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-2); }
.you-main { display: grid; gap: 4px; flex: 1 1 auto; min-width: 0; }
.you-main strong { font-family: var(--head); font-size: 1.05rem; }

.xp-bar {
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
    margin-top: 6px;
}
.xp-bar span { display: block; height: 100%; border-radius: 999px; background: var(--grad-hot); }

.table-panel { padding: 8px 10px; overflow-x: auto; }
.board { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.board th {
    text-align: left;
    padding: 14px 16px;
    font-family: var(--head);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.board td { padding: 13px 16px; border-bottom: 1px solid rgba(140, 178, 235, 0.07); vertical-align: middle; }
.board tbody tr:last-child td { border-bottom: 0; }
.board tbody tr { transition: background 0.16s ease; }
.board tbody tr:hover { background: rgba(88, 160, 255, 0.07); }
.board tr.is-you { background: rgba(44, 116, 255, 0.12); }
.board tr.is-you td:first-child { box-shadow: inset 3px 0 0 var(--cyan); }
.rank-cell { font-family: var(--head); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); width: 62px; }
.board-user { display: inline-flex; align-items: center; gap: 11px; font-weight: 600; }
.board-user img { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); }
.board-user:hover span { color: var(--blue-2); }

.top-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.top-card { display: flex; align-items: center; gap: 14px; }
.top-card img { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-2); }
.top-card > div { display: grid; gap: 1px; min-width: 0; }
.top-card strong { font-family: var(--head); font-size: 1rem; }
.top-card .rank { font-size: 1.15rem; min-width: 34px; }

/* ---------- profile ---------- */
.profile { padding: 34px 0 0; }
.profile-card { padding: 0; overflow: hidden; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--sh-1), var(--sh-2); position: relative; }
.profile-banner {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.profile-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 8, 16, 0.1), rgba(10, 17, 32, 0.95));
}
.banner-fallback {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(700px 260px at 22% 0%, rgba(44, 116, 255, 0.55), transparent 70%),
        radial-gradient(520px 240px at 78% 20%, rgba(79, 227, 255, 0.35), transparent 72%),
        linear-gradient(120deg, #0a1224 0%, #101c33 100%);
}

.profile-top {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 0 32px;
    margin-top: -66px;
    position: relative;
}
.profile-avatar {
    width: 132px; height: 132px;
    border-radius: 50%;
    border: 4px solid var(--panel-solid);
    background: var(--panel-solid);
    box-shadow: 0 20px 44px -20px rgba(0, 0, 0, 0.9);
}
.profile-id { flex: 1 1 auto; min-width: 0; padding-bottom: 8px; }
.profile-id .h2 { margin-bottom: 0.1em; }
.profile-edit { margin-bottom: 10px; }

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, auto) minmax(180px, 1fr);
    gap: 14px 34px;
    align-items: center;
    padding: 26px 32px;
    margin-top: 22px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.profile-stats > div { display: grid; gap: 2px; }
.profile-stats strong {
    font-family: var(--head);
    font-size: 1.5rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.stat-bar { min-width: 0; }

.profile-body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
    gap: 34px;
    padding: 30px 32px 36px;
}
.profile-block + .profile-block { margin-top: 30px; }

.leadership-note {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-top: 20px;
    padding: 16px 18px;
    border: 1px solid rgba(125, 107, 255, 0.35);
    border-radius: var(--r);
    background: linear-gradient(120deg, rgba(125, 107, 255, 0.14), rgba(44, 116, 255, 0.08));
    font-size: 0.94rem;
    color: #ddd8ff;
}
.leadership-note svg { flex: 0 0 auto; color: #b9aeff; }
.leadership-note em { color: #fff; font-style: normal; font-weight: 700; }

.dept-chip { padding: 9px 14px 9px 9px; gap: 11px; font-family: var(--head); font-weight: 600; }
.dept-chip .mark { width: 30px; height: 30px; border-radius: 9px; }
.dept-chip .mark-text { font-size: 0.6rem; }

.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; }
.badge {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 9px;
    padding: 14px 10px 12px;
    text-align: center;
    border-radius: var(--r);
    border: 1px solid var(--line-2);
    background: linear-gradient(165deg, rgba(125, 107, 255, 0.14), rgba(12, 19, 33, 0.86));
    cursor: pointer;
    color: var(--text);
    font-family: var(--head);
    font-weight: 650;
    font-size: 0.78rem;
    line-height: 1.35;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.badge > span:last-child {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.badge .mark, .badge .mark-sm {
    width: 46px; height: 46px;
    border-radius: 13px;
    flex: 0 0 auto;
    background: rgba(4, 9, 18, 0.6);
}
.badge .mark-text { font-size: 0.82rem; color: var(--blue-2); }
.badge:hover { transform: translateY(-3px); border-color: var(--line-hot); box-shadow: 0 16px 34px -20px rgba(44, 116, 255, 0.85); }
.badge img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 6, 12, 0.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 0; cursor: pointer; }
.modal-card {
    position: relative;
    width: min(420px, 100%);
    padding: 30px;
    border: 1px solid var(--line-2);
    border-radius: var(--r-lg);
    background: rgba(10, 17, 32, 0.98);
    box-shadow: var(--sh-2);
    text-align: center;
    animation: pop 0.2s cubic-bezier(.2,.7,.3,1);
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
.modal-card .mark, .modal-card .badge { margin: 0 auto 16px; width: 68px; height: 68px; }
.modal-card .btn { margin-top: 20px; }

/* ---------- settings ---------- */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); gap: 20px; align-items: start; }
.settings-me { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.settings-me img { width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--line-2); }
.kv { display: grid; gap: 0; margin: 0; list-style: none; padding: 0; }
.kv > div, .kv > li, .kv-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(140, 178, 235, 0.09);
    font-size: 0.94rem;
}
.kv > div:last-child, .kv > li:last-child { border-bottom: 0; }
.kv strong { font-family: var(--head); }

/* ---------- admin ---------- */
.admin-shell {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding-bottom: 70px;
}
.admin-nav {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 3px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--panel);
    box-shadow: var(--sh-1), var(--sh-2);
}
.admin-nav-link {
    display: block;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    font-family: var(--head);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-2);
    transition: background 0.16s ease, color 0.16s ease;
}
.admin-nav-link:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.admin-nav-link.is-active { background: rgba(44, 116, 255, 0.18); color: #fff; box-shadow: inset 2px 0 0 var(--cyan); }
.admin-nav .mini {
    margin-top: 8px;
    padding: 10px 14px 4px;
    border-top: 1px solid var(--line);
    font-size: 0.84rem;
    color: var(--muted);
}
.admin-main { display: grid; gap: 20px; min-width: 0; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat {
    display: grid;
    gap: 4px;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--panel-2);
    box-shadow: var(--sh-1);
}
.stat span {
    font-family: var(--head);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    color: var(--muted);
}
.stat strong { font-family: var(--head); font-size: 2rem; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }

.admin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.admin-list > li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 15px 18px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: rgba(255, 255, 255, 0.028);
    transition: border-color 0.16s ease, background 0.16s ease;
}
.admin-list > li:hover { border-color: var(--line-2); background: rgba(255, 255, 255, 0.05); }
.admin-list > li form { display: inline-flex; margin: 0; }
.admin-list .row-gap { gap: 8px; }

.review-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.answers { display: grid; gap: 12px; margin: 4px 0 0; }
.answers > div {
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: rgba(4, 8, 16, 0.55);
}
.answers dt, .answers strong {
    display: block;
    font-family: var(--head);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 5px;
}
.answers dd { margin: 0; color: var(--text-2); white-space: pre-wrap; }

.user-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.user-row img { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); }
.user-row .kv { flex: 1 1 220px; }

.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: start; }
.field-row > .field, .field-row > label { min-width: 0; }
.field-row.row-gap { display: flex; }

/* ---------- footer ---------- */
.footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(6, 11, 22, 0.4), rgba(3, 5, 11, 0.85));
}
.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 34px;
    padding: 46px 0 30px;
}
.footer-brand { display: flex; gap: 14px; align-items: flex-start; max-width: 46ch; }
.footer-brand img { width: 44px; height: 44px; object-fit: contain; }
.footer-brand strong { display: block; font-family: var(--head); font-size: 1.02rem; margin-bottom: 3px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 26px; align-content: start; justify-content: flex-end; }
.footer-links a { font-size: 0.92rem; color: var(--muted); transition: color 0.18s ease; }
.footer-links a:hover { color: var(--blue-2); }
.footer-legal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 0 26px;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
    color: var(--muted);
}
.footer-legal .mono, .footer-legal code { font-family: var(--mono); }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
    .hero-inner { grid-template-columns: 1fr; gap: 34px; }
    .hero-art { order: -1; max-width: 320px; }
    .discord-panel { grid-template-columns: 1fr; }
    .profile-body { grid-template-columns: 1fr; gap: 26px; }
    .settings-grid { grid-template-columns: 1fr; }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-nav { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; gap: 6px; }
    .admin-nav .mini { display: none; }
    .profile-stats { grid-template-columns: repeat(3, auto); }
    .stat-bar { grid-column: 1 / -1; }
}

@media (max-width: 880px) {
    .nav-toggle { display: block; }
    .nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 16px; right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: var(--r-lg);
        background: rgba(8, 13, 25, 0.98);
        box-shadow: var(--sh-2);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }
    .nav.is-open { display: flex; }
    .topbar-inner { position: relative; flex-wrap: wrap; }
    .nav-links { flex-direction: column; align-items: stretch; gap: 2px; }
    .nav-link { padding: 12px 14px; border-radius: var(--r-sm); }
    .nav-link.is-active { background: rgba(44, 116, 255, 0.16); }
    .nav-link.is-active::after { display: none; }
    .nav-side { flex-direction: column; align-items: stretch; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
    .nav-side .btn { width: 100%; }
    .user-menu { width: 100%; }
    .user-chip { width: 100%; justify-content: flex-start; }
    .user-chip-name { max-width: none; }
    .user-drop { position: static; width: 100%; min-width: 0; opacity: 1; visibility: visible; transform: none; display: none; margin-top: 8px; }
    .user-menu.is-open .user-drop { display: block; }
}

@media (max-width: 720px) {
    .section { padding: 56px 0; }
    .panel { padding: 22px 20px; }
    .featured, .apply-head { grid-template-columns: 1fr; gap: 18px; }
    .profile-top { flex-direction: column; align-items: flex-start; gap: 12px; padding: 0 22px; }
    .profile-avatar { width: 104px; height: 104px; }
    .profile-stats, .profile-body { padding-left: 22px; padding-right: 22px; }
    .profile-stats { grid-template-columns: repeat(3, 1fr); gap: 14px 18px; }
    .profile-banner { height: 160px; }
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .footer-links { justify-content: flex-start; }
    .status-list li { flex-wrap: wrap; }
    .hero-stats { gap: 16px 26px; }
    .hero-stats dd { font-size: 1.35rem; }
    .discord-panel { padding: 24px 20px; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .section-head > p { max-width: none; }
}

/* ==========================================================================
   Staff panel v2 — grouped navigation, section headers, review workspace
   ========================================================================== */

.admin-nav-group { display: grid; gap: 3px; }
.admin-nav-group + .admin-nav-group { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.admin-nav-label {
    padding: 4px 14px 6px;
    font-family: var(--head);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(134, 152, 182, 0.85);
}
.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-nav-link svg { flex: 0 0 auto; width: 16px; height: 16px; opacity: 0.75; }
.admin-nav-link.is-active svg { opacity: 1; color: var(--cyan); }
.admin-nav-link .count {
    margin-left: auto;
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(44, 116, 255, 0.28);
    border: 1px solid rgba(90, 165, 255, 0.4);
    font-size: 0.7rem;
    font-weight: 750;
    text-align: center;
    color: #dce9ff;
    font-variant-numeric: tabular-nums;
}
.admin-nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: rgba(4, 9, 18, 0.5);
    min-width: 0;
}
.admin-nav-user img { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; }
.admin-nav-user div { display: grid; gap: 1px; min-width: 0; }
.admin-nav-user strong { font-family: var(--head); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-nav-user span { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan); font-weight: 700; }

/* section blocks inside the panel */
.admin-section { display: grid; gap: 16px; }
.admin-section + .admin-section { margin-top: 10px; }
.admin-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.admin-section-head .eyebrow { margin-bottom: 2px; }
.admin-section-head h2, .admin-section-head h3 { margin: 0; }
.admin-section-head p { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; max-width: 62ch; }

.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: rgba(4, 9, 18, 0.42);
}
.admin-toolbar .filter-row { margin: 0; }

.stat.stat-hot { background: linear-gradient(150deg, rgba(44, 116, 255, 0.2), rgba(22, 33, 54, 0.6)); border-color: var(--line-hot); }
.stat .trend { font-size: 0.78rem; color: var(--muted); font-family: var(--body); letter-spacing: 0; text-transform: none; font-weight: 500; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.quick-card {
    display: grid;
    gap: 6px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: rgba(255, 255, 255, 0.028);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.quick-card:hover { transform: translateY(-3px); border-color: var(--line-hot); background: rgba(44, 116, 255, 0.1); }
.quick-card strong { font-family: var(--head); font-size: 1rem; display: flex; align-items: center; gap: 9px; }
.quick-card strong svg { width: 17px; height: 17px; color: var(--blue-2); }
.quick-card span { font-size: 0.86rem; color: var(--muted); line-height: 1.5; }

/* data table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 520px; }
table.data th, table.data td { padding: 12px 15px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
table.data thead th {
    font-family: var(--head);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    background: rgba(4, 9, 18, 0.55);
    white-space: nowrap;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
table.data td.right, table.data th.right { text-align: right; }
.cell-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-user img { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; }
.cell-user div { display: grid; gap: 0; min-width: 0; }
.cell-user strong { font-family: var(--head); font-size: 0.9rem; }
.cell-user span { font-size: 0.78rem; color: var(--muted); }

/* review workspace */
.review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.review-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 20px 22px;
    border: 1px solid var(--line-2);
    border-radius: var(--r-lg);
    background: linear-gradient(140deg, rgba(44, 116, 255, 0.16), rgba(17, 26, 44, 0.8));
    box-shadow: var(--sh-1), var(--sh-2);
}
.review-hero .mark-lg { flex: 0 0 auto; }
.review-hero-main { flex: 1 1 240px; min-width: 0; display: grid; gap: 4px; }
.review-hero-main h2 { margin: 0; }
.review-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.86rem; color: var(--muted); }
.review-meta a { color: var(--blue-2); }

.answers { grid-template-columns: 1fr; gap: 10px; }
.answers > div { position: relative; padding: 14px 16px 14px 18px; }
.answers > div::before {
    content: "";
    position: absolute;
    left: 0; top: 12px; bottom: 12px;
    width: 2px;
    border-radius: 2px;
    background: var(--grad-hot);
    opacity: 0.6;
}
.answers dd { font-size: 0.95rem; line-height: 1.62; }

.review-side { display: grid; gap: 16px; position: sticky; top: 96px; }
.applicant-card { display: grid; gap: 14px; justify-items: center; text-align: center; }
.applicant-card img.applicant-avatar {
    width: 84px; height: 84px;
    border-radius: 50%;
    border: 2px solid var(--line-hot);
    box-shadow: var(--sh-glow);
}
.applicant-card .name { font-family: var(--head); font-weight: 700; font-size: 1.05rem; }
.applicant-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.applicant-mini div {
    padding: 10px 6px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: rgba(4, 9, 18, 0.45);
    display: grid;
    gap: 1px;
}
.applicant-mini span { font-size: 0.62rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); font-family: var(--head); font-weight: 700; }
.applicant-mini strong { font-family: var(--head); font-size: 1rem; font-variant-numeric: tabular-nums; }

.decision-stack { display: grid; gap: 10px; }
.decision-stack .btn { width: 100%; justify-content: center; }
.decision-note { display: grid; gap: 8px; }

@media (max-width: 1040px) {
    .review-layout { grid-template-columns: 1fr; }
    .review-side { position: static; }
}
@media (max-width: 900px) {
    .admin-nav-group + .admin-nav-group { margin-top: 0; padding-top: 0; border-top: 0; }
    .admin-nav-label, .admin-nav-user { display: none; }
    .admin-nav { grid-auto-flow: column; grid-auto-columns: max-content; }
    .admin-nav-group { grid-auto-flow: column; grid-auto-columns: max-content; }
}

@media (max-width: 900px) {
    .admin-shell { grid-template-columns: minmax(0, 1fr); }
    .admin-nav {
        min-width: 0;
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
        padding: 8px;
    }
    .admin-nav-group { min-width: 0; }
    .review-layout, .admin-main, .admin-section { min-width: 0; }
    .review-hero { padding: 16px; }
    .applicant-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ==========================================================================
   Refinement layer — depth, motion, connect bar, steps, FAQ, marquee
   ========================================================================== */

body::after {
    /* fine film-grain so flat panels never read as plastic */
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    opacity: 0.045;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #05080f; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(88, 160, 255, 0.55), rgba(44, 116, 255, 0.3));
    border-radius: 20px;
    border: 3px solid #05080f;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #58a0ff, #2c74ff); }

/* ---- scroll reveal (JS opt-in; visible by default without JS) ---- */
.has-js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s cubic-bezier(.2,.7,.2,1), transform 0.6s cubic-bezier(.2,.7,.2,1);
    will-change: opacity, transform;
}
.has-js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---- shine sweep on primary buttons ---- */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    left: -60%;
    width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-18deg);
    transition: left 0.55s ease;
}
.btn-primary:hover::after { left: 120%; }

/* ---- card hover depth ---- */
.card, .panel { transition: transform 0.35s cubic-bezier(.2,.7,.2,1), border-color 0.35s ease, box-shadow 0.35s ease; }
.card:hover { transform: translateY(-4px); border-color: var(--line-hot); box-shadow: var(--sh-2), var(--sh-glow); }

/* ---- connect / status bar ---- */
.connect-bar {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background:
        radial-gradient(120% 160% at 0% 0%, rgba(44, 116, 255, 0.18), transparent 60%),
        var(--panel);
    box-shadow: var(--sh-1), var(--sh-2);
    backdrop-filter: blur(14px);
}
.connect-copy { display: grid; gap: 6px; min-width: 0; }
.connect-label {
    font-family: var(--head);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}
.connect-address {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.connect-address code {
    font-size: 0.98rem;
    padding: 0.45em 0.75em;
    border: 1px dashed rgba(79, 227, 255, 0.35);
    background: rgba(79, 227, 255, 0.07);
    border-radius: var(--r-sm);
    word-break: break-all;
}
.copy-btn {
    border: 1px solid var(--line-2);
    background: rgba(255,255,255,0.04);
    color: var(--text-2);
    padding: 0.45em 0.85em;
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: 0.82rem;
    transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.copy-btn:hover { color: #fff; border-color: var(--line-hot); background: rgba(44, 116, 255, 0.18); }
.copy-btn.is-copied { color: var(--green); border-color: rgba(55, 214, 155, 0.5); }
.connect-meta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.meta-chip {
    display: grid;
    gap: 2px;
    padding: 10px 14px;
    min-width: 104px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--panel-2);
}
.meta-chip strong { font-family: var(--head); font-size: 1.05rem; }
.meta-chip span { font-size: 0.74rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

/* ---- marquee band ---- */
.band {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(44,116,255,0.10), rgba(79,227,255,0.06), rgba(125,107,255,0.10));
    overflow: hidden;
    padding: 12px 0;
    margin: 8px 0 0;
}
.band-track {
    display: flex;
    gap: 44px;
    width: max-content;
    animation: band-scroll 38s linear infinite;
}
.band-track span {
    font-family: var(--head);
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(214, 230, 252, 0.62);
    white-space: nowrap;
}
.band-track span::after { content: "◆"; margin-left: 44px; color: rgba(79, 227, 255, 0.5); letter-spacing: 0; }
@keyframes band-scroll { to { transform: translateX(-50%); } }
.band:hover .band-track { animation-play-state: paused; }

/* ---- how to join steps ---- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.step {
    position: relative;
    padding: 22px 20px 20px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--panel);
    overflow: hidden;
}
.step::before {
    counter-increment: step;
    content: "0" counter(step);
    position: absolute;
    top: 10px; right: 16px;
    font-family: var(--head);
    font-size: 2.6rem;
    font-weight: 800;
    color: rgba(126, 176, 255, 0.10);
    letter-spacing: -0.04em;
}
.step::after {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: var(--grad-hot);
    opacity: 0.7;
}
.step h3 { margin: 0 0 6px; font-size: 1.06rem; }
.step p { margin: 0; color: var(--text-2); font-size: 0.92rem; }

/* ---- FAQ ---- */
.faq { display: grid; gap: 12px; }
.faq-item {
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--panel-2);
    padding: 0 18px;
    transition: border-color 0.25s ease, background 0.25s ease;
}
.faq-item[open] { border-color: var(--line-hot); background: var(--panel); }
.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 15px 0;
    font-family: var(--head);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    color: var(--blue-2);
    font-size: 1.25rem;
    line-height: 1;
    transition: transform 0.25s ease;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0 0 16px; color: var(--text-2); font-size: 0.93rem; }

/* ---- back to top ---- */
.to-top {
    position: fixed;
    right: 20px; bottom: 20px;
    z-index: 40;
    width: 44px; height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    background: rgba(10, 17, 32, 0.85);
    color: var(--text-2);
    cursor: pointer;
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s, color 0.25s, border-color 0.25s;
}
.to-top.is-on { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { color: #fff; border-color: var(--line-hot); }

@media (max-width: 900px) {
    .connect-bar { grid-template-columns: minmax(0, 1fr); }
    .connect-meta { justify-content: flex-start; }
    .steps { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .has-js [data-reveal] { opacity: 1; transform: none; transition: none; }
    .band-track { animation: none; }
    .btn-primary::after { display: none; }
    .card:hover { transform: none; }
}

/* ==========================================================================
   v2 — profile identity, leadership crest, department cards, settings suite
   ========================================================================== */

/* ---------- profile header ---------- */
.profile-banner { height: 250px; }
.profile-banner.has-image { background-color: #0a1120; }
.banner-accent {
    background:
        radial-gradient(760px 300px at 20% -10%, color-mix(in srgb, var(--accent, #2c74ff) 75%, transparent), transparent 70%),
        linear-gradient(140deg, color-mix(in srgb, var(--accent, #2c74ff) 45%, #060b16), #060b16 85%);
}
.banner-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(140, 190, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(140, 190, 255, 0.06) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.75), transparent 78%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.75), transparent 78%);
    pointer-events: none;
    z-index: 1;
}
.banner-tag {
    position: absolute;
    top: 14px; right: 16px;
    z-index: 2;
    padding: 5px 11px;
    border-radius: 999px;
    font-family: var(--head);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #dbe6fb;
    background: rgba(6, 11, 22, 0.6);
    border: 1px solid var(--line);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.profile-card.is-leadership { border-color: rgba(125, 107, 255, 0.36); }

.avatar-ring { position: relative; flex: 0 0 auto; padding: 3px; border-radius: 50%; background: var(--grad-hot); box-shadow: 0 18px 40px -20px rgba(44, 116, 255, 0.9); }
.avatar-ring.ring-leader { background: linear-gradient(135deg, #7d6bff, #4fe3ff 55%, #ffcb02); }
.avatar-ring .profile-avatar { border-width: 4px; }
.level-pip {
    position: absolute;
    right: -4px; bottom: 6px;
    min-width: 34px; height: 34px;
    display: grid; place-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: #060b16;
    border: 2px solid rgba(140, 190, 255, 0.35);
    font-family: var(--head);
    font-weight: 750;
    font-size: 0.86rem;
    color: var(--cyan);
}

.name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.name-row .h2 { margin: 0; }
.ident-pill {
    padding: 4px 10px;
    border-radius: 999px;
    font-family: var(--head);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid var(--line-2);
    color: var(--text-2);
    background: rgba(88, 160, 255, 0.1);
}
.pill-staff { color: #ffd9a1; border-color: rgba(246, 181, 69, 0.45); background: rgba(246, 181, 69, 0.12); }
.pill-guild { color: #c8ccff; border-color: rgba(88, 101, 242, 0.5); background: rgba(88, 101, 242, 0.16); }

.handle-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.handle-box {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border-radius: 9px;
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--text-2);
    background: rgba(140, 178, 235, 0.09);
    border: 1px solid rgba(140, 178, 235, 0.16);
}
.handle-box.is-muted { color: #8090a8; background: rgba(120, 140, 170, 0.09); border-color: rgba(120, 140, 170, 0.2); }
.handle-box.is-muted svg { opacity: 0.6; }
.handle-note { font-size: 0.76rem; color: var(--muted); letter-spacing: 0.02em; }

.meta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.meta-chip {
    display: grid;
    gap: 1px;
    padding: 7px 13px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    background: rgba(12, 20, 35, 0.6);
}
.meta-chip strong { font-family: var(--head); font-size: 0.92rem; }

.profile-body { grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.5fr); }
.profile-main, .profile-side { min-width: 0; }
.profile-side .profile-block + .profile-block { margin-top: 26px; }
.block-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.block-head .h4 { margin: 0; }
.count-pill {
    min-width: 24px;
    padding: 1px 8px;
    border-radius: 999px;
    text-align: center;
    font-family: var(--head);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--blue-2);
    background: rgba(44, 116, 255, 0.14);
    border: 1px solid rgba(88, 160, 255, 0.3);
}
.about-facts { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-size: 0.88rem; }
.about-facts span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- leadership crest ---------- */
.leadership-crest {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 18px 0 20px;
    padding: 14px 16px;
    border-radius: var(--r);
    border: 1px solid rgba(125, 107, 255, 0.34);
    background:
        radial-gradient(360px 130px at 6% 0%, rgba(125, 107, 255, 0.24), transparent 72%),
        linear-gradient(125deg, rgba(28, 25, 56, 0.9), rgba(10, 17, 32, 0.9));
    box-shadow: var(--sh-1), 0 16px 40px -30px rgba(125, 107, 255, 0.7);
}
.leadership-crest::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 20px 100%;
    opacity: 0.45;
    pointer-events: none;
}
.crest-glow {
    position: absolute;
    width: 180px; height: 180px;
    right: -60px; top: -90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 227, 255, 0.22), transparent 66%);
    animation: crestPulse 6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes crestPulse { 50% { transform: scale(1.14); opacity: 0.7; } }
.crest-art {
    position: relative;
    flex: 0 0 auto;
    width: 62px; height: 62px;
    display: grid; place-items: center;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(125, 107, 255, 0.12));
    border: 1px solid rgba(180, 170, 255, 0.3);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 12px 26px -20px rgba(0,0,0,0.9);
}
.crest-art img { width: 44px; height: 44px; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.55)); }
.crest-copy { position: relative; min-width: 0; }
.crest-eyebrow {
    display: inline-flex; align-items: center; gap: 5px;
    font-family: var(--head);
    font-size: 0.6rem;
    font-weight: 750;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #a9f2ff;
}
.crest-title {
    margin: 3px 0 4px;
    font-family: var(--head);
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    background: linear-gradient(100deg, #ffffff, #cfc4ff 45%, #7fe6ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.crest-copy p { margin: 0; color: #d6d2f2; font-size: 0.85rem; line-height: 1.5; max-width: 56ch; }
.crest-copy strong { color: #fff; font-weight: 650; }
.crest-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.crest-tags span {
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-family: var(--head);
    font-weight: 650;
    letter-spacing: 0.05em;
    color: #cfc9ff;
    background: rgba(125, 107, 255, 0.16);
    border: 1px solid rgba(160, 145, 255, 0.34);
}

/* ---------- department membership cards ---------- */
.dept-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.dept-card {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: var(--r);
    border: 1px solid var(--line-2);
    background: linear-gradient(150deg, rgba(88, 160, 255, 0.1), rgba(12, 19, 33, 0.9));
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.dept-card:hover { transform: translateY(-2px); border-color: var(--line-hot); box-shadow: 0 20px 42px -26px rgba(44, 116, 255, 0.9); }
.dept-logo {
    flex: 0 0 auto;
    width: 66px; height: 66px;
    display: grid; place-items: center;
    padding: 9px;
    border-radius: 18px;
    cursor: zoom-in;
    background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.16), rgba(255,255,255,0.05));
    border: 1px solid rgba(180, 210, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.dept-logo img { width: 100%; height: 100%; object-fit: contain; }
.dept-logo .logo-text { font-family: var(--head); font-weight: 800; font-size: 1rem; color: #eaf1fb; letter-spacing: 0.04em; }
.dept-logo:hover { border-color: rgba(200, 225, 255, 0.6); }
.dept-meta { display: grid; gap: 3px; min-width: 0; flex: 1 1 auto; }
.dept-meta strong { font-family: var(--head); font-size: 1.02rem; line-height: 1.25; }
.dept-short { font-family: var(--mono); font-size: 0.74rem; color: var(--blue-2); letter-spacing: 0.08em; text-transform: uppercase; }
.dept-status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--muted); }
.dept-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(55, 214, 155, 0.9); }
.dept-go { margin-left: auto; color: var(--muted); transition: color 0.16s ease, transform 0.16s ease; }
.dept-card:hover .dept-go { color: var(--blue-2); transform: translateX(3px); }

.mark-view { width: 108px !important; height: 108px !important; border-radius: 24px; padding: 12px; background: rgba(255,255,255,0.06); }
.mark-view img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- settings suite ---------- */
.settings-errors { margin-bottom: 18px; }
.settings-shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 22px; align-items: start; }
.settings-nav {
    position: sticky;
    top: 92px;
    padding: 18px;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--sh-1), var(--sh-2);
}
.settings-who { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.settings-who img { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-2); }
.settings-who div { display: grid; min-width: 0; }
.settings-who strong { font-family: var(--head); font-size: 0.98rem; }
.settings-nav nav { display: grid; gap: 4px; }
.settings-tab {
    display: grid;
    gap: 2px;
    width: 100%;
    text-align: left;
    padding: 11px 13px;
    border: 1px solid transparent;
    border-radius: var(--r);
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.settings-tab span { font-family: var(--head); font-weight: 650; font-size: 0.94rem; }
.settings-tab em { font-style: normal; font-size: 0.76rem; color: var(--muted); line-height: 1.4; }
.settings-tab:hover { background: rgba(88, 160, 255, 0.08); color: var(--text); }
.settings-tab.is-active {
    color: #fff;
    border-color: rgba(88, 160, 255, 0.4);
    background: linear-gradient(120deg, rgba(44, 116, 255, 0.22), rgba(79, 227, 255, 0.08));
    box-shadow: inset 3px 0 0 var(--cyan);
}
.settings-quick { display: grid; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.88rem; }
.settings-panes { min-width: 0; }
.settings-pane { display: none; }
.settings-pane.is-active { display: block; animation: paneIn 0.22s ease; }
html:not(.has-js) .settings-pane { display: block; margin-bottom: 20px; }
@keyframes paneIn { from { opacity: 0; transform: translateY(8px); } }

.form-intro.tight { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.hint { display: block; margin-top: 6px; font-size: 0.78rem; color: var(--muted); }
.opt { font-size: 0.72rem; color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }

.name-preview {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: var(--r);
    border: 1px dashed var(--line-2);
    background: rgba(10, 17, 32, 0.6);
}
.name-preview img { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); }
.name-preview > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.name-preview strong { font-family: var(--head); font-size: 1.06rem; }

.switch-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 2px;
    border-bottom: 1px solid rgba(140, 178, 235, 0.09);
    cursor: pointer;
}
.switch-row:last-of-type { border-bottom: 0; }
.switch-row > span:first-child { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; }
.switch-row strong { font-family: var(--head); font-weight: 650; font-size: 0.95rem; }
.switch-row em { font-style: normal; font-size: 0.82rem; color: var(--muted); }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
    flex: 0 0 auto;
    width: 46px; height: 26px;
    border-radius: 999px;
    background: rgba(140, 178, 235, 0.16);
    border: 1px solid var(--line-2);
    position: relative;
    transition: background 0.18s ease, border-color 0.18s ease;
}
.switch::after {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #c3d0e4;
    transition: transform 0.18s cubic-bezier(.2,.7,.3,1), background 0.18s ease;
}
.switch-row input:checked ~ .switch { background: var(--grad-hot); border-color: transparent; box-shadow: 0 6px 18px -8px rgba(44, 116, 255, 0.9); }
.switch-row input:checked ~ .switch::after { transform: translateX(20px); background: #fff; }
.switch-row input:focus-visible ~ .switch { outline: 2px solid var(--blue-2); outline-offset: 2px; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.choice { cursor: pointer; }
.choice:has(> .choice-body) input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body {
    display: grid;
    gap: 5px;
    padding: 12px;
    border-radius: var(--r);
    border: 1px solid var(--line);
    background: rgba(12, 19, 33, 0.7);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.choice-body strong { font-family: var(--head); font-size: 0.9rem; }
.choice-body em { font-style: normal; font-size: 0.76rem; color: var(--muted); }
.choice-preview { height: 54px; border-radius: 10px; background-size: cover; background-position: center; border: 1px solid var(--line); }
.preview-accent { background: linear-gradient(130deg, color-mix(in srgb, var(--accent, #5865f2) 80%, transparent), #0a1120); }
.preview-aurora { background: radial-gradient(300px 120px at 20% 0%, rgba(44, 116, 255, 0.7), transparent 70%), linear-gradient(120deg, #0a1224, #101c33); }
.preview-discord { background-color: #5865f2; }
.choice input:checked ~ .choice-body { border-color: var(--line-hot); box-shadow: var(--sh-glow); transform: translateY(-2px); }

.discord-card { overflow: hidden; border-radius: var(--r); border: 1px solid var(--line-2); margin-bottom: 18px; background: rgba(10, 17, 32, 0.7); }
.discord-banner { height: 118px; background-size: cover; background-position: center; background-color: #101c33; background-image: linear-gradient(130deg, color-mix(in srgb, var(--accent, #5865f2) 70%, transparent), #0a1120); }
.discord-ident { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.discord-ident img { width: 62px; height: 62px; border-radius: 50%; border: 3px solid var(--panel-solid); margin-top: -34px; background: var(--panel-solid); }
.discord-ident div { display: grid; min-width: 0; }
.discord-ident strong { font-family: var(--head); font-size: 1.05rem; }

.rights-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.right-card { padding: 18px; border-radius: var(--r); border: 1px solid var(--line); background: rgba(12, 19, 33, 0.6); }
.right-card h3 { font-family: var(--head); font-size: 0.98rem; margin: 0 0 10px; }
.right-card h3.spaced { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.right-card .btn { margin-top: 12px; }

.danger-zone {
    margin-top: 22px;
    padding: 20px;
    border-radius: var(--r);
    border: 1px solid rgba(255, 96, 112, 0.34);
    background: linear-gradient(140deg, rgba(255, 96, 112, 0.1), rgba(12, 19, 33, 0.86));
}
.danger-zone h3 { font-family: var(--head); font-size: 1rem; margin: 0 0 8px; color: #ffb4bc; }
.danger-form { margin: 14px 0 10px; }
.danger-form label { display: block; font-size: 0.82rem; color: var(--text-2); margin-bottom: 7px; }
.danger-row { display: flex; gap: 10px; flex-wrap: wrap; }
.danger-row input { max-width: 220px; }

@media (max-width: 1000px) {
    .settings-shell { grid-template-columns: 1fr; }
    .settings-nav { position: static; }
    .settings-nav nav { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); display: grid; }
    .profile-body { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .leadership-crest { flex-direction: column; align-items: flex-start; padding: 20px; }
    .dept-cards { grid-template-columns: 1fr; }
    .profile-banner { height: 170px; }
    .banner-tag { display: none; }
}

/* ---- per-account interface preferences ---- */
body.is-compact .section { padding-top: 34px; padding-bottom: 34px; }
body.is-compact .panel { padding: 18px; }
body.is-compact .profile-body { padding-top: 22px; padding-bottom: 26px; gap: 24px; }
body.is-still *, body.is-still *::before, body.is-still *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
}
body.is-still .dept-card:hover, body.is-still .badge:hover { transform: none; }

/* ==========================================================================
   Phase two — leaderboard, avatar menu, member manager, permissions, ranks
   ========================================================================== */

/* ---------- shared small bits ---------- */
.handle-box {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 999px;
    border: 1px solid var(--line); background: rgba(9, 14, 26, 0.7);
    font-family: var(--mono); font-size: 0.78rem; color: var(--text-2);
}
.handle-box.is-muted { color: var(--muted); background: rgba(255, 255, 255, 0.03); }
.count-pill {
    padding: 2px 9px; border-radius: 999px; font-size: 0.75rem;
    border: 1px solid var(--line); color: var(--muted); background: rgba(255, 255, 255, 0.03);
}
.pill-guild { background: rgba(88, 101, 242, 0.16); border-color: rgba(88, 101, 242, 0.4); color: #c3c9ff; }
.pill-staff { background: rgba(79, 227, 255, 0.14); border-color: rgba(79, 227, 255, 0.34); color: #b6f2ff; }
.role-chip.is-on { border-color: var(--line-hot); color: var(--text); background: rgba(44, 116, 255, 0.14); }
.role-list { display: flex; flex-wrap: wrap; gap: 7px; }
.role-list .role-chip { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.role-list .role-chip code { color: var(--muted); font-size: 0.72rem; }

/* ---------- leaderboard ---------- */
.board-head .shell { display: grid; gap: 20px; }
.board-head .lede { max-width: 62ch; }
.board-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.board-stats > div {
    padding: 13px 16px; border-radius: var(--r);
    border: 1px solid var(--line); background: var(--panel-2); box-shadow: var(--sh-1);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.board-stats strong { display: block; font-family: var(--head); font-size: 1.32rem; margin-top: 2px; }
.board-stats span { color: var(--muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.09em; }

.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 30px 0 10px; align-items: stretch; }
.podium-card {
    position: relative; overflow: hidden; border-radius: var(--r-lg);
    border: 1px solid var(--line); background: var(--panel);
    box-shadow: var(--sh-2); padding: 0 20px 22px; text-align: center;
    display: flex; flex-direction: column;
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.podium-card.is-gold {
    border-color: rgba(246, 181, 69, 0.5);
    box-shadow: var(--sh-2), 0 0 70px -34px rgba(246, 181, 69, 0.85);
}
.podium-card.is-silver { border-color: rgba(200, 216, 240, 0.3); }
.podium-card.is-bronze { border-color: rgba(214, 148, 96, 0.3); }
.podium-card.is-you { outline: 1px solid var(--line-hot); outline-offset: -1px; }
.podium-banner {
    height: 78px; margin: 0 -20px 0; background-size: cover; background-position: center;
    background-image: var(--grad-hot); opacity: 0.8;
}
.podium-place {
    position: absolute; top: 12px; left: 14px; z-index: 2;
    font-family: var(--head); font-size: 0.9rem; padding: 2px 10px; border-radius: 999px;
    background: rgba(3, 5, 11, 0.72); border: 1px solid var(--line-2);
}
.podium-place em { font-style: normal; font-size: 0.7rem; color: var(--muted); margin-left: 1px; }
.podium-face { display: block; width: 76px; height: 76px; margin: -38px auto 10px; }
.podium-face img { width: 76px; height: 76px; border-radius: 50%; border: 3px solid var(--panel-solid); display: block; background: var(--panel-solid); }
.podium-name { display: block; font-family: var(--head); font-size: 1.05rem; margin-bottom: 2px; }
.podium-name:hover { color: var(--blue-2); }
.podium-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: auto; }
.podium-bar i { display: block; height: 100%; background: var(--grad-hot); }

.board-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 26px 0 14px; }
.board-search { position: relative; flex: 1 1 240px; }
.board-search input { width: 100%; padding-left: 38px; }
.search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.board-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.board-chips .chip.is-on { border-color: var(--line-hot); color: var(--text); background: rgba(44, 116, 255, 0.16); }

.you-panel {
    display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
    padding: 16px 18px; border-radius: var(--r-lg);
    border: 1px solid var(--line-hot); background: linear-gradient(120deg, rgba(44, 116, 255, 0.14), rgba(79, 227, 255, 0.06));
    margin-bottom: 18px;
}
.you-avatar { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-2); }
.you-main { flex: 1 1 220px; }
.you-rank { font-family: var(--head); font-size: 1.5rem; }
.you-tag { color: var(--muted); font-size: 0.82rem; }

.board-list { display: grid; gap: 8px; }
.board-list-head {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; justify-content: space-between;
    padding: 2px 18px 4px; color: var(--muted);
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em;
}
.board-row {
    display: grid;
    grid-template-columns: 46px 46px minmax(0, 1.5fr) minmax(0, 1.1fr) 96px;
    gap: 16px; align-items: center;
    padding: 12px 18px; border-radius: var(--r);
    border: 1px solid var(--line); background: var(--panel-2);
    color: inherit; text-decoration: none;
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.board-row:hover { border-color: var(--line-2); transform: translateX(3px); background: var(--panel); }
.board-row.is-you { border-color: var(--line-hot); background: rgba(44, 116, 255, 0.1); }
.board-rank { font-family: var(--head); font-size: 1.02rem; color: var(--text-2); }
.board-face { position: relative; display: block; width: 42px; height: 42px; }
.board-face img { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); display: block; }
.board-level {
    position: absolute; right: -6px; bottom: -4px;
    min-width: 20px; padding: 0 5px; border-radius: 999px;
    background: var(--panel-solid); border: 1px solid var(--line-2);
    font-size: 0.66rem; line-height: 17px; text-align: center; color: var(--text-2);
}
.board-who { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.board-name {
    display: flex; align-items: center; gap: 8px; font-weight: 650;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.board-name .you-tag, .board-name .lead-tag {
    font-style: normal; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.09em;
    padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted);
}
.board-name .lead-tag { border-color: rgba(246, 181, 69, 0.45); color: var(--amber); }
.board-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.board-dept {
    font-style: normal; font-size: 0.74rem; padding: 2px 9px; border-radius: 999px;
    border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--text-2);
}
.board-dept.is-quiet { color: var(--muted); }
.board-progress { display: flex; flex-direction: column; gap: 5px; }
.board-bar { display: block; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.board-bar i { display: block; height: 100%; border-radius: 999px; background: var(--grad-hot); }
.board-xp { text-align: right; font-family: var(--head); white-space: nowrap; }
.board-xp strong { font-size: 1.02rem; }
.board-xp em { font-style: normal; color: var(--muted); font-size: 0.7rem; margin-left: 4px; }
.board-empty { padding: 44px; text-align: center; color: var(--muted); }
.board-dept-select { min-width: 170px; }

@media (max-width: 960px) {
    .podium { grid-template-columns: 1fr; }
    .podium-card.is-gold { transform: none; }
    .board-row { grid-template-columns: 40px 42px minmax(0, 1fr) 84px; }
    .board-progress { display: none; }
}
@media (max-width: 560px) {
    .board-row { grid-template-columns: 34px 42px minmax(0, 1fr); }
    .board-xp { display: none; }
}

/* ---------- navbar avatar menu ---------- */
.chip-face { display: flex; align-items: center; gap: 9px; }
.chip-ring { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); }
.chip-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.chip-sub { color: var(--muted); font-size: 0.72rem; }
.chip-caret { color: var(--muted); transition: transform 0.2s ease; }
.user-menu[aria-expanded="true"] .chip-caret { transform: rotate(180deg); }

.user-drop {
    width: 320px; padding: 0; overflow: hidden;
    border-radius: var(--r-lg); border: 1px solid var(--line-2);
    background: var(--panel-solid); box-shadow: var(--sh-2);
}
.drop-hero { position: relative; height: 78px; background: var(--grad-hot); background-size: cover; background-position: center; }
.drop-hero-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3, 5, 11, 0.1), var(--panel-solid)); }
.drop-id { display: flex; gap: 12px; align-items: flex-end; padding: 0 16px; margin-top: -26px; position: relative; }
.drop-avatar { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--panel-solid); background: var(--panel-solid); }
.drop-id-text { min-width: 0; padding-bottom: 2px; }
.drop-id-text strong { display: block; font-family: var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop-handle { color: var(--muted); font-size: 0.78rem; font-family: var(--mono); }
.drop-badge { display: inline-block; margin-top: 4px; }
.drop-progress { padding: 14px 16px 4px; }
.drop-bar { display: block; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.09); overflow: hidden; margin-bottom: 7px; }
.drop-bar span { display: block; height: 100%; background: var(--grad-hot); }
.drop-badge {
    align-self: flex-end; display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 700;
    border: 1px solid rgba(246, 181, 69, 0.45); background: rgba(246, 181, 69, 0.14); color: var(--amber);
}
.drop-hero.has-image { background-size: cover; background-position: center; }
.drop-depts span {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 999px; font-size: 0.76rem;
    border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--text-2);
}
.drop-depts em { font-style: normal; color: var(--blue-2); font-weight: 650; }
.drop-links a.is-staff svg { color: var(--cyan); }
.drop-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 16px 12px; }
.drop-stats > div { padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); text-align: center; }
.drop-stats strong { display: block; font-family: var(--head); font-size: 0.98rem; }
.drop-stats span { color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; }
.drop-depts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.drop-links { display: grid; padding: 8px; border-top: 1px solid var(--line); }
.drop-links a {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 11px; border-radius: var(--r-sm);
    color: var(--text-2); font-size: 0.9rem; font-weight: 600;
}
.drop-links a:hover { background: rgba(44, 116, 255, 0.14); color: var(--text); }
.drop-links svg { color: var(--muted); flex: none; }
.drop-links a:hover svg { color: var(--blue-2); }
.drop-foot { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.drop-foot a {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 8px 10px; border-radius: var(--r-sm); font-size: 0.85rem; font-weight: 650;
    border: 1px solid var(--line);
}
.drop-discord { color: #c3c9ff; background: rgba(88, 101, 242, 0.14); border-color: rgba(88, 101, 242, 0.36); }
.drop-discord:hover { background: rgba(88, 101, 242, 0.24); }
.drop-out { color: var(--red); background: rgba(255, 96, 112, 0.1); border-color: rgba(255, 96, 112, 0.3); }
.drop-out:hover { background: rgba(255, 96, 112, 0.18); }

/* ---------- banned page ---------- */
.ban-notice { max-width: 560px; margin: 0 auto; text-align: center; }
.ban-mark { width: 62px; height: 62px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 96, 112, 0.14); border: 1px solid rgba(255, 96, 112, 0.4); color: var(--red); }
.ban-reason { padding: 14px 16px; border-radius: var(--r); border: 1px solid rgba(255, 96, 112, 0.3); background: rgba(255, 96, 112, 0.08); text-align: left; }

/* ---------- department rank cards on profiles ---------- */
.dept-rank {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 3px 11px; border-radius: 999px;
    border: 1px solid var(--line-hot); background: rgba(44, 116, 255, 0.14);
    font-size: 0.8rem; font-weight: 650;
}
.dept-status { color: var(--muted); font-size: 0.76rem; }
.dept-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.dept-guild { display: inline-flex; align-items: center; gap: 6px; color: #c3c9ff; font-size: 0.8rem; }

/* ---------- admin: member grid ---------- */
.admin-breadcrumb { display: flex; gap: 16px; margin-bottom: 16px; font-size: 0.86rem; }
.member-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.member-search { position: relative; flex: 1 1 240px; }
.member-search input { width: 100%; }
.member-filters, .member-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.member-counts { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 0.82rem; margin-bottom: 16px; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.member-card {
    display: flex; flex-direction: column; gap: 11px;
    padding: 15px; border-radius: var(--r-lg);
    border: 1px solid var(--line); background: var(--panel-2);
    transition: border-color 0.18s ease, transform 0.18s ease;
}
.member-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.member-card.is-banned { border-color: rgba(255, 96, 112, 0.42); background: rgba(255, 96, 112, 0.06); }
.member-card.is-staff { border-color: rgba(79, 227, 255, 0.3); }
.member-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.member-metrics > div { text-align: center; padding: 7px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.member-metrics strong { display: block; font-family: var(--head); font-size: 0.96rem; }
.member-metrics span { color: var(--muted); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; }
.member-depts, .member-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.member-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.member-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 11px; border-top: 1px solid var(--line); }
.member-open { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; }
.member-open-text { color: var(--blue-2); }

/* ---------- admin: single member manager ---------- */
.mm-hero { overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); box-shadow: var(--sh-2); }
.mm-hero.is-banned { border-color: rgba(255, 96, 112, 0.45); }
.mm-banner { height: 108px; background: var(--grad-hot); background-size: cover; background-position: center; }
.mm-hero-body { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; padding: 0 20px 18px; }
.mm-avatar { margin-top: -34px; width: 86px; height: 86px; border-radius: 50%; border: 3px solid var(--panel-solid); background: var(--panel-solid); }
.mm-ident { flex: 1 1 260px; }
.mm-ident h2 { margin: 4px 0 6px; }
.mm-tags { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 6px; }
.mm-progress { flex: 1 1 300px; }
.mm-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.mm-metrics > div { text-align: center; padding: 8px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.mm-metrics strong { display: block; font-family: var(--head); }
.mm-metrics span { color: var(--muted); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; }
.mm-ban-note { margin-top: 14px; padding: 14px 16px; border-radius: var(--r); border: 1px solid rgba(255, 96, 112, 0.35); background: rgba(255, 96, 112, 0.08); }
.mm-ban-note p { margin: 6px 0; }

.mm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 18px; }
.mm-card { padding: 17px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel-2); }
.mm-card.mm-wide { grid-column: 1 / -1; }
.mm-card.mm-danger { border-color: rgba(255, 96, 112, 0.3); }
.mm-card > header { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.mm-card > header h3 { margin: 0; }
.mm-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mm-row input { flex: 1 1 130px; }
.mm-stack { display: grid; gap: 8px; }
.mm-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mm-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 9px; }
.mm-badge {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px; border-radius: var(--r);
    border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
}
.mm-badge.is-on { border-color: var(--line-hot); background: rgba(44, 116, 255, 0.12); }
.mm-badge-text { flex: 1; min-width: 0; }
.mm-badge-text strong { display: block; font-size: 0.9rem; }
.mm-badge-text em { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 0.76rem; font-style: normal; line-height: 1.35; }
.mm-badge .btn { flex: none; }
.mm-depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 9px; }
.mm-dept { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.mm-dept strong { display: block; font-size: 0.9rem; }
.mm-roles { margin-top: 13px; }
.mm-roles summary { cursor: pointer; color: var(--muted); font-size: 0.84rem; }
.mm-roles .role-list { margin-top: 10px; }
.mm-notes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; }
.mm-notes li { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 11px 13px; border-radius: var(--r); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.mm-notes p { margin: 5px 0 0; color: var(--text-2); font-size: 0.9rem; }
.mm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.mm-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 11px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); font-size: 0.88rem; }

/* ---------- admin: permissions ---------- */
.perm-intro { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: space-between; }
.perm-intro-main { flex: 1 1 320px; }
.perm-intro-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.perm-intro-stats > div { min-width: 110px; padding: 11px 15px; border-radius: var(--r); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.perm-intro-stats strong { display: block; font-family: var(--head); font-size: 1.2rem; }
.perm-intro-stats span { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.09em; }
.perm-group { margin-top: 24px; }
.perm-group-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.perm-card { padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel-2); margin-bottom: 11px; }
.perm-card.is-open { border-color: var(--line-hot); }
.perm-card-main { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; justify-content: space-between; }
.perm-card-title strong { display: block; font-family: var(--head); }
.perm-card-title code { color: var(--muted); font-size: 0.72rem; }
.perm-current { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.perm-card-edit { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.perm-picker-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 7px; max-height: 260px; overflow: auto; padding-right: 4px; }
.perm-role { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); cursor: pointer; font-size: 0.86rem; }
.perm-role:hover { border-color: var(--line-2); }
.perm-ids { margin-top: 11px; }
.perm-save { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 13px; }

/* ---------- admin: department guilds + ranks ---------- */
.dept-guild, .rank-panel { margin-bottom: 18px; }
.dept-hint { margin-bottom: 18px; }
.rank-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 9px; counter-reset: rank; }
.rank-item { display: flex; flex-wrap: wrap; gap: 13px; align-items: center; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.rank-item.is-editing { border-color: var(--line-hot); background: rgba(44, 116, 255, 0.1); }
.rank-index { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); font-family: var(--head); font-size: 0.85rem; flex: none; }
.rank-main { flex: 1 1 220px; min-width: 0; }
.rank-roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rank-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.rank-tools form { display: inline; }
.rank-form { border-top: 1px solid var(--line); padding-top: 16px; }
.rank-roles-help { margin-top: 12px; }
.rank-roles-help summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; }
.rank-roles-help .role-list { margin: 9px 0 14px; }

/* ===========================================================================
   PHASE THREE — professional buttons, department rosters, admin roster,
   categorised permissions, consolidated avatar menu
   ========================================================================= */

/* ---------- buttons: squared, restrained, no neon glow ---------- */
.btn {
    padding: 11px 20px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.005em;
    box-shadow: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
    border-color: var(--line-2);
}
.btn:hover  { transform: none; border-color: var(--line-hot); background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 14px; border-radius: 9px; font-size: 0.85rem; }
.btn-xs { padding: 5px 10px; border-radius: 8px; font-size: 0.76rem; font-weight: 600; }
.btn-block { width: 100%; }

.btn-primary {
    background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 88%, #fff), color-mix(in srgb, var(--blue) 86%, #000));
    border-color: color-mix(in srgb, var(--blue) 55%, #fff 20%);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 18px -12px color-mix(in srgb, var(--blue) 80%, #000);
}
.btn-primary:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 78%, #fff), color-mix(in srgb, var(--blue) 94%, #000)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 10px 22px -12px color-mix(in srgb, var(--blue) 85%, #000); }

.btn-ghost { background: rgba(255, 255, 255, 0.035); }
.btn-quiet {
    background: rgba(255, 255, 255, 0.03); border-color: var(--line);
    color: var(--text-2); font-weight: 600;
}
.btn-quiet:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }

.btn-signin { background: linear-gradient(180deg, #16d17a, #0fa866); box-shadow: 0 14px 34px -20px rgba(22, 209, 122, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.btn-signin:hover { background: linear-gradient(180deg, #1ae88a, #12bd77); box-shadow: 0 18px 40px -18px rgba(22, 209, 122, 1), inset 0 1px 0 rgba(255, 255, 255, 0.3); }

/* ---------- departments index: clickable cards ---------- */
.dept-card { position: relative; }
.dept-card-hit { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.dept-card-actions, .dept-card-meta { position: relative; z-index: 2; }
.dept-card-meta {
    display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 2px;
    color: var(--muted); font-size: 0.78rem;
}
.dept-card-meta span { padding: 3px 9px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.dept-card-meta .is-open { color: #8ff0c4; border-color: rgba(60, 220, 160, 0.35); background: rgba(60, 220, 160, 0.1); }
.dept-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- department detail page ---------- */
.dept-hero {
    padding: 46px 0 30px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(900px 260px at 12% -30%, rgba(44, 116, 255, 0.24), transparent 70%),
        var(--panel-2);
}
.dept-hero-inner { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-end; justify-content: space-between; }
.dept-hero-id { display: flex; gap: 18px; align-items: center; min-width: 0; }
.dept-hero-mark {
    width: 84px; height: 84px; flex: none; display: grid; place-items: center;
    border-radius: 18px; border: 1px solid var(--line-2); background: var(--panel-solid); overflow: hidden;
}
.dept-hero-mark img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.dept-tag {
    display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 8px;
    font-family: var(--mono); font-size: 0.76rem; color: var(--blue-2);
    border: 1px solid var(--line-hot); background: rgba(44, 116, 255, 0.12);
}
.dept-hero-stats { display: flex; gap: 10px; }
.dept-hero-stats > div {
    min-width: 96px; padding: 12px 14px; border-radius: 12px; text-align: center;
    border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
}
.dept-hero-stats strong { display: block; font-family: var(--head); font-size: 1.3rem; }
.dept-hero-stats span { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.09em; }

.dept-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.dept-main { display: grid; gap: 16px; }
.dept-side { display: grid; gap: 14px; position: sticky; top: 88px; }
.dept-side-card { padding: 18px 18px 16px; display: grid; gap: 10px; }
.stack-sm { display: grid; gap: 8px; }
.chain { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: chain; }
.chain li {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 8px 11px; border-radius: 9px; border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025); font-size: 0.86rem;
}
.chain li:first-child { border-color: rgba(246, 181, 69, 0.4); background: rgba(246, 181, 69, 0.08); }
.chain em { font-style: normal; color: var(--muted); font-family: var(--mono); font-size: 0.8rem; }

.rank-ladder { display: grid; gap: 12px; }
.rank-block {
    padding: 16px 18px; border-radius: 14px;
    border: 1px solid var(--line); background: var(--panel-2);
    border-left: 3px solid rgba(88, 160, 255, 0.35);
}
.rank-block.is-top { border-left-color: var(--amber); background: linear-gradient(180deg, rgba(246, 181, 69, 0.07), var(--panel-2)); }
.rank-block.is-unranked { border-left-color: var(--line-2); }
.rank-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rank-step {
    width: 30px; height: 30px; flex: none; display: grid; place-items: center;
    border-radius: 9px; font-family: var(--mono); font-size: 0.82rem;
    border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); color: var(--text-2);
}
.rank-block.is-top .rank-step { color: var(--amber); border-color: rgba(246, 181, 69, 0.45); background: rgba(246, 181, 69, 0.12); }
.rank-title { display: flex; flex-direction: column; line-height: 1.25; }
.rank-empty { margin: 0; }
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.roster-member {
    display: flex; align-items: center; gap: 10px; min-width: 0;
    padding: 8px 10px; border-radius: 11px;
    border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025);
    color: var(--text); transition: border-color 0.16s ease, background 0.16s ease;
}
.roster-member:hover { border-color: var(--line-hot); background: rgba(44, 116, 255, 0.1); }
.roster-member img { width: 36px; height: 36px; border-radius: 50%; flex: none; border: 1px solid var(--line-2); }
.roster-member-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.roster-member-text strong { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-handle { color: var(--muted); font-family: var(--mono); font-size: 0.72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-level { margin-left: auto; flex: none; color: var(--blue-2); font-family: var(--mono); font-size: 0.72rem; }

@media (max-width: 960px) {
    .dept-layout { grid-template-columns: 1fr; }
    .dept-side { position: static; }
}

/* ---------- profile: department membership cards ---------- */
.dept-card-pro {
    display: grid; grid-template-columns: 60px minmax(0, 1fr) 26px; gap: 14px; align-items: center;
    padding: 15px 16px; border-radius: 14px;
    border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
    transition: border-color 0.18s ease, background 0.18s ease;
}
.dept-card-pro:hover { border-color: var(--line-hot); }
.dept-card-pro .dept-logo {
    width: 60px; height: 60px; padding: 6px; border-radius: 14px;
    border: 1px solid var(--line-2); background: var(--panel-solid); cursor: zoom-in;
}
.dept-card-pro .dept-logo img { width: 100%; height: 100%; object-fit: contain; }
.dept-ladder { display: block; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin: 9px 0 2px; }
.dept-ladder span { display: block; height: 100%; background: linear-gradient(90deg, #2c74ff, #4fe3ff); }
.dept-card-pro .dept-go { color: var(--muted); }
.dept-card-pro .dept-go:hover { color: var(--blue-2); }

/* ---------- admin: member roster table ---------- */
.roster { display: grid; gap: 8px; }
.roster-head {
    display: grid; grid-template-columns: minmax(200px, 1.3fr) minmax(140px, 1fr) 160px minmax(150px, 1fr) 230px;
    gap: 12px; padding: 0 16px 4px;
    color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em;
}
.roster-head-actions { text-align: right; }
.roster-row {
    display: grid; grid-template-columns: minmax(200px, 1.3fr) minmax(140px, 1fr) 160px minmax(150px, 1fr) 230px;
    gap: 12px; align-items: center;
    padding: 12px 16px; border-radius: 13px;
    border: 1px solid var(--line); background: var(--panel-2);
    transition: border-color 0.16s ease, background 0.16s ease;
}
.roster-row:hover { border-color: var(--line-2); background: rgba(255, 255, 255, 0.035); }
.roster-row.is-banned { border-color: rgba(255, 96, 112, 0.4); background: rgba(255, 96, 112, 0.06); }
.roster-cell { min-width: 0; }
.roster-who { display: flex; align-items: center; gap: 11px; }
.roster-avatar img { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); }
.roster-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.roster-name a { font-family: var(--head); font-weight: 650; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-name a:hover { color: var(--blue-2); }
.roster-sub { color: var(--muted); font-size: 0.78rem; }
.roster-id { color: var(--muted); font-family: var(--mono); font-size: 0.68rem; opacity: 0.7; }
.roster-flags { display: flex; flex-wrap: wrap; gap: 5px; }
.tagx {
    padding: 2px 8px; border-radius: 7px; font-size: 0.71rem; font-weight: 650;
    border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--text-2);
}
.tagx.is-danger { color: #ffb4bc; border-color: rgba(255, 96, 112, 0.4); background: rgba(255, 96, 112, 0.12); }
.tagx.is-gold   { color: var(--amber); border-color: rgba(246, 181, 69, 0.4); background: rgba(246, 181, 69, 0.12); }
.tagx.is-violet { color: #c9b6ff; border-color: rgba(150, 120, 255, 0.4); background: rgba(150, 120, 255, 0.12); }
.tagx.is-muted  { color: var(--muted); }
.tagx.is-quiet  { color: var(--muted); background: transparent; }
.roster-progress { display: grid; gap: 4px; }
.roster-level { display: flex; align-items: baseline; gap: 8px; }
.roster-level-num { font-family: var(--head); font-weight: 650; font-size: 0.9rem; }
.roster-bar { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.roster-bar span { display: block; height: 100%; background: linear-gradient(90deg, #2c74ff, #4fe3ff); }
.roster-depts { display: flex; flex-wrap: wrap; gap: 5px; }
.dept-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 9px; border-radius: 8px; font-size: 0.74rem;
    border: 1px solid var(--line); background: rgba(255, 255, 255, 0.035); color: var(--text-2);
}
.dept-chip em { font-style: normal; color: var(--blue-2); font-weight: 650; }
.dept-chip.is-more { color: var(--muted); }
.roster-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.roster-actions .inline-form { display: flex; gap: 5px; align-items: center; }
.roster-actions .mini { width: 62px; padding: 6px 8px; border-radius: 8px; font-size: 0.8rem; }
.roster-empty { padding: 26px; text-align: center; border: 1px dashed var(--line-2); border-radius: 13px; }

@media (max-width: 1500px) {
    .roster-head { display: none; }
    .roster-row {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        grid-template-areas: 'who flags' 'progress depts' 'actions actions';
        row-gap: 12px;
    }
    .roster-who { grid-area: who; }
    .roster-flags { grid-area: flags; align-content: flex-start; }
    .roster-progress { grid-area: progress; }
    .roster-depts { grid-area: depts; }
    .roster-actions { grid-area: actions; justify-content: flex-start; padding-top: 10px; border-top: 1px solid var(--line); }
}
@media (max-width: 680px) {
    .roster-row { grid-template-columns: 1fr; grid-template-areas: 'who' 'flags' 'progress' 'depts' 'actions'; }
}

/* admin toolbar tidy-up */
.member-toolbar { align-items: stretch; }
.member-search { display: flex; gap: 8px; align-items: center; }
.member-search input[type="search"] { flex: 1; padding-left: 38px; }
.member-search .search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.member-counts { margin: 0; align-items: center; }
.member-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.member-sort { display: inline-flex; align-items: center; gap: 8px; }
.member-sort select { padding: 8px 12px; border-radius: 9px; font-size: 0.86rem; }

/* ---------- admin: permissions ---------- */
.perm-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.perm-search { position: relative; flex: 1 1 260px; }
.perm-search input { width: 100%; padding-left: 38px; }
.perm-search .search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.perm-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.perm-nav a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 12px; border-radius: 9px; font-size: 0.83rem; font-weight: 600;
    border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--text-2);
}
.perm-nav a:hover { border-color: var(--line-hot); color: var(--text); }
.perm-nav em { font-style: normal; color: var(--muted); font-family: var(--mono); font-size: 0.74rem; }
.perm-group { scroll-margin-top: 96px; }
.perm-group-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.perm-group-meter { width: 120px; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.perm-group-meter span { display: block; height: 100%; background: linear-gradient(90deg, #2c74ff, #4fe3ff); }
.perm-card-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

/* ---------- avatar menu: single source of truth ---------- */
.user-menu.is-open .user-chip { border-color: var(--line-hot); background: rgba(44, 116, 255, 0.14); }
.user-menu.is-open .chip-caret { transform: rotate(180deg); }
.user-drop {
    position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
    width: 320px; max-width: calc(100vw - 32px); padding: 0; overflow: hidden;
    border-radius: 16px; border: 1px solid var(--line-2);
    background: var(--panel-solid); box-shadow: var(--sh-2);
    opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.985);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
    pointer-events: none;
}
.user-menu.is-open .user-drop {
    opacity: 1; visibility: visible; transform: none; pointer-events: auto; display: block;
}
.drop-hero { height: 74px; }

body.menu-locked { overflow: hidden; }

@media (max-width: 880px) {
    .user-menu { width: 100%; }
    .user-chip { width: 100%; justify-content: flex-start; }
    .user-drop {
        position: static; width: 100%; max-width: none; margin-top: 10px;
        transform: none; box-shadow: none;
        opacity: 1; visibility: visible; pointer-events: auto;
        display: none;
    }
    .user-menu.is-open .user-drop { display: block; }
    body.menu-locked { overflow: auto; }
}

/* roster action row: keep controls their natural size */
.roster-actions { align-items: center; }
.roster-actions .btn { align-self: center; }
.roster-actions .inline-form { flex: none; }
.roster-actions .mini { flex: none; width: 68px; }

/* search fields: icon sits in its own slot instead of over the text */
.member-search, .perm-search { display: flex; align-items: center; gap: 8px; }
.member-search .search-icon, .perm-search .search-icon {
    position: static; transform: none; display: inline-grid; place-items: center;
    width: 36px; height: 40px; flex: none; border-radius: 9px;
    border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--muted);
}
.member-search input[type="search"], .perm-search input[type="search"] { flex: 1; padding-left: 14px; }

/* ---------- permissions: card layout ---------- */
.perm-form { display: grid; gap: 22px; }
.perm-group { display: grid; gap: 10px; }
.perm-card {
    display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start;
    padding: 16px 18px; border-radius: 13px;
    border: 1px solid var(--line); background: var(--panel-2);
    border-left: 3px solid var(--line-2);
}
.perm-card.is-live { border-left-color: var(--blue); background: linear-gradient(180deg, rgba(44, 116, 255, 0.07), var(--panel-2)); }
.perm-card-main { display: grid; gap: 6px; min-width: 0; }
.perm-card-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; }
.perm-card-title strong { font-family: var(--head); font-size: 1rem; }
.perm-card-main p { margin: 0; }
.perm-current { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.perm-card-edit { display: grid; gap: 8px; }
.perm-picker summary { cursor: pointer; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); font-size: 0.85rem; }
.perm-picker-list { max-height: 210px; overflow: auto; margin-top: 8px; display: grid; gap: 4px; padding: 8px; border-radius: 9px; border: 1px solid var(--line); }
.perm-role { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.perm-ids { display: grid; gap: 4px; }
.perm-ids input { width: 100%; }
.perm-save { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding-top: 6px; }

@media (max-width: 900px) {
    .perm-card { grid-template-columns: 1fr; }
}
.perm-card-tools { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; }
.perm-card-tools:empty { display: none; }
.dept-logo img, .dept-hero-logo img, .mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dept-logo .logo-text, .dept-hero-logo .logo-text { font-family: var(--head); font-size: 0.85rem; letter-spacing: 0.04em; }

/* =========================================================================
   Phase 4 — member manager, review inbox, applications, misc fixes
   ========================================================================= */

.flash-warn { border-color: rgba(255, 190, 90, 0.35); background: rgba(255, 190, 90, 0.1); color: #ffdca6; }

/* Leaderboard rows without departments */
.board-meta { font-style: normal; color: var(--muted); font-size: 0.82rem; letter-spacing: 0.01em; }

/* ---- admin member manager -------------------------------------------- */
.mgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 14px;
    margin-top: 18px;
}
.mcard {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    min-width: 0;
}
.mcard:hover { border-color: rgba(120, 160, 255, 0.32); transform: translateY(-2px); box-shadow: 0 16px 34px rgba(4, 8, 20, 0.4); }
.mcard.is-banned { border-color: rgba(255, 96, 112, 0.3); background: linear-gradient(180deg, rgba(255, 96, 112, 0.09), rgba(255, 255, 255, 0.015)); }

.mcard-head { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: inherit; }
.mcard-avatar { position: relative; flex: 0 0 auto; }
.mcard-avatar img { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; display: block; }
.mcard-level {
    position: absolute; right: -6px; bottom: -6px;
    min-width: 22px; height: 22px; padding: 0 5px;
    display: grid; place-items: center;
    font-size: 0.68rem; font-weight: 700; font-style: normal;
    border-radius: 999px; color: #04070f;
    background: linear-gradient(140deg, #8fb6ff, #5b8def);
    border: 2px solid rgba(8, 12, 24, 0.9);
}
.mcard-id { display: grid; gap: 2px; min-width: 0; }
.mcard-id strong { font-size: 0.98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard-handle { color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mcard-tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.mcard-tags:empty { display: none; }

.mcard-progress { display: grid; gap: 6px; margin-top: auto; }
.mcard-xp .mini::-webkit-outer-spin-button, .mcard-xp .mini::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mcard-xp .mini { -moz-appearance: textfield; appearance: textfield; }
.mcard-progress-top { display: flex; justify-content: space-between; gap: 10px; font-size: 0.82rem; color: var(--muted); }
.mcard-progress-top strong { color: var(--text); }
.mcard-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.mcard-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #5b8def, #8fe0ff); }

.mcard-foot {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.mcard-foot form { display: flex; align-items: center; gap: 6px; margin: 0; flex: 0 0 auto; }
.mcard-foot .btn { flex: 0 0 auto; }
.mcard-foot .mcard-xp .mini {
    width: 82px; min-width: 82px; max-width: 82px; flex: 0 0 82px;
    padding: 7px 8px; font-size: 0.8rem; text-align: center;
}
.mcard-uid {
    flex: 1 0 100%; color: rgba(160, 175, 200, 0.5);
    font-size: 0.68rem; letter-spacing: 0.05em; font-variant-numeric: tabular-nums;
}
.mcard-uid::before { content: 'ID '; opacity: 0.7; }

/* ---- applications: reviewer inbox banner ----------------------------- */
.inbox-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.inbox-icon {
    width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
    color: #9dc0ff; background: rgba(91, 141, 239, 0.14); border: 1px solid rgba(91, 141, 239, 0.28);
    flex: 0 0 auto;
}
.inbox-copy { display: grid; gap: 2px; min-width: 0; flex: 1 1 220px; }
.inbox-copy strong { font-size: 1rem; }

/* ---- review inbox ---------------------------------------------------- */
.rev-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.rev-case { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; }

.rev-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.rev-stat {
    padding: 16px 18px; border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    display: grid; gap: 2px;
}
.rev-stat strong { font-size: 1.6rem; font-family: var(--head); }
.rev-stat span { color: var(--muted); font-size: 0.82rem; }
.rev-stat.is-hot { border-color: rgba(91, 141, 239, 0.35); background: linear-gradient(180deg, rgba(91, 141, 239, 0.16), rgba(255, 255, 255, 0.02)); }

.rev-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.rev-toolbar .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rev-toolbar .chip em { font-style: normal; margin-left: 7px; opacity: 0.7; font-variant-numeric: tabular-nums; }
.rev-search { display: flex; gap: 8px; align-items: center; }
.rev-search input[type="search"] { min-width: 210px; }
.rev-apps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.rev-scope { margin: 0 0 12px; }

.rev-list { display: grid; gap: 10px; margin-top: 14px; }
.rev-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1.3fr) minmax(0, 1.2fr) auto auto 20px;
    align-items: center; gap: 14px;
    padding: 12px 16px; border-radius: 16px; text-decoration: none; color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.014));
    transition: border-color 0.18s ease, transform 0.18s ease;
}
.rev-card:hover { border-color: rgba(120, 160, 255, 0.34); transform: translateX(2px); }
.rev-card.is-pending { border-left: 3px solid rgba(255, 200, 90, 0.6); }
.rev-card.is-approved { border-left: 3px solid rgba(57, 217, 138, 0.5); }
.rev-card.is-denied { border-left: 3px solid rgba(242, 85, 90, 0.5); }
.rev-card-avatar { width: 46px; height: 46px; border-radius: 13px; object-fit: cover; }
.rev-card-main { display: grid; gap: 2px; min-width: 0; }
.rev-card-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rev-card-sub { color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rev-card-app { display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--muted); font-size: 0.88rem; }
.rev-card-app > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rev-card-when { white-space: nowrap; }
.rev-card-go { color: rgba(160, 180, 220, 0.55); text-align: right; }

/* review detail */
.rev-hero {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 18px; border-radius: 20px; margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(91, 141, 239, 0.12), rgba(255, 255, 255, 0.02));
}
.rev-hero-main { flex: 1 1 240px; min-width: 0; display: grid; gap: 4px; }
.rev-hero-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 0.85rem; }
.rev-hero-meta a { color: #9dc0ff; }

.rev-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr); gap: 16px; align-items: start; }
.rev-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

.qa-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.qa-item { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.qa-num {
    width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
    font-size: 0.78rem; font-weight: 700; color: #9dc0ff;
    background: rgba(91, 141, 239, 0.14); border: 1px solid rgba(91, 141, 239, 0.26);
}
.qa-body { min-width: 0; }
.qa-q { margin: 0 0 6px; font-weight: 600; font-size: 0.92rem; }
.qa-a {
    padding: 11px 13px; border-radius: 13px; font-size: 0.92rem; line-height: 1.6;
    background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.06);
    overflow-wrap: anywhere;
}

.rev-side { display: grid; gap: 16px; }
.rev-applicant { text-align: center; display: grid; gap: 8px; justify-items: center; }
.rev-avatar { width: 76px; height: 76px; border-radius: 22px; object-fit: cover; }
.rev-name { margin: 0; font-weight: 700; font-size: 1.05rem; }

/* compact department memberships on the submission review sidebar */
.rev-depts { width: 100%; display: grid; gap: 7px; margin-top: 4px; justify-items: stretch; text-align: left; }
.rev-depts-label {
    font-size: 0.66rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--muted); padding-left: 2px;
}
.rev-dept-rows { display: grid; gap: 8px; }
.rev-dept-row {
    display: flex; align-items: center; gap: 11px;
    padding: 8px 10px; border-radius: 12px;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012)),
        rgba(11, 18, 33, 0.66);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 14px 34px -30px rgba(0, 0, 0, 0.9);
}
.rev-dept-logo {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px;
    display: grid; place-items: center; overflow: hidden;
    border: 1px solid var(--line-2); background: rgba(4, 9, 18, 0.7);
}
.rev-dept-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.rev-dept-logo .logo-text { font-family: var(--head); font-weight: 700; font-size: 0.7rem; color: var(--text-2); }
.rev-dept-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rev-dept-name {
    font-family: var(--head); font-size: 0.82rem; font-weight: 640;
    letter-spacing: 0.005em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rev-dept-rank {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.6rem; font-weight: 800; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--blue-2);
}
.rev-dept-rank.is-none { color: var(--muted); }
.rev-dept-insignia { width: 15px; height: 15px; object-fit: contain; }
.rev-no-depts { width: 100%; text-align: center; }
.rev-facts { list-style: none; margin: 6px 0 0; padding: 0; width: 100%; display: grid; gap: 6px; }
.rev-facts li { display: flex; justify-content: space-between; gap: 10px; font-size: 0.84rem; }
.rev-facts span { color: var(--muted); }
.rev-facts .is-danger { color: #ff9aa4; }
.rev-block { width: 100%; margin-top: 6px; justify-content: center; }

.rev-decision .field { margin-bottom: 10px; }
.check-line { display: flex; align-items: center; gap: 9px; font-size: 0.86rem; color: var(--muted); margin-bottom: 14px; }
.rev-actions { display: grid; gap: 9px; }
.rev-actions .btn { justify-content: center; }
.btn-approve, .btn-deny {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 16px; border-radius: 13px; font-weight: 650; font-size: 0.92rem;
    border: 1px solid transparent; cursor: pointer; transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.btn-approve { color: #04150c; background: linear-gradient(140deg, #6ff0ae, #23c07a); box-shadow: 0 10px 22px rgba(35, 192, 122, 0.24); }
.btn-deny { color: #ffdfe2; background: rgba(242, 85, 90, 0.16); border-color: rgba(242, 85, 90, 0.42); }
.btn-approve:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-deny:hover { transform: translateY(-1px); background: rgba(242, 85, 90, 0.24); }
.rev-reset { justify-self: center; }
.rev-last { margin: 12px 0 0; }

@media (max-width: 1020px) {
    .rev-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 780px) {
    .rev-card { grid-template-columns: 46px minmax(0, 1fr) auto; row-gap: 8px; }
    .rev-card-app { grid-column: 2 / -1; }
    .rev-card-when { grid-column: 2; }
    .rev-card-go { display: none; }
    .rev-search input[type="search"] { min-width: 0; width: 100%; }
    .rev-search { width: 100%; }
}

/* ==========================================================================
   Phase 5 — deeper glass, professional controls, insignia + membership rows
   ========================================================================== */

/* --- Surfaces: real frosted glass with a lit top edge ------------------- */
.card, .panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012) 42%, rgba(255, 255, 255, 0) 100%),
        var(--panel);
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    box-shadow:
        var(--sh-1),
        0 1px 0 rgba(255, 255, 255, 0.04),
        0 30px 80px -46px rgba(0, 0, 0, 0.96);
}

.panel::after,
.card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}
.panel, .card { position: relative; }

.card:hover {
    box-shadow:
        var(--sh-1),
        0 34px 90px -46px rgba(0, 0, 0, 0.98),
        0 0 0 1px rgba(120, 180, 255, 0.16);
}

/* --- Controls: crisper, quieter, less "AI gradient" --------------------- */
.btn {
    border-radius: 11px;
    font-weight: 650;
    letter-spacing: 0.012em;
    transition: transform 0.16s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.24s ease, color 0.2s ease;
}

.btn-primary {
    background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 88%, #fff), color-mix(in srgb, var(--blue) 86%, #000));
    border-color: color-mix(in srgb, var(--blue) 50%, rgba(255, 255, 255, 0.4));
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 14px 32px -18px color-mix(in srgb, var(--blue) 85%, transparent);
}
.btn-primary:hover {
    background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 80%, #fff), color-mix(in srgb, var(--blue) 92%, #000));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        0 20px 44px -20px color-mix(in srgb, var(--blue) 95%, transparent);
}
.btn-primary:active { box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35); }

.btn-ghost {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.btn-ghost:hover { background: linear-gradient(180deg, rgba(120, 180, 255, 0.18), rgba(88, 160, 255, 0.07)); }

.btn-approve {
    background: linear-gradient(180deg, #45e0a6, #1aa878);
    border-color: rgba(120, 245, 200, 0.4);
    color: #04160f;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 14px 32px -18px rgba(55, 214, 155, 0.7);
}
.btn-approve:hover { background: linear-gradient(180deg, #55eab2, #21b985); }

.btn-deny {
    background: linear-gradient(180deg, rgba(255, 96, 112, 0.22), rgba(255, 96, 112, 0.1));
    border-color: rgba(255, 130, 145, 0.42);
    color: #ffc4ca;
}
.btn-deny:hover { background: linear-gradient(180deg, rgba(255, 96, 112, 0.34), rgba(255, 96, 112, 0.16)); }

.btn.is-disabled, .btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* Inputs get the same glass treatment */
input:not([type='checkbox']):not([type='radio']):not([type='file']),
select,
textarea {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)) , rgba(6, 11, 22, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
input:focus, select:focus, textarea:focus {
    border-color: rgba(90, 165, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(44, 116, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* --- Profile department memberships: long rows -------------------------- */
.dept-rows { display: grid; gap: 12px; }

.dept-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012)),
        rgba(11, 18, 33, 0.66);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 44px -34px rgba(0, 0, 0, 0.9);
    cursor: default;
}

.dept-row-logo {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line-2);
    background: rgba(4, 9, 18, 0.7);
}
.dept-row-logo img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.dept-row-logo .logo-text { font-family: var(--head); font-weight: 700; font-size: 0.95rem; color: var(--text-2); }

.dept-row-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dept-row-name {
    font-family: var(--head);
    font-size: 1.02rem;
    font-weight: 640;
    letter-spacing: 0.005em;
    color: var(--text);
}
.dept-row-rank {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue-2);
}
.dept-row-rank.is-none { color: var(--muted); }
.dept-row-insignia { width: 20px; height: 20px; object-fit: contain; }

.dept-row-tag {
    margin-left: auto;
    flex: 0 0 auto;
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-2);
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 560px) {
    .dept-row { gap: 12px; padding: 12px 13px; }
    .dept-row-logo { width: 44px; height: 44px; }
    .dept-row-tag { display: none; }
}

/* --- Admin: rank insignia thumbs and upload field ---------------------- */
.rank-insignia {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(4, 9, 18, 0.6);
}
.rank-insignia img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.rank-insignia em {
    font-style: normal;
    font-size: 0.52rem;
    line-height: 1.1;
    text-align: center;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.insignia-row { display: flex; align-items: flex-start; gap: 14px; }
.insignia-preview {
    flex: 0 0 auto;
    width: 62px;
    height: 62px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px dashed var(--line-2);
    background: rgba(4, 9, 18, 0.6);
}
.insignia-preview img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.insignia-preview em { font-style: normal; font-size: 0.66rem; color: var(--muted); }
.insignia-inputs { display: grid; gap: 8px; flex: 1 1 auto; min-width: 0; }
.insignia-inputs input[type='file'] {
    font-size: 0.84rem;
    color: var(--text-2);
    padding: 9px 12px;
    border: 1px dashed var(--line-2);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, 0.02);
    width: 100%;
}
.insignia-inputs input[type='file']::file-selector-button {
    font: inherit;
    font-weight: 650;
    margin-right: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--line-2);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    cursor: pointer;
}
.field .opt { font-weight: 500; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* --- Applications: richer cards ---------------------------------------- */
.app-card {
    border-radius: var(--r-lg);
    overflow: hidden;
}
.app-card::before {
    content: '';
    position: absolute;
    inset: -40% 40% 60% -20%;
    background: radial-gradient(60% 60% at 30% 30%, rgba(44, 116, 255, 0.22), transparent 70%);
    opacity: 0.7;
    pointer-events: none;
}
.app-card:hover { transform: translateY(-3px); }
.app-card-top { position: relative; z-index: 1; }
.app-card .app-card-foot {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.inbox-banner { border-color: var(--line-2); }

/* --- Review queue avatars ---------------------------------------------- */
.rev-avatar, .rev-card-avatar {
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line-2);
}

/* --- Application builder ------------------------------------------------ */
.form-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line);
}
.form-inset {
    margin-top: 18px;
    padding: 20px;
    border-radius: var(--r);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)), rgba(5, 10, 20, 0.5);
}
.admin-list { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 10px; counter-reset: q; }
.admin-list > li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--r);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.028);
}
.admin-list > li:not(.muted)::before {
    counter-increment: q;
    content: counter(q);
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--blue-2);
    border: 1px solid var(--line-2);
    background: rgba(44, 116, 255, 0.12);
}
.admin-list > li .status-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.form-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 16px;
    margin-top: 6px;
    border-top: 1px solid var(--line);
}
.form-foot .spacer, .form-foot .push { margin-left: auto; }

/* Toggle-style checkbox rows in staff forms stay compact and readable. */
.choice > input[type="checkbox"] { flex: 0 0 auto; }
.admin-list > li > .btn { flex: 0 0 auto; }
.admin-list > li { flex-wrap: nowrap; }
@media (max-width: 640px) {
    .admin-list > li { flex-wrap: wrap; }
}

/* ---------- homepage polish (calmer, glassier) ---------- */
.hero { padding: 66px 0 44px; }
.hero-sub { margin-bottom: 1.5em; }
.hero-stats { margin-top: 26px; }
.pillars-wrap { padding: 6px 0 10px; }
.pillar { padding-top: 26px; padding-bottom: 26px; }
.section-head { align-items: flex-end; }
.section-head .muted { max-width: 46ch; }
.update-card, .top-card, .connect-bar, .discord-panel, .featured, .faq-item {
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}
.connect-bar, .discord-panel, .featured {
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
        var(--panel);
}
.faq-item { border-radius: var(--r); }

/* ---------- leaderboard layout fixes ---------- */
.board-head .shell { gap: 18px; }
.board-filters { align-items: flex-end; margin: 22px 0 14px; }
.board-search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: rgba(4, 8, 16, 0.72); }
.board-search:focus-within { border-color: var(--line-hot); }
.board-search .search-icon { position: static; transform: none; flex: 0 0 auto; color: var(--muted); pointer-events: none; }
.board-search input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]) {
    flex: 1; padding: 12px 0; border: 0; background: transparent; box-shadow: none; padding-left: 0;
}
.board-chips { align-self: center; }
.board-dept-select { display: grid; gap: 5px; min-width: 190px; }
.you-panel { margin-top: 6px; }

/* ---------- automatic badges (Discord role rules) ---------- */
.auto-badge-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.auto-badge-bar h2 { margin: 0 0 4px; }
.auto-badge-bar p { margin: 0; max-width: 62ch; }
.auto-rule {
    margin: 4px 0 2px;
    padding: 16px 18px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background:
        linear-gradient(150deg, rgba(79, 227, 255, 0.05), rgba(255, 255, 255, 0.012)),
        rgba(255, 255, 255, 0.015);
}
.auto-rule legend {
    padding: 0 8px;
    font-family: var(--display, inherit);
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cyan, #8fe6ff);
}
.auto-rule > p { margin: 0 0 12px; }
.auto-rule .check { display: flex; align-items: center; gap: 9px; margin-top: 12px; font-size: 0.9rem; }
.auto-rule .check input { width: auto; }
.tag-auto {
    border-color: rgba(79, 227, 255, 0.42);
    background: rgba(79, 227, 255, 0.1);
    color: #a7ecfb;
}
@media (max-width: 640px) {
    .auto-badge-bar { flex-direction: column; align-items: stretch; }
    .auto-badge-bar form .btn { width: 100%; }
}

/* ---------- CAD characters on profiles ---------- */
.cad-list { display: grid; gap: 10px; }
.cad-card {
    position: relative;
    padding: 13px 15px 12px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
        rgba(9, 14, 24, 0.35);
    backdrop-filter: blur(10px);
    overflow: hidden;
}
.cad-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, #3f7dff, #2a55c9);
}
.cad-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.cad-name {
    margin: 0;
    font-family: var(--display, inherit);
    font-size: 0.98rem;
    letter-spacing: 0.01em;
}
.cad-type {
    flex: none;
    padding: 3px 10px;
    border: 1px solid rgba(63, 125, 255, 0.5);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(63, 125, 255, 0.9), rgba(38, 84, 205, 0.9));
    color: #eaf1ff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.cad-meta { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; }
.cad-meta dt {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted, #8b97ad);
}
.cad-meta dd { margin: 2px 0 0; font-size: 0.9rem; font-weight: 600; }
.cad-age { margin-left: 5px; font-weight: 500; opacity: 0.6; font-size: 0.8rem; }
@media (max-width: 480px) {
    .cad-card-top { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ---- CAD character record ---- */
button.cad-card {
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    display: block;
    position: relative;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
button.cad-card:hover,
button.cad-card:focus-visible {
    transform: translateY(-2px);
    border-color: color-mix(in oklab, var(--accent, #4c8dff) 45%, transparent);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}
.cad-open-hint {
    position: absolute;
    right: 16px;
    bottom: 14px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.16s ease;
}
button.cad-card:hover .cad-open-hint,
button.cad-card:focus-visible .cad-open-hint { opacity: 0.65; }

.cad-modal-card {
    max-width: 620px;
    width: min(620px, calc(100vw - 32px));
    text-align: left;
    position: relative;
    max-height: min(84vh, 780px);
    overflow-y: auto;
}
.cad-modal-x {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}
.cad-modal-x:hover { background: rgba(255, 255, 255, 0.12); }
.cad-modal-head { margin: 0 0 18px; padding-right: 42px; }
.cad-modal-head .h3 { margin: 8px 0 4px; }
.cad-modal-dob { margin: 0; font-size: 0.85rem; }

.cad-group + .cad-group { margin-top: 20px; }
.cad-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.72;
}
.cad-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cad-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(8px);
}
.cad-plate {
    flex: 0 0 auto;
    font-family: var(--mono);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
}
.cad-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.85rem;
    opacity: 0.85;
}
.cad-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.cad-row-main strong { font-size: 0.94rem; }
.cad-row-sub { font-size: 0.74rem; opacity: 0.62; letter-spacing: 0.02em; }
.cad-row-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.cad-tag {
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}
.cad-tag.is-good { border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.14); color: #86efac; }
.cad-tag.is-warn { border-color: rgba(250, 204, 21, 0.38); background: rgba(250, 204, 21, 0.13); color: #fde047; }
.cad-tag.is-bad  { border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.14); color: #fca5a5; }
.cad-empty { margin: 0; font-size: 0.85rem; }
.cad-loading { display: flex; align-items: center; gap: 10px; font-size: 0.87rem; opacity: 0.75; }
.cad-spinner {
    width: 15px;
    height: 15px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.75);
    animation: cad-spin 0.7s linear infinite;
}
@keyframes cad-spin { to { transform: rotate(360deg); } }
body.modal-open { overflow: hidden; }
@media (max-width: 640px) {
    .cad-row { flex-wrap: wrap; }
    .cad-row-tags { justify-content: flex-start; width: 100%; }
    .cad-open-hint { position: static; display: block; margin-top: 8px; opacity: 0.5; }
}

/* ---- CAD live sync note ---- */
.cad-sync-note {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .85rem 0 0;
    font-size: .72rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--muted, #8b93a7);
}

.cad-sync-dot {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, .55);
    animation: cad-pulse 2.4s ease-out infinite;
}

@keyframes cad-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); }
    70%  { box-shadow: 0 0 0 .5rem rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .cad-sync-dot { animation: none; }
}


/* ---------- in-game hours chip (profile handle row) ---------- */
.hours-box {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 11px; border-radius: 999px;
    font-size: 0.78rem; letter-spacing: 0.01em;
    color: #b8f0d6;
    background: linear-gradient(180deg, rgba(46, 214, 155, 0.16), rgba(46, 214, 155, 0.07));
    border: 1px solid rgba(46, 214, 155, 0.32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(6px);
}
.hours-box strong { font-family: var(--mono); font-weight: 600; color: #e4fff3; }
.hours-box .hours-word { color: rgba(184, 240, 214, 0.7); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
@media (max-width: 520px) { .hours-box .hours-word { display: none; } }

/* ==================================================================
   Departments as rows
   ================================================================== */
.dept-lines { display: grid; gap: 14px; }
.dept-line {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background:
        linear-gradient(120deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015)),
        var(--panel);
    backdrop-filter: blur(16px);
    box-shadow: var(--sh-1);
    transition: border-color .3s ease, transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease;
}
.dept-line:hover { border-color: var(--line-hot); transform: translateY(-2px); box-shadow: var(--sh-1), 0 24px 52px -30px rgba(44,116,255,.8); }
.dept-line.is-featured { border-color: rgba(88,160,255,.42); }
.dept-line-logo {
    width: 78px; height: 78px;
    display: grid; place-items: center;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: radial-gradient(120% 120% at 30% 0%, rgba(88,160,255,.18), transparent 65%), rgba(255,255,255,.03);
    overflow: hidden;
}
.dept-line-logo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.dept-line-logo .logo-text { font-family: var(--head); font-weight: 750; letter-spacing: .04em; color: var(--text-2); }
.dept-line-body { display: grid; gap: 7px; min-width: 0; }
.dept-line-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dept-line-name { font-family: var(--head); font-size: 1.12rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.dept-line-tag, .dept-line-flag {
    font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
    padding: 3px 8px; border-radius: 7px; border: 1px solid var(--line);
    background: rgba(255,255,255,.04); color: var(--muted);
}
.dept-line-flag { color: #a9cdff; border-color: rgba(88,160,255,.4); background: rgba(44,116,255,.14); }
.dept-line-desc { margin: 0; color: var(--text-2); font-size: .9rem; line-height: 1.55; }
.dept-line-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: .76rem; color: var(--muted); }
.dept-line-meta span {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 9px; border-radius: 8px;
    border: 1px solid var(--line); background: rgba(255,255,255,.03);
}
.dept-line-meta .is-open { color: #8ff0c4; border-color: rgba(60,220,160,.34); background: rgba(60,220,160,.1); }
.dept-line-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.live-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #3cdca0; box-shadow: 0 0 0 3px rgba(60,220,160,.18);
    animation: livePulse 2.4s ease-in-out infinite;
}
@keyframes livePulse { 50% { box-shadow: 0 0 0 6px rgba(60,220,160,0); } }
@media (max-width: 860px) {
    .dept-line { grid-template-columns: 60px minmax(0, 1fr); }
    .dept-line-logo { width: 60px; height: 60px; border-radius: 15px; }
    .dept-line-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ==================================================================
   Homepage direct connect
   ================================================================== */
.connect-panel {
    display: grid; gap: 16px;
    padding: 24px 26px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background:
        radial-gradient(90% 140% at 0% 0%, rgba(44,116,255,.16), transparent 62%),
        linear-gradient(140deg, rgba(255,255,255,.05), rgba(255,255,255,.012)),
        var(--panel);
    backdrop-filter: blur(18px);
    box-shadow: var(--sh-1), var(--sh-2);
}
.connect-head { display: grid; gap: 6px; }
.connect-label { display: inline-flex; align-items: center; gap: 8px; font-family: var(--head); font-size: .69rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.connect-title { font-family: var(--head); font-size: clamp(1.25rem, 2.4vw, 1.6rem); margin: 0; letter-spacing: -.02em; }
.connect-panel .connect-address { gap: 12px; }
.connect-panel .connect-address code { flex: 1 1 260px; font-size: 1.02rem; text-align: center; }
.connect-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--line); }
.connect-facts { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; flex-wrap: wrap; }
.connect-facts li { display: grid; gap: 1px; }
.connect-facts strong { font-family: var(--head); font-size: 1.02rem; }
.connect-facts span { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.connect-hint { margin: 0; font-size: .8rem; color: var(--muted); }
.connect-hint kbd {
    font-family: var(--head); font-size: .72rem; padding: 1px 6px;
    border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; background: rgba(255,255,255,.05);
}
@media (max-width: 640px) {
    .connect-foot { flex-direction: column; align-items: stretch; }
    .connect-foot .btn { width: 100%; justify-content: center; }
}

/* ==================================================================
   Dropdown quick links
   ================================================================== */
.drop-links-quick { border-top: 1px solid var(--line); }
.drop-links-quick a { justify-content: flex-start; }
.drop-out-ico { margin-left: auto; color: var(--muted); }
.drop-links-quick.is-preview { border: 1px solid var(--line); border-radius: var(--r); max-width: 300px; background: var(--panel-2); }

/* ==================================================================
   Admin: navigation menu editor
   ================================================================== */
.menu-rows { display: grid; gap: 12px; }
.menu-row {
    display: grid; gap: 12px;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: rgba(255,255,255,.028);
}
.menu-row.is-new { border-style: dashed; opacity: .82; }
.menu-row.is-new:focus-within { opacity: 1; border-style: solid; }
.menu-row-no { font-family: var(--head); color: var(--muted); font-size: .85rem; padding-top: 26px; }
.menu-row-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 132px 92px; }
.menu-row-toggles { grid-column: 2; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.menu-row-icon { margin-left: auto; color: var(--muted); display: inline-flex; }
.tick { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--text-2); cursor: pointer; }
.tick input { accent-color: var(--blue-2); width: 15px; height: 15px; }
.menu-preview { padding: 4px 0; }
@media (max-width: 900px) {
    .menu-row { grid-template-columns: 1fr; }
    .menu-row-no { display: none; }
    .menu-row-grid { grid-template-columns: 1fr; }
    .menu-row-toggles { grid-column: 1; }
}

/* ==================================================================
   Categorised settings
   ================================================================== */
.settings-groups { display: grid; gap: 16px; }
.setting-group { display: grid; gap: 16px; }
.setting-group-head { display: flex; gap: 14px; align-items: flex-start; }
.setting-group-head h2 { margin: 0; }
.setting-group-head p { margin: 3px 0 0; }
.setting-group-ico {
    width: 38px; height: 38px; flex: none; display: grid; place-items: center;
    border-radius: 12px; border: 1px solid var(--line);
    background: radial-gradient(120% 120% at 30% 0%, rgba(88,160,255,.2), transparent 70%), rgba(255,255,255,.03);
    color: var(--blue-2);
}
.setting-group-ico svg { width: 18px; height: 18px; }
.setting-fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.setting-fields .field-wide { grid-column: 1 / -1; }
.settings-savebar {
    position: sticky; bottom: 12px;
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    padding: 14px 18px; border: 1px solid var(--line-2); border-radius: var(--r);
    background: rgba(16,20,32,.86); backdrop-filter: blur(14px); box-shadow: var(--sh-2);
}
.settings-group-label {
    margin: 12px 0 4px; padding: 0 6px;
    font-family: var(--head); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.settings-groups-nav .settings-group-label:first-child { margin-top: 0; }

/* ==================================================================
   Activity log
   ================================================================== */
.log-stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 16px; }
.log-filter { display: grid; gap: 14px; }
.log-filter-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.log-filter-grid .field-grow { grid-column: span 2; min-width: 0; }
.log-filter-foot { display: flex; gap: 8px; flex-wrap: wrap; }
.log-feed { list-style: none; margin: 0; padding: 0; display: grid; }
.log-day {
    margin: 16px 0 8px; font-family: var(--head); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
    display: flex; align-items: center; gap: 12px;
}
.log-day:first-child { margin-top: 0; }
.log-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.log-item {
    display: grid; grid-template-columns: 52px 14px minmax(0, 1fr);
    gap: 10px; align-items: start;
    padding: 11px 12px; border-radius: var(--r-sm);
    transition: background .2s ease;
}
.log-item:hover { background: rgba(255,255,255,.035); }
.log-time { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.log-dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px rgba(255,255,255,.05); }
.log-item.tone-good .log-dot { background: #3cdca0; box-shadow: 0 0 0 3px rgba(60,220,160,.16); }
.log-item.tone-warn .log-dot { background: #ffc46b; box-shadow: 0 0 0 3px rgba(255,196,107,.16); }
.log-item.tone-danger .log-dot { background: #ff7285; box-shadow: 0 0 0 3px rgba(255,114,133,.16); }
.log-body { display: grid; gap: 4px; min-width: 0; }
.log-line { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.log-actor { font-family: var(--head); font-weight: 650; color: var(--text); text-decoration: none; }
.log-actor:hover { color: var(--blue-2); }
.log-actor.is-system { color: var(--muted); }
.log-tag {
    font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
    padding: 2px 8px; border-radius: 7px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text-2);
}
.log-desc { margin: 0; color: var(--text-2); font-size: .9rem; }
.log-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: .74rem; color: var(--muted); }
.log-only { color: var(--muted); text-decoration: none; border-bottom: 1px dashed var(--line-2); }
.log-only:hover { color: var(--blue-2); }
.log-more summary { cursor: pointer; font-size: .74rem; color: var(--muted); }
.log-more pre {
    margin: 6px 0 0; padding: 10px 12px; overflow: auto;
    border: 1px solid var(--line); border-radius: var(--r-sm); background: rgba(0,0,0,.28);
    font-size: .75rem; color: var(--text-2);
}
.log-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.btn.is-off { opacity: .4; pointer-events: none; }
@media (max-width: 700px) {
    .log-item { grid-template-columns: 44px 12px minmax(0, 1fr); }
    .log-filter-grid .field-grow { grid-column: span 1; }
}

/* ------------------------------------------------------------------ */
/* VIP tiers: admin manager, profile chip and leaderboard tag          */
/* ------------------------------------------------------------------ */
.vip-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.vip-item {
    --vip: #e8b53c;
    display: grid;
    grid-template-columns: 34px 54px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background:
        linear-gradient(120deg, color-mix(in srgb, var(--vip) 12%, transparent), transparent 55%),
        var(--glass);
    backdrop-filter: blur(14px);
}
.vip-item.is-editing { border-color: color-mix(in srgb, var(--vip) 55%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--vip) 35%, transparent); }
.vip-index { font-variant-numeric: tabular-nums; font-weight: 700; color: color-mix(in srgb, var(--vip) 70%, var(--fg)); text-align: center; }
.vip-icon {
    width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--vip) 35%, var(--line));
    background: color-mix(in srgb, var(--vip) 10%, rgba(255, 255, 255, 0.03));
}
.vip-icon img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.vip-icon em { font-style: normal; font-size: 0.66rem; letter-spacing: 0.1em; color: var(--muted); }
.vip-main { display: grid; gap: 4px; min-width: 0; }
.vip-count { display: grid; text-align: right; line-height: 1.15; }
.vip-count strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.vip-count em { font-style: normal; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.subform {
    margin: 4px 0 6px; padding: 14px 16px 6px; border-radius: 16px;
    border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02);
}
.subform legend { padding: 0 8px; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.vip-chip {
    --vip: #e8b53c;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 11px; border-radius: 999px; line-height: 1;
    font-size: 0.8rem; letter-spacing: 0.02em;
    color: color-mix(in srgb, var(--vip) 82%, #fff);
    border: 1px solid color-mix(in srgb, var(--vip) 45%, transparent);
    background: linear-gradient(140deg, color-mix(in srgb, var(--vip) 26%, transparent), rgba(255, 255, 255, 0.04));
    box-shadow: 0 6px 18px -12px color-mix(in srgb, var(--vip) 70%, transparent);
}
.vip-chip img { width: 18px; height: 18px; object-fit: contain; }
.vip-chip strong { font-weight: 650; }

.vip-tag {
    --vip: #e8b53c;
    font-style: normal; font-size: 0.66rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    padding: 3px 8px; border-radius: 999px;
    color: color-mix(in srgb, var(--vip) 80%, #fff);
    border: 1px solid color-mix(in srgb, var(--vip) 40%, transparent);
    background: color-mix(in srgb, var(--vip) 16%, transparent);
}

/* Leaderboard polish */
.podium-handle { font-size: 0.78rem; color: var(--muted); }
.podium-xp { font-size: 0.84rem; color: var(--muted); }
.podium-xp strong { color: var(--fg); font-variant-numeric: tabular-nums; }
.podium-level {
    position: absolute; right: -4px; bottom: -4px;
    min-width: 24px; height: 24px; padding: 0 5px;
    display: grid; place-items: center; border-radius: 999px;
    font-size: 0.72rem; font-weight: 700; font-variant-numeric: tabular-nums;
    background: var(--panel); border: 1px solid var(--line); color: var(--fg);
}
.podium-face { position: relative; }
.board-filters { align-items: center; }

@media (max-width: 720px) {
    .vip-item { grid-template-columns: 26px 44px minmax(0, 1fr); row-gap: 10px; }
    .vip-icon { width: 44px; height: 44px; }
    .vip-count { grid-column: 2 / -1; text-align: left; }
    .vip-item .rank-tools { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------
   Profile identity: name left, Discord handle right, VIP + hours below
   --------------------------------------------------------------- */
.profile-id .name-row{display:flex;align-items:center;gap:.9rem;flex-wrap:wrap}
.profile-id .name-row h1{margin:0}
.profile-id .name-row .handle-box{margin-left:0}
.profile-id .handle-row{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;margin-top:.5rem}
@media (max-width:720px){
  .profile-id .name-row .handle-box{margin-left:0}
}

/* ---------------------------------------------------------------
   Refined profile leadership and automatic FiveM connection
   --------------------------------------------------------------- */
.leadership-crest {
    gap: 14px;
    padding: 13px 15px;
    border-color: rgba(113, 201, 255, .28);
    background:
        linear-gradient(105deg, rgba(31, 44, 67, .92), rgba(12, 20, 35, .94));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 14px 34px -28px rgba(57, 189, 255, .75);
}
.leadership-crest::before {
    background: linear-gradient(90deg, rgba(91, 190, 255, .55), rgba(141, 112, 255, .45));
    width: 3px;
    opacity: 1;
}
.leadership-crest .crest-art {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(98, 177, 255, .08);
    border-color: rgba(131, 205, 255, .22);
}
.leadership-crest .crest-art img { width: 36px; height: 36px; }
.leadership-crest .crest-eyebrow { color: #8edfff; letter-spacing: .12em; }
.leadership-crest .crest-title { margin: 2px 0; font-size: .96rem; letter-spacing: .04em; }
.leadership-crest .crest-copy p { color: var(--text-2); font-size: .79rem; }
.crest-status {
    position: relative;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    padding: 6px 9px;
    border: 1px solid rgba(87, 222, 176, .22);
    border-radius: 8px;
    color: #a9eed6;
    background: rgba(42, 178, 132, .08);
    font-family: var(--head);
    font-size: .66rem;
    font-weight: 650;
    text-transform: uppercase;
}
.crest-status i { width: 6px; height: 6px; border-radius: 50%; background: #53dfa9; box-shadow: 0 0 9px rgba(83,223,169,.75); }

.connection-panel { overflow: hidden; }
.fivem-connection {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    padding: 17px;
    border: 1px solid var(--line-2);
    border-radius: var(--r);
    background: linear-gradient(120deg, rgba(95, 116, 151, .09), rgba(9, 16, 29, .72));
}
.fivem-connection.is-connected { border-color: rgba(64, 218, 158, .28); background: linear-gradient(120deg, rgba(39, 173, 125, .12), rgba(9, 16, 29, .75)); }
.fivem-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; color: var(--muted); background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.is-connected .fivem-mark { color: #6ce5b7; border-color: rgba(83, 223, 169, .24); background: rgba(83, 223, 169, .08); }
.fivem-copy { display: grid; gap: 2px; min-width: 0; }
.fivem-copy .connection-label { color: var(--muted); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.fivem-copy strong { font-family: var(--head); font-size: 1.08rem; }
.fivem-copy > span:last-child { color: var(--text-2); font-size: .8rem; }
.connection-state { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.connection-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.is-connected .connection-state { color: #a9eed6; border-color: rgba(83, 223, 169, .25); background: rgba(83, 223, 169, .07); }
.is-connected .connection-state i { background: #53dfa9; box-shadow: 0 0 9px rgba(83,223,169,.8); }
.connection-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 14px 0 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--line); }
.connection-details div { display: grid; gap: 4px; padding: 13px 15px; background: rgba(10,17,30,.94); }
.connection-details dt { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; }
.connection-details dd { margin: 0; color: var(--text); font-family: var(--mono); font-size: .82rem; overflow-wrap: anywhere; }
.connection-lock { display: flex; align-items: center; gap: 7px; margin: 13px 2px 0; color: var(--muted); font-size: .76rem; }
@media (max-width: 720px) {
    .leadership-crest { flex-direction: row; align-items: center; padding: 13px; }
    .crest-status { display: none; }
    .fivem-connection { grid-template-columns: 45px minmax(0, 1fr); padding: 14px; }
    .fivem-mark { width: 45px; height: 45px; }
    .connection-state { grid-column: 1 / -1; justify-self: start; }
    .connection-details { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   Leaderboard hours
   --------------------------------------------------------------- */
.board-hours{
  display:inline-flex;align-items:center;gap:.4rem;padding:.42rem .7rem;
  border-radius:999px;border:1px solid color-mix(in oklab, #34d399 34%, transparent);
  background:linear-gradient(180deg, color-mix(in oklab, #34d399 16%, transparent), transparent);
  backdrop-filter:blur(9px);color:#a7f3d0;font-size:.78rem;white-space:nowrap;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08)
}
.board-hours strong{font-weight:700;letter-spacing:.01em}
.board-hours em{font-style:normal;opacity:.62;font-size:.7rem;text-transform:uppercase;letter-spacing:.08em}
.board-hours.is-empty{color:var(--muted,#94a3b8);border-color:rgba(255,255,255,.1);background:rgba(255,255,255,.03)}
.board-hours svg{opacity:.85}
.podium-hours{
  display:inline-flex;align-items:center;gap:.35rem;font-size:.76rem;color:#a7f3d0;
  padding:.3rem .6rem;border-radius:999px;border:1px solid color-mix(in oklab,#34d399 30%,transparent);
  background:color-mix(in oklab,#34d399 12%,transparent)
}
@media (max-width:820px){ .board-hours{display:none} }

/* ---------------------------------------------------------------
   Admin logo picker
   --------------------------------------------------------------- */
.logo-pick{display:flex;align-items:center;gap:.85rem}
.logo-pick .logo-preview{
  width:58px;height:58px;flex:0 0 58px;border-radius:14px;display:grid;place-items:center;
  border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);overflow:hidden
}
.logo-pick .logo-preview img{width:46px;height:46px;object-fit:contain}
.logo-pick .logo-preview em{font-style:normal;font-size:.68rem;opacity:.5}
.logo-inputs{display:grid;gap:.45rem;flex:1 1 auto;min-width:0}
.logo-inputs input[type=file]{font-size:.82rem}


/* ---- account menu rank chip ---- */
.drop-badge.is-staff-rank,
.drop-badge.is-member {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}
.drop-badge.is-staff-rank {
    --staff: #6ea8ff;
    color: color-mix(in oklab, var(--staff) 78%, white);
    background: color-mix(in oklab, var(--staff) 16%, transparent);
    border: 1px solid color-mix(in oklab, var(--staff) 42%, transparent);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .04) inset, 0 8px 22px -16px color-mix(in oklab, var(--staff) 70%, transparent);
}
.drop-badge.is-member {
    color: rgba(226, 232, 240, .72);
    background: rgba(148, 163, 184, .12);
    border: 1px solid rgba(148, 163, 184, .22);
}
.drop-badge img { border-radius: 4px; object-fit: contain; }

/* ---- CAD: law enforcement character cards ---- */
.cad-card.is-leo {
    --leo: #3b82f6;
    border-color: color-mix(in oklab, var(--leo) 38%, transparent);
    background:
        linear-gradient(180deg, color-mix(in oklab, var(--leo) 12%, transparent), transparent 62%),
        rgba(255, 255, 255, .035);
    box-shadow: 0 18px 40px -34px color-mix(in oklab, var(--leo) 80%, transparent);
}
.cad-card.is-leo::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--leo), transparent);
}
.cad-card.is-static { cursor: default; }
.cad-type.is-leo {
    color: color-mix(in oklab, var(--leo, #3b82f6) 80%, white);
    background: color-mix(in oklab, var(--leo, #3b82f6) 18%, transparent);
    border-color: color-mix(in oklab, var(--leo, #3b82f6) 45%, transparent);
}
.cad-dept {
    display: block;
    margin-top: 8px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, .62);
}
.cad-meta > div + div { margin-top: 2px; }

/* ---------- glass navbar shell ---------- */
.topbar { padding: 14px 0 0; border-bottom: 0; }
.topbar.is-stuck { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.topbar .shell.topbar-inner {
    position: relative;
    min-height: 66px;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)),
        rgba(9, 14, 26, 0.62);
    box-shadow:
        0 18px 46px -22px rgba(0, 0, 0, 0.9),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease, transform .25s ease;
    overflow: visible;
}
.topbar .shell.topbar-inner::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(120deg, rgba(44, 116, 255, .55), rgba(255, 255, 255, .06) 38%, rgba(120, 70, 255, .45));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask-composite: exclude;
    opacity: .55;
    pointer-events: none;
}
.topbar.is-stuck .shell.topbar-inner {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03)),
        rgba(7, 11, 21, 0.8);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 22px 54px -22px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.topbar .brand-logo { width: 40px; height: 40px; }

@media (max-width: 880px) {
    .topbar { padding: 10px 0 0; }
    .topbar .shell.topbar-inner { min-height: 58px; padding: 8px 12px; border-radius: 18px; flex-wrap: nowrap; gap: 12px; }
    .topbar .nav { top: calc(100% + 10px); left: 0; right: 0; max-height: calc(100dvh - 120px); overflow-y: auto; -webkit-overflow-scrolling: touch; border-radius: 20px; }
    .topbar .brand-text strong { font-size: .95rem; }
    .nav-toggle { flex: 0 0 auto; }
}
@media (max-width: 480px) {
    .topbar .shell.topbar-inner { padding: 8px 10px; }
    .topbar .brand-logo { width: 34px; height: 34px; }
    .topbar .brand-text em { letter-spacing: .26em; font-size: .6rem; }
    .topbar .nav { padding: 12px; }
}

/* ================================================================
   Homepage hero — emblem, live server badge
   ================================================================ */
.hero { position: relative; overflow: hidden; }
.hero-glow {
    position: absolute;
    inset: -30% -10% auto -10%;
    height: 120%;
    pointer-events: none;
    background:
        radial-gradient(52% 46% at 22% 26%, rgba(44, 116, 255, 0.20), transparent 70%),
        radial-gradient(40% 42% at 82% 12%, rgba(140, 110, 255, 0.14), transparent 72%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-lg { padding: 13px 24px; font-size: 0.95rem; }

.hero-stats div.is-live dd { display: flex; align-items: baseline; gap: 8px; color: #a8f0c8; }
.hero-stats dd em { font-style: normal; font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.hero-stats div.is-live .live-dot { align-self: center; }

.hero-art { display: grid; justify-items: center; gap: 18px; }
.hero-art::before { display: none; }
.hero-crest {
    position: relative;
    display: grid;
    place-items: center;
    width: min(100%, 430px);
    aspect-ratio: 1;
}
.hero-crest::after {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(44, 116, 255, 0.34), transparent 68%);
    filter: blur(42px);
}
.hero-crest-ring {
    position: absolute;
    inset: 4%;
    border-radius: 50%;
    border: 1px solid rgba(146, 180, 255, 0.20);
    box-shadow: inset 0 0 60px rgba(60, 120, 255, 0.10);
    animation: crest-spin 26s linear infinite;
}
.hero-crest-ring::before {
    content: "";
    position: absolute;
    top: -3px; left: 50%;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #8fe0ff;
    box-shadow: 0 0 14px rgba(143, 224, 255, 0.9);
    transform: translateX(-50%);
}
.hero-crest-ring.is-slow { inset: 15%; animation-duration: 44s; animation-direction: reverse; border-color: rgba(146, 180, 255, 0.12); }
.hero-crest img {
    position: relative;
    width: 78%;
    max-width: 340px;
    filter: drop-shadow(0 34px 52px rgba(0, 0, 0, 0.7));
    animation: float 9s ease-in-out infinite;
}
@keyframes crest-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .hero-crest img, .hero-crest-ring { animation: none; }
}

.hero-server {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 99px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
}
.hero-server strong { font-family: var(--head); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.hero-server span { color: var(--muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.11em; }
.hero-server-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.hero-server.is-live { border-color: rgba(64, 220, 150, 0.34); background: rgba(46, 200, 132, 0.10); }
.hero-server.is-live .hero-server-dot {
    background: #3ddc9a;
    box-shadow: 0 0 0 4px rgba(61, 220, 154, 0.16);
    animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot { 50% { box-shadow: 0 0 0 8px rgba(61, 220, 154, 0.05); } }

/* Game server status in the staff panel */
.fivem-status { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.fivem-status-main { flex: 1 1 240px; display: grid; gap: 3px; min-width: 0; }
.fivem-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); flex: 0 0 auto; }
.fivem-dot.is-live { background: #3ddc9a; box-shadow: 0 0 0 4px rgba(61, 220, 154, 0.15); }

/* ================================================================
   Staff panel — member roster
   ================================================================ */
.mrost { display: grid; gap: 16px; }
.mrost-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    background: var(--panel);
}
.mrost-search { position: relative; display: flex; align-items: center; gap: 8px; flex: 1 1 300px; margin: 0; }
.mrost-search .search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.mrost-search input[type="search"] { flex: 1; padding-left: 44px; }
.mrost-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.mrost-stats > div {
    display: grid;
    gap: 1px;
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}
.mrost-stats strong { font-family: var(--head); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.mrost-stats span { color: var(--muted); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; }
.mrost-stats .is-warn strong { color: #ffb4bc; }

.mrost-add {
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(88, 160, 255, 0.07), rgba(255, 255, 255, 0.015));
}
.mrost-add > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
}
.mrost-add > summary::-webkit-details-marker { display: none; }
.mrost-add summary strong { display: block; font-size: 0.96rem; }
.mrost-add summary em { display: block; font-style: normal; color: var(--muted); font-size: 0.82rem; }
.mrost-add-ico {
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    flex: 0 0 auto;
    border-radius: 11px;
    color: #bcd6ff;
    border: 1px solid rgba(120, 165, 255, 0.28);
    background: rgba(88, 160, 255, 0.14);
}
.mrost-add[open] > summary { border-bottom: 1px solid var(--line); }
.mrost-add-form { display: grid; gap: 8px; padding: 16px; margin: 0; }
.mrost-add-form label { font-size: 0.82rem; color: var(--muted); }
.mrost-add-row { display: flex; flex-wrap: wrap; gap: 10px; }
.mrost-add-row input { flex: 1 1 240px; }

.mrost-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.mrost-sort { display: inline-flex; align-items: center; gap: 8px; }
.mrost-sort select { padding: 8px 12px; border-radius: 9px; font-size: 0.86rem; }

.mrost-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(292px, 1fr)); }
.rcard {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    background: var(--panel);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.rcard:hover { transform: translateY(-2px); border-color: rgba(120, 160, 255, 0.32); box-shadow: 0 18px 36px rgba(4, 8, 20, 0.42); }
.rcard.is-banned { border-color: rgba(255, 96, 112, 0.32); background: linear-gradient(180deg, rgba(255, 96, 112, 0.09), rgba(255, 255, 255, 0.015)); }
.rcard-main { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: inherit; }
.rcard-avatar { position: relative; flex: 0 0 auto; }
.rcard-avatar img { width: 52px; height: 52px; border-radius: 15px; object-fit: cover; display: block; }
.rcard-avatar em {
    position: absolute;
    right: -5px; bottom: -5px;
    min-width: 22px;
    padding: 1px 5px;
    border-radius: 7px;
    font-style: normal;
    font-family: var(--head);
    font-size: 0.7rem;
    text-align: center;
    color: #041018;
    background: linear-gradient(180deg, #9fe6ff, #5bb4ff);
    box-shadow: 0 4px 10px rgba(4, 8, 20, 0.5);
}
.rcard-ident { display: grid; gap: 2px; min-width: 0; }
.rcard-ident strong { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard-handle { color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rcard-tags:empty { display: none; }
.rcard-meter { display: grid; gap: 6px; margin-top: auto; }
.rcard-meter-top { display: flex; justify-content: space-between; gap: 10px; font-size: 0.82rem; color: var(--muted); }
.rcard-meter-top strong { color: var(--text); font-variant-numeric: tabular-nums; }
.rcard-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.rcard-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #5b8def, #8fe0ff); }
.rcard-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.rcard-foot form { margin: 0; }
.rcard-uid {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}
.rcard-uid::before { content: 'ID '; opacity: 0.7; }

@media (max-width: 720px) {
    .mrost-bar { padding: 12px; }
    .mrost-stats { width: 100%; }
    .mrost-stats > div { flex: 1 1 auto; }
    .mrost-grid { grid-template-columns: 1fr; }
    .rcard-foot .btn { flex: 1 1 auto; }
    .rcard-uid { width: 100%; margin-left: 0; }
    .hero-crest { width: min(100%, 300px); }
    .hero-actions .btn { flex: 1 1 auto; text-align: center; }
}


/* ==========================================================================
   BRANDING — header without a logo, branding panel in Site settings
   ========================================================================== */
.brand-no-logo .brand-text strong { font-size: 1.12rem; }
.brand-settings .settings-savebar { position: static; box-shadow: none; }
.brand-preview {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 14px 18px; border: 1px dashed var(--line-2); border-radius: var(--r);
    background: rgba(0, 0, 0, 0.25);
}
.brand-preview-label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.brand-preview-mark { margin: 0; pointer-events: none; }
.logo-pick .logo-preview.logo-preview-lg { width: 76px; height: 76px; flex-basis: 76px; }
.logo-pick .logo-preview.logo-preview-lg img { width: 64px; height: 64px; }
.logo-pick .logo-preview img[width="32"] { width: 32px; height: 32px; }
.brand-checks { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.colour-pick { display: flex; align-items: center; gap: 10px; }
.colour-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.colour-pick input[type="color"] {
    width: 56px !important; height: 40px !important; min-height: 0 !important; padding: 3px !important; flex: none; cursor: pointer;
    border: 1px solid var(--line-2) !important; border-radius: 10px !important; background: rgba(255, 255, 255, 0.04) !important;
}
.colour-pick span { display: grid; gap: 2px; line-height: 1.2; }
.colour-pick strong { font-size: 0.86rem; }
.colour-pick code { font-size: 0.82rem; }


/* ==========================================================================
   HOMEPAGE — editorial layout
   Flat surfaces, hairline rules, condensed display type and monospace data.
   Scoped to body.page-home so no other page is affected.
   ========================================================================== */
body.page-home {
    /* Homepage tokens now point at the site-wide design system
       (midnight navy, aurora, glass panels, Poppins) so the
       homepage matches every other page. */
    --h-bg: var(--bg);
    --h-surface: var(--panel);
    --h-surface-2: var(--panel-2);
    --h-rule: var(--line);
    --h-rule-2: var(--line-2);
    --h-ink: var(--text);
    --h-ink-2: var(--text-2);
    --h-ink-3: var(--muted);
    --h-display: var(--head);
    --h-mono: var(--head);
    background: var(--bg);
    color: var(--text);
}

/* shared bits ------------------------------------------------------------ */
.h-label {
    display: inline-block;
    font-family: var(--h-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--h-ink-3);
    margin-bottom: 14px;
}
.h-h2 {
    font-family: var(--h-display);
    font-stretch: 78%;
    font-weight: 800;
    font-size: clamp(2rem, 4.4vw, 3.3rem);
    line-height: 0.98;
    letter-spacing: -0.015em;
    margin: 0;
    color: var(--h-ink);
}
.h-section { padding: 96px 0; border-top: 1px solid var(--h-rule); }
.h-more {
    font-family: var(--h-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--h-ink);
    border-bottom: 1px solid var(--h-rule-2);
    padding-bottom: 2px;
    transition: border-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}
.h-more:hover { color: var(--blue-2); border-color: var(--blue-2); }

.h-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 15px 24px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-family: var(--h-display);
    font-stretch: 90%;
    font-weight: 700;
    font-size: 0.98rem;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.h-btn svg { transition: transform 0.2s ease; }
.h-btn:hover svg { transform: translateX(3px); }
.h-btn-solid { background: var(--blue); color: #fff; }
.h-btn-solid:hover { background: color-mix(in srgb, var(--blue) 82%, #fff); }
.h-btn-line { border-color: var(--h-rule-2); color: var(--h-ink); background: transparent; }
.h-btn-line:hover { border-color: var(--h-ink); }
.h-btn-ink { background: var(--h-bg); color: var(--h-ink); }
.h-btn-ink:hover { background: #000; }
.h-btn-sm { padding: 10px 16px; font-size: 0.88rem; }
.h-btn-block { width: 100%; }

.h-tag {
    font-family: var(--h-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--h-ink-3);
    padding: 5px 9px;
    border: 1px solid var(--h-rule);
    border-radius: 3px;
}
.h-tag.is-open { color: #9be7bf; border-color: rgba(120, 220, 165, 0.35); }

/* hero ------------------------------------------------------------------- */
.h-hero {
    position: relative;
    padding: 18px 0 96px;
    overflow: hidden;
}
.h-hero::before {
    /* fine film grain so the flat dark isn't dead */
    content: "";
    position: absolute; inset: 0;
    pointer-events: none;
    opacity: 0.08;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.h-hero .shell { position: relative; }

.h-status {
    list-style: none;
    margin: 0 0 72px;
    padding: 14px 0;
    display: flex; flex-wrap: wrap; gap: 8px 34px;
    border-top: 1px solid var(--h-rule);
    border-bottom: 1px solid var(--h-rule);
    font-family: var(--h-mono);
    font-size: 0.78rem;
    color: var(--h-ink-3);
}
.h-status li { display: inline-flex; align-items: baseline; gap: 6px; }
.h-status strong { color: var(--h-ink); font-weight: 600; }
.h-status-live { color: var(--h-ink-2); }
.h-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--h-ink-3);
    align-self: center;
}
.h-status-live.is-on .h-dot { background: #46d68c; box-shadow: 0 0 0 0 rgba(70, 214, 140, 0.6); animation: h-ping 2.2s ease-out infinite; }
@keyframes h-ping {
    0%   { box-shadow: 0 0 0 0 rgba(70, 214, 140, 0.55); }
    80%  { box-shadow: 0 0 0 9px rgba(70, 214, 140, 0); }
    100% { box-shadow: 0 0 0 0 rgba(70, 214, 140, 0); }
}

.h-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 72px;
    align-items: end;
}
.h-kicker {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 26px;
    font-family: var(--h-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--h-ink-2);
}
.h-kicker-logo { width: 44px; height: 44px; object-fit: contain; }
.h-kicker span { padding-left: 14px; border-left: 2px solid var(--blue); line-height: 1.3; }
.h-kicker-logo + span { }
.h-title {
    font-family: var(--h-display);
    font-stretch: 72%;
    font-weight: 900;
    font-size: clamp(3.2rem, 9vw, 7.4rem);
    line-height: 0.88;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin: 0 0 30px;
    color: var(--h-ink);
    max-width: 12ch;
    text-wrap: balance;
}
.h-lede {
    max-width: 50ch;
    font-size: 1.12rem;
    line-height: 1.6;
    color: var(--h-ink-2);
    margin: 0 0 36px;
}
.h-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* connection "ticket" */
.h-ticket {
    position: relative;
    padding: 24px 24px 22px;
    background: var(--h-surface);
    border: 1px solid var(--h-rule);
    border-top: 3px solid var(--blue);
    border-radius: 6px;
}
.h-ticket .h-label { margin-bottom: 8px; }
.h-ticket-top { display: flex; align-items: center; justify-content: space-between; }
.h-ticket-top .h-label { margin: 0; }
.h-ticket-state {
    font-family: var(--h-mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--h-ink-2);
}
.h-ticket-state.is-on { color: #7ee2ad; }
.h-ticket-count { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 4px; }
.h-ticket-count strong {
    font-family: var(--h-display); font-stretch: 72%; font-weight: 900;
    font-size: 4.2rem; line-height: 0.9; color: var(--h-ink);
    font-variant-numeric: tabular-nums;
}
.h-ticket-count span { font-family: var(--h-mono); font-size: 0.8rem; color: var(--h-ink-3); }
.h-ticket-perf {
    position: relative;
    height: 1px;
    margin: 22px -24px;
    background-image: linear-gradient(90deg, var(--h-rule-2) 50%, transparent 50%);
    background-size: 10px 1px;
}
.h-ticket-perf::before, .h-ticket-perf::after {
    content: ""; position: absolute; top: -9px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--h-bg);
    border: 1px solid var(--h-rule);
}
.h-ticket-perf::before { left: -10px; clip-path: inset(0 0 0 50%); }
.h-ticket-perf::after  { right: -10px; clip-path: inset(0 50% 0 0); }
.h-address {
    display: flex; align-items: stretch;
    border: 1px solid var(--h-rule-2);
    border-radius: 4px;
    overflow: hidden;
}
.h-address code {
    flex: 1; min-width: 0;
    padding: 12px 14px;
    background: transparent;
    border-radius: 0;
    font-family: var(--h-mono); font-size: 0.86rem;
    color: var(--h-ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.h-copy {
    flex: none;
    padding: 0 16px;
    border: 0; border-left: 1px solid var(--h-rule-2);
    background: var(--h-surface-2);
    color: var(--h-ink);
    font-family: var(--h-mono); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}
.h-copy:hover { background: var(--h-ink); color: var(--h-bg); }
.h-copy.is-copied { color: #7ee2ad; }
.h-hint { margin: 12px 0 0; font-size: 0.8rem; color: var(--h-ink-3); }
.h-hint code { background: none; padding: 0; color: var(--h-ink-2); font-family: var(--h-mono); font-size: 0.78rem; }
.h-hint kbd {
    font-family: var(--h-mono); font-size: 0.72rem;
    padding: 1px 6px; border: 1px solid var(--h-rule-2); border-bottom-width: 2px; border-radius: 3px;
    color: var(--h-ink);
}
.h-facts {
    display: grid; grid-template-columns: 1fr 1fr;
    margin: 20px 0;
    border-top: 1px solid var(--h-rule);
}
.h-facts div { padding: 12px 0 0; }
.h-facts div + div { padding-left: 16px; border-left: 1px solid var(--h-rule); }
.h-facts dt { font-family: var(--h-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--h-ink-3); }
.h-facts dd { margin: 2px 0 0; font-family: var(--h-display); font-stretch: 85%; font-weight: 700; font-size: 1.1rem; color: var(--h-ink); }

/* steps ------------------------------------------------------------------ */
.h-steps { padding: 0; }
.h-steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.h-step { padding: 44px 36px 52px 0; }
.h-step + .h-step { padding-left: 36px; border-left: 1px solid var(--h-rule); }
.h-step-no {
    display: block;
    font-family: var(--h-mono);
    font-size: 0.8rem;
    color: var(--blue-2);
    margin-bottom: 40px;
}
.h-step h2 {
    font-family: var(--h-display); font-stretch: 82%; font-weight: 800;
    font-size: 1.7rem; line-height: 1.02; letter-spacing: -0.01em;
    margin: 0 0 14px; color: var(--h-ink);
}
.h-step p { margin: 0; color: var(--h-ink-2); font-size: 0.97rem; line-height: 1.65; max-width: 38ch; }

/* section head ----------------------------------------------------------- */
.h-head {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    margin-bottom: 44px;
}

/* departments ------------------------------------------------------------ */
.h-depts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--h-rule); }
.h-dept {
    position: relative;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    padding: 26px 0;
    border-bottom: 1px solid var(--h-rule);
    transition: background 0.2s ease;
}
.h-dept::before {
    content: ""; position: absolute; left: 0; top: -1px; bottom: -1px; width: 0;
    background: var(--blue);
    transition: width 0.25s ease;
}
.h-dept:hover::before { width: 3px; }
.h-dept:hover { background: linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent 70%); }
.h-dept-link { position: absolute; inset: 0; z-index: 1; }
.h-dept .h-dept-mark {
    width: 72px; height: 72px; border-radius: 8px;
    background: var(--h-surface);
    border: 1px solid var(--h-rule);
    box-shadow: none;
}
.h-dept .h-dept-mark img { object-fit: contain; padding: 8px; }
.h-dept .h-dept-mark .mark-text { font-family: var(--h-display); font-stretch: 80%; font-size: 1.3rem; font-weight: 800; color: var(--h-ink-2); }
.h-dept-short {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--h-mono); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--h-ink-3);
}
.h-dept-short em {
    font-style: normal; color: var(--blue-2);
    padding-left: 10px; border-left: 1px solid var(--h-rule-2);
}
.h-dept h3 {
    font-family: var(--h-display); font-stretch: 85%; font-weight: 800;
    font-size: clamp(1.35rem, 2.4vw, 1.85rem); line-height: 1.05; letter-spacing: -0.01em;
    margin: 6px 0 8px; color: var(--h-ink);
}
.h-dept p { margin: 0; color: var(--h-ink-2); font-size: 0.95rem; line-height: 1.55; max-width: 70ch; }
.h-dept-cta { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; }

/* changelog -------------------------------------------------------------- */
.h-split {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
    gap: 64px;
    align-items: start;
}
.h-split-head { position: sticky; top: 110px; }
.h-split-head p { margin: 18px 0 0; color: var(--h-ink-2); max-width: 34ch; }
.h-empty { color: var(--h-ink-3); }
.h-log { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--h-rule); }
.h-log-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 28px;
    padding: 28px 0;
    border-bottom: 1px solid var(--h-rule);
}
.h-log-date {
    font-family: var(--h-display); font-stretch: 75%; font-weight: 800;
    font-size: 1.6rem; line-height: 1; text-transform: uppercase;
    color: var(--h-ink);
}
.h-log-date span { display: block; margin-top: 6px; font-family: var(--h-mono); font-size: 0.72rem; font-weight: 400; color: var(--h-ink-3); letter-spacing: 0.08em; }
.h-log-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-family: var(--h-mono); font-size: 0.74rem; color: var(--h-ink-3); }
.h-log-meta .tag { border-radius: 3px; }
.h-log-body h3 {
    font-family: var(--h-display); font-stretch: 88%; font-weight: 750;
    font-size: 1.35rem; line-height: 1.15; margin: 0 0 8px; color: var(--h-ink);
}
.h-log-text { color: var(--h-ink-2); font-size: 0.96rem; line-height: 1.65; }
.h-log-text p { margin: 0 0 0.6em; }

/* discord band ----------------------------------------------------------- */
.h-band { background: var(--blue); color: #fff; }
.h-band-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 48px;
    align-items: end;
    padding: 84px 24px;
}
.h-band .h-label { color: rgba(255, 255, 255, 0.72); }
.h-band-title {
    font-family: var(--h-display); font-stretch: 72%; font-weight: 900;
    font-size: clamp(2.6rem, 6.4vw, 5.2rem); line-height: 0.9; letter-spacing: -0.015em;
    text-transform: uppercase; margin: 0 0 20px; color: #fff; max-width: 14ch;
}
.h-band p { margin: 0; max-width: 48ch; font-size: 1.05rem; color: rgba(255, 255, 255, 0.86); }
.h-band-side { display: grid; gap: 26px; justify-items: start; }
.h-band-stats { display: flex; gap: 40px; margin: 0; }
.h-band-stats dt { font-family: var(--h-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); }
.h-band-stats dd { margin: 2px 0 0; font-family: var(--h-display); font-stretch: 75%; font-weight: 900; font-size: 2.8rem; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.h-band .h-btn-ink { padding: 17px 28px; }

/* faq -------------------------------------------------------------------- */
.h-faq { border-top: 1px solid var(--h-rule); }
.h-faq-item { border-bottom: 1px solid var(--h-rule); }
.h-faq-item summary {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 24px 0;
    list-style: none;
    cursor: pointer;
    font-family: var(--h-display); font-stretch: 88%; font-weight: 750;
    font-size: 1.25rem; color: var(--h-ink);
}
.h-faq-item summary::-webkit-details-marker { display: none; }
.h-faq-item summary::after {
    content: "+";
    flex: none;
    font-family: var(--h-mono); font-weight: 400; font-size: 1.3rem; color: var(--h-ink-3);
    transition: transform 0.2s ease;
}
.h-faq-item[open] summary::after { transform: rotate(45deg); color: var(--blue-2); }
.h-faq-item summary:hover { color: var(--blue-2); }
.h-faq-item p { margin: 0 0 26px; max-width: 64ch; color: var(--h-ink-2); line-height: 1.7; }

/* responsive ------------------------------------------------------------- */
@media (max-width: 980px) {
    .h-hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .h-ticket { max-width: 460px; }
    .h-split { grid-template-columns: 1fr; gap: 36px; }
    .h-split-head { position: static; }
    .h-band-inner { grid-template-columns: 1fr; gap: 32px; padding: 64px 24px; }
}
@media (max-width: 760px) {
    .h-section { padding: 68px 0; }
    .h-hero { padding-bottom: 68px; }
    .h-status { margin-bottom: 44px; gap: 6px 20px; }
    .h-steps-grid { grid-template-columns: 1fr; }
    .h-step, .h-step + .h-step { padding: 32px 0; border-left: 0; }
    .h-step + .h-step { border-top: 1px solid var(--h-rule); }
    .h-step-no { margin-bottom: 18px; }
    .h-dept { grid-template-columns: 56px minmax(0, 1fr); gap: 18px; }
    .h-dept .h-dept-mark { width: 56px; height: 56px; }
    .h-dept-cta { grid-column: 2; }
    .h-log-row { grid-template-columns: 1fr; gap: 10px; }
    .h-log-date { font-size: 1.2rem; }
    .h-log-date span { display: inline; margin-left: 6px; }
    .h-actions .h-btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
    .h-status-live.is-on .h-dot { animation: none; }
}
body.is-still .h-status-live.is-on .h-dot { animation: none; }
.brand-text em { letter-spacing: 0.16em; }
.h-band-invite { font-family: var(--h-mono); font-size: 0.78rem; color: rgba(255, 255, 255, 0.72); }


/* ==========================================================================
   HOMEPAGE — harmonised with the rest of the site
   Glass panels, rounded corners, site buttons and type on the homepage.
   ========================================================================== */
body.page-home [class^="h-"], body.page-home [class*=" h-"] { font-stretch: normal; }
body.page-home .h-section { border-top-color: var(--line); padding: 72px 0; }
body.page-home .h-hero::before { opacity: 0.025; }

body.page-home .h-label {
    font-family: var(--head); font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.2em; color: var(--blue-2);
}
body.page-home .h-title { font-family: var(--head); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; text-transform: none; }
body.page-home .h-h2 { font-family: var(--head); font-weight: 700; font-size: clamp(1.55rem, 2.9vw, 2.1rem); line-height: 1.12; letter-spacing: -0.025em; text-transform: none; }
body.page-home .h-step h2,
body.page-home .h-dept h3,
body.page-home .h-log-body h3,
body.page-home .h-faq-item summary { font-family: var(--head); font-weight: 650; letter-spacing: -0.015em; text-transform: none; }
body.page-home .h-ticket-count strong,
body.page-home .h-log-date,
body.page-home .h-band-stats dd,
body.page-home .h-facts dd { font-family: var(--head); font-weight: 700; letter-spacing: -0.02em; }
body.page-home .h-band-title { font-family: var(--head); font-weight: 700; text-transform: none; letter-spacing: -0.025em; line-height: 1.1; }
body.page-home .h-address code,
body.page-home .h-hint code,
body.page-home .h-hint kbd { font-family: var(--mono); }
body.page-home .h-address code { color: var(--cyan); }

/* buttons → same look as .btn-primary / .btn-ghost */
body.page-home .h-btn { border-radius: 11px; font-family: var(--head); font-weight: 650; letter-spacing: 0.012em; text-transform: none; }
body.page-home .h-btn:hover { transform: translateY(-1px); }
body.page-home .h-btn-solid {
    background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 88%, #fff), color-mix(in srgb, var(--blue) 86%, #000));
    border-color: color-mix(in srgb, var(--blue) 50%, rgba(255, 255, 255, 0.4));
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 14px 32px -18px color-mix(in srgb, var(--blue) 85%, transparent);
}
body.page-home .h-btn-solid:hover {
    background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 80%, #fff), color-mix(in srgb, var(--blue) 92%, #000));
}
body.page-home .h-btn-line {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
body.page-home .h-btn-line:hover { background: linear-gradient(180deg, rgba(120, 180, 255, 0.18), rgba(88, 160, 255, 0.07)); border-color: var(--line-hot); }
body.page-home .h-btn-ink { background: var(--panel-solid); color: var(--text); border-color: rgba(255, 255, 255, 0.14); }
body.page-home .h-btn-ink:hover { background: var(--bg-deep); }

body.page-home .h-tag, body.page-home .h-log-meta .tag { border-radius: 999px; }
body.page-home .h-copy { border-radius: 8px; }
body.page-home .h-address { border-radius: var(--r-sm); background: rgba(0, 0, 0, 0.25); }

/* glass surfaces */
body.page-home .h-ticket,
body.page-home .h-step,
body.page-home .h-dept,
body.page-home .h-log-row,
body.page-home .h-faq-item {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012) 42%, rgba(255, 255, 255, 0) 100%),
        var(--panel);
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-1), 0 30px 80px -46px rgba(0, 0, 0, 0.96);
}
body.page-home .h-ticket-perf::before, body.page-home .h-ticket-perf::after { background: var(--bg); }

body.page-home .h-steps { padding: 40px 0 0; }
body.page-home .h-steps-grid { gap: 18px; }
body.page-home .h-step, body.page-home .h-step + .h-step { padding: 30px 28px; border-left: 1px solid var(--line); }

body.page-home .h-depts, body.page-home .h-log, body.page-home .h-faq { border-top: 0; display: grid; gap: 14px; }
body.page-home .h-dept { padding-left: 24px; padding-right: 24px; overflow: hidden; transition: border-color 0.2s ease, box-shadow 0.24s ease; }
body.page-home .h-dept:hover { border-color: var(--line-hot); background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015) 42%, rgba(255, 255, 255, 0) 100%), var(--panel); }
body.page-home .h-dept .h-dept-mark { border-radius: var(--r); background: var(--panel-solid); border-color: var(--line); }
body.page-home .h-log-row { padding-left: 24px; padding-right: 24px; }
body.page-home .h-faq-item { padding: 0 22px; }

/* Discord band → glass panel with blue glow like the site's discord panel */
body.page-home .h-band { background: transparent; padding: 24px 0 8px; }
body.page-home .h-band-inner {
    border-radius: var(--r-lg);
    border: 1px solid color-mix(in srgb, var(--discord) 45%, transparent);
    background:
        radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--discord) 32%, transparent), transparent 60%),
        var(--panel);
    box-shadow: var(--sh-1), var(--sh-glow);
    padding-left: clamp(24px, 4vw, 48px); padding-right: clamp(24px, 4vw, 48px);
}

/* ---------- Department categories + filter ---------- */
.dept-filter {
    position: sticky; top: 84px; z-index: 5;
    display: flex; gap: 8px; flex-wrap: wrap;
    padding: 8px; margin-bottom: 34px;
    border: 1px solid var(--line); border-radius: 999px;
    background: rgba(8, 13, 25, .78); backdrop-filter: blur(18px);
    box-shadow: var(--sh-1);
    width: fit-content; max-width: 100%;
}
.dept-chip {
    --cat: var(--blue);
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 999px;
    border: 1px solid transparent; background: transparent;
    color: var(--muted); font: 600 .86rem/1 var(--body); cursor: pointer;
    transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.dept-chip:hover { color: var(--text); background: rgba(255,255,255,.05); }
.dept-chip:focus-visible { outline: 2px solid var(--cat); outline-offset: 2px; }
.dept-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cat); box-shadow: 0 0 10px var(--cat); }
.dept-chip-count {
    font-size: .7rem; padding: 3px 7px; border-radius: 999px;
    background: rgba(255,255,255,.07); color: var(--text-2, var(--muted));
}
.dept-chip.is-active {
    color: var(--text);
    background: color-mix(in srgb, var(--cat) 22%, transparent);
    border-color: color-mix(in srgb, var(--cat) 55%, transparent);
    box-shadow: 0 8px 26px -14px var(--cat);
}
.dept-chip.is-active .dept-chip-count { background: color-mix(in srgb, var(--cat) 40%, transparent); color: var(--text); }

.dept-group { --cat: var(--blue); margin-bottom: 46px; }
.dept-group:last-child { margin-bottom: 0; }
.dept-group[hidden] { display: none; }
.dept-group.is-shown { animation: rise .45s cubic-bezier(.22,.61,.36,1) both; }
.dept-group-head {
    display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
    margin-bottom: 18px; padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.dept-group-bar {
    width: 5px; height: 40px; border-radius: 4px;
    background: linear-gradient(180deg, var(--cat), color-mix(in srgb, var(--cat) 20%, transparent));
    box-shadow: 0 0 18px color-mix(in srgb, var(--cat) 60%, transparent);
}
.dept-group-title { font-family: var(--head); font-size: 1.4rem; font-weight: 700; margin: 0; letter-spacing: -.015em; }
.dept-group-desc { margin: 3px 0 0; color: var(--muted); font-size: .9rem; }
.dept-group-count {
    font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
    padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line);
}
.dept-group .dept-line:hover { border-color: color-mix(in srgb, var(--cat) 60%, transparent); box-shadow: var(--sh-1), 0 24px 52px -30px var(--cat); }
.dept-group .dept-line { border-left: 3px solid color-mix(in srgb, var(--cat) 70%, transparent); }
@media (max-width: 640px) {
    .dept-filter { border-radius: var(--r-lg); position: static; }
    .dept-group-head { grid-template-columns: auto 1fr; }
    .dept-group-count { display: none; }
}

/* admin */
.cat-badge {
    --cat: var(--blue);
    display: inline-block; margin-left: 8px; vertical-align: middle;
    font-size: .66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    padding: 2px 8px; border-radius: 999px;
    color: var(--text); background: color-mix(in srgb, var(--cat) 22%, transparent);
    border: 1px solid color-mix(in srgb, var(--cat) 50%, transparent);
}
.cat-admin-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.cat-admin-item {
    --cat: var(--blue);
    display: flex; align-items: center; gap: 14px;
    padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r);
    background: rgba(255,255,255,.025);
}
.cat-admin-item.is-editing { border-color: var(--cat); }
.cat-admin-item .status-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cat-swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--cat); box-shadow: 0 0 12px var(--cat); flex: none; }
.cat-form { border-top: 1px solid var(--line); padding-top: 18px; }
.cat-form input[type=color] { height: 42px; padding: 4px; cursor: pointer; }

/* applications grouped by category */
.app-group .app-card { border-top: 3px solid color-mix(in srgb, var(--cat) 70%, transparent); }
.app-group .app-card:hover { border-color: color-mix(in srgb, var(--cat) 60%, transparent); box-shadow: var(--sh-1), 0 24px 52px -30px var(--cat); }
.app-group .app-card .eyebrow { color: color-mix(in srgb, var(--cat) 75%, var(--text)); }


/* ==========================================================================
   NX — refreshed homepage, departments & applications
   Built only on the existing tokens (navy glass, aurora blue, Poppins).
   ========================================================================== */

/* hero shell shared by departments + applications */
.nx-hero { position: relative; padding: 70px 0 56px; overflow: hidden; border-bottom: 1px solid var(--line); }
.nx-hero-glow {
    position: absolute; inset: -30% -10% auto; height: 620px; pointer-events: none; z-index: 0;
    background:
        radial-gradient(40% 55% at 18% 30%, rgba(44, 116, 255, 0.28), transparent 70%),
        radial-gradient(32% 45% at 78% 20%, rgba(79, 227, 255, 0.16), transparent 70%),
        radial-gradient(30% 40% at 55% 70%, rgba(125, 107, 255, 0.14), transparent 70%);
    filter: blur(10px);
    animation: nx-drift 16s ease-in-out infinite alternate;
}
@keyframes nx-drift { from { transform: translate3d(-2%, 0, 0) scale(1); } to { transform: translate3d(3%, 4%, 0) scale(1.06); } }
.h-hero .nx-hero-glow { inset: -10% -10% auto; height: 900px; }
.nx-hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 56px; align-items: end; }
.nx-title { font-size: clamp(2.4rem, 5.4vw, 4.1rem); line-height: 1.02; letter-spacing: -0.035em; margin: 6px 0 18px; max-width: 14ch; }
.nx-grad { background: var(--grad-hot); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nx-hero-copy .lede { margin-bottom: 28px; }

.nx-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; backdrop-filter: blur(14px); box-shadow: var(--sh-2); }
.nx-stats div { background: var(--panel-solid); padding: 20px 22px; position: relative; }
.nx-stats dt { font-family: var(--head); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.nx-stats dd { margin: 6px 0 0; font-family: var(--head); font-weight: 800; font-size: 2.3rem; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.nx-stats dd small { font-size: 1.1rem; color: var(--muted); margin-left: 2px; }
.nx-stats .is-live dd { background: linear-gradient(120deg, #9df0cd, var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nx-stats .is-live::after { content: ""; position: absolute; top: 20px; right: 20px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: h-ping 2.2s ease-out infinite; }

/* toolbar */
.nx-list { padding-top: 44px; }
.nx-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.nx-search { flex: 1 1 320px; max-width: 460px; display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 46px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); color: var(--muted); transition: border-color .2s ease, box-shadow .2s ease; }
.nx-search:focus-within { border-color: var(--line-hot); box-shadow: 0 0 0 4px rgba(44, 116, 255, 0.15); color: var(--blue-2); }
.nx-search input { flex: 1; min-width: 0; height: 100%; border: 0 !important; outline: 0; background: transparent !important; color: var(--text); font: inherit; font-size: 0.95rem; padding: 0 !important; box-shadow: none !important; }
.nx-search input::placeholder { color: var(--muted); }
.nx-seg { display: inline-flex; padding: 4px; gap: 2px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); }
.nx-seg button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-family: var(--head); font-weight: 600; font-size: 0.86rem; cursor: pointer; transition: background .2s ease, color .2s ease; }
.nx-seg button:hover { color: var(--text); }
.nx-seg button.is-active { background: rgba(88, 160, 255, 0.16); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-hot); }
.nx-chips { margin-bottom: 30px; }
[data-nx-item][hidden] { display: none !important; }

.nx-empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 56px 20px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.nx-empty[hidden] { display: none; }

/* shared small bits */
.nx-cover { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.nx-dept-cat { font-family: var(--head); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: color-mix(in srgb, var(--cat, var(--blue)) 70%, var(--text)); }
.nx-flag { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(5, 8, 16, 0.55); backdrop-filter: blur(8px); font-family: var(--head); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.nx-flag-open { color: #9df0cd; border-color: rgba(55, 214, 155, 0.4); }
.nx-flag-feat { color: #ffd894; border-color: rgba(246, 181, 69, 0.45); }
.nx-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.nx-meta li { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); font-size: 0.8rem; color: var(--muted); }
.nx-meta strong { color: var(--text); font-weight: 700; }
.nx-meta .is-xp { color: #b6f2ff; border-color: rgba(79, 227, 255, 0.3); background: rgba(79, 227, 255, 0.07); }
.nx-meta .is-xp strong { color: var(--cyan); }

/* department cards */
.nx-dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 22px; }
.nx-dept {
    --cat: var(--blue);
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--sh-1), var(--sh-2); backdrop-filter: blur(14px);
    transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .3s ease, box-shadow .35s ease;
}
.nx-dept:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--cat) 60%, transparent); box-shadow: var(--sh-1), 0 30px 70px -34px var(--cat); }
.nx-dept.is-featured { border-color: color-mix(in srgb, var(--amber) 40%, var(--line)); }
.nx-dept-banner {
    position: relative; height: 132px; display: flex; align-items: flex-end; padding: 0 22px;
    background:
        radial-gradient(80% 120% at 85% 0%, color-mix(in srgb, var(--cat) 55%, transparent), transparent 70%),
        linear-gradient(160deg, color-mix(in srgb, var(--cat) 22%, var(--panel-solid)), var(--panel-solid));
    border-bottom: 1px solid var(--line);
}
.nx-dept-banner::before { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; opacity: .35; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 85%); }
.nx-dept-code { position: absolute; right: 18px; bottom: 10px; max-width: 60%; overflow: hidden; white-space: nowrap; font-family: var(--head); font-weight: 800; font-size: 3.4rem; line-height: 1; letter-spacing: -0.05em; color: rgba(255, 255, 255, 0.06); pointer-events: none; transition: transform .5s ease; }
.nx-dept:hover .nx-dept-code { transform: translateX(-10px); }
.nx-dept-logo { position: relative; z-index: 1; transform: translateY(36px); width: 78px; height: 78px; border-radius: 20px; display: grid; place-items: center; overflow: hidden; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .9), 0 0 0 4px var(--bg); }
.nx-dept-logo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.nx-dept-logo span { font-family: var(--head); font-weight: 800; font-size: 1.3rem; color: color-mix(in srgb, var(--cat) 65%, var(--text)); }
.nx-dept-flags { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; justify-content: flex-end; gap: 6px; z-index: 1; }
.nx-dept-body { flex: 1; display: grid; align-content: start; gap: 10px; padding: 50px 22px 18px; }
.nx-dept-name { font-size: 1.35rem; margin: 0; letter-spacing: -0.02em; }
.nx-dept-desc { margin: 0; color: var(--text-2); font-size: 0.93rem; line-height: 1.6; }
.nx-roles { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; position: relative; z-index: 2; }
.nx-roles a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); font-size: 0.88rem; font-weight: 600; transition: border-color .2s ease, background .2s ease; }
.nx-roles a:hover { border-color: color-mix(in srgb, var(--cat) 55%, transparent); background: color-mix(in srgb, var(--cat) 10%, transparent); }
.nx-roles em { font-style: normal; color: color-mix(in srgb, var(--cat) 70%, var(--text)); white-space: nowrap; }
.nx-dept-foot { position: relative; z-index: 2; display: flex; gap: 10px; padding: 16px 22px 22px; border-top: 1px solid var(--line); }
.nx-dept-foot .btn { flex: 1; }

/* application cards */
.nx-app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 22px; }
.nx-app {
    --cat: var(--blue);
    position: relative; display: flex; flex-direction: column; gap: 16px; padding: 24px; overflow: hidden;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--sh-1), var(--sh-2); backdrop-filter: blur(14px);
    transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .3s ease, box-shadow .35s ease;
}
.nx-app::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--cat), color-mix(in srgb, var(--cat) 30%, var(--cyan))); }
.nx-app::after { content: ""; position: absolute; top: -120px; right: -120px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--cat) 30%, transparent), transparent 70%); pointer-events: none; opacity: .6; transition: opacity .35s ease; }
.nx-app:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--cat) 60%, transparent); box-shadow: var(--sh-1), 0 30px 70px -34px var(--cat); }
.nx-app:hover::after { opacity: 1; }
.nx-app.is-closed { opacity: .62; }
.nx-app.is-closed:hover { opacity: .85; }
.nx-app-top { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr; grid-template-areas: 'logo pill' 'who who'; align-items: center; gap: 16px 14px; }
.nx-app-top .mark { grid-area: logo; }
.nx-app-who { grid-area: who; }
.nx-app-who { flex: 1; min-width: 0; display: grid; gap: 4px; }
.nx-app-name { font-size: 1.25rem; margin: 0; letter-spacing: -0.015em; line-height: 1.2; }
.nx-app-top .pill { grid-area: pill; justify-self: end; display: inline-flex; align-items: center; gap: 6px; }
.nx-app-desc { flex: 1 0 auto; color: var(--text-2); }
.nx-app-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--line); }
.nx-app-foot .btn-primary { flex: 1 1 auto; }

/* process steps */
.nx-process { border-top: 1px solid var(--line); }
.nx-sec-head { margin-bottom: 34px; max-width: 640px; }
.nx-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: s; position: relative; }
.nx-steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nx-steps li { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); backdrop-filter: blur(14px); box-shadow: var(--sh-1); }
.nx-steps li:not(:last-child)::after { content: ""; position: absolute; top: 44px; right: -19px; width: 20px; height: 1px; background: var(--line-hot); }
.nx-steps h3 { font-size: 1.08rem; margin: 16px 0 6px; }
.nx-steps p { color: var(--text-2); font-size: 0.92rem; margin: 0 0 12px; }
.nx-steps p:last-child { margin: 0; }
.nx-steps kbd { font-family: var(--mono); font-size: 0.76rem; padding: 1px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; }
.nx-step-no { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--grad-hot); color: #04101f; font-family: var(--head); font-weight: 800; box-shadow: var(--sh-glow); }
.nx-linkbtn { background: none; border: 0; border-bottom: 1px solid var(--line-2); padding: 0 0 2px; cursor: pointer; color: var(--text); }

/* CTA */
.nx-cta-wrap { padding-bottom: 80px; }
.nx-cta { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; padding: 40px 44px; border-radius: var(--r-lg); border: 1px solid var(--line-hot); background: radial-gradient(60% 140% at 100% 0%, rgba(79, 227, 255, 0.22), transparent 60%), linear-gradient(120deg, rgba(44, 116, 255, 0.28), var(--panel-solid)); box-shadow: var(--sh-2), var(--sh-glow); }
.nx-cta .h2 { margin: 0 0 4px; }

/* homepage additions */
.h-hero { isolation: isolate; }
.h-hero .shell { z-index: 1; }
.h-title { background: linear-gradient(180deg, var(--text) 35%, color-mix(in srgb, var(--blue-2) 70%, var(--text))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-ticket { box-shadow: var(--sh-2), var(--sh-glow); backdrop-filter: blur(14px); }

.nx-feature { position: relative; overflow: hidden; }
.nx-feature .nx-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; margin-bottom: 18px; color: var(--cyan); background: linear-gradient(140deg, rgba(44, 116, 255, 0.28), rgba(79, 227, 255, 0.08)); border: 1px solid var(--line-hot); box-shadow: var(--sh-glow); }
.nx-feature::after { content: ""; position: absolute; right: -70px; bottom: -70px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(44, 116, 255, 0.18), transparent 70%); pointer-events: none; }

.nx-home-depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.nx-hd {
    --cat: var(--blue);
    position: relative; display: flex; flex-direction: column; gap: 8px; padding: 24px; overflow: hidden;
    background: radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--cat) 22%, transparent), transparent 70%), var(--panel);
    border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1), var(--sh-2); backdrop-filter: blur(14px);
    transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .3s ease, box-shadow .35s ease;
}
.nx-hd:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--cat) 60%, transparent); box-shadow: var(--sh-1), 0 30px 70px -34px var(--cat); }
.nx-hd-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.nx-hd h3 { font-size: 1.3rem; margin: 0; }
.nx-hd p { color: var(--text-2); font-size: 0.93rem; margin: 0; flex: 1 0 auto; }
.nx-hd-foot { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }

.nx-hire { display: grid; gap: 10px; }
.nx-hire-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); backdrop-filter: blur(14px); transition: border-color .25s ease, transform .25s ease, background .25s ease; }
.nx-hire-row:hover { border-color: var(--line-hot); transform: translateX(4px); background: rgba(44, 116, 255, 0.08); }
.nx-hire-main { flex: 1; min-width: 0; display: grid; }
.nx-hire-main strong { font-family: var(--head); font-size: 1.02rem; }
.nx-hire-main span { color: var(--muted); font-size: 0.86rem; }
.nx-hire-xp { padding: 5px 11px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; color: var(--cyan); border: 1px solid rgba(79, 227, 255, 0.3); background: rgba(79, 227, 255, 0.07); }
.nx-hire-go { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); transition: background .25s ease, color .25s ease; }
.nx-hire-row:hover .nx-hire-go { background: var(--blue); border-color: transparent; color: #fff; }

@media (max-width: 980px) {
    .nx-hero-inner { grid-template-columns: 1fr; gap: 32px; }
    .nx-steps, .nx-steps-3 { grid-template-columns: 1fr 1fr; }
    .nx-steps li::after { display: none; }
}
@media (max-width: 620px) {
    .nx-hero { padding: 44px 0 40px; }
    .nx-dept-grid, .nx-app-grid, .nx-home-depts { grid-template-columns: 1fr; }
    .nx-steps, .nx-steps-3 { grid-template-columns: 1fr; }
    .nx-toolbar { flex-direction: column; align-items: stretch; }
    .nx-search { max-width: none; }
    .nx-seg { justify-content: center; }
    .nx-cta { padding: 28px 24px; }
    .nx-hire-xp { display: none; }
}
@media (prefers-reduced-motion: reduce) { .nx-hero-glow { animation: none; } }

/* ---------- credits pill (navbar) ---------- */
.credits-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 11px;
    border: 1px solid rgba(255, 196, 77, 0.35);
    border-radius: 999px;
    background: rgba(255, 196, 77, 0.08);
    color: #ffc44d;
    font-family: var(--mono);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: default;
}
.credits-pill span { color: var(--text); }
.credits-pill .credits-ico { width: 16px; height: 16px; object-fit: contain; border-radius: 3px; }

/* ================= homepage polish (v6-5) ================= */
.page-home .h-hero { padding: 10px 0 88px; }
.page-home .h-status { margin-bottom: 64px; }
.page-home .h-hero-grid { grid-template-columns: minmax(0, 1fr) 400px; gap: 64px; align-items: center; }
.page-home .h-title {
    font-size: clamp(2.6rem, 5.6vw, 5rem);
    line-height: 0.95;
    letter-spacing: -0.01em;
    max-width: 13ch;
    margin-bottom: 24px;
    text-wrap: balance;
}
.page-home .h-lede { font-size: 1.1rem; max-width: 52ch; margin-bottom: 32px; }
.h-proof {
    list-style: none; margin: 28px 0 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 10px 22px;
    font-size: 0.92rem; color: var(--h-ink-2);
}
.h-proof li { display: inline-flex; align-items: center; gap: 8px; }
.h-proof svg { color: #46d68c; flex: none; }
.page-home .h-ticket { box-shadow: 0 30px 80px -40px rgba(60, 120, 255, 0.55), 0 0 0 1px rgba(255,255,255,0.03) inset; }
.page-home .h-section { padding-top: 96px; padding-bottom: 96px; }
.page-home .h-h2 { text-wrap: balance; }
.page-home .h-band-title { font-size: clamp(2.2rem, 4.4vw, 3.6rem); max-width: 16ch; }

.h-final { padding-top: 24px !important; }
.h-final-card {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px;
    padding: 48px 52px;
    border: 1px solid var(--line-2, rgba(255,255,255,0.1));
    border-radius: 24px;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(70, 130, 255, 0.18), transparent 55%),
        radial-gradient(90% 120% at 100% 100%, rgba(22, 209, 122, 0.12), transparent 60%),
        rgba(255, 255, 255, 0.025);
}
.h-final-card p { margin: 12px 0 0; max-width: 52ch; color: var(--h-ink-2); }
.h-final-card .h-h2 { margin: 6px 0 0; }
.h-final-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 960px) {
    .page-home .h-hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .page-home .h-status { margin-bottom: 40px; }
    .h-final-card { padding: 32px 26px; }
}


/* ---- Navbar: avatar-only account button ---- */
.user-chip.is-avatar-only { padding: 3px; gap: 0; border-radius: 50%; width: auto; }
.user-chip.is-avatar-only .chip-face img { width: 34px; height: 34px; display: block; }
@media (max-width: 900px) { .user-chip.is-avatar-only { width: auto; justify-content: center; } }

/* ---- Member ranks ---- */
.member-rank-chip {
    display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 5px;
    border: 1px solid var(--line-hot); border-radius: 999px; background: rgba(88, 160, 255, 0.1);
    color: inherit; text-decoration: none; font-size: 0.85rem;
}
.member-rank-chip:hover { background: rgba(88, 160, 255, 0.18); }
.member-rank-chip img { width: 22px; height: 22px; object-fit: contain; border-radius: 4px; }
.rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.rank-card {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
    padding: 22px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.03);
}
.rank-card.is-current { border-color: var(--line-hot); box-shadow: 0 0 0 1px var(--line-hot); }
.rank-card.is-locked .rank-card-img { opacity: 0.4; filter: grayscale(1); }
.rank-card-img { width: 72px; height: 72px; display: grid; place-items: center; color: var(--muted); }
.rank-card-img img { width: 72px; height: 72px; object-fit: contain; }
.rank-card-meta { display: flex; gap: 10px; font-size: 0.82rem; color: var(--muted); }
.rank-reward { font-weight: 650; color: inherit; }
.rank-card-foot { margin-top: auto; padding-top: 6px; }


/* ---------------------------------------------------------------
   Profile member rank showcase (level based)
   --------------------------------------------------------------- */
.rank-showcase {
    position: relative;
    overflow: hidden;
    margin: 18px 0 20px;
    padding: 16px 18px;
    border-radius: var(--r);
    border: 1px solid rgba(255, 196, 92, .28);
    background:
        radial-gradient(340px 140px at 4% 0%, rgba(255, 186, 74, .16), transparent 72%),
        linear-gradient(105deg, rgba(40, 34, 30, .92), rgba(12, 20, 35, .94));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 14px 34px -28px rgba(255, 180, 70, .7);
}
.rank-showcase::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, #ffcf6e, #ff9c4a);
}
.rank-showcase.is-unranked { border-color: var(--line-2); background: linear-gradient(105deg, rgba(31, 44, 67, .9), rgba(12, 20, 35, .94)); }
.rank-showcase.is-unranked::before { background: var(--line-2); }
.rank-showcase-main { display: flex; align-items: center; gap: 16px; }
.rank-showcase-art {
    flex: 0 0 auto; width: 76px; height: 76px; display: grid; place-items: center;
    border-radius: 16px; color: #ffd27a;
    background: rgba(255, 196, 92, .08); border: 1px solid rgba(255, 210, 122, .24);
}
.is-unranked .rank-showcase-art { color: var(--muted); background: rgba(255,255,255,.04); border-color: var(--line); }
.rank-showcase-art img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0,0,0,.55)); }
.rank-showcase-copy { min-width: 0; flex: 1; }
.rank-showcase-eyebrow { font-family: var(--head); font-size: .62rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: #ffd27a; }
.is-unranked .rank-showcase-eyebrow { color: var(--muted); }
.rank-showcase-title { margin: 3px 0; font-family: var(--head); font-size: 1.25rem; font-weight: 800; letter-spacing: .03em; color: var(--text); }
.rank-showcase-copy p { margin: 0; color: var(--text-2); font-size: .82rem; line-height: 1.5; }
.rank-showcase-link {
    flex: 0 0 auto; align-self: flex-start; padding: 6px 10px; border-radius: 8px;
    border: 1px solid var(--line-2); color: var(--text-2); font-family: var(--head);
    font-size: .68rem; font-weight: 650; text-transform: uppercase; text-decoration: none;
}
.rank-showcase-link:hover { color: var(--text); border-color: rgba(255, 210, 122, .4); }
.rank-showcase-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 14px;
    border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--line);
}
.rank-showcase-stats div { display: grid; gap: 3px; padding: 10px 12px; background: rgba(10, 17, 30, .9); min-width: 0; }
.rank-showcase-stats span { color: var(--muted); font-size: .66rem; text-transform: uppercase; letter-spacing: .09em; }
.rank-showcase-stats strong { font-family: var(--head); font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-showcase-progress { margin-top: 12px; }
.rank-showcase-progress-label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; color: var(--muted); font-size: .74rem; }
@media (max-width: 720px) {
    .rank-showcase-main { flex-wrap: wrap; }
    .rank-showcase-art { width: 60px; height: 60px; }
    .rank-showcase-art img { width: 44px; height: 44px; }
    .rank-showcase-stats { grid-template-columns: 1fr 1fr; }
    .rank-showcase-stats div:last-child { grid-column: 1 / -1; }
    .rank-showcase-progress-label { flex-direction: column; gap: 2px; }
}

/* compact rank showcase */
.rank-showcase { margin: 14px 0 16px; padding: 11px 14px; }
.rank-showcase-main { gap: 12px; }
.rank-showcase-art { width: 48px; height: 48px; border-radius: 11px; }
.rank-showcase-art img { width: 36px; height: 36px; }
.rank-showcase-eyebrow { font-size: .58rem; }
.rank-showcase-title { margin: 1px 0; font-size: 1rem; }
.rank-showcase-copy p { font-size: .76rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.rank-showcase-link { align-self: center; padding: 5px 8px; font-size: .62rem; }
.rank-showcase-progress { margin-top: 9px; }
.rank-showcase-progress-label { margin-bottom: 4px; font-size: .68rem; }
.rank-showcase-progress .xp-bar { height: 5px; }
@media (max-width: 720px) {
    .rank-showcase-main { flex-wrap: nowrap; }
    .rank-showcase-art { width: 42px; height: 42px; }
    .rank-showcase-art img { width: 30px; height: 30px; }
    .rank-showcase-link { display: none; }
}

/* ---------------------------------------------------------------
   Homepage department cards (clean, uniform)
   --------------------------------------------------------------- */
.dx-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.dx-card {
    --cat: var(--blue);
    position: relative; display: flex; flex-direction: column; gap: 14px;
    padding: 20px; border-radius: var(--r-lg); overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,.025), transparent 40%), var(--panel);
    border: 1px solid var(--line); box-shadow: var(--sh-1);
    transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .25s ease, box-shadow .3s ease;
}
.dx-card::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
    background: linear-gradient(90deg, var(--cat), transparent 80%); opacity: .7;
}
.dx-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--cat) 45%, var(--line)); box-shadow: var(--sh-1), 0 24px 50px -30px var(--cat); }
.dx-head { display: flex; align-items: center; gap: 14px; }
.dx-logo { flex: 0 0 auto; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.dx-logo .mark { display: block; }
.dx-id { min-width: 0; display: grid; gap: 3px; }
.dx-tag { display: inline-flex; align-items: center; gap: 8px; font-family: var(--head); font-size: .64rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--cat) 70%, #fff); }
.dx-tag em { font-style: normal; letter-spacing: .08em; padding: 2px 7px; border-radius: 999px; color: #ffd98a; background: rgba(255, 196, 92, .1); border: 1px solid rgba(255, 196, 92, .28); }
.dx-id h3 { margin: 0; font-size: 1.12rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-desc { margin: 0; flex: 1 0 auto; color: var(--text-2); font-size: .86rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(1.55em * 2); }
.dx-desc.is-empty { color: var(--muted); }
.dx-foot { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); min-height: 50px; }
.dx-status { display: inline-flex; align-items: center; gap: 7px; font-size: .74rem; font-weight: 650; color: var(--muted); }
.dx-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .6; }
.dx-status.is-open { color: #9eecd0; }
.dx-status.is-open i { background: #53dfa9; opacity: 1; box-shadow: 0 0 9px rgba(83,223,169,.8); }
.dx-go { font-size: .8rem; font-weight: 650; color: var(--text-2); transition: color .2s ease, transform .2s ease; }
.dx-card:hover .dx-go { color: var(--text); transform: translateX(3px); }
@media (max-width: 620px) { .dx-grid { grid-template-columns: 1fr; } }


/* ==========================================================================
   Phase 6 — applications page: reviewer access strip + status tracker
   ========================================================================== */

/* --- shared kicker label ------------------------------------------------- */
.kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--head);
    font-size: 0.64rem; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--muted);
    margin-bottom: 7px;
}
.kicker::before {
    content: ""; width: 18px; height: 2px; border-radius: 2px;
    background: var(--grad-hot); opacity: 0.85;
}

/* --- reviewer access strip ----------------------------------------------- */
.review-strip {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    padding: 20px 24px;
    border-color: rgba(96, 168, 255, 0.3);
    background:
        radial-gradient(130% 200% at 0% 0%, rgba(44, 116, 255, 0.18), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012) 42%, rgba(255, 255, 255, 0) 100%),
        var(--panel);
    overflow: hidden;
}
.review-strip::before {
    background: linear-gradient(90deg, rgba(96, 168, 255, 0.6), rgba(160, 205, 255, 0.28) 42%, transparent 80%);
}
.review-strip-glow {
    position: absolute; inset: auto auto -60% -8% ;
    width: 260px; height: 260px; border-radius: 50%;
    background: radial-gradient(circle, rgba(44, 116, 255, 0.28), transparent 70%);
    filter: blur(28px); pointer-events: none;
}
.review-strip .inbox-icon {
    position: relative; z-index: 1;
    width: 46px; height: 46px; border-radius: 14px;
    display: grid; place-items: center; flex: 0 0 auto;
    color: #d6e8ff;
    background: linear-gradient(160deg, rgba(44, 116, 255, 0.38), rgba(79, 227, 255, 0.1));
    border: 1px solid rgba(130, 186, 255, 0.36);
    box-shadow: 0 12px 30px -16px rgba(44, 116, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.review-strip .inbox-copy { position: relative; z-index: 1; flex: 1 1 260px; display: grid; gap: 1px; min-width: 0; }
.review-strip .inbox-copy .kicker { margin-bottom: 5px; color: #9dc4ff; }
.review-strip .inbox-copy .kicker::before { background: linear-gradient(90deg, #4fe3ff, #2c74ff); }
.review-strip .inbox-copy strong {
    font-family: var(--head); font-size: 1.06rem; font-weight: 700;
    letter-spacing: -0.012em; color: var(--text);
}
.review-strip-actions {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-left: auto;
}
.review-count {
    display: inline-flex; align-items: baseline; gap: 7px;
    padding: 7px 14px; border-radius: 999px;
    border: 1px solid rgba(246, 181, 69, 0.34);
    background: rgba(246, 181, 69, 0.09);
    font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase;
    color: #ffd894; white-space: nowrap;
}
.review-count b {
    font-family: var(--head); font-size: 1.05rem; font-weight: 750;
    letter-spacing: -0.01em; color: #ffe3b4;
}
.review-count.is-clear {
    border-color: rgba(55, 214, 155, 0.36); background: rgba(55, 214, 155, 0.09); color: #9df0cd;
}

/* --- status tracker ------------------------------------------------------ */
.status-panel { padding: 22px 24px 24px; }
.status-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 14px 18px; flex-wrap: wrap;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--line);
}
.status-head .h3 { margin: 0; }
.status-tally { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; margin: 0; padding: 0; }
.status-tally li {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 13px; border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    font-family: var(--head);
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--muted);
}
.status-tally li b {
    font-size: 0.92rem; font-weight: 750; letter-spacing: -0.01em; color: var(--text);
}
.status-tally li.is-pending  { border-color: rgba(246, 181, 69, 0.34); background: rgba(246, 181, 69, 0.08); }
.status-tally li.is-approved { border-color: rgba(55, 214, 155, 0.34); background: rgba(55, 214, 155, 0.08); }
.status-tally li.is-denied   { border-color: rgba(255, 96, 112, 0.34); background: rgba(255, 96, 112, 0.08); }

.status-list { gap: 9px; margin-top: 15px; }
.status-list li {
    --st: var(--muted);
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 13px 16px 13px 20px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.status-list li::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--st); opacity: 0.9;
}
.status-list li::after {
    content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 90px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--st) 16%, transparent), transparent);
    pointer-events: none;
}
.status-list li:hover {
    border-color: var(--line-2);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    transform: translateY(-1px);
}
.status-list li.is-pending  { --st: var(--amber); }
.status-list li.is-approved { --st: var(--green); }
.status-list li.is-denied   { --st: var(--red); }
.status-list li > .mark { position: relative; z-index: 1; }
.status-list .status-main { position: relative; z-index: 1; }
.status-main strong { font-size: 1rem; letter-spacing: -0.012em; }
.status-when { display: inline-flex; align-items: center; gap: 6px; }
.status-when svg { opacity: 0.6; flex: 0 0 auto; }
.status-main .note {
    display: block; margin-top: 8px; padding: 8px 13px;
    border-left: 2px solid var(--st, var(--line-2));
    border-radius: 0 8px 8px 0;
    background: rgba(255, 255, 255, 0.04);
    font-style: normal; font-size: 0.87rem; line-height: 1.55; color: var(--text-2);
    max-width: 58ch;
}
.status-list .pill {
    position: relative; z-index: 1;
    justify-content: center; min-width: 122px; padding-inline: 16px;
}

@media (max-width: 720px) {
    .review-strip { padding: 18px 18px; gap: 14px; }
    .review-strip-actions { margin-left: 0; width: 100%; }
    .review-strip-actions .btn { margin-left: auto; }
    .status-panel { padding: 20px 18px 20px; }
    .status-head { align-items: flex-start; }
    .status-list li { grid-template-columns: auto minmax(0, 1fr); padding: 13px 14px 13px 18px; }
    .status-list .pill { grid-column: 2; justify-self: start; min-width: 0; }
}

/* ==================================================================
   Developer badge (profile)
   ================================================================== */
.dev-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px; border-radius: 999px; line-height: 1;
    font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
    font-size: 0.72rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase;
    color: #d9fbff;
    border: 1px solid rgba(79, 227, 255, 0.5);
    background: linear-gradient(135deg, rgba(44, 116, 255, 0.32), rgba(79, 227, 255, 0.14));
    box-shadow: 0 0 0 1px rgba(79, 227, 255, 0.08) inset, 0 8px 22px -12px rgba(79, 227, 255, 0.8);
    white-space: nowrap;
}
.dev-chip svg { color: var(--cyan); flex: 0 0 auto; }

/* ==================================================================
   Admin -> FiveM script
   ================================================================== */
.game-download { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.game-download-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.game-download-main h3 { margin: 0 0 4px; }
.game-download-main p { margin: 0; }
.game-download-ico {
    display: grid; place-items: center; width: 52px; height: 52px; flex: 0 0 auto;
    border-radius: 14px; color: var(--cyan);
    border: 1px solid var(--line-hot);
    background: linear-gradient(140deg, rgba(44, 116, 255, 0.28), rgba(79, 227, 255, 0.1));
}
.game-download-ico svg { width: 28px; height: 28px; }
.key-row { display: flex; gap: 8px; align-items: stretch; }
.key-row .key-input { flex: 1 1 auto; min-width: 0; font-family: var(--mono, ui-monospace, monospace); font-size: 0.86rem; }
.panel .field + .field, .panel .field + form, .panel .field-row + .btn, .panel .field + .field-row { margin-top: 18px; }
.choice-list { display: grid; gap: 8px; }
.choice-list .choice span { display: grid; gap: 2px; }
.choice-list .choice em { font-style: normal; font-size: 0.8rem; color: var(--muted); }
.stat strong.stat-small { font-size: 1.25rem; }
.game-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--muted); opacity: 0.5; vertical-align: middle; }
.game-dot.is-live { background: var(--green); opacity: 1; box-shadow: 0 0 0 3px rgba(55, 214, 155, 0.2); }

/* ---------------- Setup wizard ---------------- */
.setup-shell { flex: 0 0 auto; max-width: 820px; align-content: start; padding-top: 42px; padding-bottom: 70px; position: relative; z-index: 1; display: grid; gap: 18px; }
.setup-brand { display: flex; align-items: center; gap: 12px; }
.setup-brand img { width: 44px; height: 44px; object-fit: contain; }
.setup-brand strong { font-size: 1.1rem; }
.setup-brand .muted { padding: 3px 10px; border: 1px solid var(--line-hot); border-radius: 999px; }
.setup-card { display: grid; gap: 18px; }
.setup-card .h2 { margin: 0; }
.setup-card > p { margin: 0; }
.setup-eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); }
.setup-form { display: grid; gap: 18px; }
.setup-keybox { display: grid; gap: 8px; padding: 16px 18px; border: 1px dashed var(--line-hot); border-radius: 14px; background: rgba(88, 160, 255, 0.07); }
.setup-keybox code { word-break: break-all; }
.setup-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 6px; }
.setup-steps { align-items: stretch; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.setup-steps a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.03); color: inherit; text-decoration: none; }
.setup-steps a:hover { border-color: var(--line-hot); }
.setup-steps strong { display: block; font-size: 0.84rem; }
.setup-steps em { display: block; font-style: normal; font-size: 0.72rem; color: var(--muted); }
.setup-num { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; border: 1px solid rgba(255, 255, 255, 0.18); }
.setup-steps .is-current a { border-color: var(--blue); background: rgba(88, 160, 255, 0.12); }
.setup-steps .is-current .setup-num, .setup-steps .is-done .setup-num { background: var(--grad-hot); border-color: transparent; color: #fff; }
.setup-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; max-height: 260px; overflow: auto; padding: 2px; }
.setup-role-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.setup-review { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.setup-review li { display: grid; grid-template-columns: 28px 170px 1fr; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.07); }
.setup-review .muted { word-break: break-all; }
.setup-tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.8rem; }
.setup-review .is-ok .setup-tick { background: rgba(70, 220, 150, 0.18); color: #7ff0b8; }
.setup-review .is-warn .setup-tick { background: rgba(255, 190, 80, 0.18); color: #ffd28a; }
@media (max-width: 760px) {
    .setup-steps { grid-template-columns: repeat(5, 1fr); }
    .setup-steps em, .setup-steps strong { display: none; }
    .setup-steps a { justify-content: center; }
    .setup-review li { grid-template-columns: 28px 1fr; }
    .setup-review li .muted { grid-column: 2; }
}

/* ==========================================================================
   Category sections on Applications + Departments
   ========================================================================== */
.nx-group { --cat: var(--blue); margin-bottom: 44px; }
.nx-group[hidden] { display: none; }
.nx-group:last-of-type { margin-bottom: 0; }
.nx-group-head { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); position: relative; }
.nx-group-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 120px; height: 2px; background: linear-gradient(90deg, var(--cat), transparent); }
.nx-group-dot { flex: none; width: 12px; height: 12px; border-radius: 4px; background: var(--cat); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cat) 18%, transparent), 0 0 18px color-mix(in srgb, var(--cat) 60%, transparent); }
.nx-group-title { flex: 1; min-width: 0; }
.nx-group-title .h3 { margin: 0; font-size: 1.35rem; }
.nx-group-title p { margin: 2px 0 0; }
.nx-group-count { flex: none; font-size: 0.82rem; color: var(--muted); padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.nx-group-count b { color: var(--text); }

/* ==========================================================================
   Store
   ========================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
a.credits-pill { transition: border-color .2s ease, background .2s ease; }
a.credits-pill:hover { border-color: var(--line-hot); }

.st-head { padding: 56px 0 26px; position: relative; }
.st-head-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.st-head .h1 { margin: 4px 0 8px; }
.st-head .lede { margin: 0; max-width: 60ch; }
.st-head .btn svg { display: inline-block; }

.st-sale-strip { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; padding: 12px 18px; border-radius: var(--r); border: 1px solid rgba(246, 181, 69, 0.4); background: linear-gradient(100deg, rgba(246, 181, 69, 0.16), rgba(246, 181, 69, 0.03)); }
.st-sale-strip strong { font-size: 1.05rem; color: #ffd894; letter-spacing: -0.01em; }
.st-sale-strip span { color: var(--text-2); font-size: 0.92rem; }

.st-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.st-main { min-width: 0; display: grid; gap: 22px; align-content: start; }
.st-side { position: sticky; top: 96px; display: grid; gap: 16px; }
.st-tabs { margin-bottom: 0; }
.st-tabs a.dept-chip { text-decoration: none; }

.st-group { --cat: var(--blue); }
.st-group + .st-group { margin-top: 18px; }
.st-group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.st-group-head > div { flex: 1; min-width: 0; }
.st-group-head .h3 { margin: 0; }
.st-group-head p { margin: 2px 0 0; }
.st-group-dot { flex: none; display: inline-block; width: 11px; height: 11px; border-radius: 4px; background: var(--cat, var(--blue)); box-shadow: 0 0 14px color-mix(in srgb, var(--cat, var(--blue)) 70%, transparent); }
.st-group-ico { width: 34px; height: 34px; border-radius: 10px; object-fit: contain; background: var(--panel-solid); border: 1px solid var(--line); padding: 3px; }
.st-group-count { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }

.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.st-card {
    --cat: var(--blue);
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--sh-1), var(--sh-2); backdrop-filter: blur(14px);
    transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .25s ease, box-shadow .3s ease;
}
.st-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--cat) 60%, transparent); box-shadow: var(--sh-1), 0 26px 60px -30px var(--cat); }
.st-card.is-featured { border-color: color-mix(in srgb, var(--amber) 45%, var(--line)); }
.st-card.is-sold, .st-card.is-hidden-pkg { opacity: .6; }
.st-card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: radial-gradient(90% 120% at 80% 0%, color-mix(in srgb, var(--cat) 45%, transparent), transparent 70%), linear-gradient(160deg, color-mix(in srgb, var(--cat) 20%, var(--panel-solid)), var(--panel-solid)); border-bottom: 1px solid var(--line); }
.st-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.st-card:hover .st-card-media img { transform: scale(1.04); }
.st-card-media.is-empty { display: grid; place-items: center; }
.st-card-media.is-empty > span { font-weight: 800; font-size: 2.4rem; letter-spacing: -0.04em; color: color-mix(in srgb, var(--cat) 55%, var(--text)); opacity: .55; }
.st-flags { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.st-flag-sale { color: #ffd894 !important; border-color: rgba(246, 181, 69, 0.55) !important; background: rgba(40, 26, 4, 0.7) !important; }
.st-card-body { flex: 1; display: grid; align-content: start; gap: 4px; padding: 16px 18px 10px; }
.st-card-name { margin: 0; font-size: 1.08rem; line-height: 1.25; letter-spacing: -0.01em; }
.st-card-tag { margin: 2px 0 0; color: var(--muted); font-size: 0.86rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px 16px; }
.st-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.st-price s { color: var(--muted); font-size: 0.85rem; }
.st-price em { font-style: normal; color: var(--muted); font-size: 0.8rem; }
.st-card-go { position: relative; z-index: 2; pointer-events: none; }

.coin { display: inline-flex; align-items: center; gap: 6px; color: var(--amber); }
.coin b { color: var(--text); font-weight: 750; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.coin-ico { width: 16px; height: 16px; flex: none; object-fit: contain; }
.coin-lg b { font-size: 2rem; letter-spacing: -0.03em; }
.coin-lg .coin-ico { width: 24px; height: 24px; }

.st-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.86rem; color: var(--muted); }
.st-crumbs a:hover { color: var(--text); }
.st-crumbs strong { color: var(--text-2); font-weight: 600; }

.st-detail { --cat: var(--blue); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.st-detail-media { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: radial-gradient(90% 120% at 80% 0%, color-mix(in srgb, var(--cat) 45%, transparent), transparent 70%), linear-gradient(160deg, color-mix(in srgb, var(--cat) 22%, var(--panel-solid)), var(--panel-solid)); box-shadow: var(--sh-2); }
.st-detail-media img { width: 100%; height: 100%; object-fit: cover; }
.st-detail-media.is-empty { display: grid; place-items: center; }
.st-detail-media.is-empty > span { font-weight: 800; font-size: 4.5rem; color: color-mix(in srgb, var(--cat) 55%, var(--text)); opacity: .5; }
.st-detail-media .nx-flag { position: absolute; top: 14px; left: 14px; }
.st-detail-buy { display: grid; gap: 12px; }
.st-detail-name { margin: 0; }
.st-detail-buy > p { margin: 0; }
.st-bill { margin: 4px 0 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.st-bill div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.st-bill div:last-child { border-bottom: 0; }
.st-bill dt { font-size: 0.88rem; color: var(--text-2); }
.st-bill dd { margin: 0; font-variant-numeric: tabular-nums; }
.st-bill .is-off dd { color: var(--green); font-weight: 600; }
.st-bill .is-total { background: rgba(88, 160, 255, 0.07); }
.st-bill .is-total dt { font-weight: 650; color: var(--text); }
.st-code { display: flex; gap: 8px; }
.st-code input { flex: 1; min-width: 0; text-transform: uppercase; }
.st-code-msg { margin: -4px 0 0; font-size: 0.85rem; }
.st-code-msg.is-bad { color: #ffb1b9; }
.st-code-msg.is-good { color: #9df0cd; }
.st-buy-form { display: grid; gap: 10px; }
.st-buy-form p { margin: 0; }
.st-buy-btn { width: 100%; justify-content: center; text-align: center; }
.st-owned { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 12px 14px; border-radius: var(--r); border: 1px solid rgba(55, 214, 155, 0.4); background: rgba(55, 214, 155, 0.08); }
.st-owned strong { color: #9df0cd; }
.st-owned .btn { margin-left: auto; }
.st-note { margin: 0; }
.st-detail-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.st-perks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.st-perks li { position: relative; padding-left: 26px; color: var(--text-2); }
.st-perks li::before { content: ""; position: absolute; left: 2px; top: 0.45em; width: 13px; height: 7px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }

.st-sublist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.st-sublist li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(255, 255, 255, 0.02); }
.st-sublist li > div { display: grid; gap: 2px; }
.st-sublist li.is-active { border-color: rgba(55, 214, 155, 0.35); }
.st-sublist li.is-ended { opacity: .65; }
.st-table td, .st-table th { white-space: nowrap; }

.st-wallet { display: grid; gap: 14px; padding: 22px; }
.st-wallet-who { display: flex; align-items: center; gap: 12px; }
.st-wallet-who img { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); }
.st-wallet-who div { display: grid; line-height: 1.3; }
.st-wallet-bal { display: flex; align-items: baseline; gap: 8px; padding: 14px 16px; border-radius: var(--r); background: linear-gradient(120deg, rgba(246, 181, 69, 0.12), rgba(246, 181, 69, 0.02)); border: 1px solid rgba(246, 181, 69, 0.28); }
.st-wallet-bal > span:not(.coin) { color: var(--muted); font-size: 0.9rem; }
.st-wallet-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-wallet-links .btn { justify-content: center; text-align: center; }
.st-wallet p { margin: 0; }
.st-side-block { padding: 18px 20px; display: grid; gap: 10px; }
.st-side-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.st-side-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.st-side-cats a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text-2); font-size: 0.92rem; transition: background .2s ease, color .2s ease; }
.st-side-cats a:hover, .st-side-cats a.is-active { background: rgba(88, 160, 255, 0.1); color: var(--text); }
.st-side-cats em { margin-left: auto; font-style: normal; font-size: 0.78rem; color: var(--muted); }
.st-side-subs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.st-side-subs li { display: flex; justify-content: space-between; gap: 10px; font-size: 0.9rem; }
.st-recent-list { list-style: none; margin: 0 -8px; padding: 0; display: grid; gap: 2px; }
.st-recent-list a { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-sm); transition: background .2s ease; }
.st-recent-list a:hover { background: rgba(88, 160, 255, 0.1); }
.st-recent-list img { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); }
.st-recent-txt { display: grid; min-width: 0; line-height: 1.3; }
.st-recent-txt strong { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-recent-txt span { font-size: 0.8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-recent-txt em { font-style: normal; color: var(--text-2); }
.st-recent-list time { font-size: 0.72rem; white-space: nowrap; }

@media (max-width: 1020px) {
    .st-layout { grid-template-columns: minmax(0, 1fr); }
    .st-side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
    .st-detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .st-grid { grid-template-columns: minmax(0, 1fr); }
    .nx-group-head { flex-wrap: wrap; }
}

/* ---------- store admin ---------- */
.sa-tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 5px; margin-bottom: 22px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); width: fit-content; max-width: 100%; }
.sa-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 0.9rem; transition: background .2s ease, color .2s ease; }
.sa-tabs a:hover { color: var(--text); }
.sa-tabs a.is-active { background: rgba(88, 160, 255, 0.16); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-hot); }
.sa-tabs .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 0.72rem; background: var(--amber); color: #1a1100; font-weight: 700; }
.sa-body { display: grid; gap: 20px; }
.sa-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sa-stats dd { font-size: 1.9rem; }
.sa-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.sa-feed, .sa-top { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.sa-feed li { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.sa-top li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.sa-member { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.sa-member img { width: 26px; height: 26px; border-radius: 50%; }
.sa-member:hover span { text-decoration: underline; }
table.data tr.is-off td { opacity: .55; }
.sa-thumb { width: 72px; }
.sa-thumb img { width: 56px; height: 36px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.sa-thumb span { display: grid; place-items: center; width: 56px; height: 36px; border-radius: 6px; background: var(--panel-solid); border: 1px solid var(--line); font-weight: 700; font-size: 0.8rem; color: var(--muted); }
.sa-actions { display: inline-flex; flex-wrap: nowrap; justify-content: flex-end; gap: 6px; }
.sa-actions form { margin: 0; }
.sa-cats { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.sa-cats li { --cat: var(--blue); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--cat); border-radius: var(--r-sm); }
.sa-cats li > div { flex: 1; display: grid; }
.sa-cats li img { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; }
.sa-cats li form { margin: 0; }
.sa-cats li.is-off { opacity: .6; }
.sa-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 14px 0 16px; }
.sa-filter .nx-search { flex: 1 1 260px; }
.sa-seg { margin: 14px 0 16px; }
.nx-seg a { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 0.86rem; }
.nx-seg a.is-active { background: rgba(88, 160, 255, 0.16); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-hot); }
.sa-pager { margin-top: 14px; }
.sa-radios { display: grid; gap: 8px; }
.sa-roles summary { cursor: pointer; color: var(--muted); font-size: 0.88rem; margin-bottom: 10px; }
.sa-img-preview { width: 128px !important; height: 80px !important; }
.sa-img-preview img { width: 100%; height: 100%; object-fit: cover; }
fieldset.form-inset { margin: 0; min-width: 0; }
fieldset.form-inset legend { padding: 0 6px; margin-left: -6px; }
[data-sub-only][hidden] { display: none !important; }
@media (max-width: 700px) {
    .sa-stats { grid-template-columns: 1fr 1fr; }
    .sa-tabs { border-radius: var(--r); }
}

/* Top bar: tighter links between tablet and small-laptop widths so the extra
   Store link never pushes the account buttons off screen. */
@media (min-width: 881px) and (max-width: 1180px) {
    .topbar .nav { gap: 12px; }
    .topbar .nav-links { gap: 0; }
    .topbar .nav-link { padding-left: 9px; padding-right: 9px; font-size: 0.86rem; white-space: nowrap; }
    .topbar .nav-side { gap: 8px; }
    .topbar .nav-side .btn-sm { padding-left: 12px; padding-right: 12px; }
}
/* .section-tight must not wipe the side padding of .shell on narrow screens */
.shell.section-tight { padding-left: 24px; padding-right: 24px; }

/* ==========================================================================
   v7 — Professional finish
   One consistent layer over everything above: calmer backdrop, one type
   scale, one surface, one control size. Visual only — no layout of
   features is removed or hidden. Brand colours from Site settings still
   drive every accent through --blue / --cyan.
   ========================================================================== */

:root {
    --bg:          #060a14;
    --bg-deep:     #04070f;
    --panel:       rgba(14, 21, 37, 0.78);
    --panel-2:     rgba(19, 28, 47, 0.7);
    --panel-solid: #0b1222;
    --line:        rgba(148, 176, 222, 0.13);
    --line-2:      rgba(148, 176, 222, 0.2);
    --text:        #ecf1f9;
    --text-2:      #bccadf;
    --muted:       #8496b3;

    --r-lg: 16px;
    --r:    12px;
    --r-sm: 9px;

    --ctl-h:    42px;
    --ctl-h-sm: 34px;
    --ctl-r:    10px;

    --surface:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012) 55%, rgba(255, 255, 255, 0)),
        var(--panel);
    --surface-sh:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.3),
        0 24px 60px -40px rgba(0, 0, 0, 0.9);
    --ring: 0 0 0 3px color-mix(in srgb, var(--blue) 26%, transparent);
    --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base type ---------- */
body {
    font-size: 15.5px;
    line-height: 1.62;
    letter-spacing: 0;
    font-feature-settings: "ss01", "tnum" 0;
}
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.022em; color: var(--text); }
.h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.06; }
.h2 { font-size: clamp(1.45rem, 2.5vw, 1.9rem); font-weight: 600; letter-spacing: -0.028em; }
.h3 { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.015em; }
.h4 { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; }
.lede { font-size: 1.03rem; line-height: 1.65; color: var(--text-2); }
.muted { color: var(--muted); }
.eyebrow { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; gap: 10px; }
.eyebrow::before {
    content: "";
    width: 18px; height: 1.5px; border-radius: 2px;
    background: currentColor; opacity: .7;
}
.eyebrow.small::before { display: none; }
a:not(.btn):not(.nav-link):not(.link) { transition: color .18s ease; }
.link { font-size: inherit; font-weight: 600; }
strong, b { font-weight: 600; }

::selection { background: color-mix(in srgb, var(--blue) 45%, transparent); color: #fff; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--blue) 70%, #fff); outline-offset: 2px; }

/* thin, quiet scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(148, 176, 222, 0.22) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(148, 176, 222, 0.2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(148, 176, 222, 0.32); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- backdrop: one soft glow, no busy bands ---------- */
.aurora {
    background:
        radial-gradient(900px 520px at 78% -12%, color-mix(in srgb, var(--blue) 20%, transparent), transparent 70%),
        radial-gradient(700px 420px at 8% -8%, color-mix(in srgb, var(--cyan) 9%, transparent), transparent 72%),
        linear-gradient(180deg, #08101e 0%, var(--bg) 38%, var(--bg-deep) 100%);
}
.aurora::after { opacity: .55; }
.aurora-band { opacity: .16 !important; filter: blur(46px); }
.band-3 { display: none; }
.aurora-stars { opacity: .18; }
.nx-hero-glow { opacity: .7; }

/* ---------- layout rhythm ---------- */
.section { padding: 56px 0; }
.page-head { padding: 52px 0 6px; }
.page-head .h1 { margin-bottom: 0.32em; }
.page-head .lede { margin-bottom: 0; }
.page-head::after {
    margin-top: 32px;
    background: linear-gradient(90deg, var(--line-2), var(--line) 40%, transparent);
}
.section-head { margin-bottom: 26px; }

/* ---------- surfaces ---------- */
.card, .panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--surface-sh);
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
}
.panel::after, .card::after { box-shadow: none; }
.panel::before, .card::before { opacity: .6; }
.card { transition: transform .28s var(--ease), border-color .22s ease, box-shadow .28s ease; }
.card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--blue) 32%, var(--line));
    box-shadow: var(--surface-sh), 0 18px 44px -30px color-mix(in srgb, var(--blue) 70%, transparent);
}
body.is-still .card:hover { transform: none; }

/* ---------- buttons ---------- */
.btn {
    min-height: var(--ctl-h);
    padding: 0 18px;
    gap: 8px;
    border-radius: var(--ctl-r);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.2;
    white-space: nowrap;
    transition: background .18s ease, border-color .18s ease, box-shadow .2s ease, color .18s ease, transform .12s ease;
}
.btn:hover  { transform: none; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: var(--ctl-h-sm); padding: 0 13px; font-size: 0.84rem; border-radius: 9px; }
.btn-xs { min-height: 28px; padding: 0 10px; font-size: 0.76rem; border-radius: 7px; }
.btn-lg { min-height: 48px; padding: 0 24px; font-size: 0.95rem; border-radius: 12px; }
.btn-block { width: 100%; justify-content: center; }

.btn-primary {
    color: #fff;
    background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 92%, #fff), var(--blue));
    border: 1px solid color-mix(in srgb, var(--blue) 70%, #fff 0%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 1px 2px rgba(0, 0, 0, 0.35),
        0 8px 20px -10px color-mix(in srgb, var(--blue) 80%, transparent);
}
.btn-primary:hover {
    background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 82%, #fff), color-mix(in srgb, var(--blue) 94%, #fff));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.26),
        0 1px 2px rgba(0, 0, 0, 0.35),
        0 12px 26px -12px color-mix(in srgb, var(--blue) 90%, transparent);
}
.btn-primary::after { display: none; }

.btn-ghost {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(255, 255, 255, 0.2);
}
.btn-quiet { min-height: var(--ctl-h-sm); }
.btn-danger {
    color: #ffc3c9;
    background: rgba(255, 96, 112, 0.08);
    border: 1px solid rgba(255, 96, 112, 0.32);
}
.btn-danger:hover { background: rgba(255, 96, 112, 0.16); border-color: rgba(255, 96, 112, 0.5); }
.btn-discord { box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 20px -10px rgba(88, 101, 242, 0.8); }
.btn-signin { box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 8px 20px -10px rgba(22, 209, 122, 0.8); }
.btn-signin:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 12px 26px -12px rgba(22, 209, 122, 0.9); }
.btn-approve { box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 8px 20px -10px rgba(55, 214, 155, 0.7); }
.btn:disabled, .btn.is-disabled { opacity: .5; }

/* ---------- form controls ---------- */
input:not([type='checkbox']):not([type='radio']):not([type='file']):not([type='range']):not([type='color']),
select,
textarea {
    min-height: 44px;
    border-radius: var(--ctl-r);
    background: rgba(5, 9, 18, 0.55);
    border: 1px solid rgba(148, 176, 222, 0.16);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
    color: var(--text);
    font-size: 0.94rem;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
textarea { min-height: 0; line-height: 1.55; }
input:not([type='checkbox']):not([type='radio']):not([type='file']):not([type='range']):not([type='color']):hover,
select:hover,
textarea:hover { border-color: rgba(148, 176, 222, 0.26); }
input:focus, select:focus, textarea:focus {
    outline: none;
    background: rgba(5, 9, 18, 0.75);
    border-color: color-mix(in srgb, var(--blue) 65%, #fff 10%);
    box-shadow: var(--ring), inset 0 1px 2px rgba(0, 0, 0, 0.25);
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
input[type='checkbox'], input[type='radio'] { accent-color: var(--blue); }
input[type='file'] { font-size: .88rem; color: var(--muted); }
input[type='file']::file-selector-button {
    margin-right: 12px; padding: 7px 14px; border-radius: 8px; cursor: pointer;
    font: inherit; font-weight: 600; font-size: .84rem; color: var(--text);
    background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14);
    transition: background .18s ease;
}
input[type='file']::file-selector-button:hover { background: rgba(255, 255, 255, 0.1); }

.field { gap: 7px; }
.field > label, .field-row > label { font-size: 0.86rem; font-weight: 600; color: var(--text); letter-spacing: 0; }
.field .opt { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.06em; margin-left: 4px; }
.field-help { font-size: 0.82rem; line-height: 1.5; }
/* Side-by-side fields: the "stacked field" spacing must not push the second column down. */
.field-row { align-items: start; gap: 16px 18px; }
.panel .field-row > .field + .field,
.panel .field-row > .field + .field-row,
.field-row > .field + .field { margin-top: 0; }

.choice {
    border-radius: var(--ctl-r);
    border-color: rgba(148, 176, 222, 0.16);
    background: rgba(5, 9, 18, 0.4);
    transition: border-color .18s ease, background .18s ease;
}
.choice:hover { border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); background: color-mix(in srgb, var(--blue) 7%, rgba(5, 9, 18, 0.4)); }
.choice:has(input:checked) { border-color: color-mix(in srgb, var(--blue) 60%, var(--line)); background: color-mix(in srgb, var(--blue) 10%, rgba(5, 9, 18, 0.4)); }

.switch-row input:checked ~ .switch { background: var(--blue); box-shadow: none; }

/* search pills share the input look */
.nx-search {
    height: 44px;
    border-radius: var(--ctl-r);
    background: rgba(5, 9, 18, 0.55);
    border: 1px solid rgba(148, 176, 222, 0.16);
}
.nx-search input { min-height: 0 !important; }
.nx-search:focus-within { border-color: color-mix(in srgb, var(--blue) 65%, #fff 10%); box-shadow: var(--ring); }

/* segmented filters */
.nx-seg {
    padding: 3px;
    border-radius: 11px;
    background: rgba(5, 9, 18, 0.5);
    border: 1px solid var(--line);
}
.nx-seg a, .nx-seg button, .nx-seg label {
    border-radius: 8px !important;
    font-size: 0.84rem;
    transition: background .18s ease, color .18s ease;
}
.nx-seg a:hover, .nx-seg button:hover { color: var(--text); }
.nx-seg a.is-active, .nx-seg button.is-active, .nx-seg .is-active {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

/* ---------- pills / tags ---------- */
.pill, .tag {
    padding: 3px 10px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-color: var(--line-2);
    background: rgba(255, 255, 255, 0.035);
}

/* ---------- flash messages ---------- */
.flash {
    border-radius: var(--r);
    border: 1px solid color-mix(in srgb, var(--green) 35%, transparent);
    background: color-mix(in srgb, var(--green) 9%, var(--panel-solid));
    box-shadow: var(--surface-sh);
    font-size: 0.92rem;
}
.flash-error {
    border-color: rgba(255, 96, 112, 0.35);
    background: color-mix(in srgb, #ff6070 9%, var(--panel-solid));
}

/* ---------- tables ---------- */
.table-wrap { border-radius: var(--r); border-color: var(--line); background: rgba(5, 9, 18, 0.35); }
table.data, .data { border-collapse: collapse; width: 100%; }
.data th {
    font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--muted); background: rgba(255, 255, 255, 0.025);
    border-bottom: 1px solid var(--line);
}
.data td { border-bottom: 1px solid rgba(148, 176, 222, 0.08); }
.data tbody tr { transition: background .15s ease; }
.data tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.data tbody tr:last-child td { border-bottom: 0; }

/* ---------- top bar ---------- */
.topbar .shell.topbar-inner {
    min-height: 64px;
    border-radius: 16px;
    border-color: rgba(255, 255, 255, 0.09);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
        rgba(8, 13, 25, 0.7);
    box-shadow: 0 14px 40px -24px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.topbar .shell.topbar-inner::before { opacity: .28; }
.topbar.is-stuck .shell.topbar-inner {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
        rgba(6, 10, 20, 0.88);
}
.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-2);
    border-radius: 9px;
    transition: color .18s ease, background .18s ease;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-link.is-active { color: var(--text); font-weight: 600; }
.nav-link.is-active::after { height: 2px; border-radius: 2px; background: var(--blue); box-shadow: 0 0 10px color-mix(in srgb, var(--blue) 70%, transparent); }

/* ---------- footer ---------- */
.footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 60%), var(--bg-deep);
}
.footer-brand strong { font-weight: 600; }
.footer-links a { color: var(--muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }
.footer-legal { color: color-mix(in srgb, var(--muted) 85%, transparent); font-size: 0.84rem; }

/* ---------- logo marks ---------- */
.mark { border-color: var(--line-2); background: linear-gradient(160deg, color-mix(in srgb, var(--blue) 18%, transparent), rgba(10, 16, 30, 0.95)); }
.mark-text { font-weight: 700; letter-spacing: 0.01em; }
.dx-logo .mark { display: grid; }

/* ---------- inner-page heroes (applications / departments) ---------- */
.nx-hero { padding: 64px 0 52px; }
.nx-title { font-weight: 600; letter-spacing: -0.04em; line-height: 1.03; }
.nx-stats { border-radius: var(--r-lg); box-shadow: var(--surface-sh); }
.nx-stats div { background: color-mix(in srgb, var(--panel-solid) 92%, transparent); }
.nx-stats dt { font-size: 0.66rem; letter-spacing: 0.12em; }
.nx-stats dd { font-weight: 600; font-size: 2.1rem; }

/* ---------- homepage ---------- */
body.page-home .h-title { font-weight: 600; letter-spacing: -0.04em; line-height: 1.02; }
body.page-home .h-h2 { font-weight: 600; letter-spacing: -0.03em; }
.page-home .h-title { font-size: clamp(2.5rem, 5.2vw, 4.4rem); }
body.page-home .h-step h2,
body.page-home .h-dept h3,
body.page-home .h-log-body h3 { font-weight: 600; }
.h-step h2 { margin-top: 10px; }
.h-step-no { opacity: .85; }
.nx-feature .nx-icon { box-shadow: none; border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
.h-ticket-count strong, .h-band-stats dd { font-weight: 700; }
.dx-card { border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--surface-sh); }
.dx-card:hover { transform: translateY(-2px); }
.dx-id h3 { font-weight: 600; }
.dx-tag { font-weight: 600; letter-spacing: .12em; }

/* ---------- store ---------- */
.st-card-media.is-empty > span,
.st-detail-media.is-empty > span { font-weight: 700; }

/* ---------- small heavy labels calmed down ---------- */
.rank-showcase-title, .nx-step-no, .nx-dept-logo span, .dept-logo .logo-text { font-weight: 700; }

/* ---------- motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
    .card:hover, .dx-card:hover { transform: none; }
}
@media (max-width: 880px) {
    .page-head { padding-top: 36px; }
    .section { padding: 44px 0; }
    .btn { white-space: normal; }
}

/* ---------- v7: tab bars & chip filters share one shape ---------- */
.dept-filter, .sa-tabs {
    padding: 4px;
    gap: 2px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(6, 10, 20, 0.72);
    box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.9);
}
.dept-chip, .sa-tabs a {
    min-height: 34px;
    padding: 0 13px;
    border-radius: 8px;
    font-size: 0.85rem;
}
.dept-chip-count { border-radius: 6px; padding: 2px 6px; }
.dept-chip-dot { box-shadow: none; width: 7px; height: 7px; }
.dept-chip.is-active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 -2px 0 var(--cat);
}
.dept-chip.is-active .dept-chip-count { background: color-mix(in srgb, var(--cat) 30%, transparent); }
.sa-tabs a.is-active {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 -2px 0 var(--blue);
}
.sa-tabs .count { border-radius: 6px; }
@media (max-width: 700px) { .dept-filter, .sa-tabs { border-radius: 12px; } }

/* staff panel side menu */
.admin-nav-link { border-radius: 9px; font-weight: 500; }
.admin-nav-link.is-active {
    background: rgba(255, 255, 255, 0.07);
    box-shadow: inset 2px 0 0 var(--blue);
    font-weight: 600;
}
.admin-nav-label { letter-spacing: 0.12em; font-weight: 600; }

/* ---------- v7: homepage details ---------- */
body.page-home .h-btn { font-weight: 600; letter-spacing: 0; border-radius: 11px; }
body.page-home .h-btn:hover { transform: none; }
.h-step-no { margin-bottom: 10px; font-weight: 600; letter-spacing: .08em; }
.h-step h2, body.page-home .h-step h2 { font-size: 1.4rem; line-height: 1.2; letter-spacing: -0.02em; }
body.page-home .h-section { padding-top: 84px; padding-bottom: 84px; }
.h-label, body.page-home .h-label { letter-spacing: 0.14em; font-weight: 600; }
body.page-home .h-copy { font-weight: 600; letter-spacing: .04em; }

/* ---------- v7: phone widths — store pages never spill sideways ---------- */
.st-main, .sa-body { grid-template-columns: minmax(0, 1fr); }
.st-main > *, .sa-body > * { min-width: 0; }
.field-row { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.st-main .table-wrap, .sa-body .table-wrap { overflow-x: auto; }

/* profile numbers match the calmer heading weight */
.profile-stats strong { font-weight: 700; letter-spacing: -0.02em; }

/* ---------- store on/off switch (store admin header + site settings) ---------- */
.sa-switch { display:inline-flex; align-items:center; gap:10px; margin:0; }
.store-power { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.store-power .setting-group-ico { flex:0 0 auto; }
.store-power-text { flex:1 1 260px; min-width:0; }
.store-power-text .h4 { display:flex; align-items:center; gap:10px; margin:0; }
.store-power-text p { margin:4px 0 0; }
.store-power-actions { display:flex; gap:8px; flex-wrap:wrap; }

/* settings -> FiveM connection: a lone last detail spans the full row */
.connection-details > .is-wide { grid-column: 1 / -1; }
