/* ============================================================
   daily-digest · 「墨蓝档案」设计系统
   零依赖 · 双击 index.html 即开 · 自动适配深浅色
   字体：宋体标题（档案感）+ 系统黑体正文 + 等宽数字/路径
   色彩：墨黑蓝正文 · 深科技蓝主色 · 翡翠绿(运转) · 暖橙(受阻)
   ============================================================ */

:root {
  color-scheme: light;
  --paper: #f4f2ec;          /* 档案纸底 */
  --card: #fdfcf8;           /* 卡片纸面 */
  --ink: #1d2733;            /* 墨黑蓝 */
  --muted: #61707b;
  --line: #e3ddd0;
  --line-strong: #cbc4b2;

  --blue: #14506e;           /* 深科技蓝 · 主色 */
  --blue-contrast: #ffffff;
  --blue-soft: #e4edf2;

  --emerald: #0b7a55;        /* 翡翠绿 · 运转/播放 */
  --emerald-contrast: #ffffff;
  --emerald-soft: #dff0e8;

  --alert: #b3402a;          /* 砖红 · 受阻 */
  --alert-soft: #f7e5df;

  --amber: #8f6400;          /* 琥珀 · 待验收 */
  --amber-soft: #f4ead0;

  --slate: #5c6b75;          /* 石板灰 · 静默 */
  --slate-soft: #e7e9e7;

  --shadow: 0 1px 2px rgba(29, 39, 51, .05), 0 6px 20px rgba(29, 39, 51, .06);
  --shadow-pop: 0 8px 24px rgba(10, 16, 22, .22), 0 24px 64px rgba(10, 16, 22, .28);

  --serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #10161c;
    --card: #16202a;
    --ink: #e5eaee;
    --muted: #93a1ab;
    --line: #26333e;
    --line-strong: #36454f;

    --blue: #74b9dd;
    --blue-contrast: #0c1a24;
    --blue-soft: #1c2c38;

    --emerald: #4ecb9d;
    --emerald-contrast: #06231a;
    --emerald-soft: #143126;

    --alert: #e98970;
    --alert-soft: #341c15;

    --amber: #d9a94f;
    --amber-soft: #2e2410;

    --slate: #93a1ab;
    --slate-soft: #1f2932;

    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-pop: 0 8px 24px rgba(0, 0, 0, .5), 0 24px 64px rgba(0, 0, 0, .55);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px 64px; }

/* ---------- 顶部导航（档案页眉） ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 20px;
  padding: 13px 20px;
  margin: 0 -20px 30px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-strong);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); flex: none;
}
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 14px; font-weight: 700;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b { font-family: var(--serif); font-size: 15px; letter-spacing: .02em; }
.brand-text span { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .14em; }
.nav .links { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.nav .links a {
  color: var(--muted); text-decoration: none; font-size: 13.5px;
  padding: 4px 10px; border-radius: 7px; border: 1px solid transparent;
  white-space: nowrap; transition: color .15s, border-color .15s;
}
.nav .links a:hover { color: var(--ink); }
.nav .links a.active,
.nav .links a.is-active {
  color: var(--blue); border-color: var(--line-strong); background: var(--card);
  font-weight: 600;
}

/* ---------- 首页三视图切换（总览 / 项目大盘 / 云端发射台） ----------
   三个 .view 互斥显示（hidden 属性整块移出文档流，滑动互不串场）；
   display 由 none 变回 block 时动画自动重播，形成柔和的入场淡入。
   prefers-reduced-motion 下由全局规则禁用动画。 */
.view { animation: view-fade .25s ease both; }
@keyframes view-fade { from { opacity: 0; } }

