:root {
  color-scheme: light;
  --canvas: #e8ecdc; --surface: #fffcf0; --ink: #1d281b; --muted: #46533f;
  --subtle: #46533f; --line: #bdc9a8; --frame: #456446;
  --accent: #3f7042; --accent-dark: #2f5731; --accent-soft: #dce8c8;
  --green: #3b7648; --green-soft: #e0edd4; --amber: #93651d; --amber-soft: #fff0cc;
  --danger: #ae4340; --danger-soft: #fbe5df; --radius: 4px;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none; -webkit-font-smoothing: antialiased; font-weight: 500; color: var(--ink); background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: linear-gradient(#f0f0df, #e8ecdc 360px); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, select, a { -webkit-tap-highlight-color: transparent; }
button, select, summary { cursor: pointer; }
button { color: inherit; border: 0; }
button:disabled { cursor: wait; opacity: .6; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #d6963e; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.4; }
h1 { font-size: 28px; letter-spacing: -.5px; }
h2 { font-size: 20px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 600; }
ul { margin: 0; padding: 0; list-style: none; }
small { font-size: 13px; }
svg { flex-shrink: 0; vertical-align: middle; }
[hidden] { display: none !important; }
::selection { color: #203a23; background: #cee0b8; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -100px; padding: 10px 18px; z-index: 100; color: #fff; background: var(--accent); border: 2px solid #233e26; }
.skip-link:focus { top: 16px; }

/* Landscape and wooden sign establish the pixel-world shell. */
.site-masthead { position: relative; overflow: hidden; border-bottom: 4px solid #304f32; background: #88bdda; }
.campus-banner { height: 170px; background: #7fbbdd url("/pixel-campus-banner.png") center 56% / cover no-repeat; image-rendering: pixelated; }
.campus-dragon-track { --dragon-size: 64px; --dragon-left-limit: 235px; --dragon-bounce-limit: 244px; position: absolute; left: 8px; right: 8px; bottom: 0; height: 78px; pointer-events: none; }
.campus-dragon-walker { position: absolute; bottom: 0; left: calc(100% - var(--dragon-size)); width: var(--dragon-size); height: var(--dragon-size); }
.campus-dragon-hop { position: relative; display: flex; justify-content: center; align-items: flex-end; width: 100%; height: 100%; transform-origin: 50% 100%; }
.campus-dragon-button { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 0; background: transparent; border: 0; border-radius: 3px; pointer-events: auto; transform-origin: 50% 100%; }
.campus-dragon-button:focus-visible { outline: 2px solid #fff3b0; outline-offset: -2px; box-shadow: inset 0 0 0 4px #314d32; }
.campus-dragon-facing { position: relative; display: flex; justify-content: center; align-items: flex-end; width: 100%; height: 100%; }
.campus-dragon-sprite { display: block; width: auto; height: 64px; max-width: 64px; object-fit: contain; image-rendering: pixelated; user-select: none; -webkit-user-drag: none; }
.campus-dragon-flame { position: absolute; right: 88%; top: 18%; width: 76px; height: 34px; visibility: hidden; opacity: 0; background: #d94a1b; transform-origin: 100% 54%; pointer-events: none; clip-path: polygon(100% 38%, 86% 38%, 86% 23%, 70% 23%, 70% 10%, 52% 10%, 52% 0, 38% 0, 38% 15%, 21% 15%, 21% 30%, 7% 30%, 7% 43%, 0 43%, 0 62%, 13% 62%, 13% 76%, 30% 76%, 30% 88%, 48% 88%, 48% 100%, 65% 100%, 65% 85%, 81% 85%, 81% 70%, 100% 70%); }
.campus-dragon-flame::before, .campus-dragon-flame::after { content: ""; position: absolute; clip-path: inherit; }
.campus-dragon-flame::before { inset: 4px 0 4px 7px; background: #ff9b24; }
.campus-dragon-flame::after { inset: 9px 0 9px 22px; background: #ffe782; }
.campus-dragon-walker.is-breathing .campus-dragon-flame { visibility: visible; opacity: 1; }
.campus-dragon-stars { position: absolute; top: -20px; left: 50%; width: 65px; color: #fff08a; font: 800 18px/1 ui-monospace, monospace; letter-spacing: 2px; text-shadow: 1px 1px #684d16, -1px -1px #684d16; transform: translateX(-50%); opacity: 0; visibility: hidden; pointer-events: none; }
.campus-dragon-shadow { position: absolute; left: 16px; bottom: 0; width: 33px; height: 4px; background: #344b2780; box-shadow: -3px 0 #344b2730, 3px 0 #344b2730; }
.campus-sign { position: absolute; top: 29px; left: max(28px, calc((100vw - 1600px) / 2 + 28px)); min-width: 190px; text-align: center; padding: 12px 26px 13px; color: #fff4ce; background: #806745; border: 4px solid #35482e; border-radius: 2px; box-shadow: inset 0 0 0 3px #c8a36b, inset 0 -7px #6c5439, 5px 5px 0 #30482d80; text-shadow: 2px 2px #4d3e2a; }
.campus-sign::before, .campus-sign::after { content: ""; position: absolute; top: 12px; width: 5px; height: 5px; background: #463e2b; box-shadow: 1px 1px #e2bc7c; }
.campus-sign::before { left: 9px; }
.campus-sign::after { right: 9px; }
.campus-sign strong { display: block; font: 800 31px/1.15 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: 4px; }
.campus-sign span { display: block; font-size: 16px; font-weight: 650; letter-spacing: 5px; margin-top: 4px; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 21px; min-height: 67px; padding: 10px max(20px, calc((100vw - 1600px) / 2 + 20px)); background: #e1e8cc; border-top: 2px solid #f4f6e8; border-bottom: 2px solid var(--frame); box-shadow: 0 3px 0 #778e6233; }
.top-navigation { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.top-navigation a, .top-navigation button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 7px 13px; background: transparent; border: 2px solid transparent; font-size: 16px; font-weight: 650; white-space: nowrap; }
.top-navigation a { border-color: #8ca275; background: #f5f7e6; box-shadow: inset 0 1px #fff; }
.top-navigation a:hover, .top-navigation button:hover { background: #cfddb7; border-color: #8ca275; }
.search-box { margin-left: auto; display: flex; align-items: center; gap: 9px; width: min(350px, 30vw); min-width: 120px; padding: 0 10px; color: #6b805e; background: #fffef4; border: 2px solid #8da27b; border-radius: 3px; box-shadow: inset 1px 2px #dce3cc; }
.search-box input { border: 0; outline: none; padding: 7px 0; width: 100%; min-width: 0; background: transparent; color: var(--ink); font-size: 15px; }
.search-box input::placeholder { color: #718267; }
.search-shortcut { font-size: 12px; white-space: nowrap; border: 1px solid #c9d4b4; padding: 0 4px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.timezone-label { display: none; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 39px; padding: 8px 13px; font-size: 14px; font-weight: 600; border-radius: 3px; border: 2px solid var(--frame); line-height: 1.4; box-shadow: inset 0 1px #ffffff60, 0 2px 0 #30472f45; }
.button-primary { color: #fffdee; background: var(--accent); }
.button-primary:hover { background: var(--accent-dark); }
.icon-button { display: inline-flex; justify-content: center; align-items: center; width: 33px; height: 33px; padding: 0; color: var(--accent); background: #fbfbed; border: 1px solid #9eaf88; border-radius: 3px; }
.icon-button:hover { background: #e2edcf; }
.menu-button { display: none; }
.profile-avatar { display: grid; place-items: center; width: 35px; height: 35px; flex-shrink: 0; background: #d4deb7; border: 2px solid var(--frame); border-radius: 3px; color: #354f32; font-size: 17px; font-weight: 750; box-shadow: inset 1px 1px #fff9; }

/* Three framed columns surround clear, readable course content. */
.app-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 220px; align-items: start; gap: 20px; max-width: 1600px; margin: 0 auto; padding: 22px 20px 32px; }
.sidebar { min-width: 0; display: flex; flex-direction: column; background: #e4edcf; border: 2px solid #3f5f36; border-radius: 4px; box-shadow: inset 0 0 0 2px #f7fbe8, 3px 3px 0 #677d5040; }
.brand { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; border-bottom: 2px solid #93aa72; background: #ccddb2; box-shadow: inset 0 2px #f5fae6; }
.brand img { width: 30px; height: 30px; object-fit: contain; image-rendering: pixelated; }
.brand strong { font-size: 18px; }
.sidebar-course-count { margin-left: auto; padding: 0 6px; background: #ebf1dc; border: 1px solid #829d61; border-radius: 2px; font: 600 13px/1.7 ui-monospace, monospace; color: #5c7646; }
.sidebar-search { display: flex; align-items: center; gap: 6px; margin: 12px 11px 6px; padding: 0 7px; min-width: 0; border: 2px solid #8da46c; border-radius: 2px; color: #73895c; background: #fafbec; box-shadow: inset 1px 2px #dce3c7; }
.sidebar-search input { width: 100%; min-width: 0; padding: 6px 0; border: 0; outline: none; background: transparent; font-size: 14px; color: #425f36; }
.sidebar-search input::placeholder { color: #879773; }
#navigation { padding: 5px 8px 11px; min-width: 0; }
.course-navigation { display: grid; gap: 4px; }
.nav-course { display: flex; align-items: center; gap: 8px; padding: 9px 7px; min-width: 0; border: 1px solid transparent; border-radius: 2px; }
.nav-course:hover { background: #d2e2b7; border-color: #a6bc86; }
.nav-course.is-active { background: #f5e8ad; border-color: #ba9b45; box-shadow: inset 1px 1px #fff7d2, 1px 1px #a0884540; }
.course-pixel-icon { width: 44px; height: 44px; flex-shrink: 0; object-fit: contain; image-rendering: pixelated; }
.nav-course-name { flex: 1; min-width: 0; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.course-row-star { display: inline-block; flex: 0 0 20px; width: 20px; margin-left: auto; color: #e4b438; font: 700 20px/1 "Arial Unicode MS", "Segoe UI Symbol", sans-serif; text-align: center; -webkit-text-stroke: .65px #786025; paint-order: stroke fill; text-shadow: 1px 1px 0 #927b3545; }
.nav-course.is-active .course-row-star { color: #efc64e; }
.course-search-empty { padding: 17px 9px; font-size: 13px; color: #6d8255; }
.sidebar-home { display: flex; align-items: center; gap: 7px; margin: 0 11px 13px; padding: 9px 8px; border: 2px solid #a58d3d; border-radius: 3px; background: #f1d979; color: #64591f; box-shadow: inset 1px 2px #fff3ab, 1px 2px #b19a4c55; font-size: 14px; font-weight: 650; }
.sidebar-home img { width: 25px; height: 29px; object-fit: contain; image-rendering: pixelated; }
.sidebar-home > span:last-child { margin-left: auto; }
.sidebar-home:hover { background: #f6e394; }
.course-monogram { display: grid; place-items: center; width: 29px; height: 29px; flex-shrink: 0; margin-top: 2px; font: 700 11px/1 ui-monospace, monospace; border: 1px solid #8da176; border-radius: 2px; color: #48663c; background: #e3ebcd; box-shadow: inset 1px 1px #fff9, 1px 1px #58763d2b; }
.course-monogram.large { width: 39px; height: 39px; font-size: 14px; }
.course-monogram.hero { width: 52px; height: 52px; font-size: 18px; border-width: 2px; }
.palette-1 { background: #d8e8d3; color: #3c6e53; }
.palette-2 { background: #f6e6ba; color: #8c6734; border-color: #bba16a; }
.palette-3 { background: #d6e7e6; color: #436d74; border-color: #8faeac; }
.palette-4 { background: #e4ddc5; color: #7c6746; border-color: #b1a184; }
.palette-5 { background: #e6dfed; color: #776187; border-color: #b5a3bd; }
.sidebar-footer { padding: 13px; border-top: 2px solid #b2c499; background: #dce7c6; }
.sync-label { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex-shrink: 0; background: #8c987d; box-shadow: 0 0 0 1px #60714f45; }
.status-dot.success { background: #5d924b; }
.status-dot.warning { background: #d49c39; }
.status-dot.info { background: #739ead; }
.sidebar-footer p { color: var(--muted); font-size: 13px; line-height: 1.65; margin-top: 7px; }
.last-check { margin-top: 10px; font-size: 13px; color: #67745d; }
.last-check span { color: #496040; font-variant-numeric: tabular-nums; }
.sidebar-profile { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border-top: 1px solid #bbcca4; }
.sidebar-profile img { width: 27px; height: 36px; object-fit: contain; image-rendering: pixelated; }
.sidebar-profile strong { display: block; font-size: 15px; }
.sidebar-profile small { display: block; color: var(--muted); font-size: 12px; }
.sidebar-profile:hover { background: #d4e2bc; }
.sidebar-profile-arrow { margin-left: auto; color: #3f5f36; }
.workspace { min-width: 0; }
#main { min-width: 0; width: 100%; outline: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 0 0 16px; }
.page-heading > div > p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.term-chip { display: inline-block; padding: 4px 8px; background: #f8f7e8; border: 1px solid #aab995; border-radius: 2px; color: #637451; font-size: 12px; white-space: nowrap; box-shadow: 1px 1px #526f3730; }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.6; }
.panel, .home-disclosure, .rail-card { background: var(--surface); border: 2px solid var(--frame); border-radius: 4px; box-shadow: inset 0 0 0 2px #fffffa, 3px 3px #63754d25; }
.panel { overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: #e8edd8; border-bottom: 1px solid #bdcba5; box-shadow: inset 0 2px #f9fbed; flex-wrap: wrap; }
.panel-heading h2 { font-size: 20px; }
.panel-heading p { color: #627654; font-size: 13px; margin-top: 3px; }
.panel-heading > .icon { color: #6e875b; }
.login-page { display: grid; gap: 16px; min-width: 0; }
.site-auth-panel { width: 100%; max-width: 620px; margin: 16px auto 40px; }
.site-auth-panel .panel-heading { align-items: flex-start; }
.site-auth-panel h1 { font-size: 27px; }
.site-auth-panel .panel-heading p { margin-top: 7px; font-size: 15px; color: #34432d; }
.site-auth-content { padding: 22px; }
.site-auth-intro { color: #34432d; font-size: 15px; line-height: 1.75; }
.site-auth-form { display: grid; gap: 9px; margin-top: 20px; }
.site-auth-form label { font-size: 16px; font-weight: 700; margin-top: 5px; }
.site-auth-form input { width: 100%; min-height: 47px; padding: 10px 12px; color: #1d281b; background: #fffef7; border: 2px solid #789368; border-radius: 3px; font-size: 18px; }
.site-auth-form .button { margin-top: 14px; min-height: 47px; font-size: 16px; }
.site-auth-hint { color: #46533f; font-size: 13px; }
.site-auth-error { margin: 15px 0 4px; padding: 10px 12px; border: 1px solid #bf726c; border-radius: 3px; background: #fff0e9; color: #7b2926; font-size: 15px; }
.site-auth-content > .button { margin-top: 16px; }
.site-logout-button { background: #fff6df; color: #34432d; }
.login-panel-content { padding: 18px; }
.login-panel-content > p, .login-requirements p { color: #34432d; font-size: 16px; line-height: 1.7; }
.login-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.login-actions .button { min-height: 42px; }
.login-check-button { color: #283e24; background: #e3eccf; border-color: #6d8557; }
.login-check-button:hover:not(:disabled) { background: #d3e3b9; }
.login-panel-content .login-return-note { margin-top: 12px; font-size: 14px; }
.login-request-status p { margin-top: 8px; font-size: 15px; line-height: 1.65; }
.login-request-status small { display: block; margin-top: 4px; font-size: 13px; color: #46533f; }
.login-panel-content .login-stream-status, .login-panel-content .login-auto-status, .login-panel-content .login-page-check { color: #46533f; margin-top: 9px; font-size: 14px; }
.login-page-check, #footer-page-check { font-variant-numeric: tabular-nums; }
.login-source-checks { margin: 14px 0 0; }
.login-source-checks > div { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 3px 16px; padding: 9px 0; border-top: 1px dashed #bdcba5; }
.login-source-checks dt { font-size: 15px; font-weight: 600; }
.login-source-checks dt small { margin-left: 9px; font-size: 13px; color: #46533f; font-weight: 500; }
.login-source-checks dd { margin: 0; font-size: 14px; color: #34432d; font-variant-numeric: tabular-nums; }
.login-requirements { margin: 0; }
.login-requirements > summary { font-size: 16px; }
.login-requirements p + p { margin-top: 9px; }
.filter-label { min-width: 0; }
.filter-label select { max-width: 100%; padding: 6px 27px 6px 9px; color: #4b6241; background: #fffef4; border: 1px solid #93a67b; border-radius: 2px; font-size: 13px; }
.home-summary { display: flex; gap: 10px; margin-bottom: 18px; }
.home-summary-item { min-width: 0; flex: 1; display: flex; justify-content: center; align-items: baseline; gap: 8px; padding: 10px 8px; color: #536b43; background: #f5f5e5; border: 2px solid #839c69; border-radius: 3px; box-shadow: inset 1px 1px #fff, 2px 2px #4e6c3730; font-size: 14px; }
.home-summary-item strong { font: 650 25px/1.25 ui-monospace, monospace; color: #3c5832; }
.home-summary-item span { line-height: 1.4; }
.home-summary-item:hover { background: #e7efd5; }
.home-summary-item.is-selected { background: #d7e5bd; border-color: #537645; box-shadow: inset 2px 2px #b0c78c, 2px 2px #4e6c3730; }
.home-dashboard .exam-panel, .home-dashboard .task-panel { margin-bottom: 20px; }
.home-dashboard .task-panel .panel-heading p { display: none; }
.home-dashboard { min-width: 0; }
.home-page-content { min-width: 0; outline: none; }
.home-page-content:focus-visible { outline: 3px solid #d6963e; outline-offset: 4px; }
.home-pagination .pagination-position { display: flex; flex-direction: column; gap: 3px; min-width: 145px; }
.home-pagination .pagination-position small { font: 12px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: #71815e; }
@media (min-width: 821px) {
  .overview-paged .app-layout { align-items: stretch; }
  .overview-paged .workspace { display: flex; flex-direction: column; min-width: 0; }
  .overview-paged #main { display: flex; flex-direction: column; flex: 1; }
  .overview-paged .home-dashboard { display: flex; flex-direction: column; flex: 1; padding: 18px; background: #f7f7e9; border: 2px solid var(--frame); border-radius: 4px; box-shadow: inset 0 0 0 2px #fffff4, 3px 3px #63754d25; }
  .overview-paged .home-page-content { display: flex; flex-direction: column; flex: 1; }
  .overview-paged .home-page-content > .exam-panel, .overview-paged .home-page-content > .task-panel { display: flex; flex-direction: column; flex: 1; margin-bottom: 0; }
  .overview-paged .home-page-content > .exam-panel .exam-panel-content { display: flex; flex-direction: column; flex: 1; }
  .overview-paged .exam-upcoming { display: flex; flex-direction: column; flex: 1; }
  .overview-paged .exam-list { flex: 1; align-content: space-evenly; }
  .overview-paged .home-pagination { margin-top: 18px; flex-shrink: 0; }
  .overview-paged .context-rail { align-self: start; }
  .home-dashboard .exam-entry { grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding-top: 20px; padding-bottom: 20px; }
  .home-dashboard .exam-countdown-ring { width: 92px; height: 92px; }
  .home-dashboard .exam-ring-number { font-size: 33px; }
  .home-dashboard .exam-ring-label, .home-dashboard .exam-ring-unit { font-size: 12px; }
  .home-dashboard .exam-entry h3 { font-size: 18px; }
  .home-dashboard .exam-time { font-size: 16px; }
}

/* Full exam records remain available behind each compact entry. */
.exam-panel-meta { font-size: 13px; color: #5f7551; }
.exam-panel-content { padding: 10px 18px 15px; }
.exam-month-filter { padding-bottom: 8px; margin-bottom: 2px; border-bottom: 1px dashed #c8d2b3; }
.exam-month-filter > summary { width: fit-content; font-size: 14px; color: #536e43; }
.exam-month-filter > summary > span { color: #6a7b5d; margin-left: 9px; font-size: 13px; }
.exam-distribution { padding: 10px 0 2px; }
.exam-subheading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.exam-subheading h3 { display: none; }
.exam-month-all, .exam-toggle { padding: 5px 9px; background: #eef3e0; border: 1px solid #acbd91; border-radius: 2px; font-size: 13px; color: #45693b; }
.exam-month-all[aria-pressed="true"] { background: #d6e5bb; border-color: #76965a; }
.exam-bars { display: flex; gap: 8px; flex-wrap: wrap; }
.exam-bar-row { flex: 1 1 125px; display: grid; grid-template-columns: 55px minmax(15px, 1fr) 14px; gap: 6px; align-items: center; padding: 6px; border: 1px solid transparent; background: #f6f8e9; font-size: 12px; color: #5a714b; }
.exam-bar-row svg { width: 100%; height: 12px; }
.exam-bar-track { fill: #e0e8d0; }
.exam-bar-fill { fill: #82a565; }
.exam-bar-row.is-selected { border-color: #7b975f; background: #e2eccf; }
.exam-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.exam-entry { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-top: 1px dashed #bdcba5; align-items: start; }
.exam-entry:nth-child(-n + 2) { border-top: 0; }
.exam-countdown-ring { width: 78px; height: 78px; border: 3px solid #7f9b6a; border-radius: 50%; display: grid; place-items: center; color: #3e6a43; background: #edf3df; box-shadow: inset 0 0 0 3px #fafbed; }
.exam-ring-center { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.exam-ring-label, .exam-ring-unit { font-size: 11px; }
.exam-ring-number { font: 650 29px/1.05 ui-monospace, monospace; margin: 2px 0; }
.tone-normal .exam-ring-number { color: #173f32; }
.exam-ring-status { font-size: 14px; text-align: center; padding: 4px; }
.tone-normal { border-color: #173f32; background: #fff; color: #173f32; box-shadow: inset 0 0 0 3px #fff; }
.tone-soon { border-color: #c49c4b; background: #faf1d9; color: #9a762e; }
.tone-urgent { border-color: #c87b69; background: #fae9df; color: #a65342; }
.tone-muted { border-color: #b1baa3; background: #f0f1e6; color: #77816b; }
.exam-entry-content { min-width: 0; }
.exam-entry h3 { font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.exam-time { display: flex; align-items: flex-start; gap: 5px; color: #4c6246; font-size: 15px; line-height: 1.5; margin-top: 6px; font-variant-numeric: tabular-nums; }
.exam-time .icon { width: 14px; height: 16px; margin-top: 2px; }
.exam-core-meta, .exam-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.exam-time-uncertain { font-size: 12px; color: #946b31; }
.exam-entry-details { margin-top: 7px; }
.exam-entry-details > summary { width: fit-content; color: #607a4f; font-size: 13px; }
.exam-detail-content { padding-top: 9px; margin-top: 8px; border-top: 1px solid #d7dfc5; }
.exam-original-title, .exam-location, .exam-registration, .exam-time-note, .exam-rooms { font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.exam-location, .exam-registration, .exam-time-note, .exam-rooms { margin-top: 7px; color: #63705a; }
.exam-location-original { display: block; font-size: 12px; }
.exam-rooms ul { padding-left: 15px; margin-top: 6px; list-style: square; }
.exam-source { margin-top: 9px; }
.exam-toggle { display: block; width: 100%; margin-top: 4px; }
.exam-toggle:hover { background: #dfeacb; }
.exam-personal-note, .exam-coverage { font-size: 13px; line-height: 1.75; color: #637456; margin: 0 18px 12px; }
.exam-personal-note > p, .exam-coverage > ul { margin-top: 8px; white-space: pre-line; }
.exam-coverage { padding: 8px 10px; border: 1px dashed #b6c49d; background: #f0f3e2; }
.exam-coverage li + li { margin-top: 4px; }
.exam-panel-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; padding: 9px 18px; background: #f1f3e4; border-top: 1px solid #c7d3af; font-size: 12px; color: #6c7b60; }
.exam-panel-footer a { color: #567846; }

/* Tasks and course materials share structured paper surfaces. */
.task-panel, .home-disclosure { scroll-margin-top: 90px; }
.task-panel:focus { outline: none; }
.task-panel:focus-visible { outline: 3px solid #d6963e; outline-offset: 4px; }
.task-column-labels, .task-row { display: grid; grid-template-columns: minmax(0, 1fr) 105px 143px 27px; gap: 12px; }
.task-column-labels { padding: 8px 17px; background: #f2f4e7; border-bottom: 1px solid #d6dfc4; color: #718262; font-size: 12px; }
.task-row { padding: 17px; border-bottom: 1px dashed #d0d9bc; align-items: start; }
.task-row:last-child { border-bottom: 0; }
.task-row.is-overdue { border-left: 3px solid #c2826a; padding-left: 14px; }
.task-name { min-width: 0; }
.task-name .eyebrow { font-size: 12px; margin-bottom: 4px; display: inline-block; }
.task-name h3 { font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.task-title-link:hover, .event-body h3 a:hover, .rail-reminders a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.task-state { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.badge { display: inline-flex; align-items: center; padding: 3px 6px; border: 1px solid transparent; border-radius: 2px; font-size: 12px; line-height: 1.5; max-width: 100%; font-weight: 500; }
.badge-success { color: #4c733b; background: #e1ecd1; border-color: #bfd2a6; }
.badge-warning { color: #946b28; background: #fbefcf; border-color: #e0c891; }
.badge-danger { color: #aa5044; background: #fae4dc; border-color: #e4b4a6; }
.badge-neutral { color: #6d765f; background: #edf0e2; border-color: #d3dcc3; }
.grading-status, .task-detail, .file-detail { font-size: 12px; color: #6b795e; line-height: 1.65; }
.file-detail { display: flex; align-items: flex-start; gap: 4px; margin-top: 6px; overflow-wrap: anywhere; }
.file-detail .icon { width: 13px; height: 16px; margin-top: 2px; }
.task-detail { margin-top: 5px; }
.task-due { font-size: 15px; color: #49603f; font-variant-numeric: tabular-nums; line-height: 1.55; }
.task-due strong { font-weight: 550; }
.task-due small { display: block; font-size: 12px; color: #738064; margin-top: 4px; }
.task-action .icon-button { width: 27px; height: 28px; }
.task-action .icon { width: 15px; height: 15px; }
.task-details { margin-top: 7px; }
.task-details > summary, .event-details > summary { font-size: 13px; color: #698052; }
.task-description { margin-top: 7px; font-size: 14px; color: #526649; line-height: 1.85; white-space: pre-line; overflow-wrap: anywhere; }
.text-danger { color: var(--danger) !important; }
.muted { color: var(--muted); }
.translation { color: #69775e; }
.home-secondary { display: grid; gap: 12px; }
.home-disclosure { overflow: hidden; }
.home-disclosure > summary { display: flex; align-items: center; gap: 10px; padding: 13px 17px; background: #e5ebd3; border-bottom: 1px solid transparent; font-size: 16px; list-style: none; box-shadow: inset 0 2px #f8fbea; }
.home-disclosure > summary::-webkit-details-marker { display: none; }
.home-disclosure > summary > small { margin-left: auto; color: #6a7c5a; font-size: 13px; }
.home-disclosure > summary::after { content: "+"; font: 700 18px/1 ui-monospace, monospace; color: #62804d; margin-left: 5px; }
.home-disclosure[open] > summary { border-bottom-color: #b8c8a0; }
.home-disclosure[open] > summary::after { content: "−"; }
.home-disclosure-content { padding: 17px; }
.home-disclosure .course-section { margin-top: 0; }
.home-disclosure .course-section > .section-heading, .home-disclosure .event-panel > .panel-heading { display: none; }
.home-disclosure .event-panel, .home-disclosure .email-status-panel { box-shadow: none; border: 0; padding: 0; background: transparent; }
.course-section, .search-results, .resource-section, .notices-section, .originals-section, .unclassified-emails-section { margin-top: 25px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 13px; }
.section-heading h2 { font-size: 19px; }
.section-heading p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.count-label, .inline-count { font-size: 13px; color: #768567; }
.inline-count { margin-left: 5px; }
.course-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.course-card { display: flex; flex-direction: column; min-width: 0; padding: 15px; border: 1px solid #9db284; border-radius: 3px; background: #fbfbed; box-shadow: inset 1px 1px #fff, 2px 2px #5b773024; }
.course-card:hover { background: #f0f4df; border-color: #65854c; }
.course-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.course-card-top > .icon { width: 16px; height: 16px; color: #8ca175; }
.course-card h3 { font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; margin-bottom: 12px; }
.course-card-meta { display: flex; justify-content: space-between; gap: 7px; flex-wrap: wrap; font-size: 13px; color: #6a7e58; margin-top: auto; }
.pending-count { color: #987034; }
.course-card-checked { font-size: 12px; color: #7b866d; border-top: 1px solid #dce3ca; padding-top: 9px; margin-top: 11px; }
.event-list { padding: 0 17px; }
.event-list > li { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 13px; padding: 16px 0; border-top: 1px dashed #c4d1ad; }
.event-list > li:first-child { border-top: 0; }
.home-disclosure .event-list { padding: 0; }
.event-date { color: #698152; font-size: 15px; font-weight: 600; }
.event-body { min-width: 0; }
.event-body .eyebrow { font-size: 12px; }
.event-body h3 { margin-top: 3px; font-size: 16px; overflow-wrap: anywhere; }
.event-body small { display: block; margin-top: 5px; color: #778569; }
.event-details { margin-top: 8px; }
.event-body p { margin-top: 8px; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-line; }
.back-link { display: inline-block; margin-bottom: 17px; color: #647b51; font-size: 14px; }
.back-link:hover { text-decoration: underline; }
.course-page-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 19px; }
.course-page-heading > div { min-width: 0; }
.course-page-heading .eyebrow { margin-bottom: 4px; }
.course-page-heading h1 { font-size: 28px; overflow-wrap: anywhere; }
.checked-line { color: #687a5d; font-size: 14px; margin-top: 9px; }
.source-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.source-links > span { color: #76876a; font-size: 13px; }
.source-pill { max-width: 100%; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; background: #f6f7e8; border: 1px solid #aabd91; border-radius: 2px; font-size: 13px; color: #527145; overflow-wrap: anywhere; }
.source-pill .icon { width: 13px; height: 13px; }
.module-tabs { display: flex; align-items: stretch; gap: 5px; overflow-x: auto; border-bottom: 2px solid var(--frame); margin-bottom: 20px; padding: 0 0 5px; scrollbar-width: thin; scrollbar-color: #a6b88b transparent; }
.module-tab { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; flex: 1 0 auto; padding: 9px 11px; color: #63794f; background: #e0e8ce; border: 1px solid #9eb486; border-radius: 2px; }
.module-tab strong { font-size: 15px; font-weight: 600; }
.module-tab span { font-size: 12px; }
.module-tab.is-active { color: #fffbea; background: #4e7542; border-color: #3a5c31; box-shadow: inset 0 2px #91a675; }
.module-tab:hover { filter: brightness(.97); }
.module-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 18px; }
.module-heading h2 { font-size: 22px; min-width: 0; overflow-wrap: anywhere; }
.time-note { color: #738467; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; }
.time-note .icon { width: 13px; height: 13px; }
.resource-list, .notice-list, .email-list { display: grid; gap: 12px; }
.paginated-section { scroll-margin-top: 90px; }
.paginated-section:focus { outline: none; }
.paginated-section:focus-visible { outline: 3px solid #d6963e; outline-offset: 4px; }
.list-pagination { display: flex; align-items: center; justify-content: center; gap: 13px; margin-top: 18px; padding: 12px 8px; background: #e8eed8; border: 1px solid #a8ba8c; border-radius: 3px; box-shadow: inset 1px 1px #fbffec; }
.pagination-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 35px; padding: 6px 12px; border: 2px solid #78935a; border-radius: 2px; background: #d8e5bd; box-shadow: inset 1px 1px #f2f8df, 1px 2px #76924d40; color: #49653b; font-size: 13px; }
.pagination-button:hover:not(:disabled) { background: #c8dba6; }
.pagination-button:disabled { opacity: .45; cursor: default; box-shadow: inset 1px 1px #fff9; }
.pagination-button > span[aria-hidden] { font: 700 20px/1 ui-monospace, monospace; }
.pagination-position { min-width: 64px; text-align: center; font: 500 16px/1.5 ui-monospace, monospace; color: #697c56; }
.pagination-position strong { color: #3c5d31; font-weight: 750; }
.resource-card { display: flex; align-items: flex-start; gap: 12px; padding: 17px; background: #fffdf2; border: 1px solid #9fb18a; border-radius: 3px; box-shadow: 2px 2px #5c783225; min-width: 0; }
.resource-icon { display: grid; place-items: center; width: 32px; height: 37px; flex-shrink: 0; background: #e1ebcf; color: #60804a; border: 1px solid #9eb584; box-shadow: inset 1px 1px #fff9; }
.resource-icon .icon { width: 18px; height: 19px; }
.resource-content { min-width: 0; flex: 1; }
.resource-section-label { font-size: 13px; color: #7b886c; line-height: 1.6; margin-bottom: 4px; overflow-wrap: anywhere; }
.resource-content h3 { font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.resource-content > .eyebrow { display: inline-block; font-size: 12px; margin-bottom: 4px; }
.resource-url { margin-top: 6px; font-size: 13px; color: #6f865c; line-height: 1.7; overflow-wrap: anywhere; }
.resource-url a:hover { text-decoration: underline; text-underline-offset: 3px; }
.resource-open { width: 29px; height: 29px; margin-top: 4px; }
.resource-open .icon { width: 16px; height: 16px; }
.resource-card.is-unavailable { background: #f2f3e9; border-style: dashed; }
.resource-card.is-unavailable .resource-icon { background: #e8ebdc; color: #7b876c; }
.resource-card.is-unavailable h3 { color: #6c785f; }
.resource-card > .badge { flex-shrink: 0; margin-top: 4px; }
.availability-note { display: flex; align-items: flex-start; gap: 4px; font-size: 13px; color: #7e8669; line-height: 1.65; margin-top: 6px; }
.availability-note .icon { width: 13px; height: 15px; margin-top: 3px; }
.notice-card, .original-card, .email-card { padding: 20px; background: #fffdf2; border: 1px solid #9fb18a; border-radius: 3px; box-shadow: 2px 2px #5c783225; min-width: 0; }
.notice-card h3, .original-card h3 { font-size: 17px; line-height: 1.6; margin-bottom: 10px; overflow-wrap: anywhere; }
.notice-card > .eyebrow, .email-card > .eyebrow { display: block; font-size: 13px; margin-bottom: 8px; }
.notice-dates { display: flex; flex-wrap: wrap; gap: 5px 13px; font-size: 13px; color: #7b886d; margin-bottom: 12px; }
.notice-zh { color: #465c3f; font-size: 16px; line-height: 1.95; white-space: pre-line; overflow-wrap: anywhere; }
.notice-card .translation { font-size: 14px; line-height: 1.85; margin-top: 10px; white-space: pre-line; overflow-wrap: anywhere; }
.text-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #5a7d45; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link .icon { width: 13px; height: 13px; }
.notice-source, .email-source { margin-top: 15px; }
.original-card { margin-bottom: 12px; }
.original-text { font-size: 16px; color: #4b5e44; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; }
.original-card .text-link { margin-top: 15px; }
.search-results .notice-list, .search-results .email-list { margin-top: 12px; }
.home-search-results .event-panel { margin-top: 23px; }

/* Mail retains full original bodies and source links. */
.email-status-panel { display: flex; align-items: flex-start; gap: 12px; padding: 18px; margin-bottom: 20px; background: #f5f7e7; border: 1px solid #a6ba8d; border-radius: 3px; }
.email-status-icon { width: 34px; height: 34px; display: grid; place-items: center; background: #e0ebce; border: 1px solid #adc494; color: #62834a; flex-shrink: 0; }
.email-status-copy { min-width: 0; }
.email-status-heading { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; }
.email-account { font-size: 12px; color: #6c805b; overflow-wrap: anywhere; }
.email-status-copy p, .email-status-copy > small { font-size: 13px; color: #6c7c5e; line-height: 1.7; display: block; margin-top: 4px; }
.email-loaded-count { font-size: 13px; color: #647c50; margin-left: auto; }
.email-scope { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; font-size: 12px; color: #718461; }
.email-scope span { padding: 1px 5px; background: #e8eed9; border: 1px solid #cad8b5; }
.email-subject-row { display: flex; align-items: flex-start; gap: 9px; }
.email-subject-row > .icon { width: 18px; height: 21px; margin-top: 2px; color: #70945a; }
.email-subject-row h3 { min-width: 0; font-size: 17px; line-height: 1.6; overflow-wrap: anywhere; }
.email-meta { display: flex; flex-wrap: wrap; gap: 5px 15px; color: #758467; font-size: 13px; margin: 10px 0; overflow-wrap: anywhere; }
.email-body { margin-top: 11px; }
.email-body > summary { width: fit-content; color: #567d42; font-size: 14px; }
.email-collapse-label { display: none; }
.email-body[open] .email-collapse-label { display: inline; }
.email-body[open] .email-expand-label { display: none; }
.email-plain-text { margin-top: 12px; padding: 15px; color: #465b3f; background: #f1f4e4; border: 1px solid #c5d2ae; border-radius: 2px; font-size: 16px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.email-missing-body, .email-clipped-note { font-size: 13px; color: #8b7e55; line-height: 1.7; margin-top: 10px; }

/* Compact reminders and a small weekly calendar occupy the right column. */
.context-rail { display: grid; gap: 16px; min-width: 0; }
.rail-card { padding: 14px; min-width: 0; }
.rail-profile { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; background: #f6f4df; padding-top: 15px; padding-bottom: 16px; }
.rail-trainer { width: 62px; height: 80px; object-fit: contain; image-rendering: pixelated; }
.rail-trainer-stage { position: relative; display: flex; justify-content: center; width: 100%; height: 84px; }
.rail-trainer-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 70px; height: 84px; padding: 2px 4px; background: transparent; border: 0; border-radius: 2px; transform-origin: 50% 100%; }
.rail-trainer-button:hover { background: #e5eacb66; }
.rail-trainer-button:focus-visible { outline: 2px solid #a5832d; outline-offset: 3px; }
.trainer-dialogue { position: relative; margin-top: 4px; padding: 8px 9px; max-width: 100%; color: #26321e; background: #fff5c8; border: 2px solid #607443; border-radius: 2px; box-shadow: inset 1px 1px #fffde8, 3px 3px #3c512f30; font-size: 23px; line-height: 1.35; font-weight: 700; -webkit-text-stroke: .16px currentColor; paint-order: stroke fill; white-space: normal; overflow-wrap: anywhere; pointer-events: none; }
.trainer-dialogue::after { content: ""; position: absolute; top: -7px; left: calc(50% - 4px); width: 8px; height: 8px; background: #fff5c8; border-left: 2px solid #607443; border-top: 2px solid #607443; transform: rotate(45deg); }
.rail-profile strong { font-size: 16px; }
.rail-profile p { margin-top: 4px; color: #7c8263; font-size: 12px; }
.rail-heading { display: flex; align-items: center; gap: 7px; padding-bottom: 9px; margin-bottom: 10px; border-bottom: 1px dashed #becda7; }
.rail-heading .icon { color: #6b8755; width: 18px; height: 18px; }
.rail-heading h2 { font-size: 16px; }
.rail-month { color: #5e7550; font-size: 13px; margin-bottom: 9px; }
.mini-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.mini-day { min-width: 0; display: flex; align-items: center; flex-direction: column; padding: 3px 0; gap: 6px; font-size: 11px; color: #7d8b6f; }
.mini-day strong { font-size: 13px; line-height: 1; color: #516944; }
.mini-day.is-today { background: #5d824b; border-radius: 2px; color: #eef2da; box-shadow: inset 1px 1px #9daf75; }
.mini-day.is-today strong { color: #fffde8; }
.rail-timezone { font-size: 11px; color: #889576; margin-top: 9px; }
.rail-reminders > li { padding: 11px 0; border-bottom: 1px dashed #c5d1b0; }
.rail-reminders > li:first-child { padding-top: 1px; }
.rail-reminders > li:last-child { border-bottom: 0; }
.rail-reminders > li > span { display: block; font-size: 11px; color: #7e8b6c; overflow-wrap: anywhere; }
.rail-reminders h3 { font-size: 14px; line-height: 1.5; margin: 3px 0 5px; overflow-wrap: anywhere; }
.rail-reminders time { font-size: 12px; color: #8e743d; }
.rail-empty { font-size: 13px; color: #7e8c6e; line-height: 1.7; }
.rail-link { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; padding: 7px 8px; margin-top: 11px; font-size: 12px; background: #e7efd5; color: #5b7848; border: 1px solid #afc294; border-radius: 2px; }
.rail-link:hover { background: #d7e5bd; }
.rail-link .icon { width: 13px; height: 13px; }
.rail-mail-count { font-size: 13px; color: #677d54; }
.rail-mail-count strong { font: 650 24px/1.3 ui-monospace, monospace; color: #496b3c; }
.rail-mail > p:not(.rail-mail-count), .rail-mail > small { font-size: 12px; color: #7c8b6c; display: block; margin-top: 5px; }

/* Feedback and connection state remain visible in the workspace. */
.connection-banner, .request-feedback { padding: 11px 14px; margin-bottom: 16px; border: 1px solid #cbbd8a; border-radius: 3px; background: #fff1d1; color: #8f6c34; font-size: 14px; }
.request-feedback { display: flex; align-items: flex-start; gap: 8px; }
.request-feedback .icon { width: 17px; height: 20px; }
.request-feedback.success { background: #e8f1dc; border-color: #a2bf83; color: #527443; }
.request-feedback.pending { background: #e6f0ed; border-color: #a3bcb2; color: #526f66; }
.empty-state { padding: 42px 20px; text-align: center; color: #7c8e6a; }
.empty-state.compact { padding: 29px 18px; }
.empty-icon { display: inline-grid; place-items: center; width: 43px; height: 43px; color: #8ca573; background: #e9efd9; border: 1px solid #c3d2ab; border-radius: 3px; margin-bottom: 12px; }
.empty-state h3 { color: #667e54; font-size: 16px; }
.empty-state p { color: #7d8e6d; font-size: 14px; margin-top: 7px; }
.page-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; padding: 20px 1px 0; color: #7d8c6e; font-size: 12px; }
.loading-state { padding: 70px 25px; text-align: center; }
.loading-state h1 { font-size: 23px; margin-top: 18px; }
.loading-state p { color: #778b64; margin-top: 8px; font-size: 15px; }
.loading-ring { display: inline-block; width: 35px; height: 35px; border: 3px solid #cedabc; border-top-color: #5f804c; border-radius: 50%; animation: spin .9s linear infinite; }
.toast { position: fixed; z-index: 80; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 12px 17px; width: max-content; max-width: calc(100vw - 32px); color: #f8f8e8; background: #49673c; border: 2px solid #2e4a29; border-radius: 3px; box-shadow: 3px 3px #2b472d33; font-size: 14px; }
.noscript-message { position: fixed; inset: auto 16px 16px; padding: 15px; background: #fff1d4; border: 2px solid #9d7a42; z-index: 90; }
.pulsing { animation: pulse 1.5s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .45; } }

@media (min-width: 1500px) {
  .app-layout { grid-template-columns: 250px minmax(0, 1fr) 230px; gap: 24px; }
  .course-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .exam-entry { grid-template-columns: 88px minmax(0, 1fr); gap: 15px; }
  .exam-countdown-ring { width: 88px; height: 88px; }
  .exam-ring-number { font-size: 32px; }
}
@media (max-width: 1250px) {
  .app-layout { gap: 16px; padding-left: 16px; padding-right: 16px; grid-template-columns: 235px minmax(0, 1fr) 205px; }
  .topbar { gap: 12px; padding-left: 16px; padding-right: 16px; }
  .top-navigation a, .top-navigation button { padding-left: 10px; padding-right: 10px; }
  .search-shortcut { display: none; }
  .exam-list { grid-template-columns: minmax(0, 1fr); }
  .exam-entry:nth-child(2) { border-top: 1px dashed #bdcba5; }
  .task-column-labels { display: none; }
  .task-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; }
  .task-state { grid-column: 2; grid-row: 1; max-width: 120px; align-items: flex-end; }
  .task-due { grid-column: 1; grid-row: 2; }
  .task-action { grid-column: 2; grid-row: 2; justify-self: end; }
}
@media (max-width: 1100px) {
  .app-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 18px; }
  .sidebar { grid-row: 1 / span 2; }
  .context-rail { grid-column: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .rail-profile { display: none; }
  .rail-mail { grid-column: 1 / -1; }
  .topbar-avatar { display: none; }
  .top-navigation { gap: 1px; }
  .top-navigation a, .top-navigation button { font-size: 15px; }
  .topbar { gap: 9px; }
  .search-box { flex: 1; width: auto; }
  .search-box input { font-size: 14px; }
  .campus-banner { height: 150px; }
}
@media (max-width: 820px) {
  .app-layout { display: block; padding: 19px 16px 28px; }
  .workspace { width: 100%; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; max-width: calc(100vw - 38px); z-index: 60; overflow-y: auto; border-radius: 0; transform: translateX(-102%); transition: transform .18s ease; }
  .menu-open .sidebar { transform: translateX(0); }
  .mobile-backdrop { position: fixed; inset: 0; z-index: 50; background: #263c2466; }
  .menu-button { display: inline-flex; flex-shrink: 0; }
  .context-rail { display: none; }
  .topbar { flex-wrap: wrap; gap: 8px 11px; padding: 9px 16px; }
  .top-navigation { flex: 1; overflow-x: auto; }
  .top-navigation a, .top-navigation button { min-height: 35px; padding: 4px 11px; }
  .search-box { flex-basis: 55%; order: 2; }
  .topbar-actions { order: 3; }
  .campus-banner { height: 130px; background-position: 58% center; }
  .campus-dragon-track { --dragon-size: 58px; height: 68px; }
  .campus-dragon-sprite { height: 58px; max-width: 58px; }
  .campus-sign { top: 20px; left: 21px; min-width: 160px; padding: 10px 19px; }
  .campus-sign strong { font-size: 26px; }
  .campus-sign span { font-size: 14px; }
  .exam-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exam-entry:nth-child(2) { border-top: 0; }
  .task-panel, .home-disclosure, .paginated-section { scroll-margin-top: 134px; }
}
@media (max-width: 620px) {
  .campus-banner { height: 108px; background-position: 61% center; }
  .campus-dragon-track { --dragon-size: 42px; height: 54px; }
  .campus-dragon-sprite { height: 42px; max-width: 42px; }
  .campus-dragon-flame { width: 52px; height: 24px; }
  .campus-dragon-flame::before { inset: 3px 0 3px 5px; }
  .campus-dragon-flame::after { inset: 6px 0 6px 15px; }
  .campus-dragon-shadow { left: 10px; width: 23px; height: 3px; }
  .campus-dragon-stars { top: -17px; width: 49px; font-size: 14px; letter-spacing: 1px; }
  .campus-sign { top: 17px; left: 16px; min-width: 134px; padding: 7px 14px 9px; border-width: 3px; box-shadow: inset 0 0 0 2px #c8a36b, inset 0 -5px #6c5439, 3px 3px #30482d80; }
  .campus-sign strong { font-size: 23px; letter-spacing: 3px; }
  .campus-sign span { font-size: 12px; letter-spacing: 4px; margin-top: 2px; }
  .campus-sign::before, .campus-sign::after { width: 3px; height: 3px; top: 8px; }
  .campus-sign::before { left: 6px; }
  .campus-sign::after { right: 6px; }
  .topbar { display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; padding: 8px 12px 10px; gap: 8px; min-height: 0; }
  .menu-button { grid-column: 1; grid-row: 1; width: 31px; height: 33px; }
  .top-navigation { grid-column: 2 / 4; grid-row: 1; min-width: 0; width: 100%; gap: 2px; scrollbar-width: none; }
  .top-navigation::-webkit-scrollbar { display: none; }
  .top-navigation a, .top-navigation button { padding: 4px 9px; font-size: 14px; min-height: 33px; flex-shrink: 0; }
  .search-box { grid-column: 1 / 3; grid-row: 2; width: 100%; min-width: 0; padding: 0 8px; gap: 6px; }
  .search-box > svg { width: 16px; height: 16px; }
  .search-box input { padding: 7px 0; font-size: 16px; }
  .topbar-actions { grid-column: 3; grid-row: 2; }
  .check-button { font-size: 13px; min-height: 39px; gap: 5px; padding: 7px 8px; }
  .check-button > svg { width: 15px; height: 15px; }
  .app-layout { padding: 19px 12px 25px; }
  .page-heading { align-items: flex-start; gap: 9px; margin-bottom: 14px; }
  .page-heading h1 { font-size: 26px; }
  .term-chip { font-size: 11px; padding: 4px 6px; margin-top: 4px; }
  .home-summary { gap: 7px; margin-bottom: 17px; }
  .home-summary-item { flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px; font-size: 13px; }
  .home-summary-item strong { font-size: 24px; }
  .panel-heading { padding: 12px 13px; gap: 9px; }
  .panel-heading h2 { font-size: 19px; }
  .login-panel-content { padding: 14px; }
  .login-actions { gap: 8px; }
  .login-actions .button { flex: 1 1 auto; justify-content: center; }
  .panel-heading .filter-label { margin-left: auto; }
  .filter-label select { font-size: 12px; padding-left: 7px; padding-right: 22px; }
  .exam-panel-content { padding: 10px 13px 13px; }
  .exam-list { grid-template-columns: minmax(0, 1fr); }
  .exam-entry { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 15px 0; }
  .exam-entry:nth-child(2) { border-top: 1px dashed #bdcba5; }
  .exam-countdown-ring { width: 76px; height: 76px; }
  .exam-entry h3 { font-size: 16px; }
  .exam-time { font-size: 15px; }
  .exam-personal-note, .exam-coverage { margin-left: 13px; margin-right: 13px; }
  .exam-panel-footer { padding-left: 13px; padding-right: 13px; }
  .task-row { padding: 15px 13px; gap: 10px; }
  .task-row.is-overdue { padding-left: 10px; }
  .task-state { max-width: 108px; }
  .task-name h3 { font-size: 16px; }
  .task-due { font-size: 15px; }
  .badge { font-size: 11px; padding: 3px 5px; }
  .home-disclosure > summary { padding: 12px 13px; gap: 7px; font-size: 15px; flex-wrap: wrap; }
  .home-disclosure > summary > small { font-size: 12px; }
  .home-disclosure-content { padding: 13px; }
  .course-card-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .course-card { padding: 14px; }
  .event-list { padding: 0 13px; }
  .event-list > li { grid-template-columns: 50px minmax(0, 1fr); gap: 10px; }
  .course-page-heading { gap: 11px; }
  .course-page-heading .hero { width: 42px; height: 44px; font-size: 14px; }
  .course-page-heading h1 { font-size: 27px; }
  .checked-line { font-size: 13px; }
  .source-links { gap: 6px; margin-bottom: 17px; }
  .module-tabs { gap: 5px; margin-bottom: 17px; }
  .module-tab { padding: 8px 10px; }
  .module-tab strong { font-size: 14px; }
  .module-tab span { font-size: 12px; }
  .module-heading h2 { font-size: 21px; }
  .resource-card { padding: 14px 12px; gap: 9px; flex-wrap: wrap; }
  .resource-icon { width: 28px; height: 33px; }
  .resource-content { flex-basis: calc(100% - 40px); }
  .resource-card > .badge, .resource-open { margin-left: auto; }
  .resource-content h3 { font-size: 16px; }
  .resource-url { font-size: 13px; }
  .list-pagination { gap: 8px; padding: 10px 6px; }
  .pagination-button { padding: 5px 8px; gap: 5px; font-size: 12px; }
  .pagination-position { min-width: 59px; font-size: 15px; }
  .home-pagination .pagination-position { min-width: 116px; }
  .home-pagination .pagination-position small { font-size: 11px; }
  .notice-card, .original-card, .email-card { padding: 16px 14px; }
  .notice-card h3, .original-card h3, .email-subject-row h3 { font-size: 16px; }
  .notice-zh, .original-text, .email-plain-text { font-size: 16px; }
  .email-status-panel { padding: 15px 12px; gap: 9px; flex-wrap: wrap; }
  .email-loaded-count { margin-left: 43px; font-size: 12px; }
  .email-status-copy { flex: 1; }
  .email-meta { display: grid; gap: 5px; font-size: 12px; }
  .email-plain-text { padding: 12px; }
  .email-subject-row { gap: 7px; }
  .page-footer { font-size: 12px; padding-top: 18px; }
  .empty-state.compact { padding: 25px 13px; }
}
/* Strong text contrast on the pale paper and sage surfaces. */
.nav-course-name { font-size: 16px; font-weight: 550; color: #1d281b; }
.top-navigation a, .top-navigation button, .brand strong, .page-heading h1, .course-page-heading h1,
.panel-heading h2, .section-heading h2, .module-heading h2, .home-disclosure > summary,
.course-card h3, .resource-content h3, .task-name h3, .event-body h3,
.exam-entry h3, .notice-card h3, .original-card h3, .email-subject-row h3,
.rail-heading h2, .rail-profile strong, .rail-reminders h3 { color: #1d281b; }
.resource-content h3, .task-name h3, .event-body h3, .course-card h3 { font-size: 17px; font-weight: 600; }
.notice-zh, .original-text, .email-plain-text { color: #263223; font-size: 17px; font-weight: 500; }
.task-description, .event-body p { color: #34432d; font-size: 15px; font-weight: 500; }
.eyebrow, .checked-line, .source-links > span, .source-pill, .time-note,
.sidebar-footer p, .last-check, .last-check span, .sidebar-profile small,
.sidebar-course-count, .course-search-empty,
.search-box, .search-shortcut, .filter-label select, .term-chip,
.page-heading > div > p, .panel-heading p, .section-heading p,
.count-label, .inline-count, .course-card-meta, .course-card-checked,
.task-column-labels, .task-detail, .file-detail, .grading-status, .task-due, .task-due small,
.resource-section-label, .resource-url, .availability-note, .resource-card.is-unavailable h3,
.notice-dates, .translation, .notice-card .translation,
.exam-panel-meta, .exam-month-filter > summary, .exam-month-filter > summary > span,
.exam-entry-details > summary, .exam-original-title, .exam-location, .exam-location-original,
.exam-registration, .exam-time-note, .exam-rooms, .exam-time,
.exam-personal-note, .exam-coverage, .exam-panel-footer, .exam-panel-footer a,
.home-disclosure > summary > small, .home-disclosure > summary::after,
.event-date, .event-body small, .task-details > summary, .event-details > summary,
.email-account, .email-status-copy p, .email-status-copy > small, .email-loaded-count,
.email-scope, .email-meta, .email-body > summary, .email-missing-body, .email-clipped-note,
.text-link, .back-link, .rail-profile p, .rail-month, .rail-timezone, .rail-empty,
.rail-reminders > li > span, .rail-reminders time, .rail-mail-count, .rail-mail > p:not(.rail-mail-count), .rail-mail > small,
.mini-day, .mini-day strong, .pagination-position, .home-pagination .pagination-position small,
.empty-state, .empty-state h3, .empty-state p, .page-footer, .loading-state p { color: #46533f; }
.search-box input::placeholder, .sidebar-search input::placeholder { color: #52614a; opacity: 1; }
.sidebar-search input, .search-box input { color: #1d281b; font-weight: 500; }
.brand small, .sidebar-profile small, .sidebar-course-count, .term-chip, .search-shortcut,
.task-column-labels, .task-name .eyebrow, .grading-status, .task-detail, .file-detail, .task-due small,
.badge, .course-card-checked, .event-body .eyebrow, .module-tab span, .time-note,
.resource-content > .eyebrow, .email-account, .email-scope, .email-meta, .email-loaded-count,
.exam-ring-label, .exam-ring-unit, .exam-time-uncertain, .exam-location-original,
.exam-panel-footer, .home-disclosure > summary > small, .rail-profile p,
.rail-timezone, .rail-reminders > li > span, .rail-reminders time, .rail-link,
.rail-mail > p:not(.rail-mail-count), .rail-mail > small, .mini-day, .mini-day strong,
.home-pagination .pagination-position small, .page-footer { font-size: 13px; }
.checked-line, .resource-section-label, .resource-url, .availability-note,
.notice-dates, .email-status-copy p, .email-status-copy > small, .exam-entry-details > summary,
.exam-personal-note, .exam-coverage, .exam-panel-meta, .course-card-meta, .count-label, .inline-count { font-size: 14px; }
.button-primary, .module-tab.is-active { color: #fffef5; background: #345b31; border-color: #294525; }
.button-primary:hover { background: #294b28; }
.button, .pagination-button, .home-summary-item, .sidebar-home, .rail-link { font-weight: 600; }
.home-summary-item, .home-summary-item strong, .home-summary-item.is-selected, .pagination-position strong { color: #2d4824; }
.pagination-button, .rail-link, .exam-toggle, .exam-month-all, .exam-bar-row { color: #344d29; }
.sidebar-home { color: #4e4018; }
.badge-neutral { color: #46533f; }
.badge-success { color: #36532b; }
.badge-warning, .pending-count, .exam-time-uncertain { color: #765219; }
.badge-danger, .text-danger { color: #983b30 !important; }
.tone-normal { color: #173f32; }
.tone-soon { color: #795514; }
.tone-urgent { color: #923e31; }
.tone-muted { color: #4e5b43; }
.mini-day.is-today, .mini-day.is-today strong { color: #fffef4; background: #3f6136; }
.pagination-button:disabled { opacity: 1; color: #526148; background: #e2e8d4; border-color: #a2af91; }
.button:disabled { opacity: 1; color: #fffef5; background: #52694a; }
.home-dashboard .exam-ring-label, .home-dashboard .exam-ring-unit, .exam-bar-row,
.filter-label select, .pagination-button, .course-monogram { font-size: 13px; }
@media (max-width: 620px) { .campus-sign span { font-size: 13px; } }

/* Titles retain a slightly stronger edge than the rest of the text. */
.page-heading h1, .course-page-heading h1 {
  font-size: 30px;
  font-weight: 700;
  -webkit-text-stroke: .25px currentColor;
  paint-order: stroke fill;
}
.panel-heading h2, .section-heading h2, .module-heading h2 {
  font-size: 22px;
  font-weight: 650;
  -webkit-text-stroke: .25px currentColor;
  paint-order: stroke fill;
}
.nav-course-name, .top-navigation a, .top-navigation button,
.button-primary, .sidebar-home, .pagination-button {
  font-weight: 600;
  -webkit-text-stroke: .16px currentColor;
  paint-order: stroke fill;
}
.nav-course-name { font-size: 17px; }
.button-primary, .sidebar-home { font-size: 15px; }
.task-description, .event-body p, .notice-card .translation { font-size: 17px; }
.task-due, .checked-line, .notice-dates, .email-meta, .event-date { font-size: 15px; }
.home-dashboard .exam-time { font-size: 16px; }
@media (max-width: 620px) {
  .page-heading h1, .course-page-heading h1 { font-size: 28px; }
  .panel-heading h2, .section-heading h2 { font-size: 21px; }
  .button-primary { font-size: 14px; }
}

/* Small, deliberate pixel-game responses; content remains still at rest. */
@media (prefers-reduced-motion: no-preference) {
  .campus-dragon-walker { animation: dragon-walk 50s linear infinite; }
  .campus-dragon-hop { animation: dragon-hop 3.8s steps(4, end) infinite; }
  .campus-dragon-facing { animation: dragon-facing 50s steps(1, end) infinite; }
  .campus-dragon-button { animation: dragon-impact 50s linear infinite; }
  .campus-dragon-stars { animation: dragon-dizzy 50s steps(1, end) infinite; }
  /* 喷火是叠加特效，不能暂停行走、转身或碰撞动画。 */
  .campus-dragon-walker.is-breathing .campus-dragon-flame { animation: dragon-fire 650ms steps(4, end) 1; }
  .course-pixel-icon, .sidebar-home img { transform-origin: 50% 90%; }
  .nav-course:focus-visible .course-pixel-icon, .sidebar-home:focus-visible img { animation: pokemon-hop 440ms steps(3, end) 1; }
  .button, .icon-button, .pagination-button, .home-summary-item, .sidebar-home, .top-navigation button, .top-navigation a, .rail-link, .exam-toggle, .exam-month-all {
    transition: transform 90ms steps(2, end), box-shadow 90ms steps(2, end), background-color 140ms ease-out, border-color 140ms ease-out;
  }
  .button:active:not(:disabled), .icon-button:active:not(:disabled), .pagination-button:active:not(:disabled), .home-summary-item:active, .sidebar-home:active, .top-navigation button:active, .top-navigation a:active, .rail-link:active, .exam-toggle:active, .exam-month-all:active {
    transform: translateY(2px);
    box-shadow: inset 1px 2px #3b58252b;
  }
  .course-card, .resource-card { transition: transform 160ms ease-out, box-shadow 160ms ease-out, border-color 160ms ease-out; }
  .course-card:focus-visible { transform: translateY(-2px); box-shadow: inset 1px 1px #fff, 3px 4px #5b773030; }
  @media (hover: hover) and (pointer: fine) {
    .nav-course:hover .course-pixel-icon, .sidebar-home:hover img { animation: pokemon-hop 440ms steps(3, end) 1; }
    .course-card:hover, .resource-card:hover { transform: translateY(-2px); box-shadow: inset 1px 1px #fff, 3px 4px #5b773030; }
  }
}
@keyframes dragon-walk {
  0%, 100% { left: calc(100% - var(--dragon-size)); }
  45% { left: var(--dragon-left-limit); }
  46%, 49% { left: var(--dragon-bounce-limit); }
}
@keyframes dragon-hop {
  0%, 64%, 80%, 100% { transform: translateY(0); }
  72% { transform: translateY(-10px); }
  88% { transform: translateY(-7px); }
  96% { transform: translateY(0); }
}
@keyframes dragon-facing {
  0%, 48.9% { transform: scaleX(1); }
  49%, 100% { transform: scaleX(-1); }
}
@keyframes dragon-impact {
  0%, 44.9%, 49%, 100% { transform: rotate(0); }
  45.3% { transform: rotate(12deg); }
  45.8%, 47% { transform: rotate(-5deg); }
  46.4%, 47.7% { transform: rotate(5deg); }
  48.4% { transform: rotate(-3deg); }
}
@keyframes dragon-dizzy {
  0%, 44.9%, 49%, 100% { visibility: hidden; opacity: 0; transform: translateX(-50%); }
  45.3%, 46.5%, 47.7% { visibility: visible; opacity: 1; transform: translateX(-50%) rotate(-10deg); }
  45.9%, 47.1%, 48.3% { visibility: visible; opacity: 1; transform: translateX(-50%) rotate(10deg); }
}
@keyframes dragon-fire {
  0% { transform: scaleX(.16); opacity: .3; }
  20% { transform: scaleX(.65); opacity: 1; }
  45%, 70% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(.4); opacity: 0; }
}
@keyframes pokemon-hop {
  0%, 100% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(-5px) rotate(-3deg); }
  60% { transform: translateY(-3px) rotate(3deg); }
  80% { transform: translateY(-1px) rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* A consistent fine edge is inherited by body text and all form controls. */
body, input, select, option, textarea, button {
  -webkit-text-stroke: .16px currentColor;
  paint-order: stroke fill;
}
