:root {
  /* —— INTERACTION ATLAS 编辑年鉴色板 ——
     奶油底 + 墨黑 + 单一荧光黄绿强调 + 选择蓝 */
  --ink-950: #0A0A0A;
  --ink-900: #131313;
  --ink-800: #1E1E1E;
  --ink-700: #2C2C2C;
  --gray-700: #5A5A5A;
  --gray-500: #8A8A8A;
  --gray-300: #CFCFCB;
  --gray-200: #E5E5E1;
  --gray-100: #EFEFEA;
  --paper: #F7F5F0;
  --white: #FFFFFF;

  /* Atlas 强调与状态色（原 --data-* 语义位重映射） */
  --accent: #D4F542;          /* 荧光黄绿：唯一强调色 */
  --accent-soft: #EAFBB0;
  --focus-blue: #3B82F6;      /* 选择 / 编辑态蓝 */
  --data-teal: #0A0A0A;       /* 品牌标记 / 激活态 → 墨黑 */
  --data-cyan: #3B82F6;
  --data-blue: #2D84EE;
  --data-mint: #00B074;       /* 成功绿（可读） */
  --data-purple: #8A8A8A;
  --data-coral: #FF4B4B;

  --ok: #00B074;
  --info: #2D84EE;
  --err: #FF4B4B;

  --ink: var(--ink-950);
  --muted: var(--gray-700);
  --line: rgba(10, 10, 10, 0.12);
  --line-strong: rgba(10, 10, 10, 0.18);
  --line-on-dark: rgba(255, 255, 255, 0.14);
  --surface: var(--white);
  --surface-2: var(--gray-100);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-float: 0 1px 2px rgba(10, 10, 10, 0.06), 0 12px 32px rgba(10, 10, 10, 0.07);
  --font-sans: "Noto Sans SC", "DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "DM Sans", "Noto Sans SC", "Inter", sans-serif;
  --font-num: "DM Sans", "Inter", sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --nav-w: 220px;
  --content-max: 1380px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink-950);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(17, 17, 17, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
}

button, input, textarea, select { font: inherit; }
h1, h2, h3, h4, p { margin: 0; }

a { color: inherit; }

.app-frame {
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  min-height: 100vh;
  justify-items: stretch;
}

.app-frame > .workspace {
  min-width: 0;
}

/* —— Side nav as workflow rail —— */
.side-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 16px;
  background: var(--white);
  border-right: 1px solid var(--line);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  place-items: center;
  border-radius: 12px;
  background: var(--ink-900);
  color: #fff;
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.04em;
}

.brand-mark i {
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--data-teal);
}

.brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand small {
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav-dataset {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--gray-100);
  border: 1px solid var(--line);
}

.nav-dataset small {
  display: block;
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 700;
}

.nav-dataset strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-300);
  flex-shrink: 0;
}

.status-dot.live {
  background: var(--data-teal);
  box-shadow: 0 0 0 3px rgba(0, 139, 130, 0.18);
}

.status-dot.pulse {
  animation: breathe 2.2s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.92); }
}

.workflow-nav {
  position: relative;
  display: grid;
  gap: 4px;
  flex: 1;
  overflow: auto;
}

.workflow-rail {
  position: absolute;
  left: 21px;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: var(--gray-200);
  z-index: 0;
}

.workflow-nav a {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 18px 28px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 10px 0 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--gray-700);
  font-weight: 700;
  font-size: 15px;
}

.workflow-nav a .step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-300);
  background: var(--white);
  justify-self: center;
}

.workflow-nav a.done .step-dot {
  background: var(--ink-900);
  border-color: var(--ink-900);
}

.workflow-nav a.active {
  background: var(--gray-100);
  color: var(--ink-950);
}

.workflow-nav a.active .step-dot {
  background: var(--data-teal);
  border-color: var(--data-teal);
  box-shadow: 0 0 0 3px rgba(0, 139, 130, 0.2);
}

.workflow-nav .step-no {
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-500);
  letter-spacing: 0.02em;
}

.workflow-nav a.active .step-no { color: var(--ink-950); }

.nav-case {
  margin-top: auto;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--ink-900);
  color: #fff;
}

.nav-case-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.nav-case strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 10px;
}

.workflow-progress {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  margin-bottom: 8px;
}

.workflow-progress-bar {
  height: 100%;
  background: var(--data-teal);
  border-radius: inherit;
  transition: width 0.4s ease;
}

.nav-case p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  font-weight: 600;
}

.btn-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink-950);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

/* —— Workspace —— */
.workspace {
  display: grid;
  gap: 22px;
  padding: 16px 24px 48px;
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  justify-self: stretch;
  min-width: 0;
  overflow-x: clip;
}

.workspace > * {
  min-width: 0;
  max-width: 100%;
}

.top-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-num);
}

.top-meta strong { color: var(--ink-950); }
.meta-sep { opacity: 0.4; }

.ghost-link, .nav-toggle {
  border: none;
  background: transparent;
  color: var(--gray-700);
  font-weight: 800;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}

.ghost-link:hover, .nav-toggle:hover { background: var(--gray-100); }
.nav-toggle { display: none; }

.avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink-900);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

/* —— Hero —— */
.hero-studio {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 20px;
  align-items: stretch;
  min-height: 280px;
  padding: 26px 28px 32px;
  border-radius: 22px;
  background: var(--ink-900);
  color: #fff;
  overflow: hidden;
}

.hero-tag {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hero-studio h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  max-width: 11em;
}

