/* ==========================================================================
   ProFabX · SophiCar 控制台 — Google / Material 3 风格设计系统
   色彩取自 Google 品牌四色（ProFabX v2 Dashboard 同款基调）
   ========================================================================== */

:root {
  /* Google 品牌色 */
  --c-blue: #4285F4;
  --c-blue-dark: #3367D6;
  --c-blue-deep: #1A73E8;
  --c-green: #34A853;
  --c-yellow: #FBBC04;
  --c-red: #EA4335;

  /* 中性色（Google Workspace 灰阶） */
  --bg: #F8F9FA;
  --surface: #FFFFFF;
  --surface-2: #F1F3F4;
  --ink: #202124;
  --ink-2: #3C4043;
  --muted: #5F6368;
  --line: #DADCE0;
  --line-strong: #BDC1C6;

  /* 强调底色 */
  --accent-bg: #E8F0FE;
  --green-bg: #E6F4EA;
  --yellow-bg: #FEF7E0;
  --red-bg: #FCE8E6;
  --gray-bg: #F1F3F4;

  /* 语义 token */
  --primary: var(--c-blue);
  --primary-strong: var(--c-blue-deep);
  --text: var(--ink);
  --text-2: var(--ink-2);
  --text-muted: var(--muted);
  --border: var(--line);
  --card: var(--surface);

  /* 字体 */
  --font: 'Roboto', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --fs-12: 12px; --fs-13: 13px; --fs-14: 14px; --fs-16: 16px;
  --fs-20: 20px; --fs-24: 24px; --fs-28: 28px; --fs-36: 36px;

  /* 圆角与阴影 */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(60, 64, 67, .08), 0 1px 3px 1px rgba(60, 64, 67, .05);
  --sh-2: 0 1px 3px rgba(60, 64, 67, .15), 0 4px 8px 3px rgba(60, 64, 67, .10);
  --sh-3: 0 4px 8px 3px rgba(60, 64, 67, .15), 0 6px 20px 6px rgba(60, 64, 67, .12);

  /* 布局 */
  --appbar-h: 64px;
  --max-w: 1280px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-14);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; color: var(--text); letter-spacing: -0.01em; }
p { margin: 0; }
code, pre, kbd { font-family: 'SF Mono', 'Roboto Mono', Consolas, monospace; }
.material-symbols-outlined, .ms {
  font-family: 'Material Symbols Outlined';
  font-weight: normal; font-style: normal;
  font-size: 20px; line-height: 1;
  display: inline-block;
  vertical-align: middle;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none;
}
.ms-fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

/* ---------- 顶部应用栏 ---------- */
.appbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--appbar-h);
  box-shadow: var(--sh-1);
}
.appbar-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 20px;
  height: 100%; display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; width: 140px; height: auto; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.brand-text small { font-size: 11px; color: var(--text-muted); }

