/* Term workspace: a quiet task surface with persistent navigation. */
:root {
  --bg: #f4f6fa;
  --bg-elevated: #fff;
  --text: #17243b;
  --text-secondary: #526179;
  --text-tertiary: #65728a;
  --separator: #e4e9f1;
  --separator-strong: #cbd4e1;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-text: #1d4ed8;
  --accent-soft: #edf3ff;
  --radius: 9px;
  --radius-lg: 14px;
  --sidebar-w: 14rem;
  --header-h: 5rem;
  --shadow-sm: 0 2px 5px #17243b03;
}
:root[data-theme=light] { color-scheme: light; }
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #101722; --bg-elevated: #182231; --text: #edf2fa;
  --text-secondary: #b2bfd2; --text-tertiary: #98abc3;
  --separator: #2a374b; --separator-strong: #435570;
  --accent: #5d95ff; --accent-strong: #2563eb; --accent-text: #9bc0ff;
  --accent-soft: #203450;
}
@media(prefers-color-scheme:dark) {
  :root:not([data-theme=light]) {
    --bg: #101722; --bg-elevated: #182231; --text: #edf2fa;
    --text-secondary: #b2bfd2; --text-tertiary: #98abc3;
    --separator: #2a374b; --separator-strong: #435570;
    --accent: #5d95ff; --accent-strong: #2563eb; --accent-text: #9bc0ff;
    --accent-soft: #203450;
  }
}
body { line-height: 1.55; }
.sidebar {
  background: #13233d; color: #f3f6fd; padding: 1.6rem 1rem;
  backdrop-filter: none; border: 0; gap: 1.6rem;
  --text: #f3f6fd; --text-secondary: #becce0; --text-tertiary: #a8bad3;
  --separator: #ffffff13; --accent-text: #b5d0ff; --accent-soft: #ffffff10;
}
.brand { padding: 0 .75rem; gap: .7rem; }
.brand__mark { width: 2rem; height: 2rem; box-shadow: none; }
.brand__name { font-size: 1.4rem; letter-spacing: -.04em; }
.tabs { display: flex; flex-direction: column; margin: 0; width: 100%; padding: 0; gap: .4rem; background: none; }
.tabs::before { display: none; }
.tabs button { display: flex; align-items: center; text-align: left; gap: .85rem; padding: .8rem .85rem; color: #bdcbe0; font-size: .9375rem; min-height: 46px; font-weight: 500; }
.tabs button svg { width: 20px; height: 20px; flex: none; }
.tabs button:hover { background: #ffffff0a; color: white; }
.tabs button[aria-selected=true] { background: #ffffff13; color: #fff; box-shadow: inset 3px 0 #75a4ff; }
.sidebar-context { padding: 0 .3rem; }
.section-label { font-size: .75rem; letter-spacing: .06em; margin-bottom: .6rem; }
.sidebar .tag-row { min-height: 40px; font-size: .875rem; }
.sidebar-subjects { padding: 0 .3rem; }
.sidebar-subjects summary { font-size: .875rem; color: #becce0; cursor: pointer; padding: .5rem; }
.sidebar-subjects .tags { margin-top: .5rem; }
.sidebar__foot { padding-top: 1rem; border-top: 1px solid #ffffff15; }
.sidebar .ask-btn { background: #ffffff09; color: #e4edfa; border: 1px solid #ffffff23; border-radius: 9px; min-height: 44px; font-size: .875rem; }
.sidebar .ask-btn__kbd { color: #b6c7df; }
.sidebar .status { font-size: .75rem; padding: .5rem .75rem; }
.sidebar .sign-out { font-size: .875rem; min-height: 40px; color: #becce0; }
.main { background: var(--bg); }
.topbar { background: var(--bg-elevated); backdrop-filter: none; padding: 0 2rem; gap: .8rem; }
.topbar-heading { flex: 1; min-width: 0; }
.topbar-date { display: block; font-size: .8125rem; color: var(--text-secondary); }
.topbar__title { font-size: 1.3rem; line-height: 1.3; margin: .15rem 0 0; }
.topbar .icon-btn { width: 42px; height: 42px; }
.topbar .setup-link { font-size: .875rem; }
.page { padding: 2rem 2rem 4rem; }
.stack { max-width: 76rem; margin: 0 auto; gap: 1.4rem; }
.stack--wide { max-width: 90rem; }
.card { box-shadow: var(--shadow-sm); padding: 1.35rem; }
.btn { border-radius: 8px; min-height: 42px; font-size: .875rem; padding: .55rem .9rem; }
.btn--primary { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn--primary:hover { background: #1e40af; color: white; }
.btn:disabled { cursor: default; opacity: .55; }
.h-sec { font-size: 1rem; text-transform: none; letter-spacing: -.015em; color: var(--text); font-weight: 600; margin: 0 0 .8rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.section-heading .h-sec { margin: 0; }
.text-btn { color: var(--accent-text); font-size: .875rem; min-height: 38px; padding: .35rem 0; }
.text-btn:hover { text-decoration: underline; }
.workspace-eyebrow { display: block; font-size: .75rem; font-weight: 650; letter-spacing: .08em; color: var(--text-secondary); margin-bottom: .6rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1.6rem; }
.dashboard-grid>section { min-width: 0; }
.dashboard-brief { grid-column: 1 / -1; padding-bottom: .4rem; }
.brief__head { font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.25; letter-spacing: -.04em; }
.brief__sub { margin-top: .35rem; font-size: .9375rem; }
.dashboard-actions { margin: 1.2rem 0; gap: .65rem; }
.brief__row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-top: 1.5rem; }
.stat { padding: 1rem 1.25rem; border-radius: 12px; }
.stat__n { font-size: 1.75rem; font-weight: 600; letter-spacing: -.04em; }
.stat__l { font-size: .875rem; color: var(--text-secondary); }
.meter { height: 4px; margin-top: .8rem; }
.dashboard-priority { grid-column: 1; }
.dashboard-lessons { grid-column: 2; grid-row: span 2; }
.dashboard-revision { grid-column: 1; }
.dashboard-priority .card, .dashboard-revision .card { padding: .2rem 1.25rem; }
.dashboard-lessons .lessons { display: flex; flex-direction: column; gap: .5rem; }
.dashboard-lessons .lesson { display: grid; grid-template-columns: 2.5rem 1fr; column-gap: .8rem; padding: .8rem 1rem; border-radius: 10px; min-width: 0; border: 1px solid var(--separator); background: var(--bg-elevated); }
.dashboard-lessons .lesson__p { grid-row: span 2; align-self: center; font-size: .875rem; }
.dashboard-lessons .lesson__n { margin: 0; font-size: .9375rem; }
.dashboard-lessons .lesson__m { font-size: .8125rem; }
.dashboard-lessons .lesson--now { background: var(--accent-soft); border-color: var(--accent); }
.dashboard-lessons .lesson--free { background: transparent; }
.row { min-height: 70px; }
.row__title, .row__n { font-size: .9375rem; }
.row__meta, .row__m { font-size: .8125rem; }
.row__t { display: block; font-size: .9375rem; line-height: 1.45; }
.row__m { display: block; margin-top: .25rem; line-height: 1.45; }
.tick { width: 24px; height: 24px; min-width: 24px; min-height: 24px; }
.tick::before { content: ''; position: absolute; width: 44px; height: 44px; left: 50%; top: 50%; transform: translate(-50%,-50%); }
.row__t { overflow: visible; white-space: normal; text-overflow: clip; }
.row__sub { font-size: .75rem; }
.focus-card { border-left: 3px solid var(--accent); background: var(--bg-elevated); }
.focus-card h2 { font-size: 1.1rem; letter-spacing: -.02em; }
.focus-card p { font-size: .875rem; margin: .4rem 0 0; }
.day-close { background: none; box-shadow: none; padding: 1rem 0; border: 0; border-top: 1px solid var(--separator); border-radius: 0; }
.day-close p { color: var(--text-secondary); }
.dashboard-home { display: block; padding: 0; border: 1px solid var(--separator); border-radius: 12px; background: var(--bg-elevated); box-shadow: none; }
.dashboard-home summary { padding: 1.2rem 1.35rem; font-size: .9375rem; font-weight: 600; cursor: pointer; }
.dashboard-home summary span { display: block; padding-left: 1rem; margin-top: .15rem; font-size: .8125rem; color: var(--text-secondary); font-weight: 400; }
.shortcut-content { padding: 0 1.35rem 1.35rem; }
.dashboard-home__copy { display: none; }
.google-search { margin-top: .5rem; box-shadow: none; }
.app-launcher { margin-top: 1rem; }
.agenda__filters { gap: .6rem; }
.agenda__filters input { min-height: 42px; font-size: .9375rem; }
.agenda__count { font-size: .8125rem; }
.uni-heading { position: sticky; top: 0; z-index: 4; background: var(--bg); padding: .5rem 0; margin-bottom: 0; align-items: center; }
.uni-heading h2 { font-size: 1.6rem; letter-spacing: -.03em; }
.uni-heading p { margin: .4rem 0 0; }
.uni-stats { margin: 0; border-radius: 12px; }
.uni-stats strong { font-size: 1.7rem; line-height: 1.4; margin-top: .5rem; }
.uni-stats small { display: none; }
.uni-nav { margin: 0; padding-bottom: .15rem; gap: 1rem; border-bottom: 1px solid var(--separator); }
.uni-nav .btn { border: 0; border-radius: 0; padding: .65rem 0; background: none; box-shadow: none; color: var(--text-secondary); white-space: nowrap; }
.uni-nav .btn[aria-current=page] { color: var(--accent-text); box-shadow: 0 2px var(--accent); }
.uni-content { min-width: 0; }
.uni-grid { gap: 1rem; }
.uni-card { padding: 1.4rem; }
.uni-card h3 { font-size: 1.15rem; margin-top: 1rem; }
.uni-card-top label { font-size: .875rem; min-height: 35px; }
.uni-letter { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--separator); border-radius: 10px; }
.uni-route { margin-bottom: 1rem; font-size: .8125rem; }
.uni-card details { font-size: .875rem; color: var(--text-secondary); margin-bottom: 1.2rem; flex: 1; }
.uni-card details summary { cursor: pointer; min-height: 32px; color: var(--text); }
.uni-card details p { margin: .4rem 0 .5rem; line-height: 1.6; }
.uni-card-bottom .btn, .uni-card-bottom select { font-size: .875rem; }
.uni-editor { max-width: 65rem; padding: 1.5rem; }
.uni-editor h3 { font-size: 1.2rem; }
.uni-search:first-child { flex: 2; }
.uni-search:not(:first-child) { flex: 1; }
.uni-search input, .uni-search select, .uni-field input, .uni-field textarea { border-radius: 8px; min-height: 44px; }
.uni-field select { font: inherit; color: var(--text); background: var(--bg-elevated); border: 1px solid var(--separator-strong); border-radius: 8px; padding: .65rem .75rem; min-height: 44px; width: 100%; }
.uni-content:has([data-budget-picker]) .uni-grid { grid-template-columns: minmax(0,1fr); max-width: 65rem; }
.uni-task-title textarea { width: 100%; min-height: 65px; resize: vertical; font: inherit; font-size: .9375rem; color: var(--text); background: var(--bg-elevated); border: 1px solid transparent; border-radius: 8px; padding: .5rem .75rem; line-height: 1.5; }
.uni-task-title textarea:hover { border-color: var(--separator-strong); }
.uni-task { align-items: start; }
.uni-task>input, .uni-task>button { margin-top: .5rem; }
.uni-budget-select { max-width: 32rem; margin-bottom: 1.25rem; }
.uni-notice { background: transparent; border: 0; padding: 0; box-shadow: none; }
.uni-notice h3 { font-size: 1rem; }
.uni-budget-total { padding: 1.4rem; }
.uni-task-title input { font-size: .9375rem; }
.uni-task small { font-size: .8125rem; }
.uni-save { gap: .8rem; flex-direction: row; align-items: center; }
.uni-tools { margin-top: .5rem; }
.uni-tools .btn { font-size: .8125rem; }
.university-summary .uni-eyebrow { font-size: .75rem; letter-spacing: .06em; }
.university-summary h2 { font-size: 1.1rem; }
.auth { background: var(--bg); }
.auth__panel { background: var(--bg-elevated); }
.auth__copy h1 { letter-spacing: -.045em; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; }
.auth__preview { background: #13233d; }
.auth__orb { display: none; }
.auth__day { transform: none; border-radius: 16px; box-shadow: 0 25px 80px #0002; }
.auth__submit { background: #1d4ed8; border-radius: 9px; }
.fab { display: none; }
.mobile-command { display: none; }
.settings-account { padding: 1rem 0; border-top: 1px solid var(--separator); }
.sheet .btn { min-height: 42px; }
@media(min-width:60.01rem) { .app { grid-template-columns: var(--sidebar-w) minmax(0,1fr); } .sidebar { display: flex; } .topbar__mark { display: none; } }
@media(max-width:75rem) { .page { padding: 1.6rem; } .uni-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:60rem) {
  :root { --header-h: 4.5rem; }
  .app { grid-template-columns: 1fr; }
  .sidebar { display: contents; }
  .sidebar>*:not(.tabs) { display: none; }
  .tabs { --text-secondary: #526179; --accent-text: #1d4ed8; --accent-soft: #edf3ff; --separator: #e4e9f1; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; width: 100%; flex-direction: row; justify-content: space-around; gap: 0; padding: .35rem .4rem calc(.35rem + env(safe-area-inset-bottom,0px)); border-top: 1px solid var(--separator); border-radius: 0; background: var(--bg-elevated); }
  .tabs button { flex: 1; flex-direction: column; justify-content: center; gap: .3rem; padding: .4rem .15rem; min-height: 54px; font-size: .75rem; line-height: 1.25; color: var(--text-secondary); }
  .tabs button[aria-selected=true] { color: var(--accent-text); background: var(--accent-soft); box-shadow: none; }
  .tabs button:hover { background: var(--accent-soft); color: var(--accent-text); }
  .tabs button svg { width: 21px; height: 21px; }
  .topbar { padding: 0 1.25rem; flex-wrap: nowrap; }
  .topbar__mark { display: block; }
  .topbar-heading { margin-left: .2rem; }
  .topbar__title { font-size: 1.15rem; }
  .page { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom,0px)); }
  .fab { display: none; }
  .mobile-command { display: grid; }
  .uni-save { flex-direction: row; }
}
@media(max-width:42rem) {
  .page { padding: 1.2rem 1rem calc(6.5rem + env(safe-area-inset-bottom,0px)); }
  .topbar { padding: 0 .85rem; gap: .4rem; }
  .topbar-date { font-size: .75rem; }
  .topbar .setup-link { padding: .4rem .6rem; min-height: 40px; }
  .topbar .icon-btn { width: 36px; }
  .topbar[data-tab=timetable] { --header-h: 7rem; flex-wrap: wrap; align-content: center; }
  .topbar[data-tab=timetable] #weekNav { order: 5; flex-basis: 100%; justify-content: center; }
  .main:has(.topbar[data-tab=timetable]) { --header-h: 7rem; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); gap: 1.3rem; }
  .dashboard-brief, .dashboard-priority, .dashboard-lessons, .dashboard-revision { grid-column: 1; grid-row: auto; }
  .dashboard-priority { order: 1; } .dashboard-lessons { order: 2; } .dashboard-revision { order: 3; }
  .brief__head { font-size: 1.65rem; }
  .brief__row { gap: .5rem; }
  .stat { padding: .75rem .6rem; min-width: 0; }
  .stat__n { font-size: 1.4rem; }
  .stat__l { font-size: .75rem; line-height: 1.4; }
  .dashboard-priority .card, .dashboard-revision .card { padding: .15rem .85rem; }
  .focus-card { flex-direction: column; align-items: stretch; }
  .focus-card>div { min-width: 0; }
  .uni-heading { gap: 1rem; }
  .uni-save { justify-content: space-between; width: 100%; }
  .uni-heading p { font-size: .875rem; }
  .uni-stats>div { padding: .8rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
  .uni-stats span { font-size: .8125rem; }
  .uni-stats strong { font-size: 1.35rem; margin: 0; white-space: nowrap; }
  .uni-nav { gap: .25rem 1rem; flex-wrap: wrap; overflow: visible; }
  .uni-nav .btn { font-size: .875rem; }
  .uni-grid, .uni-grid--two { grid-template-columns: 1fr; }
  .uni-tools p { margin: 0; }
  .uni-editor { padding: 1.15rem; }
  .auth__content { max-width: 30rem; }
}
@media(max-width:60rem) { :root[data-theme=dark] .tabs { --text-secondary:#b2bfd2; --accent-text:#9bc0ff; --accent-soft:#203450; --separator:#2a374b; } }
@media(max-width:60rem) and (prefers-color-scheme:dark) { :root:not([data-theme=light]) .tabs { --text-secondary:#b2bfd2; --accent-text:#9bc0ff; --accent-soft:#203450; --separator:#2a374b; } }
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
@media print { .tabs { display: none !important; } }
