/* Validated prototype direction, applied to the existing API-backed views. */
:root {
  --color-bg: #FFFFFF;
  --color-surface: #FFFFFF;
  --color-subtle: #F7F9FC;
  --color-text: #17243B;
  --color-text-secondary: #64748B;
  --color-border: #DDE5EF;
  --color-primary: #3157C8;
  --color-primary-hover: #2547AD;
  --color-primary-soft: #EDF2FF;
  --color-link: #3157C8;
  --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius-card: 18px;
  --radius-btn: 12px;
  --shadow-card: none;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --color-bg: #101723;
  --color-surface: #172131;
  --color-subtle: #131D2C;
  --color-text: #E8EDF6;
  --color-text-secondary: #A0AEC2;
  --color-border: #2C394C;
  --color-primary-soft: #22324C;
  --color-link: #91AEFF;
  --color-error: #FF9A9A;
  --color-success: #83CDB0;
  --color-warning: #E6BF82;
  color-scheme: dark;
}
html { scroll-behavior: auto; }
body { font: 14px/1.5 var(--font-family); background: var(--color-bg); color: var(--color-text); }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--color-link); outline-offset: 4px; }
input:focus-visible { outline-offset: 2px; }
a { color: var(--color-link); }
button:disabled { cursor: default; opacity: .6; }
svg { width: 18px; height: 18px; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 12px; z-index: 100; padding: 12px; border-radius: 10px; background: var(--color-surface); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.app-shell { animation: dashboard-arrival 200ms ease-out; }
@keyframes dashboard-arrival { from { opacity: .7; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.view { animation: none; }
.dashboard-header { position: sticky; top: 0; z-index: 25; background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.header-masthead { max-width: 1240px; margin: auto; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 24px; padding: 18px 44px; align-items: center; }
.brand { gap: 11px; background: none; padding: 0; color: var(--color-text); cursor: pointer; }
.brand > strong { font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.brand-mark { width: 40px; height: 40px; font-size: 16px; font-weight: 700; border-radius: 11px; background: #3157C8; color: #FFFFFF; box-shadow: 0 5px 12px #3157C833; }
.nav-horizontal { display: block; border: 0; background: none; min-width: 0; }
.nav-container { min-width: 0; max-width: 100%; padding: 0; gap: 4px; align-items: center; justify-content: center; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--color-border) transparent; }
.nav-item { padding: 10px 12px; min-height: 44px; flex: 0 0 auto; font-size: 15px; font-weight: 500; border-radius: 12px; border: 0; color: var(--color-text-secondary); }
.nav-item::after { display: none; }
.nav-item:hover { background: var(--color-primary-soft); color: var(--color-text); }
.nav-item.is-active { background: #3157C8; color: #FFFFFF; font-weight: 650; }
.nav-unavailable { gap: 6px; opacity: 1 !important; }
.nav-unavailable small { max-width: 60px; white-space: normal; line-height: 1.15; font-size: 9px; text-align: left; }
.header-actions { gap: 10px; }
.btn { border-radius: 12px; min-height: 40px; padding: 9px 14px; font-size: 12px; font-weight: 600; transition: background 120ms, border-color 120ms; box-shadow: none; }
.btn-primary, .btn-primary:hover { color: #FFFFFF; }
.btn-secondary { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
.btn-secondary:hover:not(:disabled), .btn-icon:hover:not(:disabled), .btn-ghost:hover:not(:disabled) { background: var(--color-primary-soft); color: var(--color-text); }
.btn-ghost { color: var(--color-link); }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; padding: 8px; width: 38px; height: 38px; min-height: 38px; }
.theme-toggle { border: 1px solid var(--color-border); color: var(--color-text-secondary); width: 34px; height: 34px; min-height: 34px; border-radius: 50%; }
.theme-toggle svg { width: 17px; height: 17px; }
.session-button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--color-border); background: none; border-radius: 30px; font-size: 11px; font-weight: 600; padding: 8px 12px; min-height: 34px; color: var(--color-text-secondary); white-space: nowrap; }
.session-button:hover { background: var(--color-primary-soft); }
.session-button.disconnected { background: #3157C8; color: #FFFFFF; border-color: #3157C8; }
.session-button.disconnected:hover { background: #2547AD; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.session-button.disconnected .status-dot { display: none; }
.main-content { margin: 0; }
.view-container { max-width: 1240px; padding: 36px 44px 60px; }
.view-heading { margin-bottom: 30px; gap: 20px; align-items: center; flex-direction: row; }
.view-heading h1 { font-size: clamp(30px,3.2vw,38px); font-weight: 700; letter-spacing: -1.25px; line-height: 1.15; }
.eyebrow { color: var(--color-text-secondary); font-size: 10px; letter-spacing: 1px; font-weight: 600; margin-bottom: 10px; }
.home-heading-actions { display: flex; align-items: center; gap: 20px; }
.text-action { border: 0; background: none; display: inline-flex; gap: 8px; align-items: center; color: var(--color-link); padding: 8px 0; font-size: 12px; cursor: pointer; text-align: left; }
.text-action:hover { text-decoration: underline; text-underline-offset: 4px; }
.field-help { color: var(--color-text-secondary); font-size: 12px; line-height: 1.6; }
.field-help:empty { display: none; }
.input { min-height: 40px; background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); border-radius: 12px; font-size: 13px; color-scheme: inherit; }
.input:focus { border-color: var(--color-link); box-shadow: none; outline: 2px solid var(--color-link); }
.input::placeholder { color: var(--color-text-secondary); opacity: 1; }
.notice, .daily-empty { background: transparent; border: 0; color: var(--color-text-secondary); font-size: 13px; line-height: 1.7; padding: 18px 0; }
.notice--error { color: var(--color-error); background: var(--color-primary-soft); border-radius: 12px; padding: 16px; }
.badge-gray { color: var(--color-text-secondary); background: var(--color-primary-soft); font-size: 10px; }
.daily-sync { display: flex; align-items: center; gap: 18px; background: var(--color-primary-soft); border: 1px solid var(--color-border); border-radius: 12px; padding: 12px 16px; margin-bottom: 26px; font-size: 12px; color: var(--color-text-secondary); }
.daily-sync button { margin-left: auto; flex-shrink: 0; }
.daily-sync strong { color: var(--color-text); font-weight: 600; }
.home-columns { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,1fr); gap: 36px; align-items: start; }
.home-primary, .home-aside, .daily-section { min-width: 0; }
.daily-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.daily-section-heading h2 { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
.daily-section-heading > span { font-size: 11px; color: var(--color-text-secondary); }
.home-day-section > .field-help { margin-bottom: 10px; }
.daily-event { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 16px; border-bottom: 1px solid var(--color-border); padding: 20px 0; }
.daily-event time { font-size: 12px; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.daily-event time span { display: block; font-size: 10px; margin-top: 3px; }
.daily-event strong { display: block; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.daily-event p { color: var(--color-text-secondary); font-size: 11px; margin-top: 6px; }
.daily-event small { display: block; font-size: 11px; color: var(--color-warning); margin-top: 5px; }
.home-task-section, .home-focus-section { border-top: 1px solid var(--color-border); margin-top: 34px; padding-top: 26px; }
.home-aside > .home-task-section, .home-aside > .home-focus-section { margin-top: 0; padding-top: 24px; }
.daily-task { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; line-height: 1.5; padding: 17px 0; border-bottom: 1px solid var(--color-border); cursor: pointer; }
.daily-task span { overflow-wrap: anywhere; }
.daily-task input { margin-top: 2px; width: 17px; height: 17px; flex-shrink: 0; accent-color: #3157C8; }
.daily-task-form { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.daily-task-form input { min-width: 0; flex: 1; }
#home-task-message { margin-top: 8px; }
.daily-next { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 22px 20px; min-height: 166px; margin-bottom: 30px; border-radius: 18px; background: #3157C8; color: #FFFFFF; }
.upcoming-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #FFFFFF29; flex-shrink: 0; }
.upcoming-icon svg { width: 24px; height: 24px; }
.upcoming-content { min-width: 0; }
.upcoming-content h2 { text-transform: uppercase; font-size: 10px; font-weight: 600; letter-spacing: 1px; opacity: .8; padding-right: 18px; margin: 0 0 9px; }
.upcoming-content h3 { font-size: 21px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; margin-bottom: 8px; }
.upcoming-content p { font-size: 11px; line-height: 1.6; color: #FFFFFF; opacity: .88; }
#hero-location { font-size: 12px; margin-top: 7px; }
.upcoming-action { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 8px; color: white; font-size: 20px; }
.upcoming-action:hover { background: #FFFFFF28; }
.focus-preview { background: var(--color-primary-soft); border-radius: 12px; padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.focus-preview strong { font-size: 25px; font-weight: 600; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.focus-preview .btn-icon { width: 38px; height: 38px; border-radius: 50%; }
/* Agenda keeps all seven days, event CRUD, recurrence and overlap positioning. */
.agenda-view-modes { display: flex; width: max-content; padding: 3px; border: 1px solid var(--color-border); border-radius: 12px; margin-bottom: 20px; gap: 3px; }
.agenda-view-modes button { font-size: 12px; padding: 7px 13px; border-radius: 9px; color: var(--color-text-secondary); }
.agenda-view-modes button[aria-pressed="true"] { background: var(--color-primary-soft); color: var(--color-link); }
.agenda-grid--day { display: block; min-width: 0; }
.agenda-container--day { border: 0; border-radius: 0; background: none; }
.agenda-day-row { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--color-border); }
.agenda-day-row time { color: var(--color-text-secondary); font-size: 12px; font-variant-numeric: tabular-nums; }
.agenda-day-row time span { display: block; margin-top: 4px; font-size: 10px; }
.agenda-day-row strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.agenda-day-row p { margin-top: 5px; color: var(--color-text-secondary); font-size: 12px; }
.agenda-day-row .personal-event-delete { position: static; color: var(--color-text-secondary); }
.agenda-header { padding: 0; border: 0; background: none; gap: 12px; box-shadow: none; margin-bottom: 22px; }
.agenda-controls { gap: 8px; }
.agenda-current-range { font-size: 13px; min-width: 0; }
.agenda-grid { grid-template-columns: 48px repeat(7,minmax(115px,1fr)); }
.agenda-time-column, .agenda-day-header { background: var(--color-surface); }
.agenda-day-header { height: 64px; }
.agenda-day-name { font-size: 10px; }
.agenda-day-date { font-size: 20px; font-weight: 500; }
.agenda-day-content { background-image: linear-gradient(to bottom,var(--color-border) 1px,transparent 1px); }
.agenda-event { border-radius: 9px; border-left: 2px solid var(--color-link); padding: 7px; gap: 4px; font-size: 10px; }
.agenda-event-title { color: var(--color-text); white-space: normal; font-size: 11px; line-height: 1.35; }
.agenda-event.personal { background: var(--color-subtle); border-left-color: var(--color-text-secondary); }
.agenda-event.personal .agenda-event-title { color: var(--color-text); }
.agenda-event.exam { background: var(--color-primary-soft); border-left-color: var(--color-error); }
.agenda-event:hover { transform: none; box-shadow: none; }
.agenda-now-line, .agenda-now-line::before { background: #3157C8; }
.agenda-legend { padding: 14px 0; gap: 20px; font-size: 11px; }
.legend-dot { width: 7px; height: 7px; }
.personal-event-form { box-shadow: none; }
/* Courses become an ordered list; resource reader hooks remain untouched. */
.courses-search { width: 340px; max-width: 100%; }
.courses-toolbar { border: 0; border-radius: 0; padding: 0; background: none; box-shadow: none; }
.courses-grid { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--color-border); }
.course-card { min-height: 0; border: 0; border-bottom: 1px solid var(--color-border); border-radius: 0; background: transparent; box-shadow: none; }
.course-card .card-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(100px,.4fr) auto; align-items: center; gap: 24px; padding: 22px 4px; }
.course-header { margin: 0; align-items: center; gap: 20px; }
.course-icon { width: 48px; height: 53px; border-radius: 12px; color: var(--color-link); font-size: 25px; font-weight: 600; }
.course-title { font-size: 16px; color: var(--color-text); }
.course-title-button:hover { color: var(--color-link); }
.course-meta { margin: 0; gap: 6px; }
.course-meta-item { font-size: 11px; }
.course-actions { border: 0; margin: 0; padding: 0; flex-direction: column; align-items: end; gap: 5px; }
.course-actions .btn { width: auto; font-size: 11px; min-height: 32px; padding: 6px 10px; }
.course-actions a.btn { background: none; border: 0; font-size: 10px; color: var(--color-text-secondary); }
.courses-grid--detail { display: block; border: 0; }
.course-detail { max-width: none; }
.course-content-section { border-radius: 0; border: 0; border-top: 1px solid var(--color-border); background: none; padding: 20px 0; margin-top: 20px; }
.course-content-section h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.course-content-item { padding: 14px 0; align-items: center; }
.course-content-item > div { display: flex; align-items: center; gap: 12px; }
.course-content-item .course-content-name { margin: 0; font-size: 13px; text-decoration: none !important; color: var(--color-text); }
.course-content-item button.course-content-name:hover { color: var(--color-link); }
.course-content-item > a { font-size: 10px; color: var(--color-text-secondary); }
.course-content-scope, .course-content-empty, .course-link-unavailable { font-size: 12px; line-height: 1.7; }
.course-resource-text { border-radius: 16px; font-size: 14px; line-height: 1.8; }
.course-resource-pdf { background: #FFFFFF; }
/* Tasks, mail and settings use the same sober spacing and surfaces. */
.productivity-grid { grid-template-columns: minmax(0,1.35fr) minmax(300px,1fr); gap: 36px; }
.productivity-grid > .widget { border: 0; box-shadow: none; background: none; }
.productivity-grid > .widget .widget-header, .productivity-grid > .widget .widget-body { padding: 0; border: 0; background: none; }
.productivity-grid > .widget .widget-header { margin-bottom: 18px; min-height: 0; }
.widget-header-title { font-size: 16px; font-weight: 600; }
.task-list { gap: 0; }
.task-item { border: 0; border-bottom: 1px solid var(--color-border); border-radius: 0; background: none; padding: 16px 0; }
.task-title { overflow-wrap: anywhere; font-size: 13px; }
.task-checkbox { flex-shrink: 0; background: var(--color-subtle); border-color: var(--color-text-secondary); border-radius: 5px; width: 18px; height: 18px; }
.task-delete { opacity: 1; }
.pomodoro-card { min-height: 235px; background: var(--color-primary-soft); }
.pomodoro-timer { font-family: var(--font-family); font-size: 48px; color: var(--color-text); font-weight: 600; }
.mail-setup { background: var(--color-surface); box-shadow: none; }
.mail-setup .settings-desc { max-width: none; font-size: 12px; margin-top: 8px; }
.mail-setup .card-body { padding: 20px; }
.mail-toolbar { align-items: center; }
.mail-actions { flex-wrap: wrap; justify-content: flex-end; }
.mail-workspace { gap: 0; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); border: 1px solid var(--color-border); border-radius: 18px; overflow: hidden; }
.mail-inbox, .mail-reader { border: 0; border-radius: 0; }
.mail-inbox { border-right: 1px solid var(--color-border); }
.mail-message-row { padding: 20px 16px; }
.mail-inbox .notice { padding: 20px; }
.mail-reader { min-width: 0; padding: 28px; }
.mail-reader-meta { flex-wrap: wrap; }
.mail-reader-content, .mail-reader-to { overflow-wrap: anywhere; }
.ent-card, .settings-list, .widget { background: var(--color-surface); box-shadow: none; }
.ent-card:hover { transform: none; box-shadow: none; border-color: var(--color-link); }
.ent-icon, .connector-status-badge { background: var(--color-primary-soft); color: var(--color-link); border-color: var(--color-border); }
.ent-grid .ent-card .ent-icon { background: var(--color-primary-soft); color: var(--color-link); }
.ent-section h2, .settings-section-title { font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.settings-container { max-width: 950px; }
.settings-row { padding: 20px; }
.settings-desc { font-size: 12px; line-height: 1.7; }
.settings-row > div:last-child { flex-wrap: wrap; }
.display-name-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.display-name-actions input { max-width: 210px; }
#display-name-form { display: flex; flex-wrap: wrap; }
#display-name-message { flex-basis: 100%; }
.skeleton { background: var(--color-border); }
/* Native dialog traps keyboard focus and keeps authentication out of home. */
.auth-dialog { width: min(460px,calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 36px; margin: auto; border: 1px solid var(--color-border); border-radius: 24px; background: var(--color-surface); color: var(--color-text); box-shadow: 0 24px 90px #00000033; overflow-y: auto; }
.auth-dialog::backdrop { background: #17243B55; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
[data-theme="dark"] .auth-dialog::backdrop { background: #050A1480; }
.auth-dialog.auth-picker { width: min(640px,calc(100% - 32px)); padding: 32px; }
.modal-close { position: absolute; right: 16px; top: 16px; color: var(--color-text-secondary); font-size: 24px; border-radius: 50%; background: none; }
.auth-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--color-primary-soft); color: var(--color-link); margin: 0 auto 18px; }
.auth-dialog > .eyebrow, .auth-dialog > h2, .auth-description { text-align: center; }
.auth-dialog h2 { font-size: 27px; letter-spacing: -.8px; font-weight: 650; margin-bottom: 10px; }
.auth-description { font-size: 12px; color: var(--color-text-secondary); margin-bottom: 20px; line-height: 1.7; }
.identity-choice { display: flex; gap: 12px; align-items: center; width: 100%; padding: 18px; text-align: left; border: 1px solid var(--color-border); border-radius: 16px; background: none; color: var(--color-text); margin: 20px 0 14px; }
.identity-choice:hover { background: var(--color-primary-soft); border-color: var(--color-link); }
.identity-choice > span:nth-child(2) { flex: 1; min-width: 0; }
.identity-choice b, .selected-identity b { font-size: 13px; font-weight: 600; }
.identity-choice small, .selected-identity small { display: block; color: var(--color-text-secondary); font-size: 12px; margin-top: 4px; overflow-wrap: anywhere; }
.identity-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: var(--color-primary-soft); color: var(--color-link); flex-shrink: 0; }
.selected-identity { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--color-border); border-radius: 16px; margin-bottom: 22px; }
.settings-auth-field { display: grid; gap: 8px; font-size: 12px; font-weight: 600; }
.auth-dialog form { display: grid; gap: 16px; margin: 0; padding: 0; }
.auth-dialog .input { min-height: 44px; }
.auth-dialog .settings-auth-field input { border-radius: 12px; font-size: 13px; }
.auth-dialog .btn-primary, #entry-other { width: 100%; min-height: 44px; }
.auth-dialog .text-action { justify-content: center; font-size: 12px; }
.entry-remember { display: flex; gap: 9px; align-items: flex-start; font-size: 11px; color: var(--color-text-secondary); line-height: 1.6; font-weight: 400; }
.entry-remember input { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; accent-color: #3157C8; }
.otp-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.otp-fieldset legend { font-size: 12px; font-weight: 600; padding: 0; margin-bottom: 10px; }
.otp-boxes { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; }
.auth-dialog input.otp-digit { width: 100%; min-width: 0; height: 54px; font-size: 24px; font-weight: 600; padding: 0; text-align: center; border-radius: 12px; }
.auth-dialog #settings-auth-message { margin: 16px 0 8px; font-size: 12px; line-height: 1.7; color: var(--color-text-secondary); }
#settings-auth-message[role="alert"] { color: var(--color-error); }
#settings-auth-message:empty { display: none; }
#entry-defer, #entry-forget { display: flex; width: 100%; margin-top: 12px; }
.auth-local { text-align: center; color: var(--color-text-secondary); font-size: 10px; line-height: 1.7; margin-top: 16px; }
@media (max-width: 1100px) {
  .header-masthead { padding: 16px 28px; gap: 16px; }
  .brand > strong { display: none; }
  .nav-container { justify-content: flex-start; }
  .view-container { padding-inline: 28px; }
  .home-columns, .productivity-grid { grid-template-columns: minmax(0,1fr) minmax(275px,1fr); gap: 24px; }
  .course-card .card-body { grid-template-columns: minmax(0,1fr) auto; }
  .course-meta { grid-column: 1; padding-left: 68px; }
  .course-actions { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 680px) {
  .header-masthead { padding: 12px 16px; gap: 10px; }
  .brand-mark { width: 32px; height: 32px; font-size: 13px; border-radius: 10px; }
  .nav-item { font-size: 14px; min-height: 42px; padding: 9px 12px; }
  .nav-unavailable small { display: none; }
  .header-actions { gap: 6px; }
  .theme-toggle { width: 30px; height: 30px; min-height: 30px; }
  .session-button { font-size: 0; width: 30px; height: 30px; min-height: 30px; justify-content: center; padding: 0; }
  .session-button.disconnected::before { content: '→'; font-size: 18px; }
  .view-container { padding: 24px 20px 40px; }
  .view-heading { gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 26px; }
  .view-heading h1 { font-size: 30px; }
  .home-heading-actions { gap: 12px; }
  .home-columns { display: flex; flex-direction: column; gap: 28px; }
  .home-primary, .home-aside { display: contents; }
  .home-day-section { order: 1; width: 100%; }
  .daily-next { order: 2; margin: 0; width: 100%; padding: 20px 16px; }
  .home-task-section { order: 3; }
  .home-focus-section { order: 4; }
  .home-task-section, .home-focus-section, .home-aside > .home-task-section, .home-aside > .home-focus-section { margin: 0; padding-top: 24px; width: 100%; }
  .daily-sync { flex-wrap: wrap; gap: 6px 14px; }
  .upcoming-content h3 { font-size: 20px; }
  .upcoming-icon { width: 36px; height: 36px; }
  .productivity-grid { grid-template-columns: minmax(0,1fr); }
  .agenda-header { flex-wrap: wrap; }
  .agenda-current-range { order: -1; width: 100%; text-align: left; }
  .agenda-header > .btn-primary { font-size: 11px; }
  .course-card .card-body { gap: 10px; grid-template-columns: minmax(0,1fr); padding: 20px 0; }
  .course-actions { grid-column: 1; grid-row: auto; flex-direction: row; align-items: center; justify-content: flex-start; padding-left: 68px; }
  .course-meta { padding-left: 68px; }
  .course-header { gap: 16px; }
  .course-content-item { align-items: flex-start; }
  .course-content-item > div { align-items: flex-start; }
  .mail-toolbar { flex-wrap: wrap; }
  .mail-actions { justify-content: flex-start; }
  .mail-actions .btn { font-size: 11px; }
  .mail-workspace { grid-template-columns: minmax(0,1fr); }
  .mail-inbox { border-right: 0; border-bottom: 1px solid var(--color-border); }
  .mail-reader { padding: 20px; }
  .settings-row > *:last-child { align-self: auto; }
  .display-name-actions { width: 100%; }
  .display-name-actions input { flex: 1; min-width: 0; max-width: none; }
  .auth-dialog, .auth-dialog.auth-picker { width: calc(100% - 24px); padding: 28px 24px; }
  .otp-boxes { gap: 6px; }
  .auth-dialog input.otp-digit { height: 48px; font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell, .skeleton::after { animation: none; }
  *, *::before, *::after { transition: none !important; }
}
