/* 网见 NetLab · 视觉规则
   页面背景 #F5F7F3 · 侧栏 #123C32 · 主文字 #183C34 · 主按钮 #237B61
   品牌亮色 #D9EC5F · 面板 #FFFFFF · 分隔线 #E3E9E3 · 次要文字 #7B8983
   当前层浅底 #EAF0DC · 温和警示 #C46C48（配浅米橙底） */

:root {
  --bg: #F5F7F3;
  --sidebar: #123C32;
  --sidebar-soft: #1B4C40;
  --ink: #183C34;
  --primary: #237B61;
  --primary-deep: #1A5F4A;
  --brand: #D9EC5F;
  --panel: #FFFFFF;
  --line: #E3E9E3;
  --muted: #7B8983;
  --layer-soft: #EAF0DC;
  --warn: #C46C48;
  --warn-soft: #FAF0E6;
  --ok-soft: #EDF5EE;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
  --sans: "DM Sans", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--primary); color: #fff; padding: 6px 12px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ===== 整体布局 ===== */
.app { display: flex; align-items: stretch; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content {
  padding: 35px 37px 24px;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  min-width: 0;
}

/* ===== 左侧目录 ===== */
.sidebar {
  width: 228px; flex: 0 0 228px;
  background: var(--sidebar);
  color: #DCE8E0;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
  font-size: 12px;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 6px; }
.brand-mark {
  width: 35px; height: 35px; flex: 0 0 35px;
  background: var(--brand); color: var(--sidebar);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; letter-spacing: 0;
}
.brand-name { font-size: 15px; font-weight: 700; color: #F2F7F2; }
.brand-slogan {
  padding: 2px 16px 12px;
  font-size: 9px; letter-spacing: 0.18em; color: #7FA394;
}
.sidebar-archive {
  margin: 0 16px; padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: baseline; justify-content: space-between;
}
.sidebar-archive .t { font-size: 11px; color: #B9CDC2; }
.sidebar-archive .n { font-size: 16px; font-weight: 700; color: var(--brand); }

.nav-groups { padding: 10px 10px 4px; flex: 1; }
.nav-group { margin-bottom: 10px; }
.nav-group-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 4px 8px; font-size: 10px; color: #8FAF9F; letter-spacing: 0.06em;
}
button.nav-group-head {
  width: 100%; background: none; border: 0; cursor: pointer;
  font-family: inherit; text-align: left;
}
button.nav-group-head:hover { color: #CFDED5; }
.nav-group-head .caret { font-size: 9px; color: #6E907F; margin-left: 4px; }
.nav-group.collapsed .nav-item { display: none; }
.nav-group-head .cnt { font-size: 10px; color: #6E907F; }
.nav-item {
  width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; margin: 1px 0;
  background: transparent; border: 1px solid transparent; border-radius: 7px;
  color: #CFDED5; text-align: left; font-size: 12px;
}
.nav-item .code {
  font-family: var(--mono); font-size: 10px; color: #8FAF9F;
  flex: 0 0 auto;
}
.nav-item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .st { flex: 0 0 auto; font-size: 10px; color: #6E907F; }
.nav-item:hover:not(:disabled) { background: rgba(255,255,255,0.06); }
.nav-item.current {
  background: var(--sidebar-soft);
  border-color: rgba(217,236,95,0.35);
  color: #F2F7F2;
}
.nav-item.current .code { color: var(--brand); }
.nav-item.current .arrow { color: var(--brand); }
.nav-item.done .st { color: var(--brand); }
.nav-item:disabled { cursor: not-allowed; opacity: 0.55; }
.nav-item .arrow { font-size: 10px; }

.sidebar-progress { padding: 12px 16px 6px; border-top: 1px solid rgba(255,255,255,0.12); }
.sidebar-progress .t { font-size: 10px; color: #8FAF9F; display: flex; justify-content: space-between; }
.sidebar-progress .t b { color: #F2F7F2; font-weight: 600; }
.prog-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.14); margin-top: 6px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--brand); border-radius: 2px; transition: width 0.3s; }
.sidebar-about { padding: 10px 16px 16px; font-size: 10px; color: #6E907F; line-height: 1.7; }

/* ===== 顶栏 ===== */
.topbar {
  height: 72px; flex: 0 0 72px;
  background: #FBFCFA;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 37px; gap: 12px;
  position: sticky; top: 0; z-index: 20;
}
.topbar-left { font-size: 12px; color: var(--muted); min-width: 0; }
.topbar-left b { color: var(--ink); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.tag-sim {
  font-size: 10px; color: var(--primary);
  background: var(--ok-soft); border: 1px solid #CFE3D6;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}

/* ===== 按钮 ===== */
.btn {
  border-radius: 7px; border: 1px solid transparent;
  padding: 7px 14px; font-size: 12px; line-height: 1.2;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #F4FAF5; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-deep); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: #C3D2C6; background: #FAFCF9; }
.btn-hint { background: var(--layer-soft); color: var(--ink); border-color: #D5E0BC; }
.btn-hint:hover { background: #E0EACD; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 4px 10px; font-size: 11px; }

/* ===== 标题区 ===== */
.hero { display: flex; align-items: stretch; gap: 20px; margin-bottom: 18px; }
.hero-text { flex: 1; min-width: 0; }
.hero-kicker { font-size: 10px; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 6px; }
.hero-title { font-size: 26px; font-weight: 700; margin: 0 0 6px; line-height: 1.3; }
.hero-sub { color: var(--muted); font-size: 12px; margin: 0; }
.hero-progress {
  flex: 0 0 auto; border-left: 1px solid var(--line);
  padding-left: 20px; display: flex; flex-direction: column; justify-content: center; gap: 2px;
  min-width: 130px;
}
.hero-progress .t { font-size: 10px; color: var(--muted); }
.hero-progress .v { font-size: 20px; font-weight: 700; }
.hero-progress .v small { font-size: 12px; color: var(--muted); font-weight: 400; }

/* ===== 学习地图卡片 ===== */
.map-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 12px; }
.map-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; text-align: left; min-width: 0;
}
.map-card:hover { border-color: #C3D2C6; }
.map-card.current { background: var(--layer-soft); border-color: #CFDDA9; }
.map-card .num { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.map-card .nm { font-size: 13px; font-weight: 600; margin: 1px 0; }
.map-card .en { font-size: 9px; letter-spacing: 0.1em; color: var(--muted); }
.map-card .cnt { font-size: 10px; color: var(--primary); margin-top: 4px; }

.flow-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 11px; color: var(--muted); margin-bottom: 26px; flex-wrap: wrap;
}
.flow-row .flow b { color: var(--ink); font-weight: 600; }
.flow-row .flow span.sep { margin: 0 6px; color: #B6C4BA; }

/* ===== 实验标题区 ===== */
.exp-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.exp-code {
  font-family: var(--mono); font-size: 40px; font-weight: 700;
  color: #B9CDBB; line-height: 1; flex: 0 0 auto; padding-top: 4px;
  user-select: none;
}
.exp-head-mid { flex: 1; min-width: 0; }
.exp-kicker { font-size: 10px; letter-spacing: 0.12em; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.exp-kicker .diff {
  background: var(--layer-soft); color: #5C6B3C; border-radius: 999px; padding: 1px 8px;
  letter-spacing: 0;
}
.exp-title { font-size: 19px; font-weight: 700; margin: 3px 0 2px; }
.exp-desc { color: var(--muted); margin: 0; font-size: 12px; }
.exp-status { flex: 0 0 auto; }
.status-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  white-space: nowrap;
}
.status-tag.ok { background: var(--ok-soft); border-color: #CFE3D6; color: var(--primary); }
.status-tag.warn { background: var(--warn-soft); border-color: #EAD9C8; color: var(--warn); }

.beta-note {
  background: var(--warn-soft); border: 1px solid #EAD9C8; color: #8A5233;
  border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; font-size: 12px;
}

/* ===== 工作区两列 ===== */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 282px; gap: 20px; align-items: start; }
.col-main, .col-side { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 9px;
  padding: 16px 18px;
}
.panel-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  margin: 0 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.panel-title .sub { font-weight: 400; font-size: 10px; color: var(--muted); }

/* ===== 实验现场 ===== */
.scene-box {
  border: 1px solid var(--line); border-radius: 8px;
  background:
    radial-gradient(circle, #DCE5DC 1px, transparent 1px) 0 0 / 18px 18px,
    #FCFDFB;
  overflow: hidden;
}
.scene-box svg { display: block; width: 100%; height: auto; }
.http-scene { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; }
.http-panel {
  border: 1px solid var(--line); border-radius: 7px; background: #fff;
  padding: 10px 12px; min-width: 0;
}
.http-panel h4 { margin: 0 0 8px; font-size: 11px; color: var(--muted); font-weight: 600; }
.http-panel pre {
  margin: 0; font-family: var(--mono); font-size: 11px; line-height: 1.7;
  white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink);
}
.http-panel .waiting { color: var(--muted); font-size: 11px; padding: 8px 0; }
.http-panel.resp-ok { border-color: #CFE3D6; }
.http-panel.resp-err { border-color: #EAD9C8; background: #FFFDFA; }
.http-status-line { font-weight: 700; }
.http-status-line.s2xx { color: var(--primary); }
.http-status-line.s4xx { color: var(--warn); }

/* ===== T2 缓冲区场景 ===== */
.buf-scene { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.buf-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bm {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px; min-width: 0;
}
.bm .k { display: block; font-size: 10px; color: var(--muted); }
.bm .v {
  display: block; font-size: 15px; font-weight: 700; color: var(--ink);
  font-family: var(--mono); overflow-wrap: anywhere;
}
.bm-rwnd { background: var(--layer-soft); border-color: #D6E2C4; }
.bm-rwnd .v { color: var(--primary); }
.bm-rwnd .v.zero { color: var(--warn); }
.buf-bar-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px; font-size: 11px; color: var(--ink); margin-bottom: 4px;
}
.buf-denom { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.buf-track {
  position: relative; height: 24px;
  background: #EDF1EA; border: 1px solid var(--line);
  border-radius: 6px; overflow: hidden;
}
.buf-fill { height: 100%; width: 0; transition: width 0.35s ease; }
.buf-fill.buffered { background: var(--brand); }
.buf-fill.delivered { background: var(--primary); }
.buf-rwnd-tag {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.88); border-radius: 10px; padding: 1px 8px;
  font-size: 10px; font-family: var(--mono); color: var(--muted); white-space: nowrap;
}
.buf-rwnd-tag.zero { color: var(--warn); font-weight: 700; }
.buf-flags { display: flex; flex-wrap: wrap; gap: 8px; min-height: 20px; }
.flag {
  font-size: 11px; padding: 3px 10px; border-radius: 12px;
  background: #F2F5F1; border: 1px solid var(--line); color: var(--muted);
}
.flag-probe { background: var(--warn-soft); border-color: #EAD9C8; color: var(--warn); }
.flag-stalled { background: var(--warn-soft); border-color: #E5C9B8; color: var(--warn); font-weight: 600; }

/* ===== N2 路由场景 ===== */
.rt-scene { padding: 14px 16px; display: flex; flex-direction: column; gap: 11px; }
.rt-dest { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rt-dest-k { color: var(--muted); font-size: 11px; }
.rt-dest-ip { font-family: var(--mono); font-size: 16px; color: var(--ink); }
.rt-dest-num { color: var(--muted); font-size: 10px; font-family: var(--mono); overflow-wrap: anywhere; }
.rt-table {
  width: 100%; border-collapse: collapse; font-size: 11.5px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
}
.rt-table th {
  text-align: left; font-size: 10px; color: var(--muted); font-weight: 600;
  padding: 6px 8px; background: #F7FAF6; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.rt-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); color: var(--ink); overflow-wrap: normal; }
.rt-table td.mono, .rt-table td.eg { font-family: var(--mono); white-space: nowrap; }
.rt-table tbody tr:last-child td { border-bottom: none; }
.rt-table td.yes { color: var(--primary); font-weight: 600; }
.rt-table td.no { color: var(--muted); }
.rt-table td.eg { font-weight: 700; }
.rt-table td.sel { color: var(--primary); font-weight: 700; }
.rt-table tr.matched { background: #FAFCF7; }
.rt-table tr.selected { background: var(--layer-soft); }
.rt-egress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.egress {
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
  padding: 8px 10px; min-width: 0; display: flex; flex-direction: column; gap: 3px;
}
.eg-name { font-size: 12px; font-weight: 700; color: var(--ink); }
.eg-cover { font-size: 10px; color: var(--muted); font-family: var(--mono); overflow-wrap: anywhere; }
.eg-mark { font-size: 10.5px; color: var(--muted); min-height: 14px; }
.egress.sel { border-color: var(--primary); background: var(--layer-soft); }
.egress.ok { border-color: #BFDCC9; }
.egress.ok .eg-mark { color: var(--primary); font-weight: 700; }
.egress.bad { border-color: #EAD9C8; background: var(--warn-soft); }
.egress.bad .eg-mark { color: var(--warn); font-weight: 700; }
.rt-result {
  font-size: 11.5px; color: var(--ink); background: #F7FAF6;
  border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; min-height: 32px;
}
.rt-result.ok { background: var(--ok-soft); border-color: #CFE3D6; color: var(--primary-deep); font-weight: 600; }
.rt-result.bad { background: var(--warn-soft); border-color: #EAD9C8; color: var(--warn); font-weight: 600; }

/* ===== A3 HTTP 缓存场景 ===== */
.hc-scene { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.hc-top { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hc-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; min-width: 0;
}
.hc-title { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.hc-kv { font-size: 12px; color: var(--ink); margin-bottom: 8px; overflow-wrap: anywhere; }
.hc-track {
  position: relative; height: 14px; background: #EDF1EA;
  border: 1px solid var(--line); border-radius: 5px; overflow: hidden;
}
.hc-agefill { height: 100%; width: 0; background: var(--primary); transition: width 0.35s ease; }
.hc-agefill.stale { background: var(--warn); }
.hc-agelabel { font-size: 10.5px; color: var(--muted); margin-top: 5px; font-family: var(--mono); }
.hc-pre {
  margin: 0; font-family: var(--mono); font-size: 10.5px; line-height: 1.6;
  white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); min-height: 60px;
}
.hc-bars { display: flex; flex-direction: column; gap: 8px; }
.hc-bargroup { display: grid; grid-template-columns: 110px minmax(0, 1fr) 140px; align-items: center; gap: 8px; }
.hc-bl { font-size: 11px; color: var(--ink); }
.hc-fill { height: 100%; width: 0; transition: width 0.35s ease; }
.hc-fill.net { background: var(--warn); }
.hc-fill.eff { background: var(--primary); }
.hc-bv { font-size: 10.5px; color: var(--muted); overflow-wrap: anywhere; }
.hc-status {
  font-size: 11.5px; color: var(--ink); background: #F7FAF6;
  border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px;
}
.hc-status.ok { background: var(--ok-soft); border-color: #CFE3D6; color: var(--primary-deep); font-weight: 600; }

/* ===== 控制台快速预设 ===== */
.preset-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 2px 0 8px; }
.preset-label { font-size: 10.5px; color: var(--muted); }

@media (max-width: 900px) {
  .buf-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-egress { grid-template-columns: 1fr; }
  .hc-top { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .buf-scene, .rt-scene, .hc-scene { padding: 11px 11px; gap: 9px; }
  .hc-bargroup { grid-template-columns: 84px minmax(0, 1fr) 96px; }
  .hc-bv { font-size: 9.5px; }
  .rt-table { font-size: 10px; }
  .rt-table th, .rt-table td { padding: 5px 5px; }
  .rt-table th { white-space: normal; }
  .rt-table td { overflow-wrap: anywhere; }
  .rt-table td.mono, .rt-table td.eg { white-space: normal; }
  .bm .v { font-size: 13px; }
}

.scene-summary {
  margin-top: 10px; padding: 8px 12px;
  background: #F7FAF6; border: 1px solid var(--line); border-radius: 7px;
  font-size: 11px; color: var(--ink); min-height: 34px;
}
.scene-summary .eid { font-family: var(--mono); color: var(--primary); margin-right: 6px; }
.scene-summary.empty { color: var(--muted); }

.player-bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.speed-group { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; margin-left: auto; }
.speed-group button {
  border: none; background: #fff; padding: 5px 10px; font-size: 11px; color: var(--muted);
  border-left: 1px solid var(--line);
}
.speed-group button:first-child { border-left: none; }
.speed-group button.on { background: var(--layer-soft); color: var(--ink); font-weight: 600; }

/* ===== 控制台 ===== */
.console-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.console-fields.single { grid-template-columns: 1fr; }
.field label { display: block; font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.field .unit { font-weight: 400; color: var(--muted); font-size: 10px; margin-left: 4px; }
.field input[type="text"], .field select {
  width: 100%; padding: 7px 10px; font-size: 12px;
  border: 1px solid #CFDAD0; border-radius: 7px; background: #fff; color: var(--ink);
  font-family: inherit; min-width: 0;
}
.field input.mono, .field select.mono { font-family: var(--mono); }
.field .explain { font-size: 10px; color: var(--muted); margin-top: 3px; }
.field .err {
  display: none; font-size: 10px; color: var(--warn); margin-top: 3px;
  background: var(--warn-soft); border-radius: 5px; padding: 3px 7px;
}
.field.has-error input, .field.has-error select { border-color: var(--warn); }
.field.has-error .err { display: block; }
.console-bottom {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  margin-top: 14px; flex-wrap: wrap;
}
.judgment { flex: 1; min-width: 200px; }
.judgment label { display: block; font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.judgment select {
  width: 100%; padding: 7px 10px; font-size: 12px;
  border: 1px solid #CFDAD0; border-radius: 7px; background: #fff; color: var(--ink);
}
.config-error-box {
  display: none; margin-top: 12px; padding: 9px 12px;
  background: var(--warn-soft); border: 1px solid #EAD9C8; border-radius: 7px;
  color: #8A5233; font-size: 11px;
}
.config-error-box.show { display: block; }

.dirty-banner {
  display: none; align-items: center; gap: 6px;
  margin-bottom: 10px; padding: 7px 12px; font-size: 11px;
  background: var(--warn-soft); border: 1px solid #EAD9C8; border-radius: 7px; color: #8A5233;
}
.dirty-banner.show { display: flex; }

/* ===== 事件时间线 ===== */
.timeline-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 7px; }
.timeline-empty { padding: 14px; color: var(--muted); font-size: 11px; text-align: center; }
.ev-row { width: 100%; border: none; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.ev-row:last-child { border-bottom: none; }
.ev-row-main {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-left: 3px solid transparent; width: 100%; background: none; border-top: none; border-right: none; border-bottom: none;
  cursor: pointer; font-size: 11px; color: var(--ink); font-family: inherit; text-align: left;
}
.ev-row.selected { background: #F2F8F1; }
.ev-row.selected .ev-row-main { border-left-color: var(--primary); }
.ev-row.status-error { background: #FDF7F0; }
.ev-row.status-error.selected { background: #FAF0E6; }
.ev-row.status-error .ev-row-main { border-left-color: transparent; }
.ev-row.status-error.selected .ev-row-main { border-left-color: var(--warn); }
.ev-id { font-family: var(--mono); font-size: 10px; color: var(--muted); flex: 0 0 30px; }
.ev-time { font-family: var(--mono); font-size: 10px; color: var(--muted); flex: 0 0 62px; text-align: right; }
.ev-proto {
  flex: 0 0 auto; font-size: 9px; font-family: var(--mono);
  background: var(--layer-soft); color: #5C6B3C; border-radius: 4px; padding: 1px 6px;
}
.ev-sum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-st { flex: 0 0 auto; font-size: 10px; display: inline-flex; gap: 3px; align-items: center; }
.ev-st.ok { color: var(--primary); }
.ev-st.warn { color: #A8863C; }
.ev-st.error { color: var(--warn); }
.ev-detail { display: none; padding: 8px 12px 10px 46px; font-size: 11px; color: var(--muted); border-top: 1px dashed var(--line); }
.ev-row.expanded .ev-detail { display: block; }
.ev-detail .ev-proof { margin-top: 4px; font-family: var(--mono); font-size: 10px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }

.metrics-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.metric {
  border: 1px solid var(--line); border-radius: 7px; padding: 8px 12px; background: #FBFCFA;
  min-width: 0;
}
.metric .k { font-size: 10px; color: var(--muted); }
.metric .v { font-size: 15px; font-weight: 700; font-family: var(--mono); margin-top: 1px; overflow-wrap: anywhere; }
.metric .v.text { font-family: var(--sans); font-size: 12px; font-weight: 600; }
.metrics-note { font-size: 10px; color: var(--muted); margin-top: 8px; }

/* ===== 迁移练习 ===== */
.migration-panel { display: none; border-color: #CFDDA9; background: #FCFDF8; }
.migration-panel.show { display: block; }
.mig-q { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.mig-options { display: flex; flex-direction: column; gap: 8px; }
.mig-opt {
  border: 1px solid var(--line); background: #fff; border-radius: 7px;
  padding: 8px 12px; font-size: 12px; text-align: left; color: var(--ink);
}
.mig-opt:hover:not(:disabled) { border-color: var(--primary); }
.mig-opt.correct { border-color: var(--primary); background: var(--ok-soft); }
.mig-opt.wrong { border-color: var(--warn); background: var(--warn-soft); }
.mig-feedback { margin-top: 10px; font-size: 11px; min-height: 16px; }
.mig-feedback.ok { color: var(--primary); }
.mig-feedback.bad { color: var(--warn); }

/* ===== 助教 / 手记 / 边界 ===== */
.ta-head { display: flex; align-items: center; gap: 8px; }
.ta-star {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: 8px;
  background: var(--layer-soft); display: flex; align-items: center; justify-content: center;
}
.ta-star svg { display: block; }
.ta-name { font-size: 12px; font-weight: 700; }
.ta-sub { font-size: 9px; color: var(--muted); }
.ta-welcome { color: var(--muted); font-size: 11px; margin: 10px 0; }
.ta-task {
  background: var(--layer-soft); border-radius: 7px; padding: 8px 10px;
  font-size: 11px; margin-bottom: 10px;
}
.ta-task .t { font-weight: 700; font-size: 10px; letter-spacing: 0.05em; margin-bottom: 2px; }
.ta-checks { list-style: none; margin: 0 0 12px; padding: 0; }
.ta-checks li { font-size: 11px; color: var(--ink); padding: 3px 0 3px 20px; position: relative; }
.ta-checks li::before {
  content: ""; position: absolute; left: 4px; top: 9px;
  width: 8px; height: 8px; border: 1px solid #A9BCA9; border-radius: 2px; background: #fff;
}
.ta-hint-count { font-size: 10px; color: var(--muted); margin-bottom: 6px; }
.ta-hints { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ta-hints li {
  background: #FBFCF6; border: 1px solid #E4EAD4; border-radius: 7px;
  padding: 7px 10px; font-size: 11px;
}
.ta-hints li .no { font-family: var(--mono); font-size: 10px; color: var(--primary); margin-right: 6px; }
.ta-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.ta-analysis {
  margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px;
  font-size: 11px; display: none;
}
.ta-analysis.show { display: block; }
.ta-analysis .txt { color: var(--ink); }
.evi-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.evi-chip {
  font-family: var(--mono); font-size: 10px; padding: 2px 8px;
  background: var(--ok-soft); color: var(--primary); border: 1px solid #CFE3D6; border-radius: 999px;
}
.evi-chip:hover { background: #DFEEE3; }

.notes-panel .nq { font-size: 12px; font-style: normal; color: var(--ink); margin: 0 0 8px; }
.notes-panel hr { border: none; border-top: 1px solid var(--line); margin: 10px 0; }
.notes-panel .nt { font-size: 10px; color: var(--muted); }

.boundary-panel p { font-size: 11px; color: var(--muted); margin: 0; }

/* ===== 页脚 ===== */
.footer {
  border-top: 1px solid var(--line);
  padding: 16px 37px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 10px; color: var(--muted); background: #FBFCFA;
}
.footer .fb { font-weight: 700; color: var(--ink); font-size: 11px; }
.footer .spacer { flex: 1; }

/* ===== 对话框 ===== */
dialog {
  border: 1px solid var(--line); border-radius: 10px; padding: 0;
  max-width: 560px; width: calc(100% - 40px); color: var(--ink);
  box-shadow: 0 8px 30px rgba(24,60,52,0.12);
}
dialog::backdrop { background: rgba(24,60,52,0.35); }
.dlg-body { padding: 20px 22px; }
.dlg-body h2 { font-size: 15px; margin: 0 0 10px; }
.dlg-body p, .dlg-body li { font-size: 12px; color: var(--ink); }
.dlg-body ul { margin: 8px 0; padding-left: 18px; }
.dlg-close { margin-top: 14px; display: flex; justify-content: flex-end; }

/* ===== 移动端顶栏 ===== */
.mobile-bar {
  display: none; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--sidebar); color: #F2F7F2;
  position: sticky; top: 0; z-index: 30;
}
.mobile-bar .brand-mark { width: 28px; height: 28px; flex: 0 0 28px; font-size: 12px; border-radius: 7px; }
.mobile-bar .brand-name { font-size: 13px; }
.mobile-bar select {
  margin-left: auto; max-width: 55vw; padding: 6px 8px; border-radius: 7px;
  border: 1px solid #2E5C4F; background: var(--sidebar-soft); color: #F2F7F2; font-size: 12px;
  font-family: inherit; min-width: 0;
}

/* ===== 响应式 ===== */
@media (max-width: 1180px) {
  .sidebar { width: 190px; flex-basis: 190px; }
  .content { padding: 28px 24px 20px; }
  .topbar { padding: 0 24px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .col-side { flex-direction: row; flex-wrap: wrap; }
  .col-side .panel { flex: 1 1 260px; }
}
@media (max-width: 900px) {
  .map-cards { grid-template-columns: repeat(3, 1fr); }
  .hero { flex-direction: column; gap: 10px; }
  .hero-progress { border-left: none; border-top: 1px solid var(--line); padding: 8px 0 0; }
}
@media (max-width: 650px) {
  .sidebar { display: none; }
  .mobile-bar { display: flex; }
  .topbar { height: auto; flex-basis: auto; padding: 10px 14px; flex-wrap: wrap; position: static; }
  .content { padding: 16px 14px; }
  .hero-title { font-size: 21px; }
  .map-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .map-card { padding: 6px 4px; }
  .map-card .en { display: none; }
  .map-card .nm { font-size: 10px; }
  .map-card .cnt { font-size: 8px; }
  .exp-code { font-size: 28px; }
  .exp-title { font-size: 16px; }
  .console-fields { grid-template-columns: 1fr; }
  .http-scene { grid-template-columns: 1fr; }
  .metrics-strip { grid-template-columns: 1fr; }
  .col-side { flex-direction: column; }
  .flow-row .en-hide { display: none; }
  .footer { padding: 14px; }
  .hero-kicker .en-hide { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
