:root {
    --bg: #0f1115;
    --panel: #161923;
    --panel2: #1c2030;
    --border: #2a2f42;
    --text: #e7e9f0;
    --muted: #9aa1b5;
    --accent: #4f8cff;

    --edu: #22c55e;
    --edu-soft: rgba(34, 197, 94, 0.14);
    --ai: #8b5cf6;
    --ai-soft: rgba(139, 92, 246, 0.14);
    --market: #4f8cff;
    --market-soft: rgba(79, 140, 255, 0.14);
    --tools: #d4a017;
    --tools-soft: rgba(212, 160, 23, 0.14);
}

:root[data-theme="light"] {
    --bg: #f7f8fa;
    --panel: #ffffff;
    --panel2: #f1f3f6;
    --border: #e2e5ea;
    --text: #1a1d24;
    --muted: #6b7280;
    --accent: #2563eb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    display: grid;
    place-items: start center;
    padding: 32px 16px;
}

.hub {
    width: min(760px, 100%);
}

.breadcrumb {
    width: min(760px, 100%);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 14px;
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb .sep {
    color: var(--border);
}

.breadcrumb .current {
    color: var(--text);
    font-weight: 600;
}

/* ── Header: compact, left-aligned, content-first ─────────────────── */

.hub-header {
    padding: 4px 4px 26px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 26px;
}

.hub-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
}

.hub-header-top-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--panel2);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.theme-toggle .hidden {
    display: none;
}

.hub-mark {
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.04em;
    color: var(--text);
}

.hub-kicker {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--panel2);
}

.hub-title {
    margin: 0 0 12px;
    font-weight: 600;
    font-size: clamp(24px, 4.2vw, 32px);
    line-height: 1.22;
    letter-spacing: -0.01em;
    color: var(--text);
}

.hub-lead {
    margin: 0 0 20px;
    max-width: 58ch;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--muted);
}

.hub-header-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.hub-header-link {
    position: relative;
    min-width: 0;
    min-height: 154px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: #f4f7f3;
    text-decoration: none;
    isolation: isolate;
    transition: transform 160ms ease, border-color 160ms ease;
}

.hub-header-link:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.hub-header-link.is-disabled {
    cursor: default;
    opacity: 0.62;
}

.hub-header-link.is-disabled:hover {
    transform: none;
    border-color: var(--border);
}

.hub-header-link-art {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hub-header-link-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 15, 17, 0.02) 25%, rgba(8, 15, 17, 0.9) 100%);
}

.hub-header-link-art svg {
    display: block;
    width: 100%;
    height: 100%;
}

.hub-header-link-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 16px 42px 15px 16px;
}

.hub-header-link-copy strong {
    font-size: 17px;
    line-height: 1.2;
}

.hub-header-link-copy > span:last-child {
    max-width: 28ch;
    color: rgba(244, 247, 243, 0.72);
    font-size: 11.5px;
    line-height: 1.4;
}

.hub-header-link-label {
    color: #b9e4cb;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hub-header-link-arrow {
    position: absolute;
    right: 15px;
    bottom: 17px;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #fff;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Section label ────────────────────────────────────────────────── */

.hub-section-label {
    margin: 0 0 14px 4px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ── Cards: content fully visible, no interaction required ──────────── */

.hub-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hub-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hub-card[data-topic="edu"] { border-top: 2px solid var(--edu); }
.hub-card[data-topic="ai"] { border-top: 2px solid var(--ai); }
.hub-card[data-topic="market"] { border-top: 2px solid var(--market); }
.hub-card[data-topic="tools"] { border-top: 2px solid var(--tools); }

.hub-card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.hub-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
}

.hub-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

.hub-card[data-topic="edu"] .hub-icon { background: var(--edu-soft); color: var(--edu); }
.hub-card[data-topic="ai"] .hub-icon { background: var(--ai-soft); color: var(--ai); }
.hub-card[data-topic="market"] .hub-icon { background: var(--market-soft); color: var(--market); }
.hub-card[data-topic="tools"] .hub-icon { background: var(--tools-soft); color: var(--tools); }

.hub-card-heading {
    flex: 1;
    min-width: 0;
}

.hub-card-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--panel2);
    border: 1px solid var(--border);
    color: var(--muted);
    margin-bottom: 6px;
}

.hub-card[data-status="live"] .hub-card-badge {
    color: var(--accent);
    border-color: rgba(79, 140, 255, 0.4);
    background: rgba(79, 140, 255, 0.12);
}

.hub-card-title {
    margin: 0 0 2px;
    font-weight: 600;
    font-size: 17px;
    color: var(--text);
    line-height: 1.25;
}

.hub-card-sub {
    margin: 0;
    font-size: 12.5px;
    color: var(--muted);
}

.hub-card-content {
    display: flex;
    align-items: center;
    gap: 18px;
}

.hub-illustration {
    flex: 0 0 128px;
    width: 128px;
    height: 82px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--panel2);
}

.hub-illustration svg {
    width: 100%;
    height: 100%;
    display: block;
}

.hub-card-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hub-card-text p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
}

.hub-cta {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 7px 13px;
    border-radius: 8px;
    border: 1px solid var(--accent);
    color: #fff;
    background: var(--accent);
}

.hub-cta:hover {
    opacity: 0.9;
}

.hub-card[data-status="soon"] .hub-cta {
    color: var(--accent);
    border: 1px dashed var(--accent);
    background: transparent;
}

.hub-card[data-status="soon"] .hub-cta:hover {
    background: rgba(79, 140, 255, 0.12);
}

.hub-footer {
    padding: 24px 4px 4px;
    text-align: left;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.04em;
}

@media (max-width: 640px) {
    body {
        padding: 20px 12px;
    }

    .hub-card {
        padding: 16px 16px 18px;
    }

    .hub-header-links {
        grid-template-columns: 1fr;
    }

    .hub-title {
        font-size: 24px;
    }

    .hub-header-link {
        min-height: 132px;
    }

    .hub-card-content {
        flex-direction: column;
        align-items: stretch;
    }

    .hub-illustration {
        width: 100%;
        flex: 0 0 auto;
        height: 104px;
    }
}
