:root {
    color-scheme: light;
    --ink: #152238;
    --ink-soft: #516078;
    --ink-faint: #738198;
    --paper: #f5f7fa;
    --surface: #ffffff;
    --line: #dce2ea;
    --line-strong: #b9c4d2;
    --blue: #1d4f91;
    --blue-dark: #153d70;
    --blue-wash: #eaf1fb;
    --amber: #a65916;
    --green: #16734b;
    --red: #a33e3e;
    --radius: 8px;
    --shadow: 0 3px 12px rgb(21 34 56 / 0.07);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #e08b32; outline-offset: 3px; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 10; padding: 10px 14px; color: #fff; background: var(--ink); border-radius: 0 0 var(--radius) var(--radius); }
.skip-link:focus { top: 0; }
.app-shell { max-width: 1320px; margin: 0 auto; padding: 0 32px 64px; }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 88px; border-bottom: 1px solid var(--line); }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; color: #fff; background: var(--blue); border-radius: 50%; font-weight: 700; }
.brand-name { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.brand-context, .header-note { margin: 2px 0 0; color: var(--ink-faint); font-size: 13px; }
.header-note { margin: 0; }
.workspace { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 36px; }
.selection-panel, .calendar-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.selection-panel { position: sticky; top: 20px; max-height: calc(100vh - 40px); padding: 24px; overflow: auto; }
.calendar-panel { min-height: 620px; padding: 28px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-kicker { margin: 0 0 5px; color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
h1, h2 { margin: 0; color: var(--ink); font-size: 25px; line-height: 1.2; letter-spacing: -0.025em; }
.section-intro { max-width: 34ch; margin: 12px 0 20px; color: var(--ink-soft); font-size: 15px; }
.selection-count { padding: 4px 9px; color: var(--blue); background: var(--blue-wash); border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.selection-actions { display: flex; gap: 16px; margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.text-button { padding: 0; color: var(--blue); background: transparent; border: 0; font-size: 14px; font-weight: 700; }
.text-button:hover { color: var(--blue-dark); text-decoration: underline; }
.subjects { display: grid; gap: 8px; }
.subject-item { position: relative; display: flex; align-items: flex-start; gap: 11px; padding: 11px 12px; border: 1px solid transparent; border-radius: 6px; transition: background-color 150ms ease, border-color 150ms ease; }
.subject-item:hover { background: #f7f9fc; border-color: var(--line); }
.subject-item.selected { background: var(--blue-wash); border-color: #b9cde8; }
.subject-item input { flex: 0 0 auto; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blue); }
.subject-item label { color: var(--ink); font-size: 14px; line-height: 1.35; cursor: pointer; }
.subject-item.required { background: #f1f3f5; border-color: #d8dde3; }
.subject-item.required input { accent-color: #8b949e; cursor: not-allowed; }
.subject-item.required label { color: var(--muted); cursor: default; }
.schedule-heading { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.calendar-stats { color: var(--ink-soft); font-size: 14px; text-align: right; }
.calendar-stats strong { color: var(--ink); }
.schedule-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0 22px; }
.filters { display: flex; gap: 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
.filters legend { width: 100%; margin-bottom: 8px; color: var(--ink-faint); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.filters label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 14px; }
.filters input { width: 18px; height: 18px; accent-color: var(--blue); }
.export-area { flex: 0 0 auto; }
.btn-export { min-height: 42px; padding: 9px 15px; color: #fff; background: var(--amber); border: 1px solid var(--amber); border-radius: 6px; font-size: 14px; font-weight: 700; transition: background-color 150ms ease, transform 150ms ease; }
.btn-export:hover { background: #87460f; }
.btn-export:active { transform: translateY(1px); }
.export-hint { margin: 0; color: var(--ink-faint); font-size: 13px; }
.calendar-prompt-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgb(16 24 40 / 45%); }
.calendar-prompt { position: relative; width: min(100%, 390px); padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 50px rgb(16 24 40 / 22%); }
.calendar-prompt h2 { margin: 0 32px 8px 0; font-size: 20px; }
.calendar-prompt p { margin: 0 0 20px; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.calendar-prompt-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.calendar-prompt-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.calendar-prompt-actions .text-button { padding: 10px; }
.calendar-view { display: grid; gap: 10px; }
.event-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 6px; background: var(--surface); }
.event-item.ast { border-left-color: var(--red); }
.event-date { color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.event-date-day { display: block; color: var(--ink); font-size: 15px; }
.event-subject { font-size: 15px; font-weight: 650; line-height: 1.35; }
.event-location { margin-top: 4px; color: var(--ink-faint); font-size: 13px; }
.event-time { color: var(--ink-soft); font-size: 14px; white-space: nowrap; }
.event-type { display: inline-block; margin-top: 5px; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.event-type.ast { color: var(--red); background: #fbeeee; }
.event-type.supp { color: var(--green); background: #eaf7f0; }
.no-events { padding: 64px 20px; border: 1px dashed var(--line-strong); border-radius: 6px; text-align: center; }
.no-events h3 { margin: 0 0 7px; font-size: 18px; }
.no-events p { max-width: 34ch; margin: 0 auto; color: var(--ink-soft); font-size: 14px; }
@media (max-width: 900px) { .app-shell { padding: 0 20px 48px; } .workspace { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; } .selection-panel { position: static; max-height: none; } }
@media (max-width: 600px) { .app-shell { padding: 0 12px 32px; } .site-header { min-height: 76px; } .header-note { display: none; } .selection-panel, .calendar-panel { padding: 20px 16px; } h1, h2 { font-size: 22px; } .schedule-toolbar { align-items: stretch; flex-direction: column; } .filters { gap: 12px; } .export-area, .btn-export { width: 100%; } .event-item { grid-template-columns: 1fr; gap: 7px; padding: 14px; } .event-time { order: 3; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; } }
