:root {
  --bg: #f7f6f3;
  --bg-elevated: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: rgba(30, 41, 59, 0.12);
  --accent: #3d6db5;
  --accent-hover: #335d9b;
  --ok: #047857;
  --ok-bg: #ecfdf5;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --err: #b91c1c;
  --err-bg: #fef2f2;
  --dup: #6d28d9;
  --dup-bg: #f5f3ff;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --max: 72rem;
  --topbar-h: 3.75rem;
  --shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  --radius: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
}
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  min-height: var(--topbar-h);
  padding: 0.5rem clamp(1rem, 4vw, 1.75rem);
  background: rgba(247, 246, 243, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: 0.02em; }
.nav-main { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.nav-pill {
  display: inline-block;
  padding: 0.28rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.92rem;
  background: #fff;
}
.nav-pill:hover, .nav-pill[aria-current="page"] {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.lang-btn {
  font: inherit; padding: 0.28rem 0.5rem; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; color: var(--text);
}
.page { max-width: var(--max); margin: 0 auto; padding: 1.25rem clamp(1rem, 4vw, 1.75rem) 3.5rem; }
.hero h1 { font-size: clamp(1.6rem, 3vw, 2.15rem); line-height: 1.25; margin: 0.2rem 0 0.6rem; }
.lead { font-size: 1.05rem; color: var(--text-muted); max-width: 46em; margin: 0 0 1rem; }
.notice, .limits, .faq, .related, .steps, .workspace {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin: 1rem 0;
  box-shadow: var(--shadow);
}
.notice h2, .faq h2, .related h2, .steps h2, .limits h2 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.steps ol { margin: 0; padding-left: 1.2rem; }
.steps li { margin: 0.25rem 0; }

.privacy-brief {
  margin: 0 0 0.9rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.privacy-brief .privacy-lead { margin: 0; }
.privacy-brief details { display: inline; margin-left: 0.45em; }
.privacy-brief details[open] { display: block; margin: 0.4rem 0 0; }
.privacy-brief summary {
  display: inline;
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
}
.privacy-brief details[open] summary { display: list-item; }
.privacy-brief details p {
  margin: 0.45rem 0 0;
  max-width: 46rem;
  color: var(--text-muted);
}
.drop {
  border: 2px dashed #9bb6dd;
  border-radius: var(--radius);
  background: #f3f7fc;
  padding: 1.6rem 1rem;
  text-align: center;
  cursor: pointer;
}
.drop.is-over { background: #e8f0fb; border-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 0.9rem 0; align-items: center; }
.btn, .btn-tiny {
  font: inherit; cursor: pointer;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 0.45rem 0.95rem;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-tiny { padding: 0.1rem 0.5rem; border-radius: 8px; line-height: 1.3; }
.dedupe { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0.6rem 0; }
.dedupe p, .muted { color: var(--text-muted); font-size: 0.92rem; }
.file-rows { list-style: none; margin: 0; padding: 0; }
.file-row {
  display: grid;
  grid-template-columns: minmax(8rem, 0.8fr) minmax(12rem, 1.8fr) auto;
  gap: 0.5rem;
  align-items: start;
  padding: 0.55rem 0.7rem;
  border-top: 1px solid var(--border);
  font-size: 0.94rem;
}
.file-row.is-ok { background: var(--ok-bg); }
.file-row.is-fail { background: var(--err-bg); }
.file-row.is-dup { background: var(--dup-bg); }
.file-name { font-weight: 600; word-break: break-all; }
.file-status { color: var(--text-muted); word-break: break-word; }
.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.6rem;
  margin: 1rem 0;
}
.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
}
.stat b { display: block; font-size: 1.15rem; }
.stat span { color: var(--text-muted); font-size: 0.85rem; }
.table-wrap { overflow: auto; max-height: 28rem; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
table { border-collapse: collapse; width: 100%; min-width: 64rem; font-size: 0.88rem; }
th, td { border-bottom: 1px solid var(--border); padding: 0.4rem 0.5rem; text-align: left; vertical-align: top; }
th { background: #f1f5f9; position: sticky; top: 0; z-index: 1; }
.mono { font-family: ui-monospace, Consolas, "SF Mono", monospace; letter-spacing: 0.01em; }
tr.is-fail { background: var(--err-bg); }
tr.is-dup { background: var(--dup-bg); }
.banner { margin: 0.7rem 0; padding: 0.65rem 0.8rem; border-radius: 10px; }
.banner.ok { background: var(--ok-bg); color: var(--ok); }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.err { background: var(--err-bg); color: var(--err); }
.cta {
  margin-top: 0.8rem;
  padding: 0.8rem 0.95rem;
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: 12px;
}
.faq details { margin: 0.35rem 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.footer { margin-top: 2rem; color: var(--text-muted); font-size: 0.9rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr auto; }
  .nav-main { grid-column: 1 / -1; }
  .file-row { grid-template-columns: 1fr auto; }
  .file-status { grid-column: 1 / -1; }
}
