@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&display=swap');

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

:root {
    --ink: #121212;
    --red: #f23322;
    --red-hover: #d92d1e;
    --cream: #f3f4ee;
    --muted: #858282;
    --white: #ffffff;
    --border: rgba(0, 0, 0, 0.1);
    --border-hover: rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Figtree', ui-sans-serif, system-ui, sans-serif;
    background-color: var(--cream);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== LAYOUT ========== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    display: none;
    flex-direction: column;
    width: 288px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    background: var(--white);
    border-right: 1px solid var(--border);
    z-index: 40;
}

.sidebar-logo {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.sidebar-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
}
.sidebar-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--red);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}
.sidebar-logo h1 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.2;
}
.sidebar-logo .logo-sub {
    font-size: 12px;
    color: var(--muted);
    font-weight: 400;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    overflow-y: auto;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    text-decoration: none;
    color: var(--muted);
    transition: all 0.15s;
    margin-bottom: 2px;
}
.sidebar-nav a:hover {
    background: rgba(243, 244, 238, 0.5);
    color: var(--ink);
}
.sidebar-nav a.active {
    background: var(--cream);
    color: var(--ink);
    font-weight: 500;
}
.sidebar-nav a .nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-nav a .nav-icon svg {
    width: 20px;
    height: 20px;
}
.sidebar-nav a .nav-num {
    color: var(--muted);
    margin-right: 4px;
}
.sidebar-nav a .external-icon {
    margin-left: auto;
    opacity: 0.2;
    flex-shrink: 0;
}
.sidebar-nav a .external-icon svg {
    width: 14px;
    height: 14px;
}

.sidebar-section {
    margin-top: 24px;
    margin-bottom: 8px;
    padding: 0 12px;
}
.sidebar-section p {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}
.sidebar-footer p {
    font-size: 12px;
    color: var(--muted);
}
.sidebar-footer a {
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
}
.sidebar-footer a:hover {
    color: var(--red);
}

/* Team dot indicators */
.team-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.team-dot-a { background: #4f46e5; }
.team-dot-b { background: #0891b2; }
.team-dot-t { background: #16a34a; }
.team-dot-bb { background: #d97706; }

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    margin-left: 0;
}

.content-area {
    padding: 32px 24px;
    max-width: 900px;
    margin: 0 auto;
}

/* ========== MOBILE NAV ========== */
.mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}
.mobile-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
}
.mobile-nav .mobile-logo {
    width: 32px;
    height: 32px;
    background: var(--red);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}
.mobile-nav .mobile-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.mobile-nav .mobile-title span {
    font-weight: 400;
    color: var(--muted);
}
.mobile-nav button {
    padding: 8px;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
}
.mobile-nav button:hover { color: var(--ink); }

.mobile-menu {
    display: none;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    text-decoration: none;
    color: var(--muted);
}
.mobile-menu a.active {
    background: var(--cream);
    color: var(--ink);
    font-weight: 500;
}
.mobile-menu .menu-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.mobile-menu .menu-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    padding: 4px 12px;
    margin-bottom: 4px;
}

/* ========== RESPONSIVE ========== */
@media (min-width: 1024px) {
    .sidebar { display: flex; }
    .main-content { margin-left: 288px; }
    .mobile-nav { display: none; }
    .mobile-menu { display: none !important; }
    .content-area { padding: 40px 48px; }
}

/* ========== TYPOGRAPHY ========== */
.page-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--red);
    margin-bottom: 8px;
}
.page-title {
    font-size: 30px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.page-desc {
    font-size: 18px;
    color: var(--muted);
    line-height: 1.6;
}
.page-updated {
    font-size: 13px;
    color: var(--muted);
    margin-top: 8px;
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 12px;
}

/* ========== CARDS ========== */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 12px;
}
.card h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}
.card p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}

.callout {
    background: var(--cream);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 12px;
}
.callout p {
    font-size: 14px;
    color: var(--ink);
    font-weight: 500;
    line-height: 1.6;
}

.highlight-bar {
    background: var(--cream);
    border-left: 3px solid var(--red);
    padding: 16px 20px;
    border-radius: 0 12px 12px 0;
    margin: 16px 0;
    font-size: 15px;
    font-style: italic;
    color: var(--ink);
}

/* ========== LISTS ========== */
.card ul { list-style: none; padding: 0; }
.card ul li {
    padding: 6px 0;
    padding-left: 24px;
    position: relative;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
}
.card ul li::before {
    content: "\2192";
    position: absolute;
    left: 0;
    top: 6px;
    color: var(--red);
    font-size: 14px;
    line-height: 1.5;
}

.bullet-list { list-style: none; padding: 0; }
.bullet-list li {
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
    font-size: 13px;
    color: var(--muted);
}
.bullet-list li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    top: 4px;
    color: var(--muted);
}

.checklist { list-style: none; padding: 0; }
.checklist li {
    padding: 10px 0;
    padding-left: 32px;
    position: relative;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 13px;
    width: 14px;
    height: 14px;
    border: 2px solid var(--border);
    border-radius: 3px;
}