.hero-en {
  margin-top: 10px;
  color: var(--data-mint);
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.hero-studio .lead {
  margin-top: 14px;
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.65;
}

.command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.btn, .file-button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  font-weight: 800;
  font-size: 15px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover, .file-button:hover, button:hover { transform: translateY(-1px); }
.btn:disabled, button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-light, .file-button {
  background: #fff;
  color: var(--ink-950);
  border-color: #fff;
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-accent {
  background: var(--data-teal);
  color: #fff;
  border-color: var(--data-teal);
}

.btn-dark {
  background: var(--ink-900);
  color: #fff;
}

.btn-ghost-dark {
  width: 100%;
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink-950);
}

#csvFile { display: none; }

.hero-device {
  position: relative;
  min-height: 260px;
  height: 100%;
  border-radius: 20px;
  border: 1px solid var(--line-on-dark);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.device-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.7;
}

.device-chart {
  position: absolute;
  inset: 28px 16px 70px;
  width: calc(100% - 32px);
  height: calc(100% - 98px);
}

.device-area { fill: rgba(0, 139, 130, 0.22); }
.device-line { stroke: var(--data-cyan); stroke-width: 2.5; }
.device-dot { fill: var(--data-mint); }
.device-dot.pulse { animation: breathe 2s ease-in-out infinite; }

.device-tags {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.device-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-on-dark);
  background: rgba(0, 0, 0, 0.25);
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.device-flow {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
}

.device-flow i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
}

.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 28px;
  background:
    radial-gradient(120% 100% at 50% -20%, transparent 60%, var(--paper) 61%);
  pointer-events: none;
}

/* —— Sections —— */
.section-block {
  position: relative;
  padding: 8px 0 4px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.section-block.surface-soft {
  padding: 22px 22px 26px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line);
}

.section-block.section-dark {
  padding: 24px 24px 28px;
  border-radius: var(--radius-lg);
  background: var(--ink-900);
  color: #fff;
}

.section-head {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
  min-width: 0;
  max-width: 100%;
}

.section-head > div {
  min-width: 0;
  flex: 1 1 auto;
}

.section-head .pill {
  flex: 0 1 auto;
  max-width: min(240px, 36vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-head.compact { margin-bottom: 14px; }
.section-head.on-dark { color: #fff; }

.section-no {
  font-family: var(--font-num);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.9;
  color: var(--ink-950);
  opacity: 0.12;
}

.section-no.soft { font-size: 14px; opacity: 0.45; letter-spacing: 0.12em; }
.section-dark .section-no { color: #fff; opacity: 0.18; }

.eyebrow {
  margin: 0 0 6px;
  color: var(--gray-500);
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-dark .eyebrow { color: rgba(255, 255, 255, 0.5); }

.section-head h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.section-dark .section-note { color: rgba(255, 255, 255, 0.55); }

.pill {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--gray-100);
  color: var(--ink-950);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.soft { background: var(--white); color: var(--gray-700); }
.pill.on-dark {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-on-dark);
  color: #fff;
}

/* —— Overview bento —— */
.bento-overview {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  align-items: stretch;
  min-width: 0;
}

.bento-hero-card,
.bento-side,
.metric-tile {
  min-width: 0;
}

.bento-hero-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
}

.bento-hero-card h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bento-hero-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.chip-label, .chip-time {
  font-size: 13px;
  font-weight: 800;
  color: var(--gray-500);
}

.chip-label {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--ink-950);
}

.bento-hero-card > p {
  color: var(--muted);
  font-size: 15.5px;
  max-width: 100%;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}

.mega-metric {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 56px;
  margin: 8px 0 18px;
  margin-top: auto;
  width: fit-content;
  max-width: 100%;
  padding-left: 36px;
}

.mega-scale {
  flex: 0 0 auto;
  min-width: 0;
}

.mega-label {
  display: block;
  color: var(--gray-500);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
}

.mega-number {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-num);
  font-size: clamp(68px, 7vw, 92px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.mega-number small {
  margin-left: 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-500);
  letter-spacing: 0;
}

.mega-rings {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 0 0 auto;
  margin-left: 12px;
}

.mega-health {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.health-ring {
  position: relative;
  width: 104px;
  height: 104px;
}

.health-ring svg {
  width: 104px;
  height: 104px;
  display: block;
}

.ring-bg {
  fill: none;
  stroke: var(--gray-200);
  stroke-width: 8;
}

.ring-fg {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.6s ease;
}

.ring-fg.ring-teal { stroke: var(--data-teal); }
.ring-fg.ring-cyan { stroke: var(--data-cyan); }
.ring-fg.ring-blue { stroke: var(--data-blue); }

.ring-label {
  fill: var(--ink-950);
  font-family: var(--font-num), "DM Sans", sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.mega-health-label {
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  padding-left: 36px;
}

.case-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--gray-100);
  font-size: 13px;
  font-weight: 800;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bento-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  min-width: 0;
  height: 100%;
  align-self: stretch;
}

.metric-tile {
  padding: 18px 16px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--white);
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

.metric-tile.tile-a { background: linear-gradient(180deg, #fff, #f3f3f1); }
.metric-tile.tile-b { background: var(--ink-900); color: #fff; border-color: transparent; }
.metric-tile.tile-b small,
.metric-tile.tile-b .tile-unit { color: rgba(255, 255, 255, 0.55); }
.metric-tile.tile-c { border-top: 3px solid var(--data-coral); }
.metric-tile.tile-d { border-left: 3px solid var(--data-blue); }

.metric-tile small {
  color: var(--gray-500);
  font-size: 15px;
  font-weight: 800;
}

.metric-tile strong {
  font-family: var(--font-num);
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  word-break: break-word;
}

.tile-unit {
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-num);
  letter-spacing: 0.04em;
}

.pipeline-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  overflow-x: auto;
}

.pipe-step {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 800;
}

.pipe-step span {
  font-family: var(--font-num);
  font-size: 11px;
  color: var(--gray-500);
}

.pipe-step.active {
  color: var(--ink-950);
}

.pipe-step.active span { color: var(--data-teal); }
.pipe-step.done { color: var(--ink-800); }

.pipeline-strip > i {
  flex: 0 0 24px;
  height: 1px;
  background: var(--gray-200);
}

/* —— Insights ribbon —— */
#insights .section-head {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
}

#insights .section-head > div {
  flex: 0 1 auto;
}

#insights .section-head .eyebrow {
  margin-bottom: 4px;
}