/* ---------- 日报归档导航条（只出现在日报详情页，全局导航栏保持 5 个固定入口） ---------- */
.archive-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 13px; padding: 10px 12px; margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.ab-tag {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); padding: 0 10px 0 8px; align-self: center;
  border-right: 1px solid var(--line-strong); white-space: nowrap;
}
.ab-step {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 12px; border-radius: 10px; min-width: 0;
  border: 1px solid var(--line); background: var(--paper);
  text-decoration: none; color: var(--ink);
  transition: border-color .15s, color .15s, background .15s;
}
a.ab-step:hover { border-color: var(--blue); color: var(--blue); background: var(--card); }
a.ab-step:hover .ab-dir small { color: inherit; }
.ab-step.is-disabled { opacity: .42; cursor: default; }
.ab-arrow { font-size: 15px; line-height: 1; flex: none; }
.ab-dir { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.ab-dir small {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  letter-spacing: .1em; white-space: nowrap;
}
.ab-dir b { font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.ab-picker {
  margin-left: auto; display: flex; align-items: center; gap: 9px;
  flex: 1 1 250px; max-width: 430px; min-width: 0;
}
.ab-picker-label {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  white-space: nowrap; letter-spacing: .04em;
}
.report-picker-wrap { position: relative; flex: 1; min-width: 0; }
.report-picker {
  width: 100%; appearance: none; -webkit-appearance: none;
  font-family: var(--mono); font-size: 12.5px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 8px 30px 8px 12px;
  cursor: pointer; transition: border-color .15s;
}
.report-picker:hover { border-color: var(--blue); }
.report-picker-wrap::after {
  content: ""; position: absolute; right: 13px; top: 50%;
  width: 7px; height: 7px; pointer-events: none;
  border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
}

/* ---------- 页眉 hero ---------- */
.hero { padding: 26px 0 22px; }
.kicker {
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--blue); margin: 0 0 10px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(27px, 4.5vw, 38px);
  line-height: 1.3; letter-spacing: .02em; margin: 0 0 10px;
}
.hero .sub { color: var(--muted); font-size: 14.5px; max-width: 46em; margin: 0 0 22px; }

.double-rule {
  border-top: 2px solid var(--ink);
  position: relative; margin-bottom: 26px;
}
.double-rule::after {
  content: ""; position: absolute; left: 0; right: 0; top: 3px;
  border-top: 1px solid var(--line-strong);
}

/* 数据速览：编辑部风，竖线分隔而非卡片堆 */
.stats { display: flex; flex-wrap: wrap; row-gap: 14px; }
.stat { padding-right: 26px; margin-right: 26px; border-right: 1px solid var(--line-strong); }
.stat:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.stat b { display: block; font-family: var(--mono); font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.stat span { font-size: 12.5px; color: var(--muted); }

/* ---------- 区块标题 ---------- */
.sec { margin-top: 46px; }
.sec-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 9px; margin-bottom: 20px;
}
.sec-no { font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: var(--blue); letter-spacing: .1em; }
.sec-title { font-family: var(--serif); font-size: 21px; font-weight: 700; margin: 0; letter-spacing: .02em; }
.sec-sub { margin-left: auto; color: var(--muted); font-size: 12.5px; }

/* ---------- 日报卡片 ---------- */
.day-card {
  display: block; position: relative;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px 24px; margin-bottom: 14px;
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.day-card:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: var(--shadow-pop); }
.day-card .top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.day-card .date { font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: .02em; }
.day-card .weekday { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.day-card .chips { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  font-size: 11.5px; font-family: var(--mono); padding: 2px 9px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  color: var(--muted); background: var(--paper); white-space: nowrap;
}
.day-card .summary { color: var(--muted); margin-top: 9px; font-size: 14px; }
.day-card .go { color: var(--blue); font-size: 13px; margin-top: 10px; font-weight: 600; }

/* ---------- 状态徽章（时间轴/台账通用） ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 2.5px 10px;
  border-radius: 999px; border: 1px solid; white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill-run     { color: var(--emerald); background: var(--emerald-soft); border-color: color-mix(in srgb, var(--emerald) 35%, transparent); }
.pill-blocked { color: var(--alert);   background: var(--alert-soft);   border-color: color-mix(in srgb, var(--alert) 35%, transparent); }
.pill-wait    { color: var(--amber);   background: var(--amber-soft);   border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.pill-idle    { color: var(--slate);   background: var(--slate-soft);   border-color: color-mix(in srgb, var(--slate) 35%, transparent); }

.badge {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 1.5px 9px; border-radius: 6px; vertical-align: 1.5px; margin-right: 6px;
}
.badge.good { background: var(--emerald-soft); color: var(--emerald); }
.badge.warn { background: var(--amber-soft); color: var(--amber); }
.badge.info { background: var(--blue-soft); color: var(--blue); }
.badge.idle { background: var(--slate-soft); color: var(--slate); }

.mono-chip {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 1px 7px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font: 600 13px/1 var(--sans); letter-spacing: .01em;
  padding: 8px 14px; border-radius: 8px;
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none; user-select: none; -webkit-user-select: none;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 13px; height: 13px; flex: none; }
.btn-primary { background: var(--blue); color: var(--blue-contrast); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-play { background: var(--emerald); color: var(--emerald-contrast); }
.btn-play:hover { filter: brightness(1.1); }
.btn-line { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-line:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); background: var(--paper); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 7px; }

/* 时间轴 */
.tl { list-style: none; margin: 0; padding: 0; }
.tl-item { position: relative; padding: 0 0 15px 24px; }
.tl-item:last-child { padding-bottom: 2px; }
.tl-item::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--line-strong);
}
.tl-item.is-new::before { border-color: var(--emerald); background: var(--emerald); }
.tl-rail { position: relative; }
.tl-rail::before {
  content: ""; position: absolute; left: 6px; top: 9px; bottom: 12px;
  width: 1px; background: var(--line-strong);
}
.tl-row { display: flex; gap: 10px; align-items: baseline; }
.tl-date {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--muted); flex: none; min-width: 40px;
}
.tl-item.is-new .tl-date { color: var(--emerald); }
.tl-body { font-size: 13.5px; color: var(--ink); line-height: 1.7; }
.tl-body code { font-family: var(--mono); font-size: 12px; background: var(--blue-soft); color: var(--blue); padding: 0 5px; border-radius: 5px; }
.tl-tag {
  display: inline-block; font-style: normal; font-family: var(--mono);
  font-size: 10.5px; color: var(--emerald);
  border: 1px solid color-mix(in srgb, var(--emerald) 40%, transparent);
  border-radius: 5px; padding: 0 5px; margin-left: 7px; vertical-align: 1px;
}

/* ---------- 日报正文 ---------- */
.article {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 34px 38px; box-shadow: var(--shadow);
}
.article h1 { font-family: var(--serif); font-size: clamp(23px, 3.4vw, 30px); margin: 0 0 6px; letter-spacing: .02em; }
.article .meta { font-family: var(--mono); color: var(--muted); font-size: 12.5px; margin-bottom: 24px; }
.article h2 {
  font-family: var(--serif); font-size: 20px; letter-spacing: .02em;
  margin: 40px 0 14px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.article h2 .no { font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: var(--blue); letter-spacing: .1em; }
.article h3 { font-family: var(--serif); font-size: 16.5px; margin: 22px 0 8px; }
.article p { margin: 10px 0; }
.article ul, .article ol { padding-left: 22px; margin: 10px 0; }
.article li { margin: 6px 0; }
.article strong { color: var(--blue); font-weight: 700; }
.article code {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--blue-soft); color: var(--blue);
  padding: 1px 6px; border-radius: 6px;
}
.article table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 13.8px; }
.article th, .article td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.article th {
  font-family: var(--serif); font-weight: 700;
  background: color-mix(in srgb, var(--paper) 55%, var(--card));
  white-space: nowrap;
}
.article hr { border: none; border-top: 1px solid var(--line); margin: 30px 0 14px; }
.article .footnote { color: var(--muted); font-size: 12.5px; }