/* ========== STEPS ========== */
.step-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 12px;
}
.step-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--cream);
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    flex-shrink: 0;
}
.step-body {
    margin-left: 40px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}
.step-body p { margin-bottom: 8px; }

.example-box {
    background: var(--cream);
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
    font-size: 13px;
}
.example-box .example-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
}

/* ========== TABLES ========== */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}
tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
}
tbody tr:last-child td { border-bottom: none; }

/* ========== BADGES ========== */
.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 3px 10px;
    border-radius: 9999px;
}
.badge-green { color: #16a34a; background: rgba(22, 163, 74, 0.1); }
.badge-amber { color: #d97706; background: rgba(217, 119, 6, 0.1); }
.badge-red { color: #dc2626; background: rgba(220, 38, 38, 0.1); }
.badge-muted { color: var(--muted); background: var(--cream); }

/* ========== GRIDS ========== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }

.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 24px; }
.meta-card {
    background: var(--cream);
    border-radius: 8px;
    padding: 16px;
}
.meta-card .meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 4px;
}
.meta-card .meta-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-box {
    background: var(--cream);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}
.stat-box .num { font-size: 20px; font-weight: 700; color: var(--ink); }
.stat-box .stat-label { font-size: 12px; color: var(--muted); }
.stat-box.wide { grid-column: span 2; }

.grid-2x3 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid-item {
    background: var(--cream);
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    color: var(--muted);
}
.grid-item strong { color: var(--ink); display: block; margin-bottom: 2px; }

/* ========== STORY CARDS ========== */
.story-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
}
.story-card .story-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
    color: var(--red);
}
.story-card p {
    font-size: 14px;
    color: var(--muted);
}

/* ========== SECTION NAV (anchor links) ========== */
.section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}
.section-nav a {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--red);
    background: rgba(242, 51, 34, 0.08);
    text-decoration: none;
    transition: all 0.15s;
}
.section-nav a:hover {
    background: var(--red);
    color: var(--white);
}

/* ========== SECTIONS ========== */
section { margin-bottom: 48px; }
section > h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 12px;
    margin-top: 24px;
}

/* ========== HEADER ========== */
.page-header {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

/* ========== FOOTER ========== */
.page-footer {
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.page-footer p {
    font-size: 13px;
    color: var(--muted);
}

/* ========== BACK LINK ========== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: 24px;
}
.back-link:hover { color: var(--ink); }

/* ========== GOOD/BAD COMPARISON ========== */
.good-bad {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    font-size: 13px;
    color: var(--muted);
}
.good-bad .label-bad { color: #dc2626; font-size: 11px; font-weight: 600; }
.good-bad .label-good { color: #16a34a; font-size: 11px; font-weight: 600; }
.good-bad .strikethrough { text-decoration: line-through; }

/* ========== RESOURCE CARD (home page) ========== */
.resource-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: var(--ink);
    transition: all 0.15s;
    margin-bottom: 12px;
}
.resource-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.resource-card .rc-inner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.resource-card .rc-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.resource-card .rc-body { flex: 1; min-width: 0; }
.resource-card .rc-title {
    font-size: 16px;
    font-weight: 600;
    transition: color 0.15s;
}
.resource-card:hover .rc-title { color: var(--red); }
.resource-card .rc-tagline {
    font-size: 14px;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.5;
}
.resource-card .rc-arrow {
    color: rgba(0,0,0,0.2);
    flex-shrink: 0;
    margin-top: 4px;
    transition: all 0.15s;
}
.resource-card:hover .rc-arrow {
    color: var(--red);
    transform: translateX(2px);
}

/* ========== AUTH GATE ========== */
.auth-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--cream);
}
.auth-box {
    text-align: center;
    max-width: 360px;
    padding: 24px;
}
.auth-box .auth-logo {
    width: 56px;
    height: 56px;
    background: var(--red);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 20px;
}
.auth-box h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--ink);
}
.auth-box .auth-desc {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 24px;
}
.auth-box input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    color: var(--ink);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    margin-bottom: 12px;
    transition: border-color 0.15s;
}
.auth-box input:focus {
    border-color: var(--red);
}
.auth-box button {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    background: var(--red);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}
.auth-box button:hover {
    background: var(--red-hover);
}
.auth-error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 12px;
    display: none;
}

/* ========== B-ROLL SECTIONS ========== */
.broll-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 12px;
}
.broll-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.broll-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}
.broll-subtitle {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
}

/* ========== QUESTIONNAIRE ========== */
.q-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 12px;
}
.q-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}
.q-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}
.q-section ul {
    list-style: none;
    padding: 0;
    margin-left: 40px;
}
.q-section ul li {
    padding: 6px 0;
    padding-left: 16px;
    position: relative;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
}
.q-section ul li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    top: 6px;
    color: var(--muted);
}

/* ========== HUB PAGE CARDS ========== */
.hub-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    text-decoration: none;
    color: var(--ink);
    transition: all 0.15s;
    margin-bottom: 8px;
}
.hub-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.hub-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
    border: none;
    padding: 0;
}
.hub-card:hover h3 { color: var(--red); }
.hub-card p { font-size: 13px; color: var(--muted); margin: 0; }
