/* AutoLMS — program landing. Light academic theme. */
:root {
  --paper: #faf8f3;
  --paper-2: #ffffff;
  --ink: #1a1a22;
  --ink-soft: #4a4a55;
  --ink-faint: #8a8a96;
  --line: #e7e2d6;
  --line-strong: #d8d2c2;
  --accent: #2f3a6e;        /* deep indigo */
  --accent-soft: #50609c;
  --accent-wash: #eef0f7;
  --gold: #9a7b3f;
  --ok: #3f7a52;
  --warn: #9a6a2f;
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1080px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Spectral", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(26,26,34,.04), 0 2px 8px rgba(26,26,34,.05);
  --shadow-md: 0 6px 24px rgba(26,26,34,.09), 0 2px 6px rgba(26,26,34,.05);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-family: var(--serif); font-size: 19px; letter-spacing: .2px; }
.brand b { color: var(--accent); font-weight: 600; }
.topnav { display: flex; gap: 26px; font-size: 14.5px; color: var(--ink-soft); }
.topnav a:hover { color: var(--accent); }

/* ---- hero ---- */
.hero { padding: 84px 0 56px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(1100px 380px at 78% -8%, rgba(47,58,110,.07), transparent 60%),
    radial-gradient(640px 260px at 8% 110%, rgba(154,123,63,.06), transparent 60%);
}
.eyebrow {
  display: inline-block; font-size: 12.5px; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--accent-soft); font-weight: 600; margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.08; letter-spacing: -.5px; margin: 0 0 20px; max-width: 16ch;
}
.hero .lede { font-size: clamp(17px, 2.1vw, 21px); color: var(--ink-soft); max-width: 60ch; margin: 0 0 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 14px 36px; margin-top: 8px; }
.stat { display: flex; flex-direction: column; }
.stat .n { font-family: var(--serif); font-size: 30px; color: var(--accent); line-height: 1; }
.stat .l { font-size: 13px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 1px; margin-top: 6px; }

