@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');
@font-face {
    font-family: "GenesisMinecraft";
    src: url("https://cdn.jsdelivr.net/gh/IdreesInc/Minecraft-Font@v1.0/Minecraft.otf") format("opentype");
    font-display: swap;
    font-style: normal;
    font-weight: 400;
}

@font-face {
    font-family: "GenesisMinecraft";
    src: url("https://cdn.jsdelivr.net/gh/IdreesInc/Minecraft-Font@v1.0/Minecraft-Bold.otf") format("opentype");
    font-display: swap;
    font-style: normal;
    font-weight: 700;
}

@font-face {
    font-family: "GenesisMinecraft";
    src: url("https://cdn.jsdelivr.net/gh/IdreesInc/Minecraft-Font@v1.0/Minecraft-Bold.otf") format("opentype");
    font-display: swap;
    font-style: normal;
    font-weight: 900;
}
:root {
    --bg: #0c0714;
    --bg-panel: #16101f;
    --bg-panel-alt: #1c1428;
    --border: #362a4d;
    --border-bright: #4d3b70;

    --accent: #9b6dff;
    --accent-bright: #c9a4ff;
    --accent-dim: #5a4180;

    --text: #e7e0f7;
    --text-muted: #a89bc4;
    --text-faint: #6f6389;

    --done: #7fdca0;
    --progress: #f2c078;
    --planned: #8a7bab;

    --high: #ff8fa3;
    --medium: #f2c078;
    --low: #7fa8dc;

    --mono: 'GenesisMinecraft';
    --sans: 'Inter', system-ui, sans-serif;

    --radius: 3px;

    --offline: #e34067;
    --online: #7fdca0;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

html { background: var(--bg); }

body {
    margin: 0;
    background:
            radial-gradient(ellipse 900px 500px at 15% -10%, rgba(155, 109, 255, 0.14), transparent 60%),
            radial-gradient(ellipse 700px 500px at 100% 0%, rgba(155, 109, 255, 0.08), transparent 55%),
            var(--bg);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.55;
    min-height: 100vh;
}

a { color: inherit; }

::selection { background: var(--accent-dim); color: var(--text); }

/* ---------- Status bar (signature element) ---------- */

.statusbar {
    border-bottom: 1px solid var(--border);
    background: rgba(12, 7, 20, 0.75);
    backdrop-filter: blur(6px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.statusbar-inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-faint);
    flex-wrap: wrap;
}

.statusbar .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--offline);
    box-shadow: 0 0 8px var(--offline);
    flex-shrink: 0;
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.statusbar strong { color: var(--accent-bright); font-weight: 600; }
.statusbar .sep { color: var(--border-bright); }
.statusbar .cursor {
    display: inline-block;
    width: 7px;
    background: var(--accent);
    animation: blink 1.1s steps(1) infinite;
    margin-left: 1px;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Nav ---------- */

nav.tabs {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 2px;
    font-family: var(--mono);
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

nav.tabs a {
    text-decoration: none;
    color: var(--text-faint);
    padding: 14px 16px 12px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

nav.tabs a:hover { color: var(--text-muted); }

nav.tabs a.active {
    color: var(--accent-bright);
    border-bottom-color: var(--accent);
}

nav.tabs a .path { color: var(--text-faint); }
nav.tabs a.active .path { color: var(--accent-dim); }

/* ---------- Layout ---------- */

main {
    max-width: 980px;
    margin: 0 auto;
    padding: 56px 24px 96px;
}

.eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent-dim);
    letter-spacing: 0.04em;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.eyebrow::before { content: "#"; color: var(--accent); }

h1.page-title {
    font-family: var(--mono);
    font-size: clamp(28px, 4.5vw, 44px);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 6px;
    color: var(--text);
}

.page-sub {
    color: var(--text-muted);
    font-size: 15px;
    margin: 0 0 40px;
    max-width: 60ch;
}

section.block {
    margin-bottom: 40px;
}

/* ---------- Vision page ---------- */

.hero {
    border: 1px solid var(--border);
    background: linear-gradient(160deg, var(--bg-panel), var(--bg-panel-alt));
    border-radius: var(--radius);
    padding: 36px 32px;
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 90% 10%, rgba(155,109,255,0.18), transparent 55%);
    pointer-events: none;
}

.hero .server-name {
    font-family: var(--mono);
    font-size: clamp(30px, 5.5vw, 52px);
    font-weight: 700;
    color: var(--accent-bright);
    letter-spacing: 0.01em;
    margin: 0;
    text-shadow: 0 0 30px rgba(155,109,255,0.35);
}

.hero .tagline {
    color: var(--text-muted);
    font-size: 16px;
    margin: 10px 0 0;
    max-width: 55ch;
}

.hero .motd {
    margin-top: 20px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-faint);
    border-left: 2px solid var(--accent-dim);
    padding-left: 10px;
}

