/* 净表 CleanSheet — 样式 */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --ink: #111827;
  --ink-2: #374151;
  --ink-3: #6b7280;
  --line: #e5e7eb;
  --line-2: #eef0f4;
  --navy: #0f1c3f;
  --navy-2: #182a5c;
  --accent: #4f46e5;
  --accent-2: #4338ca;
  --accent-soft: #eef2ff;
  --green: #15803d; --green-soft: #ecfdf3; --green-line: #bbf7d0;
  --rose: #be123c; --rose-soft: #fff1f2; --rose-line: #fecdd3;
  --amber: #b45309; --amber-soft: #fffbeb; --amber-line: #fde68a;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.05), 0 10px 30px -14px rgba(17, 24, 39, 0.18);
  --radius: 16px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
* { 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.65; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: 1.75rem; font-weight: 800; }
h3 { font-size: 1.0625rem; font-weight: 700; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 0.875em; background: var(--line-2); padding: 0.1em 0.4em; border-radius: 6px; }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }
.dim { color: var(--ink-3); }
.small { font-size: 0.875rem; }
[hidden] { display: none !important; }
/* 内联 style 属性会被 CSP 的 style-src 'self' 拦掉，所以放这里 */
.noscript-msg { text-align: center; padding: 2rem; }
/* SheetJS 署名(Apache-2.0 要求随分发附带许可证) */
.footer-credit a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 顶栏 ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 2rem; height: 3.75rem; }
.logo { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1.125rem; letter-spacing: -0.02em; white-space: nowrap; }
.brand-sub { font-weight: 500; color: var(--ink-3); }
.navlinks { display: flex; gap: 1.5rem; font-size: 0.9375rem; font-weight: 500; color: var(--ink-2); margin-left: auto; }
.navlinks a { white-space: nowrap; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.navlinks a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.top-actions { display: flex; align-items: center; gap: 0.75rem; }
.navlinks + .top-actions { margin-left: 0; }
.lang { position: relative; }
.lang-btn { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.7rem; font: inherit; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.lang-btn:hover { border-color: var(--ink-3); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 0.4rem); min-width: 7.5rem; margin: 0; padding: 0.3rem; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.lang-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0.45rem 0.7rem; border-radius: 8px; font: inherit; font-size: 0.875rem; color: var(--ink-2); cursor: pointer; }
.lang-menu button:hover { background: var(--line-2); }
.lang-menu button.active { color: var(--accent); font-weight: 700; }
@media (max-width: 720px) { .navlinks { display: none; } .top-actions { margin-left: auto; } }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.65rem 1.25rem; border-radius: 10px; font: inherit; font-weight: 600; font-size: 0.9375rem; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-2); }
.btn-outline { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink-3); }
.btn-ghost { background: transparent; color: var(--ink-3); }
.btn-ghost:hover { background: var(--line-2); color: var(--ink); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8125rem; border-radius: 8px; }
.btn-block { width: 100%; margin-top: 1rem; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); font-weight: 600; cursor: pointer; }
.linklike:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(1200px 500px at 80% -10%, rgba(99, 102, 241, 0.35), transparent 60%), linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 4rem 0 3.5rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 2rem; } .hero { padding: 2.5rem 0; } }
.eyebrow { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #c7d2fe; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 999px; padding: 0.3rem 0.8rem; }
.hero h1 { margin-top: 1.25rem; font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.hero-sub { margin-top: 1.1rem; font-size: 1.0625rem; color: rgba(255, 255, 255, 0.78); max-width: 34rem; }
.chips { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li { font-size: 0.8125rem; font-weight: 600; color: #e0e7ff; background: rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 0.3rem 0.65rem; }
.chips li::before { content: "✓ "; color: #a5b4fc; }

.upload-card { background: var(--surface); color: var(--ink); border-radius: 20px; padding: 1rem; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.5); }
.dz { border: 2px dashed #c7cbe0; border-radius: 14px; padding: 2.25rem 1.5rem; text-align: center; cursor: pointer; background: #fafbff; transition: border-color 0.15s, background 0.15s; }
.dz:hover { border-color: var(--accent); background: var(--accent-soft); }
.dz.over { border-color: var(--accent); background: var(--accent-soft); }
.dz.loaded { border-style: solid; border-color: var(--green-line); background: var(--green-soft); cursor: default; }
.dz.busy { cursor: progress; }
.dz-icon { width: 3rem; height: 3rem; margin: 0 auto 0.75rem; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; }
.dz-icon.ok { background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line); }
.dz-icon.spin { border: 3px solid var(--line); border-top-color: var(--accent); background: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dz-title { font-weight: 700; font-size: 1.0625rem; overflow-wrap: anywhere; }
.dz-meta { margin-top: 0.25rem; font-size: 0.8125rem; color: var(--ink-3); }
.dz-actions { margin-top: 1.1rem; display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap; font-size: 0.875rem; }
.dz.loaded .btn { margin-top: 0.75rem; }
.error { margin-top: 0.75rem; background: var(--rose-soft); color: var(--rose); border: 1px solid var(--rose-line); padding: 0.6rem 0.9rem; border-radius: 10px; font-size: 0.875rem; }

/* ---------- 工作区 ---------- */
.workspace { padding: 2rem 1.5rem 1rem; scroll-margin-top: 4.5rem; }
.stepper { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; gap: 0.5rem; flex-wrap: wrap; font-size: 0.875rem; font-weight: 600; color: var(--ink-3); }
.stepper li { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.8rem 0.35rem 0.4rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.stepper li.active { color: var(--accent); border-color: #c7d2fe; background: var(--accent-soft); }
.stepper li.done { color: var(--green); }
.step-dot { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; }
.stepper li.active .step-dot { background: var(--accent); color: #fff; }
.stepper li.done .step-dot { background: var(--green-soft); color: var(--green); }
.sheet-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.sheet-tab { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 0.35rem 0.8rem; font: inherit; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.sheet-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.ws-title { font-size: 1.25rem; margin: 1.25rem 0 0.75rem; }
.ws-title .dim { font-weight: 500; font-size: 0.9375rem; }

.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-top: 1rem; }
.panel h3 { font-size: 1rem; }
.panel h3 + .table-scroll { margin-top: 0.75rem; }
.panel.sticky { position: sticky; top: 4.5rem; }

.report-grid { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .report-grid { grid-template-columns: 1fr; } .panel.sticky { position: static; } }
.statbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
@media (max-width: 560px) { .statbar { grid-template-columns: repeat(2, 1fr); } }
.statbar > div { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 0.75rem 0.9rem; display: flex; flex-direction: column; }
.statbar b { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.statbar span { font-size: 0.75rem; color: var(--ink-3); }

.issue { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 0.6rem; }
.issue summary { list-style: none; display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem; cursor: pointer; font-weight: 700; }
.issue summary::-webkit-details-marker { display: none; }
.issue-icon { width: 2rem; height: 2rem; border-radius: 8px; background: var(--amber-soft); color: var(--amber); border: 1px solid var(--amber-line); display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem; flex: none; }
.issue-title { flex: 1; }
.pill { font-size: 0.75rem; font-weight: 700; color: var(--amber); background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: 999px; padding: 0.1rem 0.6rem; white-space: nowrap; }
.issue-body { padding: 0 1rem 1rem 3.75rem; font-size: 0.9rem; color: var(--ink-2); }
.issue-body ul { margin: 0.4rem 0 0; padding-left: 1.1rem; color: var(--ink-3); font-size: 0.85rem; }
.issue-body li { overflow-wrap: anywhere; margin: 0.15rem 0; }
@media (max-width: 560px) { .issue-body { padding-left: 1rem; } }
.callout { border-radius: 12px; padding: 0.9rem 1rem; font-size: 0.9375rem; }
.callout.ok { background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line); }

.switches { display: grid; gap: 0.3rem; margin-top: 0.9rem; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line-2); font-size: 0.9rem; cursor: pointer; }
.switch.irrelevant { color: var(--ink-3); }
.switch em { font-style: normal; font-size: 0.72rem; color: #9ca3af; margin-left: 0.25rem; }
input.toggle { appearance: none; -webkit-appearance: none; flex: none; width: 2.4rem; height: 1.35rem; border-radius: 999px; background: #d1d5db; position: relative; cursor: pointer; transition: background 0.15s; margin: 0; }
input.toggle::before { content: ""; position: absolute; top: 2px; left: 2px; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
input.toggle:checked { background: var(--accent); }
input.toggle:checked::before { transform: translateX(1.05rem); }
input.toggle:focus-visible { outline: 2px solid #c7d2fe; outline-offset: 2px; }
.synonyms { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px dashed var(--line); }
.synonyms h4 { font-size: 0.875rem; font-weight: 700; }
.synonyms .check { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; font-size: 0.875rem; cursor: pointer; }
.synonyms input { width: 1rem; height: 1rem; accent-color: var(--accent); }

.table-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; }
table.grid { border-collapse: collapse; font-size: 0.8125rem; min-width: 100%; }
table.grid th, table.grid td { padding: 0.4rem 0.65rem; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); text-align: left; white-space: nowrap; max-width: 15rem; overflow: hidden; text-overflow: ellipsis; }
table.grid th { background: #f9fafb; font-weight: 700; color: var(--ink-2); }
table.grid .idx { color: #9ca3af; width: 2rem; font-variant-numeric: tabular-nums; }
table.grid td.changed { background: var(--amber-soft); box-shadow: inset 0 0 0 1px var(--amber-line); }

/* 结果 */
.result-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.result-rows { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.counters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.result-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8125rem; font-weight: 700; border-radius: 999px; padding: 0.2rem 0.7rem; border: 1px solid; }
.tag.fixed { color: var(--green); background: var(--green-soft); border-color: var(--green-line); }
.tag.removed { color: var(--rose); background: var(--rose-soft); border-color: var(--rose-line); }
.tag.untouched { color: var(--amber); background: var(--amber-soft); border-color: var(--amber-line); }
.tabbar { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); margin: -0.25rem 0 1rem; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 0.5rem 0.9rem; font: inherit; font-size: 0.9rem; font-weight: 600; color: var(--ink-3); cursor: pointer; margin-bottom: -1px; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.change-group { padding: 0.75rem 0; border-bottom: 1px solid var(--line-2); }
.change-group:last-child { border-bottom: 0; }
.change-group header { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.change-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.change-head { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9375rem; font-weight: 600; }
.change-head b { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.change-detail { margin: 0.25rem 0 0; padding-left: 1.1rem; font-size: 0.8125rem; color: var(--ink-3); }
.change-detail li { overflow-wrap: anywhere; }
pre.summary { margin: 0; padding: 1rem; background: #0b1220; color: #e5e7eb; border-radius: 10px; font-family: var(--mono); font-size: 0.8125rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 28rem; overflow: auto; }

/* ---------- 营销区块 ---------- */
.section { padding: 4rem 1.5rem; scroll-margin-top: 4rem; }
.section-head { max-width: 40rem; margin-bottom: 1.75rem; }
.section-head p { margin-top: 0.5rem; color: var(--ink-3); font-size: 1.0625rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.35rem; }
.feature-icon { width: 2.5rem; height: 2.5rem; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1.15rem; font-weight: 700; margin-bottom: 0.9rem; }
.feature p { margin-top: 0.4rem; color: var(--ink-3); font-size: 0.9375rem; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; position: relative; }
@media (max-width: 720px) { .timeline { grid-template-columns: 1fr; } }
.timeline li { display: flex; gap: 0.9rem; align-items: flex-start; }
.tl-num { flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.timeline p { margin-top: 0.3rem; color: var(--ink-3); font-size: 0.9375rem; }

.demo-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; }
@media (max-width: 720px) { .demo-grid { grid-template-columns: 1fr; } .demo-arrow { transform: rotate(90deg); } }
.demo-pane { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; min-width: 0; }
.demo-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.6rem; }
.demo-pane.before .demo-label { color: var(--rose); }
.demo-pane.after .demo-label { color: var(--green); }
.demo-arrow { text-align: center; font-size: 1.75rem; color: var(--ink-3); }
table.mini { border-collapse: collapse; font-size: 0.78rem; width: 100%; }
table.mini th, table.mini td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--line-2); text-align: left; white-space: nowrap; }
table.mini th { background: #f9fafb; font-weight: 700; color: var(--ink-2); }
.demo-note { margin-top: 1rem; color: var(--ink-3); font-size: 0.9rem; }

.band { background: var(--navy); color: #fff; padding: 3.5rem 0; }
.band h2 { color: #fff; }
.privacy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 1.5rem; }
@media (max-width: 720px) { .privacy-grid { grid-template-columns: 1fr; } }
.privacy-grid h3 { color: #c7d2fe; font-size: 1rem; }
.privacy-grid p { margin-top: 0.35rem; color: rgba(255, 255, 255, 0.75); font-size: 0.9375rem; }

.usecase-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 860px) { .usecase-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .usecase-grid { grid-template-columns: 1fr; } }
.usecase { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); padding: 1.2rem; }
.usecase p { margin-top: 0.4rem; color: var(--ink-3); font-size: 0.9rem; }

.faq-list { display: grid; gap: 0.5rem; max-width: 46rem; }
.faq-list details { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 0 1.1rem; }
.faq-list summary { list-style: none; cursor: pointer; padding: 0.9rem 0; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list .plus { color: var(--accent); font-size: 1.25rem; font-weight: 400; transition: transform 0.15s; }
.faq-list details[open] .plus { transform: rotate(45deg); }
.faq-list details p { padding: 0 0 1rem; color: var(--ink-2); font-size: 0.9375rem; }

.footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 1.5rem 1.5rem; font-size: 0.875rem; color: var(--ink-2); }
