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

:root {
    --navy: #182B70;
    --navy-mid: #243F9F;
    --navy-soft: #E9EEF9;
    --navy-wash: #F4F7FD;
    --gold: #E7BB18;
    --gold-dark: #B88E07;
    --gold-soft: #FFF7D8;
    --ink: #20263A;
    --muted: #68718F;
    --muted-light: #A4ABC0;
    --line: #E8EBF3;
    --panel: #FFFFFF;
    --page: #F7F8FB;
    --sidebar-w: 240px;
    --radius-sm: 8px;
    --radius-md: 13px;
    --radius-lg: 18px;
    --radius-xl: 26px;
    --shadow-card: 0 12px 30px rgba(24,43,112,0.08);
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--page);
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { display: flex; }
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--panel);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    padding: 0 0 1.4rem;
}

.sidebar-logo {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 72px;
}

.logo-symbol, .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--navy-mid), var(--gold));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.sk-name { font-size: 14px; font-weight: 700; color: var(--navy); letter-spacing: -0.01em; }
.sk-sub { font-size: 9px; color: var(--muted-light); letter-spacing: 0.02em; margin-top: 1px; }
.sidebar-nav { padding: 1rem 0.75rem; flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-section-label { font-size: 10px; font-weight: 700; color: var(--muted-light); letter-spacing: 0.1em; text-transform: uppercase; padding: 0.75rem 0.75rem 0.25rem; margin-top: 0.5rem; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 0.62rem 0.75rem; border-radius: var(--radius-sm); color: var(--muted); font-size: 13.5px; font-weight: 500; transition: background 0.15s ease, color 0.15s ease; }
.nav-item:hover { background: var(--navy-wash); color: var(--navy); }
.nav-item.active { background: var(--navy-soft); color: var(--navy); font-weight: 700; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-count { margin-left: auto; color: var(--gold-dark); font-size: 11px; font-weight: 700; }
.sidebar-user { margin: 0 0.75rem; padding: 0.85rem 0.9rem; background: var(--navy-wash); border: 1px solid var(--line); border-radius: var(--radius-md); display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--navy-mid), var(--gold)); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: white; flex-shrink: 0; }
.user-name { font-size: 12.5px; font-weight: 700; color: var(--navy); }
.user-plan { font-size: 10.5px; color: var(--muted-light); }
.user-plan span { color: var(--gold-dark); font-weight: 700; }

