/* HNC Unit Pages v1.0 (2026-11-09) — 进阶英语第二册目录页 5658 + 单元练习页 5752 / 5662 / 5755 / 5757
   页面正文里的 <style> 已收进 .hnc-full-width-wrapper 作用域(:where 包裹, 优先级不变); 这里统一:
   1. 各单元主色(#2E86AB / #E91E63 / #DA7756 / #0D1B2A …)和 :root 变量 → 主站规范色(黑板绿 #0E3B2E)
   2. 电脑上: 不再整区一屏高内部滚动, 改成页面正常滚动、左侧导航跟随; 不再 100vw 通栏
   3. 手机上(<768px): 导航移到上方横向滚动, 正文正常滚动, 右下圆钮改成左下角文字钮并抬到底栏上方
   4. 衬线标题、渐变、阴影、蓝紫色去掉 */

/* ── 1. 变量映射 ── */
html body.hnc-unit-page .hnc-full-width-wrapper {
  --bg-primary: #F6F7F4;
  --bg-card: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  --bg-answer: #E3EFE8;
  --text-primary: #15201B;
  --text-secondary: #4C5751;
  --text-light: #66706A;
  --accent: #0E3B2E;
  --accent-light: #E3EFE8;
  --accent-hover: #155441;
  --accent-bright: #155441;
  --border: #DDE1D8;
  --shadow: none;
  --correct: #155441;
  --sidebar-width: 248px;
  /* 四段式思维模型的标签色: 四个能区分、又都能放白字的深色(不用蓝 / 紫 / 红) */
  --psrl-p: #0E3B2E; --psrl-s: #3F5A00; --psrl-r: #8A5A00; --psrl-l: #4C5751;
  --peel-p: #0E3B2E; --peel-e: #3F5A00; --peel-ex: #8A5A00; --peel-l: #4C5751;
  --symbol-concrete: #0E3B2E; --symbol-assoc: #3F5A00; --symbol-meaning: #8A5A00; --symbol-self: #4C5751;
  --ddmol-dreamer: #0E3B2E; --ddmol-dream: #3F5A00; --ddmol-method: #8A5A00; --ddmol-outcome: #4C5751; --ddmol-legacy: #155441;
  --up-ui: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-family: var(--up-ui);
  color: #15201B;
  background: #F6F7F4;
}
/* 衬线字(Crimson Pro 等)一律换回黑体 */
html body.hnc-unit-page .hnc-full-width-wrapper *:not(code):not(pre):not(kbd) { font-family: inherit !important; }
/* 渐变 / 阴影 / 悬停上浮 一律去掉 */
html body.hnc-unit-page .hnc-full-width-wrapper *:not(.content-header) { background-image: none; }
html body.hnc-unit-page .hnc-full-width-wrapper .card,
html body.hnc-unit-page .hnc-full-width-wrapper .sidebar,
html body.hnc-unit-page .hnc-full-width-wrapper .unit-card { box-shadow: none !important; }
html body.hnc-unit-page .hnc-full-width-wrapper .card:hover,
html body.hnc-unit-page .hnc-full-width-wrapper .unit-card:hover { transform: none; }
/* 正文里写死的红色(「弱分析」示例等) → 规范错误色; 其余写死的浅灰底 → 规范页底 */
html body.hnc-unit-page .hnc-full-width-wrapper [style*="#e74c3c"] { color: #A8381F !important; border-color: #A8381F !important; }
html body.hnc-unit-page .hnc-full-width-wrapper [style*="#fff5f5"] { background-color: #FBE9E4 !important; }
html body.hnc-unit-page .hnc-full-width-wrapper [style*="#f0fff4"] { background-color: #E3EFE8 !important; }
html body.hnc-unit-page .hnc-full-width-wrapper [style*="#fff3cd"] { background-color: #FBF0D6 !important; }
html body.hnc-unit-page .hnc-full-width-wrapper [style*="#f8f9fa"] { background-color: #F6F7F4 !important; }

/* ── 2. 版式: 不再一屏高内部滚动 ── */
html body.hnc-unit-page .hnc-app-container {
  height: auto;
  min-height: 0;
  overflow: visible;
  align-items: stretch;
  font-size: 16px;
  background: #F6F7F4;
}
html body.hnc-unit-page .hnc-app-container .main-content { overflow: visible; min-width: 0; }
html body.hnc-unit-page .hnc-app-container .sidebar {
  background: #FFFFFF;
  border-right: 1px solid #DDE1D8;
  color: #15201B;
}
html body.hnc-unit-page .hnc-app-container .logo {
  color: #15201B;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  border-bottom-color: #E4E7E0;
}
html body.hnc-unit-page .hnc-app-container .nav-item { color: #4C5751; font-size: 15px; min-height: 44px; }
html body.hnc-unit-page .hnc-app-container .nav-item:hover { color: #0E3B2E; background: #F6F7F4; }
html body.hnc-unit-page .hnc-app-container .nav-item.active { color: #0E3B2E; background: #E3EFE8; font-weight: 700; }
html body.hnc-unit-page .hnc-app-container .nav-item.active::before { background: #CDEB63; }
html body.hnc-unit-page .hnc-app-container .nav-section-header {
  color: #0E3B2E;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  border-top-color: #E4E7E0;
}
html body.hnc-unit-page .hnc-app-container .difficulty-badge { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 1px 8px; flex: none; }
html body.hnc-unit-page .hnc-app-container .difficulty-badge.easy { background: #E3EFE8; color: #0E3B2E; }
html body.hnc-unit-page .hnc-app-container .difficulty-badge.medium { background: #FBF0D6; color: #8A5A00; }
html body.hnc-unit-page .hnc-app-container .difficulty-badge.hard { background: #FBE9E4; color: #A8381F; }

/* 顶部标题块: 外壳已把 .content-header 换成黑板绿; 这里只管字 */
html body.hnc-unit-page .hnc-full-width-wrapper .content-header h1 { font-weight: 700; font-size: 34px; line-height: 1.3; }
html body.hnc-unit-page .hnc-full-width-wrapper .content-header p { font-size: 16px; opacity: 1; color: rgba(255,255,255,0.82) !important; }
html body.hnc-unit-page .hnc-full-width-wrapper .content-header::after { content: none !important; }

/* 卡片 */
html body.hnc-unit-page .hnc-app-container .container { max-width: 1040px; padding: 0 28px 96px; }
html body.hnc-unit-page .hnc-app-container .card { border: 1px solid #DDE1D8; border-radius: 16px; background: #FFFFFF; }
html body.hnc-unit-page .hnc-app-container .card-header { background: #FFFFFF; border-bottom-color: #E4E7E0; }
html body.hnc-unit-page .hnc-app-container .card-title { color: #15201B; font-size: 19px; font-weight: 700; }
html body.hnc-unit-page .hnc-app-container .card-number {
  background: #0E3B2E; color: #FFFFFF; width: auto; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px;
  font-family: "Bricolage Grotesque", -apple-system, "PingFang SC", sans-serif !important; font-size: 13px; font-weight: 700;
}
html body.hnc-unit-page .hnc-app-container .card-body { overflow-x: auto; }
html body.hnc-unit-page .hnc-app-container th { background: #F6F7F4; color: #15201B; }
html body.hnc-unit-page .hnc-app-container tr:hover td { background: transparent; }
html body.hnc-unit-page .hnc-app-container .grammar-box,
html body.hnc-unit-page .hnc-app-container .instructions-box { background: #F6F7F4; border: 1px solid #DDE1D8; border-radius: 12px; }
html body.hnc-unit-page .hnc-app-container .grammar-box h4,
html body.hnc-unit-page .hnc-app-container .instructions-box h4 { color: #0E3B2E; }
html body.hnc-unit-page .hnc-app-container .grammar-box .example { font-style: normal; }
html body.hnc-unit-page .hnc-app-container .word-box { background: #F6F7F4; border: 1px solid #E4E7E0; border-radius: 12px; }
html body.hnc-unit-page .hnc-app-container .text-excerpt {
  background: #F6F7F4; border: 1px solid #E4E7E0; border-left: 1px solid #E4E7E0; border-radius: 12px; font-style: normal;
}

/* 填空 / 点击显示 */
html body.hnc-unit-page .hnc-app-container .fill-blank { background: #E3EFE8; border-bottom-color: #0E3B2E; min-height: 28px; }
html body.hnc-unit-page .hnc-app-container .fill-blank.revealed { color: #0E3B2E; border-bottom-color: #CDEB63; }
html body.hnc-unit-page .hnc-app-container .fill-blank:hover { background: #D5E7DC; }
html body.hnc-unit-page .hnc-app-container .click-reveal { text-shadow: 0 0 8px rgba(21, 32, 27, 0.18); }
html body.hnc-unit-page .hnc-app-container .click-reveal.revealed,
html body.hnc-unit-page .hnc-app-container .click-reveal:hover { color: #0E3B2E; }

/* 看答案按钮 / 答案框(不再用左竖条) */
html body.hnc-unit-page .hnc-app-container .reveal-btn {
  border: 1px solid #C9CEC3; color: #0E3B2E; background: #FFFFFF; border-radius: 10px; padding: 8px 16px; min-height: 40px; font-size: 14px;
}
html body.hnc-unit-page .hnc-app-container .reveal-btn:hover { border-color: #0E3B2E; background: #FFFFFF; color: #0E3B2E; }
html body.hnc-unit-page .hnc-app-container .reveal-btn.is-open { background: #0E3B2E; border-color: #0E3B2E; color: #FFFFFF; }
html body.hnc-unit-page .hnc-app-container .answer-container {
  background: #E3EFE8; border: 1px solid #C9CEC3; border-left: 1px solid #C9CEC3; border-radius: 12px; margin-top: 16px; padding: 18px 16px 14px;
}
html body.hnc-unit-page .hnc-app-container .answer-container::before {
  content: '答案'; background: #0E3B2E; color: #FFFFFF; font-size: 12px; padding: 1px 8px; border-radius: 6px; top: -11px; font-weight: 600;
}

/* 选择题: 只有正确项变绿; 选错标错误色并标出正确项 */
html body.hnc-unit-page .hnc-app-container .choice-option {
  background: #FFFFFF; border: 1px solid #DDE1D8; border-radius: 12px; padding: 12px 14px; margin: 8px 0; min-height: 44px; position: relative;
}
html body.hnc-unit-page .hnc-app-container .choice-option:hover { background: #F6F7F4; border-color: #C9CEC3; }
html body.hnc-unit-page .hnc-app-container .choice-option:focus-visible { outline: 2px solid #0E3B2E; outline-offset: 2px; }
html body.hnc-unit-page .hnc-app-container .choice-option.correct,
html body.hnc-unit-page .hnc-app-container .choice-option.reveal-correct {
  background: #E3EFE8; border: 1px solid #155441; color: #0E3B2E;
}
html body.hnc-unit-page .hnc-app-container .choice-option.wrong { background: #FBE9E4; border: 1px solid #A8381F; color: #A8381F; }
html body.hnc-unit-page .hnc-app-container .choice-option.correct::after,
html body.hnc-unit-page .hnc-app-container .choice-option.wrong::after,
html body.hnc-unit-page .hnc-app-container .choice-option.reveal-correct::after {
  display: inline-block; margin-left: 10px; font-size: 12px; font-weight: 700; padding: 0 8px; border-radius: 999px; line-height: 20px; vertical-align: 1px;
}
html body.hnc-unit-page .hnc-app-container .choice-option.correct::after { content: '对'; background: #0E3B2E; color: #FFFFFF; }
html body.hnc-unit-page .hnc-app-container .choice-option.reveal-correct::after { content: '正确答案'; background: #CDEB63; color: #3F5A00; }
html body.hnc-unit-page .hnc-app-container .choice-option.wrong::after { content: '不对'; background: #A8381F; color: #FFFFFF; }

/* 练习里的按钮 */
html body.hnc-unit-page .hnc-app-container .check-btn,
html body.hnc-unit-page .hnc-app-container .reset-exercise-btn {
  border-radius: 12px; padding: 10px 22px; min-height: 44px; font-size: 15px; transform: none;
}
html body.hnc-unit-page .hnc-app-container .check-btn { background: #0E3B2E; color: #FFFFFF; }
html body.hnc-unit-page .hnc-app-container .check-btn:hover { background: #155441; transform: none; }
html body.hnc-unit-page .hnc-app-container .reset-exercise-btn { background: #FFFFFF; color: #0E3B2E; border: 1px solid #C9CEC3; }
html body.hnc-unit-page .hnc-app-container .reset-exercise-btn:hover { border-color: #0E3B2E; background: #FFFFFF; }
html body.hnc-unit-page .hnc-app-container .score-display { background: #E3EFE8; border-radius: 12px; }
html body.hnc-unit-page .hnc-app-container [class$="-sentence-block"].correct { border-color: #155441; background: #E3EFE8; }
html body.hnc-unit-page .hnc-app-container [class$="-sentence-block"].incorrect { border-color: #A8381F; background: #FBE9E4; }
html body.hnc-unit-page .hnc-app-container .drag-item { background: #FFFFFF; border: 1px solid #DDE1D8; border-radius: 12px; }
html body.hnc-unit-page .hnc-app-container .drag-item.correct-order { border-color: #155441; background: #E3EFE8; }
html body.hnc-unit-page .hnc-app-container .drag-item.incorrect-order { border-color: #A8381F; background: #FBE9E4; }
html body.hnc-unit-page .hnc-app-container .drag-item .sentence-content { flex: 1 1 auto; min-width: 0; }
html body.hnc-unit-page .hnc-app-container .order-move button { min-height: 36px; border-color: #C9CEC3; color: #0E3B2E; }
html body.hnc-unit-page .hnc-app-container .order-move button:hover { border-color: #0E3B2E; }

/* 右下角「看答案 / 重做」: 圆形图标钮 → 文字钮 */
html body.hnc-unit-page .hnc-app-container .control-panel { gap: 8px; bottom: 28px; right: 24px; z-index: 900; }
html body.hnc-unit-page .hnc-app-container .control-btn {
  width: auto; height: 44px; min-width: 72px; padding: 0 16px; border-radius: 999px; font-size: 15px; font-weight: 600;
  background: #0E3B2E !important; color: #FFFFFF; border: 1px solid #0E3B2E; box-shadow: 0 6px 18px rgba(14, 59, 46, 0.22);
}
html body.hnc-unit-page .hnc-app-container .control-btn:hover { transform: none; background: #155441 !important; }
html body.hnc-unit-page .hnc-app-container .control-btn[data-role="reset"] { background: #FFFFFF !important; color: #0E3B2E; border-color: #C9CEC3; }
html body.hnc-unit-page .hnc-app-container .control-btn[data-role="reset"]:hover { border-color: #0E3B2E; }

/* ── 电脑 / 平板: 内容宽度内的一块面板, 左侧导航跟随滚动 ── */
@media (min-width: 768px) {
  html body.hnc-unit-page .hnc-full-width-wrapper {
    width: auto; left: auto; right: auto; margin-left: 0; margin-right: 0; min-height: 0;
    border: 1px solid #DDE1D8; border-radius: 16px;
  }
  html body.hnc-unit-page .hnc-app-container { border-radius: 16px; }
  html body.hnc-unit-page .hnc-app-container .sidebar {
    position: sticky; top: 0; align-self: flex-start; max-height: 100vh; width: 248px;
    border-radius: 16px 0 0 16px;
  }
  html body.hnc-unit-page .hnc-app-container .content-header { border-top-right-radius: 15px; }
  html body.hnc-unit-page--dir .hnc-full-width-wrapper { overflow: hidden; }
}

/* ── 手机: 导航在上方横向滚动, 正文正常滚动 ── */
@media (max-width: 767px) {
  html body.hnc-unit-page .hnc-full-width-wrapper { min-height: 0; }
  html body.hnc-unit-page .hnc-app-container { flex-direction: column; font-size: 16px; line-height: 1.7; }
  html body.hnc-unit-page .hnc-app-container .sidebar {
    position: sticky; top: 0; z-index: 30;
    width: 100%; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 6px;
    overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding: 8px 12px; border-right: 0; border-bottom: 1px solid #DDE1D8;
  }
  html body.hnc-unit-page .hnc-app-container .sidebar::-webkit-scrollbar { display: none; }
  html body.hnc-unit-page .hnc-app-container .logo { display: none; }
  html body.hnc-unit-page .hnc-app-container .nav-item,
  html body.hnc-unit-page .hnc-app-container .nav-item.sub-item {
    flex: 0 0 auto; white-space: nowrap; padding: 8px 14px; min-height: 40px;
    border: 1px solid #DDE1D8; border-radius: 999px; font-size: 14px; background: #FFFFFF;
  }
  html body.hnc-unit-page .hnc-app-container .nav-item.active { background: #0E3B2E; border-color: #0E3B2E; color: #FFFFFF; }
  html body.hnc-unit-page .hnc-app-container .nav-item.active::before { display: none; }
  html body.hnc-unit-page .hnc-app-container .nav-item.active .difficulty-badge { background: #CDEB63; color: #3F5A00; }
  html body.hnc-unit-page .hnc-app-container .nav-section-header {
    flex: 0 0 auto; white-space: nowrap; border: 0; margin: 0 0 0 6px; padding: 0 2px;
  }
  html body.hnc-unit-page .hnc-app-container .difficulty-badge { margin-left: 6px; }
  html body.hnc-unit-page .hnc-full-width-wrapper .content-header { padding: 24px 16px; margin-bottom: 16px; }
  html body.hnc-unit-page .hnc-full-width-wrapper .content-header h1 { font-size: 24px; }
  html body.hnc-unit-page .hnc-full-width-wrapper .content-header p { font-size: 15px; }
  html body.hnc-unit-page .hnc-app-container .container { max-width: none; padding: 0 12px 96px; }
  html body.hnc-unit-page .hnc-app-container .card { margin-bottom: 16px; }
  html body.hnc-unit-page .hnc-app-container .card-header { padding: 12px 16px; }
  html body.hnc-unit-page .hnc-app-container .card-title { font-size: 17px; }
  html body.hnc-unit-page .hnc-app-container .card-body { padding: 16px; }
  html body.hnc-unit-page .hnc-app-container .question-text { font-size: 16px; }
  html body.hnc-unit-page .hnc-app-container th,
  html body.hnc-unit-page .hnc-app-container td { padding: 10px 8px; }
  html body.hnc-unit-page .hnc-app-container .two-column { grid-template-columns: 1fr; }
  html body.hnc-unit-page .hnc-app-container [class$="-sentence-block"] { flex-direction: column; gap: 8px; padding: 12px; }
  html body.hnc-unit-page .hnc-app-container [class$="-options"] { flex-wrap: wrap; }
  html body.hnc-unit-page .hnc-app-container [class$="-option-btn"] { min-height: 40px; padding: 8px 14px; }
  html body.hnc-unit-page .hnc-app-container .drag-item { flex-wrap: wrap; }
  html body.hnc-unit-page .hnc-app-container .order-move { width: 100%; justify-content: flex-end; }
  html body.hnc-unit-page .hnc-app-container .check-btn,
  html body.hnc-unit-page .hnc-app-container .reset-exercise-btn { margin-left: 0; margin-right: 8px; }
  /* 右下角是翻译悬浮钮, 底部是导航栏 → 文字钮放左下角、底栏上方 */
  html body.hnc-unit-page .hnc-app-container .control-panel {
    left: 12px; right: auto; bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
}
