@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300&family=DM+Mono:wght@400;500&display=swap');

:root {
    --bg:           #0a0a0f;
    --bg-soft:      #0f0f17;
    --panel:        #13131e;
    --panel-2:      #181826;
    --panel-3:      #1d1d2e;
    --border:       rgba(255, 255, 255, 0.07);
    --border-soft:  rgba(255, 255, 255, 0.04);
    --border-hover: rgba(255, 255, 255, 0.14);
    --text:         #f0f0f8;
    --muted:        #8b8ba7;
    --muted-2:      #5c5c78;
    --accent:       #6366f1;
    --accent-hover: #4f52d9;
    --accent-dim:   rgba(99, 102, 241, 0.12);
    --accent-glow:  rgba(99, 102, 241, 0.2);
    --container:    1240px;
    --radius:       10px;
    --radius-lg:    14px;
    --shadow:       0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg:    0 12px 48px rgba(0, 0, 0, 0.6);
    --font:         'DM Sans', system-ui, sans-serif;
    --font-mono:    'DM Mono', monospace;
    --transition:   0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* Container */

.container {
    width: min(100% - 40px, var(--container));
    margin: 0 auto;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid var(--border);
}

.header-grid {
    min-height: 68px;
    display: grid;
    grid-template-columns: 220px 1fr 140px;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.brand-text strong {
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    font-weight: 600;
    color: var(--text);
}

.brand-text span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 400;
}

/* Nav */

.nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.nav-centered {
    justify-content: center;
}

.nav a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition), background var(--transition);
}

.nav a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.nav a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

/* Header Actions */

.header-actions {
    display: flex;
    justify-content: flex-end;
}

.login-btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 8px;
    background: var(--accent);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: background var(--transition), box-shadow var(--transition);
}

.login-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Buttons */

.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 22px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    border-color: transparent;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 24px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

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

.btn-ghost:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

/* Layout */

.page {
    padding: 40px 0 56px;
}

.home-page {
    padding: 36px 0 56px;
}

/* Hero */

.hero {
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--panel);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 70% 50%, rgba(99, 102, 241, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 0% 100%, rgba(129, 140, 248, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    min-height: 420px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    align-items: center;
    padding: 48px;
}

.hero-copy {
    max-width: 640px;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--accent-dim);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-label::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6366f1;
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.8);
    flex-shrink: 0;
}

.hero-copy h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text);
}

.hero-copy h1 em {
    font-style: normal;
    background: linear-gradient(135deg, #818cf8 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-copy p {
    color: var(--muted);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.65;
    max-width: 52ch;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Hero Panel */

.hero-panel {
    display: grid;
    gap: 12px;
}

.info-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    transition: border-color var(--transition), background var(--transition);
}

.info-card:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
}

.card-label {
    display: block;
    color: var(--muted-2);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    font-family: var(--font-mono);
}

.info-card strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.info-card p {
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Summary Grid */

.summary-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* Panels */

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: border-color var(--transition);
}

.panel:hover {
    border-color: var(--border-hover);
}

.panel h1 {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-top: 10px;
    margin-bottom: 10px;
    color: var(--text);
}

.panel h2 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
    color: var(--text);
}

.panel p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 72ch;
}

/* Simple List */

.simple-list {
    list-style: none;
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.simple-list li {
    color: var(--muted);
    font-size: 0.9rem;
    padding-left: 16px;
    position: relative;
    line-height: 1.5;
}

.simple-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.5);
}

/* Link Grid */

.link-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.link-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    cursor: pointer;
}

.link-card:hover {
    border-color: var(--border-hover);
    background: var(--panel-2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.link-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent-dim);
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 16px;
}

.link-card strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
    color: var(--text);
}

.link-card span {
    color: var(--muted);
    font-size: 0.83rem;
    line-height: 1.4;
}

/* Divider */

.divider {
    height: 1px;
    background: var(--border-soft);
    margin: 24px 0;
}

/* Badge */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-accent {
    background: var(--accent-dim);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
}

.badge-neutral {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--muted);
}

/* Stat / Metric card */

.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted-2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-mono);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--text);
    line-height: 1;
}

.stat-delta {
    margin-top: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #34d399;
}

.stat-delta.negative {
    color: #f87171;
}

/* Table */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    text-align: left;
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted-2);
    font-family: var(--font-mono);
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--muted);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.015);
    color: var(--text);
}

