/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
    background: #0d1117;
    color: #e6edf3;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── Header / Nav ─── */
header {
    background: #161b22;
    border-bottom: 1px solid #30363d;
    padding: 0 1.5rem;
}

nav {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: relative;
}

.nav-brand a {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f0f6fc;
    text-decoration: none;
}

/* Hamburger toggle */
.nav-toggle { display: none; }

.nav-hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #8b949e;
    user-select: none;
}

nav .nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

nav .nav-links > li > a {
    color: #8b949e;
    text-decoration: none;
    font-size: 0.88rem;
    padding: 0.4rem 0.65rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

nav .nav-links > li > a:hover,
nav .nav-links > li > a.active {
    color: #58a6ff;
    background: rgba(88, 166, 255, 0.08);
}

/* ─── Dropdown ─── */
.dropdown { position: relative; }

.dropdown > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 4px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    vertical-align: middle;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1c2128;
    border: 1px solid #30363d;
    border-radius: 8px;
    min-width: 180px;
    padding: 0.4rem;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.dropdown-menu li { list-style: none; }

.dropdown-menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #c9d1d9;
    font-size: 0.88rem;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
    background: rgba(88, 166, 255, 0.12);
    color: #58a6ff;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    display: block;
}

/* ─── Main ─── */
main {
    flex: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

/* ─── Hero ─── */
.hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.hero h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #58a6ff, #bc8cff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1rem;
    color: #8b949e;
    max-width: 600px;
    margin: 0 auto;
}

.hero .subtitle {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #6e7681;
}

.hero .subtitle strong { color: #8b949e; }

/* ─── Cards (Home + Invite) ─── */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

a.card {
    text-decoration: none;
    display: block;
}

.card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 1.5rem;
    transition: border-color 0.2s, transform 0.2s;
}

a.card:hover {
    border-color: #58a6ff;
    transform: translateY(-2px);
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    color: #f0f6fc;
}

.card .by {
    font-size: 0.8rem;
    color: #6e7681;
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.9rem;
    color: #8b949e;
}

/* ─── Invite Grid ─── */
.invite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.invite-card {
    display: block;
    text-decoration: none;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.2s;
}

.invite-card:hover:not(.disabled) {
    border-color: #58a6ff;
}

.invite-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.invite-card h3 {
    font-size: 1.2rem;
    color: #f0f6fc;
    margin-bottom: 0.25rem;
}

.invite-card p {
    font-size: 0.85rem;
    color: #6e7681;
}

/* ─── Content Pages ─── */
.content-page { padding: 0.5rem 0; }

.content-page h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.last-updated {
    font-size: 0.85rem;
    color: #6e7681;
    margin-bottom: 2rem;
}

.content-page article h3 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #f0f6fc;
    border-bottom: 1px solid #30363d;
    padding-bottom: 0.5rem;
}

.content-page article h4 {
    font-size: 1.05rem;
    margin-top: 1.5rem;
    margin-bottom: 0.4rem;
    color: #e6edf3;
}

.content-page article p {
    margin-bottom: 1rem;
    color: #c9d1d9;
}

.content-page article ul,
.content-page article ol {
    margin: 0.5rem 0 1.25rem 1.5rem;
}

.content-page article li {
    margin-bottom: 0.35rem;
    color: #c9d1d9;
    line-height: 1.55;
}

.content-page article li strong { color: #f0f6fc; }

.content-page article blockquote {
    border-left: 3px solid #30363d;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #8b949e;
    font-style: italic;
}

/* ─── Page TOC (jump links at top of legal) ─── */
.page-toc {
    text-align: center;
    padding: 1rem 0 1.5rem;
    font-size: 0.95rem;
}

.page-toc a {
    color: #58a6ff;
    text-decoration: none;
}

.page-toc a:hover { text-decoration: underline; }

.page-toc .sep {
    color: #30363d;
    margin: 0 0.5rem;
}

/* ─── Bot Pages ─── */
.bot-page h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tag.foxhonk {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
    border: 1px solid rgba(88, 166, 255, 0.3);
}

.tag.seraphable {
    background: rgba(188, 140, 255, 0.15);
    color: #bc8cff;
    border: 1px solid rgba(188, 140, 255, 0.3);
}

.bot-tagline {
    font-size: 1rem;
    color: #8b949e;
    margin-bottom: 0.25rem;
}

/* ─── Sub Nav (bot info/features/skills tabs) ─── */
.sub-nav {
    display: flex;
    gap: 0.25rem;
    margin: 1.25rem 0 1.75rem;
    border-bottom: 1px solid #21262d;
    padding-bottom: 0;
}

.sub-nav a {
    color: #8b949e;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
}

.sub-nav a:hover { color: #c9d1d9; }

.sub-nav a.active {
    color: #f0f6fc;
    border-bottom-color: #58a6ff;
}

/* ─── Placeholder ─── */
.placeholder {
    color: #484f58;
    font-style: italic;
    text-align: center;
    padding: 4rem 0;
}

/* ─── Note / Callout ─── */
.note {
    font-size: 0.9rem;
    color: #8b949e;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1rem;
    margin: 1.25rem 0;
    line-height: 1.55;
}

/* ─── Footer ─── */
footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
    color: #484f58;
    border-top: 1px solid #21262d;
}

footer a {
    color: #8b949e;
    text-decoration: none;
}

footer a:hover { color: #58a6ff; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    /* Show hamburger */
    .nav-hamburger { display: block; }

    .nav-links {
        display: none !important;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #161b22;
        border-bottom: 1px solid #30363d;
        padding: 0.5rem;
        gap: 0.15rem;
        z-index: 200;
    }

    .nav-toggle:checked ~ .nav-links {
        display: flex !important;
    }

    .nav-links > li { width: 100%; }

    .nav-links > li > a {
        display: block;
        width: 100%;
        padding: 0.6rem 0.75rem;
    }

    /* Flatten dropdowns on mobile */
    .dropdown-menu {
        display: block;
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0 0 0 1rem;
        min-width: auto;
    }

    .dropdown > a::after { display: none; }

    .sub-nav {
        flex-wrap: wrap;
    }

    .sub-nav a {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    main { padding: 1.25rem 1rem; }
}

@media (max-width: 480px) {
    .hero h2 { font-size: 1.5rem; }

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

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

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