:root {
  --crimson: #841617;
  --crimson-dark: #5f0e10;
  --crimson-soft: #f5e9e9;
  --black: #171717;
  --charcoal: #323232;
  --muted: #6f6f6f;
  --canvas: #f0f0f0;
  --surface: #ffffff;
  --line: #dddddd;
  --sky: #bcdceb;
  --leaf: #8ca57d;
  --stone: #beb4a5;
  --amber: #a55a18;
  --shadow: 0 2px 12px rgba(0, 0, 0, .045);
  --sidebar-width: 240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--charcoal); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
form { margin: 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; color: var(--black); }
h1 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.04; letter-spacing: -.035em; }
h2 { margin-bottom: 0; line-height: 1.15; letter-spacing: -.02em; }
h3 { margin-bottom: 4px; color: var(--black); line-height: 1.25; }
.muted { color: var(--muted); }
.full { width: 100%; }

.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; padding: 10px 14px; border-radius: 7px; background: var(--black); color: white; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-width); display: flex; flex-direction: column; background: linear-gradient(180deg, #8d201d 0%, #761314 100%); color: white; }
.workspace-brand { display: block; padding: 26px 24px 25px; border-bottom: 1px solid rgba(255,255,255,.18); text-decoration: none; }
.workspace-brand span { display: block; margin-bottom: 6px; color: rgba(255,255,255,.67); font-size: .66rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.workspace-brand strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.3rem; line-height: 1.15; }
.sidebar-nav { flex: 1; display: grid; align-content: start; gap: 5px; padding: 22px 12px; }
.sidebar-nav a { min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: rgba(255,255,255,.86); font-weight: 650; text-decoration: none; }
.sidebar-nav a:first-child, .sidebar-nav a:hover, .sidebar-nav a:focus-visible { background: white; color: var(--crimson); outline: 0; }
.nav-icon { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 6px; font-size: .67rem; font-weight: 850; }
.sidebar-account { padding: 16px; border-top: 1px solid rgba(255,255,255,.18); }
.account-row { display: flex; align-items: center; gap: 11px; padding: 0 6px 13px; }
.account-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: white; color: var(--crimson); font-weight: 850; }
.account-row strong, .account-row small { display: block; }
.account-row small { color: rgba(255,255,255,.62); }
.sidebar-signout { width: 100%; min-height: 42px; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; color: rgba(255,255,255,.82); text-align: left; cursor: pointer; font-weight: 700; }
.sidebar-signout:hover { background: rgba(255,255,255,.1); color: white; }

