:root {
  color-scheme: light;
  --navy: #173b63;
  --navy-dark: #102b49;
  --blue-soft: #e9f1f9;
  --ink: #192b3e;
  --muted: #647386;
  --line: #dce4ec;
  --surface: #ffffff;
  --page: #f4f7fa;
  --green: #18765c;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--page); }
body { margin: 0; color: var(--ink); background: var(--page); min-height: 100vh; }
a { color: inherit; }
.site-header { background: var(--navy); color: #fff; box-shadow: 0 3px 18px rgb(16 43 73 / 12%); }
.header-inner { max-width: 1080px; min-height: 76px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--navy); font-size: 1.4rem; font-weight: 850; letter-spacing: -.04em; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1rem; letter-spacing: .08em; }
.brand-text span { font-size: .78rem; color: #d9e7f5; margin-top: 4px; }
.header-link { margin-left: auto; color: #fff; text-decoration: none; border: 1px solid rgb(255 255 255 / 45%); border-radius: 999px; padding: 10px 14px; font-size: .9rem; font-weight: 650; }
.header-link:hover { background: rgb(255 255 255 / 10%); }
.page-shell { width: min(100% - 36px, 1032px); margin: 0 auto; padding: 36px 0 20px; }
.eyebrow { color: var(--green); font-size: .72rem; font-weight: 800; letter-spacing: .13em; margin-bottom: 11px; }
h1, h2, h3, p { margin-top: 0; }
h1 { color: var(--navy-dark); font-size: clamp(1.8rem, 4vw, 2.35rem); line-height: 1.14; letter-spacing: -.035em; margin-bottom: 10px; }
h2 { color: var(--navy-dark); font-size: 1.45rem; letter-spacing: -.025em; margin-bottom: 6px; }
.intro { color: var(--muted); line-height: 1.6; margin-bottom: 0; }
.login-panel { width: min(100%, 460px); margin: 28px auto 0; padding: clamp(24px, 5vw, 40px); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 12px 40px rgb(23 59 99 / 7%); }
.login-form { display: flex; flex-direction: column; margin-top: 26px; }
.login-form label { color: #33465a; font-weight: 700; font-size: .9rem; margin: 0 0 7px; }
.login-form input[type="text"], .login-form input[type="password"] { width: 100%; min-height: 48px; margin-bottom: 18px; border: 1px solid #cbd6e1; border-radius: 10px; padding: 12px 13px; color: var(--ink); background: #fff; font: inherit; }
.login-form input:focus { outline: 3px solid #c7ddf2; border-color: #477bac; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid transparent; border-radius: 10px; padding: 11px 16px; font: inherit; font-size: .92rem; font-weight: 750; text-decoration: none; cursor: pointer; transition: background .12s ease, transform .12s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--navy); color: #fff; }
.button-primary:hover { background: var(--navy-dark); }
.button-secondary { background: #fff; border-color: #cbd6e1; color: var(--navy); }
.button-secondary:hover { background: var(--blue-soft); }
.button-full { width: 100%; margin-top: 4px; }
.privacy-note { margin: 20px 0 0; color: #748195; font-size: .78rem; line-height: 1.55; }
.welcome-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.welcome-row h1 { overflow-wrap: anywhere; }
.logout-form { flex: 0 0 auto; padding-top: 6px; }
.section-nav { display: flex; flex-wrap: wrap; gap: 9px; margin: 30px 0 28px; border-bottom: 1px solid var(--line); padding-bottom: 17px; }
.nav-pill { min-height: 40px; display: inline-flex; align-items: center; gap: 9px; border-radius: 999px; padding: 9px 15px; font-size: .88rem; font-weight: 750; }
.nav-pill-active { background: var(--navy); color: #fff; }
.nav-pill-disabled { background: #e9eef3; color: #788797; }
.nav-pill small { font-size: .67rem; text-transform: uppercase; letter-spacing: .04em; }
.content-section { margin-top: 0; }
.section-heading { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; }
.section-heading p { margin-bottom: 0; color: var(--muted); font-size: .92rem; }
.count-badge { margin-left: auto; min-width: 38px; height: 38px; display: grid; place-items: center; background: var(--blue-soft); color: var(--navy); border-radius: 50%; font-weight: 800; }
.course-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.course-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; padding: 21px; box-shadow: 0 5px 18px rgb(23 59 99 / 4%); display: flex; flex-direction: column; }
.course-card-top { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.course-dot { width: 9px; height: 9px; border-radius: 50%; background: #2b9276; box-shadow: 0 0 0 4px #e3f3ee; flex: 0 0 auto; }
.course-code { color: #63758a; font-size: .76rem; font-weight: 800; letter-spacing: .06em; overflow-wrap: anywhere; }
.course-card h3 { font-size: 1.1rem; line-height: 1.4; color: var(--navy-dark); margin-bottom: 10px; overflow-wrap: anywhere; }
.teacher-line { color: var(--muted); font-size: .84rem; line-height: 1.5; margin-bottom: 16px; }
.course-link { display: inline-flex; gap: 8px; align-items: center; align-self: flex-start; color: var(--navy); text-decoration: none; font-size: .88rem; font-weight: 800; margin-top: auto; padding-top: 7px; }
.course-link:hover { text-decoration: underline; }
.empty-state { padding: 36px 22px; background: #fff; border: 1px dashed #cbd6e1; border-radius: 18px; text-align: center; }
.empty-icon { width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 15px; background: var(--blue-soft); color: var(--navy); display: grid; place-items: center; font-size: 1.55rem; }
.empty-state h3 { color: var(--navy-dark); margin-bottom: 8px; }
.empty-state p { max-width: 600px; margin: 0 auto 20px; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.bottom-action { display: flex; justify-content: center; margin: 28px 0 0; }
.notice, .alert { padding: 13px 16px; border-radius: 11px; margin-bottom: 18px; font-size: .9rem; line-height: 1.5; }
.notice { background: #e7f5ef; color: #155d47; border: 1px solid #c6e8da; }
.alert { background: #fff2ef; color: #8b3023; border: 1px solid #f1d0c9; }
.site-footer { padding: 34px 0 6px; text-align: center; color: #8592a1; font-size: .76rem; }

@media (max-width: 640px) {
  .header-inner { min-height: 68px; padding: 12px 16px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-text strong { font-size: .9rem; }
  .header-link { font-size: .77rem; padding: 9px 10px; }
  .page-shell { width: min(100% - 28px, 1032px); padding-top: 25px; }
  .login-panel { margin-top: 16px; border-radius: 18px; }
  .welcome-row { flex-direction: column; gap: 16px; }
  .logout-form { padding-top: 0; }
  .section-nav { gap: 7px; margin-top: 24px; }
  .nav-pill { padding: 8px 11px; font-size: .8rem; }
  .course-grid { grid-template-columns: 1fr; gap: 12px; }
  .course-card { padding: 18px; }
  .section-heading { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Working mobile sections and install controls. */
.header-actions { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.header-actions .header-link { margin-left: 0; }
.install-button { min-height: 40px; border: 1px solid rgb(255 255 255 / 55%); border-radius: 999px; padding: 9px 12px; font: inherit; font-size: .82rem; font-weight: 750; color: var(--navy); background: #fff; cursor: pointer; }
.install-button:hover { background: #e9f1f9; }
.install-help { width: min(100% - 28px, 1032px); margin: 12px auto -14px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font-size: .83rem; line-height: 1.5; }
.nav-pill { color: var(--navy); text-decoration: none; }
.nav-pill-active { color: #fff; }
.nav-pill:not(.nav-pill-active) { background: #e9eef3; }
.nav-pill:not(.nav-pill-active):hover { background: #dce7f1; }
.course-open-form { display: flex; margin-top: auto; }
.course-link { appearance: none; border: 0; background: transparent; font-family: inherit; cursor: pointer; text-align: left; }
.course-filter { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 18px; margin-bottom: 18px; }
.course-filter label { display: block; font-size: .88rem; font-weight: 750; color: #33465a; margin-bottom: 8px; }
.filter-controls { display: flex; gap: 10px; }
.filter-controls select { flex: 1; min-width: 0; min-height: 44px; border: 1px solid #cbd6e1; border-radius: 10px; padding: 9px 12px; background: white; color: var(--ink); font: inherit; }
.filter-controls select:focus { outline: 3px solid #c7ddf2; border-color: #477bac; }
.announcement-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.announcement-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 19px; box-shadow: 0 5px 18px rgb(23 59 99 / 4%); display: flex; flex-direction: column; min-width: 0; }
.announcement-kicker { color: var(--green); font-size: .72rem; font-weight: 800; letter-spacing: .04em; margin-bottom: 10px; overflow-wrap: anywhere; }
.announcement-card h3 { color: var(--navy-dark); font-size: 1.02rem; line-height: 1.4; margin-bottom: 8px; overflow-wrap: anywhere; }
.announcement-meta { color: var(--muted); font-size: .8rem; line-height: 1.5; margin-bottom: 14px; }
.profile-card { width: min(100%, 650px); margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 4vw, 32px); box-shadow: 0 5px 18px rgb(23 59 99 / 4%); }
.profile-avatar { width: 66px; height: 66px; border-radius: 20px; display: grid; place-items: center; background: var(--blue-soft); color: var(--navy); font-size: 1.8rem; font-weight: 850; margin-bottom: 14px; }
.profile-name { color: var(--navy-dark); font-size: 1.25rem; line-height: 1.4; overflow-wrap: anywhere; margin-bottom: 18px; }
.profile-fields { margin: 0 0 12px; }
.profile-field { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(0, 1.4fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.profile-field dt { color: var(--muted); font-size: .87rem; }
.profile-field dd { margin: 0; color: var(--ink); font-weight: 650; font-size: .9rem; overflow-wrap: anywhere; }
.profile-card .button { margin-top: 8px; }
[hidden] { display: none !important; }

@media (max-width: 640px) {
  .header-inner { align-items: flex-start; gap: 9px; }
  .header-actions { gap: 6px; }
  .install-button { font-size: .72rem; min-height: 36px; padding: 7px 9px; }
  .header-link { font-size: .72rem; padding: 8px 9px; }
  .announcement-list { grid-template-columns: 1fr; }
  .filter-controls { flex-direction: column; }
  .filter-controls .button { width: 100%; }
  .profile-field { grid-template-columns: 1fr; gap: 4px; }
}