/* 移动端表格横向滚动容器 */
.tw { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.tw table { min-width: 640px; }

.callout {
  margin: 18px 0; padding: 13px 17px;
  background: color-mix(in srgb, var(--paper) 55%, var(--card));
  border: 1px solid var(--line); border-left: 3px solid var(--blue);
  border-radius: 0 11px 11px 0; font-size: 14px;
}
.callout .lead { font-weight: 700; color: var(--blue); }

/* ---------- KPI 速览 ---------- */
.kpi-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px; margin: 20px 0 6px;
}
.kpi {
  background: color-mix(in srgb, var(--paper) 55%, var(--card));
  border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 8px; text-align: center;
}
.kpi b { display: block; font-family: var(--mono); font-size: 25px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.kpi span { font-size: 12px; color: var(--muted); }

/* ---------- 核心交付物卡片 ---------- */
.deliv-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 14px; margin: 16px 0 8px;
}
.deliv {
  position: relative;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 13px; padding: 15px 18px 15px 21px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.deliv::before {
  content: ""; position: absolute; left: 0; top: 15px; bottom: 15px;
  width: 3px; border-radius: 3px; background: var(--slate);
}
.deliv--video::before { background: var(--blue); }
.deliv--html::before  { background: var(--emerald); }
.deliv:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.deliv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.deliv-title { font-family: var(--serif); font-weight: 700; font-size: 15.5px; line-height: 1.45; margin: 0; }
.deliv-tag {
  font-family: var(--mono); font-size: 10.5px; white-space: nowrap;
  color: var(--muted); background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 2px 8px;
  margin-top: 2px;
}
.deliv-path {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  background: var(--paper); border: 1px dashed var(--line-strong);
  padding: 6px 9px; border-radius: 8px; overflow-wrap: anywhere; word-break: break-word;
  cursor: copy; transition: color .15s, border-color .15s;
}
.deliv-path:hover { color: var(--blue); border-color: var(--blue); }
.deliv-path.is-copied { color: var(--emerald); border-color: var(--emerald); border-style: solid; }
.deliv-desc { font-size: 13px; color: var(--muted); line-height: 1.65; margin: 0; }
.deliv-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 2px; }
.deliv-actions .btn { padding: 7px 12px; font-size: 12.5px; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.hint b { color: var(--ink); }

/* ---------- 交付物分类汇总概览与归属筛选器 ---------- */
.deliv-panel {
  background: color-mix(in srgb, var(--paper) 55%, var(--card));
  border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; margin: 14px 0 2px;
}
.deliv-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.dsum {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 11px; padding: 11px 13px;
  border-left-width: 3px;
}
.dsum--all b     { color: var(--ink); }
.dsum--all       { border-left-color: var(--ink); }
.dsum--project   { border-left-color: var(--blue); }
.dsum--project .dsum-label { color: var(--blue); }
.dsum--explore   { border-left-color: var(--amber); }
.dsum--explore .dsum-label { color: var(--amber); }
.dsum b {
  display: block; font-family: var(--mono); font-size: 21px;
  font-weight: 700; line-height: 1.25;
}
.dsum-label { display: block; font-size: 12.5px; font-weight: 700; margin-top: 1px; }
.dsum small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.55; margin-top: 3px; }

.deliv-tabs {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
}
.deliv-tabs-label {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: .12em;
}
.dtab {
  font: 600 12.5px/1 var(--sans); color: var(--muted);
  background: var(--card); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 7px 14px; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.dtab:hover { color: var(--ink); border-color: var(--ink); }
.dtab.is-active { color: var(--blue-contrast); background: var(--blue); border-color: var(--blue); }
.deliv-count {
  margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--muted);
}

/* ---------- 交付物卡片 · 产生会话/项目归属标记 ---------- */
.deliv[hidden] { display: none; }
.deliv-origin {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; line-height: 1.5; color: var(--muted);
  padding: 2px 8px; border-radius: 6px; margin: 0;
  background: var(--paper); border: 1px solid var(--line-strong);
}
.origin-badge {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  padding: 1px 5px; border-radius: 4px;
}
.origin-project .origin-badge { color: var(--blue); background: var(--blue-soft); }
.origin-explore .origin-badge { color: var(--muted); background: var(--card); border: 1px solid var(--line-strong); }