#insights .section-head h2 {
  font-size: 30px;
}

.insight-ribbon {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.9fr);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--white);
  overflow: hidden;
  min-width: 0;
}

.insight-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px 22px;
  min-height: 260px;
  min-width: 0;
  border-right: 1px solid var(--line);
  overflow: hidden;
  text-align: center;
}

.insight-pane:last-child { border-right: none; }

.pane-metric {
  background: var(--ink-900);
  color: #fff;
}

.pane-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0;
  font-size: 16px;
  font-weight: 800;
}

.pane-label span {
  font-family: var(--font-num);
  font-size: 14px;
  color: var(--gray-500);
}

.pane-metric .pane-label span { color: rgba(255, 255, 255, 0.45); }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  gap: 10px;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.chip-row .chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--gray-100);
  border: 1px solid var(--line);
  font-size: 15px;
  font-weight: 800;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-row .chip.rank {
  background: rgba(0, 139, 130, 0.1);
  border-color: rgba(0, 139, 130, 0.25);
  color: var(--data-teal);
}

.pane-loc .chip-row {
  gap: 12px;
}

.pane-loc .chip {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-size: 15px;
  padding: 12px 14px;
}

.pane-loc .chip em {
  font-style: normal;
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 700;
}

.metric-means {
  display: grid;
  gap: 14px;
  min-width: 0;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.metric-means div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 16px;
  font-weight: 700;
  min-width: 0;
}

.metric-means div span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  opacity: 0.85;
}

.metric-means strong {
  font-family: var(--font-num);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.empty-frame {
  align-content: center;
  justify-content: center;
}

.empty-hint {
  color: var(--gray-500);
  font-size: 15px;
  font-weight: 700;
  width: 100%;
  text-align: center;
}

.pane-metric .empty-hint { color: rgba(255, 255, 255, 0.45); }

/* —— Pipe bridge —— */
.pipe-bridge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 4px 8px;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gray-500);
}

.pipe-bridge i {
  width: 36px;
  height: 1px;
  background: var(--gray-300);
}

/* —— Collect —— */
.collect-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: 16px;
  align-items: stretch;
  min-width: 0;
}

.collect-entries {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  align-self: stretch;
  height: 100%;
}

.collect-grid > *,
.entry-card {
  min-width: 0;
  overflow: hidden;
}

.entry-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--white);
}

.entry-card.entry-alt {
  background: #fbfbf9;
  border-style: dashed;
}

.entry-card textarea {
  min-height: 96px;
  resize: vertical;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  padding: 10px 12px;
}

.entry-card > .btn {
  margin-top: auto;
}

.entry-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.entry-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--ink-900);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.entry-badge.mint { background: var(--data-teal); }

.entry-card h3 { font-size: 18px; font-weight: 900; }
.entry-card > p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.entry-meta {
  margin: 0 0 14px;
  padding-left: 16px;
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 600;
}

.field-label {
  display: block;
  margin: 0 0 6px;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 800;
}

input, select, textarea {
  width: 100%;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink-950);
  margin-bottom: 10px;
}

input, select {
  min-height: 44px;
  padding: 0 12px;
}

input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(0, 139, 130, 0.15);
  border-color: var(--data-teal);
}

.collect-console {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--ink-900);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.console-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  flex-shrink: 0;
}

.terminal-log {
  margin: 0;
  flex: 1 1 0;
  min-height: 220px;
  max-height: none;
  max-width: 100%;
  overflow: auto;
  padding: 12px;
  border-radius: 10px;
  background: #0d0d0d;
  border: 1px solid var(--line-on-dark);
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.collect-console > .btn {
  flex-shrink: 0;
  margin-top: 0;
}

.collect-console > .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* —— Ingest —— */
.ingest-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.75fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.ingest-main {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line);
  min-width: 0;
  overflow: hidden;
}

.drop-zone {
  position: relative;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-md);
  background: var(--paper);
  min-height: 240px;
  max-width: 100%;
  padding: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.table-wrap {
  overflow: auto;
  max-height: 320px;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.ingest-table-wrap table {
  width: max-content;
  max-width: none;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.ingest-table-wrap th,
.ingest-table-wrap td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ingest-table-wrap th {
  position: sticky;
  top: 0;
  background: var(--gray-100);
  font-weight: 800;
  z-index: 1;
}

.drop-zone.dragover {
  border-color: var(--data-teal);
  box-shadow: inset 0 0 0 2px rgba(0, 139, 130, 0.12);
}

.drop-hint {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px;
  color: var(--gray-500);
  text-align: center;
  min-height: 200px;
}

.drop-zone.is-empty .drop-hint { display: flex; }
.drop-zone.is-empty .ingest-table-wrap { display: none; }

.hint-line {
  margin-top: 10px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 600;
}

.quality-rail {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line);
  min-width: 0;
  max-height: 480px;
  overflow: auto;
}

.quality-rail h3 {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.quality-list {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.role-grid {
  display: grid;
  gap: 8px;
  align-content: start;
}

.quality-list li {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--gray-100);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  position: relative;
  padding-left: 28px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.quality-list li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--data-coral);
}

.subhead {
  margin: 8px 0 10px;
  font-size: 13px;
  font-weight: 900;
  flex-shrink: 0;
}

.csv-source {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.role-grid div {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  min-width: 0;
  overflow: hidden;
}

.role-grid strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* —— Recommend / Report —— */
.recommend-report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.recommend-col,
.report-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.recommend-col .method-buttons {
  max-height: 220px;
  overflow: auto;
}

.recommend-col .method-detail {
  max-height: 360px;
  min-height: 180px;
  overflow: auto;
}

.report-col .report-paper {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.report-col .skill-report-box {
  min-height: 180px;
  max-height: 320px;
}

.col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.col-head h3 { font-size: 18px; font-weight: 900; }

.method-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.method-buttons .method-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-on-dark);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  text-align: left;
}

.method-buttons .method-tab:hover,
.method-buttons .method-tab.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(140, 209, 178, 0.45);
}

