/* Scoped course presentation. Shared student shell and other modules stay unchanged. */
.scc {
  --scc-blue: #4f5bd5;
  --scc-ink: #202b45;
  --scc-muted: #69758c;
  --scc-line: #e7ebf3;
  color: var(--scc-ink);
  min-width: 0;
}
.scc * { box-sizing: border-box; }
.scc h1, .scc h2, .scc h3, .scc p { margin: 0; }
.scc button, .scc select { font: inherit; }
.scc button { cursor: pointer; }
.scc button:disabled { opacity: .55; cursor: default; }
.scc button:focus-visible, .scc select:focus-visible { outline: 3px solid #9ba5ff; outline-offset: 3px; }
.scc svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.scc-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.scc-heading h1 { color: var(--scc-ink); font-size: 28px; line-height: 1.4; font-weight: 750; letter-spacing: -.5px; }
.scc-heading p { margin-top: 6px; color: var(--scc-muted); font-size: 14px; line-height: 1.65; }
.scc-refresh { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex-shrink: 0; min-height: 44px; padding: 9px 14px; color: var(--scc-blue); border: 1px solid var(--scc-line); border-radius: 12px; background: #fff; font-size: 13px !important; }
.scc-refresh svg { width: 17px; height: 17px; }
.scc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 24px 0 20px; }
.scc-term-picker { display: flex; align-items: center; gap: 10px; order: 1; width: min(390px, 100%); min-width: 0; padding: 0 14px; border: 1px solid #dce1f5; border-radius: 13px; background: #fff; box-shadow: 0 3px 10px #333d7904; }
.scc-term-picker > svg { color: var(--scc-blue); }
.scc select { flex: 1; width: 0; min-width: 0; min-height: 48px; padding: 8px 0; color: var(--scc-ink); border: 0; border-radius: 8px; background: #fff; font-size: 14px; text-overflow: ellipsis; }
.scc-count { color: var(--scc-muted); font-size: 14px; }
.scc-count strong { padding: 0 3px; color: var(--scc-ink); font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; }
.scc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.scc-course { --scc-tint: #f0eeff; --scc-accent: #7161ce; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--scc-line); border-radius: 18px; background: #fff; box-shadow: 0 5px 20px #202b4505; }
.scc-tone-1 { --scc-tint: #f0eeff; --scc-accent: #7161ce; }
.scc-tone-2 { --scc-tint: #eaf5f0; --scc-accent: #258369; }
.scc-tone-3 { --scc-tint: #ecf4ff; --scc-accent: #3479c9; }
.scc-tone-4 { --scc-tint: #fff4e5; --scc-accent: #a96c1a; }
.scc-tone-0 { --scc-tint: #f2effb; --scc-accent: #8060b1; }
.scc-course-head { display: flex; align-items: flex-start; gap: 13px; min-height: 111px; padding: 22px 21px; background: var(--scc-tint); }
.scc-course-head > div { min-width: 0; }
.scc-course-icon { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; color: var(--scc-accent); border: 1px solid #ffffffd9; border-radius: 13px; background: #ffffff8c; }
.scc-course-icon svg { width: 27px; height: 27px; }
.scc h3 { color: var(--scc-ink); font-size: 18px; font-weight: 700; line-height: 1.55; overflow-wrap: anywhere; }
.scc-teacher { margin-top: 6px !important; color: var(--scc-muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.scc-course-body { display: flex; flex: 1; flex-direction: column; padding: 20px 21px 14px; }
.scc-metrics { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; padding-bottom: 19px; }
.scc-credit > span, .scc-attendance > span { color: var(--scc-muted); font-size: 12px; line-height: 1.6; }
.scc-value { margin-top: 5px; color: var(--scc-blue); font-size: clamp(25px, 2.8vw, 34px); font-weight: 750; letter-spacing: -.8px; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.scc-value small { margin-left: 4px; color: var(--scc-ink); font-size: 12px; font-weight: 400; letter-spacing: normal; }
.scc-attendance { min-width: 0; padding-left: 16px; border-left: 1px solid var(--scc-line); }
.scc-attendance > div { margin-top: 5px; line-height: 1.4; }
.scc-attendance strong { color: var(--scc-ink); font-size: 25px; font-weight: 750; font-variant-numeric: tabular-nums; }
.scc-attendance small { margin-left: 5px; color: var(--scc-muted); font-size: 12px; }
.scc-attendance p { margin-top: 4px; color: var(--scc-muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.scc-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--scc-line); }
.scc-status { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; }
.scc-attendance-note { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 4px 7px; color: #24745e; border-radius: 6px; background: #eaf6f0; font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; }
.scc-attendance-note svg { width: 14px; height: 14px; padding: 1px; color: #fff; border-radius: 50%; background: #288368; stroke-width: 2.4; }
.scc-discipline { color: var(--scc-muted); font-size: 11px; line-height: 1.65; }
.scc-warning { padding: 4px 7px; color: #925713; border-radius: 6px; background: #fff3df; }
.scc-card-foot button { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 13px; color: #fff; border: 1px solid var(--scc-blue); border-radius: 10px; background: var(--scc-blue); font-size: 13px; font-weight: 600; box-shadow: 0 3px 7px #4f5bd51a; }
.scc-card-foot button svg { width: 17px; height: 17px; }
.scc-card-foot button:hover { border-color: #414bbc; background: #414bbc; }
.scc-course-term { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; margin-top: 14px !important; padding-top: 12px; color: var(--scc-muted); border-top: 1px solid #f1f3f8; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.scc-course-term span { color: var(--scc-accent); }
.scc-note { margin-top: 22px !important; color: var(--scc-muted); font-size: 12px; line-height: 1.9; }
.scc-empty { padding: 38px 20px; color: var(--scc-muted); border: 1px solid var(--scc-line); border-radius: 16px; background: #fff; font-size: 14px; line-height: 1.8; text-align: center; }
.scc-error { color: #a33d3d; }
.scc-empty button { display: block; min-height: 44px; margin: 12px auto 0; padding: 8px 16px; color: var(--scc-blue); border: 1px solid var(--scc-line); border-radius: 9px; background: #fff; }
.scc-records { scroll-margin-top: 24px; margin-top: 24px; padding: 24px; border: 1px solid #dce1f5; border-radius: 18px; background: #fff; box-shadow: 0 5px 24px #202b4505; outline: none; }
.scc-records:focus-visible { outline: 2px solid #9ba5ff; outline-offset: 3px; }
.scc-record-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.scc-record-head > div { min-width: 0; }
.scc-record-kicker { display: block; margin-bottom: 7px; color: var(--scc-blue); font-size: 12px; font-weight: 600; }
.scc-record-head h2 { color: var(--scc-ink); font-size: 22px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.scc-record-head p { margin-top: 7px; color: var(--scc-muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.scc-record-head button { flex-shrink: 0; min-height: 44px; padding: 8px 10px; color: var(--scc-blue); border: 1px solid var(--scc-line); border-radius: 10px; background: #f7f8ff; font-size: 12px; }
.scc-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 22px 0 14px; }
.scc-tabs button { min-width: 0; min-height: 44px; padding: 10px 6px; color: var(--scc-muted); border: 1px solid transparent; border-radius: 10px; background: #f3f5fa; font-size: 13px; }
.scc-tabs button[aria-selected=true] { color: #fff; background: var(--scc-blue); }
.scc-table-wrap { overflow-x: auto; }
.scc table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.scc th, .scc td { padding: 15px 10px; border-bottom: 1px solid var(--scc-line); text-align: left; vertical-align: top; overflow-wrap: anywhere; line-height: 1.75; }
.scc th { color: var(--scc-muted); background: #f8f9fc; font-size: 12px; font-weight: 400; }
.scc th:first-child, .scc td:first-child { width: 27%; }
.scc th:last-child, .scc td:last-child { width: 28%; text-align: right; font-variant-numeric: tabular-nums; }
.scc td small { display: block; margin-top: 4px; color: var(--scc-muted); font-size: 12px; }
.scc-negative { color: #ad4141 !important; }
.scc-pages { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 18px; color: var(--scc-muted); font-size: 12px; }
.scc-pages > div { display: flex; gap: 8px; }
.scc-pages button { min-height: 44px; padding: 8px 12px; color: var(--scc-blue); border: 1px solid var(--scc-line); border-radius: 9px; background: #fff; }
.scc-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 1800px) {
  .scc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1250px) and (min-width: 1121px), (max-width: 980px) {
  .scc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .scc-heading { align-items: flex-start; }
  .scc-heading h1 { font-size: 25px; }
  .scc-heading p { font-size: 12px; }
  .scc-refresh { gap: 5px; padding: 8px 10px; border-radius: 10px; font-size: 12px !important; }
  .scc-toolbar { flex-direction: column; align-items: stretch; gap: 15px; margin: 20px 0 15px; }
  .scc-term-picker { order: 0; width: 100%; gap: 9px; padding: 0 12px; }
  .scc select { min-height: 50px; font-size: 16px; }
  .scc-count { font-size: 13px; }
  .scc-count strong { font-size: 18px; }
  .scc-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .scc-course-head { min-height: 0; padding: 19px 17px; }
  .scc h3 { font-size: 17px; }
  .scc-course-icon { flex-basis: 42px; width: 42px; height: 42px; }
  .scc-course-body { padding: 18px 17px 13px; }
  .scc-value { font-size: 33px; }
  .scc-metrics { gap: 12px; }
  .scc-attendance { padding-left: 16px; }
  .scc-card-foot { gap: 10px; }
  .scc-records { min-height: calc(100svh - 36px); padding: 19px 14px; scroll-margin-top: 18px; }
  .scc-record-head { align-items: flex-start; gap: 8px; }
  .scc-record-head h2 { font-size: 20px; }
  .scc-record-head button { padding: 7px 8px; font-size: 11px; }
  .scc-tabs { gap: 5px; margin-top: 18px; }
  .scc-tabs button { font-size: 12px; }
  .scc th, .scc td { padding: 12px 5px; font-size: 12px; }
  .scc th { font-size: 11px; }
}
@media (max-width: 360px) {
  .scc-course-head { gap: 10px; padding: 17px 14px; }
  .scc-course-body { padding-right: 14px; padding-left: 14px; }
  .scc-course-icon { flex-basis: 36px; width: 36px; height: 36px; border-radius: 11px; }
  .scc-course-icon svg { width: 24px; height: 24px; }
  .scc-value { font-size: 29px; }
  .scc-card-foot button { gap: 5px; padding: 9px 10px; font-size: 12px; }
}