/* ---------- 待办事项 ---------- */
.action-box {
  background: color-mix(in srgb, var(--paper) 55%, var(--card));
  border: 1px solid var(--line); border-left: 3px solid var(--amber);
  border-radius: 0 11px 11px 0; padding: 13px 16px; margin: 10px 0;
}
.action-box.p0 { border-left-color: var(--alert); }
.action-box.p2 { border-left-color: var(--slate); }
.action-title { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.action-title .prio {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  padding: 1px 8px; border-radius: 6px; margin-left: auto;
}
.action-box .prio { background: var(--amber-soft); color: var(--amber); }
.action-box.p0 .prio { background: var(--alert-soft); color: var(--alert); }
.action-box.p2 .prio { background: var(--slate-soft); color: var(--slate); }
.action-box p { margin: 5px 0 0; font-size: 13.5px; color: var(--muted); }
.action-box p code { font-family: var(--mono); font-size: 12px; background: var(--blue-soft); color: var(--blue); padding: 0 5px; border-radius: 5px; }

/* ---------- 视频弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 22px; }
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(7, 11, 15, .74);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.modal-box {
  position: relative; width: min(880px, 100%);
  max-height: calc(100vh - 44px); overflow: auto;
  background: var(--card); border: 1px solid var(--line-strong);
  border-radius: 15px; box-shadow: var(--shadow-pop);
  animation: modal-pop .2s ease;
}
@keyframes modal-pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px 13px; border-bottom: 1px solid var(--line);
}
.modal-kicker { font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em; color: var(--emerald); text-transform: uppercase; }
.modal-head h3 { font-family: var(--serif); font-size: 17px; margin: 1px 0 0; letter-spacing: .02em; }
.modal-close {
  flex: none; width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line);
  color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s;
}
.modal-close:hover { color: var(--ink); border-color: var(--line-strong); }
.modal-close svg { width: 15px; height: 15px; }
.modal-stage { position: relative; background: #0a0e12; aspect-ratio: 16 / 9; }
.modal-stage video { display: block; width: 100%; height: 100%; }
.video-fallback {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  padding: 26px; text-align: center;
}
.video-fallback[hidden] { display: none; }
.video-fallback p { color: #aeb9c2; font-size: 13.5px; max-width: 34em; margin: 0; line-height: 1.7; }
.modal-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 18px 14px; border-top: 1px solid var(--line);
}
.modal-path {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  background: var(--paper); border: 1px dashed var(--line-strong);
  border-radius: 8px; padding: 6px 10px; word-break: break-all;
  flex: 1 1 260px; cursor: copy;
}
.modal-foot .btn { flex: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 64px; z-index: 130;
  transform: translate(-50%, 14px);
  background: var(--ink); color: var(--paper);
  font-size: 13px; font-weight: 600;
  padding: 10px 18px; border-radius: 10px;
  box-shadow: var(--shadow-pop);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 沉淀库条目 ---------- */
.entry {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px 24px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.entry h2 { font-family: var(--serif); font-size: 17.5px; margin: 0 0 6px; letter-spacing: .02em; }
.entry .meta { font-family: var(--mono); color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.entry p { margin: 8px 0; }
.entry ul, .entry ol { padding-left: 22px; margin: 8px 0; }
.entry li { margin: 5px 0; }
.entry strong { color: var(--blue); }
.entry code { font-family: var(--mono); font-size: 12.5px; background: var(--blue-soft); color: var(--blue); padding: 1px 6px; border-radius: 6px; }

/* ---------- 页脚 ---------- */
footer {
  color: var(--muted); font-size: 12.5px; text-align: center;
  margin-top: 44px; padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
}
footer a { color: var(--blue); text-decoration: none; font-weight: 600; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .sec-sub { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 14px 48px; }
  .nav { margin: 0 -14px 22px; padding: 11px 14px; gap: 10px; }
  .brand-text span { display: none; }
  .nav .links a { padding: 4px 8px; font-size: 12.5px; }
  .article { padding: 22px 17px; border-radius: 13px; }
  .stat { padding-right: 16px; margin-right: 16px; }
  .stat b { font-size: 20px; }
  .day-card { padding: 16px 16px; }
  .deep { padding: 18px 15px; border-radius: 13px; }
  .schools, .org-grid { grid-template-columns: 1fr; }
  .health-strip { flex-direction: column; }
  .hs-item { border-right: none; border-bottom: 1px solid var(--line); }
  .hs-item:last-child { border-bottom: none; }
  .day-card .chips { margin-left: 0; }
  .modal { padding: 10px; }
  .modal-foot { padding: 10px 12px 12px; }
  /* 归档导航条：窄屏时选择器独占一行，上一篇/下一篇对半分 */
  .archive-bar { gap: 8px; }
  .ab-tag { display: none; }
  .ab-step { flex: 1; justify-content: center; }
  .ab-picker { order: 3; flex-basis: 100%; max-width: none; }
  /* 16px 以上可避免 iOS Safari 聚焦下拉框时强制放大页面 */
  .report-picker { font-size: 16px; }
  /* 分类汇总：窄屏单列，筛选计数独占一行 */
  .deliv-panel { padding: 12px 12px; }
  .deliv-summary { grid-template-columns: 1fr; }
  .deliv-count { flex-basis: 100%; margin-left: 0; }
}

/* 极窄屏：只留「日」字标，5 个导航链接改为横向平滑滑动——
   加大 a 的左右内边距保证拇指触控不误触；
   注意不能用 flex-end：滚动容器配 flex-end 会把起始链接挤到够不着的区域 */
@media (max-width: 480px) {
  .brand-text { display: none; }
  .nav { gap: 8px; }
  .nav .links {
    justify-content: flex-start; flex-wrap: nowrap;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; min-width: 0; gap: 14px;
  }
  .nav .links::-webkit-scrollbar { display: none; }
  .nav .links a { padding: 6px 10px; }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .day-card:hover, .deliv:hover { transform: none; }
}

/* ============================================================
   v2 · 健康度驾驶舱扩展
   模块：业务闭环飞轮 / 深度体检卡 / 四大攻坚复盘
   原则：单色微标签 + 精致边框，零渐变零 emoji，全部走现有变量
   ============================================================ */

/* ---------- 健康度得分胶囊 ---------- */
.score-pill {
  display: inline-flex; align-items: baseline; gap: 5px;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  padding: 4px 13px; border-radius: 999px; border: 1px solid;
  white-space: nowrap; line-height: 1.5; flex: none;
}
.score-pill::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: currentColor; align-self: center; flex: none;
}
.score-pill b { font-size: 15px; font-weight: 700; }
.score-pill small { font-weight: 600; letter-spacing: .05em; }
.score-pill--sm { padding: 2px 10px; font-size: 11px; gap: 4px; }
.score-pill--sm b { font-size: 12.5px; }
.score-pill--sm::before { width: 6px; height: 6px; }
.score--good { color: var(--emerald); background: var(--emerald-soft); border-color: color-mix(in srgb, var(--emerald) 38%, transparent); }
.score--mid  { color: var(--amber);   background: var(--amber-soft);   border-color: color-mix(in srgb, var(--amber) 38%, transparent); }
.score--bad  { color: var(--alert);   background: var(--alert-soft);   border-color: color-mix(in srgb, var(--alert) 38%, transparent); }

/* ---------- 模块 A · 业务闭环飞轮大图 ---------- */
.flow-map {
  display: grid; grid-template-columns: 1fr 34px 1fr 34px 1fr;
  align-items: stretch; margin-bottom: 0;
}
.fm-stage {
  min-width: 0; display: flex; flex-direction: column; gap: 9px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 13px; padding: 15px 16px; box-shadow: var(--shadow);
}
.fm-stage-head { display: flex; flex-direction: column; gap: 2px; border-bottom: 1px dashed var(--line-strong); padding-bottom: 10px; }
.fm-stage-name { font-family: var(--serif); font-weight: 700; font-size: 16.5px; letter-spacing: .02em; }
.fm-stage-en { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--blue); }
.fm-chip {
  border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 11px; background: color-mix(in srgb, var(--paper) 60%, var(--card));
  min-width: 0;
}
.fm-chip b { display: block; font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--blue); letter-spacing: .02em; overflow-wrap: anywhere; }
.fm-chip span { display: block; font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 2px; }
.fm-arrow { display: grid; place-items: center; color: var(--muted); font-size: 18px; }
/* 基础设施层专属箭头：桌面端飞轮横排、infra 横贯全宽，无需箭头（不占栅格位）；
   移动端竖排时显示（见文末 v2 覆盖块），与上方箭头同款转向下，视觉流向连贯 */