.method-tab-name {
  font-weight: 800;
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.method-grade {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 900;
}

.method-grade.grade-A { background: rgba(0, 139, 130, 0.35); color: var(--data-mint); }
.method-grade.grade-B { background: rgba(255, 255, 255, 0.12); }
.method-grade.grade-C { background: rgba(255, 255, 255, 0.08); color: rgba(255,255,255,0.7); }
.method-grade.large { padding: 4px 10px; min-width: auto; height: auto; }

.method-detail {
  border-radius: var(--radius-md);
  border: 1px solid var(--line-on-dark);
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.method-detail.empty-state {
  padding: 24px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 700;
}

.method-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.method-hero-copy h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin: 8px 0 6px;
}

.method-hero-copy p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 600;
}

.apply-btn {
  flex-shrink: 0;
  background: var(--data-teal) !important;
  color: #fff !important;
  border: none !important;
}

.method-grid-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
}

.method-info-card {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-on-dark);
}

.method-info-card small {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.method-info-card strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.method-steps-wrap { padding: 0 14px 16px; }
.method-steps-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.method-steps-head h4 { font-size: 13px; }
.method-steps-head span { color: rgba(255,255,255,0.45); font-size: 12px; }

.method-steps-table { overflow: auto; max-height: 220px; max-width: 100%; }
.method-steps-table table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 12.5px; }
.method-steps-table th, .method-steps-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line-on-dark);
  text-align: left;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.method-steps-table .step-no span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--data-teal);
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 800;
}

.report-paper {
  padding: 22px;
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink-950);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-float);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.report-paper-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.report-paper-head h3 { font-size: 18px; font-weight: 900; }
.report-paper-head small { color: var(--gray-500); font-weight: 700; }

.skill-report-box {
  margin-top: 14px;
  min-height: 180px;
  max-height: 320px;
  max-width: 100%;
  overflow: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  line-height: 1.7;
}

.skill-report-box.empty-state {
  color: var(--gray-500);
  font-weight: 700;
}

.skill-report-box h3 { margin: 0 0 8px; font-size: 16px; }
.skill-report-box .finding-item {
  margin: 10px 0;
  padding: 12px;
  border-radius: 10px;
  background: var(--gray-100);
  border-left: 3px solid var(--data-teal);
}
.skill-report-box .finding-item small {
  display: block;
  margin-top: 6px;
  color: var(--gray-500);
}

/* —— Visualization —— */
.visual-lab {
  --viz-ink: #3d3539;
  --viz-accent: #0f9ea8;
  --viz-teal: #008b82;
  --viz-blue: #45728f;
  --viz-mint: #8cd1b2;
  --viz-purple: #8b84a3;
  --viz-coral: #d67967;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line);
}

.viz-studio {
  display: grid;
  grid-template-columns: minmax(0, 0.35fr) minmax(0, 0.65fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.viz-controls,
.viz-stage {
  min-width: 0;
  max-width: 100%;
}

.viz-controls {
  display: block;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--paper);
  max-height: 720px;
  overflow: auto;
}

.viz-builder {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.viz-builder .col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.viz-builder .col-head h3 {
  margin: 0;
  font-size: 15px;
}

.viz-builder select,
.viz-builder input[type="number"] {
  width: 100%;
  margin-bottom: 10px;
}

.viz-builder-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 10px;
}

.viz-builder-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 4px 0 8px;
}

.viz-builder-actions .btn {
  width: 100%;
  min-height: 38px;
  font-size: 12px;
  padding: 8px 6px;
}

.viz-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.chart-type-meta {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--viz-ink), var(--viz-teal) 75%, var(--viz-accent));
  color: #fff;
}

.chart-type-meta strong { display: block; font-size: 18px; margin-bottom: 4px; }
.chart-type-meta span { display: block; opacity: 0.75; font-size: 11px; font-weight: 800; margin-bottom: 6px; }
.chart-type-meta p { margin: 0; font-size: 12px; line-height: 1.45; font-weight: 600; }

.palette-presets {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.palette-presets button {
  width: 100%;
  min-height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 2px solid transparent;
}

.palette-presets button.active {
  border-color: var(--ink-950);
  box-shadow: 0 0 0 1px #fff inset;
}

.viz-color-row, .viz-mark-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.viz-color-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--gray-500);
}

.viz-color-row input[type="color"] {
  width: 32px;
  height: 28px;
  padding: 2px;
  margin: 0;
}

.viz-mark-row select { flex: 1; margin: 0; }
.viz-mark-row button { width: auto; min-height: 44px; margin: 0; background: #fff; border: 1.5px solid var(--line-strong); }
.selected-el-panel { margin-bottom: 8px; }

.chart-family {
  margin: 10px 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  text-transform: uppercase;
}

.chart-thumb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.chart-thumb {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 78px;
  padding: 8px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
}

.chart-thumb svg {
  width: 100%;
  height: 36px;
  border-radius: 6px;
  background: #f7faf9;
  border: 1px solid var(--line);
}

.chart-thumb.active {
  border-color: var(--viz-teal);
  background: rgba(0, 139, 130, 0.08);
  color: var(--viz-teal);
}

.chart-thumb.recommended::after {
  content: "推荐";
  font-size: 9px;
  color: var(--data-coral);
}

.viz-stage {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-float);
  overflow: hidden;
}

.viz-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  min-width: 0;
  flex-shrink: 0;
}

.viz-stage h3 {
  font-size: 20px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.viz-caption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.viz-stage svg#mainChart,
.viz-stage svg {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 400px;
  height: min(48vh, 480px);
  background: transparent;
}

.viz-canvas-wrap {
  border-radius: 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(17,17,17,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,17,17,0.03) 1px, transparent 1px),
    #fcfcfb;
  background-size: 24px 24px;
  min-height: 400px;
  max-height: min(52vh, 500px);
  max-width: 100%;
  overflow: auto;
  display: grid;
  place-items: stretch;
}

