/* 哈珀小车 Python 公开课广告页 / 套装介绍页（哈珀官方版式：白底 + 靛紫 + 衬线大标题 + 大圆角卡片，颜色全部取自 harper-official.css 令牌） */
.cr-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px; border-radius: var(--ho-r-xl); background: var(--ho-grad-hero, linear-gradient(135deg, var(--ho-brand-soft), var(--ho-panel))); border: 1px solid var(--ho-line); }
.cr-hero-l { min-width: 0; }
.cr-title { font: 800 44px/1.15 var(--ho-serif); margin: 12px 0 10px; color: var(--ho-ink); }
.cr-lead { font-size: 17px; line-height: 1.8; color: var(--ho-muted); margin: 0 0 6px; }
.cr-en { font-style: italic; color: var(--ho-faint); margin: 0 0 14px; font-size: 14px; }
.cr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.cr-chips span { background: var(--ho-panel); border: 1px solid var(--ho-line); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 14px; }
.cr-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.cr-hero-r { position: relative; min-width: 0; }
.cr-hero-r img { display: block; width: 100%; height: auto; border-radius: var(--ho-r-lg); box-shadow: var(--ho-shadow-lg); }
.cr-badge { position: absolute; left: 14px; bottom: 14px; background: var(--ho-panel); border-radius: 999px; padding: 6px 14px; font: 700 13px var(--ho-sans); color: var(--ho-brand); box-shadow: var(--ho-shadow); }
.cr-sec { margin-top: 34px; }
.cr-h2 { font: 800 26px/1.3 var(--ho-serif); margin: 0 0 6px; }
.cr-sub { color: var(--ho-muted); margin: 0 0 14px; line-height: 1.7; }
.cr-grid { display: grid; gap: 12px; }
.cr-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cr-grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cr-card { background: var(--ho-panel); border: 1px solid var(--ho-line); border-radius: var(--ho-r-lg); box-shadow: var(--ho-shadow); padding: 18px 20px; min-width: 0; }
.cr-card.soft { background: var(--ho-brand-soft); border-color: var(--ho-brand-line); box-shadow: none; }
.cr-card b { display: block; font-size: 17px; margin-bottom: 6px; }
.cr-card p { margin: 6px 0 0; line-height: 1.75; color: var(--ho-muted); }
.cr-card .cd-code { margin-top: 8px; font-size: 13px; }
.cr-wide p { color: var(--ho-ink); }
.cr-mods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.cr-mod { background: var(--ho-panel); border: 1px solid var(--ho-line); border-radius: var(--ho-r-lg); padding: 16px; box-shadow: var(--ho-shadow); min-width: 0; }
.cr-mod em { font: 800 13px var(--ho-sans); color: var(--ho-brand); background: var(--ho-brand-soft); border-radius: 999px; padding: 2px 10px; font-style: normal; }
.cr-mod b { display: block; margin: 10px 0 2px; font-size: 16px; }
.cr-mod small { color: var(--ho-faint); }
.cr-mod p { margin: 8px 0 0; font-size: 14px; line-height: 1.7; color: var(--ho-muted); }
.cr-syl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cr-syl li { display: grid; grid-template-columns: 32px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; background: var(--ho-panel); border: 1px solid var(--ho-line); border-radius: var(--ho-r); padding: 12px; }
.cr-no { grid-row: 1 / 3; width: 32px; height: 32px; border-radius: 50%; background: var(--ho-brand); color: var(--ho-panel); display: grid; place-items: center; font: 800 14px var(--ho-sans); }
.cr-syl b { font-size: 15px; } .cr-syl small { color: var(--ho-faint); }
.cr-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: center; }
.cr-flow > span { color: var(--ho-brand); font-weight: 800; text-align: center; font-size: 13px; }
.cr-faces { display: flex; flex-wrap: wrap; gap: 10px; }
.cr-faces span { background: var(--ho-panel); border: 1px solid var(--ho-line); border-radius: var(--ho-r); padding: 10px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 130px; }
.cr-faces small { color: var(--ho-muted); }
.cr-table { overflow-x: auto; background: var(--ho-panel); border: 1px solid var(--ho-line); border-radius: var(--ho-r-lg); }
.cr-table table { width: 100%; border-collapse: collapse; min-width: 560px; }
.cr-table th, .cr-table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--ho-line); vertical-align: top; }
.cr-table th { background: var(--ho-soft); font-size: 14px; }
.cr-table tr:last-child td { border-bottom: 0; }
.cr-table code { font: 13px Consolas, Menlo, monospace; color: var(--ho-brand-strong); }
.cr-note { color: var(--ho-muted); font-size: 14px; }
.cr-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.cr-steps span { background: var(--ho-panel); border: 1px solid var(--ho-line); border-radius: var(--ho-r-lg); padding: 14px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.cr-steps em { font: 800 18px var(--ho-serif); color: var(--ho-brand); font-style: normal; }
.cr-steps small { color: var(--ho-muted); }
.cr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cr-list li { line-height: 1.7; } .cr-list b { display: inline-block; min-width: 5em; margin-right: 8px; color: var(--ho-brand); }
.cr-ol { margin: 0; padding-left: 1.4em; display: grid; gap: 8px; line-height: 1.75; }
.cr-contact { text-align: center; color: var(--ho-muted); padding: 18px; border-radius: var(--ho-r-lg); background: var(--ho-soft); display: flex; flex-direction: column; gap: 4px; }
.cr-contact b { color: var(--ho-ink); font-size: 16px; }
.cr-hero-s .cr-lead { font-size: 15px; }
.cr-slide { position: relative; display: block; }
.cr-slide img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: 340px; object-fit: cover; border-radius: 18px; }
@media (max-width: 900px) {
  .cr-hero { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .cr-title { font-size: 32px; }
  .cr-grid.g3, .cr-grid.g2, .cr-mods, .cr-syl, .cr-steps { grid-template-columns: minmax(0, 1fr); }
  .cr-flow { grid-template-columns: minmax(0, 1fr); } .cr-flow > span { transform: rotate(90deg); }
}
@media (min-width: 901px) and (max-width: 1180px) { .cr-mods, .cr-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cr-syl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.cr-photos figure { margin: 0; background: var(--ho-panel); border: 1px solid var(--ho-line); border-radius: var(--ho-r-lg); box-shadow: var(--ho-shadow); overflow: hidden; }
.cr-photos img { display: block; width: 100%; height: 240px; object-fit: cover; }
.cr-photos figcaption { padding: 10px 16px; color: var(--ho-muted); font-size: 14px; }
@media (max-width: 900px) { .cr-photos img { height: 220px; } }
.cr-photos figure:nth-child(2) img { object-position: 50% 38%; }

.cr-photos.cr-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* 仿真小车实验室：左 3D 仿真（比 Scratch 小画板大一些），右编程区 */
.cd-carlab .cd-code-main { align-items: stretch; }
.cd-carlab .cd-code-stage { flex: 1 1 420px; max-width: 640px; }
.cd-carlab .cd-code-stage iframe { aspect-ratio: 4 / 4.4; min-height: 460px; }
.cd-carlab .cd-code-ed { flex: 1 1 380px; }
.cd-carlab .cl-sel { border: 1px solid var(--hc-border); background: var(--ho-panel); border-radius: 999px; padding: 6px 12px; font: 700 13px var(--ho-sans); color: var(--hc-text); max-width: 100%; }
.cd-lock-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.cd-input { flex: 1 1 220px; min-width: 0; border: 1px solid var(--hc-border); border-radius: 999px; padding: 8px 16px; font: 14px var(--ho-sans); }
.cd-member-tip { margin: 0 0 10px; }
.cd-lock { padding: 18px 22px; }

/* 顶栏：常用入口 + 「更多」下拉菜单；标签不再横向滚动（下拉盒子要能伸出来，所以不裁切） */
.cd-menu .group { overflow: visible; }
.cd-menu .dd-box { z-index: 30; right: 0; left: auto; }
.cd-menu .dd-box a { white-space: nowrap; }
.cd-menu .dd-box a.on { background: var(--ho-brand-soft); color: var(--ho-brand); }

/* 最大化（真全屏或假全屏）：仿真 iframe 铺满，工具条里的运行 / 停止 / 键盘 / 退出图标都在 iframe 里，所以全屏下也能操作 */
.cd-carlab .cd-code-stage:fullscreen iframe, .cd-carlab .cd-code-stage.cd-pseudo-full iframe { width: 100%; height: 100%; aspect-ratio: auto; min-height: 0; border: 0; border-radius: 0; }
.cd-carlab .cd-code-stage:fullscreen, .cd-carlab .cd-code-stage.cd-pseudo-full { background: var(--ho-panel); }
.cd-carlab .cd-code-stage.cd-pseudo-full { position: fixed; inset: 0; z-index: 9997; width: 100vw; height: 100vh; max-width: none; max-height: none; flex: none; }   /* 盖掉 .cd-carlab .cd-code-stage 的 max-width:640px，否则假全屏只占左边一块 */

.cd-lang select{height:34px;border:1px solid #e3def7;border-radius:999px;background:#fff;padding:0 10px;font:600 13px inherit;color:#3b3b52;cursor:pointer}