.fm-arrow--infra { display: none; }
.fm-infra {
  grid-column: 1 / -1; margin-top: 12px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  background: var(--blue-soft); border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent);
  border-radius: 13px; padding: 13px 16px;
}
.fm-infra .fm-chip { background: var(--card); }
.fm-loop {
  margin-top: 12px; padding: 10px 15px;
  border: 1px dashed var(--line-strong); border-radius: 11px;
  font-size: 13px; color: var(--muted); line-height: 1.7;
}
.fm-loop b { color: var(--ink); }
.fm-loop .loop-mark { font-family: var(--mono); color: var(--blue); font-weight: 700; margin-right: 6px; }

/* ---------- 模块 B · 健康度总览条 ---------- */
.health-strip {
  background: var(--card); border: 1px solid var(--line); border-radius: 13px;
  box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden;
}
.hs-row { display: flex; flex-wrap: wrap; }
.hs-item { flex: 1 1 150px; padding: 15px 20px; border-right: 1px solid var(--line); min-width: 0; }
.hs-item:last-child { border-right: none; }
.hs-item b { display: block; font-family: var(--mono); font-size: 23px; font-weight: 700; line-height: 1.25; }
.hs-item span { font-size: 12px; color: var(--muted); }
.hs-good b { color: var(--emerald); }
.hs-mid b { color: var(--amber); }
.hs-bad b { color: var(--alert); }
.dist-bar { display: flex; height: 9px; margin: 2px 20px 0; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.dist-bar i { display: block; height: 100%; }
.dist-bar .d-good { background: var(--emerald); flex: 5; }
.dist-bar .d-mid { background: var(--amber); flex: 3; }
.dist-bar .d-bad { background: var(--alert); flex: 1; }
.dist-legend {
  display: flex; gap: 16px; flex-wrap: wrap; padding: 9px 20px 13px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.dist-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.dist-legend .lg-good i { background: var(--emerald); }
.dist-legend .lg-mid i { background: var(--amber); }
.dist-legend .lg-bad i { background: var(--alert); }

/* ---------- 模块 B · 深度体检卡（内容块，卡片外壳见 v3 工作台） ---------- */
.hc-name { font-family: var(--serif); font-size: 19px; font-weight: 700; margin: 0; line-height: 1.4; letter-spacing: .02em; }
.hc-idline { font-family: var(--mono); font-size: 12px; color: var(--blue); margin: 3px 0 0; letter-spacing: .04em; }
.hc-pos { font-size: 13.5px; color: var(--muted); margin: 7px 0 0; max-width: 46em; }
.hc-grid { display: grid; grid-template-columns: 5fr 6fr; padding: 15px 22px 3px; }
.hc-cell { min-width: 0; }
.hc-cell + .hc-cell { border-left: 1px solid var(--line); padding-left: 18px; margin-left: 18px; }
.hc-label {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: .16em; color: var(--muted); text-transform: uppercase;
  margin: 0 0 9px;
}
.hc-label::before { content: ""; width: 5px; height: 5px; background: var(--blue); flex: none; }
.dir-tree {
  font-family: var(--mono); font-size: 11.8px; line-height: 1.9;
  background: color-mix(in srgb, var(--paper) 70%, var(--card));
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px;
  overflow-wrap: anywhere;
}
.dir-tree b { color: var(--blue); font-weight: 700; }
.dir-note { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.65; margin-top: 8px; }
.norm-tag {
  flex: none; font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 5px; border: 1px solid; margin-top: 2px; white-space: nowrap;
}
.norm-tag--ok { color: var(--emerald); background: var(--emerald-soft); border-color: color-mix(in srgb, var(--emerald) 35%, transparent); }
.norm-tag--warn { color: var(--amber); background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.norm-tag--bad { color: var(--alert); background: var(--alert-soft); border-color: color-mix(in srgb, var(--alert) 35%, transparent); }
.pipe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; row-gap: 8px; }
.pipe-step {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.5;
  background: color-mix(in srgb, var(--paper) 70%, var(--card));
  border: 1px solid var(--line-strong); border-radius: 7px;
  padding: 3px 9px; color: var(--ink);
}
.pipe-step--src { border-color: color-mix(in srgb, var(--blue) 45%, transparent); color: var(--blue); }
.pipe-step--out { border-color: color-mix(in srgb, var(--emerald) 45%, transparent); color: var(--emerald); }
.pipe-arrow { color: var(--muted); font-size: 12px; flex: none; }
.hc-stage {
  border: 1px solid var(--line); border-left: 3px solid var(--blue);
  background: color-mix(in srgb, var(--paper) 55%, var(--card));
  border-radius: 0 10px 10px 0; padding: 11px 14px;
  font-size: 13px; line-height: 1.7;
}
.hc-stage .stage-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.hc-stage .stage-title { font-weight: 700; font-size: 13.5px; }
.stage-tag {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 5px; border: 1px solid var(--line-strong); color: var(--muted);
}
.hc-stage--ok { border-left-color: var(--emerald); }
.hc-stage--warn { border-left-color: var(--amber); }
.hc-stage--danger { border-left-color: var(--alert); }
.hc-stage--danger .stage-title { color: var(--alert); }
.hc-stage--warn .stage-title { color: var(--amber); }
.hc-stage--ok .stage-title { color: var(--emerald); }
.hc-stage p { margin: 4px 0 0; color: var(--muted); }
.hc-stage p b { color: var(--ink); }
.hc-tl { margin-top: 14px; }
.hc-tl .hc-label { margin-bottom: 10px; }

/* ---------- 日报页 · 四大深度攻坚复盘卡 ---------- */
.deep {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 24px 28px; margin: 0 0 18px;
}
.deep-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 1px dashed var(--line-strong); padding-bottom: 12px; margin-bottom: 15px; }
.deep-no {
  flex: none; font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  color: var(--blue); letter-spacing: .12em;
  border: 1px solid color-mix(in srgb, var(--blue) 40%, transparent);
  background: var(--blue-soft); border-radius: 7px; padding: 3px 9px;
}
.deep-title { font-family: var(--serif); font-size: 19px; font-weight: 700; margin: 0; letter-spacing: .02em; }
.deep-meta { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.deep-story { font-size: 14px; margin: 0 0 12px; }
.deep-story b { color: var(--blue); }
.deep-sec-label {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: .16em; color: var(--muted); text-transform: uppercase; margin: 16px 0 9px;
}
.deep-sec-label::before { content: ""; width: 5px; height: 5px; background: var(--blue); flex: none; }

/* 读者盲审 · 逼退链 */
.qchain { margin: 0 0 6px; padding-left: 20px; border-left: 2px solid var(--line-strong); display: flex; flex-direction: column; gap: 11px; }
.q { position: relative; }
.q::before {
  content: ""; position: absolute; left: -25px; top: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--blue);
}
.q-round { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--blue); letter-spacing: .1em; }
.q-text { font-family: var(--serif); font-size: 14.5px; line-height: 1.75; margin: 2px 0 0; }