.viz-mapping {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.viz-mapping span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef7f6;
  border: 1px solid #b7ddd8;
  font-size: 12px;
  font-weight: 800;
  color: #1f5c57;
}

.chart-hit { cursor: pointer; transition: opacity 0.12s ease; }
.chart-hit:hover { opacity: 0.88; }
.chart-hit.is-selected {
  stroke: #111;
  stroke-width: 2.5;
}

.recommendations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.recommend-card, .recommendations div, .recommendations button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
}

.recommend-card:hover, .recommendations button:hover {
  border-color: var(--data-teal);
}

.recommendations strong { display: block; margin-bottom: 6px; font-size: 14px; }
.recommendations small { color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.45; }

/* —— Methods —— */
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.method-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 148px;
  padding: 20px 18px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--white);
  transition: border-color 0.15s ease;
}

.method-card:hover { border-color: var(--ink-800); }

.method-card-no {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-num);
  font-size: 28px;
  font-weight: 700;
  color: rgba(17, 17, 17, 0.12);
  line-height: 1;
}

.method-card strong {
  display: block;
  padding-right: 40px;
  font-size: 17px;
  font-weight: 900;
}

.method-card em {
  display: inline-block;
  width: fit-content;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.method-card small {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
}

/* —— MCP finale —— */
.mcp-board {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-on-dark);
  background: rgba(0, 0, 0, 0.25);
}

.mcp-board > * {
  min-width: 0;
  height: 100%;
}

.mcp-copy p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin-bottom: 16px;
}

.mcp-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 14px;
}

.mcp-stats strong {
  display: block;
  font-family: var(--font-num);
  font-size: 28px;
  font-weight: 700;
}

.mcp-stats .ok {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--data-mint);
  font-size: 18px;
}

.mcp-stats span {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  font-weight: 700;
}

.code-sample {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #0d0d0d;
  border: 1px solid var(--line-on-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--data-mint);
  overflow: auto;
}

.mcp-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
}

.mcp-codes code {
  display: inline-block;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-on-dark);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line-on-dark);
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 600;
}

.site-footer strong {
  color: #fff;
  font-family: var(--font-display);
  font-size: 18px;
}

/* —— Toast —— */
.toast {
  position: sticky;
  top: 12px;
  z-index: 30;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-950);
  font-size: 14px;
  font-weight: 800;
  box-shadow: var(--shadow-float);
}

.toast.error {
  border-color: rgba(214, 121, 103, 0.45);
  background: #fff8f6;
}

.toast[hidden] { display: none !important; }

.empty { color: var(--gray-500); font-weight: 700; padding: 18px; }

/* —— Reveal motion —— */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .status-dot.pulse, .device-dot.pulse { animation: none; }
}

/* —— Responsive —— */
@media (max-width: 1439px) {
  :root {
    --nav-w: 200px;
    --content-max: 1240px;
  }
  .workspace { padding: 14px 20px 44px; gap: 20px; }
  .hero-studio { min-height: 260px; padding: 22px; }
}

@media (max-width: 1280px) {
  :root { --content-max: 1120px; }
}

@media (max-width: 1180px) {
  .app-frame { grid-template-columns: 1fr; }
  .side-nav {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-float);
  }
  .side-nav.open { transform: none; }
  .nav-toggle { display: inline-flex; }
  .bento-overview,
  .insight-ribbon,
  .collect-grid,
  .collect-entries,
  .ingest-layout,
  .recommend-report-grid,
  .viz-studio,
  .mcp-board {
    grid-template-columns: 1fr;
  }
  .method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-studio { grid-template-columns: 1fr; }
  .hero-device { min-height: 200px; }
  .insight-pane { border-right: none; border-bottom: 1px solid var(--line); }
  .insight-pane:last-child { border-bottom: none; }
}

@media (max-width: 767px) {
  .workspace { padding: 14px 16px 48px; gap: 22px; }
  .hero-studio { padding: 24px 20px 36px; border-radius: 20px; }
  .hero-studio h1 { font-size: 32px; }
  .command-actions { flex-direction: column; align-items: stretch; }
  .command-actions .btn, .command-actions .file-button, .command-actions button { width: 100%; }
  .bento-side { grid-template-columns: 1fr 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .mega-number { font-size: 42px; }
  .section-head h2 { font-size: 24px; }
  .section-block.surface-soft,
  .section-block.section-dark,
  .visual-lab { padding: 18px; border-radius: 18px; }
  .pipeline-strip { border-radius: 16px; }
  .top-meta { flex-wrap: wrap; justify-content: flex-start; }
}


/* =====================================================================
   INTERACTION ATLAS v2 —— 编辑年鉴覆盖层（奶油底 / 墨黑 / 荧光黄绿）
   本层为追加覆盖：同名同特异性规则按出现顺序生效，实现无损换肤。
   ===================================================================== */

/* —— 全局底色：纯奶油纸面 —— */
body {
  background: var(--paper);
  color: var(--ink);
}
::selection { background: var(--accent); color: var(--ink-950); }

/* —— 顶栏 —— */
.top-meta { background: rgba(247, 245, 240, 0.92); border-bottom: 1px solid var(--line); }
.brand-mark i { background: var(--accent); }
.kbd {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 7px;
  background: var(--white); color: var(--ink-700);
  font-family: var(--font-num); font-size: 11px; font-weight: 800; letter-spacing: 0.05em;
  cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.kbd:hover { background: var(--accent); border-color: var(--accent); }

/* —— 左侧编号工作流轨道 —— */
.side-nav { background: transparent; }
.workflow-nav a { color: var(--gray-700); border-left-color: var(--gray-200); }
.workflow-nav a:hover { color: var(--ink-950); }
.workflow-nav a.active {
  color: var(--ink-950); font-weight: 900;
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(212, 245, 66, 0.35), rgba(212, 245, 66, 0));
}
.workflow-nav a.active .step-dot { border-color: var(--ink-950); background: var(--accent); }
.workflow-nav a.active .step-no { color: var(--ink-950); }
.workflow-nav a.done .step-dot { background: var(--ink-950); border-color: var(--ink-950); }
.workflow-nav a.done .step-dot::after { background: var(--accent); }
.dataset-badge { border: 1px solid var(--line-strong); background: var(--white); }

/* —— Hero：浅色编辑刊头 —— */
.hero-studio {
  background: var(--white);
  color: var(--ink-950);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-float);
}
.hero-tag { color: var(--gray-700); }
.hero-tag::before {
  content: ""; display: inline-block; width: 26px; height: 8px;
  margin-right: 10px; background: var(--accent); vertical-align: middle;
}
.hero-studio h1 {
  font-weight: 900;
  letter-spacing: -0.045em;
  font-size: clamp(34px, 3.8vw, 52px);
}
.hero-studio h1 em { font-style: normal; }
.hero-copy h1::after {
  content: ""; display: inline-block; width: 0.32em; height: 0.32em;
  margin-left: 0.1em; border-radius: 50%; background: var(--accent);
}
.hero-en { color: var(--gray-500); }
.hero-studio .lead { color: var(--gray-700); }
.hero-device {
  border: 1px solid var(--line);
  background: var(--paper);
}
.device-grid {
  background-image:
    linear-gradient(rgba(10, 10, 10, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 10, 10, 0.045) 1px, transparent 1px);
}
.device-area { fill: rgba(212, 245, 66, 0.4); }
.device-line { stroke: var(--ink-950); }
.device-dot { fill: var(--ink-950); }
.device-tags span { background: var(--white); border-color: var(--line-strong); color: var(--ink-700); }
.device-flow { color: var(--gray-700); }
.device-flow i { background: linear-gradient(90deg, transparent, var(--gray-300), transparent); }
.btn-ghost { color: var(--ink-950); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink-950); }

