:root {
  --ruc-red: #9f0f24;
  --ruc-red-dark: #720719;
  --ruc-red-deep: #4e0712;
  --ruc-red-soft: #f8ecee;
  --gold: #c6a46a;
  --ink: #171a1f;
  --ink-2: #4f5661;
  --ink-3: #7c8490;
  --line: #dfe2e6;
  --line-dark: #cfd3d8;
  --bg: #f4f5f5;
  --card: #ffffff;
  --green: #217a55;
  --green-soft: #e9f4ee;
  --blue: #315b87;
  --blue-soft: #edf3f8;
  --amber: #96621d;
  --amber-soft: #faf3e7;
  --surface-warm: #fbf7f4;
  --radius: 8px;
  --shadow: 0 12px 32px rgba(27, 31, 38, .09);
  --shadow-sm: 0 2px 10px rgba(27, 31, 38, .05);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.catalog-page { position: relative; isolation: isolate; overflow-x: clip; background: #faf2f4; }
.catalog-page::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,252,253,.76) 0%, rgba(252,244,246,.72) 100%) 0 0 / 100% 100% no-repeat,
    url("assets/brand/ruc-campus-lineart-red-v1.png") center 72% / clamp(980px, 118vw, 1800px) auto no-repeat,
    radial-gradient(circle at 50% 66%, rgba(159,15,36,.04), transparent 58%) center / cover no-repeat,
    #faf2f4;
  pointer-events: none;
}
.catalog-page > .site-header,
.catalog-page > .catalog-hero,
.catalog-page > .program-note,
.catalog-page > .page-main,
.catalog-page > footer,
.catalog-page > #toast { position: relative; z-index: 1; }
.catalog-page > .site-header { z-index: 100; }
a { color: var(--ruc-red); text-decoration: none; }
a:hover { color: var(--ruc-red-dark); }
button, input, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(112, 7, 25, .97);
  border-bottom: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 2px 14px rgba(45, 3, 11, .18);
}
.nav-inner { height: 72px; display: flex; align-items: center; gap: 34px; }
.brand { display: flex; align-items: center; flex-shrink: 0; color: #fff; }
.brand:hover { color: #fff; }
.brand img { width: 143px; height: auto; display: block; }
.brand-divider { width: 1px; height: 30px; margin: 0 16px; background: rgba(255,255,255,.35); }
.product-name { font-size: 15px; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.nav-links { height: 100%; display: flex; align-items: stretch; }
.nav-links a {
  position: relative;
  min-width: 88px;
  padding: 0 18px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.75);
  font-size: 15px;
  font-weight: 600;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-links a.active { color: #fff; }
.nav-links a.active::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; height: 3px; background: var(--gold); }
.nav-right { margin-left: auto; display: flex; align-items: center; }
.user-menu-wrap { position: relative; }
.user-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 5px 9px 5px 6px;
  color: #fff;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
}
.user-trigger:hover, .user-trigger.active, .user-trigger[aria-expanded="true"] { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--ruc-red-dark);
  background: #f7e4dc;
  font-size: 13px;
  font-weight: 800;
}
.user-trigger-copy { display: grid; text-align: left; line-height: 1.2; }
.user-trigger-copy b { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.user-trigger-copy small { margin-top: 3px; color: rgba(255,255,255,.65); font-size: 11px; }
.user-trigger > svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 9px);
  width: 232px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.user-menu[hidden] { display: none; }
.user-menu-head { padding: 9px 11px 12px; display: grid; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.user-menu-head b { font-size: 14px; }
.user-menu-head span { margin-top: 2px; color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.user-menu a, .user-menu button {
  width: 100%;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 5px;
  color: var(--ink-2);
  background: transparent;
  font-size: 14px;
  text-align: left;
}
.user-menu a:hover, .user-menu button:hover { color: var(--ruc-red); background: var(--ruc-red-soft); }
.user-menu svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.user-menu-line { height: 1px; margin: 5px 0; background: var(--line); }

/* Buttons */
.btn {
  min-height: 42px;
  padding: 9px 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  transition: background .16s, border-color .16s, color .16s, transform .16s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { color: #fff; background: var(--ruc-red); }
.btn-primary:hover { color: #fff; background: var(--ruc-red-dark); }
.btn-danger { color: #fff; border-color: var(--ruc-red); background: var(--ruc-red); }
.btn-danger:hover { color: #fff; border-color: var(--ruc-red-dark); background: var(--ruc-red-dark); }
.btn-light { color: var(--ruc-red-dark); background: #fff; border-color: rgba(255,255,255,.6); }
.btn-light:hover { color: var(--ruc-red-dark); background: #f8ecee; }
.btn-outline, .btn-ghost { color: var(--ink-2); background: #fff; border-color: var(--line-dark); }
.btn-outline:hover, .btn-ghost:hover { color: var(--ruc-red); border-color: var(--ruc-red); }
.btn-soft { color: var(--ruc-red); background: var(--ruc-red-soft); border-color: #efd8dd; }
.btn-soft:hover { color: var(--ruc-red-dark); background: #f2dde1; }
.btn-green { color: #fff; background: var(--green); }
.btn-green:hover { color: #fff; background: #155f40; }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* Shared typography and panels */
.page-main { padding-top: 54px; padding-bottom: 54px; min-height: calc(100vh - 72px); }
.page-heading { margin-bottom: 30px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.page-heading.compact { align-items: center; }
.page-heading h1, .page-heading h2 { margin: 4px 0 6px; font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", SimSun, serif; font-size: clamp(28px, 3vw, 36px); line-height: 1.25; letter-spacing: .02em; }
.page-heading p { max-width: 680px; margin: 0; color: var(--ink-2); font-size: 15px; }
.section-kicker { color: var(--ruc-red); font-family: Georgia, "Times New Roman", serif; font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.section-kicker.light { color: rgba(255,255,255,.68); }
.text-link { display: inline-flex; align-items: center; color: var(--ruc-red); font-size: 14px; font-weight: 650; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }

/* Catalog hero */
.catalog-hero { position: relative; min-height: 340px; overflow: hidden; color: #fff; background: var(--ruc-red-deep); }
.catalog-hero-bg {
  position: absolute;
  inset: -4px;
  background: linear-gradient(90deg, rgba(39,3,10,.82) 0%, rgba(75,5,18,.66) 42%, rgba(83,7,22,.22) 78%), url("assets/brand/ruc-campus-zhongguancun.jpg") center 48% / cover no-repeat;
  filter: saturate(.8) contrast(.98) blur(1.1px);
  transform: scale(1.015);
}
.catalog-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(23,1,5,.28)); }
.catalog-hero-inner { position: relative; z-index: 1; min-height: 340px; display: flex; align-items: center; }
.hero-copy { width: min(650px, 65%); padding: 42px 0 46px; }
.hero-copy .eyebrow { color: rgba(255,255,255,.76); font-family: Georgia, serif; font-size: 12px; letter-spacing: .18em; }
.hero-copy h1 { margin: 8px 0 12px; font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", SimSun, serif; font-size: clamp(42px, 5.2vw, 64px); line-height: 1.08; letter-spacing: .04em; }
.hero-copy p { max-width: 620px; margin: 0 0 25px; color: rgba(255,255,255,.88); font-size: 17px; line-height: 1.85; }
.program-note { border-bottom: 1px solid var(--line); background: #fff; }
.program-note-inner { min-height: 66px; display: flex; align-items: center; gap: 16px; }
.program-note-label { padding: 4px 10px; color: #fff; background: var(--ruc-red); border-radius: 3px; font-size: 12px; font-weight: 700; }
.program-note p { margin: 0; color: var(--ink-2); font-size: 14px; }
.program-note p b { color: var(--ruc-red); }
.program-note-meta { margin-left: auto; color: var(--ink-3); font-size: 13px; }
.catalog-page .program-note {
  color: #fff;
  border-color: rgba(255,255,255,.12);
  background: linear-gradient(90deg, var(--ruc-red-dark) 0%, var(--ruc-red) 58%, #8b0c20 100%);
  box-shadow: 0 5px 18px rgba(86,5,20,.16);
}
.catalog-page .program-note-label { color: #fff; border: 1px solid rgba(255,255,255,.32); background: rgba(255,255,255,.09); }
.catalog-page .program-note p { color: rgba(255,255,255,.9); }
.catalog-page .program-note p b { color: #f4d9ad; }
.catalog-page .program-note-meta { color: rgba(255,255,255,.72); }

/* Catalog filters and list */
.catalog-tools {
  margin-bottom: 36px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto 150px 190px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.catalog-page .catalog-tools {
  border-color: #e6cfd4;
  background: rgba(255,251,252,.96);
  box-shadow: 0 8px 24px rgba(112,7,25,.07);
}
.catalog-page .search-box input,
.catalog-page .select-wrap select,
.catalog-page .filter-tabs { border-color: #e7d5d9; background: #fffdfd; }
.catalog-page .filter-tabs button { border-color: #e7d5d9; background: #fffdfd; }
.catalog-tools > * { min-width: 0; }
.search-box { position: relative; display: block; }
.search-box svg { position: absolute; left: 13px; top: 50%; width: 19px; transform: translateY(-50%); fill: none; stroke: var(--ink-3); stroke-width: 1.7; }
.search-box input, .select-wrap select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
}
.search-box input { padding: 0 13px 0 42px; }
.search-box input:focus, .select-wrap select:focus { outline: 2px solid rgba(159,15,36,.12); border-color: var(--ruc-red); }
.filter-tabs { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.filter-tabs button { height: 40px; padding: 0 14px; border: 0; border-right: 1px solid var(--line); color: var(--ink-2); background: #fff; font-size: 13px; }
.filter-tabs button:last-child { border-right: 0; }
.filter-tabs button:hover { color: var(--ruc-red); background: var(--ruc-red-soft); }
.filter-tabs button.active { color: #fff; background: var(--ruc-red); }
.select-wrap { position: relative; display: block; }
.select-wrap::after { content: ""; position: absolute; right: 13px; top: 16px; width: 7px; height: 7px; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: rotate(45deg); pointer-events: none; }
.select-wrap select { padding: 0 36px 0 12px; appearance: none; }
.course-section {
  --section-accent: var(--ruc-red);
  --section-accent-rgb: 159, 15, 36;
  margin-top: 36px;
}
.course-section + .course-section { margin-top: 44px; }
.course-section-elective { --section-accent: #8b4b5a; --section-accent-rgb: 139, 75, 90; }
.course-section-practice { --section-accent: #9b4f3d; --section-accent-rgb: 155, 79, 61; }
.course-section-advanced { --section-accent: #5f3c46; --section-accent-rgb: 95, 60, 70; }
.course-section-head {
  position: relative;
  min-height: 70px;
  margin-bottom: 12px;
  padding: 3px 16px 12px 19px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(var(--section-accent-rgb), .28);
  overflow: hidden;
}
.catalog-page .course-section-head {
  background: linear-gradient(90deg, rgba(255,250,251,.96) 0%, rgba(255,250,251,.9) 38%, rgba(255,250,251,.55) 64%, rgba(255,250,251,0) 88%);
}
.course-section-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 13px;
  width: 4px;
  border-radius: 4px;
  background: var(--section-accent);
}
.course-section-head::after {
  content: "RUC · 1937";
  position: absolute;
  right: 114px;
  bottom: -13px;
  color: rgba(var(--section-accent-rgb), .04);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1;
  pointer-events: none;
}
.course-section-copy { position: relative; z-index: 1; min-width: 0; }
.course-section-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--section-accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
}
.course-section-head h2 { margin: 0 0 2px; font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", SimSun, serif; font-size: 22px; line-height: 1.35; }
.course-section-head p { margin: 0; color: var(--ink-3); font-size: 13px; }
.course-section-count { position: relative; z-index: 1; min-width: 68px; display: flex; align-items: baseline; justify-content: flex-end; gap: 7px; color: var(--section-accent); }
.course-section-count b { font-family: Georgia, "Times New Roman", serif; font-size: 24px; line-height: 1; }
.course-section-count span { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.course-list { display: grid; gap: 10px; background: transparent; }
.course-row {
  --course-accent: var(--ruc-red);
  --course-accent-rgb: 159, 15, 36;
  position: relative;
  min-height: 156px;
  padding: 20px 20px 20px 17px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 138px 146px;
  align-items: center;
  gap: 20px;
  border: 1px solid #e8dadd;
  border-left: 4px solid var(--course-accent);
  border-radius: 8px;
  background-color: #fffbfc;
  background-image: linear-gradient(90deg, transparent 0%, transparent 76%, rgba(var(--course-accent-rgb), .025) 100%);
  box-shadow: 0 3px 12px rgba(112, 7, 25, .045);
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s, transform .18s, background .18s;
}
.course-row::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 146px;
  height: 146px;
  background: var(--course-accent);
  opacity: .045;
  -webkit-mask: url("assets/brand/ruc-wordmark.png") center top / 146px auto no-repeat;
  mask: url("assets/brand/ruc-wordmark.png") center top / 146px auto no-repeat;
  filter: blur(.25px);
  transform: translateY(-50%);
  pointer-events: none;
  transition: opacity .18s, transform .18s;
}
.course-row:hover, .course-row:focus-within {
  border-color: rgba(var(--course-accent-rgb), .42);
  background-image: linear-gradient(90deg, transparent 0%, transparent 72%, rgba(var(--course-accent-rgb), .045) 100%);
  box-shadow: 0 10px 26px rgba(112, 7, 25, .11);
  transform: translateY(-2px);
}
.course-row:hover::after, .course-row:focus-within::after { opacity: .072; transform: translateY(-50%) scale(1.025); }
.course-row-elective { --course-accent: #8b4b5a; --course-accent-rgb: 139, 75, 90; }
.course-row-practice { --course-accent: #9b4f3d; --course-accent-rgb: 155, 79, 61; }
.course-row-track { --course-accent: #5f3c46; --course-accent-rgb: 95, 60, 70; }
.course-number { position: relative; z-index: 1; align-self: start; }
.course-number span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--course-accent);
  border: 1px solid rgba(var(--course-accent-rgb), .26);
  border-radius: 50%;
  background: rgba(var(--course-accent-rgb), .055);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.course-row-main, .course-facts, .course-row-actions { position: relative; z-index: 1; min-width: 0; }
.course-labels { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12px; }
.course-type { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border-radius: 3px; font-size: 12px; font-weight: 700; }
.course-type.required { color: var(--ruc-red); background: var(--ruc-red-soft); }
.course-type.elective { color: #7b3f4d; background: #f7e8ec; }
.course-type.practice { color: #894533; background: #faeae6; }
.course-type.track { color: #613a45; background: #f2e7ea; }
.course-row h3 { margin: 7px 0 3px; font-size: 19px; line-height: 1.35; }
.course-row h3 a { color: var(--ink); overflow-wrap: anywhere; }
.course-row h3 a:hover { color: var(--ruc-red); }
.course-subtitle { margin: 0 0 5px; color: var(--ruc-red); font-size: 13px; font-weight: 650; }
.course-row-main > p { max-width: 700px; margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.course-byline { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 16px; color: var(--ink-3); font-size: 12px; }
.course-byline span { max-width: 100%; overflow-wrap: anywhere; }
.course-facts { padding: 0 8px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.course-facts div { min-height: 64px; padding: 10px 4px 8px; display: grid; align-content: center; text-align: center; border: 1px solid rgba(var(--course-accent-rgb), .11); border-radius: 6px; background: rgba(var(--course-accent-rgb), .04); }
.course-facts b { display: block; color: var(--ink); font-family: Georgia, serif; font-size: 22px; line-height: 1.05; }
.course-facts span { color: var(--ink-3); font-size: 12px; }
.course-row-actions { display: grid; justify-items: stretch; gap: 9px; }
.course-view-hint { color: var(--ink-3); font-size: 12px; text-align: center; }
.enrolled-state { min-height: 27px; padding: 3px 8px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--green); border-radius: 4px; background: var(--green-soft); font-size: 12px; font-weight: 650; }
.enrolled-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.course-row-actions .btn { border-color: rgba(var(--course-accent-rgb), .32); background: rgba(255,251,252,.96); }
.course-row:hover .course-row-actions .btn, .course-row:focus-within .course-row-actions .btn { color: #fff; border-color: var(--course-accent); background: var(--course-accent); }
.course-transition-active { overflow: hidden; }
.course-expand-transition {
  position: fixed;
  z-index: 99;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid var(--line);
  border-top: 3px solid var(--ruc-red);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(27,31,38,.18);
  pointer-events: none;
  transition:
    left .56s cubic-bezier(.22,.72,.18,1),
    top .56s cubic-bezier(.22,.72,.18,1),
    width .56s cubic-bezier(.22,.72,.18,1),
    height .56s cubic-bezier(.22,.72,.18,1),
    border-radius .4s ease,
    box-shadow .4s ease;
}
.course-expand-transition.is-expanded { border-radius: 0; box-shadow: none; }
.course-transition-preview {
  margin: 0;
  border: 0;
  transition: opacity .28s ease .12s, transform .56s cubic-bezier(.22,.72,.18,1);
}
.course-expand-transition.is-expanded .course-transition-preview { opacity: 0; transform: scale(1.025); }
.empty-state { padding: 64px 24px; display: grid; justify-items: center; gap: 7px; text-align: center; color: var(--ink-3); }
.empty-state[hidden] { display: none; }
.empty-state b { color: var(--ink); font-size: 17px; }
.empty-state.inline { padding: 50px 20px; border: 1px solid var(--line); background: #fff; }
.empty-state .btn { margin-top: 8px; }

/* My Courses */
.learning-page { max-width: 1180px; }
.continue-panel {
  min-height: 188px;
  margin-bottom: 28px;
  padding: 30px 34px;
  display: flex;
  align-items: center;
  gap: 34px;
  color: #fff;
  border-radius: var(--radius);
  background: linear-gradient(118deg, var(--ruc-red-deep), var(--ruc-red) 68%, #b93447);
  box-shadow: var(--shadow);
}
.continue-copy { min-width: 0; flex: 1; }
.continue-copy > p { margin: 8px 0 1px; color: rgba(255,255,255,.7); font-size: 13px; }
.continue-copy h2 { margin: 0 0 8px; font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", SimSun, serif; font-size: 25px; }
.continue-copy > span:last-child { color: rgba(255,255,255,.78); font-size: 13px; }
.continue-progress { width: 90px; text-align: center; }
.continue-progress b { display: block; font-family: Georgia, serif; font-size: 29px; line-height: 1.1; }
.continue-progress span { color: rgba(255,255,255,.65); font-size: 12px; }
.learning-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 24px; }
.learning-main { min-width: 0; }
.course-tabs { margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 3px; border-bottom: 1px solid var(--line); }
.course-tabs button { position: relative; padding: 11px 16px 13px; border: 0; color: var(--ink-3); background: transparent; font-size: 14px; font-weight: 650; }
.course-tabs button span { margin-left: 3px; font-family: Georgia, serif; }
.course-tabs button:hover { color: var(--ruc-red); }
.course-tabs button.active { color: var(--ruc-red); }
.course-tabs button.active::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: -1px; height: 3px; background: var(--ruc-red); }
.learning-list { border-top: 2px solid var(--ink); background: #fff; }
.learning-course {
  min-height: 138px;
  padding: 21px 20px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 82px 108px;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-top: 0;
}
.learning-course-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 800; }
.learning-course-mark.required { color: var(--ruc-red); background: var(--ruc-red-soft); }
.learning-course-mark.elective { color: var(--blue); background: var(--blue-soft); }
.learning-course-mark.regular_elective { color: var(--blue); background: var(--blue-soft); }
.learning-course-mark.practice_elective { color: #6b3b88; background: #f1e9f7; }
.learning-course-mark.advanced_required, .learning-course-mark.advanced_track { color: #75540c; background: #f6edd7; }
.learning-course-top { display: flex; gap: 12px; color: var(--ink-3); font-size: 11px; }
.learning-course h3 { margin: 5px 0 11px; font-size: 17px; }
.learning-course h3 a { color: var(--ink); }
.learning-course h3 a:hover { color: var(--ruc-red); }
.learning-course-credit { display: grid; justify-items: center; color: var(--ink-3); font-size: 11px; }
.learning-course-credit b { color: var(--ink); font-family: Georgia, serif; font-size: 21px; }
.learning-course-actions { display: grid; justify-items: stretch; gap: 7px; }
.course-withdraw-link, .course-withdraw-button { padding: 2px 6px; border: 0; color: var(--ink-3); background: transparent; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.course-withdraw-link:hover, .course-withdraw-button:hover { color: var(--ruc-red); }
.course-withdraw-button { width: 100%; margin-top: 9px; text-decoration: none; }
.learning-aside { display: grid; gap: 16px; }
.summary-card, .graduation-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.summary-card-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; }
.summary-card-head a { font-size: 11px; font-weight: 600; }
.credit-total { margin: 22px 0 12px; display: flex; align-items: baseline; gap: 7px; }
.credit-total b { font-family: Georgia, serif; font-size: 42px; line-height: 1; }
.credit-total span { color: var(--ink-3); font-size: 13px; }
.credit-total i { font-style: normal; }
.credit-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.credit-grid div { padding: 11px; background: var(--bg); }
.credit-grid span { display: block; color: var(--ink-3); font-size: 11px; }
.credit-grid b { font-size: 13px; }
.graduation-card { display: flex; gap: 12px; align-items: flex-start; }
.graduation-card.complete { border-color: #bcdccb; background: var(--green-soft); }
.status-mark { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--ruc-red); background: var(--ruc-red-soft); font-size: 11px; font-weight: 800; }
.graduation-card.complete .status-mark { color: #fff; background: var(--green); }
.graduation-card b { font-size: 14px; }
.graduation-card p { margin: 3px 0 0; color: var(--ink-2); font-size: 12px; line-height: 1.55; }
.certificate-section { margin-top: 44px; }
.certificate-section[hidden] { display: none; }
.certificate-head { margin-bottom: 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.certificate-head h2 { margin: 3px 0 4px; font-size: 22px; }
.certificate-head p { margin: 0; color: var(--ink-3); font-size: 13px; }

/* Profile */
.profile-hero {
  margin-bottom: 34px;
  padding: 30px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  color: #fff;
  border-radius: var(--radius);
  background: linear-gradient(116deg, var(--ruc-red-deep), var(--ruc-red));
}
.profile-identity { display: flex; align-items: center; gap: 19px; }
.profile-avatar { width: 72px; height: 72px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(255,255,255,.15); font-family: Georgia, serif; font-size: 28px; font-weight: 700; }
.profile-role { color: rgba(255,255,255,.7); font-size: 11px; letter-spacing: .1em; }
.profile-identity h2 { margin: 2px 0 0; font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", SimSun, serif; font-size: 27px; }
.profile-identity p { margin: 2px 0 0; color: rgba(255,255,255,.7); font-size: 13px; }
.profile-metrics { display: grid; grid-template-columns: repeat(4, minmax(78px, 1fr)); }
.profile-metrics div { padding: 3px 20px; text-align: center; border-left: 1px solid rgba(255,255,255,.22); }
.profile-metrics b { display: block; font-family: Georgia, "Songti SC", serif; font-size: 24px; }
.profile-metrics span { color: rgba(255,255,255,.66); font-size: 11px; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.profile-section-head { margin-bottom: 14px; display: flex; justify-content: space-between; align-items: flex-end; }
.profile-section-head h2 { margin: 2px 0 0; font-size: 21px; }
.record-list { border-top: 2px solid var(--ink); background: #fff; }
.record-item {
  min-height: 100px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 155px 56px;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-top: 0;
}
.record-state { padding: 4px 6px; color: var(--amber); background: var(--amber-soft); border-radius: 3px; font-size: 11px; font-weight: 700; text-align: center; }
.record-state.done { color: var(--green); background: var(--green-soft); }
.record-main h3 { margin: 0 0 3px; font-size: 15px; }
.record-main h3 a { color: var(--ink); }
.record-main p { margin: 0; color: var(--ink-3); font-size: 12px; }
.record-progress { display: flex; align-items: center; gap: 8px; }
.record-progress .progress { flex: 1; }
.record-progress span { width: 30px; color: var(--ink-3); font-size: 11px; }
.record-credit { display: grid; justify-items: center; color: var(--ink-3); font-size: 10px; }
.record-credit b { color: var(--ink); font-family: Georgia, serif; font-size: 20px; }
.profile-aside { display: grid; gap: 16px; }
.info-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.info-card h2 { margin: 0 0 14px; font-size: 16px; }
.info-card dl { margin: 0; }
.info-card dl div { padding: 9px 0; display: grid; gap: 2px; border-bottom: 1px solid var(--line); }
.info-card dl div:last-child { border-bottom: 0; }
.info-card dt { color: var(--ink-3); font-size: 11px; }
.info-card dd { margin: 0; font-size: 13px; word-break: break-word; }
.account-card p { margin: 0 0 16px; color: var(--ink-2); font-size: 12px; }

/* Progress */
.progress { height: 6px; overflow: hidden; border-radius: 99px; background: #e9ebed; }
.progress > i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--ruc-red); transition: width .25s; }
.progress.large { height: 8px; }
.progress-label { margin-top: 5px; display: flex; justify-content: space-between; color: var(--ink-3); font-size: 11px; }

/* Course detail */
.breadcrumb { margin-bottom: 16px; display: flex; gap: 9px; color: var(--ink-3); font-size: 13px; }
.breadcrumb a { color: var(--ink-2); }
.hierarchy-breadcrumb { min-height: 62px; margin-bottom: 20px; align-items: stretch; gap: 0; }
.hierarchy-level { min-width: 156px; padding: 9px 16px; display: grid; align-content: center; gap: 1px; border: 1px solid var(--line); }
.hierarchy-level small { font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.hierarchy-level strong { font-size: 17px; line-height: 1.35; }
.hierarchy-parent { border-radius: 6px 0 0 6px; background: #fff; }
.hierarchy-parent small { color: var(--ink-3); }
.hierarchy-parent strong { color: var(--ink); }
.hierarchy-parent:hover { border-color: #c8ccd2; background: #fafafa; }
.hierarchy-separator { width: 38px; display: grid; place-items: center; color: var(--ruc-red); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-warm); font-size: 18px; font-weight: 700; }
.hierarchy-current { color: #fff; border-color: var(--ruc-red); border-radius: 0 6px 6px 0; background: var(--ruc-red); }
.hierarchy-current small { color: rgba(255,255,255,.72); }
.detail-head { position: relative; overflow: hidden; margin-bottom: 18px; padding: 31px 34px; border: 1px solid var(--line); border-top: 3px solid var(--ruc-red); border-radius: var(--radius); background: #fff; }
.detail-head::after { content: "RUC"; position: absolute; right: 22px; top: -32px; color: rgba(159,15,36,.035); font-family: Georgia, serif; font-size: 132px; font-weight: 700; }
.detail-head .course-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.detail-code { color: var(--ink-3); font-family: Georgia, serif; font-size: 10px; letter-spacing: .15em; }
.detail-head h1 { position: relative; z-index: 1; margin: 0 0 9px; font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", SimSun, serif; font-size: clamp(26px, 3vw, 34px); }
.detail-subtitle { position: relative; z-index: 1; margin: -2px 0 10px; color: var(--ruc-red); font-size: 15px; font-weight: 650; }
.course-summary { margin: 0; color: var(--ink-2); font-size: 14px; }
.detail-head .course-summary { position: relative; z-index: 1; max-width: 760px; }
.detail-meta { position: relative; z-index: 1; margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px 30px; color: var(--ink-2); font-size: 13px; }
.detail-meta span { display: grid; gap: 1px; }
.detail-meta b { color: var(--ink-3); font-size: 10px; font-weight: 500; }
.placeholder-note { margin-bottom: 18px; padding: 11px 14px; color: #385975; border: 1px solid #cfdae4; border-radius: 5px; background: var(--blue-soft); font-size: 12px; }
.placeholder-note b { color: #274d6d; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.lesson-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.lesson { min-height: 88px; padding: 15px 19px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.lesson:last-child { border-bottom: 0; }
.lesson:hover { background: #fbfbfb; }
.lesson-seq { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; color: var(--ink-2); border: 1px solid var(--line); border-radius: 50%; font-family: Georgia, serif; font-size: 14px; font-weight: 700; }
.lesson.done .lesson-seq { color: #fff; border-color: var(--green); background: var(--green); }
.lesson-body { min-width: 0; flex: 1; }
.lesson-title { font-size: 14px; font-weight: 650; }
.lesson-sub { margin-top: 3px; color: var(--ink-3); font-size: 11px; }
.lesson-actions { display: flex; gap: 7px; }
.side-card { position: sticky; top: 92px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.side-card h3 { margin: 0 0 15px; font-size: 16px; }
.side-row { padding: 8px 0; display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); border-bottom: 1px solid var(--line); font-size: 12px; }
.side-row:last-child { border-bottom: 0; }
.side-row b { color: var(--ink); }
.badge { min-height: 22px; padding: 2px 7px; display: inline-flex; align-items: center; border-radius: 3px; font-size: 10px; font-weight: 700; }
.badge-required { color: var(--ruc-red); background: var(--ruc-red-soft); }
.badge-elective { color: var(--blue); background: var(--blue-soft); }
.badge-done { color: var(--green); background: var(--green-soft); }
.badge-progress { color: var(--amber); background: var(--amber-soft); }
.badge-todo { color: var(--ink-3); background: #eef0f2; }

/* Public course overview */
.course-overview-main { display: grid; gap: 20px; }
.overview-card { padding: 28px 30px; border: 1px solid var(--line); background: #fff; }
.section-title-row { margin-bottom: 20px; display: flex; align-items: flex-end; justify-content: space-between; }
.section-title-row h2, .session-list-head h2 { margin: 3px 0 0; font-size: 22px; }
.overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px; }
.overview-grid section { padding: 18px 0; border-top: 1px solid var(--line); }
.overview-grid h3 { margin: 0 0 7px; font-size: 14px; }
.overview-grid p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.75; }
.delivery-note { margin-top: 16px; padding: 16px 18px; display: grid; gap: 5px; border-left: 3px solid var(--ruc-red); background: var(--surface-warm); }
.delivery-note b { font-size: 13px; }
.delivery-note span { color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.catalog-session-list { overflow: visible; }
.session-list-head { padding: 24px 26px 18px; display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 2px solid var(--ink); }
.session-list-head > span { color: var(--ink-3); font-size: 13px; }
.catalog-session { border-bottom: 1px solid var(--line); background: #fff; }
.catalog-session:last-child { border-bottom: 0; }
.catalog-session summary { min-height: 82px; padding: 15px 20px; display: flex; align-items: center; gap: 15px; cursor: pointer; list-style: none; }
.catalog-session summary::-webkit-details-marker { display: none; }
.catalog-session summary:hover { background: #fbfbfb; }
.catalog-session-title { min-width: 0; display: grid; gap: 4px; flex: 1; }
.catalog-session-title b { font-size: 15px; }
.catalog-session-title small { color: var(--ink-3); font-size: 12px; }
.session-chevron { width: 9px; height: 9px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s; }
.catalog-session[open] .session-chevron { transform: rotate(225deg); }
.session-detail-grid { padding: 0 72px 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.session-detail-grid section { padding: 16px; border: 1px solid var(--line); background: #fafafa; }
.session-detail-grid h3 { margin: 0 0 7px; color: var(--ruc-red); font-size: 12px; }
.session-detail-grid p { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.session-detail-grid .session-evidence { grid-column: 1 / -1; background: var(--surface-warm); }
.session-evidence p { display: grid; gap: 5px; }
.session-evidence p b { color: var(--ink); }
.side-action { margin-top: 20px; }
.side-help { margin: 13px 0 0; color: var(--ink-3); font-size: 12px; line-height: 1.6; }
.course-selection { margin-top: 21px; padding-top: 18px; border-top: 1px solid var(--line); }
.selection-label { display: block; margin-bottom: 10px; color: var(--ink-3); font-family: Georgia, serif; font-size: 9px; letter-spacing: .14em; }
.selection-status { min-height: 48px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 5px; background: #fafafa; }
.selection-status > span { display: grid; line-height: 1.35; }
.selection-status small { color: var(--ink-3); font-size: 10px; }
.selection-status b { font-size: 13px; }
.selection-status.is-selected { color: var(--green); border-color: #cfe3d8; background: var(--green-soft); }
.selection-status i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--green); }
.selection-status.is-withdrawn { color: #7a5711; border-color: #e7d9b6; background: #fbf6e9; }
.selection-status.is-withdrawn i { background: #a97713; }

/* Course withdrawal confirmation */
.withdraw-dialog-backdrop { position: fixed; inset: 0; z-index: 600; padding: 20px; display: grid; place-items: center; background: rgba(25,16,18,.62); backdrop-filter: blur(3px); }
.withdraw-dialog { width: min(520px, 100%); padding: 32px; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px 20px; border-top: 4px solid var(--ruc-red); border-radius: var(--radius); background: #fff; box-shadow: 0 28px 80px rgba(24,3,8,.36); }
.withdraw-dialog-mark { width: 54px; height: 54px; display: grid; place-items: center; color: var(--ruc-red); border-radius: 50%; background: var(--ruc-red-soft); font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", SimSun, serif; font-size: 22px; font-weight: 700; }
.withdraw-dialog-copy h2 { margin: 4px 0 6px; font-size: 24px; }
.withdraw-dialog-copy p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.65; }
.withdraw-dialog-course, .withdraw-preserve-note, .withdraw-dialog-error, .withdraw-dialog-actions { grid-column: 1 / -1; }
.withdraw-dialog-course { padding: 14px 16px; display: grid; gap: 3px; border-left: 3px solid var(--ruc-red); background: var(--surface-warm); }
.withdraw-dialog-course small { color: var(--ink-3); font-size: 11px; }
.withdraw-dialog-course strong { font-size: 15px; line-height: 1.5; }
.withdraw-preserve-note { padding: 14px 16px; display: grid; gap: 4px; border: 1px solid #cfe3d8; border-radius: 5px; background: var(--green-soft); }
.withdraw-preserve-note b { color: var(--green); font-size: 13px; }
.withdraw-preserve-note span { color: var(--ink-2); font-size: 12px; line-height: 1.65; }
.withdraw-dialog-error { margin: -4px 0 0; padding: 9px 11px; color: var(--ruc-red); border-radius: 4px; background: var(--ruc-red-soft); font-size: 12px; }
.withdraw-dialog-error[hidden] { display: none; }
.withdraw-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }

@keyframes catalog-detail-enter {
  from { opacity: 0; transform: scale(.985) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.course-detail-body .detail-page { transform-origin: center top; animation: catalog-detail-enter .3s cubic-bezier(.2,.7,.2,1) both; }
@media (prefers-reduced-motion: reduce) {
  .course-detail-body .detail-page { animation: none; }
  .course-expand-transition, .course-transition-preview { transition: none; }
  .course-row { transition: none; }
  .course-row:hover, .course-row:focus-within { transform: none; }
}

/* My course learning detail */
.learning-detail-page { max-width: 1180px; }
.learning-detail-head { position: relative; overflow: hidden; min-height: 150px; margin-bottom: 16px; padding: 26px 32px; display: flex; align-items: center; justify-content: space-between; gap: 30px; color: #fff; border-radius: var(--radius); background: linear-gradient(118deg, #4b0614, #9f0f24 66%, #b92c3e); box-shadow: var(--shadow); }
.learning-detail-head::after { content: "RUC"; position: absolute; right: 22px; top: -46px; color: rgba(255,255,255,.07); font-family: Georgia, serif; font-size: 155px; font-weight: 700; }
.learning-detail-head > * { position: relative; z-index: 1; }
.learning-detail-head h1 { max-width: 760px; margin: 5px 0 6px; font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", SimSun, serif; font-size: clamp(25px, 2.7vw, 34px); }
.learning-detail-head p { max-width: 740px; margin: 0; color: rgba(255,255,255,.78); font-size: 14px; line-height: 1.55; }
.learning-head-facts { display: flex; gap: 1px; background: rgba(255,255,255,.16); }
.learning-head-facts span { min-width: 104px; padding: 11px 14px; display: grid; color: rgba(255,255,255,.72); background: rgba(56,0,10,.35); font-size: 12px; text-align: center; }
.learning-head-facts b { color: #fff; font-family: Georgia, serif; font-size: 22px; }
.learning-overview { margin-bottom: 16px; padding: 18px 20px; display: grid; grid-template-columns: 1.05fr 1.35fr 1.25fr auto; align-items: center; gap: 22px; border: 1px solid var(--line); background: #fff; }
.overview-progress-block { min-width: 0; }
.overview-progress-value { margin: 5px 0 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.overview-progress-value b { color: var(--ruc-red); font-family: Georgia, serif; font-size: 28px; }
.overview-progress-value span { color: var(--ink-3); font-size: 13px; }
.overview-metrics { min-height: 64px; padding: 0 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.overview-metrics div { display: grid; align-content: center; gap: 5px; }
.overview-metrics span { color: var(--ink-3); font-size: 12px; }
.overview-metrics b { font-size: 14px; }
.overview-platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.overview-platforms > div { min-width: 0; display: flex; align-items: center; gap: 10px; }
.overview-platforms p { min-width: 0; margin: 0; display: grid; }
.overview-platforms b { font-size: 14px; }
.overview-platforms small { color: var(--ink-3); font-size: 11px; line-height: 1.35; }
.overview-course-link { justify-self: end; }
.learning-session-list { display: grid; gap: 10px; }
.learning-session { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 5px 18px rgba(27,31,38,.04); }
.learning-session > header { min-height: 102px; padding: 14px 18px; display: grid; grid-template-columns: 42px minmax(0, 1fr) 178px 286px; align-items: center; gap: 14px; }
.learning-session-no { width: 38px; height: 38px; display: grid; place-items: center; color: var(--ruc-red); border: 1px solid #e3bac1; border-radius: 50%; font-family: Georgia, serif; font-weight: 700; }
.learning-session.done .learning-session-no { color: #fff; border-color: var(--green); background: var(--green); }
.learning-session-title > span { color: var(--ink-3); font-family: Georgia, serif; font-size: 11px; letter-spacing: .12em; }
.learning-session h2 { margin: 3px 0 2px; font-size: 17px; line-height: 1.4; }
.learning-session header p { margin: 0; color: var(--ink-3); font-size: 12px; }
.assignment-status { min-height: 54px; padding-left: 16px; display: grid; grid-template-columns: 1fr 64px; align-items: center; gap: 10px; border-left: 1px solid var(--line); }
.assignment-status > div { display: grid; gap: 5px; }
.assignment-status span { color: var(--ink-3); font-size: 11px; }
.assignment-status strong { font-family: Georgia, serif; font-size: 18px; }
.assignment-status strong small { color: var(--ink-3); font-size: 11px; font-weight: 400; }
.assignment-badge { width: max-content; padding: 3px 7px; border-radius: 3px; font-size: 11px; }
.assignment-badge.todo { color: var(--ink-3); background: #eef0f2; }
.assignment-badge.progress, .assignment-badge.submitted { color: var(--amber); background: var(--amber-soft); }
.assignment-badge.graded { color: var(--green); background: var(--green-soft); }
.assignment-badge.failed { color: var(--ruc-red); background: var(--ruc-red-soft); }
.learning-session-body[hidden] { display: none; }
.learning-session-body { padding: 15px 76px 17px; display: grid; grid-template-columns: 1.35fr .65fr; gap: 22px; border-top: 1px solid var(--line); background: #fafafa; }
.learning-session-body section + section { padding-left: 22px; border-left: 1px solid var(--line); }
.learning-session-body h3 { margin: 0 0 5px; font-size: 13px; }
.learning-session-body p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.65; }
.session-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.session-buttons .btn { width: 100%; }
.session-detail-toggle { grid-column: 1 / -1; padding: 3px 6px; border: 0; color: var(--ink-3); background: transparent; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.session-detail-toggle:hover { color: var(--ruc-red); }
.partner-mark { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; border-radius: 8px; font-weight: 800; }
.partner-mark.nai { background: var(--blue); }
.partner-mark.claw { background: var(--ruc-red); }

/* Local client launch dialog */
.dialog-open { overflow: hidden; }
.launch-dialog[hidden] { display: none; }
.launch-dialog { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 20px; }
.launch-dialog-backdrop { position: absolute; inset: 0; background: rgba(25,16,18,.58); backdrop-filter: blur(3px); }
.launch-dialog-card { position: relative; z-index: 1; width: min(520px, 100%); padding: 34px; display: grid; justify-items: center; gap: 17px; text-align: center; border-top: 4px solid var(--ruc-red); border-radius: var(--radius); background: #fff; box-shadow: 0 28px 80px rgba(24,3,8,.35); }
.launch-dialog-close { position: absolute; right: 14px; top: 11px; width: 32px; height: 32px; border: 0; color: var(--ink-3); background: transparent; font-size: 24px; }
.launch-state-icon { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; }
.launch-state-icon.pending { background: var(--blue-soft); }
.launch-state-icon.success { background: var(--green-soft); }
.launch-state-icon.failed { background: var(--ruc-red-soft); }
.launch-state-icon i { width: 17px; height: 17px; border: 3px solid currentColor; border-radius: 50%; }
.launch-state-icon.pending i { color: var(--blue); border-right-color: transparent; animation: spin .8s linear infinite; }
.launch-state-icon.success i { width: 20px; height: 11px; color: var(--green); border: 0; border-left: 3px solid; border-bottom: 3px solid; border-radius: 0; transform: rotate(-45deg); }
.launch-state-icon.failed i { position: relative; color: var(--ruc-red); border: 0; }
.launch-state-icon.failed i::before, .launch-state-icon.failed i::after { content: ""; position: absolute; left: 7px; top: -2px; width: 3px; height: 22px; background: currentColor; transform: rotate(45deg); }
.launch-state-icon.failed i::after { transform: rotate(-45deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.launch-dialog-card h2 { margin: 5px 0 7px; font-size: 23px; }
.launch-dialog-card p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.launch-meta { min-height: 16px; color: var(--ink-3); font-family: monospace; font-size: 11px; }
.launch-actions { display: flex; justify-content: center; gap: 10px; }

/* Mock client guide */
.mock-guide-page { max-width: 1080px; }
.mock-guide-hero { margin-bottom: 24px; padding: 38px; color: #fff; border-radius: var(--radius); background: linear-gradient(120deg, var(--ruc-red-deep), var(--ruc-red)); }
.mock-guide-hero h1 { margin: 7px 0 10px; font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", SimSun, serif; font-size: 34px; }
.mock-guide-hero p { max-width: 760px; margin: 0; color: rgba(255,255,255,.8); line-height: 1.8; }
.mock-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.mock-guide-card { padding: 26px; border: 1px solid var(--line); background: #fff; }
.mock-step { color: var(--ruc-red); font-family: Georgia, serif; font-size: 12px; font-weight: 700; }
.mock-guide-card h2 { margin: 6px 0 11px; font-size: 20px; }
.mock-guide-card p, .mock-guide-card li { color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.mock-guide-card pre { overflow-x: auto; padding: 13px 15px; color: #e9edf2; border-radius: 5px; background: #24272c; font: 13px/1.6 Consolas, monospace; }
.mock-guide-card code { color: var(--ruc-red); }

/* Authentication */
.auth-page { background: var(--ruc-red-deep); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.08fr) minmax(480px, .92fr); }
.auth-visual { position: relative; overflow: hidden; min-height: 100vh; padding: 46px 54px; display: flex; flex-direction: column; color: #fff; }
.auth-visual-bg { position: absolute; inset: -4px; background: linear-gradient(180deg, rgba(55,4,14,.22), rgba(48,2,10,.78)), url("assets/brand/ruc-campus-zhongguancun.jpg") center / cover no-repeat; filter: saturate(.7) blur(.6px); transform: scale(1.01); }
.auth-logo, .auth-visual-copy { position: relative; z-index: 1; }
.auth-logo img { width: 195px; display: block; }
.auth-visual-copy { margin-top: auto; max-width: 630px; padding-bottom: 36px; }
.auth-visual-copy > span { color: rgba(255,255,255,.65); font-family: Georgia, serif; font-size: 11px; letter-spacing: .18em; }
.auth-visual-copy h1 { margin: 12px 0 16px; font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", SimSun, serif; font-size: clamp(34px, 4vw, 52px); line-height: 1.35; }
.auth-visual-copy p { margin: 0; color: rgba(255,255,255,.76); }
.auth-form-panel { padding: 50px 36px; display: grid; place-items: center; overflow-y: auto; background: #fff; }
.auth-card { width: min(430px, 100%); }
.auth-card.register-open { width: min(650px, 100%); }
.auth-register-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.auth-register-grid:not([style*="display:none"]) { display: grid !important; }
.auth-register-grid .field-wide, .auth-register-grid > .btn { grid-column: 1 / -1; }
.auth-consent { display: flex; gap: 9px; margin: 1px 0 15px; color: var(--ink-3); font-size: 12px; line-height: 1.55; }
.auth-consent input { width: 16px; height: 16px; margin-top: 1px; accent-color: var(--ruc-red); flex: 0 0 auto; }
.auth-card-head { margin-bottom: 23px; }
.auth-card-head h2 { margin: 4px 0 7px; font-size: 25px; }
.auth-card-head p { margin: 0; color: var(--ink-3); font-size: 13px; }
.auth-mobile-brand { display: none; }
.tabs { margin-bottom: 21px; padding-bottom: 1px; display: flex; gap: 26px; border-bottom: 1px solid var(--line); }
.tabs button { position: relative; padding: 9px 2px 12px; border: 0; color: var(--ink-3); background: transparent; font-size: 14px; font-weight: 700; }
.tabs button.active { color: var(--ruc-red); }
.tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--ruc-red); }
.field { margin-bottom: 15px; }
.field label { margin-bottom: 6px; display: block; color: var(--ink-2); font-size: 13px; font-weight: 650; }
.field input, .field select { width: 100%; height: 44px; padding: 0 12px; color: var(--ink); border: 1px solid var(--line-dark); border-radius: 4px; background: #fff; font-size: 14px; }
.field select { appearance: auto; }
.field input:focus, .field select:focus { outline: 2px solid rgba(159,15,36,.12); border-color: var(--ruc-red); }
.field .hint { margin-top: 5px; color: var(--ink-3); font-size: 11px; }
.form-error, .form-ok { margin-bottom: 14px; padding: 10px 12px; border-radius: 4px; font-size: 12px; }
.form-error { color: var(--ruc-red); background: var(--ruc-red-soft); }
.form-ok { color: var(--green); background: var(--green-soft); }
.demo-tip { margin-top: 16px; padding: 13px; display: flex; align-items: center; gap: 12px; border: 1px solid #d7e0e8; border-radius: 5px; background: #f3f6f8; }
.demo-tip div { min-width: 0; display: grid; flex: 1; }
.demo-tip b { color: #31536f; font-size: 12px; }
.demo-tip span { color: #688096; font-size: 10px; }
.demo-tip button { padding: 6px 9px; flex: 0 0 auto; color: #fff; border: 0; border-radius: 3px; background: var(--blue); font-size: 11px; font-weight: 700; }
.auth-back { margin-top: 24px; display: block; color: var(--ink-3); font-size: 12px; text-align: center; }

/* OIDC consent */
.consent-page { min-height: 100vh; color: var(--ink); background: linear-gradient(145deg, rgba(80,3,18,.94), rgba(159,15,36,.85)), url("assets/brand/ruc-campus-zhongguancun.jpg") center / cover fixed; }
.consent-shell { min-height: 100vh; padding: 38px 22px; display: grid; place-items: center; align-content: center; gap: 24px; }
.consent-brand { display: flex; align-items: center; gap: 15px; color: #fff; font-weight: 700; }
.consent-brand img { width: 190px; }
.consent-brand span { padding-left: 15px; border-left: 1px solid rgba(255,255,255,.35); }
.consent-card { width: min(590px, 100%); padding: 38px 42px; border-top: 4px solid var(--ruc-red); border-radius: 6px; background: #fff; box-shadow: 0 22px 60px rgba(30,0,6,.28); }
.consent-card h1 { margin: 6px 0 12px; font-size: 28px; }
.consent-card > p { margin: 0; color: var(--ink-3); line-height: 1.75; }
.consent-flow { margin: 24px 0; padding: 15px; display: flex; align-items: center; justify-content: center; gap: 20px; color: var(--ruc-red); border: 1px solid rgba(159,15,36,.2); background: var(--ruc-red-soft); font-weight: 750; }
.consent-flow i { font-style: normal; font-size: 20px; }
.consent-scope h2 { margin: 0 0 10px; font-size: 15px; }
.consent-scope ul { margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; list-style: none; }
.consent-scope li { padding: 10px 12px; display: grid; border: 1px solid var(--line); border-radius: 4px; }
.consent-scope li b { font-size: 12px; }
.consent-scope li span { color: var(--ink-3); font: 10px/1.4 Consolas, monospace; }
.consent-security { margin: 20px 0; padding: 13px 15px; display: grid; gap: 4px; color: #31536f; border-left: 3px solid var(--blue); background: #f3f6f8; }
.consent-security b { font-size: 12px; }
.consent-security span { font-size: 11px; line-height: 1.6; }
.consent-actions { display: flex; justify-content: flex-end; gap: 10px; }
.admission-access-note { grid-column: 1 / -1; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: #714c05; border: 1px solid #ead9ad; border-radius: 4px; background: #fff9e9; }
.admission-access-note div { display: grid; gap: 3px; }
.admission-access-note b { font-size: 13px; }
.admission-access-note span { font-size: 11px; line-height: 1.6; }
.btn:disabled { cursor: not-allowed; opacity: .48; }

/* Admission review console */
.admin-review-page { min-height: 100vh; background: #f5f4f2; }
.admin-review-head { margin-bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.admin-review-head h1 { margin: 5px 0 8px; font-size: 34px; }
.admin-review-head p { max-width: 760px; margin: 0; color: var(--ink-3); line-height: 1.7; }
.admin-token-bar { margin-bottom: 18px; padding: 16px; display: grid; grid-template-columns: minmax(260px, 1fr) 200px auto auto; align-items: end; gap: 12px; }
.admin-token-bar label { display: grid; gap: 5px; color: var(--ink-3); font-size: 11px; }
.admin-token-bar input, .admin-token-bar select, .admin-record form input { height: 40px; padding: 0 11px; border: 1px solid var(--line-dark); border-radius: 4px; background: #fff; }
.roster-import-panel { margin-bottom: 18px; padding: 16px; }
.roster-import-panel summary { cursor: pointer; color: var(--ruc-red); font-weight: 750; }
.roster-import-panel p { color: var(--ink-3); font-size: 11px; }
.roster-import-panel > div { display: grid; grid-template-columns: 180px 180px minmax(220px, 1fr) auto; gap: 9px; }
.roster-import-panel input { min-width: 0; height: 40px; padding: 0 11px; border: 1px solid var(--line-dark); border-radius: 4px; background: #fff; }
.admin-records { display: grid; gap: 12px; }
.admin-record { padding: 21px 24px; }
.admin-record header { display: flex; align-items: flex-start; justify-content: space-between; }
.admin-record header span { color: var(--ruc-red); font: 700 10px/1.4 Georgia, serif; letter-spacing: .12em; }
.admin-record h2 { margin: 3px 0; font-size: 20px; }
.admin-record header p { margin: 0; color: var(--ink-3); font-size: 12px; }
.admin-record header > b { padding: 5px 9px; color: var(--ruc-red); background: var(--ruc-red-soft); font-size: 11px; }
.admin-record dl { margin: 18px 0 12px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.admin-record dl div { padding: 12px; }
.admin-record dl div + div { border-left: 1px solid var(--line); }
.admin-record dt { color: var(--ink-3); font-size: 10px; }
.admin-record dd { margin: 4px 0 0; font-size: 12px; font-weight: 700; }
.admin-review-history { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-review-history span { padding: 4px 7px; color: #31536f; border-radius: 3px; background: #eef3f6; font-size: 10px; }
.admin-record form { margin-top: 14px; display: grid; grid-template-columns: 160px 180px minmax(160px, 1fr) auto auto; gap: 8px; }

/* Certificate */
.cert { position: relative; overflow: hidden; padding: 42px 48px 36px; text-align: center; color: var(--ink); border: 3px double var(--ruc-red); border-radius: 3px; background: #fffdf8; font-family: "Songti SC", STSong, SimSun, serif; }
.cert::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(159,15,36,.3); pointer-events: none; }
.cert-school { margin-bottom: 6px; color: var(--ruc-red); font-size: 15px; letter-spacing: 6px; }
.cert-title { margin: 0 0 26px; color: var(--ruc-red); font-size: 30px; letter-spacing: 10px; }
.cert-body { max-width: 630px; margin: 0 auto; font-size: 16px; line-height: 2.1; text-align: justify; }
.cert-body .name { padding: 0 6px; border-bottom: 1px solid var(--ink); font-size: 19px; font-weight: 700; }
.cert-foot { margin-top: 34px; padding-right: 10px; display: flex; align-items: flex-end; justify-content: flex-end; gap: 26px; }
.cert-date { font-size: 14px; }
.cert-no { margin-top: 4px; color: var(--ink-3); font-size: 11px; }
.cert-seal { width: 88px; height: 88px; display: grid; place-items: center; flex: 0 0 auto; color: rgba(159,15,36,.8); border: 3px solid rgba(159,15,36,.72); border-radius: 50%; font-size: 11px; line-height: 1.45; transform: rotate(-9deg); }

/* External-course placeholder */
.placeholder-page { min-height: 100vh; color: #fff; background: linear-gradient(115deg, rgba(67,0,13,.94), rgba(159,15,36,.78)), url("assets/brand/ruc-campus-zhongguancun.jpg") center/cover fixed; }
.placeholder-shell { min-height: 100vh; width: min(100% - 40px, 720px); margin: 0 auto; padding: 54px 0; display: grid; align-content: center; gap: 28px; }
.placeholder-shell > img { width: 184px; height: auto; }
.placeholder-card { padding: 42px 44px; color: var(--ink); border-top: 4px solid var(--gold); border-radius: 2px; background: rgba(255,255,255,.97); box-shadow: 0 24px 70px rgba(41,0,8,.3); }
.placeholder-card h1 { margin: 10px 0 8px; font-size: 30px; }
.placeholder-card > p { margin: 0; color: var(--ink-2); }
.placeholder-message { margin: 28px 0; padding: 20px; display: grid; gap: 6px; border-left: 3px solid var(--ruc-red); background: var(--surface-warm); }
.placeholder-message b { font-size: 14px; }
.placeholder-message span { color: var(--ink-2); font-size: 13px; line-height: 1.7; }

/* Misc */
.page-error { position: fixed; left: 50%; top: 50%; z-index: 200; width: min(420px, calc(100% - 32px)); padding: 28px; display: grid; justify-items: center; gap: 10px; text-align: center; color: var(--ink); border: 1px solid #edcbd1; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); transform: translate(-50%, -50%); }
.page-error b { font-size: 18px; }
.page-error span { color: var(--ink-2); font-size: 13px; }
#toast { position: fixed; left: 50%; bottom: 28px; z-index: 300; max-width: 90vw; padding: 11px 18px; color: #fff; border-radius: 4px; background: var(--ink); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(18px); transition: .2s; font-size: 13px; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--ruc-red); }
#toast.ok { background: var(--green); }
footer { color: rgba(255,255,255,.65); background: #24272c; }
.footer-inner { min-height: 118px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-inner div { display: grid; }
.footer-inner b { color: #fff; font-size: 14px; }
.footer-inner span { margin-top: 4px; color: var(--gold); font-size: 11px; letter-spacing: .12em; }
.footer-inner p { max-width: 530px; margin: 0; font-size: 12px; text-align: right; }

@media print {
  .site-header, footer, #toast, .certificate-head, .continue-panel, .learning-layout, .page-heading { display: none !important; }
  body { background: #fff; }
  .page-main { padding: 0; }
  .certificate-section { margin: 0; }
}

@media (max-width: 980px) {
  .product-name { display: none; }
  .brand-divider { display: none; }
  .catalog-tools { grid-template-columns: minmax(0, 1fr) 150px 190px; }
  .filter-tabs { grid-row: 2; grid-column: 1 / -1; width: max-content; }
  .course-row { grid-template-columns: 42px minmax(0, 1fr) 124px; }
  .course-row-actions { grid-column: 2 / -1; display: flex; align-items: center; justify-content: flex-end; }
  .learning-layout, .profile-layout { grid-template-columns: 1fr; }
  .learning-aside { grid-template-columns: repeat(2, 1fr); }
  .profile-aside { grid-template-columns: repeat(2, 1fr); }
  .profile-hero { align-items: flex-start; flex-direction: column; }
  .profile-metrics { width: 100%; }
  .profile-metrics div:first-child { border-left: 0; }
  .learning-overview { grid-template-columns: 1fr 1.4fr auto; }
  .overview-platforms { grid-column: 1 / 3; }
  .learning-session > header { grid-template-columns: 42px minmax(0, 1fr) 168px 250px; }
}

@media (max-width: 760px) {
  .container { width: min(100% - 28px, 1180px); }
  .nav-inner { height: 64px; gap: 8px; }
  .brand img { width: 112px; }
  .nav-links { margin-left: auto; }
  .nav-links a { min-width: 0; padding: 0 10px; font-size: 13px; }
  .nav-links a.active::after { left: 10px; right: 10px; }
  .nav-right { margin-left: 0; }
  .user-trigger { padding: 4px; }
  .user-trigger-copy, .user-trigger > svg { display: none; }
  .catalog-hero, .catalog-hero-inner { min-height: 300px; }
  .catalog-hero-bg { background-position: 58% center; }
  .hero-copy { width: 100%; padding-right: 22px; }
  .hero-copy h1 { font-size: 42px; }
  .hero-copy p { font-size: 15px; }
  .program-note-inner { min-height: 78px; flex-wrap: wrap; align-content: center; gap: 3px 10px; }
  .program-note-meta { width: 100%; margin-left: 0; padding-left: 76px; }
  .page-main { padding-top: 38px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .page-heading h1, .page-heading h2 { font-size: 28px; }
  .catalog-tools { grid-template-columns: 1fr; }
  .filter-tabs { grid-row: auto; grid-column: auto; width: 100%; }
  .filter-tabs button { min-width: 0; flex: 1; padding: 0 6px; white-space: nowrap; }
  .course-section + .course-section { margin-top: 36px; }
  .course-section-head { min-height: 64px; padding: 2px 8px 10px 16px; align-items: flex-end; }
  .course-section-head::before { top: 5px; bottom: 11px; }
  .course-section-head::after { display: none; }
  .course-section-head h2 { font-size: 20px; }
  .course-section-count { min-width: 58px; }
  .course-section-count b { font-size: 21px; }
  .course-list { gap: 8px; }
  .course-row { min-height: 0; padding: 17px 14px; grid-template-columns: 1fr; gap: 10px; }
  .course-row::after { right: -24px; top: 48%; width: 132px; height: 132px; opacity: .04; -webkit-mask-size: 132px auto; mask-size: 132px auto; }
  .course-number { display: none; }
  .course-row h3 { font-size: 18px; }
  .course-facts { padding: 0; border: 0; }
  .course-facts div { min-height: 50px; padding: 7px 4px 6px; }
  .course-row-actions { grid-column: auto; }
  .course-row-actions .btn { width: 100%; }
  .hierarchy-breadcrumb { min-height: 56px; }
  .hierarchy-level { min-width: 0; flex: 1; padding: 8px 11px; }
  .hierarchy-level strong { font-size: 15px; }
  .hierarchy-separator { width: 30px; }
  .continue-panel { padding: 26px 22px; align-items: flex-start; flex-direction: column; gap: 18px; }
  .continue-progress { width: auto; display: flex; align-items: baseline; gap: 7px; }
  .learning-aside, .profile-aside { grid-template-columns: 1fr; }
  .learning-course { grid-template-columns: 34px minmax(0, 1fr); }
  .learning-course-credit { grid-column: 1; grid-row: 2; }
  .learning-course-actions { grid-column: 2; min-width: 120px; justify-self: end; }
  .profile-hero { padding: 26px 20px; }
  .profile-metrics { grid-template-columns: repeat(2, 1fr); gap: 18px 0; }
  .profile-metrics div:nth-child(3) { border-left: 0; }
  .record-item { grid-template-columns: 62px minmax(0, 1fr) 48px; }
  .record-progress { grid-column: 2 / -1; }
  .detail-layout { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .overview-grid, .session-detail-grid { grid-template-columns: 1fr; }
  .session-detail-grid { padding: 0 20px 20px; }
  .session-detail-grid .session-evidence { grid-column: auto; }
  .lesson { flex-wrap: wrap; }
  .lesson-actions { width: 100%; padding-left: 51px; justify-content: flex-end; }
  .learning-detail-head { padding: 24px; align-items: flex-start; flex-direction: column; }
  .learning-overview { padding: 18px; grid-template-columns: 1fr; gap: 16px; }
  .overview-metrics { padding: 14px 0; border-left: 0; border-right: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .overview-platforms { grid-column: auto; }
  .overview-course-link { width: 100%; justify-self: stretch; }
  .learning-session > header { grid-template-columns: 42px minmax(0, 1fr); }
  .assignment-status { grid-column: 2; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .learning-session > header .session-buttons { grid-column: 2; }
  .learning-session-body { padding: 15px 18px 17px; grid-template-columns: 1fr; }
  .learning-session-body section + section { padding: 15px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .auth-shell { display: block; background: #fff; }
  .auth-visual { display: none; }
  .auth-form-panel { min-height: 100vh; padding: 28px 22px 44px; align-content: start; }
  .auth-register-grid { grid-template-columns: 1fr; }
  .auth-register-grid .field-wide, .auth-register-grid > .btn { grid-column: auto; }
  .auth-mobile-brand { width: calc(100% + 44px); height: 72px; margin: -28px -22px 38px; padding: 0 22px; display: flex; align-items: center; gap: 13px; color: #fff; background: var(--ruc-red-dark); }
  .auth-mobile-brand img { width: 122px; }
  .auth-mobile-brand span { padding-left: 13px; border-left: 1px solid rgba(255,255,255,.3); font-size: 12px; }
  .consent-card { padding: 28px 22px; }
  .consent-scope ul { grid-template-columns: 1fr; }
  .admission-access-note { align-items: flex-start; flex-direction: column; }
  .admin-review-head { align-items: flex-start; flex-direction: column; }
  .admin-token-bar, .roster-import-panel > div { grid-template-columns: 1fr; }
  .admin-record dl { grid-template-columns: repeat(2, 1fr); }
  .admin-record dl div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .admin-record dl div:nth-child(4) { border-top: 1px solid var(--line); }
  .admin-record form { grid-template-columns: 1fr; }
  .footer-inner { padding: 26px 0; align-items: flex-start; flex-direction: column; gap: 12px; }
  .footer-inner p { text-align: left; }
  .cert { padding: 34px 28px 30px; }
  .cert-foot { padding-right: 0; }
}

@media (max-width: 480px) {
  .nav-inner { gap: 6px; }
  .brand img { width: 94px; }
  .nav-links { margin-left: 0; }
  .nav-links a { min-width: 60px; padding: 0 5px; font-size: 12px; }
  .nav-right { margin-left: auto; }
  .nav-right > .btn { min-height: 34px; padding: 6px 9px; font-size: 12px; }
  .avatar { width: 31px; height: 31px; }
  .program-note p { width: calc(100% - 76px); line-height: 1.4; }
  .hero-copy h1 { font-size: 36px; }
  .course-tabs button { padding-left: 9px; padding-right: 9px; font-size: 12px; }
  .credit-grid { grid-template-columns: 1fr; }
  .learning-head-facts { width: 100%; }
  .learning-head-facts span { min-width: 0; flex: 1; }
  .session-buttons { width: 100%; display: grid; grid-template-columns: 1fr; }
  .session-buttons .btn { width: 100%; }
  .launch-dialog-card { padding: 30px 22px 24px; }
  .launch-actions { width: 100%; flex-direction: column; }
  .launch-actions .btn { width: 100%; }
  .withdraw-dialog { padding: 26px 20px 22px; grid-template-columns: 44px minmax(0, 1fr); gap: 15px; }
  .withdraw-dialog-mark { width: 44px; height: 44px; font-size: 18px; }
  .withdraw-dialog-copy h2 { font-size: 21px; }
  .withdraw-dialog-actions { flex-direction: column-reverse; }
  .withdraw-dialog-actions .btn { width: 100%; }
  .mock-guide-grid { grid-template-columns: 1fr; }
  .mock-guide-hero { padding: 28px 22px; }
  .demo-tip { align-items: flex-start; flex-direction: column; }
  .demo-tip button { width: 100%; }
  .lesson-actions { padding-left: 0; display: grid; grid-template-columns: repeat(2, 1fr); }
  .lesson-actions .btn { width: 100%; }
}