/* 编号步骤 */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 10px 36px; margin: 0; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 3px;
  font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--blue);
  border: 1px solid color-mix(in srgb, var(--blue) 40%, transparent);
  background: var(--blue-soft); border-radius: 6px; padding: 1px 6px;
}
.steps li b { color: var(--blue); }

/* 绝境 vs 解法 对照 */
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 4px 0 6px; }
.duel-col {
  border: 1px solid var(--line); border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 55%, var(--card));
  padding: 13px 16px; min-width: 0;
}
.duel-col--bad { border-left: 3px solid var(--alert); }
.duel-col--good { border-left: 3px solid var(--emerald); }
.duel-title { font-family: var(--serif); font-weight: 700; font-size: 14.5px; margin: 0 0 7px; }
.duel-col--bad .duel-title { color: var(--alert); }
.duel-col--good .duel-title { color: var(--emerald); }
.duel-col p { font-size: 13px; color: var(--muted); line-height: 1.75; margin: 0; }
.duel-col p b { color: var(--ink); }

/* 子 Agent 分权组织图 */
.org { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 6px; }
.org-lead {
  border: 1px solid color-mix(in srgb, var(--blue) 40%, transparent);
  background: var(--blue-soft); border-radius: 11px; padding: 11px 15px;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.org-lead b { font-family: var(--mono); font-size: 13px; }
.org-lead span { font-size: 12.5px; color: var(--muted); }
.org-lead .org-arrow { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--blue); }
.org-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.org-role {
  border: 1px solid var(--line); border-radius: 11px;
  background: color-mix(in srgb, var(--paper) 55%, var(--card));
  padding: 10px 13px; min-width: 0;
}
.org-role b { display: block; font-family: var(--mono); font-size: 12.5px; margin-bottom: 2px; overflow-wrap: anywhere; }
.org-role span { display: block; font-size: 12.3px; color: var(--muted); line-height: 1.6; }
.org-role--judge { border-color: color-mix(in srgb, var(--emerald) 40%, transparent); background: var(--emerald-soft); }
.org-role--judge b { color: var(--emerald); }

