:root {
  --navy: #12365d;
  --blue: #2368a2;
  --blue-2: #2f80c9;
  --teal: #087d78;
  --ink: #182433;
  --muted: #65758b;
  --line: #d9e2ec;
  --soft: #f3f7fb;
  --white: #fff;
  --green: #18794e;
  --amber: #9a6700;
  --red: #b42318;
  --shadow: 0 14px 38px rgba(18, 54, 93, .09);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--soft); }
body { margin: 0; min-height: 100vh; color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; background: radial-gradient(circle at top right, #dcecf7 0, transparent 28rem), var(--soft); }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; }
.site-header { color: #fff; background: linear-gradient(110deg, #102f52, #184d7b); border-bottom: 4px solid #4ba0d8; }
.header-inner, .nav-inner, .page { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.header-inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 13px; color: #fff; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.42); border-radius: 12px; font-weight: 850; letter-spacing: .04em; background: rgba(255,255,255,.09); }
.brand strong { display: block; font-size: 1.18rem; }
.brand small { display: block; margin-top: 3px; color: #cae1f4; }
.instructor-identity { margin-left: auto; padding: 9px 16px; text-align: right; border-right: 1px solid rgba(255,255,255,.22); }
.instructor-identity span, .instructor-identity small { display: block; color: #cae1f4; }
.instructor-identity span { margin-bottom: 2px; font-size: .66rem; font-weight: 850; letter-spacing: .12em; }
.instructor-identity strong { display: block; color: #fff; font-size: 1rem; }
.instructor-identity small { margin-top: 2px; font-size: .73rem; }
.account { display: flex; align-items: center; gap: 14px; font-size: .9rem; }
.account form { margin: 0; }
.link-button { border: 1px solid rgba(255,255,255,.38); background: transparent; color: #fff; padding: 7px 11px; border-radius: 8px; cursor: pointer; }
.nav { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 4px 14px rgba(18,54,93,.04); }
.nav-inner { display: flex; gap: 6px; overflow-x: auto; }
.nav a { padding: 13px 15px; text-decoration: none; font-weight: 720; color: var(--navy); white-space: nowrap; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--blue); border-color: var(--blue-2); }
.page { min-height: calc(100vh - 190px); padding: 34px 0 58px; }
footer { padding: 24px 18px 34px; text-align: center; color: var(--muted); font-size: .86rem; line-height: 1.6; border-top: 1px solid var(--line); background: rgba(255,255,255,.7); }
h1, h2, h3 { color: var(--navy); line-height: 1.2; }
h1 { margin: 5px 0 10px; font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.04em; }
h2 { font-size: 1.25rem; }
p { line-height: 1.6; }
.eyebrow { margin: 0 0 6px; color: var(--teal); font-size: .76rem; font-weight: 850; letter-spacing: .12em; }
.muted, .help { color: var(--muted); }
.help { font-size: .82rem; line-height: 1.55; }
.panel { padding: 24px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.narrow { width: min(660px, 100%); margin: 12px auto; }
.narrow-wide { width: min(850px, 100%); margin: 12px auto; }
.login-shell { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(340px,.75fr); gap: 58px; align-items: center; min-height: 610px; }
.login-intro { padding: 30px 10px; }
.login-intro h1 { font-size: clamp(2.7rem, 5.5vw, 4.8rem); color: #102f52; }
.login-intro > p:not(.eyebrow) { max-width: 650px; color: #4a5b70; font-size: 1.08rem; }
.course-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.course-strip span { padding: 8px 12px; color: var(--navy); background: rgba(255,255,255,.8); border: 1px solid #cddae6; border-radius: 999px; font-weight: 700; font-size: .82rem; }
.login-panel { padding: 32px; }
.login-panel h2 { margin-top: 0; font-size: 1.7rem; }
.stack { display: grid; gap: 10px; }
.stack p { display: grid; gap: 6px; margin: 0; }
label { font-weight: 750; font-size: .9rem; color: #263a50; }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid #bdcad7; border-radius: 9px; color: var(--ink); background: #fff; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(47,128,201,.14); }
input[type=checkbox] { width: auto; accent-color: var(--blue); }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border: 0; border-radius: 9px; background: linear-gradient(110deg, var(--blue), #1b5b91); color: #fff; font-weight: 780; text-decoration: none; cursor: pointer; box-shadow: 0 5px 14px rgba(35,104,162,.18); }
.button:hover { filter: brightness(1.06); }
.button.secondary { color: var(--navy); background: #e8f1f8; box-shadow: none; }
.button.full { width: 100%; }
.actions, .text-links { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.text-links a, .text-button { font-weight: 750; text-decoration: none; }
.text-links a { padding-right: 8px; border-right: 1px solid var(--line); }
.text-links a:last-child { border-right: 0; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 25px; }
.page-heading h1 { font-size: clamp(2rem,4vw,3rem); }
.page-heading p:not(.eyebrow) { margin: 0; color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin: 24px 0; }
.metric { padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg,#fff,#f7fbfe); box-shadow: 0 8px 24px rgba(18,54,93,.06); }
.metric > span, .metric small { display: block; color: var(--muted); }
.metric strong { display: block; margin: 5px 0; color: var(--navy); font-size: 2rem; }
.assignment-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.assignment-card { display: flex; flex-direction: column; padding: 22px; min-height: 340px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.assignment-card h2 { min-height: 3em; }
.assignment-card .button { margin-top: auto; }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.assignment-number { color: var(--blue); font-size: 1.55rem; font-weight: 850; }
.variant { min-height: 3.4em; color: var(--muted); font-size: .9rem; }
.meta { display: grid; grid-template-columns: 1.6fr .6fr; gap: 8px; margin: 12px 0; }
.meta.assignment-summary { grid-template-columns: 1.4fr .75fr 1fr; }
.meta div { padding: 10px; background: var(--soft); border-radius: 9px; }
.meta dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; }
.meta dd { margin: 4px 0 0; font-weight: 750; }
.meta .result-box { background: #eaf7f1; border: 1px solid #c7e8d8; }
.result-value { color: var(--green); font-size: 1.02rem; font-weight: 850; }
.result-pending { color: var(--muted); font-size: .82rem; font-weight: 720; }
.card-status { margin-bottom: 16px; }
.status, .pill { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: .75rem; font-weight: 800; }
.status.success { color: var(--green); background: #e8f6ef; }
.status.waiting { color: var(--amber); background: #fff5d8; }
.pill { color: var(--navy); background: #e6eef6; }
.pill.danger { color: var(--red); background: #feeceb; }
.back { display: inline-block; margin-bottom: 18px; color: var(--navy); font-weight: 750; text-decoration: none; }
.detail-hero { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding: 28px; color: #fff; background: linear-gradient(115deg,#11375f,#176c83); border-radius: 18px; box-shadow: var(--shadow); }
.detail-hero h1, .detail-hero .eyebrow { color: #fff; }
.detail-hero h1 { font-size: clamp(2rem,4vw,3.1rem); }
.detail-hero p:last-child { color: #d7e9f2; }
.detail-hero.compact { padding: 22px; align-items: center; }
.detail-hero.compact h1 { font-size: 2rem; }
.deadline { display: grid; min-width: 190px; padding: 16px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; }
.deadline strong { margin: 5px 0; font-size: 1.3rem; }
.two-column { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(310px,.65fr); gap: 18px; margin-top: 18px; align-items: start; }
.two-column .panel { margin-bottom: 18px; }
.check-list { padding-left: 0; list-style: none; }
.check-list li { position: relative; padding: 8px 0 8px 29px; border-bottom: 1px solid #edf1f5; }
.check-list li::before { content: "✓"; position: absolute; left: 3px; color: var(--teal); font-weight: 900; }
.timeline-item { position: relative; display: grid; gap: 5px; margin-left: 8px; padding: 0 0 19px 20px; border-left: 2px solid #c9d9e7; }
.timeline-item::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; background: var(--blue); border-radius: 50%; }
.timeline-item > span:not(.pill) { color: var(--muted); font-size: .82rem; }
.feedback { margin-top: 8px; padding: 11px; color: #125138; background: #e9f7ef; border-radius: 9px; }
.feedback p { margin-bottom: 0; }
.solution { border-top: 4px solid var(--teal); }
.messages { margin-bottom: 18px; }
.message, .alert { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #eef5fa; }
.message.success { color: #125138; background: #e8f6ef; border-color: #b7dfc8; }
.message.error, .alert.danger { color: #8d221b; background: #fff0ef; border-color: #f0c4c1; }
.alert.warning { color: #6e4b00; background: #fff8e0; border-color: #eed998; }
.confirm { display: flex; align-items: start; gap: 9px; margin: 10px 0; line-height: 1.5; }
.table-panel { padding: 0; overflow: hidden; }
.table-panel .panel-heading { padding: 22px 24px 8px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 12px 13px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: #40546b; background: #edf3f8; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:hover { background: #f8fbfd; }
.table-panel > .help { padding: 0 20px 16px; }
.filters { display: grid; grid-template-columns: .7fr .9fr 1.3fr auto; gap: 12px; align-items: end; margin-bottom: 16px; }
.filters label { display: block; margin-bottom: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field:has(input[type=checkbox]) { flex-direction: row; flex-wrap: wrap; align-items: center; }
.field:has(input[type=checkbox]) label { order: 2; }
.field-error, .errorlist { color: var(--red); font-size: .82rem; }
.errorlist { margin: 3px 0; }
.review-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(320px,.6fr); gap: 18px; align-items: start; }
.review-grid section > .panel, .review-grid section > .detail-hero { margin-bottom: 18px; }
.sticky { position: sticky; top: 18px; }
.screening-score { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; }
.screening-score strong { color: var(--teal); font-size: 2.4rem; }
.empty { grid-column: 1 / -1; text-align: center; }
@media (max-width: 950px) {
  .login-shell, .two-column, .review-grid { grid-template-columns: 1fr; }
  .login-shell { gap: 0; }
  .login-intro { padding-bottom: 10px; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .assignment-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filters { grid-template-columns: repeat(2,1fr); }
  .meta.assignment-summary { grid-template-columns: 1fr 1fr; }
  .meta.assignment-summary .result-box { grid-column: 1 / -1; }
  .sticky { position: static; }
}
@media (max-width: 640px) {
  .header-inner { align-items: flex-start; padding: 14px 0; }
  .brand small, .account > span, .instructor-identity small, .instructor-identity span { display: none; }
  .instructor-identity { padding: 7px 10px; border-right: 0; text-align: center; }
  .instructor-identity strong { font-size: .82rem; }
  .page { padding-top: 24px; }
  .page-heading, .detail-hero { align-items: stretch; flex-direction: column; }
  .deadline { width: 100%; }
  .assignment-grid, .metric-grid, .form-grid, .filters { grid-template-columns: 1fr; }
  .meta.assignment-summary { grid-template-columns: 1fr; }
  .meta.assignment-summary .result-box { grid-column: auto; }
  .form-grid .span-2 { grid-column: auto; }
  .assignment-card h2, .variant { min-height: 0; }
  .login-panel, .panel { padding: 19px; }
  .login-intro h1 { font-size: 2.55rem; }
}
