/* 四个AI商业方案 · 公开摘要 · 样式 */
:root {
  color-scheme: light;
  --bg: #f6f5f0;
  --surface: #ffffff;
  --surface-2: #faf9f5;
  --ink: #1a1a18;
  --ink-2: #4d4c47;
  --muted: #6f6e67;
  --line: #e1dfd5;
  --line-strong: #c9c6b8;
  --accent: #1f4e8c;
  --accent-soft: #e4edf9;
  --c-ad: #2a78d6;
  --c-pet: #eb6834;
  --c-ai: #1baf7a;
  --c-museum: #eda100;
  --k-orig-bg: #ecebe4;
  --k-orig-ink: #3f3e39;
  --k-rec-bg: #dce8fa;
  --k-rec-ink: #123e78;
  --k-fact-bg: #d8f0e2;
  --k-fact-ink: #0c5a37;
  --k-todo-bg: #fcebc2;
  --k-todo-ink: #7a4a00;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 20, 10, .06), 0 4px 14px rgba(20, 20, 10, .05);
  --header-h: 56px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #151513;
    --surface: #1e1e1b;
    --surface-2: #23231f;
    --ink: #f0efe9;
    --ink-2: #c8c6bb;
    --muted: #a09e93;
    --line: #34332e;
    --line-strong: #4a4940;
    --accent: #8db5f0;
    --accent-soft: #1d2a3d;
    --c-ad: #3987e5;
    --c-pet: #d95926;
    --c-ai: #199e70;
    --c-museum: #c98500;
    --k-orig-bg: #2d2c27;
    --k-orig-ink: #d8d6cb;
    --k-rec-bg: #1d3556;
    --k-rec-ink: #bcd5fa;
    --k-fact-bg: #16402b;
    --k-fact-ink: #b6e8cc;
    --k-todo-bg: #4a3606;
    --k-todo-ink: #f6dca0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: anywhere;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0; }
p { margin: 0 0 .8em; }
ul, ol { margin: 0; padding-left: 1.2em; }
table { border-collapse: collapse; width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }

.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

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

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; height: 100%; }
.brand { font-weight: 700; white-space: nowrap; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav a:first-child { margin-left: auto; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 8px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; white-space: nowrap; font-size: .94rem;
}
.nav a:hover, .nav a.on { background: var(--accent-soft); color: var(--accent); }
.nav a.dl { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .nav a.dl { color: #0d1522; } }

/* ---------- 版块 ---------- */
section.block { padding: 44px 0 8px; scroll-margin-top: calc(var(--header-h) + 8px); }
.block > .wrap > h2 { font-size: 1.65rem; margin-bottom: 6px; }
.lede { color: var(--ink-2); max-width: 46em; margin-bottom: 20px; }
.eyebrow { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

.hero { padding: 40px 0 8px; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.7rem); letter-spacing: .01em; margin: 4px 0 10px; }
.hero .sub { color: var(--ink-2); font-size: 1.05rem; max-width: 42em; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 6px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; text-decoration: none; font-weight: 600;
}
.btn.ghost { background: transparent; color: var(--accent); }
@media (prefers-color-scheme: dark) { .btn { color: #0d1522; } .btn.ghost { color: var(--accent); } }

/* ---------- 标注 ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; line-height: 1;
  padding: 4px 8px 4px 6px; border-radius: 999px; white-space: nowrap; vertical-align: 1px; margin-right: 6px;
  border: 1px solid transparent;
}
.chip i { font-style: normal; font-size: .8rem; }
.chip-orig { background: var(--k-orig-bg); color: var(--k-orig-ink); border-color: var(--line-strong); }
.chip-rec { background: var(--k-rec-bg); color: var(--k-rec-ink); }
.chip-fact { background: var(--k-fact-bg); color: var(--k-fact-ink); }
.chip-todo { background: var(--k-todo-bg); color: var(--k-todo-ink); border-style: dashed; border-color: currentColor; }

.legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0 6px; }
.legend button {
  text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow);
}
.legend button[aria-pressed="false"] { opacity: .45; }
.legend .d { display: block; font-size: .86rem; color: var(--ink-2); margin-top: 6px; line-height: 1.55; }
.legend-tools { display: flex; align-items: center; gap: 12px; font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.legend-tools button { border: 1px solid var(--line-strong); background: transparent; border-radius: 8px; padding: 4px 10px; }
.kind-off-orig [data-kind="orig"], .kind-off-rec [data-kind="rec"], .kind-off-fact [data-kind="fact"], .kind-off-todo [data-kind="todo"] { display: none !important; }

.notes { background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: var(--radius); padding: 14px 18px; margin: 18px 0; }
.notes ul { color: var(--ink-2); font-size: .94rem; }
.notes li { margin: 3px 0; }

.stmts { list-style: none; padding: 0; margin: 0; }
.stmts li { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.stmts li:last-child { border-bottom: 0; }
.ref { font-size: .72rem; margin-left: 4px; text-decoration: none; background: var(--k-orig-bg); color: var(--k-orig-ink); padding: 1px 5px; border-radius: 4px; vertical-align: 2px; }

/* ---------- 卡片通用 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
h3.t { font-size: 1.1rem; margin: 26px 0 10px; }
h4.t { font-size: 1rem; margin: 16px 0 6px; color: var(--ink); }
.small { font-size: .88rem; color: var(--ink-2); }
.muted { color: var(--muted); }

/* ---------- 优先级板 ---------- */
.board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pcard { position: relative; overflow: hidden; padding-top: 22px; }
.pcard::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--lc); }
.pcard .rk { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pcard .rk b { font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums; }
.pcard h3 { font-size: 1.15rem; }
.mode { display: inline-block; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 6px; border: 1.5px solid var(--lc); }
.pcard dl { margin: 12px 0 0; display: grid; gap: 8px; }
.pcard dt { font-size: .78rem; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.pcard dd { margin: 0; font-size: .94rem; }
.pcard details { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.pcard summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
.pcard .go { display: inline-block; margin-top: 12px; font-weight: 600; }

/* 阶段条 */
.stages { margin: 6px 0 4px; }
.stage-axis, .stage-row .bar { position: relative; }
.stage-axis { height: 28px; margin-left: 0; }
.stage-axis .tick { position: absolute; top: 0; transform: translateX(-50%); font-size: .74rem; color: var(--muted); white-space: nowrap; }
.stage-axis .tick:last-child { transform: translateX(-100%); }
.stage-axis .tick:first-child { transform: none; }
.stage-axis .tick::after { content: ""; position: absolute; left: 50%; top: 18px; height: 8px; border-left: 1px solid var(--line-strong); }
.stage-axis .tick:first-child::after { left: 0; }
.stage-axis .tick:last-child::after { left: 100%; }
.stage-row { margin: 10px 0 14px; }
.stage-row .name { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 700; margin-bottom: 4px; }
.stage-row .dot { width: 12px; height: 12px; border-radius: 3px; background: var(--lc); display: inline-block; }
.bar { display: flex; height: 36px; gap: 2px; }
.seg { display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 600; border-radius: 4px; color: var(--ink); text-align: center; line-height: 1.15; padding: 0 2px; min-width: 0; }
.seg.s1 { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--lc) 38%, transparent) 0 5px, transparent 5px 10px); border: 1.5px solid var(--lc); border-radius: 4px 0 0 4px; }
.seg.s2 { background: color-mix(in srgb, var(--lc) 45%, var(--surface)); border: 1.5px solid var(--lc); }
.seg.s3 { background: color-mix(in srgb, var(--lc) 22%, var(--surface)); border: 1.5px solid var(--lc); border-radius: 0 4px 4px 0; }
.seg.cond { border-style: dashed; }
.stage-row .cap { font-size: .86rem; color: var(--ink-2); margin-top: 4px; }
.stage-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .84rem; color: var(--ink-2); margin-top: 6px; }
.stage-legend span::before { content: ""; display: inline-block; width: 16px; height: 10px; margin-right: 6px; border: 1.5px solid var(--muted); vertical-align: -1px; }
.stage-legend .l1::before { background: repeating-linear-gradient(135deg, var(--muted) 0 3px, transparent 3px 6px); }
.stage-legend .l2::before { background: color-mix(in srgb, var(--muted) 45%, var(--surface)); }
.stage-legend .l3::before { background: color-mix(in srgb, var(--muted) 20%, var(--surface)); }
.stage-legend .l4::before { border-style: dashed; background: transparent; }

/* 矩阵表 */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.matrix { min-width: 720px; font-size: .9rem; }
.matrix th, .matrix td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.matrix thead th { background: var(--surface-2); position: sticky; top: 0; }
.matrix tbody th { width: 150px; font-weight: 600; }
.matrix td b { display: block; }
.matrix td span { color: var(--ink-2); font-size: .84rem; }
.mx-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--lc); margin-right: 6px; }