/* Form elements */

.input,
.select,
.textarea {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.input::placeholder,
.textarea::placeholder {
    color: var(--muted-2);
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

/* Rules page */

.page-intro {
    margin-bottom: 16px;
}

.rules-panel {
    padding: 22px 24px 24px;
}

.rules-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding-bottom: 4px;
}

.rules-tab {
    appearance: none;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.rules-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.rules-tab.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.06);
}

.rules-tab-panel {
    display: none;
}

.rules-tab-panel.active {
    display: block;
}

.rules-section {
    max-width: 1000px;
}

.rules-section h2 {
    margin-bottom: 4px;
}

.rules-section .simple-list {
    margin-top: 0;
}

.rules-section .simple-list li {
    font-size: 0.95rem;
    line-height: 1.7;
}

.rules-panel .divider {
    margin: 24px 0;
}

/* Scrollbar */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* Selection */

::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text);
}

/* Footer */

.site-footer-wrap {
    padding-bottom: 32px;
}

.site-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
    color: var(--muted-2);
    font-size: 0.82rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.site-footer a {
    color: var(--muted);
    transition: color var(--transition);
}

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

/* Utilities */

.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;
}

.text-muted   { color: var(--muted); }
.text-muted-2 { color: var(--muted-2); }
.text-accent  { color: var(--accent); }
.text-sm      { font-size: 0.875rem; }
.text-xs      { font-size: 0.78rem; }
.font-mono    { font-family: var(--font-mono); }
.font-medium  { font-weight: 500; }
.font-semibold{ font-weight: 600; }

/* Responsive */

@media (max-width: 1100px) {
    .header-grid {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 14px 0;
        gap: 12px;
    }

    .brand,
    .header-actions {
        justify-self: center;
    }

    .hero-inner,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        padding: 36px;
    }
}

@media (max-width: 760px) {
    .hero-inner {
        min-height: auto;
        padding: 28px 24px;
    }

    .hero-copy h1 {
        max-width: none;
    }

    .link-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .link-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .rules-tabs {
        flex-direction: column;
        align-items: stretch;
    }

    .rules-tab {
        width: 100%;
        justify-content: flex-start;
    }
}
/* Staff page */

.staff-hierarchy-summary {
    margin-bottom: 16px;
}

.staff-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.staff-summary-item {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    transition: border-color var(--transition), background var(--transition);
}

.staff-summary-item:hover {
    border-color: var(--border-hover);
    background: var(--panel-3);
}

.staff-summary-item strong {
    display: block;
    font-size: 0.96rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.staff-summary-item p {
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.staff-tier-panel {
    margin-bottom: 16px;
}

.staff-tier-panel:last-child {
    margin-bottom: 0;
}

.staff-tier-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.staff-tier-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.staff-tier-index {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--accent-dim);
    border: 1px solid rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
    flex-shrink: 0;
}

.staff-tier-heading h2 {
    margin-bottom: 6px;
}

.staff-tier-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.staff-profile-card {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.staff-profile-card:hover {
    border-color: var(--border-hover);
    background: var(--panel-3);
    transform: translateY(-2px);
}

.staff-profile-card.is-vacant {
    opacity: 0.88;
}

.staff-profile-avatar-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.staff-profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.staff-profile-body h3 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 6px;
}

.staff-profile-role {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 14px;
}

.staff-profile-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 980px) {
    .staff-summary-grid,
    .staff-tier-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    .staff-summary-grid,
    .staff-tier-grid {
        grid-template-columns: 1fr;
    }

    .staff-tier-heading {
        align-items: flex-start;
    }
}

/* Store page */

.store-main {
    margin-bottom: 16px;
}

.store-main-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
}

.store-main-content h2 {
    margin-bottom: 10px;
}

.store-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.store-info {
    display: grid;
    gap: 12px;
}

/* Categories */

.store-categories h2 {
    margin-bottom: 16px;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.store-card {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    transition: all var(--transition);
}

.store-card:hover {
    border-color: var(--border-hover);
    background: var(--panel-3);
    transform: translateY(-2px);
}

.store-card strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

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

/* Responsive */

@media (max-width: 980px) {
    .store-main-grid {
        grid-template-columns: 1fr;
    }

    .store-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 520px) {
    .store-grid {
        grid-template-columns: 1fr;
    }
}