.mission {
    font-size: 17px;
    color: var(--text);
    max-width: 68ch;
    border-left: 2px solid var(--border-bright);
    padding-left: 18px;
}

.pillars {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.pillar {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    background: var(--bg-panel);
    transition: border-color 0.15s ease;
}

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

.pillar h3 {
    font-family: var(--mono);
    font-size: 14px;
    color: var(--accent-bright);
    margin: 0 0 8px;
}

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

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.stat {
    padding: 18px 16px;
    border-right: 1px solid var(--border);
    background: var(--bg-panel);
}
.stat:last-child { border-right: none; }

.stat .value {
    font-family: var(--mono);
    font-size: 20px;
    color: var(--text);
    font-weight: 600;
}
.stat .label {
    font-size: 14px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* ---------- Roadmap page ---------- */

.timeline {
    position: relative;
    padding-left: 26px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: linear-gradient(var(--border-bright), var(--border));
}

.phase {
    position: relative;
    margin-bottom: 34px;
}

.phase::before {
    content: "";
    position: absolute;
    left: -26px;
    top: 5px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid var(--bg);
    background: var(--planned);
}
.phase.in_progress::before { background: var(--progress); box-shadow: 0 0 10px rgba(242,192,120,0.5); }
.phase.done::before { background: var(--done); box-shadow: 0 0 10px rgba(127,220,160,0.5); }

.phase-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.phase-head h2 {
    font-family: var(--mono);
    font-size: 17px;
    margin: 0;
    color: var(--text);
}

.phase-time {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-faint);
}

.status-tag {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 2px;
    border: 1px solid;
    text-transform: uppercase;
    white-space: nowrap;
}
.status-tag.planned { color: var(--planned); border-color: var(--planned); }
.status-tag.in_progress { color: var(--progress); border-color: var(--progress); }
.status-tag.done { color: var(--done); border-color: var(--done); }

.phase-items {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.phase-items li {
    font-size: 14px;
    color: var(--text-muted);
    padding-left: 16px;
    position: relative;
}
.phase-items li::before {
    content: "›";
    position: absolute;
    left: 0;
    color: var(--accent-dim);
}

/* ---------- Tasks page ---------- */

.task-category {
    margin-bottom: 32px;
}

.task-category h2 {
    font-family: var(--mono);
    font-size: 15px;
    color: var(--accent-bright);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.task-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-panel);
    margin-bottom: 6px;
}

.task-check {
    width: 15px;
    height: 15px;
    border-radius: 3px;
    border: 1.5px solid var(--border-bright);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.task-row.done .task-check {
    background: var(--done);
    border-color: var(--done);
}
.task-row.done .task-check::after {
    content: "✓";
    font-size: 10px;
    color: var(--bg);
    font-weight: 700;
}
.task-row.in_progress .task-check { border-color: var(--progress); }
.task-row.in_progress .task-check::after {
    content: "";
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--progress);
}

.task-text {
    flex: 1;
    font-size: 14px;
    color: var(--text);
}
.task-row.done .task-text {
    color: var(--text-faint);
    text-decoration: line-through;
    text-decoration-color: var(--border-bright);
}

.priority-tag {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 2px;
}
.priority-tag.high { color: var(--high); background: rgba(255,143,163,0.1); }
.priority-tag.medium { color: var(--medium); background: rgba(242,192,120,0.1); }
.priority-tag.low { color: var(--low); background: rgba(127,168,220,0.1); }

/* ---------- Footer ---------- */

footer {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 24px 48px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-faint);
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
    .pillars { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(2) { border-right: none; }
    nav.tabs { overflow-x: auto; }
}

/* ---------- Focus states ---------- */

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

/* ---------- Rules page ---------- */

.rules-category {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-panel);
    margin-bottom: 12px;
    overflow: hidden;
}

.rules-category summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--mono);
    font-size: 14px;
    color: var(--accent-bright);
    user-select: none;
}
.rules-category summary::-webkit-details-marker { display: none; }

.rules-category summary::before {
    content: "▸";
    color: var(--accent-dim);
    margin-right: 10px;
    transition: transform 0.15s ease;
    display: inline-block;
}
.rules-category[open] summary::before { transform: rotate(90deg); }

.rules-category-count {
    font-size: 11px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rules-list {
    border-top: 1px solid var(--border);
}

.rule-row { border-bottom: 1px solid var(--border); }
.rule-row:last-child { border-bottom: none; }

.rule-row-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}
.rule-row.expandable .rule-row-head { cursor: pointer; }
.rule-row.expandable .rule-row-head:hover { background: var(--bg-panel-alt); }

.rule-index {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-faint);
    flex-shrink: 0;
}

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

.rule-detail {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0;
    padding: 0 16px 0 44px;
    font-size: 13px;
    color: var(--text-muted);
    transition: max-height 0.2s ease, opacity 0.2s ease, padding 0.2s ease;
}
.rule-row.open .rule-detail {
    max-height: 200px;
    opacity: 1;
    padding: 0 16px 14px 44px;
}