/* —— 按钮：荧光黄绿药丸 —— */
.btn-accent {
  background: var(--accent); color: var(--ink-950); border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(212, 245, 66, 0.35);
}
.btn-accent:hover { background: #c8ee2e; border-color: #c8ee2e; }
.btn-dark, .btn-ghost-dark { background: var(--ink-950); border-color: var(--ink-950); }
.btn-ghost-dark { background: transparent; color: var(--ink-950); }
.btn-ghost-dark:hover { border-color: var(--ink-950); }
.btn-light, .file-button { border-color: var(--line-strong); }
.btn-light:hover, .file-button:hover { border-color: var(--ink-950); }

/* —— 板块头：编号双语 —— */
.section-head .eyebrow {
  color: var(--gray-500);
  padding-left: 22px;
  position: relative;
}
.section-head .eyebrow::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 14px; height: 3px; transform: translateY(-50%);
  background: var(--accent);
}
.section-head h2 { font-weight: 900; letter-spacing: -0.02em; }
.section-head h2::after {
  content: ""; display: inline-block; width: 10px; height: 10px;
  margin-left: 6px; border-radius: 50%; background: var(--accent);
}
.section-no { color: var(--ink-950); -webkit-text-stroke: 0; }
.pill { border: 1px solid var(--line-strong); background: var(--white); }
.pill.on-dark { border-color: var(--line-on-dark); }

/* —— 深色板块：墨黑 + 荧光绿 —— */
.section-dark { background: var(--ink-950); }
.section-dark .section-head h2 { color: #fff; }
.section-dark .section-head h2::after { background: var(--accent); }
.section-dark .section-note { color: var(--gray-500); }
.mcp-item code, .collect-console code { border-color: var(--line-on-dark); }
.mcp-item:hover code { border-color: var(--accent); color: var(--accent); }
.collect-console { background: var(--ink-900); }

/* —— 卡片微交互 —— */
.sheet, .card, .tile, .metric, .bento-cell, .entry-item, .method-cell, .stage-card, .step-card, .viz-panel {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.sheet:hover, .bento-cell:hover, .method-cell:hover, .stage-card:hover, .viz-panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-float);
  border-color: var(--line-strong);
}
:focus-visible { outline: 2px solid var(--focus-blue); outline-offset: 2px; }

/* —— 荧光黄绿徽标 —— */
.badge-lime {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--accent); color: var(--ink-950);
  font-family: var(--font-num); font-size: 11px; font-weight: 900; letter-spacing: 0.06em;
}
.badge-lime::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-950);
}
.status-dot.live { background: var(--accent); }

/* ====== ⌘K 命令面板 ====== */
.cmdk-overlay {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh 16px 16px;
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(4px);
}
.cmdk-overlay[hidden] { display: none; }
.cmdk-panel {
  width: min(640px, 100%);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(10, 10, 10, 0.28);
  overflow: hidden;
  animation: cmdkIn .18s ease;
}
@keyframes cmdkIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
.cmdk-input {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.cmdk-input input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 16px; font-weight: 600; color: var(--ink-950);
}
.cmdk-input input::placeholder { color: var(--gray-500); }
.cmdk-list { max-height: 46vh; overflow-y: auto; padding: 8px; }
.cmdk-group {
  padding: 8px 12px 4px;
  color: var(--gray-500);
  font-family: var(--font-num); font-size: 10px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.cmdk-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 12px; border: 0; border-radius: 10px;
  background: transparent; cursor: pointer; text-align: left;
  color: var(--ink-950);
}
.cmdk-item .cmdk-no {
  min-width: 30px; font-family: var(--font-num); font-weight: 800;
  color: var(--gray-500); font-size: 12px; letter-spacing: 0.05em;
}
.cmdk-item .cmdk-label { flex: 1; font-size: 14px; font-weight: 700; min-height: auto; padding: 0; }
.cmdk-item .cmdk-hint { color: var(--gray-500); font-size: 11px; font-weight: 600; }
.cmdk-item.active { background: var(--accent); }
.cmdk-item.active .cmdk-no, .cmdk-item.active .cmdk-hint { color: var(--ink-700); }
.cmdk-empty { padding: 28px; text-align: center; color: var(--gray-500); font-size: 13px; }
.cmdk-foot {
  display: flex; gap: 14px; padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--gray-500); font-size: 11px; font-weight: 600;
}