/* ---------- 业务切换 ---------- */
.line-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 14px; }
.ltab {
  position: relative; text-align: left; background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--lc);
  border-radius: var(--radius); padding: 10px 12px 12px; box-shadow: var(--shadow);
}
.ltab .n { font-size: .78rem; color: var(--muted); display: block; }
.ltab b { display: block; font-size: 1.02rem; line-height: 1.3; }
.ltab .m { display: block; font-size: .78rem; color: var(--ink-2); margin-top: 2px; }
.ltab[aria-selected="true"] { background: var(--surface); border-color: var(--lc); outline: 2px solid var(--lc); outline-offset: -1px; }
.ltab[aria-selected="true"] b::after { content: " ▸"; color: var(--lc); }

.lpanel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 22px 26px; border-top: 5px solid var(--lc); }
.js .lpanel[hidden] { display: none; }
.lhead h3 { font-size: 1.4rem; }
.lhead .tag { margin: 8px 0; }
.verdict { background: var(--k-rec-bg); color: var(--k-rec-ink); border-radius: 8px; padding: 10px 14px; margin: 10px 0 0; }
.subtabs { position: relative; display: flex; gap: 6px; overflow-x: auto; margin: 18px -4px 14px; padding: 0 4px 6px; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.stab { border: 1px solid transparent; background: transparent; padding: 8px 14px; border-radius: 8px; white-space: nowrap; color: var(--ink-2); font-weight: 600; }
.stab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.js .subpanel[hidden] { display: none; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.gapcard { border: 1px solid var(--line); border-left: 4px solid var(--lc); border-radius: 8px; padding: 12px 16px; margin: 10px 0; background: var(--surface-2); }
.gapcard h5 { margin: 0 0 6px; font-size: 1rem; }
.gapcard p { margin: 4px 0; font-size: .94rem; }
.gapcard .lab { font-size: .76rem; font-weight: 700; color: var(--muted); display: block; letter-spacing: .05em; }
.qlist li { margin: 4px 0; }

/* 交付包 */
.pack-head { border: 1.5px solid var(--lc); border-radius: var(--radius); padding: 14px 18px; background: color-mix(in srgb, var(--lc) 7%, var(--surface)); }
.pack-head h4 { font-size: 1.15rem; margin: 0 0 4px; }
.fields { display: grid; grid-template-columns: 150px 1fr; gap: 0; margin: 14px 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fields > div { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.fields > div:nth-last-child(-n+2) { border-bottom: 0; }
.fields .k { background: var(--surface-2); font-weight: 700; font-size: .9rem; }
.fields ul { padding-left: 1.1em; }
.fields li { margin: 2px 0; }
.scope { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scope > div { border-radius: 8px; padding: 10px 14px; }
.scope .in { background: var(--accent-soft); border-left: 4px solid var(--accent); }
.scope .out { background: var(--surface-2); border: 1px dashed var(--line-strong); border-left: 4px solid var(--muted); }
.scope b { display: block; margin-bottom: 4px; }
.flow { list-style: none; padding: 0; margin: 0; counter-reset: st; display: grid; gap: 8px; }
.flow li { counter-increment: st; display: grid; grid-template-columns: 34px 1fr; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 8px 10px; }
.flow li::before { content: counter(st); width: 26px; height: 26px; border-radius: 50%; background: var(--lc); color: #111; font-weight: 700; display: grid; place-items: center; font-size: .86rem; margin-top: 2px; }
.flow .st { font-weight: 700; }
.flow .ev { display: inline-block; font-size: .78rem; background: var(--k-orig-bg); color: var(--k-orig-ink); border-radius: 4px; padding: 1px 7px; margin-top: 3px; }

/* 阶段与门槛 */
.gates { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gates li { border: 1px solid var(--line); border-top: 4px solid var(--lc); border-radius: 8px; padding: 10px 12px; background: var(--surface-2); }
.gates .at { font-weight: 800; font-size: 1.05rem; }
.gates .p, .gates .f { font-size: .88rem; margin-top: 6px; }
.gates .p b { color: var(--k-fact-ink); background: var(--k-fact-bg); border-radius: 4px; padding: 0 6px; margin-right: 4px; }
.gates .f b { color: var(--k-todo-ink); background: var(--k-todo-bg); border-radius: 4px; padding: 0 6px; margin-right: 4px; }
.phase-title { margin: 18px 0 8px; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.phase-title::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--lc); }
.prow { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 8px 0; background: var(--surface); }
.prow h5 { margin: 0 0 8px; font-size: 1rem; }
.prow dl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; margin: 0; }
.prow dt { font-size: .74rem; font-weight: 700; color: var(--muted); letter-spacing: .05em; }
.prow dd { margin: 0 0 2px; font-size: .92rem; }
.prow .gate dd { font-weight: 600; }
.prow .fb dd { color: var(--k-todo-ink); }
.prow .span2 { grid-column: 1 / -1; }

/* 表格（可堆叠） */
table.tbl { font-size: .92rem; background: var(--surface); }
table.tbl th, table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.tbl thead th { background: var(--surface-2); font-size: .82rem; letter-spacing: .04em; color: var(--ink-2); }
.tblwrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

/* 模板 */
details.tpl { border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; background: var(--surface-2); }
details.tpl > summary { padding: 12px 16px; font-weight: 700; cursor: pointer; }
details.tpl .in { padding: 0 18px 16px; }
details.tpl h6 { margin: 14px 0 4px; font-size: .92rem; }
details.tpl li { margin: 3px 0; }
.copy { margin-top: 12px; border: 1px solid var(--accent); color: var(--accent); background: transparent; border-radius: 8px; padding: 6px 14px; }
.copy.ok { background: var(--k-fact-bg); color: var(--k-fact-ink); border-color: transparent; }

/* 协同 */
.cashline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; list-style: none; padding: 0; margin: 0 0 14px; }
.cashline li { border: 1px solid var(--line); border-top: 4px solid var(--lc); border-radius: 8px; padding: 10px 12px; background: var(--surface); font-size: .9rem; }
.cashline .w { font-size: .76rem; font-weight: 700; color: var(--muted); }
.cashline .t { font-size: .82rem; color: var(--ink-2); }

.dcard { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); box-shadow: var(--shadow); }
.dcard .id { display: inline-block; font-weight: 800; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 1px 8px; margin-right: 6px; }
.dcard h4 { margin: 0 0 6px; font-size: 1rem; }
.dcard p { margin: 4px 0; font-size: .92rem; }
.dcard .meta { font-size: .8rem; color: var(--muted); }

.srcnote { font-size: .9rem; color: var(--ink-2); margin-bottom: 10px; }
.status-fact { background: var(--k-fact-bg); color: var(--k-fact-ink); }
.status-todo { background: var(--k-todo-bg); color: var(--k-todo-ink); }

.dl-card { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
footer.site-footer { margin-top: 56px; padding: 26px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
footer .wrap > p { margin: 4px 0; }

/* ---------- 手机 ---------- */
@media (max-width: 880px) {
  .legend { grid-template-columns: repeat(2, 1fr); }
  .board, .grid2, .two, .scope { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr; }
  .gates { grid-template-columns: repeat(2, 1fr); }
  .cashline { grid-template-columns: 1fr 1fr; }
  .line-tabs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .brand { font-size: .95rem; }
  .site-header .wrap { gap: 8px; }
  .nav a { padding: 8px 9px; font-size: .88rem; }
  section.block { padding-top: 32px; }
  .block > .wrap > h2 { font-size: 1.4rem; }
  .lpanel { padding: 16px 14px 20px; }
  .fields { grid-template-columns: 1fr; }
  .fields .k { border-bottom: 0; padding-bottom: 2px; }
  .fields > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .fields > div:last-child { border-bottom: 0; }
  .prow dl { grid-template-columns: 1fr; }
  .gates { grid-template-columns: 1fr; }
  .cashline { grid-template-columns: 1fr; }
  .legend { grid-template-columns: 1fr; }
  table.tbl.stack thead { position: absolute; left: -9999px; }
  table.tbl.stack, table.tbl.stack tbody, table.tbl.stack tr, table.tbl.stack td { display: block; width: 100%; }
  table.tbl.stack tr { border-bottom: 6px solid var(--bg); padding: 6px 0; }
  table.tbl.stack td { border: 0; padding: 4px 12px; }
  table.tbl.stack td::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 700; color: var(--muted); letter-spacing: .05em; }
  .seg { font-size: .7rem; }
  .ltab b { font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .site-header, .legend-tools, .subtabs, .line-tabs { display: none; }
  .lpanel[hidden], .subpanel[hidden] { display: block !important; }
}
