/* Area selection is a browsing preference, independent of account or plan. */
[hidden] { display: none !important; }
body:not([data-audience="teacher"]) #teacher-dashboard,
body:not([data-audience="student"]) #student-dashboard,
body[data-audience="student"] #audience-choice,
body[data-audience="teacher"] #audience-choice { display: none; }
body:not([data-audience="teacher"]) [data-teacher-nav],
body:not([data-audience="student"]) [data-student-nav],
body:not([data-audience="teacher"]) #guest-upsell { display: none !important; }
.audience-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 24px; border-bottom: 1px solid #e2e8f0; background: #fff; }
.audience-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: #f1f5f9; }
.audience-switch button { min-height: 36px; padding: 6px 17px; border-radius: 9px; font-size: 13px; font-weight: 700; color: #64748b; }
.audience-switch button[aria-pressed="true"] { color: #4338ca; background: white; box-shadow: 0 2px 6px #0f172a12; }
.audience-hint { font-size: 12px; color: #64748b; }
.audience-page { --ink: #17233e; --muted: #64748b; --surface: #fff; --line: #e2e8f0; color: var(--ink); padding-top: 18px; }
.audience-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; color: #6366f1; margin-bottom: 12px; }
.audience-page h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; line-height: 1.18; letter-spacing: -.035em; }
.audience-lead { font-size: 16px; line-height: 1.75; color: var(--muted); max-width: 610px; margin-top: 14px; }
.audience-intro { text-align: center; padding: 0 0 10px; }
.audience-intro h1 { font-size: clamp(30px, 4vw, 40px); }
#audience-choice { padding-top: 0; }
.audience-intro .audience-lead { margin-left: auto; margin-right: auto; }
.audience-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 24px; }
.audience-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 26px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); text-align: left; transition: border-color .18s, transform .18s, box-shadow .18s; }
.audience-card:hover { border-color: #a5b4fc; transform: translateY(-3px); box-shadow: 0 12px 32px #1e293b0a; }
.audience-card.student { background: linear-gradient(135deg, #eef2ff, #fff 75%); border-color: #c7d2fe; }
.audience-icon { width: 50px; height: 50px; border-radius: 15px; display: flex; align-items: center; justify-content: center; background: #e0e7ff; color: #4f46e5; font-size: 22px; }
.audience-card.teacher .audience-icon { background: #fff2e5; color: #ea7a16; }
.audience-card h2 { font-size: 24px; font-weight: 800; letter-spacing: -.025em; }
.audience-card p { color: var(--muted); font-size: 14px; line-height: 1.75; margin-top: 8px; }
.audience-card ul { color: var(--muted); font-size: 13px; display: grid; gap: 10px; }
.audience-card li i { color: #6366f1; margin-right: 8px; }
.audience-cta { display: inline-flex; gap: 10px; align-items: center; padding: 13px 20px; border-radius: 12px; font-size: 14px; font-weight: 750; background: #4f46e5; color: white; margin-top: auto; min-height: 46px; }
.audience-card.teacher .audience-cta { background: #17233e; }
.audience-footnote { margin-top: 22px; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.8; }
.student-topline { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.student-topline h1 { font-size: clamp(28px, 3vw, 38px); }
.student-secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: 13px; font-weight: 700; min-height: 44px; }
.student-secondary:hover { border-color: #a5b4fc; }
.student-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 26px; }
.student-stat { border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; background: var(--surface); }
.student-stat strong { display: block; font-size: 26px; line-height: 1.2; font-weight: 800; }
.student-stat span { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
.student-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 15px; }
.student-section-heading h2, .student-ai h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.student-section-heading p { font-size: 13px; color: var(--muted); margin-top: 5px; }
.student-tag { white-space: nowrap; font-size: 11px; font-weight: 700; border-radius: 30px; background: #eaf8f2; color: #168264; padding: 6px 10px; }
.student-demos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.student-demo { background: var(--surface); border: 1px solid var(--line); padding: 23px; border-radius: 19px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.student-demo h3 { font-size: 17px; font-weight: 800; }
.student-demo p { font-size: 12px; color: var(--muted); line-height: 1.7; }
.student-demo button { margin-top: auto; width: 100%; }
.student-demo .audience-icon { width: 42px; height: 42px; font-size: 18px; }
.student-demo:nth-child(2) .audience-icon { background: #ffedd5; color: #c76a1b; }
.student-demo:nth-child(3) .audience-icon { background: #d1fae5; color: #059669; }
.student-ai { margin-top: 26px; padding: 26px; border: 1px solid #c7d2fe; background: linear-gradient(120deg, #eef2ff, #fff); border-radius: 22px; }
.student-ai p { font-size: 13px; line-height: 1.8; color: var(--muted); margin-top: 8px; }
.student-ai form { display: flex; gap: 10px; margin-top: 18px; }
.student-ai input { flex: 1; min-width: 0; padding: 13px 16px; border: 1px solid #cbd5e1; border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 14px; }
.student-ai .audience-cta { margin: 0; white-space: nowrap; }
.student-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.student-tool { text-align: left; background: var(--surface); padding: 21px; border: 1px solid var(--line); border-radius: 18px; }
.student-tool strong { font-size: 15px; }
.student-tool p { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.student-tool:hover { border-color: #a5b4fc; }
.student-next { margin-top: 25px; border-top: 1px solid var(--line); padding-top: 20px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.student-editor-note { display: none; flex: none; padding: 12px 16px; font-size: 12px; background: #eef2ff; color: #4338ca; line-height: 1.7; border-bottom: 1px solid #c7d2fe; }
.student-mode .student-editor-note { display: block; }
.student-mode #main-preview-area, .student-mode #mobile-bottom-nav,
.student-mode #btn-download-pdf, .student-mode #btn-download-answer-key,
.student-mode #rubric-toggle-container, .student-mode [data-teacher-editor] { display: none !important; }
.student-mode #left-panel { display: flex !important; width: 100% !important; max-width: 850px; margin: 0 auto; }
.student-mode #left-panel > div:last-child { padding-bottom: 16px !important; }
.student-mode #editor-view { background: #f8fafc; }
.dark .student-mode #editor-view { background: #0f172a; }
button:focus-visible, .student-ai input:focus-visible { outline: 3px solid #818cf8; outline-offset: 3px; }
.dark .audience-bar { background: #1e293b; border-color: #334155; }
.dark .audience-switch { background: #0f172a; }
.dark .audience-switch button { color: #94a3b8; }
.dark .audience-switch button[aria-pressed="true"] { background: #334155; color: #c7d2fe; }
.dark .audience-page { --ink: #e2e8f0; --muted: #94a3b8; --surface: #1e293b; --line: #334155; }
.dark .audience-card.student, .dark .student-ai { background: linear-gradient(130deg, #242d50, #1e293b); border-color: #454c83; }
.dark .audience-card.teacher .audience-cta { background: #334155; }
.dark .student-tag { background: #064e3b; color: #a7f3d0; }
.dark .student-editor-note { background: #252b51; color: #c7d2fe; border-color: #454c83; }
@media (max-width: 640px) {
    .audience-bar { padding: 7px 16px; }
    .audience-hint { display: none; }
    .audience-switch { width: 100%; }
    .audience-switch button { flex: 1; }
    .audience-page { padding-top: 14px; }
    .audience-intro { padding-bottom: 8px; text-align: left; }
    .audience-lead { font-size: 14px; }
    .audience-cards { grid-template-columns: 1fr; gap: 16px; margin-top: 18px; }
    .audience-card { padding: 23px; gap: 14px; }
    .audience-card h2 { font-size: 22px; }
    .student-topline { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 20px; }
    .student-stats { gap: 8px; margin-bottom: 22px; }
    .student-stat { padding: 14px 10px; }
    .student-stat strong { font-size: 22px; }
    .student-stat span { font-size: 10px; }
    .student-demos { grid-template-columns: 1fr; gap: 12px; }
    .student-demo { display: grid; grid-template-columns: 42px 1fr; gap: 12px; padding: 18px; }
    .student-demo button { grid-column: 1 / -1; }
    .student-ai { padding: 20px; }
    .student-ai form { flex-direction: column; }
    .student-ai .audience-cta { justify-content: center; }
    .student-tools { grid-template-columns: 1fr; gap: 12px; }
    .student-section-heading { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .audience-card { transition: none; } }