/* ====== Toast 堆叠 ====== */
.toast-stack {
  position: fixed; right: 18px; bottom: 18px; z-index: 950;
  display: flex; flex-direction: column-reverse; gap: 10px;
  max-width: min(420px, calc(100vw - 36px));
}
.toast-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ink-950); color: #fff;
  border-left: 4px solid var(--accent);
  box-shadow: 0 10px 28px rgba(10, 10, 10, 0.25);
  font-size: 13px; font-weight: 600; line-height: 1.5;
  animation: toastIn .22s ease;
}
.toast-item.leaving { animation: toastOut .18s ease forwards; }
.toast-item.error { border-left-color: var(--err); }
.toast-item.info { border-left-color: var(--focus-blue); }
.toast-item i {
  flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%;
  background: var(--accent);
}
.toast-item.error i { background: var(--err); }
.toast-item.info i { background: var(--focus-blue); }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

/* ====== 骨架屏 ====== */
.skeleton {
  position: relative; overflow: hidden;
  background: var(--gray-100); border-radius: 8px; color: transparent !important;
}
.skeleton * { visibility: hidden; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(10, 10, 10, 0.05) 50%, transparent 70%);
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ====== 分段控制器 ====== */
.segmented {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--white);
}
.segmented button {
  min-height: 32px; padding: 0 14px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--gray-700);
  font-size: 12.5px; font-weight: 800;
  transition: background .18s ease, color .18s ease;
}
.segmented button:hover { color: var(--ink-950); transform: none; }
.segmented button.active {
  background: var(--ink-950); color: var(--accent);
}

/* ====== Before / After 对比滑块 ====== */
.ba-card {
  position: relative;
  border: 1px solid var(--line-strong); border-radius: 16px;
  background: var(--white); overflow: hidden;
}
.ba-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.ba-head .ba-title { font-weight: 900; font-size: 14px; }
.ba-stage { position: relative; display: grid; }
.ba-pane {
  grid-area: 1 / 1; padding: 16px 18px;
  font-size: 13.5px; line-height: 1.75; color: var(--ink-950);
  white-space: pre-wrap; word-break: break-word;
}
.ba-pane.ba-after { background: var(--paper); }
.ba-clip {
  position: absolute; inset: 0;
  clip-path: inset(0 0 0 var(--ba-split, 50%));
}
.ba-divider {
  position: absolute; top: 0; bottom: 0; left: var(--ba-split, 50%);
  width: 2px; background: var(--accent);
  box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.12);
  pointer-events: none;
}
.ba-divider::after {
  content: "↔"; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink-950); color: var(--accent);
  font-size: 13px;
}
.ba-range {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: ew-resize; margin: 0;
}
.ba-legend {
  display: flex; gap: 14px; padding: 8px 18px 14px;
  color: var(--gray-500); font-size: 11px; font-weight: 700;
}
.ba-legend b { color: var(--ink-950); }