.tabs { display: flex; align-items: stretch; gap: 2px; height: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0 14px; height: 100%;
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.tabs a:hover { text-decoration: none; color: var(--text-2); background: var(--surface-2); }
.tabs a[aria-current="true"] { color: var(--primary-strong); border-bottom-color: var(--primary); }
.tabs a .ms { font-size: 19px; }

.appbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mode-pill {
  font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--green-bg); color: var(--c-green); border: 1px solid transparent;
}
.mode-pill[data-mode="mock"] { background: var(--accent-bg); color: var(--primary-strong); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-family: var(--font);
  font-size: 14px; font-weight: 500; line-height: 1;
  padding: 0 22px; height: 38px; border-radius: var(--r-pill);
  transition: background .15s var(--ease), box-shadow .15s var(--ease), color .15s var(--ease);
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-filled { background: var(--primary); color: #fff; }
.btn-filled:hover { background: var(--c-blue-deep); box-shadow: var(--sh-2); }
.btn-tonal { background: var(--accent-bg); color: var(--primary-strong); }
.btn-tonal:hover { box-shadow: var(--sh-1); filter: brightness(.97); }
.btn-outline { background: var(--surface); color: var(--primary-strong); border: 1px solid var(--line-strong); }
.btn-outline:hover { background: var(--accent-bg); border-color: var(--primary); }
.btn-text { background: transparent; color: var(--primary-strong); padding: 0 12px; }
.btn-text:hover { background: var(--accent-bg); }
.btn-danger { background: var(--red-bg); color: var(--c-red); }
.btn-sm { height: 30px; padding: 0 14px; font-size: 13px; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: none; border-radius: var(--r-pill);
  background: transparent; color: var(--text-muted); cursor: pointer;
  transition: background .15s var(--ease);
}
.btn-icon:hover { background: var(--surface-2); color: var(--text); }

/* ---------- 布局 ---------- */
.view { max-width: var(--max-w); margin: 0 auto; padding: 26px 20px 60px; min-height: calc(100vh - var(--appbar-h) - 160px); }
.view:focus { outline: none; }
.section-head { margin: 34px 0 16px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: var(--fs-24); }
.section-head .sub { color: var(--text-muted); font-size: 13px; }
.section-head .spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1024px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-1);
  padding: 20px;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.card:hover { box-shadow: var(--sh-2); }
.card-pad { padding: 24px; }
.card-title { font-size: var(--fs-16); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-title .ms { color: var(--primary); }
.card-desc { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.card-foot { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-click { cursor: pointer; }
.card-click:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- 徽标 / 状态 ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; padding: 3px 10px;
  border-radius: var(--r-sm); border: 1px solid transparent;
  white-space: nowrap;
}
.chip .ms { font-size: 15px; }
.chip-blue   { background: var(--accent-bg); color: var(--primary-strong); }
.chip-green  { background: var(--green-bg);  color: var(--c-green); }
.chip-yellow { background: var(--yellow-bg); color: #B06000; }
.chip-red    { background: var(--red-bg);    color: var(--c-red); }
.chip-gray   { background: var(--gray-bg);   color: var(--text-muted); }
.chip-outline { background: transparent; border-color: var(--line-strong); color: var(--text-muted); }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-blue { background: var(--c-blue); } .dot-green { background: var(--c-green); }
.dot-yellow { background: var(--c-yellow); } .dot-red { background: var(--c-red); }
.dot-gray { background: var(--muted); }

/* ---------- Hero 与命令条 ---------- */
.overview-architecture {
  margin-bottom: 16px;
  padding: 0;
  overflow: hidden;
}
.overview-architecture-scroll { overflow-x: auto; }
.overview-architecture img {
  display: block;
  width: 100%;
  height: auto;
}
/* ---------- 高校课程项目 / School project entry ---------- */
.overview-school { margin: 24px 0; }
.overview-school-card { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr); padding: 0; overflow: hidden; color: var(--text); }
.overview-school-card:hover { text-decoration: none; transform: translateY(-2px); }
.overview-school-card:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.overview-school-image { min-width: 0; min-height: 240px; background: #F1F3F4; overflow: hidden; }
.overview-school-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.overview-school-card:hover .overview-school-image img { transform: scale(1.025); }
.overview-school-copy { min-width: 0; padding: 28px 30px; }
.overview-school-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.overview-school-copy h3 { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.overview-school-copy p { color: var(--text-2); font-size: 14px; }
.overview-school-copy .overview-school-directions { margin-top: 12px; color: var(--text-muted); font-size: 12px; }
.overview-school-action { display: inline-flex; align-items: center; gap: 12px; margin-top: 20px; color: var(--primary-strong); font-weight: 500; }
@media (max-width: 760px) {
  .overview-school-card { grid-template-columns: 1fr; }
  .overview-school-image { min-height: 0; aspect-ratio: 2 / 1; }
  .overview-school-copy { padding: 22px; }
  .overview-school-copy h3 { font-size: 22px; }
}

.hero { padding: 44px 24px 36px; border-radius: var(--r-xl); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -60% -20% auto; height: 130%;
  background: radial-gradient(60% 80% at 20% 0%, rgba(66,133,244,.10), transparent 70%),
              radial-gradient(50% 70% at 85% 10%, rgba(52,168,83,.08), transparent 70%),
              radial-gradient(45% 65% at 60% 30%, rgba(251,188,4,.08), transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero-eyebrow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.hero h1 { font-size: clamp(28px, 4vw, var(--fs-36)); font-weight: 700; line-height: 1.25; }
.hero-sub { margin-top: 10px; color: var(--text-2); font-size: 15px; max-width: 760px; }
.cmdbar {
  margin-top: 26px; display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 8px 10px 8px 20px;
  max-width: 680px; box-shadow: var(--sh-2); cursor: text;
}
.cmdbar:hover { box-shadow: var(--sh-3); }
.cmdbar .ms { color: var(--text-muted); }
.cmdbar .ph { flex: 1; color: var(--text-muted); font-size: 14px; }
.cmdbar kbd {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 8px; font-size: 11px; color: var(--text-muted);
}
.cmdbar .go {
  background: var(--primary); color: #fff; border: none; border-radius: var(--r-pill);
  height: 32px; padding: 0 18px; font-size: 13px; font-weight: 500; cursor: pointer;
}

/* ---------- KPI ---------- */
.kpi .k { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 15px; font-weight: 500; color: var(--text-muted); margin-left: 2px; }
.kpi .n { font-size: 12px; color: var(--text-muted); }
.kpi .v.blue { color: var(--c-blue); } .kpi .v.green { color: var(--c-green); }
.kpi .v.red { color: var(--c-red); } .kpi .v.yellow { color: #B06000; }
.kpi-accent { border-top: 3px solid var(--primary); }

/* ---------- 业务联动环（SVG） ---------- */
.loop-wrap { overflow-x: auto; }
.loop-svg { width: 100%; min-width: 880px; display: block; }
.loop-node { cursor: pointer; }
.loop-node .node-box {
  fill: var(--card); stroke-width: 2;
  rx: 20px; ry: 20px;
  filter: drop-shadow(0 2px 6px rgba(60,64,67,.12));
  transition: filter .2s var(--ease), stroke-width .2s var(--ease);
}
.loop-node:hover .node-box { filter: drop-shadow(0 6px 16px rgba(60,64,67,.25)); stroke-width: 3; }
.loop-node text.t1 { font-size: 21px; font-weight: 700; fill: var(--ink); font-family: var(--font); }
.loop-node text.t2 { font-size: 12.5px; fill: var(--muted); font-family: var(--font); }
.loop-node text.t3 { font-size: 12px; font-weight: 500; fill: var(--primary-strong); font-family: var(--font); }
.loop-arrow {
  stroke: var(--muted); stroke-width: 1.8; fill: none;
  stroke-dasharray: 7 6;
  animation: flowdash 1.4s linear infinite;
  marker-end: url(#arrowhead);
}
@keyframes flowdash { to { stroke-dashoffset: -26; } }
.loop-arrow-label { font-size: 12px; fill: var(--muted); font-family: var(--font); font-weight: 500; }
.loop-ext { stroke: var(--line-strong); stroke-width: 1.5; fill: none; stroke-dasharray: 4 5; }
.loop-ext-label { font-size: 12.5px; fill: var(--muted); font-family: var(--font); }
.loop-base .base-box { fill: var(--surface-2); rx: 16px; ry: 16px; }
.loop-base text { font-family: var(--font); }
@media (prefers-reduced-motion: reduce) {
  .loop-arrow { animation: none; stroke-dasharray: none; }
}

/* ---------- 联动管线 stepper ---------- */
.pipeline { display: flex; gap: 0; overflow-x: auto; padding: 6px 0; }
.step { flex: 1; min-width: 150px; position: relative; padding: 0 10px; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 17px; left: calc(50% + 22px); right: calc(-50% + 22px);
  height: 2px; background: var(--line-strong);
}
.step .p-dot {
  width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; position: relative; z-index: 1;
}
.step .p-owner { display: block; text-align: center; font-size: 11px; color: var(--text-muted); font-weight: 500; }
.step h4 { text-align: center; font-size: 14px; margin-top: 2px; }
.step p { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.step.blue .p-dot { background: var(--c-blue); } .step.green .p-dot { background: var(--c-green); }
.step.red .p-dot { background: var(--c-red); } .step.yellow .p-dot { background: var(--c-yellow); color: #3C4043; }
.step.gray .p-dot { background: var(--muted); }

/* ---------- SophiStudio 工作流 ---------- */
.workflow-intro {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 28px;
  padding: 34px 2px 28px;
}
.workflow-intro h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; letter-spacing: -.035em; }
.workflow-intro p { max-width: 720px; margin-top: 8px; color: var(--text-muted); font-size: 15px; }
.workflow-count { display: flex; align-items: baseline; gap: 7px; flex-shrink: 0; color: var(--text-muted); }
.workflow-count strong { color: var(--c-blue-deep); font-size: 36px; line-height: 1; letter-spacing: -.05em; }
.workflow-count span { font-size: 13px; font-weight: 500; }

.workflow-group {
  --wf-accent: var(--c-blue);
  --wf-soft: var(--accent-bg);
  padding: 26px 0 30px;
  border-top: 1px solid var(--border);
}
.workflow-group.engineering { --wf-accent: var(--c-green); --wf-soft: var(--green-bg); }
.workflow-group.manufacturing { --wf-accent: #B06000; --wf-soft: var(--yellow-bg); }
.workflow-group.content { --wf-accent: var(--c-red); --wf-soft: var(--red-bg); }
.workflow-group > header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.workflow-heading-icon {
  display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: 12px; background: var(--wf-soft); color: var(--wf-accent);
}
.workflow-heading-icon .ms { font-size: 23px; }
.workflow-group h2 { color: var(--wf-accent); font-size: 22px; font-weight: 700; }
.workflow-group > header p { margin-top: 2px; color: var(--text-muted); font-size: 13px; }
.workflow-rail { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.engineering-rail { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.content-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; }

.workflow-card {
  position: relative; z-index: 1; display: grid; grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: 1fr auto; column-gap: 12px; min-height: 160px; padding: 18px 18px 13px;
  border: 1px solid var(--border); border-top: 3px solid var(--wf-accent); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--sh-1); color: var(--text); text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.workflow-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); text-decoration: none; }
.workflow-card:focus-visible { outline: 3px solid rgba(66, 133, 244, .35); outline-offset: 3px; }
.wf-icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--wf-soft); color: var(--wf-accent);
}
.wf-icon .ms { font-size: 22px; }
.wf-copy { min-width: 0; }
.wf-copy h3 { font-size: 15px; font-weight: 700; }
.wf-copy p { margin-top: 4px; color: var(--text-muted); font-size: 12.5px; line-height: 1.5; }
.wf-copy small { display: block; margin-top: 7px; color: var(--c-green); font-size: 11.5px; font-weight: 500; }
.workflow-card > .wf-action,
.workflow-card > .wf-disabled {
  grid-column: 1 / -1; display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border);
  color: var(--wf-accent); font-size: 12.5px; font-weight: 500;
}
.workflow-card > .wf-action .ms { font-size: 16px; transition: transform .16s var(--ease); }
.workflow-card:hover > .wf-action .ms { transform: translateX(3px); }
.workflow-card[data-status="planned"] { border-top-color: var(--line-strong); border-style: dashed; box-shadow: none; }
.workflow-card[data-status="planned"] .wf-icon { background: var(--surface-2); color: var(--text-muted); }
.workflow-card[data-status="planned"] .wf-copy small,
.workflow-card[data-status="planned"] .wf-disabled { color: var(--text-muted); }
.workflow-branch { grid-column: 1 / 2; margin-left: 26px; }
.workflow-branch::before {
  position: absolute; top: -25px; left: 28px; width: 28px; height: 24px;
  border-bottom: 2px solid var(--wf-accent); border-left: 2px solid var(--wf-accent);
  border-radius: 0 0 0 10px; content: "";
}

@media (max-width: 1080px) {
  .workflow-rail, .engineering-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-branch { grid-column: auto; margin-left: 0; }
  .workflow-branch::before { display: none; }
}

@media (max-width: 680px) {
  .workflow-intro { align-items: flex-start; flex-direction: column; gap: 16px; }
  .workflow-rail, .engineering-rail, .content-rail { grid-template-columns: 1fr; max-width: none; }
}

/* 独立工作流：Google 红黄绿 + 克莱因蓝。 */
body[data-workflow-scope="engineering"] {
  --c-blue: #002FA7;
  --c-blue-dark: #002FA7;
  --c-blue-deep: #002FA7;
  --c-green: #34A853;
  --c-yellow: #FBBC04;
  --c-red: #EA4335;
  --accent-bg: #EEF1FB;
  --primary: var(--c-blue);
  --primary-strong: var(--c-blue);
}
.workflow-project-card {
  display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden;
  min-height: 0; border-top-color: var(--c-blue);
}
.workflow-project-card:nth-child(4n + 2) { border-top-color: var(--c-red); }
.workflow-project-card:nth-child(4n + 3) { border-top-color: var(--c-yellow); }
.workflow-project-card:nth-child(4n + 4) { border-top-color: var(--c-green); }
.workflow-project-card h3 {
  display: flex; align-items: center; min-height: 68px;
  padding: 17px 20px; font-size: 16px; font-weight: 700; line-height: 1.5;
}
.workflow-project-image {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  object-fit: contain; background: var(--surface-2);
  border-block: 1px solid var(--border);
}
.workflow-project-card > p {
  padding: 16px 20px 20px; color: var(--text-muted); font-size: 13px; line-height: 1.7;
}
.workflow-project-card:focus-visible { outline-color: rgba(0, 47, 167, .4); }
.workflow-project-card[hidden] { display: none; }
.workflow-filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 0 12px; }
.workflow-filters button {
  display: inline-flex; align-items: center; gap: 9px; min-height: 42px;
  padding: 9px 15px; border: 1px solid var(--border); border-radius: 24px;
  background: var(--surface); color: var(--text-muted); font: inherit; font-size: 14px; cursor: pointer;
}
.workflow-filters button:hover { border-color: var(--c-blue); color: var(--c-blue); }
.workflow-filters button[aria-pressed="true"] { background: var(--c-blue); border-color: var(--c-blue); color: #fff; }
.workflow-filters button:focus-visible { outline: 3px solid rgba(0, 47, 167, .3); outline-offset: 3px; }
.workflow-filters button span { font-size: 12px; opacity: .8; }
.workflow-filter-status { margin: 0 0 12px; font-size: 13px; color: var(--text-muted); }

body[data-workflow-scope="engineering"] .tabs a[href="https://sophigo.com"]:hover { color: var(--c-blue); }
body[data-workflow-scope="engineering"] .tabs a[href="https://profabx.com"]:hover { color: var(--c-red); }
body[data-workflow-scope="engineering"] .tabs a[href="https://sophicar.com"]:hover { color: var(--c-green); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; padding: 12px 16px; background: var(--surface-2);
  color: var(--text-muted); font-weight: 500; font-size: 12px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .num { font-variant-numeric: tabular-nums; }

/* ---------- 看板 ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .kanban { grid-template-columns: 1fr; } }
.kb-col { background: var(--surface-2); border-radius: var(--r-lg); padding: 12px; }
.kb-col h4 { font-size: 13px; padding: 4px 8px 10px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; font-weight: 500; }
.kb-count { margin-left: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0 8px; font-size: 11px; }
.kb-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--sh-1); }
.kb-card:hover { box-shadow: var(--sh-2); }
.kb-card .t { font-weight: 500; font-size: 13.5px; }
.kb-card .m { font-size: 12px; color: var(--text-muted); margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kb-card .kb-actions { margin-top: 10px; display: flex; gap: 6px; }
.kb-empty { text-align: center; color: var(--text-muted); font-size: 12.5px; padding: 18px 8px; }

/* ---------- 头像 ---------- */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; font-weight: 700;
}
.av-blue { background: #4285F4; } .av-green { background: #0F9D58; } .av-red { background: #DB4437; }
.av-yellow { background: #F4B400; color: #3C4043; } .av-purple { background: #7B61FF; } .av-teal { background: #00ACC1; }
.avatar.lg { width: 44px; height: 44px; font-size: 17px; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }

/* ---------- 表单控件 ---------- */
.pfx-field {
  width: 100%; margin-top: 4px; height: 38px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text);
  font-family: var(--font); font-size: 13.5px; outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.pfx-field:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(66, 133, 244, .18); }
select.pfx-field { appearance: none; -webkit-appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%235F6368' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

/* ---------- 用户 chip 与菜单 ---------- */
.user-chip {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--r-pill); padding: 4px 10px 4px 4px; cursor: pointer;
  transition: box-shadow .15s var(--ease);
  font-family: var(--font);
}
.user-chip:hover { box-shadow: var(--sh-2); }
.user-chip .uname { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.user-chip .uname b { font-size: 12.5px; font-weight: 500; }
.user-chip .uname small { font-size: 10.5px; color: var(--text-muted); }
.user-menu {
  position: absolute; right: 20px; top: calc(var(--appbar-h) - 8px); z-index: 120;
  width: 280px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--sh-3); padding: 8px 0;
  animation: pop .14s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.user-menu .um-head { padding: 12px 16px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.user-menu .um-head b { display: block; }
.user-menu .um-head small { color: var(--text-muted); }
.user-menu button {
  display: flex; width: 100%; align-items: center; gap: 10px;
  padding: 10px 16px; background: none; border: none; cursor: pointer;
  font-family: var(--font); font-size: 13.5px; color: var(--text-2); text-align: left;
}
.user-menu button:hover { background: var(--surface-2); }
.user-menu button .ms { color: var(--text-muted); }

/* ---------- 对话框 ---------- */
.dlg { border: none; padding: 0; border-radius: var(--r-xl); background: var(--surface); color: var(--text); box-shadow: var(--sh-3); max-width: min(520px, calc(100vw - 32px)); width: 100%; }
.dlg::backdrop { background: rgba(32, 33, 36, .45); backdrop-filter: blur(2px); }
.dlg[open] { animation: pop .18s var(--ease); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 4px; }
.dlg-head h3 { font-size: 18px; }
.dlg-body { padding: 16px 24px 24px; }
.dlg-foot { padding: 0 24px 24px; display: flex; gap: 10px; justify-content: flex-end; }
.dlg-close { width: 34px; height: 34px; }

/* ---------- AI 命令面板 ---------- */
.palette { max-width: min(720px, calc(100vw - 32px)); }
.palette-search {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.palette-search .ms { color: var(--primary); font-size: 22px; }
.palette-search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: var(--font); font-size: 16px; color: var(--text); height: 40px;
}
.palette-search kbd { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; font-size: 11px; color: var(--text-muted); }
.palette-body { padding: 16px 20px 20px; max-height: 60vh; overflow-y: auto; }
.palette-hint p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.palette-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.palette-chips button {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  border-radius: var(--r-pill); padding: 6px 14px; font-size: 12.5px; cursor: pointer; font-family: var(--font);
}
.palette-chips button:hover { background: var(--accent-bg); border-color: var(--primary); color: var(--primary-strong); }
.palette-answer .pa-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.palette-answer .pa-head .chip { font-weight: 500; }
.palette-answer .pa-text { margin-top: 10px; font-size: 14px; color: var(--text-2); white-space: pre-wrap; }
.palette-answer .pa-sources { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.pa-source { display: flex; gap: 8px; align-items: center; font-size: 12.5px; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 7px 10px; color: var(--text-2); background: var(--surface); }
.pa-source .ms { font-size: 16px; color: var(--text-muted); }
.pa-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

.typing { display: inline-flex; gap: 5px; align-items: center; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 70%, 100% { opacity: .25; transform: scale(.8); } 35% { opacity: 1; transform: scale(1); } }

/* ---------- Toast ---------- */
.toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #323232; color: #fff; font-size: 13.5px; padding: 11px 20px;
  border-radius: var(--r-pill); box-shadow: var(--sh-3);
  display: flex; align-items: center; gap: 8px;
  animation: pop .2s var(--ease);
}
.toast .ms { font-size: 18px; }
.toast.ok .ms { color: #81C995; } .toast.err .ms { color: #F28B82; } .toast.info .ms { color: #8AB4F8; }

/* ---------- 动态 feed ---------- */
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: none; }
.feed-item .fi-ico {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-bg); color: var(--primary-strong);
}
.feed-item .fi-ico .ms { font-size: 18px; }
.feed-item .fi-main { flex: 1; min-width: 0; }
.feed-item .fi-t { font-size: 13.5px; font-weight: 500; }
.feed-item .fi-d { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.feed-item .fi-time { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }

/* ---------- 图文卡片 ---------- */
.module-card { display: flex; flex-direction: column; gap: 12px; }
.module-card .mc-head { display: flex; align-items: center; gap: 12px; }
.module-card .mc-ico {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.module-card .mc-ico .ms { font-size: 24px; }
.mc-ico.blue { background: var(--c-blue); } .mc-ico.green { background: var(--c-green); }
.mc-ico.red { background: var(--c-red); } .mc-ico.yellow { background: var(--c-yellow); color: #3C4043; }
.mc-ico.gray { background: var(--muted); }
.module-card h3 { font-size: 17px; }
.module-card .mc-tag { font-size: 11.5px; color: var(--text-muted); font-weight: 500; letter-spacing: .04em; }
.module-card ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.module-card li { margin: 4px 0; }
.module-card p { color: var(--text-2); font-size: 13.5px; }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 22px; }
.tl-item::before {
  content: ""; position: absolute; left: -24px; top: 5px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--primary);
}
.tl-item.done::before { background: var(--c-green); border-color: var(--c-green); }
.tl-item.todo::before { border-color: var(--line-strong); }
.tl-item h4 { font-size: 14px; }
.tl-item p { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 22px 20px 30px; }
.footer-inner p { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.footer-inner b { color: var(--text-2); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.footer-links a { font-size: 12.5px; }

/* ---------- 登录对话框 ---------- */
.login-logo {
  width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 12px;
  background: linear-gradient(135deg, #00A2E0, #0070E0);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 24px; box-shadow: var(--sh-2);
}
.login-note { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 16px; }
.demo-account {
  display: flex; width: 100%; align-items: center; gap: 12px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 8px;
  cursor: pointer; font-family: var(--font); text-align: left;
  transition: box-shadow .15s var(--ease), border-color .15s var(--ease);
}
.demo-account:hover { box-shadow: var(--sh-2); border-color: var(--primary); }
.demo-account b { display: block; font-size: 13.5px; color: var(--text); }
.demo-account small { color: var(--text-muted); font-size: 12px; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--text-muted); font-size: 12px; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.fs-btn {
  width: 100%; height: 44px; border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--text);
  transition: box-shadow .15s var(--ease);
}
.fs-btn:hover { box-shadow: var(--sh-2); }
.fs-btn .fs-ico {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, #00A2E0, #0070E0);
  color: #fff; font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- 接口能力卡 ---------- */
.iface-card { display: flex; flex-direction: column; }
.iface-card .if-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.iface-card .if-ico {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent-bg); color: var(--primary-strong);
  display: inline-flex; align-items: center; justify-content: center;
}
.iface-card code {
  display: block; margin-top: 10px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 8px 10px; font-size: 11.5px; color: var(--text-2);
  overflow-x: auto; white-space: nowrap;
}

/* ---------- 日志 / Markdown ---------- */
.md { max-width: 860px; }
.md h1 { font-size: var(--fs-28); margin: 8px 0 14px; }
.md h2 { font-size: var(--fs-20); margin: 30px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.md h3 { font-size: var(--fs-16); margin: 22px 0 10px; }
.md h4 { font-size: 14px; margin: 18px 0 8px; }
.md p { margin: 10px 0; color: var(--text-2); }
.md ul, .md ol { margin: 10px 0; padding-left: 24px; color: var(--text-2); }
.md li { margin: 4px 0; }
.md code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: 12.5px; }
.md pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; overflow-x: auto; margin: 12px 0; }
.md pre code { background: none; border: none; padding: 0; font-size: 12.5px; line-height: 1.7; }
.md blockquote { margin: 12px 0; padding: 10px 16px; border-left: 4px solid var(--primary); background: var(--accent-bg); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--text-2); }
.md a { font-weight: 500; }
.md hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.md table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 13px; }
.md th, .md td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.md th { background: var(--surface-2); }
.md img { max-width: 100%; border-radius: var(--r-md); }

/* ---------- 工具类 ---------- */
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.muted { color: var(--text-muted); } .small { font-size: 12.5px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.tag-owner { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 6px; }
.owner-go { background: var(--green-bg); color: var(--c-green); }
.owner-pfx { background: var(--accent-bg); color: var(--primary-strong); }
.owner-sm { background: var(--red-bg); color: var(--c-red); }
.owner-ext { background: var(--yellow-bg); color: #B06000; }
.owner-studio { background: var(--gray-bg); color: var(--text-muted); }

@media (max-width: 760px) {
  .appbar { height: auto; }
  .appbar-inner { height: auto; min-height: var(--appbar-h); gap: 8px; padding: 8px 12px 0; flex-wrap: wrap; }
  .brand-logo { width: 118px; }
  .brand-text { display: none; }
  .tabs { order: 3; width: 100%; height: 44px; border-top: 1px solid var(--border); }
  .tabs a { height: 44px; padding: 0 12px; font-size: 13px; }
  .tabs a .ms { display: none; }
  .mode-pill { display: none; }
  .view { padding: 18px 12px 48px; }
  .overview-architecture img { width: 760px; max-width: none; }
}

/* School projects: preserve both the graduation brief and the general course. */
.overview-school-card + .overview-school-card { margin-top: 18px; }
