/* HackerCanvas: a Canvas-style layout in its own colors (plum from the seal + slate). */
:root {
  --nav-bg: #22272e;
  --nav-fg: #ffffff;
  --brand: #5a1249;
  --brand-dark: #400c34;
  --brand-soft: #f6edf4;
  --ink: #2d3b45;
  --ink-soft: #6b7780;
  --line: #c7cdd1;
  --line-soft: #e8eaec;
  --panel: #f5f5f5;
  --link: #0b6fb8;
  --ok: #0b874b;
  --warn: #c23c0d;
  --mixed: #b07a00;
  --bg: #ffffff;
  --nav-w: 84px;
  --course-nav-w: 196px;
  font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-size: 15px; line-height: 1.5; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; }
h1, h2, h3 { font-weight: 400; margin: 0 0 12px; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; font-weight: 700; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.loading { padding: 40px; color: var(--ink-soft); }

/* ---------- global nav (dark rail on the left) ---------- */
#global-nav {
  position: fixed; inset: 0 auto 0 0; width: var(--nav-w);
  background: var(--nav-bg); color: var(--nav-fg);
  display: flex; flex-direction: column; align-items: stretch; z-index: 20;
}
#global-nav .logo {
  display: flex; align-items: center; justify-content: center;
  height: 84px; border-bottom: 1px solid rgba(255,255,255,.12);
}
#global-nav .logo img { display: block; width: 52px; height: 52px; border-radius: 50%; background: #fff; }
#global-nav a.item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 4px; color: var(--nav-fg); font-size: 12px; text-align: center;
}
#global-nav a.item:hover { text-decoration: none; background: rgba(255,255,255,.08); }
#global-nav a.item svg { width: 26px; height: 26px; }
#global-nav a.item.active { background: #fff; color: var(--brand-dark); }
#global-nav .spacer { flex: 1; }

#app { margin-left: var(--nav-w); min-height: 100vh; }
#view:focus { outline: none; }

/* ---------- page header with breadcrumbs ---------- */
.page-header {
  display: flex; align-items: center; gap: 16px; min-height: 64px;
  padding: 0 24px; border-bottom: 1px solid var(--line); background: #fff;
}
.page-header .burger { border: 0; background: none; cursor: pointer; color: var(--link); padding: 6px; display: flex; }
.page-header .burger svg { width: 22px; height: 22px; }
.crumbs { font-size: 17px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crumbs .sep { color: var(--ink-soft); }
.crumbs .here { color: var(--ink); }

/* ---------- course layout: course nav | content | right sidebar ---------- */
.course-layout { display: flex; align-items: flex-start; }
.course-nav { width: var(--course-nav-w); flex: none; padding: 18px 12px 18px 24px; }
.course-nav .term { font-size: 12px; color: var(--ink-soft); margin: 0 0 10px 12px; }
.course-nav a {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px; margin: 2px 0; border-left: 3px solid transparent;
  font-size: 15px; color: var(--link);
}
.course-nav a.active { color: var(--ink); border-left-color: var(--ink); font-weight: 700; }
.course-nav a .count {
  margin-left: auto; background: var(--brand); color: #fff; border-radius: 10px;
  font-size: 11px; padding: 0 7px; line-height: 18px; font-weight: 700;
}
.course-layout.nav-hidden .course-nav { display: none; }
.content { flex: 1; min-width: 0; padding: 24px 32px 64px; }
.right-side { width: 280px; flex: none; padding: 24px 24px 24px 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 4px; background: #f5f5f5; color: var(--ink);
  font-size: 14px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #ebebeb; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand-dark); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn svg { width: 16px; height: 16px; }
.btn-block { display: flex; width: 100%; justify-content: flex-start; margin-bottom: 8px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-bottom: 16px; }

/* ---------- dashboard cards ---------- */
.dash { display: flex; align-items: flex-start; }
.dash-main { flex: 1; min-width: 0; padding: 24px 32px 64px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 28px 24px; margin-top: 20px; }
.card {
  border-radius: 6px; overflow: hidden; background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,.2); display: flex; flex-direction: column;
}
.card .hero { position: relative; height: 146px; display: block; }
.card .hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .hero .tint { position: absolute; inset: 0; opacity: .62; }
.card .hero .grade-badge {
  position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,.95); color: var(--ink);
  border-radius: 14px; padding: 2px 10px; font-size: 13px; font-weight: 700;
}
.card .body { padding: 12px 16px 6px; }
.card .code { font-weight: 700; font-size: 16px; display: block; }
.card .name { color: var(--ink); font-size: 14px; display: block; }
.card .term { color: var(--ink-soft); font-size: 13px; }
.card .progress { height: 4px; background: var(--line-soft); margin: 8px 16px 0; border-radius: 2px; overflow: hidden; }
.card .progress span { display: block; height: 100%; background: var(--ok); }
.card .icons { display: flex; gap: 18px; padding: 10px 16px 12px; color: var(--ink-soft); font-size: 13px; }
.card .icons span { display: inline-flex; align-items: center; gap: 5px; }
.card .icons svg { width: 17px; height: 17px; }

