* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; color: #1e293b; }
.page { min-height: 100vh; background: linear-gradient(to bottom right, #f8fafc, #f1f5f9, #e2e8f0); }
.header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(8px); border-bottom: 1px solid #e2e8f0; }
.header-inner { max-width: 72rem; margin: 0 auto; padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.header-brand { display: flex; align-items: center; gap: 1rem; }
.header-brand-icon { display: flex; align-items: center; justify-content: center; height: 2.75rem; width: 2.75rem; border-radius: 0.75rem; background: linear-gradient(to bottom right, #1e293b, #475569); color: #fff; box-shadow: 0 10px 15px -3px rgba(100, 116, 139, 0.3); flex-shrink: 0; }
.header-brand-icon svg { height: 1.5rem; width: 1.5rem; }
.header-title { margin: 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; color: #1e293b; }
.header-subtitle { margin: 0.125rem 0 0; font-size: 0.875rem; color: #64748b; }
.filters { display: flex; align-items: center; gap: 0.25rem; background: #f1f5f9; border-radius: 0.75rem; padding: 0.25rem; }
.filter-btn { display: flex; align-items: center; gap: 0.375rem; border: none; background: transparent; padding: 0.5rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; color: #64748b; cursor: pointer; transition: all 0.2s ease; }
.filter-btn svg { height: 1rem; width: 1rem; }
.filter-btn:hover { color: #334155; }
.filter-btn.is-active { background: #fff; color: #1e293b; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.main { max-width: 72rem; margin: 0 auto; padding: 2rem 1.5rem; }
.chart-card { background: #fff; border-radius: 1rem; box-shadow: 0 20px 25px -5px rgba(100, 116, 139, 0.15); border: 1px solid rgba(226, 232, 240, 0.8); padding: 1.25rem; }
.calendar-grid { display: grid; grid-template-columns: 6rem repeat(13, minmax(0, 1fr)); background: #fff; border: 1px solid #e2e8f0; border-radius: 0.75rem; overflow: hidden; }
.calendar-grid > * { border-right: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.grid-label { background: #f8fafc; display: flex; align-items: center; justify-content: flex-end; padding: 0 0.625rem; font-size: 0.625rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; color: #0f172a; white-space: nowrap; }
.week-header-cell { display: flex; align-items: center; justify-content: center; padding: 0.5rem 0.125rem; background: #fbfcfd; transition: background 0.2s ease; }
.week-header-cell .week-num { font-size: 0.75rem; font-weight: 700; color: #94a3b8; transition: color 0.2s ease; }
.week-header-cell.is-hovered { background: #eff6ff; }
.week-header-cell.is-hovered .week-num { color: #1e293b; }
.calendar-cell { min-height: 2.75rem; background: #fff; display: flex; align-items: center; justify-content: center; padding: 0.25rem; }
.calendar-cell--empty { background: repeating-linear-gradient(45deg, #fafbfc, #fafbfc 6px, #f5f6f8 6px, #f5f6f8 12px); }
.module-cell { border: none; cursor: pointer; transition: all 0.2s ease; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); }
.module-cell:hover { filter: brightness(1.08); }
.module-cell.is-active { box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px var(--ring-color); }
.module-cell-label { font-size: 0.75rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.assignment-cell { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0.25rem; padding: 0.3125rem; }
.assignment-chip { width: 100%; height: 1.375rem; flex-shrink: 0; border: none; border-radius: 0.375rem; font-size: 0.625rem; font-weight: 700; cursor: pointer; transition: filter 0.2s ease; display: flex; align-items: center; justify-content: center; }
.assignment-chip svg { width: 0.8125rem; height: 0.8125rem; }
.assignment-chip:hover, .assignment-chip.is-active { filter: brightness(0.95); }
.detail-panel { margin-top: 1.5rem; }
.detail-card { background: #fff; border-radius: 1rem; border: 1px solid; box-shadow: 0 20px 25px -5px rgba(100, 116, 139, 0.15); overflow: hidden; animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.detail-banner { padding: 1.5rem 2rem; border-bottom: 1px solid; display: flex; align-items: flex-start; gap: 1rem; }
.detail-banner-icon { display: flex; align-items: center; justify-content: center; height: 3.5rem; width: 3.5rem; border-radius: 1rem; color: #fff; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); flex-shrink: 0; }
.detail-banner-icon svg { height: 1.5rem; width: 1.5rem; }
.detail-banner-meta { flex: 1; min-width: 0; }
.detail-banner-tags { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.detail-module-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.detail-weeks { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; color: #94a3b8; }
.detail-weeks svg { height: 0.875rem; width: 0.875rem; }
.detail-title { margin: 0.25rem 0 0; font-size: 1.5rem; font-weight: 700; color: #1e293b; line-height: 1.3; }
.detail-body { display: grid; grid-template-columns: 1fr; gap: 0; }
.detail-body.has-two-cols { grid-template-columns: 1fr; }
@media (min-width: 1024px) { .detail-body.has-two-cols { grid-template-columns: 1fr 1fr; } }
.detail-col { padding: 2rem; }
.detail-col--topics.has-border { border-bottom: 1px solid #f1f5f9; }
@media (min-width: 1024px) { .detail-col--topics.has-border { border-bottom: none; border-right: 1px solid #f1f5f9; } }
.detail-col-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.detail-col-head-icon { display: flex; align-items: center; justify-content: center; height: 2rem; width: 2rem; border-radius: 0.5rem; }
.detail-col-head-icon svg { height: 1rem; width: 1rem; }
.detail-col-head h3 { margin: 0; font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; }
.detail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.topic-item { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.875rem; color: #334155; line-height: 1.6; }
.topic-dot { margin-top: 0.4rem; height: 0.5rem; width: 0.5rem; border-radius: 9999px; flex-shrink: 0; }
.assignment-item { display: flex; align-items: flex-start; font-size: 0.875rem; line-height: 1.6; }
.assignment-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; margin-top: 0.375rem; }
.assignment-category { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.6875rem; font-weight: 600; padding: 0.125rem 0.5rem; border-radius: 9999px; }
.assignment-category svg { width: 0.75rem; height: 0.75rem; flex-shrink: 0; }
.assignment-due { display: inline-flex; align-items: center; font-size: 0.6875rem; font-weight: 500; padding: 0.125rem 0.5rem; border-radius: 9999px; }
.footer-note { text-align: center; font-size: 0.75rem; color: #94a3b8; margin-top: 2rem; }