/* ---- section ---- */
section { padding: 64px 0; }
.section-head { margin-bottom: 34px; }
.section-head h2 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 3.2vw, 34px);
  letter-spacing: -.3px; margin: 0 0 8px;
}
.section-head p { color: var(--ink-soft); margin: 0; max-width: 64ch; }
.kicker { font-size: 12.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* ---- semester block ---- */
.semester { padding: 30px 0; border-top: 1px solid var(--line); }
.semester:first-of-type { border-top: 0; }
.sem-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.sem-num {
  font-family: var(--serif); font-size: 15px; color: var(--paper-2);
  background: var(--accent); width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.sem-head h3 { font-family: var(--serif); font-weight: 600; font-size: 24px; margin: 0; }
.sem-head .theme { color: var(--ink-faint); font-size: 15px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }

/* ---- course card ---- */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 22px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  will-change: transform;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card .badge { align-self: flex-start; margin-bottom: 12px; }
.card h4 { font-family: var(--serif); font-weight: 600; font-size: 19px; line-height: 1.25; margin: 0 0 10px; letter-spacing: -.2px; }
.card .tagline { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 16px; flex: 1; }
.card-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.card .arrow { margin-left: auto; color: var(--accent-soft); font-size: 15px; transition: transform .18s ease; }
a.card:hover .arrow { transform: translateX(3px); }

.badge {
  font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 600;
  padding: 4px 9px; border-radius: 100px; border: 1px solid var(--line-strong); color: var(--ink-faint);
}
.badge.course { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); background: var(--accent-wash); }
.badge.practice { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); background: #eef5f0; }
.badge.elective { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 35%, var(--line)); background: #f6f1e6; }
.badge.seminar, .badge.thesis { color: var(--accent-soft); background: var(--accent-wash); border-color: color-mix(in srgb, var(--accent) 24%, var(--line)); }

.card.is-elective { background: repeating-linear-gradient(135deg, var(--paper-2), var(--paper-2) 10px, #fcfaf5 10px, #fcfaf5 20px); border-style: dashed; }
.card.is-elective h4 { color: var(--ink-soft); }

/* ---- avatars ---- */
.avatars { display: flex; align-items: center; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: #fff; letter-spacing: .3px;
  border: 2px solid var(--paper-2); margin-left: -8px; background: var(--accent);
  background-size: cover; background-position: center;
}
.avatar:first-child { margin-left: 0; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; margin-left: -12px; border-width: 3px; }
.avatar.lg:first-child { margin-left: 0; }
.mentor-names { font-size: 13.5px; color: var(--ink-soft); }
.mentor-note { font-size: 13px; color: var(--ink-faint); font-style: italic; }

/* ---- mentors section ---- */
.mentor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.mentor-card { display: flex; flex-direction: column; gap: 12px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.mentor-top { display: flex; gap: 14px; align-items: center; }
.mentor-card .meta { min-width: 0; }
.mentor-card .bio { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.mentor-card.has-bio { grid-row: span 2; }
.mentor-card .nm { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.mentor-card .rl { font-size: 13px; color: var(--ink-faint); margin-top: 2px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.dot.confirmed { background: var(--ok); }
.dot.tentative { background: var(--warn); }

/* ---- electives bank ---- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { font-size: 14px; color: var(--ink-soft); background: var(--paper-2); border: 1px solid var(--line); border-radius: 100px; padding: 8px 15px; box-shadow: var(--shadow-sm); }
.chip span { color: var(--ink-faint); font-size: 12.5px; }

/* ===== course page ===== */
.course-hero { padding: 56px 0 40px; border-bottom: 1px solid var(--line); position: relative; }
.crumbs { font-size: 14px; color: var(--ink-faint); margin-bottom: 22px; }
.crumbs a:hover { color: var(--accent); }
.course-hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 4.4vw, 44px); line-height: 1.12; letter-spacing: -.4px; margin: 12px 0 16px; max-width: 22ch; }
.course-hero .tagline { font-size: clamp(17px, 2vw, 20px); color: var(--ink-soft); max-width: 60ch; margin: 0; }
.course-mentors { display: flex; align-items: center; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.course-body { display: grid; grid-template-columns: 1fr 300px; gap: 48px; padding: 48px 0; align-items: start; }
.prose p { color: var(--ink-soft); }
.prose h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; margin: 36px 0 14px; }
.prose h3:first-child { margin-top: 0; }
.li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.li:last-child { border-bottom: 0; }
.li .mk { color: var(--accent); flex: none; font-weight: 600; }
.topic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 28px; }
@media (max-width: 720px){ .topic-grid { grid-template-columns: 1fr; } }

.aside { position: sticky; top: 84px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.aside h4 { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 12px; }
.aside .row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.aside .row:last-child { border-bottom: 0; }
.aside .row .k { color: var(--ink-faint); }
.aside .row .v { text-align: right; }

.notice { font-size: 13px; color: var(--warn); background: #faf4e8; border: 1px solid #ecdcbd; border-radius: var(--radius-sm); padding: 10px 13px; margin-top: 18px; }

/* ===== feedback ===== */
.feedback { background: var(--accent); color: #eef0f7; border-radius: var(--radius); padding: 34px; margin: 8px 0 0; }
.feedback h3 { font-family: var(--serif); font-weight: 600; font-size: 24px; margin: 0 0 8px; color: #fff; }
.feedback p { color: #c4cbe4; margin: 0 0 20px; font-size: 15px; }
.feedback .fields { display: grid; gap: 12px; max-width: 560px; }
.feedback input, .feedback textarea {
  width: 100%; font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 12px 14px; resize: vertical;
}
.feedback textarea { min-height: 110px; }
.feedback input:focus, .feedback textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.feedback .btn {
  justify-self: start; cursor: pointer; font-family: var(--sans); font-weight: 600; font-size: 15px;
  background: var(--gold); color: #fff; border: 0; border-radius: var(--radius-sm); padding: 12px 26px;
  transition: filter .15s ease, transform .1s ease;
}
.feedback .btn:hover { filter: brightness(1.06); }
.feedback .btn:active { transform: translateY(1px); }
.feedback .btn:disabled { opacity: .6; cursor: default; }
.feedback .status { font-size: 14px; margin-top: 12px; min-height: 20px; color: #d8e6cf; }

/* ---- footer ---- */
footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--ink-faint); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 860px){ .course-body { grid-template-columns: 1fr; } .aside { position: static; } .topnav { display: none; } }

.prose-sec { margin-bottom: 4px; }
.prose-sec h3 { margin-top: 36px; }
.prose-sec:first-child h3 { margin-top: 0; }

/* ===== fragment comments (Google-Docs-style) ===== */
.ac-block { transition: background .12s ease; }
mark.ac-mark { color: inherit; cursor: pointer; padding: 0 .5px; border-radius: 1px;
  background: linear-gradient(180deg, transparent 56%, color-mix(in srgb, var(--gold) 34%, transparent) 56%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background .15s ease; }
mark.ac-mark:hover { background: linear-gradient(180deg, transparent 48%, color-mix(in srgb, var(--gold) 52%, transparent) 48%); }
mark.ac-mark.ac-flash, .ac-block.ac-flash { animation: ac-flash 1.6s ease; border-radius: 3px; }
@keyframes ac-flash { 0%, 30% { background: color-mix(in srgb, var(--gold) 48%, transparent); } 100% { background: linear-gradient(180deg, transparent 56%, color-mix(in srgb, var(--gold) 34%, transparent) 56%); } }

/* selection button */
.ac-selbtn { position: absolute; z-index: 10001; display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff; border: 0; border-radius: 9px; padding: 7px 12px;
  font: 600 13px/1 var(--sans); cursor: pointer; box-shadow: 0 6px 20px rgba(47,58,110,.32);
  animation: ac-fade .12s ease; }
.ac-selbtn svg { width: 15px; height: 15px; }
.ac-selbtn:active { transform: scale(.97); }
@keyframes ac-fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* popover (composer + thread) */
.ac-pop { position: absolute; z-index: 10002; width: 320px; max-width: 92vw;
  background: var(--paper-2); border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(26,26,34,.20); padding: 14px; font-family: var(--sans);
  animation: ac-fade .12s ease; }
.ac-pop-quote { font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); background: var(--paper);
  border-left: 3px solid var(--gold); border-radius: 0 6px 6px 0; padding: 7px 10px; margin-bottom: 10px;
  max-height: 84px; overflow: auto; font-style: italic; }
.ac-pop-name, .ac-pop-text { width: 100%; font-family: var(--sans); font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 11px; box-sizing: border-box; }
.ac-pop-name { margin-bottom: 8px; }
.ac-pop-text { resize: vertical; }
.ac-pop-name:focus, .ac-pop-text:focus { outline: 2px solid var(--accent-soft); outline-offset: 1px; }
.ac-pop-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ac-pop-status { font-size: 12px; color: var(--ink-faint); margin-right: auto; }
.ac-pop-cancel { background: none; border: 0; color: var(--ink-faint); font: 600 13px var(--sans); cursor: pointer; padding: 7px 8px; border-radius: 8px; }
.ac-pop-cancel:hover { color: var(--ink); }
.ac-pop-send { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: #fff;
  border: 0; border-radius: 9px; padding: 8px 14px; font: 600 13px var(--sans); cursor: pointer; }
.ac-pop-send svg { width: 14px; height: 14px; }
.ac-pop-send:hover { filter: brightness(1.08); }
.ac-pop-send:active { transform: scale(.97); }
.ac-pop-send:disabled { opacity: .55; cursor: default; }

/* thread popover */
.ac-thread-list { display: grid; gap: 10px; margin-bottom: 10px; max-height: 260px; overflow: auto; }
.ac-tc { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.ac-tc:last-child { border-bottom: 0; padding-bottom: 0; }
.ac-tc.resolved { opacity: .55; }
.ac-tc.resolved .ac-ptext { text-decoration: line-through; }

/* meta + resolve shared */
.ac-pmeta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.ac-pauthor { font-weight: 600; font-size: 13.5px; }
.ac-ptime { font-size: 12px; color: var(--ink-faint); }
.ac-ptext { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-soft); white-space: pre-wrap; }
.ac-presolve, .ac-done { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12.5px; }
.ac-presolve svg, .ac-done svg { width: 14px; height: 14px; }
.ac-presolve { background: none; border: 0; cursor: pointer; color: var(--ok); padding: 2px 0; }
.ac-presolve:hover { text-decoration: underline; }
.ac-done { color: var(--ok); font-weight: 600; }

/* FAB + side panel (overview) */
.ac-fab { position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 52px; height: 52px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; background: var(--accent);
  color: #fff; border: 0; box-shadow: 0 8px 24px rgba(47,58,110,.28); transition: transform .15s cubic-bezier(.16,1,.3,1); }
.ac-fab svg { width: 22px; height: 22px; }
.ac-fab:hover { transform: translateY(-2px); }
.ac-fab:active { transform: scale(.96); }
.ac-fab-n { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; background: var(--gold);
  color: #fff; border-radius: 100px; font-size: 12px; font-weight: 700; display: none; align-items: center; justify-content: center; border: 2px solid var(--paper); }
.ac-fab.has .ac-fab-n { display: inline-flex; }

.ac-overlay { position: fixed; inset: 0; z-index: 65; background: rgba(26,26,34,.28); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; }
.ac-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: 380px; max-width: 92vw; background: var(--paper-2);
  border-left: 1px solid var(--line); display: flex; flex-direction: column; transform: translateX(100%);
  transition: transform .32s cubic-bezier(.16,1,.3,1); box-shadow: -16px 0 40px rgba(26,26,34,.10); }
.ac-panel-open .ac-overlay { opacity: 1; visibility: visible; }
.ac-panel-open .ac-panel { transform: translateX(0); }
.ac-phead { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.ac-phead h3 { font-family: var(--serif); font-weight: 600; font-size: 20px; margin: 0; }
.ac-x { background: none; border: 0; cursor: pointer; color: var(--ink-faint); padding: 6px; border-radius: 8px; line-height: 0; }
.ac-x svg { width: 20px; height: 20px; }
.ac-x:hover { color: var(--ink); background: var(--paper); }
.ac-plist { overflow-y: auto; padding: 14px 20px 28px; flex: 1; display: grid; gap: 14px; align-content: start; }
.ac-pitem { cursor: pointer; border: 1px solid var(--line); border-radius: 12px; padding: 13px; transition: border-color .15s ease, box-shadow .15s ease; }
.ac-pitem:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.ac-pquote { font-size: 12.5px; font-style: italic; color: var(--ink-soft); border-left: 3px solid var(--gold); padding: 3px 9px; margin-bottom: 8px; }
.ac-ploc { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-soft); font-weight: 600; margin-bottom: 6px; }
.ac-pempty { text-align: center; color: var(--ink-soft); padding: 40px 16px; line-height: 1.7; }
.ac-pempty span { font-size: 13px; color: var(--ink-faint); }
.ac-retry { margin-top: 10px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent); background: var(--accent-wash); border: 1px solid var(--line); border-radius: 9px; padding: 8px 18px; }
.ac-skel { height: 70px; border-radius: 12px; background: linear-gradient(100deg, var(--paper) 30%, #f1ece1 50%, var(--paper) 70%); background-size: 200% 100%; animation: ac-shimmer 1.3s ease-in-out infinite; }
@keyframes ac-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.ac-hint { position: fixed; right: 84px; bottom: 30px; z-index: 61; max-width: 280px;
  background: var(--ink); color: #fff; font-size: 13.5px; line-height: 1.45; border-radius: 12px;
  padding: 11px 12px 11px 14px; box-shadow: 0 8px 24px rgba(26,26,34,.28); display: flex; align-items: center; gap: 8px;
  animation: ac-fade .2s ease; }
.ac-hint button { background: none; border: 0; color: rgba(255,255,255,.7); cursor: pointer; padding: 2px; line-height: 0; flex: none; }
.ac-hint button svg { width: 15px; height: 15px; }
.ac-hint button:hover { color: #fff; }
.ac-hint::after { content: ""; position: absolute; right: -6px; bottom: 18px; width: 12px; height: 12px;
  background: var(--ink); transform: rotate(45deg); }
@media (max-width: 600px){ .ac-hint { right: 16px; bottom: 84px; } .ac-hint::after { display: none; } }