.main { margin-left: var(--sidebar-w); flex: 1; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { background: rgba(255,255,255,0.92); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); padding: 0.85rem 2rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 50; }
.search-bar { flex: 1; max-width: 480px; display: flex; align-items: center; background: var(--page); border: 1px solid var(--line); border-radius: 999px; padding: 0.52rem 1rem; gap: 8px; transition: border-color 0.15s ease, background 0.15s ease; }
.search-bar:focus-within { border-color: var(--navy-mid); background: #fff; }
.search-bar input { width: 100%; background: none; border: 0; outline: 0; font-size: 13.5px; color: var(--ink); }
.search-bar input::placeholder { color: var(--muted-light); }
.search-bar svg { width: 16px; height: 16px; color: var(--muted-light); }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar-btn, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0.58rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease; }
.topbar-btn:hover, .btn:hover { border-color: #C8D0E5; color: var(--navy); }
.topbar-btn.primary, .btn.primary { background: var(--navy); color: white; border-color: var(--navy); }
.topbar-btn.primary:hover, .btn.primary:hover { background: var(--navy-mid); color: white; }
.btn.ghost { background: #fff; color: var(--navy); }
.topbar-btn svg { width: 15px; height: 15px; }
.content { padding: 2.5rem 2rem 3rem; max-width: 1100px; width: 100%; }

.hero { background: radial-gradient(circle at 80% 15%, rgba(231,187,24,0.18), transparent 28%), linear-gradient(135deg, var(--navy) 0%, #253F9B 100%); border-radius: var(--radius-xl); padding: 3rem 3.4rem; margin-bottom: 2rem; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 18px; border: 1px solid rgba(255,255,255,0.08); border-radius: 22px; pointer-events: none; }
.hero-mark { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 1.05rem; position: relative; z-index: 1; }
.hero-mark svg { width: 16px; height: 16px; }
.hero h1 { font-family: 'Playfair Display', serif; font-size: 2.58rem; color: white; line-height: 1.13; margin-bottom: 0.7rem; position: relative; z-index: 1; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero-sub { font-size: 15px; color: rgba(255,255,255,0.68); margin-bottom: 1.9rem; position: relative; z-index: 1; }
.input-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; position: relative; z-index: 1; margin-bottom: 1.5rem; }
.input-card { background: rgba(255,255,255,0.075); border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius-lg); padding: 1.05rem 1.15rem; display: flex; align-items: flex-start; gap: 12px; color: inherit; text-align: left; transition: background 0.15s ease, border-color 0.15s ease; }
.input-card:hover { background: rgba(255,255,255,0.11); border-color: rgba(255,255,255,0.26); }
.input-card-icon { width: 36px; height: 36px; border-radius: 12px; background: rgba(231,187,24,0.18); border: 1px solid rgba(231,187,24,0.28); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.input-card-icon svg { width: 19px; height: 19px; color: var(--gold); }
.card-title { font-size: 13.5px; font-weight: 700; color: white; margin-bottom: 2px; }
.card-desc { font-size: 11.5px; color: rgba(255,255,255,0.5); }

.ai-chat { background: rgba(255,255,255,0.075); border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius-lg); padding: 1rem 1.2rem; position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; }
.ai-chat.light { background: var(--panel); border-color: var(--line); }
.ai-mark { width: 26px; height: 26px; border-radius: 50%; background: rgba(231,187,24,0.18); border: 1px solid rgba(231,187,24,0.28); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ai-mark svg { width: 14px; height: 14px; color: var(--gold); }
.ai-label { font-size: 11px; font-weight: 700; color: var(--gold); letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }
.ai-input { flex: 1; background: none; border: 0; outline: 0; font-size: 14px; color: rgba(255,255,255,0.86); min-width: 0; }
.ai-chat.light .ai-input { color: var(--ink); }
.ai-input::placeholder { color: rgba(255,255,255,0.38); }
.ai-chat.light .ai-input::placeholder { color: var(--muted-light); }
.ai-send-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s ease; flex-shrink: 0; color: var(--navy); font-weight: 900; }
.ai-send-btn:hover { background: var(--gold-dark); }
.ai-send-btn svg { width: 14px; height: 14px; color: var(--navy); }
.prompt-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 0.75rem; position: relative; z-index: 1; }
.prompt-chip { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.13); border-radius: 999px; padding: 5px 12px; font-size: 12px; color: rgba(255,255,255,0.62); cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease; }
.prompt-chip:hover { background: rgba(231,187,24,0.12); border-color: rgba(231,187,24,0.25); color: var(--gold); }
.prompt-row.dark .prompt-chip { background: var(--navy-wash); border-color: var(--line); color: var(--muted); }

.streak-banner { display: flex; align-items: center; gap: 14px; background: var(--gold-soft); border: 1px solid rgba(184,142,7,0.18); border-radius: var(--radius-md); padding: 0.95rem 1.25rem; margin-bottom: 2rem; }
.streak-symbol { width: 38px; height: 38px; border-radius: 12px; background: #fff; border: 1px solid rgba(184,142,7,0.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.streak-symbol svg { width: 20px; height: 20px; color: var(--gold-dark); }
.streak-title { font-size: 13.5px; font-weight: 700; color: var(--navy); }
.streak-desc { font-size: 12px; color: var(--muted); }
.streak-cta { margin-left: auto; background: var(--gold); border: 0; border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 700; color: var(--navy); }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 2rem; }
.stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 6px; }
.stat-card-top { display: flex; align-items: center; justify-content: space-between; }
.stat-card-label { font-size: 12px; color: var(--muted-light); font-weight: 600; }
.stat-card-icon { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--navy-wash); }
.stat-card-icon svg { width: 15px; height: 15px; color: var(--navy); }
.stat-card-value { font-size: 1.5rem; font-weight: 700; color: var(--navy); }
.stat-card-delta { font-size: 11.5px; color: var(--muted-light); }
.stat-card-delta span { color: #168351; font-weight: 700; }

.section-header { display: flex; align-items: center; margin-bottom: 1rem; gap: 10px; }
.section-title { font-size: 1rem; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ''; width: 4px; height: 18px; background: var(--gold); border-radius: 4px; display: inline-block; }
.section-link { margin-left: auto; font-size: 12.5px; color: var(--navy-mid); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.section-link svg { width: 13px; height: 13px; }
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1.25rem; }
.pill { padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; }
.pill.active { background: var(--navy); color: white; border-color: var(--navy); }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 2rem; }
.study-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; transition: border-color 0.16s ease, box-shadow 0.16s ease; display: block; }
.study-card:hover { border-color: #CCD3E5; box-shadow: var(--shadow-card); }
.card-thumb { height: 132px; position: relative; overflow: hidden; background: linear-gradient(135deg, #F7F9FE, #EEF3FD); display: flex; align-items: center; justify-content: center; }
.subject-art-letter { width: 74px; height: 74px; border-radius: 22px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--navy), var(--gold)); color: white; font-weight: 800; font-size: 1.35rem; }
.card-body { padding: 1rem 1.1rem; }
.card-subject { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-light); margin-bottom: 5px; }
.card-name { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 8px; line-height: 1.3; }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted-light); }
.card-footer { padding: 0.62rem 1.1rem; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.card-avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--navy-soft); display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; color: var(--navy); }
.card-author { font-size: 11px; color: var(--muted-light); }
.card-score { margin-left: auto; font-size: 11.5px; color: var(--gold-dark); font-weight: 700; display: flex; align-items: center; gap: 3px; }
.bottom-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; margin-bottom: 2rem; }
.recent-panel, .progress-panel, .tool-panel, .side-panel, .favorite-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; }
.recent-list, .progress-list { display: flex; flex-direction: column; gap: 2px; margin-top: 1rem; }
.recent-item { display: flex; align-items: center; gap: 10px; padding: 0.65rem 0.5rem; border-radius: var(--radius-sm); transition: background 0.12s ease; }
.recent-item:hover { background: var(--navy-wash); }
.recent-icon { width: 32px; height: 32px; border-radius: 9px; background: var(--navy-wash); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--navy); font-weight: 700; }
.recent-icon svg { width: 17px; height: 17px; color: var(--navy); }
.recent-name { font-size: 13px; font-weight: 700; color: var(--navy); }
.recent-meta { font-size: 11.5px; color: var(--muted-light); }
.recent-type { margin-left: auto; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; flex-shrink: 0; background: var(--navy-wash); color: var(--navy); }
.progress-list { gap: 14px; }
.progress-item { display: flex; align-items: center; gap: 12px; }
.progress-subject-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--navy-wash); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--navy); font-weight: 800; }
.progress-info { flex: 1; }
.progress-name { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 5px; }
.progress-bar-bg { height: 5px; background: var(--line); border-radius: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--navy-mid), var(--gold)); }
.progress-pct { font-size: 12px; font-weight: 700; color: var(--muted); flex-shrink: 0; }

