/* 跨境电商学堂 · 静态版样式（与教学站同一套配色：深绿 / 青绿 / 暖白 / 金色） */
:root {
  --green-950: #07281f;
  --green-900: #0b3a2c;
  --green-800: #104a39;
  --teal-700: #0e6150;
  --teal-600: #12806b;
  --teal-500: #17957c;
  --teal-200: #c3e6d9;
  --teal-050: #eaf5f0;
  --cream: #faf7f0;
  --paper: #ffffff;
  --gold: #c8a24a;
  --gold-soft: #f2e6c8;
  --ink: #17231f;
  --ink-2: #33443d;
  --muted: #5f7169;
  --line: rgba(11, 58, 44, .12);
  --line-strong: rgba(11, 58, 44, .24);
  --danger: #a63d3d;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(7, 40, 31, .06), 0 2px 8px rgba(7, 40, 31, .04);
  --shadow-md: 0 8px 24px rgba(7, 40, 31, .08);
  --font-sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans", Tahoma, Arial, sans-serif;
  --font-ar: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Geeza Pro", sans-serif;
  --topbar-h: 66px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 1.65;
  color: var(--ink); background: var(--cream);
}
html[dir="rtl"] body { font-family: var(--font-ar); }
img { max-width: 100%; display: block; }
a { color: var(--teal-700); }
a:hover { color: var(--teal-500); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--green-900); }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 .8em; }
ul, ol { margin: 0 0 .9em; padding-inline-start: 1.3em; }
.small { font-size: .88rem; }
.muted { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 0; background: var(--gold);
  color: #111; padding: 8px 14px; z-index: 100;
}
.skip-link:focus { inset-inline-start: 8px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  display: flex; align-items: center; gap: 18px; padding: 0 clamp(14px, 3vw, 32px);
  background: rgba(11, 58, 44, .96); color: #fff; box-shadow: 0 8px 24px rgba(7, 40, 31, .18);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--gold); color: #23180a; font-weight: 700; font-size: 18px;
}
.brand-name { font-weight: 600; letter-spacing: .02em; max-width: 42vw; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; flex-wrap: wrap; }
.nav a {
  color: rgba(255, 255, 255, .86); text-decoration: none; padding: 8px 12px;
  border-radius: 999px; font-size: .95rem; white-space: nowrap;
}
.nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.nav a.active { background: var(--gold); color: #23180a; font-weight: 600; }
.tools { display: flex; align-items: center; gap: 8px; }
.lang-wrap select {
  border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .1);
  color: #fff; border-radius: 999px; padding: 7px 10px; font-size: .9rem; max-width: 40vw;
}
.lang-wrap select option { color: #17231f; }
.menu-btn {
  display: none; background: rgba(255, 255, 255, .12); color: #fff; border: 0;
  border-radius: 8px; font-size: 1.2rem; padding: 6px 10px; cursor: pointer;
}

/* ---------- 底部固定导航（世界 / 中国货源 / 课程学习 / 智能问答 / 我的） ---------- */
body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
.bottom-nav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: rgba(11, 58, 44, .98); color: #fff;
  border-top: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 -10px 26px rgba(7, 40, 31, .2);
  padding: 5px 6px calc(5px + env(safe-area-inset-bottom, 0px));
  backdrop-filter: blur(8px);
}
.bottom-nav a {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 46px; padding: 6px 4px; border-radius: 10px;
  color: rgba(255, 255, 255, .84); text-decoration: none;
  font-size: .78rem; line-height: 1.2; overflow-wrap: anywhere;
}
.bottom-nav a.active {
  background: rgba(200, 162, 74, .2); color: var(--gold); font-weight: 600;
}
.bottom-nav a:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
@media (min-width: 901px) {
  .bottom-nav a { font-size: .86rem; }
}
@media print {
  .bottom-nav { display: none !important; }
  body { padding-bottom: 0; }
}
@media (max-width: 560px) {
  /* 窄屏顶栏只保留主入口；注册与教师登录在“我的”页仍可找到 */
  #authArea [data-auth="teacher"], #authArea [data-auth="signup"] { display: none; }
  #authArea .btn { padding: 6px 10px; font-size: .82rem; }
}

