/* RobotGuide EN · standalone stylesheet (US technical-education look)
   Reference: roadmap.sh — dark slate header, white cards on slate-50,
   blue primary, amber highlights, Inter/system sans, flat + rounded.
   Light-first. Targets only the classes build-en.mjs emits. */

:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --ink: #0f172a;
  --ink2: #475569;
  --ink3: #8fa1b3;
  --line: #e2e8f0;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --amber: #f59e0b;
  --amber-soft: #fffbeb;
  --head: #0f172a;
  --r: 12px;
  --font: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- header ---------- */
.site-head {
  background: var(--head);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.site-head .bar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: #fff; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand svg path { stroke: #f8fafc; }
.brand svg .bm-arm path { stroke: #cbd5e1; }
.brand svg .bm-arm path:last-child,
.brand svg .bm-dot { stroke: var(--amber); }
.brand svg .bm-dot { fill: var(--amber); stroke: none; }
.site-head .nav { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.site-head .nav a {
  color: #cbd5e1;
  font-size: 14.5px;
  font-weight: 500;
}
.site-head .nav a:hover { color: #fff; text-decoration: none; }
.site-head .nav a[hreflang="zh"] {
  color: #94a3b8;
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 13px;
}
.site-head .nav a[hreflang="zh"]:hover { color: #f8fafc; border-color: #64748b; }

/* ---------- hero ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.hero {
  padding: 72px 0 48px;
  max-width: 760px;
}
.hero .kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
}
.hero h1 {
  font-size: clamp(34px, 5.2vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 22px;
  color: var(--ink);
}
.hero .lede { font-size: 17.5px; color: var(--ink2); margin: 0 0 14px; }
.hero-cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.btn:hover { text-decoration: none; border-color: #cbd5e1; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.pri:hover { background: #1d4ed8; border-color: #1d4ed8; }

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin: 8px 0 8px;
}
.stats > div {
  background: var(--card);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stats b {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
}
.stats span { font-size: 13px; color: var(--ink2); line-height: 1.45; }

/* ---------- sections ---------- */
.sec { padding: 44px 0 8px; }
.sec h2 {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.sec > .lede { color: var(--ink2); margin: 0 0 18px; max-width: 760px; }
section.sec:last-of-type { padding-bottom: 72px; }

.lede { color: var(--ink2); }
main > .sec > p.lede { max-width: 760px; }

/* ---------- cards ---------- */
.egrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 20px 0 8px;
}
.ecard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 18px 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ecard:hover { border-color: #bfdbfe; box-shadow: 0 3px 14px rgba(37, 99, 235, 0.08); }
.ecard h3 { font-size: 15.5px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.01em; }
.ecard p { font-size: 13.5px; color: var(--ink2); margin: 0 0 8px; line-height: 1.55; }
.ecard p:last-child { margin-bottom: 0; }
.ecard p a { font-weight: 600; }

.mono { font-family: var(--mono); font-size: 13px; color: var(--ink2); }
.dim { color: var(--ink3); }

/* ---------- tables (the topic map) ---------- */
.scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  margin: 16px 0 8px;
}
.scroll table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 13.5px; }
.scroll thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: var(--ink2);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.scroll tbody td {
  padding: 9px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--ink);
  vertical-align: top;
}
.scroll tbody tr:last-child td { border-bottom: none; }
.scroll tbody tr:nth-child(even) { background: #fbfdff; }
.scroll tbody td a { font-weight: 600; }
.scroll tbody td.mono { color: var(--ink2); }

/* depth pills */
.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  font-family: var(--font);
}
.pill.p3 { background: var(--accent-soft); color: var(--accent); }
.pill.p2 { background: var(--amber-soft); color: #b45309; }
.pill.p1 { background: #f1f5f9; color: var(--ink2); }

/* ---------- roadmap lists ---------- */
.rm-list {
  list-style: none;
  counter-reset: st;
  margin: 18px 0 8px;
  padding: 0;
  max-width: 820px;
}
.rm-list li {
  counter-increment: st;
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 4px 11px 44px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 14.5px;
}
.rm-list li::before {
  content: counter(st);
  position: absolute;
  left: 0;
  top: 9px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
}
.rm-list li span {
  font-weight: 500;
  font-size: 12px;
  color: var(--ink2);
  font-family: var(--mono);
  white-space: nowrap;
}

/* ---------- career tracks ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.chip, .jchip {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
a.chip:hover, a.jchip:hover { border-color: #bfdbfe; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.07); }
.chip.on { background: var(--head); border-color: var(--head); color: #f8fafc; }
.jchip span {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink2);
  font-family: var(--mono);
}

.stages { max-width: 820px; margin-top: 6px; }
.stage {
  display: flex;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 10px;
}
.sno {
  flex: 0 0 auto;
  min-width: 86px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--mono);
  padding-top: 2px;
}
.sbody { flex: 1 1 auto; }
.stopics { margin: 0 0 6px; line-height: 1.9; font-size: 14.5px; }
.stopics a { font-weight: 600; }
.stopics i { font-style: normal; color: #cbd5e1; margin: 0 5px; }
.sor { color: #b45309; font-size: 12px; margin: 0 8px; }
.sbody .mono { margin: 0; font-size: 12.5px; color: var(--ink2); }

.warnbox {
  max-width: 820px;
  border-left: 4px solid #d97706;
  background: #fffbeb;
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
}
.warnbox p { margin: 0; font-size: 15px; line-height: 1.7; color: #78350f; }

/* ---------- topic pages (lessons) ---------- */
.kmeta { margin: 14px 0 0; line-height: 2; }
.kmeta .pill { margin-right: 6px; }
.plainlist { max-width: 820px; margin: 0 0 8px; padding-left: 22px; }
.plainlist li { font-size: 15px; line-height: 1.75; color: var(--ink); margin-bottom: 6px; }
.lesson { max-width: 860px; }
.lesh-k { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 6px 0 14px; }
.lesp { font-size: 15.5px; line-height: 1.85; color: var(--ink); margin: 0 0 14px; }
.lesh { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin: 30px 0 12px; }
.vizwrap { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin: 18px 0 10px; overflow: hidden; }
.vizwrap canvas { width: 100%; height: 300px; display: block; touch-action: none; cursor: grab; }
.vizwrap canvas:active { cursor: grabbing; }
.vizhint { margin: 0; padding: 9px 16px; font-size: 12px; color: var(--ink2); border-top: 1px solid var(--line); background: #f8fafc; line-height: 1.6; }
.figcap { max-width: 100%; border-left: 3px solid var(--accent); background: #eff6ff; border-radius: 0 10px 10px 0; padding: 12px 16px; font-size: 13.5px; line-height: 1.7; color: #1e3a8a; margin: 0 0 20px; }
.tblwrap { overflow-x: auto; margin: 14px 0 18px; }
.lestbl { border-collapse: collapse; width: 100%; background: #fff; font-size: 13.5px; }
.lestbl th { text-align: left; padding: 9px 12px; background: var(--head); color: #e2e8f0; font-size: 12.5px; position: sticky; top: 0; }
.lestbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--ink); line-height: 1.6; }
.lestbl tbody tr:nth-child(even) { background: #f8fafc; }
.kquiz { margin-top: 8px; }
.kq { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 10px 0; background: #fff; }
.kqq { font-weight: 600; font-size: 15px; margin: 0 0 8px; }
.kqopts { list-style: none; margin: 0 0 8px; padding: 0; }
.kqopts li { font-size: 14.5px; padding: 4px 0 4px 4px; color: var(--ink2); }
.kqopts li b { display: inline-block; min-width: 20px; color: var(--accent); font-family: var(--mono); margin-right: 6px; }
.kq details summary { cursor: pointer; font-size: 13.5px; color: var(--accent); font-weight: 600; }
.kqa { font-size: 14.5px; line-height: 1.7; color: var(--ink); margin: 8px 0 0; }
.lesdeep { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.lesdeep a { font-size: 14.5px; font-weight: 600; color: var(--accent); }
.lesson .note { font-size: 12.5px; color: var(--ink2); margin: 10px 0 0; }
.verifybox { max-width: 820px; border-left: 4px solid #059669; background: #ecfdf5; border-radius: 0 12px 12px 0; padding: 14px 18px; font-size: 15px; line-height: 1.7; color: #064e3b; }

/* ---------- footer ---------- */
.site-foot {
  background: var(--head);
  margin-top: 40px;
  color: #94a3b8;
}
.site-foot .bar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 34px 24px;
}
.site-foot .fname { color: #f8fafc; font-weight: 700; font-size: 16px; margin: 0 0 6px; }
.site-foot .fnote { font-size: 13.5px; margin: 0 0 4px; }
.site-foot a { color: #cbd5e1; }
.site-foot a:hover { color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .site-head .bar { height: auto; padding: 10px 16px; flex-wrap: wrap; }
  .site-head .nav { gap: 14px; }
  main { padding: 0 16px; }
  .hero { padding: 44px 0 32px; }
  .hero .lede { font-size: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats b { font-size: 24px; }
  .sec { padding: 34px 0 4px; }
  .sec h2 { font-size: 21px; }
  .rm-list li { flex-direction: column; gap: 2px; padding-left: 38px; }
  .rm-list li::before { top: 12px; width: 26px; height: 26px; }
  .stage { flex-direction: column; gap: 6px; padding: 12px 14px; }
  .sno { min-width: 0; }
}