/* ====== 数据问答 QA 面板 ====== */
.qa-panel {
  display: grid; grid-template-columns: 1fr;
  border: 1px solid var(--line-strong); border-radius: 16px;
  background: var(--white); overflow: hidden;
}
.qa-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.qa-head .qa-title { font-weight: 900; font-size: 14px; flex: 1; }
.qa-messages {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px; min-height: 120px; max-height: 420px; overflow-y: auto;
  background:
    radial-gradient(rgba(10, 10, 10, 0.035) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--white);
}
.qa-msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.7; }
.qa-msg.user {
  align-self: flex-end;
  background: var(--ink-950); color: #fff;
  border-bottom-right-radius: 4px;
}
.qa-msg.assistant {
  align-self: flex-start;
  background: var(--paper); border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.qa-msg .qa-meta {
  display: block; margin-top: 6px;
  color: var(--gray-500); font-family: var(--font-num);
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em;
}
.qa-input-row {
  display: flex; gap: 8px; padding: 12px 14px;
  border-top: 1px solid var(--line);
}
.qa-input-row input {
  flex: 1; min-height: 44px; padding: 0 14px;
  border: 1.5px solid var(--line-strong); border-radius: 12px;
  background: var(--white); font-size: 14px; color: var(--ink-950);
}
.qa-input-row input:focus { border-color: var(--ink-950); outline: none; }
.qa-empty {
  align-self: center; margin: auto; text-align: center;
  color: var(--gray-500); font-size: 12.5px; padding: 18px;
}

/* ====== Python 服务端渲染图表 ====== */
.python-chart-box {
  border: 1px dashed var(--line-strong); border-radius: 14px;
  padding: 10px; background: var(--white);
}
.python-chart-box img { width: 100%; height: auto; display: block; border-radius: 8px; }
.python-chart-box .py-note {
  display: flex; align-items: center; gap: 8px; padding: 8px 4px 2px;
  color: var(--gray-500); font-size: 11.5px; font-weight: 700;
}

/* —— 动态数字（Animated Number）在数字变化时闪烁强调 —— */
.count-flashing { animation: countFlash .5s ease; }
@keyframes countFlash {
  0% { color: var(--accent); text-shadow: 0 0 0 transparent; }
  100% { color: inherit; }
}

/* —— 滚动进入显现 —— */
.reveal { opacity: 1; transform: none; }
@keyframes atlasFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* —— 减少动态偏好 —— */
@media (prefers-reduced-motion: reduce) {
  .cmdk-panel, .toast-item, .skeleton::after { animation: none; }
}

/* =====================================================================
   v2 追加：SQL 实验室（DuckDB 只读查询）
   ===================================================================== */
.sql-lab-grid {
  display: grid; grid-template-columns: minmax(320px, 5fr) minmax(340px, 6fr);
  gap: 22px; align-items: start;
}
@media (max-width: 1080px) { .sql-lab-grid { grid-template-columns: 1fr; } }
.sql-editor-col, .sql-result-col {
  border: 1px solid var(--line); background: var(--white);
  padding: 18px 20px 20px; border-radius: 4px;
}
.sql-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sql-chip {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-950);
  background: var(--paper); border: 1px solid var(--line-strong);
  padding: 5px 10px; border-radius: 3px; cursor: pointer;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.sql-chip:hover { background: var(--accent); border-color: var(--ink-950); }
.sql-input {
  width: 100%; min-height: 132px; resize: vertical;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.55;
  color: var(--ink-950); background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: 3px; padding: 12px 14px;
  outline: none; tab-size: 2;
}
.sql-input:focus { border-color: var(--ink-950); box-shadow: 0 0 0 3px rgba(212, 245, 66, 0.45); }
.sql-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.sql-actions .pill { font-family: var(--font-num); font-size: 11px; font-weight: 700; }
.sql-result-wrap {
  max-height: 420px; overflow: auto; border: 1px solid var(--line);
  border-radius: 3px; background: var(--white);
}
.sql-result-wrap table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.sql-result-wrap th {
  position: sticky; top: 0; background: var(--ink-950); color: var(--white);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
  text-align: left; padding: 8px 10px; white-space: nowrap;
}
.sql-result-wrap td {
  padding: 7px 10px; border-bottom: 1px solid var(--line);
  color: var(--ink-950); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sql-result-wrap tbody tr:nth-child(even) { background: rgba(247, 245, 240, 0.7); }
.sql-result-wrap tbody tr:hover { background: rgba(212, 245, 66, 0.28); }
.sql-result-wrap .sql-cell-num { font-family: var(--font-mono); text-align: right; }
.sql-error {
  font-family: var(--font-mono); font-size: 12.5px; color: #B4231F;
  background: #FDECEA; border: 1px solid rgba(180, 35, 31, 0.25);
  border-radius: 3px; padding: 12px 14px; margin: 0;
}
.sql-chart-box { margin-top: 14px; border: 1px solid var(--line); border-radius: 3px; padding: 10px; background: var(--white); }
.sql-chart-box img { display: block; width: 100%; }

/* =====================================================================
   v2 追加：统计工作台（SPSS 风格检验）
   ===================================================================== */
.stat-lab-grid {
  display: grid; grid-template-columns: minmax(320px, 5fr) minmax(340px, 6fr);
  gap: 22px; align-items: start;
}
@media (max-width: 1080px) { .stat-lab-grid { grid-template-columns: 1fr; } }
.stat-config-col, .stat-result-col {
  border: 1px solid var(--line); background: var(--white);
  padding: 18px 20px 20px; border-radius: 4px;
}
.stat-test-desc {
  margin: 8px 0 14px; font-size: 12.5px; line-height: 1.6;
  color: var(--gray-500);
}
.stat-param-fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.stat-field select {
  width: 100%; min-height: 40px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: 3px;
  background: var(--paper); color: var(--ink-950); font-size: 13px;
  outline: none;
}
.stat-field select:focus { border-color: var(--ink-950); box-shadow: 0 0 0 3px rgba(212, 245, 66, 0.45); }
.stat-field select.stat-multi { min-height: unset; padding: 6px 10px; resize: vertical; }
.stat-field select.stat-multi option { padding: 4px 2px; }
.stat-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stat-actions .pill { font-family: var(--font-num); font-size: 11px; font-weight: 700; }
.stat-result-wrap {
  max-height: 480px; overflow: auto; border: 1px solid var(--line);
  border-radius: 3px; background: var(--white);
}
.stat-headline {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--line-strong);
  background: var(--ink-950);
}
.stat-test-name {
  color: var(--white); font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
}
.stat-stars {
  font-family: var(--font-num); font-size: 13px; font-weight: 900; letter-spacing: 0.1em;
  color: var(--ink-950); background: var(--accent);
  padding: 2px 10px; border-radius: 3px;
}
.stat-stars[data-stars="ns"] { background: var(--paper); color: var(--gray-500); border: 1px solid var(--line); }
.stat-table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.stat-table th {
  text-align: left; padding: 8px 14px; width: 38%;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--gray-500); letter-spacing: 0.04em; white-space: nowrap;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 245, 240, 0.65);
}
.stat-table td {
  padding: 8px 14px; border-bottom: 1px solid var(--line);
  font-family: var(--font-num); color: var(--ink-950);
}
.stat-table tbody tr:last-child th, .stat-table tbody tr:last-child td { border-bottom: none; }
.stat-coef-table thead th, .stat-cross-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--ink-950); color: var(--white);
  width: auto; font-size: 11px; padding: 8px 10px;
}
.stat-coef-table td, .stat-cross-table td { font-family: var(--font-mono); text-align: right; }
.stat-coef-table td:first-child, .stat-cross-table th[rowspan], .stat-cross-table tbody th {
  text-align: left; font-family: var(--font-mono); background: rgba(247, 245, 240, 0.65);
  color: var(--gray-500); font-weight: 700; padding: 7px 10px; white-space: nowrap;
}
.stat-detail-table { border-top: 2px solid var(--line-strong); }
.stat-rule-note {
  margin: 0; padding: 10px 14px; font-size: 12.5px; line-height: 1.7;
  background: rgba(212, 245, 66, 0.16); color: var(--ink-950);
}
.stat-interpret-box {
  margin-top: 14px; border: 1px solid var(--line); border-radius: 3px;
  background: var(--white); padding: 14px 16px;
}
.stat-interpret-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.stat-interpret-head strong { font-size: 12px; letter-spacing: 0.12em; color: var(--ink-950); }
.stat-interpret-box p {
  margin: 0; font-size: 13.5px; line-height: 1.85; color: var(--ink-950);
}