/* ---------- 兜底提示 ---------- */
.fallback-bar {
  background: var(--gold-soft); color: #4a3a13; font-size: .88rem;
  padding: 8px clamp(14px, 3vw, 32px); border-bottom: 1px solid rgba(200, 162, 74, .4);
}

/* ---------- 布局 ---------- */
main { min-height: 60vh; }
.wrap { max-width: 1180px; margin: 0 auto; padding: clamp(18px, 3vw, 34px) clamp(14px, 3vw, 28px) 56px; }
.hero {
  background: linear-gradient(135deg, var(--green-950), var(--teal-700) 70%);
  color: #fff; padding: clamp(34px, 6vw, 68px) clamp(18px, 4vw, 44px);
  border-radius: var(--radius-lg); position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset-inline-end: -80px; top: -80px; width: 260px; height: 260px;
  border-radius: 50%; background: radial-gradient(circle, rgba(200, 162, 74, .45), transparent 65%);
}
.hero h1 { color: #fff; max-width: 21ch; }
.hero .lede { font-size: 1.08rem; color: rgba(255, 255, 255, .88); max-width: 62ch; }
.hero .eyebrow { color: var(--gold); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--green-900);
  text-decoration: none; font-size: .95rem; cursor: pointer; font-family: inherit;
}
.btn:hover { border-color: var(--teal-600); color: var(--teal-700); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #23180a; font-weight: 600; }
.btn-gold:hover { background: #d8b45f; color: #23180a; }
.btn-ghost { background: transparent; color: inherit; border-color: rgba(255, 255, 255, .5); }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px;
  margin: clamp(26px, 4vw, 44px) 0 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head .small { margin: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 18px; }
.stat { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius-md); padding: 12px 14px; }
.stat b { display: block; font-size: 1.5rem; color: var(--gold); }
.stat span { font-size: .85rem; color: rgba(255, 255, 255, .82); }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.card-link { text-decoration: none; color: inherit; display: block; transition: transform .15s, box-shadow .15s; }
.card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: inherit; }
.card h3 { margin: 0 0 6px; }
.card .meta { font-size: .82rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.card .desc { font-size: .92rem; color: var(--ink-2); margin: 8px 0 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-media { aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--teal-050); margin-bottom: 10px; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.chip {
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-2);
  border-radius: 999px; padding: 6px 13px; font-size: .86rem; cursor: pointer; font-family: inherit;
  display: inline-block; max-width: 100%;
}
.chip:hover { border-color: var(--teal-500); color: var(--teal-700); }
.chip.active { background: var(--green-900); border-color: var(--green-900); color: #fff; }
.badge { display: inline-block; font-size: .74rem; padding: 2px 8px; border-radius: 999px;
  background: var(--teal-050); color: var(--teal-700); border: 1px solid var(--teal-200); }
.badge-gold { background: var(--gold-soft); color: #6a5218; border-color: rgba(200, 162, 74, .5); }

.searchbar { display: flex; gap: 8px; margin-bottom: 14px; }
.catalog-notice {
  background: var(--gold-soft); border: 1px solid rgba(200, 162, 74, .45);
  border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 14px; color: #4a3a13;
}
.searchbar input, .ask-form textarea, .note-box textarea, select, input[type="text"] {
  font-family: inherit; font-size: 1rem; color: var(--ink);
}
.searchbar input {
  flex: 1; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--paper);
}
.searchbar input:focus, .ask-form textarea:focus, .note-box textarea:focus { outline: 2px solid var(--teal-200); }

/* ---------- 详情 ---------- */
.detail-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.detail-hero .image { border-radius: var(--radius-lg); overflow: hidden; background: var(--teal-050); }
.detail-hero .image img { width: 100%; height: 100%; max-height: 380px; object-fit: cover; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: .88rem; }
.kv dd { margin: 0; }
.prose p { color: var(--ink-2); }
.prose h3 { margin-top: 1.3em; }
.quote { border-inline-start: 3px solid var(--gold); background: var(--paper);
  padding: 10px 14px; border-radius: var(--radius-sm); }
.list-clean { list-style: none; padding: 0; margin: 0; }
.list-clean li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.list-clean li:last-child { border-bottom: 0; }

table.cmp { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.cmp th, table.cmp td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.cmp th { background: var(--teal-050); color: var(--green-900); font-weight: 600; }
table.cmp tr:last-child td { border-bottom: 0; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

.toc { position: sticky; top: calc(var(--topbar-h) + 14px); align-self: start; }
.toc a { display: block; padding: 5px 0; font-size: .9rem; text-decoration: none; }

/* ---------- 课程 ---------- */
.lesson-card .num { font-size: .8rem; color: var(--gold); letter-spacing: .08em; }
.lesson-hero { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow-sm); }
.lesson-hero h1 { margin-bottom: 6px; }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; }

.concept { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 14px 16px; margin-bottom: 12px; }
.concept h4 { margin: 0 0 6px; color: var(--green-800); }
.concept dl { margin: 0; display: grid; grid-template-columns: 92px 1fr; gap: 4px 10px; font-size: .93rem; }
.concept dt { color: var(--muted); }
.concept dd { margin: 0; }

/* ---------- 自测 ---------- */
.quiz-q { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 16px; margin-bottom: 12px; }
.quiz-q h4 { margin: 0 0 10px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px;
  border: 1px solid transparent; cursor: pointer; }
.opt:hover { background: var(--teal-050); border-color: var(--teal-200); }
.opt input { margin-top: 5px; }
.opt.correct { background: #eaf6ee; border-color: #b7dfc4; }
.opt.wrong { background: #fbeeee; border-color: #efc3c3; }
.quiz-result { background: var(--green-900); color: #fff; padding: 16px 18px; border-radius: var(--radius-md); }
.quiz-result b { color: var(--gold); }

/* ---------- 问答 ---------- */
.ask-form { display: grid; gap: 10px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
.ask-form textarea { width: 100%; min-height: 84px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); resize: vertical; }
.ask-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.answer { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 16px 18px; margin-top: 14px; }
.answer h3 { margin-top: 0; }
.cite-list { font-size: .86rem; color: var(--muted); }
.cite-list a { display: inline-block; margin-inline-end: 10px; }

/* ---------- 我的 ---------- */
.note-box textarea { width: 100%; min-height: 90px; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); resize: vertical; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- 页脚 ---------- */
.footer { background: var(--green-950); color: rgba(255, 255, 255, .8); margin-top: 40px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 26px clamp(14px, 3vw, 28px); }
.footer p { margin: 0 0 6px; font-size: .88rem; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .detail-hero { grid-template-columns: 1fr; }
  .lesson-grid { grid-template-columns: 1fr; }
  .toc { position: static; }
}
@media (max-width: 720px) {
  .menu-btn { display: inline-block; }
  .nav {
    position: fixed; inset-inline: 0; top: var(--topbar-h); background: var(--green-900);
    flex-direction: column; padding: 10px 14px 16px; margin: 0; display: none;
    box-shadow: 0 16px 30px rgba(7, 40, 31, .3);
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 12px; border-radius: 8px; }
  .brand-name { font-size: .95rem; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 6px; }
  .concept dl { grid-template-columns: 1fr; }
}
@media print {
  .topbar, .footer, .fallback-bar, .hero-actions, .ask-form, .toc { display: none !important; }
  body { background: #fff; }
  .card, .lesson-hero, .concept { box-shadow: none; }
}

/* ---------- 首页：照片头图、栏目卡、实时进展、图片墙 ---------- */
.hero-photo {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(18px, 3vw, 34px); align-items: center;
  background-image: linear-gradient(100deg, rgba(7, 40, 31, .92) 0%, rgba(11, 58, 44, .82) 55%, rgba(14, 97, 80, .55) 100%),
    var(--hero-img);
  background-size: cover; background-position: center;
}
.hero-photo::after { opacity: .55; }
.hero-copy { position: relative; z-index: 1; }
.hero-stamp {
  margin: 14px 0 0; font-size: .78rem; letter-spacing: .02em;
  color: rgba(255, 255, 255, .72);
}
.hero-mosaic {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.mosaic-item {
  margin: 0; position: relative; overflow: hidden; border-radius: 14px;
  aspect-ratio: 4 / 3; box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
  border: 1px solid rgba(255, 255, 255, .18);
}
.mosaic-item:nth-child(1) { transform: translateY(-8px); }
.mosaic-item:nth-child(4) { transform: translateY(8px); }
.mosaic-item img { width: 100%; height: 100%; object-fit: cover; }
.mosaic-item figcaption {
  position: absolute; inset-inline: 0; bottom: 0; padding: 18px 8px 6px;
  font-size: .7rem; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .65));
}
.stats-light { margin-top: 18px; }
.stats-light .stat {
  background: var(--paper); border-color: var(--line); box-shadow: var(--shadow-sm);
}
.stats-light .stat b { color: var(--green-800); }
.stats-light .stat span { color: var(--muted); }

.section-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); gap: 16px;
}
.section-card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); transition: transform .16s, box-shadow .16s;
}
.section-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: inherit; }
.section-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--teal-050); }
.section-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.section-card:hover .section-media img { transform: scale(1.04); }
.section-icon {
  display: grid; place-items: center; color: var(--teal-700);
  background: linear-gradient(135deg, var(--teal-050), var(--gold-soft));
}
.section-icon svg { width: 58px; height: 58px; }
.section-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.section-body h3 { margin: 0; }
.section-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.bar-label {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: .78rem; color: var(--muted); margin-top: auto;
}
.bar-label b { color: var(--green-800); }
.bar { height: 8px; border-radius: 999px; background: var(--teal-050); overflow: hidden; }
html[dir="rtl"] .bar { direction: rtl; }
.bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--teal-500), var(--gold));
}
.section-open { margin: 2px 0 0; font-size: .86rem; font-weight: 600; color: var(--teal-700); }