.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-heading h1 { font-size: 1.8rem; color: var(--navy); margin-bottom: 0.25rem; }
.page-heading p, .muted { color: var(--muted); font-size: 14px; line-height: 1.6; }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; }
.chat-panel { min-height: 620px; display: flex; flex-direction: column; }
.chat-output { min-height: 420px; max-height: 620px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 0.5rem; }
.chat-output.compact { min-height: 0; max-height: 240px; margin-top: 0.75rem; color: white; }
.chat-bubble { max-width: 82%; padding: 0.8rem 0.95rem; border-radius: 15px; font-size: 14px; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.chat-bubble.user { align-self: flex-end; background: var(--navy); color: white; }
.chat-bubble.assistant { align-self: flex-start; background: var(--navy-wash); color: var(--ink); border: 1px solid var(--line); }
.hero .chat-bubble.assistant { background: rgba(255,255,255,0.12); color: white; border-color: rgba(255,255,255,0.16); }
.save-message { margin-top: 0.55rem; border: 1px solid var(--line); background: white; border-radius: 999px; padding: 4px 10px; font-size: 11px; color: var(--navy); font-weight: 700; }
.side-panel h2 { color: var(--navy); font-size: 1rem; margin-bottom: 0.8rem; margin-top: 1rem; }
.side-panel h2:first-child { margin-top: 0; }
.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-list a { display: flex; flex-direction: column; gap: 2px; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--navy-wash); color: var(--navy); font-size: 13px; font-weight: 700; }
.mini-list span { color: var(--muted-light); font-size: 11px; font-weight: 600; }
.stack-form { display: flex; flex-direction: column; gap: 1rem; }
.stack-form label, .form-label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 800; color: var(--navy); }
.stack-form input, .stack-form select, .stack-form textarea, .inline-form input { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.78rem 0.85rem; outline: 0; background: #fff; color: var(--ink); width: 100%; }
.stack-form textarea { resize: vertical; line-height: 1.55; }
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus, .inline-form input:focus { border-color: var(--navy-mid); box-shadow: 0 0 0 3px rgba(36,63,159,0.08); }
.form-grid { display: grid; gap: 1rem; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.check-grid label { display: flex; align-items: center; gap: 7px; padding: 0.7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--navy-wash); font-size: 12px; color: var(--ink); font-weight: 700; }
.inline-form { display: flex; gap: 0.75rem; align-items: center; }
.compact-form { gap: 0.75rem; }
.review-result, .quiz-result, [data-course-result], [data-course-complete-result], [data-calendar-result] { margin-top: 1rem; padding: 1rem; border-radius: var(--radius-md); background: var(--navy-wash); color: var(--ink); line-height: 1.6; display: none; white-space: pre-wrap; }
.review-result.visible, .quiz-result.visible, [data-course-result].visible, [data-course-complete-result].visible, [data-calendar-result].visible { display: block; }
.quiz-question { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1rem; margin-bottom: 1rem; }
.quiz-question legend { color: var(--navy); font-weight: 800; padding: 0 0.35rem; }
.quiz-question label { display: block; margin-top: 0.65rem; color: var(--ink); }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.group-head h2 { color: var(--navy); }
.group-messages { min-height: 180px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1rem; margin-bottom: 1rem; display: flex; flex-direction: column; gap: 8px; background: var(--navy-wash); }
.mini-section { margin-top: 1.5rem; }
.mini-section h3 { color: var(--navy); margin-bottom: 0.8rem; }
.favorite-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.favorite-card h2 { color: var(--navy); font-size: 1.05rem; margin-bottom: 0.6rem; }
.favorite-card p { color: var(--ink); line-height: 1.6; font-size: 14px; }
.course-hero { background: linear-gradient(135deg, var(--navy), var(--navy-mid)); color: white; border-radius: var(--radius-xl); padding: 2.2rem; margin-bottom: 1.5rem; display: flex; justify-content: space-between; gap: 1rem; }
.course-hero h1 { font-family: 'Playfair Display', serif; font-size: 2.2rem; margin-bottom: 0.6rem; }
.course-hero p { color: rgba(255,255,255,0.72); line-height: 1.6; max-width: 720px; }
.course-rating { color: var(--gold); font-weight: 800; }
.course-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 1.5rem; align-items: start; }
.course-steps { display: flex; flex-direction: column; gap: 1rem; }
.course-step { display: grid; grid-template-columns: 42px 1fr; gap: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem; }
.step-number { width: 34px; height: 34px; border-radius: 10px; background: var(--gold-soft); color: var(--gold-dark); display: flex; align-items: center; justify-content: center; font-weight: 900; }
.course-step h2 { color: var(--navy); margin-bottom: 0.45rem; }
.course-step p { color: var(--ink); line-height: 1.65; }
.clean-list { margin: 0.8rem 0 0 1.1rem; color: var(--ink); line-height: 1.6; }
.sticky-side { position: sticky; top: 92px; }
.mobile-panel { display: grid; grid-template-columns: 1fr 220px; gap: 2rem; align-items: center; }
.phone-preview { min-height: 360px; border-radius: 30px; border: 10px solid var(--ink); background: linear-gradient(180deg, var(--navy), var(--navy-mid)); color: white; padding: 2rem 1.2rem; display: flex; flex-direction: column; gap: 1rem; justify-content: center; text-align: center; }
.phone-preview span { width: 54px; height: 54px; border-radius: 16px; background: var(--gold); color: var(--navy); display: flex; align-items: center; justify-content: center; margin: 0 auto; font-weight: 900; }

