/* ============================================================
   七语之旅 · 共享样式表
   所有页面引用此文件,保持整套教程视觉统一
   ============================================================ */
:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #1c2333;
  --muted: #5b6478;
  --line: #e6e8f0;
  --hero1: #191740;
  --hero2: #4c1d95;
  --hero3: #7c3aed;
  --gold: #f59e0b;
  --good: #059669;
  --warn: #d97706;
  --bad: #dc2626;
  --cjk: #e11d48;
  --ie: #2563eb;
  --shadow: 0 8px 24px rgba(28,35,51,.08);
  --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", -apple-system, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.7;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--hero1), var(--hero2) 55%, var(--hero3));
  color: #fff; padding: 56px 24px 50px; text-align: center; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 20% 120%, rgba(255,255,255,.12), transparent 55%),
              radial-gradient(circle at 85% 0%, rgba(255,255,255,.10), transparent 50%);
}
.hero h1 { font-size: clamp(26px, 4.5vw, 40px); font-weight: 800; letter-spacing: 1px; position: relative; }
.hero .sub { margin-top: 10px; font-size: 16px; opacity: .92; position: relative; }
.hero .crumbs { margin-top: 16px; font-size: 13px; opacity: .85; position: relative; }
.hero .crumbs a { color: #fff; text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,.6); }
.hero .stats {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-top: 20px; position: relative;
}
.hero .stats span {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  padding: 6px 14px; border-radius: 999px; font-size: 13px;
}

/* ---------- Nav ---------- */
nav {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  display: flex; justify-content: center; gap: 6px; padding: 10px 12px; flex-wrap: wrap;
}
nav a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 6px 14px; border-radius: 999px; transition: .2s; }
nav a:hover { background: #eef0f8; color: var(--hero2); }

/* ---------- Layout ---------- */
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px 80px; }
section { margin-top: 56px; scroll-margin-top: 24px; }
h2.sec {
  font-size: 25px; font-weight: 800; display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
h2.sec .num {
  background: linear-gradient(135deg, var(--hero2), var(--hero3)); color: #fff;
  width: 34px; height: 34px; border-radius: 10px; font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lead { color: var(--muted); margin-bottom: 20px; max-width: 780px; }
.subhead { font-size: 15px; font-weight: 700; margin: 22px 0 10px; color: var(--ink); }
.subhead::before { content: "▸ "; color: var(--hero3); }

/* ---------- Callouts ---------- */
.notice, .tip, .warn, .answer {
  border-radius: 12px; padding: 14px 18px; font-size: 14px; margin: 14px 0;
  border-left: 4px solid var(--hero3); background: var(--card); box-shadow: var(--shadow);
}
.tip { border-left-color: var(--good); }
.warn { border-left-color: var(--warn); }
.answer { border-left-color: var(--gold); background: #fffbeb; box-shadow: none; }
.notice b, .tip b, .warn b, .answer b { color: var(--ink); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; border-top: 4px solid var(--hero3);
}
.card h4 { font-size: 16px; margin-bottom: 4px; }
.card p, .card li { font-size: 13.5px; color: var(--muted); }
.card ul { list-style: none; }
.card li { padding: 3px 0 3px 18px; position: relative; }
.card li::before { content: "·"; position: absolute; left: 4px; color: var(--hero3); font-weight: 800; }

/* ---------- Tables ---------- */
.tbl-scroll { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; background: var(--card); min-width: 560px; }
th, td { padding: 10px 14px; text-align: left; font-size: 13.5px; }
thead th {
  background: linear-gradient(135deg, var(--hero1), var(--hero2));
  color: #fff; font-weight: 600; font-size: 13px; letter-spacing: .5px; white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--line); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #fafbfe; }
td b { color: var(--ink); }
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.tag.cjk { background: #fee2e2; color: #b91c1c; }
.tag.ie  { background: #dbeafe; color: #1d4ed8; }
.tag.ok  { background: #ecfdf5; color: #065f46; }
.tag.warn { background: #fef3c7; color: #92400e; }
.ip  { font-family: "Segoe UI", "DejaVu Sans", Consolas, monospace; font-weight: 700; color: var(--hero2); }

/* ---------- Week lesson ---------- */
.week {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  margin-top: 20px; overflow: hidden; scroll-margin-top: 70px;
}
.week-bar {
  background: linear-gradient(135deg, #f3f0ff, #fdf4ff);
  border-bottom: 1px solid var(--line); padding: 14px 20px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.wno {
  background: linear-gradient(135deg, var(--hero2), var(--hero3)); color: #fff;
  font-weight: 800; font-size: 13px; padding: 6px 14px; border-radius: 999px; letter-spacing: .5px; flex-shrink: 0;
}
.week-bar h3 { font-size: 17px; }
.week-bar .goal { margin-left: auto; font-size: 12.5px; color: #065f46; background: #ecfdf5; padding: 4px 12px; border-radius: 999px; font-weight: 600; }
.week-body { padding: 18px 20px; }
.week-body h4 { font-size: 14px; margin: 16px 0 8px; color: var(--hero2); }
.week-body h4:first-child { margin-top: 0; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.day {
  background: #fafbff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.day h6 { font-size: 13px; color: var(--hero2); margin-bottom: 6px; }
.day h6 small { color: var(--muted); font-weight: 500; }
.day ul { list-style: none; }
.day li { font-size: 13px; padding: 3px 0 3px 16px; position: relative; }
.day li::before { content: "→"; position: absolute; left: 0; color: var(--hero3); }
.vlist { list-style: none; }
.vlist li { font-size: 13.5px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.vlist li:last-child { border-bottom: none; }
.vlist b { color: var(--ink); }
.vlist .ip { color: var(--hero3); }
.vlist small { color: var(--muted); }
.milestone {
  margin-top: 16px; background: #fffbeb; border: 1px dashed var(--gold); border-radius: 12px;
  padding: 12px 16px; font-size: 13.5px; color: #78350f;
}
.milestone b { color: #92400e; }

/* ---------- Tracks / phase ---------- */
.track {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px; margin-top: 16px; border-top: 4px solid;
}
.track.cjk { border-color: var(--cjk); }
.track.ie { border-color: var(--ie); }
.track h3 { font-size: 17px; margin-bottom: 4px; }
.track p { font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.seq { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.seq .lang {
  background: #f3f0ff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-weight: 700;
}
.seq .lang.main { background: linear-gradient(135deg, var(--hero2), var(--hero3)); color: #fff; border: none; }
.seq .arrow { color: var(--hero3); font-weight: 800; }

/* ---------- Schedule ---------- */
.sched { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.sched table { min-width: 480px; }
.sched .slot { font-weight: 700; white-space: nowrap; color: var(--hero2); }
.sched .type { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.type.main { background: #fef3c7; color: #92400e; }
.type.sub  { background: #e0e7ff; color: #3730a3; }
.type.hold { background: #e2e8f0; color: #334155; }

footer { text-align: center; color: var(--muted); font-size: 13px; padding: 40px 0 10px; }

@media (max-width: 640px) {
  .week-bar { flex-direction: column; align-items: flex-start; }
  .week-bar .goal { margin-left: 0; }
}