.progress-panel { padding: 6px 20px 16px; }
.progress-row { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.progress-row:last-of-type { border-bottom: 0; }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.progress-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.progress-foot {
  border-top: 1px solid var(--line); padding-top: 12px; font-size: .86rem; color: var(--muted);
}

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 12px; }
.gallery-item {
  position: relative; overflow: hidden; border-radius: var(--radius-md); aspect-ratio: 4 / 3;
  color: #fff; text-decoration: none; box-shadow: var(--shadow-sm); background: var(--teal-050);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-cap {
  position: absolute; inset-inline: 0; bottom: 0; display: flex; flex-direction: column; gap: 2px;
  padding: 28px 10px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, .74));
}
.gallery-cap b { font-size: .9rem; }
.gallery-cap em { font-style: normal; font-size: .74rem; opacity: .86; }

@media (max-width: 900px) {
  .hero-photo { grid-template-columns: 1fr; }
  .hero-mosaic { max-width: 520px; }
}
@media (max-width: 560px) {
  .hero-mosaic { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mosaic-item:nth-child(1), .mosaic-item:nth-child(4) { transform: none; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
  .hero-mosaic, .gallery, .progress-panel { display: none !important; }
}

/* ---------- 身份、模式提示、嵌入页 ---------- */
.auth-area { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.auth-area .btn { padding: 6px 10px; font-size: .82rem; }
.user-chip {
  max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .82rem; padding: 4px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25);
}
.nav a.nav-teacher { background: var(--gold); color: #23180a; font-weight: 600; }
.mode-bar {
  background: var(--gold-soft); color: #4a3a13; font-size: .86rem;
  padding: 8px clamp(14px, 3vw, 32px); border-bottom: 1px solid rgba(200, 162, 74, .45);
}
.mode-bar a { color: #4a3a13; text-decoration: underline; }

.modal {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: rgba(7, 40, 31, .55); padding: 18px;
}
.modal[hidden] { display: none; }
body.modal-open { overflow: hidden; }
.modal-card {
  position: relative; width: min(440px, 100%); background: var(--paper);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.modal-card h2 { margin: 0 0 14px; padding-inline-end: 28px; }
.modal-close {
  position: absolute; top: 10px; inset-inline-end: 12px; border: 0; background: none;
  font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer;
}
.auth-form { display: grid; gap: 10px; }
.auth-form label { display: grid; gap: 5px; font-size: .88rem; color: var(--ink-2); }
.auth-form input {
  padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); font-size: 1rem;
}
.auth-form input:focus { outline: 2px solid var(--teal-200); }
.auth-error {
  margin: 0; color: var(--danger); background: #fbeeee; border: 1px solid #efc3c3;
  border-radius: var(--radius-sm); padding: 8px 10px; font-size: .86rem;
}
.auth-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.auth-switch { margin: 4px 0 0; }

.teacher-strip {
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; margin-top: 18px; padding: 14px 18px;
  background: var(--green-900); color: #fff; border-radius: var(--radius-md);
}
.teacher-strip .eyebrow { color: var(--gold); margin: 0 0 4px; font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase; }
.teacher-strip .small { margin: 0; color: rgba(255, 255, 255, .75); }
.teacher-links { display: flex; gap: 8px; flex-wrap: wrap; }

.embed-frame {
  width: 100%; min-height: 620px; border: 1px solid var(--line);
  border-radius: var(--radius-md); background: var(--paper); display: block;
}
.ask-frame { min-height: 78vh; }

.quiz-short {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); font-family: inherit; font-size: .95rem; resize: vertical;
}
.quiz-q.wrong-q { border-color: #e2b6b6; background: #fdf7f7; }
.quiz-q.wrong-q .quiz-explain { color: var(--ink-2); }

@media (max-width: 720px) {
  .auth-area { order: 3; width: 100%; justify-content: flex-end; }
  .topbar { flex-wrap: wrap; height: auto; padding-block: 8px; }
  .user-chip { max-width: 10ch; }
  .modal-card { padding: 20px 16px; }
}

/* ---------- 课程学习：分层折叠 ---------- */
.lesson-toolbar { gap: 10px 16px; align-items: center; margin: 12px 0 18px; flex-wrap: wrap; }
.lesson-list { display: flex; flex-direction: column; gap: 10px; }
.lesson-item {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); overflow: hidden; scroll-margin-top: 88px;
}
.lesson-item.is-open { border-color: var(--line-strong); }
.lesson-head {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start;
  padding: 14px 16px; cursor: pointer;
}
.lesson-head:hover { background: rgba(11, 58, 44, .03); }
.lesson-head:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.lesson-num {
  font-size: .8rem; letter-spacing: .08em; color: var(--gold); font-weight: 700;
  min-width: 2.2em; padding-top: 2px;
}
.lesson-main h3 { margin: 0 0 4px; font-size: 1.02rem; line-height: 1.35; }
.lesson-intro { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.intro-tag {
  display: inline-block; margin-inline-end: 6px; padding: 1px 7px; border-radius: 999px;
  background: rgba(11, 58, 44, .07); color: var(--green-900);
  font-size: .72rem; font-weight: 600; vertical-align: 1px;
}
.lesson-context {
  margin: 4px 0 12px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--teal-050); border: 1px solid var(--line);
}
.lesson-context h3 { margin: 0 0 6px; font-size: 1rem; }
.lesson-context p { margin: 0 0 8px; }
.lesson-context p:last-child { margin-bottom: 0; }
.lesson-flags { margin: 8px 0 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.status-pill { font-size: .72rem; padding: 2px 9px; border-radius: 999px; font-weight: 600; }
.status-pill.is-none { background: rgba(11, 58, 44, .06); color: var(--muted); }
.status-pill.is-doing { background: var(--gold-soft); color: #6a5218; }
.status-pill.is-done { background: rgba(24, 110, 74, .12); color: #14603f; }
.flag {
  font-size: .72rem; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.flag.is-on { background: rgba(11, 58, 44, .05); color: var(--green-900); border-color: var(--line-strong); }
.flag.is-off { opacity: .45; text-decoration: line-through; }
.flag.is-score { background: var(--gold-soft); color: #6a5218; border-color: rgba(200, 162, 74, .45); }
.lesson-cta { white-space: nowrap; align-self: center; }
.lesson-body { border-top: 1px dashed var(--line); padding: 12px 16px 18px; }
.acc { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-top: 10px; background: #fff; }
.acc > summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 11px 14px; cursor: pointer; font-weight: 600; color: var(--green-900); list-style: none;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after { content: "▾"; color: var(--muted); font-size: .8rem; }
.acc[open] > summary::after { content: "▴"; }
.acc[open] > summary { border-bottom: 1px solid var(--line); }
.acc-count { font-size: .76rem; color: var(--muted); font-weight: 400; margin-inline-start: auto; }
.acc-body { padding: 12px 14px; overflow-wrap: anywhere; }
.acc-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.acc-body pre { overflow-x: auto; }
.acc-body h2 { font-size: 1.08rem; margin: 18px 0 8px; }
.acc-body h2:first-child { margin-top: 4px; }
.acc-body h4 { margin: 14px 0 6px; }
.lesson-meta { margin: 0 0 12px; }
.slide-list li { font-size: .92rem; }

@media (max-width: 640px) {
  .lesson-head { grid-template-columns: auto 1fr; }
  .lesson-cta { grid-column: 1 / -1; justify-self: end; }
  .lesson-body { padding: 10px 12px 16px; }
}

.file-video video { width: 100%; max-width: 640px; border-radius: 10px; margin-top: 8px; background: #000; }

/* ---------- 货源详情页（产业带 / 市场 / 展会） ---------- */
.market-page .market-hero { margin: 0 0 20px; }
.market-page .market-hero img {
  width: 100%; aspect-ratio: 21 / 9; object-fit: cover;
  border-radius: var(--radius-md); display: block;
}
.market-page .market-hero figcaption {
  margin-top: 8px; font-size: .86rem; color: var(--muted);
}
.market-page .market-head h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: 4px 0 8px; }
.market-page .market-head .lede { max-width: 70ch; }
.market-page .market-meta { margin: 18px 0 6px; }
.market-page .gallery-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.market-page .gallery-item { margin: 0; }
.market-page .gallery-item img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-sm); display: block;
}
.market-page .gallery-item figcaption {
  margin-top: 6px; font-size: .84rem; color: var(--muted); line-height: 1.45;
}
.market-page .table-wrap { overflow-x: auto; padding: 4px; }
.market-page .data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.market-page .data-table th,
.market-page .data-table td {
  text-align: left; padding: 10px 12px; vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.market-page .data-table thead th {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); background: var(--teal-050);
}
.market-page .data-table tbody th { font-weight: 600; white-space: nowrap; }
.market-page .proc-steps {
  list-style: none; padding: 0; margin: 0; display: grid; gap: 10px;
  counter-reset: step;
}
.market-page .proc-steps li {
  counter-increment: step; position: relative;
  padding: 13px 16px 13px 50px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.market-page .proc-steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 12px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--green-900); color: #fff;
  display: grid; place-items: center; font-size: .78rem;
}
.market-page .scenario { margin-top: 10px; }
.market-page .scenario .badge { margin-bottom: 8px; display: inline-block; }
@media (max-width: 640px) {
  .market-page .market-hero img { aspect-ratio: 4 / 3; }
  .market-page .data-table { font-size: .86rem; }
  .market-page .data-table th, .market-page .data-table td { padding: 8px; }
}

/* ---------- 中国货源 · 六专题 ---------- */
.topic-section { margin: 10px 0 6px; }
.topic-card { position: relative; }
.topic-card .topic-no { font-size: .78rem; letter-spacing: .1em; font-weight: 700; color: var(--gold); }
.topic-card h3 { margin: 6px 0 8px; }
.topic-question { font-size: 1.15rem; font-weight: 600; color: var(--green-900); margin: 10px 0 6px; }
.topic-page .eyebrow { color: var(--teal-700); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.evidence-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.evidence-list .ev {
  display: grid; grid-template-columns: auto 1fr; gap: 10px;
  background: var(--paper); border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong); border-radius: 10px; padding: 10px 14px;
}
.evidence-list .ev p { margin: 0; }
.ev-tag { font-size: .74rem; font-weight: 700; white-space: nowrap; color: var(--muted); padding-top: 2px; }
.ev.is-ok { border-left-color: var(--teal-600); }
.ev.is-ok .ev-tag { color: var(--teal-700); }
.ev.is-claim { border-left-color: var(--gold); }
.ev.is-claim .ev-tag { color: #8a6a1f; }
.ev.is-assume { border-left-color: #7a6bd0; }
.ev.is-assume .ev-tag { color: #5a4bb0; }
.ev.is-analysis { border-left-color: #4a7fbf; }
.ev.is-analysis .ev-tag { color: #2f5c93; }
.ev.is-todo { border-left-color: var(--danger); }
.ev.is-todo .ev-tag { color: var(--danger); }
.flow-steps { display: grid; gap: 8px; }
.flow-step { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.flow-step summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; gap: 10px; align-items: center; }
.flow-step summary::-webkit-details-marker { display: none; }
.flow-no {
  width: 22px; height: 22px; border-radius: 50%; background: var(--green-900); color: #fff;
  display: grid; place-items: center; font-size: .72rem; flex: none;
}
.flow-step p { margin: 8px 0 0 32px; color: var(--muted); }
.calc-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.calc-field { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.calc-field em { color: var(--muted); font-style: normal; font-size: .82rem; }
.calc-field input { padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: .95rem; }
.calc-field small { color: var(--muted); font-size: .78rem; }
.calc-result { margin-top: 14px; }
.calc-kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; }
.calc-formula { margin-top: 10px; }
.calc-code { background: #f5f8f6; padding: 10px 12px; border-radius: 8px; font-size: .82rem;
  overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
@media (max-width: 640px) {
  .evidence-list .ev { grid-template-columns: 1fr; gap: 4px; }
  .calc-kv { grid-template-columns: 1fr auto; font-size: .9rem; }
}

/* 专题节点教学详情（模块 26） */
.node-steps .flow-step > summary { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.node-sum { color: var(--muted); font-weight: 400; font-size: .9rem; }
.node-body { padding: 4px 0 10px; display: grid; gap: 14px; }
.node-sec h4 { margin: 0 0 6px; font-size: .95rem; }
.node-sec p { margin: 0 0 6px; }
.node-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.node-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.node-table th, .node-table td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.node-table th { background: #f5f8f6; font-weight: 600; }
.node-case { background: #f7f9f8; border-left: 3px solid var(--teal-500); padding: 8px 12px; border-radius: 6px; }
.node-modes { margin-top: 20px; }
.node-example p { margin: 0 0 6px; }
.node-edit { margin: 4px 0 0; }
@media (max-width: 640px) {
  .node-table { font-size: .82rem; }
  .node-table th, .node-table td { padding: 5px 6px; }
  .node-body { padding: 2px 0 8px; }
}

/* 资料表在窄屏内滚动，不撑破页面 */
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.node-body, .node-sec { min-width: 0; }

/* 市场与展会筛选栏（模块 30） */
.mf-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.mf-toolbar input, .mf-toolbar select { padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; font-family: inherit; font-size: .9rem; }
.mf-toolbar input { flex: 1 1 220px; min-width: 0; }
@media (max-width: 640px) { .mf-toolbar input, .mf-toolbar select { flex: 1 1 100%; } }


/* TP-03 出口 / 进口流程（模块 31） */
.flow-tabs { margin: 16px 0 6px; }
.flow-map { list-style: none; margin: 14px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.flow-map-item { min-width: 0; }
.flow-map-item button { width: 100%; height: 100%; text-align: left; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; font-family: inherit; cursor: pointer; display: grid; grid-template-columns: auto 1fr; gap: 4px 9px; align-items: start; }
.flow-map-item button:hover { border-color: var(--teal-500); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.flow-map-no { grid-row: 1 / span 2; width: 24px; height: 24px; border-radius: 50%; background: #e8f1ee; color: #1f5f52; font-size: .78rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.flow-map-name { font-weight: 600; line-height: 1.35; }
.flow-map-sum { grid-column: 2; color: var(--muted, #5b6b66); font-size: .78rem; line-height: 1.4; }
.flow-map-item.is-clearance button { border-color: var(--gold-500, #b08948); background: #fdf8ec; }
.flow-map-item.is-clearance .flow-map-no { background: #f3e3bf; color: #7a5417; }
.stages-section { border-top: 2px solid var(--teal-500, #2a7f6f); }
.stage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 14px 0 8px; }
.stage-card { background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.stage-head { display: flex; align-items: center; gap: 8px; }
.stage-head h3 { margin: 0; font-size: .98rem; line-height: 1.35; }
.stage-no { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #e8f1ee; color: #1f5f52; font-size: .82rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.stage-card > p { margin: 0; font-size: .86rem; line-height: 1.5; }
.stage-risk strong, .stage-docs strong { display: block; font-size: .74rem; color: var(--muted, #5b6b66); letter-spacing: .04em; margin-bottom: 2px; }
.stage-risk { color: #8a4b2f; }
.stage-docs { color: #1f5f52; }
.stage-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.stage-chips .chip-sm { font-size: .76rem; padding: 4px 9px; }
.stage-ext { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 0; }
.stage-ext > span { margin-right: 4px; }
.clearance-section { border-top: 2px solid var(--gold-500, #b08948); }
.clearance-panel { background: #fdf9ef; border: 1px solid #ead9b3; border-radius: 12px; padding: 12px 14px; }
.clearance-panel .flow-step { background: #fff; }
.clearance-lead { margin: 0 0 10px; padding: 8px 10px; background: #fff6dd; border-left: 3px solid var(--gold-500, #b08948); border-radius: 6px; font-size: .88rem; }
.flow-node { margin-bottom: 10px; }
.flow-node.is-clearance { border: 1px solid #ead9b3; }
.flow-node-sec { margin: 14px 0 0; min-width: 0; }
.flow-node-sec h4 { margin: 0 0 6px; font-size: .92rem; color: #1f5f52; }
.flow-node-sec p { margin: 0 0 6px; }
.flow-badge { margin-left: 8px; padding: 2px 7px; border-radius: 999px; background: #f3e3bf; color: #7a5417; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.flow-page .flow-step summary { align-items: center; }
.flow-page .flow-step .node-sum { flex-basis: 100%; }
@media (max-width: 640px) {
  .flow-map { grid-template-columns: 1fr; }
  .stage-grid { grid-template-columns: 1fr; }
  .clearance-panel { padding: 10px; }
}


/* 八章课程与章节讲义（模块 32） */
.chapter-grid { align-items: stretch; }
.chapter-card h3 { margin: 4px 0 6px; }
.chapter-card .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chapter-card.is-pending { opacity: .72; }
.chapter-toc { margin-bottom: 14px; }
.chapter-sections { display: grid; gap: 10px; }
.chapter-section summary { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; cursor: pointer; }
.chapter-sec-no { display: inline-flex; min-width: 42px; height: 24px; padding: 0 8px; border-radius: 999px; background: #e8f1ee; color: #1f5f52; font-size: .78rem; font-weight: 700; align-items: center; justify-content: center; }
.chapter-sec-body { margin-top: 10px; }
.chapter-sec-body p { margin: 0 0 10px; line-height: 1.75; }
.chapter-figure { margin: 14px 0 4px; }
.chapter-figure img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.chapter-figure figcaption { margin-top: 6px; font-size: .82rem; color: var(--muted, #5b6b66); }
@media (max-width: 640px) {
  .chapter-section summary { gap: 6px; }
  .chapter-sec-body p { font-size: .95rem; }
}