/* ---------- sidebar boxes ---------- */
.side-box { margin-bottom: 24px; }
.side-box h3 { border-bottom: 1px solid var(--line); padding-bottom: 6px; font-size: 15px; }
.feed-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.feed-item .who { font-weight: 700; color: var(--ink); }
.feed-item q { display: block; color: var(--ink); margin-top: 2px; }

/* ---------- modules ---------- */
.module { border: 1px solid var(--line); border-radius: 4px; margin-bottom: 24px; }
.module-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--panel);
  border-bottom: 1px solid var(--line); cursor: pointer; user-select: none;
}
.module.collapsed .module-head { border-bottom: 0; }
.module-head .caret { width: 14px; height: 14px; transition: transform .15s; }
.module.collapsed .caret { transform: rotate(-90deg); }
.module-head h3 { margin: 0; font-size: 16px; flex: 1; }
.module-head .done-count { font-size: 13px; color: var(--ink-soft); }
.module.collapsed .items { display: none; }
.item-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px 11px 18px;
  border-top: 1px solid var(--line-soft);
}
.item-row:first-child { border-top: 0; }
.item-row:hover { background: #fafbfc; }
.item-row .ico { width: 22px; height: 22px; color: var(--ink-soft); flex: none; }
.item-row .ico.video { color: #c0392b; }
.item-row .ico.assignment { color: var(--link); }
.item-row .main { flex: 1; min-width: 0; }
.item-row .title { font-size: 15px; }
.item-row .meta { font-size: 12px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 10px; }
.item-row.event .title { color: var(--ink-soft); font-style: italic; }
.check {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none;
  display: grid; place-items: center; background: #fff; cursor: pointer; padding: 0;
}
.check svg { width: 12px; height: 12px; color: #fff; display: none; }
.check.on { background: var(--ok); border-color: var(--ok); }
.check.on svg { display: block; }

/* ---------- lecture view ---------- */
.lecture-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.lecture-head h1 { margin: 0; font-size: 26px; }
.video-wrap { position: relative; width: 100%; max-width: 980px; aspect-ratio: 16 / 9; background: #000; border-radius: 4px; overflow: hidden; margin: 16px 0; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-wrap .lite { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: #000; }
.video-wrap .lite img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; transition: opacity .15s; }
.video-wrap .lite:hover img { opacity: 1; }
.video-wrap a.lite { display: block; }
.video-wrap .lite .yt-note {
  position: absolute; left: 12px; bottom: 12px; right: 12px; color: #fff; font-size: 13px;
  background: rgba(0,0,0,.6); border-radius: 4px; padding: 6px 10px; text-align: left;
}
.video-wrap .lite .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 84px; height: 60px; border-radius: 14px; background: var(--brand); color: #fff;
  display: grid; place-items: center; box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.video-wrap .lite .play svg { width: 40px; height: 40px; }
.video-wrap .lite:hover .play { background: var(--brand-dark); }
.video-wrap .lite .poster {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  padding: 24px; color: #fff; font-size: 24px; font-weight: 700; text-align: left;
}
.video-wrap .lite .poster small { font-size: 13px; font-weight: 400; opacity: .85; }
.card .hero .hero-code {
  position: absolute; left: 16px; bottom: 12px; color: #fff; font-size: 22px; font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,.45); /* stays readable on top of a video frame */
}
.no-video {
  max-width: 980px; border: 1px dashed var(--line); border-radius: 4px; padding: 28px; margin: 16px 0;
  background: var(--panel); color: var(--ink-soft); text-align: center;
}
.part-bar { margin: -4px 0 12px; max-width: 980px; }
.resources { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 20px; }
.desc { max-width: 760px; }
.readings li { margin: 4px 0; }
.seq-footer {
  display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line);
  padding-top: 16px; margin-top: 32px; max-width: 980px;
}

/* ---------- tables (assignments, files, grades, catalog) ---------- */
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-weight: 700; padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.list tr:hover td { background: #fafbfc; }
table.list td.num { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

/* ---------- discussions (HN reviews) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 4px 12px;
  font-size: 13px; cursor: pointer; color: var(--ink);
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters .search { flex: 1 1 260px; min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; font: inherit; font-size: 14px; }
.filters select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 4px; font: inherit; font-size: 14px; background: #fff; color: var(--ink); max-width: 100%; }
.entry { border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; margin-bottom: 14px; max-width: 900px; }
.entry-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 14px; flex: none; text-transform: uppercase;
}
.entry-head .who { font-weight: 700; }
.badge { font-size: 12px; font-weight: 700; border-radius: 3px; padding: 1px 7px; color: #fff; }
.badge.recommend { background: var(--ok); }
.badge.mixed { background: var(--mixed); }
.badge.warn { background: var(--warn); }
.entry .why { margin: 8px 0 0; font-weight: 700; font-size: 14px; }
.badge.joke { background: #6c3483; }
.entry blockquote { margin: 10px 0 8px; padding: 0 0 0 12px; border-left: 3px solid var(--line); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { font-size: 12px; border-radius: 3px; padding: 1px 8px; background: #e6f4ec; color: #0b5d35; }
.tag.bad { background: #fbe9e3; color: #8f2d0a; }
.entry details { margin-top: 8px; font-size: 14px; }
.entry details summary { cursor: pointer; color: var(--link); }
.entry details p { white-space: pre-wrap; margin: 8px 0 0; color: var(--ink); }
.entry .foot { display: flex; gap: 16px; font-size: 13px; margin-top: 8px; color: var(--ink-soft); flex-wrap: wrap; }

/* ---------- grades ---------- */
.grade-total { display: flex; align-items: center; gap: 18px; margin: 8px 0 24px; }
.grade-letter {
  width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center;
  font-size: 34px; font-weight: 900; color: #fff; background: var(--ok);
}
.bar-row { display: grid; grid-template-columns: 190px 1fr 40px; align-items: center; gap: 10px; font-size: 14px; margin: 6px 0; }
.bar { height: 10px; background: var(--line-soft); border-radius: 5px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--ok); border-radius: 5px; }
.bar.bad span { background: var(--warn); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; max-width: 1000px; }

/* ---------- home / about ---------- */
.home-summary { max-width: 760px; font-size: 16px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 16px; font-size: 14px; max-width: 760px; margin: 16px 0; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; }
.notice {
  border: 1px solid var(--line); border-left: 6px solid var(--brand); border-radius: 4px;
  padding: 12px 16px; background: var(--brand-soft); max-width: 860px; margin: 16px 0; font-size: 14px;
}
.empty { color: var(--ink-soft); padding: 24px 0; }

/* ---------- narrow screens ---------- */
@media (max-width: 1100px) { .right-side { display: none; } }
@media (max-width: 760px) {
  :root { --nav-w: 0px; }
  #global-nav { position: sticky; top: 0; flex-direction: row; width: 100%; height: 56px; overflow-x: auto; }
  #global-nav .logo { height: 56px; width: 64px; flex: none; border: 0; }
  #global-nav .logo span { width: 36px; height: 36px; font-size: 14px; }
  #global-nav a.item { flex-direction: row; padding: 0 12px; font-size: 13px; }
  #global-nav a.item svg { width: 20px; height: 20px; }
  #global-nav .spacer { display: none; }
  #app { margin-left: 0; }
  .page-header { padding: 0 16px; }
  .course-layout { flex-direction: column; }
  .course-nav { width: 100%; padding: 8px 16px; display: flex; flex-wrap: wrap; gap: 4px; }
  .course-nav .term { width: 100%; margin: 0 0 4px; }
  .course-nav a { border-left: 0; border-bottom: 3px solid transparent; padding: 4px 8px; }
  .course-nav a.active { border-bottom-color: var(--ink); }
  .course-layout.nav-hidden .course-nav { display: none; }
  .content, .dash-main { padding: 16px; }
  .two-col { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 120px 1fr 32px; }
  .kv { grid-template-columns: 110px 1fr; }
}

/* ---------- files: one folder per lecture ---------- */
.module-head .folder-ico { width: 20px; height: 20px; color: #c9a227; fill: #f6e7a8; flex: none; }

/* ---------- course map: one lane per field, prerequisite steps left to right ---------- */
:root { --map-next: #18936a; --map-rel: #b8860b; --map-faint: #9aa3aa; --map-bg: #fbfaf7; }
.map-intro { max-width: 980px; }
.map-tools { margin: 14px 0 8px; max-width: 520px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 12px; }
.map-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.map-legend .ln { display: inline-block; width: 22px; border-top: 2px solid #a3abb1; margin-right: 6px; vertical-align: 3px; }
.map-legend .ln.dash { border-top-style: dashed; }
.map-legend .ln.dot { border-top-style: dotted; border-top-width: 3px; }
.map-legend .or { display: inline-block; font-style: normal; font-size: 9.5px; font-weight: 900; line-height: 12px; padding: 0 5px; margin-right: 6px; border: 1px solid #a3abb1; border-radius: 7px; background: #fff; }
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 16px; align-items: start; }
.map-stage { border: 1px solid var(--line); border-radius: 8px; background: var(--map-bg); overflow-x: auto; min-height: 360px; }
.map-stage .loading { padding: 24px; }
.map-panel { position: sticky; top: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: #fff; font-size: 13px; line-height: 1.5; max-height: calc(100vh - 24px); overflow: auto; }
@media (max-width: 1180px) {
  .map-wrap { grid-template-columns: 1fr; }
  .map-panel { position: fixed; z-index: 20; right: 16px; bottom: 16px; top: auto; width: min(320px, calc(100vw - 32px)); max-height: 50vh; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
  .map-panel.empty { display: none; }
}
.lanes { position: relative; padding: 10px 14px 16px; min-width: max-content; }
.lane-edges { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.lane-steps { display: flex; margin-left: 124px; height: 20px; align-items: center; font-size: 10.5px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--map-faint); }
.lane-steps span { flex: 0 0 var(--col); }
.lane { display: grid; grid-template-columns: 124px auto; margin-top: 10px; padding: 12px 0; border-radius: 10px; background: color-mix(in srgb, var(--g) 6%, transparent); }
.lane-head { padding: 2px 8px 0 14px; }
.lane-head b { display: block; font-size: 11.5px; font-weight: 900; letter-spacing: .08em; line-height: 1.3; text-transform: uppercase; color: var(--g); }
.lane-head small { font-size: 11.5px; color: var(--ink-soft); }
.lane-grid { grid-column: 2; position: relative; width: var(--gridw); }
.lane-card { position: absolute; width: var(--cw); height: var(--ch); padding: 5px 8px 0; text-align: left; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--g); border-radius: 6px; cursor: pointer; transition: opacity .2s, box-shadow .2s, background-color .2s; }
.lane-card .c1 { display: flex; gap: 6px; align-items: baseline; font-size: 12.5px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.lane-card .code { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lane-card .grade { margin-left: auto; font-size: 10.5px; font-weight: 900; color: var(--map-faint); }
.lane-card .c2 { display: block; font-size: 11px; line-height: 1.35; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-card:hover, .lane-card:focus-visible, .lane-chip:focus-visible { box-shadow: 0 2px 10px rgba(45, 59, 69, .14); outline: none; }
.xdots { position: absolute; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 3px; }
.xdots.l { left: -6px; }
.xdots.r { right: -5px; }
.xdots i { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px #fff; }
.lane-solo { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; max-width: var(--gridw); padding: 12px 12px 0 0; }
.lane-solo .lbl { margin-right: 4px; font-size: 10.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--map-faint); }
.lane-chip { display: inline-flex; gap: 5px; align-items: center; padding: 2px 10px 2px 8px; font: inherit; font-size: 11.5px; color: var(--ink); white-space: nowrap; background: #fff; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; transition: opacity .2s; }
.lane-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--g); }
.lane-chip span { color: var(--ink-soft); }
.lane-card.focus, .lane-chip.focus { box-shadow: 0 0 0 2px var(--ink); }
.lane-card.anc { border-color: var(--brand); background: var(--brand-soft); }
.lane-card.desc { border-color: var(--map-next); background: #eefaf4; }
.lane-card.rel, .lane-chip.rel { border-color: var(--map-rel); border-style: dashed; }
.lane-card.dim, .lane-chip.dim, .lane-card.miss, .lane-chip.miss { opacity: .28; }
.lane-edges .e { fill: none; stroke: var(--ec, #a3abb1); stroke-width: 1.3; stroke-opacity: .5; marker-end: url(#mk-base); }
.lane-edges .e.rec { stroke-dasharray: 4 3; }
.lane-edges .e.anc { stroke: var(--brand); stroke-width: 2.2; stroke-opacity: 1; marker-end: url(#mk-anc); }
.lane-edges .e.desc { stroke: var(--map-next); stroke-width: 2.2; stroke-opacity: 1; marker-end: url(#mk-desc); }
.lane-edges .e.to-or, .lane-edges .e.to-or.anc, .lane-edges .e.to-or.desc { marker-end: none; }
.lane-edges .e.relx { stroke: var(--map-rel); stroke-width: 1.8; stroke-opacity: .9; stroke-dasharray: 1.5 4; stroke-linecap: round; marker-end: none; }
.lane-edges .e.dim { stroke-opacity: .07; }
#mk-base path { fill: #a3abb1; }
#mk-anc path { fill: var(--brand); }
#mk-desc path { fill: var(--map-next); }
.or-pill rect { fill: #fff; stroke: #a3abb1; }
.or-pill text { font-size: 9px; font-weight: 900; fill: var(--ink-soft); }
.or-pill.anc rect { stroke: var(--brand); }
.or-pill.anc text { fill: var(--brand-dark); }
.or-pill.desc rect { stroke: var(--map-next); }
.or-pill.desc text { fill: var(--map-next); }
.or-pill.dim { opacity: .15; }
.map-panel .mp-group { font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.map-panel h2 { margin: 4px 0 2px; font-size: 17px; line-height: 1.25; }
.map-panel h2 a { color: var(--ink); }
.map-panel .mp-open { margin: 10px 0 2px; }
.map-panel h3 { display: flex; gap: 7px; align-items: center; margin: 16px 0 6px; font-size: 12.5px; }
.map-panel h3 i, .map-key i { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; }
.map-panel i.ring, .map-key i.ring { width: 11px; height: 11px; background: none; border: 2px dotted var(--map-rel); }
.map-panel ul, .map-key { margin: 0; padding: 0; list-style: none; }
.map-panel li { margin: 0 0 8px; }
.map-panel ul.flat li { display: inline-block; margin: 0 4px 6px 0; }
.map-key { margin-top: 8px; }
.map-key li { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; color: var(--ink-soft); }
.pick { all: unset; display: inline-flex; gap: 6px; align-items: baseline; margin-right: 8px; cursor: pointer; }
.pick i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; transform: translateY(-1px); }
.pick span { font-size: 12px; color: var(--ink-soft); }
.pick:hover b, .pick:focus-visible b { color: var(--brand-dark); text-decoration: underline; }
.map-panel .alts { display: flex; flex-wrap: wrap; gap: 2px 0; align-items: baseline; }
.map-panel .tag { margin-right: 6px; padding: 0 5px; font-size: 9.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 7px; }
.map-panel .out { font-size: 12px; color: var(--ink-soft); }
.map-panel .q { margin: 2px 0 0 13px; font-size: 11.5px; line-height: 1.4; color: var(--ink-soft); }
.map-panel .q em { margin-right: 4px; font-style: normal; font-weight: 700; color: var(--ink); }
.map-panel .none { margin: 0; font-size: 12px; color: var(--map-faint); }
.map-panel .mp-hint { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.map-banner { display: flex; gap: 14px; align-items: center; margin-top: 18px; padding: 14px 18px; color: var(--ink); text-decoration: none; background: var(--map-bg); border: 1px solid var(--line); border-radius: 8px; }
.map-banner:hover { text-decoration: none; border-color: var(--brand); }
.map-banner span { font-size: 24px; color: var(--brand); }

/* ---------- course card ---------- */
.course-card { max-width: 760px; border: 1px solid var(--line); border-left: 6px solid var(--link); border-radius: 4px; padding: 12px 16px; margin: 12px 0 4px; background: #f8fbff; font-size: 14px; }
.course-card p { margin: 0 0 8px; }
.card-facts { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 6px; }