.public-header { min-height: 72px; padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.92); position: sticky; top: 0; z-index: 40; backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); }
.brand strong { display: block; font-size: 15px; }
.brand small { display: block; font-size: 10px; color: var(--muted-light); }
.public-nav { display: flex; align-items: center; gap: 1rem; font-size: 13px; font-weight: 700; color: var(--muted); }
.nav-cta { background: var(--navy); color: white; border-radius: 999px; padding: 0.55rem 0.9rem; }
.public-main { max-width: 1180px; margin: 0 auto; padding: 3rem 2rem; }
.public-main.narrow { max-width: 850px; }
.public-hero { display: grid; grid-template-columns: 1fr 440px; gap: 3rem; align-items: center; min-height: calc(100vh - 160px); }
.hero-copy h1 { font-family: 'Playfair Display', serif; font-size: 4rem; color: var(--navy); line-height: 1; margin-bottom: 1rem; }
.hero-copy p { color: var(--muted); font-size: 1.05rem; line-height: 1.7; max-width: 620px; }
.hero-actions { display: flex; gap: 0.8rem; margin-top: 1.6rem; }
.hero-dashboard-preview { min-height: 360px; border-radius: var(--radius-xl); background: linear-gradient(135deg, var(--navy), var(--navy-mid)); padding: 1.2rem; box-shadow: var(--shadow-card); }
.preview-top { height: 46px; border-radius: 14px; background: rgba(255,255,255,0.16); margin-bottom: 1rem; }
.preview-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.preview-grid div { height: 74px; border-radius: 14px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.14); }
.preview-chat { margin-top: 1rem; border-radius: 18px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18); padding: 1rem; color: white; }
.preview-chat span { color: var(--gold); font-size: 11px; font-weight: 900; }
.public-band { margin-top: 2rem; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.feature-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.2rem; }
.feature-card strong { color: var(--navy); }
.feature-card p { color: var(--muted); margin-top: 0.45rem; line-height: 1.6; font-size: 14px; }
.text-page { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem; }
.text-page h1 { color: var(--navy); font-size: 2.2rem; margin-bottom: 1rem; }
.text-page h2 { color: var(--navy); margin: 1.5rem 0 0.5rem; }
.text-page p { color: var(--ink); line-height: 1.75; margin-bottom: 0.8rem; }
.text-page code { background: var(--navy-wash); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.public-footer { margin-top: 2rem; padding: 2rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 2rem; color: var(--muted); }
.public-footer strong { color: var(--navy); }
.public-footer p { margin-top: 0.35rem; max-width: 420px; }
.public-footer nav { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 13px; font-weight: 700; }
.auth-wrap { min-height: calc(100vh - 150px); display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-wrap.wide { align-items: flex-start; }
.auth-card { width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 2rem; box-shadow: var(--shadow-card); }
.onboarding-card { width: min(960px, 100%); }
.auth-card h1 { color: var(--navy); font-size: 2rem; margin-bottom: 0.5rem; }
.auth-card p { color: var(--muted); line-height: 1.6; margin-bottom: 1.2rem; }
.oauth-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-bottom: 1rem; }
.oauth-row a { border: 1px solid var(--line); border-radius: 999px; padding: 0.65rem; text-align: center; font-size: 13px; font-weight: 800; color: var(--navy); background: var(--navy-wash); }
.auth-switch { text-align: center; margin-top: 1rem; font-size: 13px; }
.auth-switch a { color: var(--navy); font-weight: 800; }
.flash { margin: 1rem auto 0; max-width: 900px; border-radius: var(--radius-md); padding: 0.85rem 1rem; font-weight: 700; font-size: 13px; }
.flash.success { background: #EAF8F0; color: #12613D; border: 1px solid #BFE8CF; }
.flash.error { background: #FFF1F0; color: #9A251F; border: 1px solid #F3C2BD; }
.app-flash { margin: 1rem 2rem 0; }

@media (max-width: 980px) {
    .sidebar { display: none; }
    .main { margin-left: 0; }
    .content { padding: 1.5rem; max-width: none; }
    .input-cards, .cards-grid, .stats-row, .bottom-grid, .tool-grid, .course-layout, .public-hero, .feature-grid, .favorite-grid, .mobile-panel { grid-template-columns: 1fr; }
    .topbar-actions { display: none; }
    .hero { padding: 2rem 1.4rem; border-radius: var(--radius-lg); }
    .hero h1 { font-size: 2.15rem; }
    .form-grid.two, .form-grid.three, .check-grid { grid-template-columns: 1fr; }
    .public-header { padding: 0 1rem; }
    .public-nav { gap: 0.6rem; font-size: 12px; flex-wrap: wrap; justify-content: flex-end; }
    .hero-copy h1 { font-size: 3rem; }
    .public-footer { flex-direction: column; }
    .streak-banner { align-items: flex-start; }
    .streak-cta { margin-left: 0; }
    .chat-bubble { max-width: 96%; }
}