/* 四大技术流派选型雷达 */
.schools { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 6px; }
.school {
  border: 1px solid var(--line); border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 55%, var(--card));
  padding: 13px 16px; min-width: 0;
}
.school-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 7px; }
.school-name { font-family: var(--serif); font-weight: 700; font-size: 15px; margin: 0; }
.school-no { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: .1em; }
.school-rep {
  display: inline-block; font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  border: 1px dashed var(--line-strong); border-radius: 6px; padding: 1px 7px; margin-bottom: 8px;
}
.school-row { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 4px 0; }
.school-row b {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  color: var(--blue); letter-spacing: .08em; margin-right: 7px;
}
.school-row strong { color: var(--ink); font-weight: 600; }

/* 章节快速跳转条 */
.toc-bar {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 22px; padding: 7px 12px;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 10px;
}
.toc-bar a {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-decoration: none;
  padding: 3px 8px; border-radius: 6px; transition: color .15s, background .15s;
}
.toc-bar a:hover { color: var(--blue); background: var(--card); }

/* 复盘结论 */
.takeaway {
  margin-top: 15px; padding: 12px 16px;
  border-left: 3px solid var(--emerald); background: var(--emerald-soft);
  border-radius: 0 10px 10px 0; font-size: 13.5px; line-height: 1.75;
}
.takeaway b { color: var(--emerald); }

@media (max-width: 720px) {
  .schools, .org-grid, .fm-infra { grid-template-columns: 1fr; }
  .deep { padding: 20px 16px; }
  .deep-meta { margin-left: 0; flex-basis: 100%; }
}

/* v2 覆盖规则必须晚于 v2 基础定义（同特异性按源码顺序取胜），故置于文件最末 */
@media (max-width: 860px) {
  .hc-grid { grid-template-columns: 1fr; }
  .hc-cell + .hc-cell { border-left: none; padding-left: 0; border-top: 1px dashed var(--line); margin-top: 13px; padding-top: 13px; }
  .flow-map { grid-template-columns: 1fr; }
  .fm-arrow { transform: rotate(90deg); padding: 3px 0; }
  .fm-arrow--infra { display: grid; }
  .duel { grid-template-columns: 1fr; }
}

/* ============================================================
   v3 · 九大项目体检工作台（Master-Detail 分栏）
   左栏 9 个垂直 Tab（320px）· 右栏深度档案面板内滚动
   桌面端整体定高（500–560px），页面不再被 9 张大卡拉长
   ============================================================ */
