/* CONTINUED FROM PART 1 — FULL FILE INCLUDED HERE */

:root {
    --mb-navy: #0b1020;
    --mb-blue: #2563eb;
    --mb-blue-light: #e0edff;
    --mb-gray: #f8fafc;
    --mb-border: #e2e8f0;
    --mb-text-secondary: #6b7280;
    --bg-light: #ffffff;
    --bg-dark: #020617;
}

/* Base */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Background mode */
body[data-bgmode="light"] {
    background-color: var(--bg-light) !important;
}
body[data-bgmode="dark"] {
    background-color: var(--bg-dark) !important;
    color: #f8fafc !important;
}

/* FRAME SYSTEM */

/* B1 — Thin border */
body[data-frame="b1"] .mb-frame {
    border: 1px solid var(--mb-border);
    padding: 0;
    min-height: 100vh;
    box-sizing: border-box;
}

/* B2 — Thick padded frame */
body[data-frame="b2"] .mb-frame {
    border: 12px solid var(--mb-border);
    padding: 12px;
    min-height: 100vh;
    box-sizing: border-box;
    background: var(--mb-gray);
}

/* B3 — Shadowed container */
body[data-frame="b3"] .mb-frame {
    padding: 24px;
    min-height: 100vh;
    box-sizing: border-box;
    background: var(--mb-gray);
}
body[data-frame="b3"] .mb-frame > .wrapper {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    overflow: hidden;
}

/* Icon rail */
.mb-icon-rail {
    width: 56px;
    background: var(--mb-navy);
    color: #cbd5e1;
    padding: 12px 0;
    position: sticky;
    top: 0;
    height: 100vh;
}
.mb-rail-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 6px 0;
    border-radius: 999px;
    color: #cbd5e1;
    text-decoration: none;
}
.mb-rail-icon.active,
.mb-rail-icon:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* Main page */
.main-page {
    min-height: 100vh;
}

/* Navbar */
.mb-navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--mb-border);
}
.mb-navbar .nav-link {
    color: #0f172a;
}
.mb-navbar .nav-link:hover {
    color: var(--mb-blue);
}
.btn-mb-subscribe {
    background: var(--mb-blue);
    color: #fff;
    border-radius: 999px;
    padding: 8px 18px;
    font-weight: 600;
}
.btn-mb-subscribe:hover {
    background: #1d4ed8;
    color: #fff;
}

/* Page container */
.mb-page {
    padding: 24px;
}

/* Section frame */
.mb-section-frame {
    border: 1px solid var(--mb-border);
    border-radius: 18px;
    padding: 24px;
    background: #fff;
    margin-bottom: 32px;
}

/* Debug panel */
.mb-debug-panel {
    border: 1px dashed var(--mb-border);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.85rem;
    background: #f9fafb;
}
.mb-debug-panel h6 {
    margin-bottom: 8px;
    font-weight: 600;
}

/* Hero */
.mb-hero {
    background: var(--mb-blue);
    color: #fff;
    border-radius: 18px;
    padding: 32px 28px;
}
.mb-hero-title {
    font-size: 2.1rem;
}
.mb-hero-subtitle {
    font-size: 1rem;
    max-width: 420px;
}
.mb-hero-form input {
    border-radius: 999px;
}
.btn-mb-hero {
    background: #0f172a;
    color: #fff;
    border-radius: 999px;
    padding: 10px 22px;
    font-weight: 600;
}
.btn-mb-hero:hover {
    background: #020617;
}

/* Feature cards */
.mb-feature-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--mb-border);
    overflow: hidden;
}
.mb-feature-image {
    height: 220px;
    background: linear-gradient(135deg, #2563eb, #0f172a);
}
.mb-feature-image.small {
    height: 140px;
}
.mb-feature-body {
    padding: 16px 18px;
}
.mb-tag {
    font-size: .75rem;
    font-weight: 700;
    color: var(--mb-blue);
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* Latest cards */
.mb-latest-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--mb-border);
    padding: 12px 14px;
}

/* Wedges section */
.mb-wedges .card-wedge {
    background: #fff;
    border: 1px solid var(--mb-border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

/* Footer */
.mb-footer {
    background: var(--mb-blue-light);
    border-top: 1px solid var(--mb-border);
}
.mb-footer-list li a {
    color: #0f172a;
    text-decoration: none;
    font-size: 0.9rem;
}
.mb-footer-list li a:hover {
    color: var(--mb-blue);
}

/* Theme switching */
body[data-theme="default"] .mb-hero {
    background: #0f172a;
}
body[data-theme="default"] .mb-navbar {
    background: #f8fafc;
}
body[data-theme="default"] .mb-icon-rail {
    background: #111827;
}