.app-frame { min-height: 100vh; margin-left: var(--sidebar-width); }
.desktop-header { position: sticky; top: 0; z-index: 30; height: 65px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(22px, 3vw, 38px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); }
.desktop-header span, .desktop-header strong { display: block; }
.desktop-header span { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.desktop-header strong { color: var(--charcoal); font-size: .86rem; }
.mobile-header, .mobile-nav { display: none; }
.header-button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; border: 1px solid #cfcfcf; border-radius: 8px; background: white; color: var(--charcoal); font-weight: 750; text-decoration: none; }
.header-button:hover { border-color: #a9a9a9; background: #fafafa; }

.page { width: min(1500px, 100%); margin: 0 auto; padding: 24px clamp(20px, 3vw, 38px) 58px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.eyebrow { margin-bottom: 5px; color: var(--crimson); font-size: .68rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.updated { margin-bottom: 5px; color: var(--muted); font-size: .82rem; }

.panel { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-heading > span { color: var(--muted); font-size: .75rem; }
.panel-heading .eyebrow { margin: 0; }

.overview { scroll-margin-top: 84px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(350px, 1fr); gap: 12px; }
.next-deadline { min-height: 143px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: var(--shadow); }
.next-deadline h2 { margin: 8px 0 5px; font-size: 1.35rem; }
.next-deadline p { margin: 0; color: var(--muted); font-size: .84rem; }
.next-actions { min-width: 150px; display: grid; gap: 7px; }
.next-actions form, .next-actions form button { width: 100%; }
.badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.deadline-badge, .platform, .status { display: inline-flex; align-items: center; width: fit-content; padding: 4px 9px; border-radius: 999px; font-size: .67rem; font-weight: 800; }
.deadline-badge { background: var(--crimson-soft); color: var(--crimson); }
.platform { background: #e8e5e1; color: #49433e; }
.platform-mcgraw-hill { background: rgba(188,220,235,.58); color: #23516c; }
.platform-gradescope { background: #eee9f7; color: #5f4a86; }
.status { background: #e7e7e7; color: #555; }
.status.not-submitted, .status.needs-input, .status.needs-review, .status.failed { background: var(--crimson-soft); color: var(--crimson); }
.status.submitted, .status.saved, .status.complete { background: rgba(140,165,125,.26); color: #3c6330; }
.status.graded { background: rgba(140,165,125,.26); color: #3c6330; }
.status.running { background: rgba(188,220,235,.58); color: #23516c; }

.quick-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-totals article { min-width: 0; min-height: 143px; display: flex; flex-direction: column; justify-content: space-between; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: var(--shadow); }
.quick-totals strong, .quick-totals span { display: block; }
.quick-totals strong { color: var(--black); font-size: 1.7rem; line-height: 1; }
.quick-totals article div span { margin-top: 6px; color: var(--muted); font-size: .72rem; line-height: 1.25; }
.stat-icon { width: 32px; height: 32px; display: grid !important; place-items: center; border-radius: 8px; font-size: .7rem; font-weight: 900; }
.stat-icon.sky { background: rgba(188,220,235,.65); color: #23516c; }
.stat-icon.stone { background: rgba(190,180,165,.35); color: #665d52; }
.stat-icon.leaf { background: rgba(140,165,125,.27); color: #3c6330; }

.deadline-strip { margin-top: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: var(--shadow); }
.deadline-strip h2 { font-family: inherit; color: var(--muted); font-size: .7rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.deadline-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 9px; }
.deadline-days a { position: relative; min-height: 70px; display: grid; place-items: center; align-content: center; padding: 8px; border: 1px solid #e4e4e4; border-radius: 8px; color: var(--charcoal); text-decoration: none; }
.deadline-days a:first-child, .deadline-days a:hover { border-color: var(--crimson); background: var(--crimson); color: white; }
.deadline-days span, .deadline-days small { font-size: .62rem; font-weight: 750; text-transform: uppercase; }
.deadline-days strong { font-size: 1rem; }
.deadline-days i { position: absolute; right: 7px; bottom: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--stone); }
.deadline-days i.submitted, .deadline-days i.graded { background: var(--leaf); }
.deadline-days i.not-submitted { background: var(--crimson); }
.deadline-days a:first-child i, .deadline-days a:hover i { background: white; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(315px, .72fr); gap: 14px; margin-top: 14px; }
.assignments-panel, .focus-panel, .quick-panel, .all-drafts, .grade-summary { scroll-margin-top: 84px; }
.panel-header { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-header h2 { font-size: 1.25rem; }
.panel-header .eyebrow { margin-bottom: 2px; }
.legend { display: flex; gap: 3px; padding: 4px; border-radius: 7px; background: var(--canvas); color: var(--muted); font-size: .68rem; font-weight: 750; }
.legend span { padding: 5px 8px; }
.legend span:first-child { border-radius: 5px; background: white; color: var(--crimson); box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.assignment-list { max-height: 650px; overflow-y: auto; }
.assignment-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.assignment-row:last-child { border-bottom: 0; }
.assignment-row:hover { background: #fbfbfb; }
.date-block { width: 48px; height: 48px; display: grid; place-items: center; align-content: center; border: 1px solid #e2e2e2; border-radius: 8px; background: #fafafa; text-align: center; }
.date-block strong { color: var(--black); font-size: 1rem; line-height: 1; }
.date-block span { margin-top: 3px; color: var(--crimson); font-size: .56rem; font-weight: 850; text-transform: uppercase; }
.assignment-main { min-width: 0; }
.assignment-main h3 { margin-top: 5px; overflow: hidden; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.assignment-main p { margin: 0; overflow: hidden; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { min-width: 130px; display: grid; grid-template-columns: 1fr; gap: 5px; }
.row-actions form, .row-actions button { width: 100%; }
.row-actions .small-link { text-align: center; }
.small-link, .text-link, .back { color: var(--crimson); font-size: .72rem; font-weight: 750; text-decoration: none; }
.small-link:hover, .text-link:hover, .back:hover { text-decoration: underline; }

.primary, .secondary { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 13px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; text-decoration: none; font-weight: 750; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.primary { background: var(--crimson); color: white; }
.primary:hover { background: var(--crimson-dark); transform: translateY(-1px); }
.secondary { border-color: #d0d0d0; background: white; color: var(--charcoal); }
.secondary:hover { border-color: #a9a9a9; background: #fafafa; }

.focus-column { display: grid; align-content: start; gap: 14px; }
.focus-panel { position: sticky; top: 79px; padding: 17px; }
.focus-panel h2 { margin: 9px 0 2px; font-size: 1.25rem; }
.focus-panel > p { color: var(--muted); font-size: .78rem; }
.focus-course { margin-bottom: 12px; color: var(--charcoal) !important; font-weight: 700; }
.focus-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 16px 0; }
.focus-details div { padding: 8px; border-radius: 7px; background: var(--canvas); }
.focus-details dt { color: var(--muted); font-size: .6rem; font-weight: 750; text-transform: uppercase; }
.focus-details dd { margin: 3px 0 0; color: var(--black); font-size: .7rem; font-weight: 750; }
.focus-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.quick-panel { padding: 15px; }
.quick-panel h2 { font-size: 1.1rem; }
.quick-list { display: grid; gap: 6px; margin-top: 12px; }
.quick-list a, .quick-list > div { display: grid; padding: 9px 0; border-top: 1px solid #ececec; text-decoration: none; }
.quick-list a:first-child, .quick-list > div:first-child { border-top: 0; padding-top: 0; }
.quick-list strong { color: var(--black); font-size: .77rem; }
.quick-list span, .quick-list small { color: var(--muted); font-size: .66rem; }
.grade-list > div { grid-template-columns: auto 1fr; gap: 2px 9px; }
.grade-list strong { grid-row: 1 / 3; color: var(--crimson); font-size: 1rem; }

.lower-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .75fr); gap: 14px; margin-top: 14px; }
.draft-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 14px; }
.draft-card { min-width: 0; display: block; padding: 14px; border: 1px solid #e4e4e4; border-radius: 8px; background: #fbfbfb; text-decoration: none; }
.draft-card:hover { border-color: #c3c3c3; background: white; }
.draft-card h3 { margin: 9px 0 3px; font-size: .84rem; }
.draft-card p, .draft-card small { margin: 0; color: var(--muted); font-size: .68rem; }
.course-grade-list { max-height: 360px; overflow-y: auto; padding: 8px 14px 14px; }
.course-grade-list div { display: grid; gap: 3px; padding: 10px 0; border-bottom: 1px solid #ececec; }
.course-grade-list div:last-child { border-bottom: 0; }
.course-grade-list span { color: var(--black); font-size: .75rem; font-weight: 700; }
.course-grade-list strong { color: var(--crimson); font-size: .8rem; }
.course-grade-list small { color: var(--muted); }

.notice { margin-bottom: 14px; padding: 12px 14px; border: 1px solid transparent; border-radius: 8px; }
.notice.error { border-color: #e6b9b9; background: var(--crimson-soft); color: #6f1113; }
.notice.success { border-color: #c8d7c0; background: #edf4e9; color: #36552e; }
.notice.neutral { border-color: #c9dce6; background: #edf5f8; color: #31566b; }
.empty { padding: 36px; color: var(--muted); text-align: center; }
.empty-inline { grid-column: 1 / -1; margin: 12px; color: var(--muted); text-align: center; }

/* Assignment workspace */
.assignment-page .page { max-width: 1460px; }
.back { display: inline-block; margin: 3px 0 15px; }
.back:before { content: "<"; margin-right: 7px; }
.assignment-title { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 16px; padding-bottom: 18px; border-bottom: 1px solid #d4d4d4; }
.assignment-title h1 { max-width: 900px; }
.assignment-title-meta { min-width: 235px; text-align: right; }
.assignment-title-meta p { margin: 7px 0 0; color: var(--muted); font-size: .78rem; }
.assignment-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 15px; align-items: start; }
.assignment-work, .assignment-side { display: grid; gap: 15px; }
.assignment-side { position: sticky; top: 80px; }
.assignment-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 25px; padding: 18px; }
.assignment-summary p:last-child { margin-bottom: 0; }
.assignment-facts, .version-panel { padding: 17px; }
.assignment-facts dl { margin: 10px 0 16px; }
.assignment-facts dl div { padding: 9px 0; border-bottom: 1px solid #ececec; }
.assignment-facts dt { color: var(--muted); font-size: .62rem; font-weight: 750; text-transform: uppercase; }
.assignment-facts dd { margin: 2px 0 0; color: var(--black); font-size: .75rem; font-weight: 700; }
.assignment-facts .primary { width: 100%; }
.version-panel h2 { font-size: 1.05rem; }
.version-list { display: grid; gap: 7px; margin: 13px 0; }
.version-pill { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid #dedede; border-radius: 7px; text-decoration: none; }
.version-pill strong { font-size: .76rem; }
.version-pill small { color: var(--muted); font-size: .62rem; text-transform: uppercase; }
.version-pill:hover, .version-pill.active { border-color: var(--crimson); background: var(--crimson-soft); color: var(--crimson); }

.smartbook-box { padding: 18px; border-left: 4px solid var(--crimson); }
.smartbook-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.smartbook-heading h2 { font-size: 1.3rem; }
.progress-number { color: var(--crimson); font-family: Georgia, "Times New Roman", serif; font-size: 2.2rem; font-weight: 700; }
.progress-track { height: 9px; margin: 15px 0 9px; overflow: hidden; border-radius: 999px; background: #e3e3e3; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--crimson); }
.goal-form { display: flex; align-items: end; gap: 11px; margin-top: 17px; }
.goal-form label { display: grid; min-width: 190px; gap: 5px; font-weight: 700; }
input, textarea, select { width: 100%; border: 1px solid #c8c8c8; border-radius: 7px; background: white; color: var(--charcoal); }
input { min-height: 46px; padding: 9px 12px; }
select { min-height: 44px; padding: 8px 34px 8px 11px; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(132,22,23,.14); border-color: var(--crimson); }
.smartbook-actions { display: flex; gap: 8px; margin-top: 14px; }
.small-text { margin: 10px 0 0; font-size: .75rem; }
.smartbook-report { padding: 18px; }
.smartbook-report pre { margin: 0; white-space: pre-wrap; color: var(--charcoal); font: inherit; }
.draft-progress { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.pdf-section { padding: 16px; }
.pdf-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.pdf-heading h2 { font-size: 1.25rem; }
.pdf-viewer { width: 100%; height: min(70vh, 820px); min-height: 520px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.manual-submit-box { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 13px; padding: 15px; border: 1px solid #c8d7c0; border-radius: 8px; background: #edf4e9; }
.manual-submit-box p { margin: 3px 0 0; color: #486240; font-size: .72rem; }
.manual-submit-box form { flex: 0 0 auto; }
.manual-submit-box input[type="hidden"] { display: none; }
.editor { padding: 16px; }
.editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 9px; }
.editor-heading label { color: var(--black); font-weight: 800; }
.editor-heading span { color: var(--muted); font-size: .7rem; }
.editor textarea { min-height: 58vh; padding: 17px; resize: vertical; line-height: 1.65; background: #fcfcfc; }
.submit-box { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px 20px; margin-top: 13px; padding: 15px; border-radius: 8px; background: var(--crimson-soft); }
.submit-box p { grid-column: 1 / -1; margin: 0; color: #6f3b3b; font-size: .7rem; }
.check { display: flex; align-items: center; gap: 9px; }
.check input { width: 19px; min-height: 19px; accent-color: var(--crimson); }
.danger { background: var(--crimson); }

/* Sign in */
.signed-out { min-height: 100vh; background: var(--crimson); }
.signed-out .page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-shell { width: min(980px, 100%); min-height: 570px; display: grid; grid-template-columns: 1.1fr .9fr; overflow: hidden; border-radius: 13px; background: white; box-shadow: 0 25px 80px rgba(58,0,2,.3); }
.login-brand { display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(38px, 7vw, 72px); background: linear-gradient(155deg, #9b2824, #6f1012); color: white; }
.login-brand .eyebrow { color: rgba(255,255,255,.7); }
.login-brand h1 { color: white; font-size: clamp(2.5rem, 6vw, 4.3rem); }
.login-brand > p:not(.eyebrow) { max-width: 390px; margin-top: 24px; color: rgba(255,255,255,.78); font-size: 1rem; }
.login-rule { width: 54px; height: 4px; margin: 28px 0; background: white; }
.login-brand small { color: rgba(255,255,255,.6); }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(34px, 6vw, 66px); }
.login-card h2 { font-size: 2rem; }
.login-card > .muted { margin: 8px 0 27px; }
.login-form { display: grid; gap: 17px; }
.login-form label { display: grid; gap: 6px; color: var(--charcoal); font-size: .8rem; font-weight: 750; }

@media (max-width: 1180px) {
  .overview-grid { grid-template-columns: 1fr; }
  .quick-totals article { min-height: 105px; }
  .workspace-grid { grid-template-columns: minmax(0, 1.45fr) minmax(285px, .75fr); }
  .focus-details { grid-template-columns: 1fr; }
  .focus-actions { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .sidebar, .desktop-header { display: none; }
  .app-frame { margin-left: 0; }
  .mobile-header { position: sticky; top: 0; z-index: 30; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 4vw; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
  .mobile-header > a:first-child { color: var(--crimson); font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem; font-weight: 700; text-decoration: none; }
  .mobile-nav { position: fixed; inset: auto 0 0 0; z-index: 50; height: 68px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,.98); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: .62rem; font-weight: 750; text-decoration: none; }
  .mobile-nav a:first-child { color: var(--crimson); }
  .mobile-nav span { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 6px; font-size: .62rem; }
  .page { padding: 22px 4vw 95px; }
  .workspace-grid, .lower-grid, .assignment-layout { grid-template-columns: 1fr; }
  .focus-panel, .assignment-side { position: static; }
  .focus-details { grid-template-columns: repeat(3, 1fr); }
  .focus-actions { grid-template-columns: 1fr 1fr; }
  .assignment-side { grid-row: 1; }
}

@media (max-width: 680px) {
  body { font-size: 14px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .overview-grid, .next-deadline, .assignment-summary { grid-template-columns: 1fr; }
  .next-actions { min-width: 0; grid-template-columns: 1fr 1fr; }
  .quick-totals { gap: 7px; }
  .quick-totals article { min-height: 108px; padding: 12px; }
  .quick-totals article div span { font-size: .64rem; }
  .deadline-strip { overflow: hidden; }
  .deadline-days { display: flex; overflow-x: auto; padding-bottom: 3px; }
  .deadline-days a { min-width: 72px; }
  .workspace-grid { margin-top: 10px; }
  .panel-header { align-items: flex-start; flex-direction: column; }
  .assignment-list { max-height: none; overflow: visible; }
  .assignment-row { grid-template-columns: 45px minmax(0,1fr); padding: 13px; }
  .row-actions { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .row-actions .small-link { grid-column: 1 / -1; }
  .assignment-main h3, .assignment-main p { white-space: normal; }
  .lower-grid { display: block; }
  .lower-grid > * + * { margin-top: 10px; }
  .draft-grid { grid-template-columns: 1fr; }
  .assignment-title { align-items: flex-start; flex-direction: column; }
  .assignment-title-meta { min-width: 0; text-align: left; }
  .assignment-summary .secondary { width: 100%; }
  .goal-form, .smartbook-heading, .draft-progress, .pdf-heading, .manual-submit-box { align-items: stretch; flex-direction: column; }
  .goal-form label { min-width: 0; }
  .focus-details { grid-template-columns: 1fr; }
  .submit-box { grid-template-columns: 1fr; }
  .submit-box p { grid-column: auto; }
  .login-shell { min-height: 0; grid-template-columns: 1fr; }
  .login-brand { min-height: 250px; padding: 34px; }
  .login-card { padding: 34px; }
}

@media (max-width: 420px) {
  .mobile-header .header-button { padding: 7px 10px; font-size: .72rem; }
  .next-actions, .focus-actions, .row-actions { grid-template-columns: 1fr; }
  .quick-totals strong { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