.project-workbench {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  height: clamp(500px, 62vh, 560px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ---- 左栏 · 项目 Tab 列表 ---- */
.pw-master {
  display: flex; flex-direction: column; min-height: 0;
  background: color-mix(in srgb, var(--paper) 58%, var(--card));
  border-right: 1px solid var(--line);
}
.pw-master-head {
  flex: none; display: flex; align-items: baseline; gap: 8px;
  padding: 11px 16px 9px;
  border-bottom: 1px solid var(--line);
}
.pw-master-title { font-family: var(--serif); font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.pw-master-count { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: .14em; }
.pw-list {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; gap: 2px;
  padding: 7px;
  overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.pw-list::-webkit-scrollbar { width: 6px; }
.pw-list::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }

.pw-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; flex: none;
  padding: 8px 12px;
  background: transparent; border: 1px solid transparent; border-radius: 10px;
  font-family: inherit; font-size: inherit; color: inherit;
  text-align: left; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.pw-item:hover { background: color-mix(in srgb, var(--card) 72%, transparent); border-color: var(--line); }
.pw-item.is-active { background: var(--card); border-color: var(--line-strong); box-shadow: var(--shadow); }
.pw-item .score-pill { flex: none; }
.pw-item .score-pill::before { display: none; }
.pw-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pw-item-name {
  font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pw-item-id {
  font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: .03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pw-item.is-active .pw-item-name,
.pw-item.is-active .pw-item-id { color: var(--blue); }
.pw-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.pw-dot--run     { background: var(--emerald); }
.pw-dot--wait    { background: var(--amber); }
.pw-dot--blocked { background: var(--alert); }
.pw-dot--idle    { background: var(--slate); }

/* ---- 右栏 · 深度档案面板 ---- */
.pw-detail {
  min-width: 0; min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.pw-detail::-webkit-scrollbar { width: 8px; }
.pw-detail::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.pw-detail::-webkit-scrollbar-track { background: transparent; }

.pw-pane[hidden] { display: none; }
.pw-pane { animation: pw-pane-in .2s ease; }
@keyframes pw-pane-in {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}

/* 面板标题行吸顶：长档案在面板内滚动时，项目名与复制按钮始终可见 */
.pw-pane-head {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px 14px; flex-wrap: wrap;
  padding: 14px 18px 12px;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  border-bottom: 1px solid var(--line);
}
.pw-pane-tit { min-width: 0; }
.pw-pane-tit .hc-name { font-size: 18px; }
.pw-pane-tit .hc-idline { margin-top: 2px; }
.pw-pane-side {
  flex: none; margin-left: auto;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.pw-pane-badges { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }

.pw-pane-body { display: flex; flex-direction: column; gap: 13px; padding: 14px 18px 28px; }
.pw-pane-body .hc-pos { margin: 0; }
.pw-pane .hc-grid { padding: 0; }
.pw-pane .hc-tl { margin-top: 0; }

/* ---- 移动端 · Tab 变横滑胶囊栏，档案在下方展开，页面自然流式 ---- */
@media (max-width: 860px) {
  .project-workbench {
    display: flex; flex-direction: column;
    height: auto; overflow: visible;
  }
  .pw-master {
    border-right: none; border-bottom: 1px solid var(--line);
    background: var(--card);
  }
  .pw-master-head { padding: 11px 14px 8px; }
  .pw-list {
    flex-direction: row; align-items: center; gap: 6px;
    padding: 4px 12px 11px;
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .pw-list::-webkit-scrollbar { display: none; }
  .pw-item {
    flex: none; width: auto;
    padding: 6px 11px; gap: 7px;
    border: 1px solid var(--line-strong); border-radius: 999px;
    background: var(--paper);
  }
  .pw-item.is-active { border-color: var(--blue); box-shadow: none; }
  .pw-item.is-active .pw-item-name { color: var(--blue); }
  .pw-item-text { flex-direction: row; align-items: baseline; gap: 6px; }
  .pw-item-name { font-size: 12.5px; }
  .pw-item-id { display: none; }
  .pw-detail { overflow: visible; }
  .pw-pane-head { position: static; padding: 13px 14px 11px; }
  .pw-pane-side {
    margin-left: 0; width: 100%;
    flex-direction: row; flex-wrap: wrap;
    align-items: center; justify-content: flex-start;
  }
  .pw-pane-badges { justify-content: flex-start; }
  .pw-pane-body { padding: 12px 14px 16px; }
}

/* ============================================================
   v4 · Cloudflare 云端应用发射台
   8 张发射台卡片：状态左色轨 + HTTP 徽章 + 三键操作（直达 / 打开命令 / 复制路径）
   复用 .health-strip 巡检条与 .pill 徽章词汇；单色字符 + SVG 线性图标，零 emoji
   ============================================================ */

/* 巡检条：密码门防护用墨蓝——防护中＝正常在线，区别于砖红警报 */
.hs-gate b { color: var(--blue); }
.lp-strip-note {
  margin: 0; padding: 11px 20px 14px;
  border-top: 1px dashed var(--line-strong);
  font-size: 13px; color: var(--muted); line-height: 1.75;
}
.lp-strip-note b { color: var(--ink); }

/* 401 徽章：墨蓝色系（.pill-run 翡翠绿 / .pill-blocked 砖红为既有词汇，直接复用） */
.pill-gate { color: var(--blue); background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 35%, transparent); }

/* 发射台卡片网格：桌面 2 列——卡内含 3 键与双地址行，2 列比 3 列从容；
   min(340px, 100%) 保证极窄屏自动落回单列 */
.lp-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 14px; margin: 16px 0 8px;
}
.lp-card {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; gap: 9px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 13px; padding: 15px 18px 15px 21px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.lp-card::before {
  content: ""; position: absolute; left: 0; top: 15px; bottom: 15px;
  width: 3px; border-radius: 3px; background: var(--emerald);
}
.lp-card--gate::before { background: var(--blue); }
.lp-card--lost::before { background: var(--alert); }
.lp-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }

.lp-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.lp-top .pill { flex: none; margin-top: 1px; white-space: nowrap; }
.lp-tit { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lp-name {
  font-family: var(--serif); font-size: 15.5px; font-weight: 700;
  line-height: 1.5; margin: 0; letter-spacing: .02em; overflow-wrap: anywhere;
}
.lp-id { font-family: var(--mono); font-size: 11px; color: var(--blue); letter-spacing: .04em; overflow-wrap: anywhere; }
.lp-desc { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.7; }
.lp-note { margin: 0; font-size: 12px; line-height: 1.6; }
.lp-note--gate { color: var(--blue); }
.lp-note--lost { color: var(--alert); }

/* 线上地址 / 本地原址 双行：「线上」「本地」小标 + 等宽内容盒 */
.lp-line { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.lp-k {
  flex: none; font-family: var(--mono); font-size: 10px; font-weight: 700;
  color: var(--muted); letter-spacing: .14em; line-height: 1.6; padding: 5px 0 0;
}
.lp-url, .lp-path {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.6;
  background: var(--paper); border: 1px dashed var(--line-strong);
  border-radius: 8px; padding: 5px 9px;
  overflow-wrap: anywhere; word-break: break-word;
}
.lp-url { color: var(--blue); text-decoration: none; transition: color .15s, border-color .15s; }
.lp-url:hover { border-color: var(--blue); border-style: solid; }
.lp-ext { font-style: normal; margin-left: 6px; opacity: .72; }
.lp-path {
  /* button 元素不会继承字体，需显式声明 */
  font-family: var(--mono); text-align: left; color: var(--muted); cursor: copy;
  transition: color .15s, border-color .15s;
}
.lp-path:hover { color: var(--blue); border-color: var(--blue); }
.lp-path.is-copied { color: var(--emerald); border-color: var(--emerald); border-style: solid; }

/* 三键操作区：margin-top:auto 贴卡底——8 张卡等高时按钮行齐平 */
.lp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 2px; }
.lp-actions .btn { padding: 7px 12px; font-size: 12.5px; }
