
/* ── source: css/app.css ── */
/* ============================================================
   中标吧 · user-facing UI
   Aesthetic: institutional, restrained, light, low-saturation
   No external CDN. System fonts only.
   ============================================================ */

:root {
  /* Color — warm-cool neutrals, rust brand accent */
  --bg:           #f7f6f3;
  --bg-soft:      #efece6;
  --surface:      #ffffff;
  --surface-2:    #fbfaf7;
  --line:         #e6e2da;
  --line-strong:  #cfc9bd;
  --ink:          #15171a;
  --ink-2:        #3a3d42;
  --ink-3:        #6a6d72;
  --ink-4:        #9a9da3;

  --accent:       #8a2f1a;   /* rust — brand accent (default; navy et al. via html[data-accent]) */
  --accent-2:     #a3381f;
  --accent-soft:  #f7e3dc;
  --accent-ink:   #5a1f10;

  --ok:           #1f6b3a;
  --ok-soft:      #e4f0e7;
  --warn:         #8a5a00;
  --warn-soft:    #faefd6;
  --err:          #8e1d1d;
  --err-soft:     #f6e1e0;

  /* Type — system stack only */
  --font:         -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
                  "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  --mono:         ui-monospace, "SF Mono", Menlo, Consolas, "PingFang SC", monospace;

  /* Spacing */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;
  --s-9:  96px;

  /* Radii — modest */
  --r-1:  3px;
  --r-2:  6px;
  --r-3:  10px;

  /* Layout */
  --max:        1240px;
  --topbar-h:   60px;
  --js-tabs-h:  48px;   /* rendered height of .js-tabs strip (see v2.css:.js-tabs) */

  /* Motion */
  --ease:       cubic-bezier(.2,.7,.2,1);
}

/* Density tweak (Tweaks panel sets [data-density] on <html>) */
html[data-density="tight"]  { --s-3: 10px; --s-4: 12px; --s-5: 18px; --s-6: 24px; --s-7: 36px; }
html[data-density="loose"]  { --s-3: 14px; --s-4: 20px; --s-5: 30px; --s-6: 44px; --s-7: 64px; }

/* Accent tweak */
html[data-accent="navy"]    { --accent: #1e3a8a; --accent-2: #2547a8; --accent-soft: #e8edfa; --accent-ink: #0d1f55; }
html[data-accent="teal"]    { --accent: #115e59; --accent-2: #0f766e; --accent-soft: #def4f1; --accent-ink: #074240; }
html[data-accent="ink"]     { --accent: #2a2d33; --accent-2: #1c1e22; --accent-soft: #ebe9e3; --accent-ink: #0f1114; }
html[data-accent="rust"]    { --accent: #8a2f1a; --accent-2: #a3381f; --accent-soft: #f7e3dc; --accent-ink: #5a1f10; }

/* Reset */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "tnum" 1;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); color: var(--accent-ink); }

/* ====== Topbar ====== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247,246,243,.86);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: var(--max);
  height: var(--topbar-h);
  margin: 0 auto;
  padding: 0 var(--s-5);
  display: flex;
  align-items: center;
  gap: var(--s-6);
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 0;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink);
  font-size: 15px;
}
.brand__arrow {
  font-weight: 400;
  color: var(--accent);
  font-size: 13px;
  position: relative;
  top: -1px;
}
.brand__to { color: var(--accent); }
.brand__from { color: var(--accent); }
.topnav {
  display: flex;
  gap: var(--s-5);
  margin-left: var(--s-4);
}
.topnav__link {
  color: var(--ink-3);
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .15s var(--ease);
}
.topnav__link:hover { color: var(--ink); }
.topnav__link.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.topnav__link[data-disabled="true"] { color: var(--ink-4); cursor: not-allowed; }
.topbar__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.env-tag {
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: var(--r-1);
}

/* ====== View shell ====== */
.view {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--s-7) var(--s-5) var(--s-9);
  min-height: calc(100vh - var(--topbar-h) - 80px);
}

/* ====== Footer ====== */
/* (公共合规页脚 .sitefoot lives in v7.css — rendered by site-footer.js) */

/* ====== Buttons ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 10px 16px;
  border-radius: var(--r-2);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s var(--ease), border-color .12s var(--ease), transform .12s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: #b6afa1; }
.btn:active { transform: translateY(1px); }
.btn[disabled],
.btn.is-disabled { opacity: .5; cursor: not-allowed; }
/* Brief visual ack while the OS file picker is mounting (PR-Z 2026-06-04, Bug 4). */
.btn.is-pressed {
  transform: scale(0.97);
  opacity: 0.85;
  transition: transform 0.12s var(--ease), opacity 0.12s var(--ease);
}
/* Button loading state — disabled visual + inline spinner (PR-Z 2026-06-04, Bug 4). */
.btn.is-loading {
  pointer-events: none;
  opacity: 0.75;
  cursor: progress;
}
.btn.is-loading .spinner {
  color: currentColor;
  margin-right: 6px;
  vertical-align: -2px;
}
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ink-2);
}
.btn--ghost:hover { background: var(--bg-soft); }
.btn--sm { padding: 6px 10px; font-size: 12px; border-radius: var(--r-1); }
.btn--lg { padding: 14px 22px; font-size: 14px; }
.btn__icon { width: 14px; height: 14px; }

/* ====== Cards ====== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}
.card__head {
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.card__title { font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.card__body { padding: var(--s-5); }

/* ====== Common bits ====== */
.eyebrow {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.muted { color: var(--ink-3); }
.kbd {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--ink-2);
}
.divider {
  height: 1px;
  background: var(--line);
  margin: var(--s-5) 0;
}

/* ============================================================
   PAGE: HOME
   ============================================================ */
.home__hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
  margin-bottom: var(--s-7);
}
.home__title {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -.01em;
  font-weight: 600;
  margin: 0 0 var(--s-3) 0;
  max-width: 720px;
  text-wrap: pretty;
}
.home__sub {
  color: var(--ink-3);
  font-size: 15px;
  max-width: 640px;
  margin: 0;
}

/* Upload zone */
.dropzone {
  position: relative;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-3);
  background: var(--surface);
  padding: var(--s-8) var(--s-6);
  text-align: center;
  transition: border-color .15s var(--ease), background .15s var(--ease);
  cursor: pointer;
}
.dropzone:hover { border-color: var(--accent); background: var(--surface-2); }
.dropzone.is-drag {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dropzone__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto var(--s-4);
  color: var(--accent);
  display: block;
}
.dropzone__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 var(--s-2);
  letter-spacing: -.005em;
}
.dropzone__hint {
  color: var(--ink-3);
  font-size: 13px;
  margin: 0 0 var(--s-5);
}
.dropzone__hint .kbd { margin: 0 2px; }
.dropzone__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.dropzone__meta {
  margin-top: var(--s-5);
  font-size: 12px;
  color: var(--ink-4);
  display: flex;
  justify-content: center;
  gap: var(--s-5);
}
.dropzone__meta-item { display: inline-flex; gap: 6px; align-items: center; }
/* Upload-in-progress state — replaces the default dropzone visual while the
   createJob + previewCost + getCredits chain runs (PR-Z 2026-06-04, Bug 4). */
.dropzone__uploading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--ink);
}
.dropzone__uploading .spinner {
  width: 28px; height: 28px;
  color: var(--accent);
}
.dropzone__uploading-name {
  font-size: 14px;
  font-weight: 500;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropzone__uploading-hint {
  font-size: 13px;
  color: var(--ink-3);
}

/* Recent jobs */
.recent {
  margin-top: var(--s-7);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
}
.section-head__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
}
.section-head__meta { font-size: 12px; color: var(--ink-3); }

.joblist { list-style: none; margin: 0; padding: 0; }
.joblist__item {
  display: grid;
  /* 5 cols: status · name(grows) · type-tag · status-pill · action.
     The type-tag (解析/标书 badge) is the 3rd child — without its own
     column the trailing action wraps to a squeezed 2nd row (only visible
     on hover, opacity:0 otherwise). */
  grid-template-columns: 28px 1fr auto auto auto;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-2);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .12s var(--ease);
}
.joblist__item:hover { background: var(--surface); }
.joblist__item:last-child { border-bottom: 0; }
.joblist__status {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink-4);
  margin-left: 6px;
}
.joblist__status--running { background: var(--accent); animation: pulse 1.6s infinite var(--ease); }
.joblist__status--done    { background: var(--ok); }
.joblist__status--failed  { background: var(--err); }
.joblist__main { min-width: 0; }
.joblist__name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.joblist__sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
  display: flex;
  gap: 12px;
}
.joblist__sub .sep { color: var(--ink-4); }
.joblist__time {
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.joblist__action {
  font-size: 12px;
  color: var(--ink-3);
  opacity: 0;
  transition: opacity .12s var(--ease);
}
.joblist__item:hover .joblist__action { opacity: 1; color: var(--accent); }

.empty {
  padding: var(--s-7) var(--s-5);
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  border: 1px dashed var(--line);
  border-radius: var(--r-3);
  background: var(--surface-2);
}
.empty__title { font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }

/* Status pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: .04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill--running { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.pill--done    { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill--failed  { background: var(--err-soft); color: var(--err); border-color: transparent; }
.pill--warn    { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  opacity: .8;
}

/* ============================================================
   PAGE: PROCESSING
   ============================================================ */
.proc {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
}
.proc__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-5);
  flex-wrap: wrap;
}
.proc__filename {
  font-size: 22px;
  font-weight: 600;
  margin: 4px 0 6px;
  letter-spacing: -.005em;
  word-break: break-all;
}
.proc__sub {
  color: var(--ink-3);
  font-size: 13px;
  display: flex;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.proc__sub .sep { color: var(--ink-4); }

.progress {
  margin-top: var(--s-3);
}
.progress__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.progress__pct {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.progress__phase {
  font-size: 13px;
  color: var(--ink-3);
}
.progress__bar {
  height: 4px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .6s var(--ease);
  position: relative;
}
.progress__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  animation: shimmer 2.4s infinite linear;
}

/* 5-phase stepper */
/* Column count is variable-driven: consumers that set an inline
   `--step-count` (e.g. the review chrome's 5-step stepper) override the
   fallback. Fallback 5 preserves every existing consumer that sets nothing. */
.stepper {
  display: grid;
  grid-template-columns: repeat(var(--step-count, 5), 1fr);
  gap: 0;
  position: relative;
  padding: var(--s-4) 0;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0 8px;
  text-align: center;
}
.step::before, .step::after {
  content: "";
  position: absolute;
  top: 14px;
  height: 1px;
  background: var(--line);
  z-index: 0;
}
.step::before { left: 0; right: 50%; }
.step::after  { left: 50%; right: 0; }
.step:first-child::before { display: none; }
.step:last-child::after { display: none; }

.step__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: all .25s var(--ease);
  font-variant-numeric: tabular-nums;
}
.step__label {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  white-space: nowrap;
}
.step__hint {
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.step.is-active .step__dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.step.is-active .step__label { color: var(--ink); font-weight: 600; }
.step.is-done .step__dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.step.is-done .step__label { color: var(--ink-2); }
.step.is-done::after,
.step.is-active::before { background: var(--accent); }
.step.is-failed .step__dot {
  background: var(--err);
  border-color: var(--err);
  color: #fff;
}

/* Live log */
.log {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-4) var(--s-5);
  max-height: 280px;
  overflow-y: auto;
  color: var(--ink-2);
}
.log__line {
  display: grid;
  grid-template-columns: 80px 60px 1fr;
  gap: var(--s-3);
  padding: 2px 0;
  border-bottom: 1px dashed transparent;
}
.log__time { color: var(--ink-4); }
.log__tag {
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
  font-size: 10px;
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--bg-soft);
  color: var(--ink-3);
  height: 18px;
  align-self: center;
  text-align: center;
}
.log__tag--info  { color: var(--accent); background: var(--accent-soft); }
.log__tag--ok    { color: var(--ok); background: var(--ok-soft); }
.log__tag--warn  { color: var(--warn); background: var(--warn-soft); }
.log__tag--err   { color: var(--err); background: var(--err-soft); }
.log__msg { color: var(--ink-2); }

/* ============================================================
   PAGE: DETAIL
   ============================================================ */
.detail {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--s-6);
  align-items: start;
}
@media (max-width: 1100px) {
  .detail { grid-template-columns: 1fr; }
  .toc { position: static !important; max-height: none !important; }
}

.detail__head {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s-2);
}
.detail__title {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -.005em;
}
.detail__meta {
  display: flex;
  gap: var(--s-4);
  flex-wrap: wrap;
  align-items: center;
  color: var(--ink-3);
  font-size: 13px;
}
.detail__meta .sep { color: var(--ink-4); }
.detail__actions {
  display: flex;
  gap: var(--s-2);
  margin-left: auto;
}

/* Diagnostic banner */
.banner {
  grid-column: 1 / -1;
  display: flex;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-3);
  background: var(--warn-soft);
  border: 1px solid #ecd9a8;
  color: #5c3d00;
}
.banner__icon { flex: 0 0 auto; color: var(--warn); margin-top: 2px; }
.banner__title { font-weight: 600; font-size: 13px; margin-bottom: 4px; color: #4a3000; }
.banner__list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
}
.banner__list li { margin: 2px 0; }
.banner__close {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--warn);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
}

/* ToC sidebar */
.toc {
  position: sticky;
  top: calc(var(--topbar-h) + var(--s-4));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-4) 0;
  max-height: calc(100vh - var(--topbar-h) - var(--s-7));
  overflow-y: auto;
}
.toc__head {
  padding: 0 var(--s-4) var(--s-3);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s-3);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.toc__count {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-4);
  letter-spacing: 0;
}
.toc__list { list-style: none; margin: 0; padding: 0; }
.toc__item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: var(--s-2);
  align-items: center;
  padding: 8px var(--s-4);
  cursor: pointer;
  border-left: 2px solid transparent;
  font-size: 13px;
  color: var(--ink-2);
  transition: background .12s var(--ease);
}
.toc__item:hover { background: var(--surface-2); }
.toc__item.is-active {
  background: var(--accent-soft);
  border-left-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
}
.toc__num { color: var(--ink-4); font-size: 11px; font-variant-numeric: tabular-nums; }
.toc__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc__flag {
  width: 6px; height: 6px; border-radius: 50%;
  background: transparent;
}
.toc__item[data-dirty="true"] .toc__flag { background: var(--accent); }
.toc__item[data-warn="true"] .toc__flag  { background: var(--warn); }

/* Editor area */
.editor {}
.editor__chapter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.editor__chapter-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -.005em;
}
.editor__chapter-num {
  color: var(--ink-4);
  font-size: 13px;
  font-weight: 500;
  margin-right: var(--s-2);
  font-variant-numeric: tabular-nums;
}
.editor__chapter-actions { display: flex; gap: var(--s-2); align-items: center; }
.save-state {
  font-size: 12px;
  color: var(--ink-4);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.save-state.is-dirty { color: var(--warn); }
.save-state.is-saving { color: var(--ink-3); }
.save-state.is-saved { color: var(--ok); }

/* Split pane */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  overflow: hidden;
  min-height: 560px;
}
.split__pane { display: flex; flex-direction: column; min-width: 0; }
.split__pane + .split__pane { border-left: 1px solid var(--line); }
.split__pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--s-4);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  background: var(--surface-2);
}
.split__pane-head .muted { font-variant-numeric: tabular-nums; }

.editor__textarea {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  background: transparent;
  resize: none;
  outline: none;
  padding: var(--s-4) var(--s-5);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  min-height: 540px;
}
.editor__textarea::placeholder { color: var(--ink-4); }

.preview {
  flex: 1 1 auto;
  padding: var(--s-5) var(--s-6);
  overflow-y: auto;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.75;
  background: var(--surface);
  min-height: 540px;
}
.preview h1, .preview h2, .preview h3, .preview h4 {
  font-weight: 600;
  letter-spacing: -.005em;
  margin: 1.4em 0 .5em;
  color: var(--ink);
}
.preview h1 { font-size: 22px; margin-top: 0; }
.preview h2 { font-size: 18px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.preview h3 { font-size: 15px; }
.preview h4 { font-size: 13px; color: var(--ink-2); }
.preview p { margin: 0 0 1em; }
.preview ul, .preview ol { padding-left: 1.5em; margin: 0 0 1em; }
.preview li { margin: 4px 0; }
.preview blockquote {
  border-left: 3px solid var(--line-strong);
  padding: 4px 14px;
  margin: 1em 0;
  color: var(--ink-3);
  background: var(--surface-2);
  border-radius: 0 var(--r-2) var(--r-2) 0;
}
.preview code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--bg-soft);
  padding: 1px 5px;
  border-radius: 3px;
}
.preview pre {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: var(--s-3) var(--s-4);
  overflow-x: auto;
  font-size: 12.5px;
}
.preview pre code { background: transparent; padding: 0; }
.preview hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.preview table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 13px;
}
.preview th, .preview td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.preview th { background: var(--surface-2); font-weight: 600; }
.preview strong { font-weight: 600; }
.preview a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   Misc — toasts, loaders, tweaks panel
   ============================================================ */
.toast-host {
  position: fixed;
  right: var(--s-5);
  bottom: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 60;
}
.toast {
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--r-2);
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  animation: rise .2s var(--ease);
  max-width: 360px;
}
.toast--ok { background: #1c4d2c; }
.toast--err { background: #6e1717; }

.spinner {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  display: inline-block;
  animation: spin .9s linear infinite;
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-soft), #f3f1ec, var(--bg-soft));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--r-2);
}

/* Segmented control — shared by /settings radioRow + /history filter.
   (The floating Tweaks panel that originally introduced .tweak-* was
   removed in C-1; only .tweak-seg survives, now reused here.) */
.tweak-seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  padding: 2px;
  background: var(--bg-soft);
}
.tweak-seg button {
  flex: 1;
  white-space: nowrap;
  border: 0;
  background: transparent;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 3px;
  cursor: pointer;
  color: var(--ink-3);
}
.tweak-seg button.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.04); }

/* Animations */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.85); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.fadein { animation: fadein .25s var(--ease) forwards; opacity: 1; }

/* Mobile single-column */
@media (max-width: 720px) {
  :root { --s-7: 32px; --s-8: 40px; --s-9: 60px; }
  .topbar__inner { padding: 0 var(--s-4); gap: var(--s-4); }
  .topnav { display: none; }
  .view { padding: var(--s-5) var(--s-4) var(--s-7); }
  .home__title { font-size: 26px; }
  .stepper { grid-template-columns: 1fr; }
  .step { flex-direction: row; align-items: center; gap: 12px; padding: 10px 0; }
  .step::before, .step::after { display: none; }
  .step__label { margin-top: 0; }
  .split { grid-template-columns: 1fr; }
  .split__pane + .split__pane { border-left: 0; border-top: 1px solid var(--line); }
}


/* ── source: css/v2.css ── */
/* v2 styles — extends app.css. Loaded after it. */

/* page header (used by parse/format/checklist/history) */
.page-head { margin: 0 0 var(--s-6); }
.page-head__title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 6px 0 6px;
}
.page-head__sub { color: var(--ink-3); font-size: 14px; margin: 0; max-width: 560px; }
.page-intro {
  color: var(--ink-2);
  font-size: 14px;
  margin: 0 0 var(--s-5);
  max-width: 760px;
}

/* ============================================================
   Job shell — head + sub-nav tabs (shared by 4 sub-views)
   ============================================================ */
.jobshell { display: block; }
.js-head {
  display: flex; flex-direction: column; gap: 6px;
  padding: 0 0 var(--s-4);
}
.js-head__row {
  display: flex; align-items: center; gap: var(--s-3);
  flex-wrap: wrap;
}
.js-back { margin-left: -10px; }
.js-head__actions { margin-left: auto; display: flex; gap: 8px; }
.js-head__title {
  font-size: 24px;
  font-weight: 600;
  margin: 6px 0 0;
  letter-spacing: -.005em;
  text-wrap: pretty;
}
.js-head__meta {
  display: flex; gap: var(--s-3); flex-wrap: wrap;
  color: var(--ink-3); font-size: 13px;
}
.js-head__meta .sep { color: var(--ink-4); }

.js-tabs {
  position: sticky;
  top: var(--topbar-h);
  z-index: 18;
  background: var(--bg);
  margin: 0 calc(var(--s-5) * -1) var(--s-5);
  padding: 0 var(--s-5);
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
}
.js-tab {
  display: inline-block;
  padding: 14px 18px 13px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.js-tab:hover { color: var(--ink); }
.js-tab.is-active {
  color: var(--accent-ink);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.jobshell__body { padding: 0; }

.btn--danger {
  background: var(--err);
  border-color: var(--err);
  color: #fff;
}
.btn--danger:hover { background: #6a1212; border-color: #6a1212; }
.btn--danger-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--err);
}
.btn--danger-ghost:hover { background: var(--err-soft); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 18, 12, .42);
  z-index: 90;
  display: flex; align-items: center; justify-content: center;
  animation: fadein .15s var(--ease);
}
.modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  width: min(440px, calc(100vw - 32px));
  padding: var(--s-5) var(--s-5) var(--s-4);
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
}
.modal__title { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.modal__body { margin: 0 0 var(--s-4); color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.modal__actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Chapter flash (deep-link target) */
.chapter-flash { animation: chapterFlash .9s var(--ease); }
@keyframes chapterFlash {
  0%   { background: var(--accent-soft); box-shadow: 0 0 0 6px var(--accent-soft); }
  100% { background: transparent; box-shadow: 0 0 0 0 transparent; }
}

/* ============================================================
   PAGE: 招标文件解析 / Parse
   ============================================================ */
.cardgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
}
.cardgrid > .pcard--wide { grid-column: span 2; }
@media (max-width: 900px) {
  .cardgrid { grid-template-columns: 1fr; }
  .cardgrid > .pcard--wide { grid-column: span 1; }
}

.pcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
}
.pcard__head {
  display: flex; align-items: baseline; gap: 12px;
  padding: 14px var(--s-5) 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.pcard__num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--ink-4);
  font-weight: 600;
}
.pcard__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
}
.pcard__body { padding: var(--s-4) var(--s-5); }
.pcard__empty {
  padding: var(--s-6) var(--s-4);
  text-align: center;
  color: var(--ink-3);
}
.pcard__empty-icon { color: var(--ink-4); display: inline-flex; margin-bottom: 8px; }
.pcard__empty-title { font-weight: 500; color: var(--ink-2); margin-bottom: 4px; }
.pcard__empty-sub { font-size: 12px; color: var(--ink-3); max-width: 360px; margin: 0 auto; }

/* 招标原文 panel (arc bid-review-checklist P3) — collapsible tender
   source paragraphs below the 6-card grid; the 跳到相关章节 jump lands
   here with a transient flash highlight. */
.tender-src {
  margin-top: var(--s-4, 20px);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: var(--r-2, 8px);
  background: var(--surface, #fff);
}
.tender-src__head {
  display: flex; align-items: baseline; gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}
.tender-src__head::-webkit-details-marker { display: none; }
.tender-src__head::before {
  content: '▸'; color: var(--ink-3); margin-right: 2px;
}
.tender-src[open] > .tender-src__head::before { content: '▾'; }
.tender-src__title { font-weight: 600; }
.tender-src__hint { font-size: 12px; color: var(--ink-3); }
.tender-src__body { padding: 0 16px 12px; }
.tender-src__sec {
  padding: 10px 12px;
  border-top: 1px solid var(--line, #e5e7eb);
  border-radius: var(--r-1, 4px);
  transition: background-color 0.6s ease;
}
.tender-src__sec-title { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.tender-src__text {
  margin: 0;
  font: inherit; font-size: 12.5px; line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}
/* ~2s transient highlight applied by page-parse.js focusSection. */
.tender-src__sec--flash {
  background: var(--warn-soft, #fdf3d7);
}

.basic-infer-note {
  margin: 0 0 var(--s-3);
  padding: 7px 10px;
  font-size: 12px; line-height: 1.5;
  color: #6b5616;
  background: #fbf6e7;
  border: 1px solid #ecdfb6;
  border-radius: var(--r-1);
}
.infer-chip {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px; letter-spacing: .04em;
  padding: 1px 6px;
  vertical-align: middle;
  color: #6b5616; background: #f4e7d6;
  border-radius: 999px;
}

.deflist { margin: 0; }
.deflist dt {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  margin-top: var(--s-3);
}
.deflist dt:first-child { margin-top: 0; }
.deflist dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.qual-filter {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
}
.qual-chip {
  font-size: 12px; padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface, #fff);
  color: var(--ink-2);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.qual-chip:hover { border-color: var(--accent); color: var(--ink); }
.qual-chip.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.qual-group + .qual-group { margin-top: var(--s-3); }
.qual-group-head {
  display: flex; align-items: center; gap: var(--s-2);
  margin-bottom: 2px;
}
.qual-group-count { font-size: 11px; color: var(--ink-3); }
/* Compound selector so this wins over the base `.qual-item`
   grid-template below regardless of source order (both are
   single-class specificity; the later rule would otherwise win and
   squeeze the lone text cell into the 60px chip column). */
.qual-item.qual-item--nochip { grid-template-columns: 1fr; }
.qual-list { list-style: none; margin: 0; padding: 0; }
.qual-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: var(--s-3);
  padding: 10px 0;
  align-items: start;
  border-bottom: 1px dashed var(--line);
}
.qual-item:last-child { border-bottom: 0; }
.qual-cat {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; padding: 3px 8px;
  border-radius: var(--r-1);
  background: var(--bg-soft);
  color: var(--ink-2);
  font-weight: 500;
  height: fit-content;
  letter-spacing: .04em;
}
.qual-cat--legal { background: #ebe9e3; color: #463f30; }
.qual-cat--fin   { background: #e8f0e6; color: #2f4d2a; }
.qual-cat--tech  { background: var(--accent-soft); color: var(--accent-ink); }
.qual-cat--perf  { background: #f4e7d6; color: #5b3f12; }
.qual-cat--rep   { background: #e6eef4; color: #234255; }
.qual-cat--gen   { background: var(--bg-soft); color: var(--ink-2); }
.qual-text { color: var(--ink); font-size: 13.5px; line-height: 1.6; }

.eval-method {
  display: flex; align-items: baseline; gap: 12px;
  padding-bottom: var(--s-3);
  margin-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
}
.eval-method-name { font-weight: 600; color: var(--ink); }

.eval-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.eval-table th, .eval-table td {
  text-align: left;
  padding: 10px 8px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.eval-table th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-3); font-weight: 600;
  background: var(--surface-2);
}
.eval-table .num { text-align: right; width: 110px; font-variant-numeric: tabular-nums; }
.eval-name { font-weight: 500; color: var(--ink); width: 130px; }
.eval-scoring { color: var(--ink-2); }
.weight-bar {
  display: flex; align-items: center; justify-content: flex-end;
  position: relative;
}
.weight-num {
  position: relative; z-index: 1;
  font-weight: 600;
  color: var(--ink);
}
.weight-num::after { content: ' %'; color: var(--ink-4); font-weight: 400; }
.weight-fill {
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin-right: 36px;
  max-width: 100px;
  opacity: .55;
}
.eval-subhead {
  margin: var(--s-4) 0 var(--s-2);
  font-size: 12px; font-weight: 600;
  color: var(--ink-2);
  letter-spacing: .02em;
}
.eval-total-row td {
  font-weight: 600; color: var(--ink);
  border-top: 2px solid var(--line);
}
.eval-total-note {
  font-weight: 400; font-size: 12px;
  color: var(--warn, #b7791f);
}
.eval-table--passfail .eval-name { width: auto; }

.supp-list { list-style: none; margin: 0; padding: 0; }
.supp-item {
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line);
}
.supp-item:last-child { border-bottom: 0; }
.supp-head { display: flex; gap: var(--s-3); align-items: baseline; margin-bottom: 6px; }
.supp-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: var(--r-1);
}
.supp-title { font-weight: 600; color: var(--ink); }
.supp-body { color: var(--ink-2); font-size: 13.5px; line-height: 1.7; }

/* ============================================================
   PAGE: 投标文件格式 / Format — outline tree
   ============================================================ */
.src-note {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 14px;
  background: var(--accent-soft);
  border-radius: var(--r-2);
  font-size: 13px;
  color: var(--accent-ink);
  margin-bottom: var(--s-4);
}
.src-note__icon { color: var(--accent); display: inline-flex; }

.fmt-legend {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  margin-bottom: var(--s-4);
  font-size: 12px;
}
.fmt-legend .eyebrow { margin-right: 8px; }
.fmt-legend__sep { width: 1px; height: 14px; background: var(--line); }

.badge {
  display: inline-flex; align-items: center;
  font-size: 11px; padding: 2px 8px;
  border-radius: var(--r-1);
  font-weight: 500;
  letter-spacing: .04em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge--bind   { background: #e6e3da; color: #4a3f24; }
.badge--anon   { background: #2a2d33; color: #fff; }
.badge--page   { background: var(--accent-soft); color: var(--accent-ink); }
.badge--attach { background: #f7e3d0; color: #5b3a12; }
.badge--gen    { background: var(--bg-soft); color: var(--ink-2); }

.fmt {
  display: flex; flex-direction: column; gap: var(--s-4);
}
.fmt > * { width: 100%; }
.fmt-tree {
  background: var(--surface);
  border: 1px solid var(--line);
  width: 100%;
  border-radius: var(--r-3);
  padding: 8px 0;
}
.fnode { position: relative; }
.fnode--root + .fnode--root { border-top: 1px solid var(--line); }
.fnode__row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px var(--s-5);
  width: 100%; box-sizing: border-box;
  position: relative;
}
.fnode--root > .fnode__row { padding-top: 14px; padding-bottom: 12px; }
.fnode__indent {
  display: flex; flex: 0 0 auto;
}
.fnode__rail {
  width: 22px;
  border-left: 1px dashed var(--line);
  margin-right: 0;
  align-self: stretch;
}
.fnode[data-depth="0"] .fnode__indent { display: none; }

.fnode__chev {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  border-radius: var(--r-1);
  transition: transform .15s var(--ease), background .15s var(--ease);
  margin-top: 2px;
  flex: 0 0 auto;
}
.fnode__chev:hover { background: var(--bg-soft); color: var(--ink); }
.fnode__chev.is-open { transform: rotate(90deg); }
.fnode__leaf-dot {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  margin-top: 2px;
}
.fnode__leaf-dot::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink-4);
}

.fnode__main {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.fnode__row.is-leaf .fnode__main {
  flex-direction: row; align-items: center; gap: var(--s-4); flex-wrap: wrap;
}
.fnode__row.is-leaf .fnode__title-row { flex: 1 1 320px; min-width: 0; }
.fnode__row.is-leaf .fnode__leaf-meta { margin-left: auto; flex: 0 0 auto; }
.fnode__title-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.fnode__title {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}
.fnode--root > .fnode__row .fnode__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.005em;
}
.fnode__desc {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 4px;
  line-height: 1.65;
  max-width: 800px;
}
.fnode__leaf-meta {
  display: flex; align-items: center; gap: var(--s-3);
  margin-top: 0;
  white-space: nowrap;
}
.fnode__jump {
  font-size: 12px;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 4px;
  transition: color .12s var(--ease);
}
.fnode__jump:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

.fnode[data-expanded="false"] > .fnode__kids { display: none; }
.fnode__kids { padding-left: 0; }

.cov {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--r-1);
}
.cov__mark { font-weight: 700; }
.cov--ok      { background: var(--ok-soft);   color: var(--ok); }
.cov--miss    { background: var(--err-soft);  color: var(--err); }
.cov--partial { background: var(--warn-soft); color: var(--warn); }
/* Review-mode clickable coverage toggle (bid-review-checklist arc P2):
   a <button> reusing the .cov badge look — strip UA button chrome. */
.cov--toggle {
  border: 0; font: inherit; font-size: 12px; font-weight: 500;
  cursor: pointer; line-height: inherit;
}
.cov--toggle:hover { filter: brightness(0.96); }
.cov--toggle:focus-visible { outline: 2px solid var(--accent, #4a7dff); outline-offset: 1px; }
.cov--toggle[disabled] { opacity: 0.6; cursor: progress; }

/* ============================================================
   PAGE: 投标文件审查 / Checklist
   ============================================================ */
.chk-summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  margin-bottom: var(--s-4);
  font-size: 14px;
}
.chk-summary__total { font-weight: 600; color: var(--ink); }
.chk-summary__sep   { color: var(--ink-4); }
.chk-summary__pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: var(--r-1);
  font-weight: 500;
}
.chk-summary__mark { font-weight: 700; }
.chk-summary__pill--ok      { background: var(--ok-soft); color: var(--ok); }
.chk-summary__pill--partial { background: var(--warn-soft); color: var(--warn); }
.chk-summary__pill--miss    { background: var(--err-soft); color: var(--err); }

.chk-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3) var(--s-5);
  padding: var(--s-4) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  margin-bottom: var(--s-4);
}
@media (max-width: 760px) {
  .chk-filters { grid-template-columns: 1fr; }
}
.chk-filter {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}
.chk-filter__label {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  flex: 0 0 60px;
}
.chk-seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  padding: 2px;
  background: var(--bg-soft);
  flex-wrap: wrap;
  flex: 1 1 auto;
}
.chk-seg__btn {
  flex: 0 1 auto;
  border: 0;
  background: transparent;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 3px;
  cursor: pointer;
  color: var(--ink-3);
  white-space: nowrap;
}
.chk-seg__btn.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.chk-search-wrap { flex: 1 1 auto; }
.chk-search {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  background: var(--surface);
  color: var(--ink);
}
.chk-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.chk-list { display: flex; flex-direction: column; gap: 8px; }
.chk-item {
  display: grid;
  grid-template-columns: 4px 1fr auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  transition: border-color .15s var(--ease);
}
.chk-item:hover { border-color: var(--line-strong); }
.chk-item__bar { background: var(--ink-4); }
.chk-item--covered   .chk-item__bar { background: var(--ok); }
.chk-item--partial   .chk-item__bar { background: var(--warn); }
.chk-item--uncovered .chk-item__bar { background: var(--err); }

.chk-item__main { padding: 12px var(--s-4); min-width: 0; }
.chk-item__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.chk-item__req {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .04em;
}
.chk-item__q {
  font-size: 14.5px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.5;
  text-wrap: pretty;
}
.chk-item__ev {
  font-size: 12.5px;
  color: var(--ink-3);
  font-style: italic;
  margin-top: 6px;
}

.chk-item__right {
  display: flex; flex-direction: column; align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 12px var(--s-4) 12px 0;
  white-space: nowrap;
}
.chk-item__jump {
  font-size: 12px;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 4px;
}
.chk-item__jump:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
/* Review mode, unresolved tender anchor (P3) — visually muted; click
   shows the 未定位到招标原文段落 toast instead of navigating. */
.chk-item__jump--off { color: var(--ink-4); cursor: default; }
.chk-item__jump--off:hover { color: var(--ink-4); text-decoration: none; }

.prio { font-weight: 500; padding: 2px 7px; border-radius: var(--r-1); border: 0; font-size: 11px; }
.prio--critical      { background: #fbe1de; color: #7a1313; }
.prio--standard      { background: var(--bg-soft); color: var(--ink-2); }
.prio--informational { background: #ecf0f5; color: #4a5b78; }

.cat { font-weight: 500; padding: 2px 7px; border-radius: var(--r-1); border: 0; font-size: 11px; background: var(--bg-soft); color: var(--ink-2); }
.cat--qual { background: #f4e7d6; color: #5b3f12; }
.cat--tech { background: var(--accent-soft); color: var(--accent-ink); }
.cat--biz  { background: #ecf0f5; color: #284067; }
.cat--svc  { background: #e8f0e6; color: #2f4d2a; }
.cat--team { background: #efe3f0; color: #4a2a55; }
.cat--perf { background: #f7e3d0; color: #5b3a12; }

@media (max-width: 700px) {
  .chk-item { grid-template-columns: 4px 1fr; }
  .chk-item__right {
    flex-direction: row; align-items: center; justify-content: flex-start;
    padding: 0 var(--s-4) 12px var(--s-4);
    grid-column: 2;
    flex-wrap: wrap;
  }
}

/* ============================================================
   审查清单 — grouped self-audit upgrade (chk2-* / refm__*)
   Ported from reference_docs/active/review-checklist-upgrade-mockup.html.
   Reuses existing tokens + the .chk-* / .cov / .pill / .prio-- / .cat--
   blocks above. .prio--* are intentionally NOT re-declared here (they
   already live at the top of this file). review-checklist-upgrade arc.
   ============================================================ */

/* --- Overall coverage summary card --- */
.chk2-overview {
  display: grid; grid-template-columns: auto 1fr; gap: 24px 28px;
  align-items: center; padding: 20px 24px;
  border: 1px solid var(--line); border-radius: var(--r-3);
  background: var(--surface);
}
.chk2-ring { display: flex; align-items: center; gap: 16px; }
.chk2-ring__num { font-size: 40px; font-weight: 700; color: var(--ink); line-height: 1;
  font-variant-numeric: tabular-nums; }
.chk2-ring__num small { font-size: 18px; font-weight: 600; color: var(--ink-3); }
.chk2-ring__cap { font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin-top: 4px; }
.chk2-bar-wrap { min-width: 0; }
.chk2-segbar {
  height: 12px; border-radius: 999px; overflow: hidden; display: flex;
  background: var(--bg-soft); box-shadow: inset 0 1px 2px rgba(0,0,0,.06);
}
.chk2-segbar__seg { height: 100%; transition: width .5s var(--ease); }
.chk2-segbar__seg--ok { background: var(--ok); }
.chk2-segbar__seg--partial { background: var(--warn); }
.chk2-segbar__seg--miss { background: var(--err); opacity: .28; }
.chk2-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; }
.chk2-legend__item { display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--ink-2); }
.chk2-legend__dot { width: 10px; height: 10px; border-radius: 3px; }
.chk2-legend__dot--ok { background: var(--ok); }
.chk2-legend__dot--partial { background: var(--warn); }
.chk2-legend__dot--miss { background: var(--err); }
.chk2-legend__n { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.chk2-crit {
  grid-column: 1 / -1; margin-top: 2px; padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2);
}
.chk2-crit__badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--err-soft); color: var(--err); font-weight: 600;
  padding: 3px 10px; border-radius: 999px; font-size: 12.5px;
}
.chk2-crit__link { color: var(--accent); font-weight: 600; cursor: pointer; margin-left: auto; }
.chk2-crit__link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --- Sticky toolbar (filters + expand/collapse) --- */
.chk2-toolbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  margin: 0 -4px; padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.chk2-toolbar__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chk2-toolbar__spacer { flex: 1 1 auto; }
.chk2-linkbtn { background: none; border: 0; cursor: pointer; font-size: 13px;
  color: var(--accent); font-weight: 500; padding: 4px 6px; border-radius: var(--r-1); }
.chk2-linkbtn:hover { background: var(--accent-soft); }

/* --- Category groups --- */
.chk2-group { border: 1px solid var(--line); border-radius: var(--r-3);
  overflow: hidden; background: var(--surface); }
.chk2-group + .chk2-group { margin-top: 12px; }
.chk2-group__head {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 18px; background: none; border: 0; cursor: pointer; text-align: left;
  font: inherit;
}
.chk2-group__head:hover { background: var(--bg-soft); }
.chk2-group__chev { color: var(--ink-3); transition: transform .18s var(--ease);
  display: inline-flex; flex: 0 0 auto; }
.chk2-group.is-open .chk2-group__chev { transform: rotate(90deg); }
.chk2-group__name { font-size: 15px; font-weight: 600; color: var(--ink); flex: 0 0 auto; }
.chk2-group__count { font-size: 12.5px; color: var(--ink-3); flex: 0 0 auto; }
.chk2-group__mini { flex: 1 1 auto; max-width: 220px; margin-left: auto; }
.chk2-group__mini .chk2-segbar { height: 7px; }
.chk2-group__pct { font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  flex: 0 0 auto; width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.chk2-group__body { display: none; padding: 4px 12px 14px; }
.chk2-group.is-open .chk2-group__body { display: flex; flex-direction: column; gap: 8px; }

/* --- Item card (extends chk-item) --- */
.chk2-item {
  display: grid; grid-template-columns: 4px 1fr auto;
  border: 1px solid var(--line); border-radius: var(--r-2);
  overflow: hidden; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.chk2-item:hover { border-color: var(--line-strong); box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.chk2-item__bar { background: var(--ink-4); }
.chk2-item[data-cov="covered"]   .chk2-item__bar { background: var(--ok); }
.chk2-item[data-cov="partial"]   .chk2-item__bar { background: var(--warn); }
.chk2-item[data-cov="uncovered"] .chk2-item__bar { background: var(--err); }
.chk2-item__main { padding: 13px 16px; min-width: 0; }
.chk2-item__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 7px; }
.chk2-item__req { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }
.chk2-item__q { font-size: 14.5px; color: var(--ink); line-height: 1.55; text-wrap: pretty; }
.chk2-item__ev {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.chk2-item__ev b {
  color: var(--ink-3);
  font-weight: 600;
  flex: 0 0 auto;
  font-size: 11px;
  letter-spacing: .04em;
}
.chk2-item__right {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between;
  gap: 12px; padding: 13px 16px 13px 0; white-space: nowrap;
}

/* --- 3-way self-check toggle --- */
.chk2-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px;
  overflow: hidden; background: var(--bg-soft); }
.chk2-toggle__btn { border: 0; background: none; cursor: pointer; font: inherit;
  font-size: 12px; font-weight: 600; padding: 5px 11px; color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 4px; transition: background .12s, color .12s; }
.chk2-toggle__btn:hover { color: var(--ink); }
.chk2-toggle__btn[aria-pressed="true"][data-v="covered"]   { background: var(--ok);   color: #fff; }
.chk2-toggle__btn[aria-pressed="true"][data-v="partial"]   { background: var(--warn); color: #fff; }
.chk2-toggle__btn[aria-pressed="true"][data-v="uncovered"] { background: var(--err);  color: #fff; }

.chk2-item__jump { font-size: 12px; color: var(--accent); cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; font: inherit; padding: 0; }
.chk2-item__jump:hover { text-decoration: underline; text-underline-offset: 3px; }
.chk2-item__jump--off { color: var(--ink-4); cursor: default; }
.chk2-item__jump--off:hover { color: var(--ink-4); text-decoration: none; }

.chk2-empty { padding: 28px; text-align: center; color: var(--ink-3); font-size: 14px; }

/* --- 查看招标原文 reference paragraph modal (step 6) --- */
.modal--ref { width: min(720px, calc(100vw - 32px)); padding: 0; max-height: 86vh;
  display: flex; flex-direction: column; }
.refm__head { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.refm__crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.refm__req { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.refm__q { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.5; margin: 0; text-wrap: pretty; }
.refm__close { position: absolute; top: 14px; right: 16px; width: 30px; height: 30px;
  border: 0; background: transparent; border-radius: var(--r-1); cursor: pointer;
  color: var(--ink-3); font-size: 20px; line-height: 1; }
.refm__close:hover { background: var(--bg-soft); color: var(--ink); }
.refm__loc { font-size: 12.5px; color: var(--ink-3); margin-top: 10px;
  display: flex; align-items: center; gap: 6px; }
.refm__loc b { color: var(--ink-2); font-weight: 600; }
.refm__body { padding: 20px 22px; overflow-y: auto; }
.refm__para {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 var(--r-2) var(--r-2) 0; padding: 14px 18px;
  color: var(--ink); font-size: 14px; line-height: 1.75;
}
.refm__para h2, .refm__para h3 { margin: 0 0 8px; font-size: 15px; color: var(--ink); }
.refm__para h3 { font-size: 13.5px; margin-top: 14px; color: var(--ink-2); }
.refm__para p { margin: 0 0 10px; }
.refm__para ul { margin: 0 0 10px; padding-left: 20px; }
.refm__para li { margin: 3px 0; }
.refm__para strong { font-weight: 700; }
.refm__para table { border-collapse: collapse; width: 100%; margin: 6px 0 10px; font-size: 13px; }
.refm__para th, .refm__para td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.refm__para th { background: var(--bg-soft); font-weight: 600; }
.refm__para mark { background: #fde68a; color: inherit; padding: 0 2px; border-radius: 2px; }
.refm__srclabel { font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin: 4px 0 8px; }
.refm__status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: var(--r-2); font-size: 13.5px; font-weight: 500; margin-bottom: 4px; }
.refm__status-mark { font-weight: 700; }
.refm__status-ev { margin-left: auto; font-weight: 400; color: var(--ink-3); font-size: 12.5px; }
.refm__status--ok      { background: var(--ok-soft);   color: var(--ok); }
.refm__status--partial { background: var(--warn-soft); color: var(--warn); }
.refm__status--miss    { background: var(--err-soft);  color: var(--err); }
.refm__miss { text-align: center; padding: 20px 12px; }
.refm__miss-ic { width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--err-soft); color: var(--err); font-size: 22px; font-weight: 700; }
.refm__miss-title { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.refm__miss-sub { font-size: 13.5px; color: var(--ink-3); line-height: 1.6; max-width: 420px; margin: 0 auto; }
.refm__ev { margin-top: 16px; text-align: left; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--r-2); padding: 12px 14px; font-size: 13px; color: var(--ink-2); }
.refm__ev b { color: var(--ink); }
.refm__foot { padding: 14px 22px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; }
.refm__foot .chk2-toggle { margin-right: auto; }
.refm__foot-label { font-size: 12.5px; color: var(--ink-3); margin-right: 4px; }

@media (max-width: 700px) {
  .chk2-overview { grid-template-columns: 1fr; }
  .chk2-item { grid-template-columns: 4px 1fr; }
  .chk2-item__right { flex-direction: row; align-items: center; justify-content: flex-start;
    padding: 0 16px 13px; }
  .chk2-group__mini { display: none; }
}

/* ============================================================
   PAGE: 历史 / History
   ============================================================ */
.h-filters {
  display: flex; gap: var(--s-3); align-items: center;
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}
.h-filters__search {
  position: relative;
  flex: 1 1 320px;
  min-width: 240px;
}
.h-search {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  padding: 9px 12px 9px 36px;
  font: inherit;
  font-size: 13px;
  background: var(--surface);
  color: var(--ink);
}
.h-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.h-search__icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--ink-4);
  pointer-events: none;
  display: inline-flex;
}
.h-seg button { padding: 7px 14px; }

.h-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
}
.h-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.h-table th {
  text-align: left;
  padding: 12px var(--s-4);
  background: var(--surface-2);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.h-table td {
  padding: 14px var(--s-4);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.h-table tr:last-child td { border-bottom: 0; }
.h-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.h-th-name { width: 44%; }
.h-th-act  { width: 1%; white-space: nowrap; text-align: right; }
.h-row { cursor: pointer; }
.h-row:hover td { background: var(--surface-2); }

.h-name__file {
  color: var(--ink-4);
  display: inline-flex;
  vertical-align: middle;
  margin-right: 10px;
}
.h-name__text {
  color: var(--ink);
  font-weight: 500;
  display: inline;
  vertical-align: middle;
}
.h-time__abs {
  display: block;
  font-size: 11px;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.h-time { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
.h-actions { text-align: right; white-space: nowrap; }
.h-actions .btn + .btn { margin-left: 4px; }
.h-del { color: var(--err); }
.h-del:hover { background: var(--err-soft); }

.h-pager {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: var(--s-4);
  padding: 0 4px;
}
.h-pager__count { font-size: 12px; color: var(--ink-3); }
.h-pager__btns { display: flex; gap: 8px; }

@media (max-width: 760px) {
  .h-table thead { display: none; }
  .h-table, .h-table tbody, .h-table tr, .h-table td { display: block; width: 100%; }
  .h-table tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .h-table tr:last-child { border-bottom: 0; }
  .h-table td { border-bottom: 0; padding: 4px var(--s-4); }
  .h-actions { padding-top: 8px; justify-content: flex-start; }
}


/* ── source: css/v3.css ── */
/* v3 — profile / settings / help / about + nav extensions. */

/* font-size root scale — uses CSS zoom so the whole app (px-based)
   scales proportionally, not just elements that use rem. */
:root[data-font-size="standard"] { font-size: 100%; }
:root[data-font-size="large"]    { font-size: 112.5%; }
:root[data-font-size="xlarge"]   { font-size: 125%; }

body[data-font-size="standard"] { zoom: 1; }
body[data-font-size="large"]    { zoom: 1.125; }
body[data-font-size="xlarge"]   { zoom: 1.25; }

/* high-contrast mode */
body.high-contrast {
  --ink:   #000;
  --ink-2: #1a1a1a;
  --ink-3: #2a2a2a;
  --ink-4: #404040;
  --line:        #555;
  --line-strong: #222;
  --bg:        #fff;
  --surface:   #fff;
  --surface-2: #f3f3f3;
  --bg-soft:   #ededed;
}

/* save-state pill */
.save-state {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: var(--r-1);
  background: var(--ok-soft);
  color: var(--ok);
  font-weight: 500;
}
.save-state.is-dirty  { background: var(--warn-soft); color: var(--warn); }
.save-state.is-saving { background: var(--accent-soft); color: var(--accent-ink); }
.save-state.is-saved  { background: var(--ok-soft); color: var(--ok); }

/* ============================================================
   PAGE: 公司资料 / Profile
   ============================================================ */
.pf-section + .pf-section { margin-top: var(--s-4); }

.pf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3) var(--s-4);
}
.pf-field { display: flex; flex-direction: column; gap: 4px; }
.pf-field--wide { grid-column: 1 / -1; }
.pf-field__label {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.pf-input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  padding: 8px 12px;
  font: inherit;
  font-size: 13.5px;
  background: var(--surface);
  color: var(--ink);
}
.pf-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.pf-input--ta {
  resize: vertical;
  min-height: 64px;
  font-family: inherit;
  line-height: 1.5;
}

.pf-rows { display: flex; flex-direction: column; gap: 10px; }
.pf-row {
  display: flex; gap: var(--s-3); align-items: stretch;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  position: relative;
  flex-wrap: wrap;
}
.pf-row:hover { border-color: var(--line-strong); }
.pf-cell {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 100px;
  flex: 1;
}
.pf-cell__label {
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-3);
  font-weight: 500;
}
.pf-row__del {
  position: absolute;
  right: 6px; top: 6px;
  border: 0; background: transparent;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 16px; line-height: 1;
  color: var(--ink-4);
  cursor: pointer;
}
.pf-row__del:hover { background: var(--err-soft); color: var(--err); }
.pf-add {
  margin-top: 12px;
  border: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--ink-3);
  border-radius: var(--r-2);
  padding: 9px 14px;
  font: inherit; font-size: 13px;
  cursor: pointer;
  transition: all .15s var(--ease);
  width: 100%;
}
.pf-add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.pf-footer {
  position: sticky;
  bottom: 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: var(--s-3) 0;
  margin-top: var(--s-5);
  display: flex; align-items: center; gap: var(--s-3);
  z-index: 4;
}
.pf-footer__btns { margin-left: auto; display: flex; gap: 8px; }

@media (max-width: 700px) {
  .pf-grid { grid-template-columns: 1fr; }
  .pf-row { flex-direction: column; }
}

/* ============================================================
   PAGE: 设置 / Settings
   ============================================================ */
.st-row {
  display: flex; align-items: center; gap: var(--s-4);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.st-row:last-child { border-bottom: 0; }
.st-row__main { flex: 1; min-width: 0; }
.st-row__label { font-size: 14px; color: var(--ink); font-weight: 500; }
.st-row__sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.5; }
.st-row .tweak-seg { margin-left: auto; }

/* ============================================================
   公司资料 — gallery / list view
   ============================================================ */
/* Gallery head spans the full card grid so 新建资料 aligns to the right edge
   (override v6's readability-oriented 760px cap, which otherwise floats the
   button to mid-page). */
.profile-list .page-head { max-width: none; }
.page-head__row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s-4); flex-wrap: wrap;
}
.pf-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.pf-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 18px 20px 16px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.pf-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.pf-card.is-active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent), 0 2px 8px rgba(0,0,0,.04);
}
.pf-card__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px;
}
.pf-card__name-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pf-card__name {
  font-size: 15px; font-weight: 600;
  letter-spacing: -.005em;
  color: var(--ink); margin: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pf-card__active-tag {
  font-size: 10px;
  letter-spacing: .04em;
  background: var(--accent);
  color: #fff;
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 500;
}
.pf-card__empty-tag {
  font-size: 10px;
  letter-spacing: .04em;
  background: var(--bg-soft);
  color: var(--ink-3);
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid var(--line);
}
.pf-card__company {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 12px;
}
.pf-card__company--empty { color: var(--ink-4); font-style: italic; }
.pf-card__stats { display: flex; gap: var(--s-4); }
.pf-card__stat {
  display: flex; flex-direction: column; gap: 2px;
}
.pf-card__stat-num {
  font-size: 18px; font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.pf-card__stat-label {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .04em;
}
.pf-card__foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}
.pf-card__foot-hint {
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .02em;
  margin-left: 8px;
}
.pf-card__kebab-wrap { position: relative; }
.pf-card__kebab {
  border: 0; background: transparent;
  font-size: 18px; line-height: 1;
  color: var(--ink-3); cursor: pointer;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.pf-card__kebab:hover { background: var(--bg-soft); color: var(--ink); }
.pf-card__menu {
  position: absolute; top: 32px; right: 0;
  z-index: 20;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  padding: 4px;
  display: flex; flex-direction: column;
  min-width: 140px;
}
.pf-card__menu-item {
  appearance: none; border: 0; background: transparent;
  font: inherit; font-size: 13px;
  text-align: left;
  padding: 8px 12px;
  border-radius: var(--r-1);
  cursor: pointer;
  color: var(--ink);
}
.pf-card__menu-item:hover { background: var(--bg-soft); }
.pf-card__menu-item.is-danger { color: var(--danger, #b42318); }
.pf-card__menu-item.is-disabled {
  color: var(--ink-4);
  cursor: not-allowed;
  pointer-events: none;
}

.pf-empty {
  text-align: center;
  padding: 60px 16px;
  color: var(--ink-3);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-3);
  background: var(--bg-soft);
  font-size: 14px;
}

/* ============================================================
   公司资料 — form (new + edit)
   ============================================================ */
.pf-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
  text-decoration: none;
  margin-bottom: 8px;
}
.pf-back:hover { color: var(--ink); }

.pf-title-wrap {
  display: flex; align-items: center; gap: 12px;
  margin-top: 4px;
}
.pf-title-input {
  font: inherit;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--ink);
  border: 0;
  background: transparent;
  padding: 4px 0;
  border-bottom: 1px dashed transparent;
  outline: none;
  min-width: 320px;
  flex: 1;
}
.pf-title-input:hover { border-bottom-color: var(--line); }
.pf-title-input:focus {
  border-bottom-color: var(--accent);
}
.pf-title-input::placeholder { color: var(--ink-4); font-weight: 500; }
.pf-title-hint {
  font-size: 11px; color: var(--ink-4);
  letter-spacing: .04em;
}

.pf-footer--sticky {
  position: sticky;
  bottom: 16px;
  z-index: 5;
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
  padding: 12px 16px;
}
.st-row--block { flex-direction: column; align-items: stretch; gap: 12px; }
.st-row--block .st-row__label { font-weight: 500; }

/* 字号 visual picker */
.fs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.fs-card {
  appearance: none;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
  display: flex; flex-direction: column; gap: 12px;
  font: inherit;
  color: var(--ink);
}
.fs-card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.fs-card.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.fs-card__head {
  display: flex; align-items: center; gap: 12px;
}
.fs-card__glyph {
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1;
  font-feature-settings: "tnum" off;
  flex: 0 0 auto;
  min-width: 36px;
}
.fs-card__meta {
  display: flex; flex-direction: column; gap: 1px;
  flex: 1; min-width: 0;
}
.fs-card__name { font-size: 14px; font-weight: 500; color: var(--ink); }
.fs-card__pct {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .04em;
}
.fs-card__check {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  position: relative;
}
.fs-card.is-active .fs-card__check {
  border-color: var(--accent);
  background: var(--accent);
}
.fs-card.is-active .fs-card__check::after {
  content: "";
  position: absolute;
  left: 5px; top: 2px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.fs-card__sample {
  color: var(--ink-2);
  line-height: 1.45;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  text-wrap: pretty;
}

@media (max-width: 640px) {
  .fs-grid { grid-template-columns: 1fr; }
}

/* toggle switch */
.st-toggle {
  width: 38px; height: 22px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--bg-soft);
  position: relative;
  padding: 0;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
  flex: 0 0 auto;
}
.st-toggle__knob {
  position: absolute;
  top: 1px; left: 1px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  transition: transform .2s var(--ease);
}
.st-toggle.is-on { background: var(--accent); border-color: var(--accent); }
.st-toggle.is-on .st-toggle__knob { transform: translateX(16px); }

.st-action {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.st-action:last-child { border-bottom: 0; }
.st-action__main { flex: 1; min-width: 0; }
.st-action__title { font-size: 14px; color: var(--ink); font-weight: 500; }
.st-action__sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.5; }
.st-action--danger .st-action__title { color: var(--err); }

/* ============================================================
   PAGE: 帮助 / Help
   ============================================================ */
.help-steps {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.help-step {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}
.help-step__num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.help-step__title { font-size: 14.5px; color: var(--ink); line-height: 1.6; padding-top: 5px; }

.help-faq { display: flex; flex-direction: column; }
.help-faq__item {
  border-bottom: 1px solid var(--line);
  padding: 0;
}
.help-faq__item:last-child { border-bottom: 0; }
.help-faq__q {
  list-style: none;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
.help-faq__q::-webkit-details-marker { display: none; }
.help-faq__chev {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  color: var(--ink-3);
  transform: rotate(0deg);
  transition: transform .15s var(--ease);
  font-weight: 600;
}
.help-faq__item[open] .help-faq__chev { transform: rotate(90deg); color: var(--accent); }
.help-faq__a {
  padding: 0 0 14px 28px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.75;
  max-width: 760px;
}

.help-gloss__searchbar {
  position: relative;
  margin-bottom: var(--s-4);
}
.help-gloss__searchbar .h-search__icon {
  left: 12px; top: 50%; transform: translateY(-50%);
  position: absolute; color: var(--ink-4); pointer-events: none;
  display: inline-flex;
}
.help-gloss__searchbar .chk-search {
  padding-left: 36px;
}
.help-gloss { display: flex; flex-direction: column; }
.help-gloss__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--s-4);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.help-gloss__row:last-child { border-bottom: 0; }
.help-gloss__term {
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}
.help-gloss__def {
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.7;
}
.help-gloss mark {
  background: #fff1c2;
  color: var(--ink);
  padding: 0 2px;
  border-radius: 2px;
}

@media (max-width: 600px) {
  .help-gloss__row { grid-template-columns: 1fr; gap: 4px; }
}

/* ============================================================
   PAGE: 关于 / About
   ============================================================ */
.about-grid {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 4px var(--s-5);
  margin-bottom: var(--s-4);
}
.about-row {
  display: flex; align-items: baseline; gap: var(--s-4);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.about-row:last-child { border-bottom: 0; }
.about-row__label {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500;
  flex: 0 0 100px;
}
.about-row__val { font-size: 14px; color: var(--ink); }
.about-version {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg-soft);
  padding: 2px 10px;
  border-radius: var(--r-1);
  letter-spacing: .04em;
}
.about-prose {
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.85;
  margin: 0;
  text-wrap: pretty;
  max-width: 760px;
}
.about-icp {
  text-align: center;
  font-size: 12px;
  color: var(--ink-4);
  margin-top: var(--s-5);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
}

/* ============================================================
   Editor 从公司资料填入 panel
   ============================================================ */
.bi-insert-wrap { position: relative; display: inline-block; }
.bi-insert-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  box-shadow: 0 14px 40px rgba(0,0,0,.14);
  width: 280px;
  max-height: 380px;
  overflow: auto;
  padding: 8px;
}
.bi-insert-panel__head {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  padding: 6px 8px;
}
.bi-insert-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
  padding: 8px;
  border-radius: var(--r-2);
  cursor: pointer;
  align-items: baseline;
}
.bi-insert-item:hover { background: var(--accent-soft); }
.bi-insert-item__key {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}
.bi-insert-item__val {
  font-size: 13px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bi-insert-item__val--empty { color: var(--ink-4); font-style: italic; }
.bi-insert-empty {
  padding: 16px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}
.bi-insert-empty a { color: var(--accent); }

/* editor view modes from settings */
.split.split--source .split__pane:nth-child(2) { display: none; }
.split.split--source .split__pane:nth-child(1) { flex: 1 1 100%; }
.split.split--preview .split__pane:nth-child(1) { display: none; }
.split.split--preview .split__pane:nth-child(2) { flex: 1 1 100%; }


/* ============================================================
   重新生成 — danger gate modal
   ============================================================ */
.modal--danger {
  width: min(520px, calc(100vw - 32px));
  border-color: var(--err, #862a1a);
  border-top: 4px solid var(--err, #862a1a);
}
.regen-gate__head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.regen-gate__icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--err, #862a1a);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; line-height: 1;
  flex-shrink: 0;
}
.regen-gate .modal__title {
  margin: 0;
  font-size: 17px;
  letter-spacing: -.005em;
}
.regen-gate__lead {
  margin: 0 0 12px;
  color: var(--ink-1, var(--ink));
  font-size: 13.5px;
  line-height: 1.65;
  font-weight: 500;
}
.regen-gate__list {
  list-style: none;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--err-soft, #fdf3f0);
  border: 1px solid var(--err-soft-border, rgba(134,42,26,.18));
  border-radius: var(--r-2);
  display: flex; flex-direction: column; gap: 8px;
}
.regen-gate__list li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.6;
}
.regen-gate__list li strong {
  color: var(--err, #862a1a);
  font-weight: 600;
}
.regen-gate__bullet {
  color: var(--err, #862a1a);
  font-weight: 700;
  margin-top: 1px;
  flex-shrink: 0;
}
.regen-gate__hint {
  color: var(--ink-3);
  font-size: 12px;
}
.regen-gate__cost {
  font-weight: 600;
  color: var(--err, #862a1a);
  font-variant-numeric: tabular-nums;
}
.regen-gate__ack {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  margin-bottom: 16px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--ink-1, var(--ink));
  line-height: 1.55;
  transition: border-color .12s var(--ease), background .12s var(--ease);
}
.regen-gate__ack:hover { border-color: var(--line-strong); background: var(--bg-soft); }
.regen-gate__ack:has(.regen-gate__check:checked) {
  border-color: var(--err, #862a1a);
  background: var(--err-soft, #fdf3f0);
}
.regen-gate__check {
  margin-top: 2px;
  width: 14px; height: 14px;
  accent-color: var(--err, #862a1a);
  flex-shrink: 0;
}
.btn.is-disabled,
.btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}


/* ── source: css/v4.css ── */
/* v4 — bid editor (read + edit) + citation panel + 3-state underlines */

/* chapter-by-chapter view: ToC nav switches active chapter */
.bid-v4__toc-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .04em;
  flex: 0 0 auto;
  width: 22px;
}
.bid-v4__toc-title { flex: 1; min-width: 0; }
.bid-v4__toc-item.is-active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-left-color: var(--accent);
}
.bid-v4__toc-item.is-active .bid-v4__toc-num { color: var(--accent); }

.sec__eyebrow {
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  margin-bottom: 6px;
  text-transform: uppercase;
}

.sec__chapnav {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-4);
  padding: var(--s-3) 0;
  border-top: 1px solid var(--line);
}
.sec__chapnav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-2);
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--ink);
  transition: background .12s var(--ease), border-color .12s var(--ease);
}
.sec__chapnav-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.sec__chapnav-btn--next { justify-content: flex-end; text-align: right; }
.sec__chapnav-arrow {
  font-size: 22px;
  line-height: 1;
  color: var(--accent);
  flex: 0 0 auto;
}
.sec__chapnav-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sec__chapnav-label {
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-3);
}
.sec__chapnav-title {
  font-size: 13.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 24em;
}
.sec__chapnav-progress {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: 12px;
  color: var(--ink-3);
  padding: 0 12px;
  flex: 0 0 auto;
}
.sec__chapnav-spacer { flex: 1; }

/* multi-profile picker bar (公司资料 page) */
.pf-bar {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}
.pf-bar__tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.pf-bar__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-2);
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s var(--ease), border-color .12s var(--ease);
}
.pf-bar__tab:hover { border-color: var(--ink-3); color: var(--ink); }
.pf-bar__tab.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.pf-bar__tab-empty {
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--ink-3);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 400;
}
.pf-bar__actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.pf-bar__ic {
  display: inline-flex;
  align-items: center;
  margin-right: 4px;
  color: var(--ink-3);
}
.btn--danger {
  /* Solid destructive button — paired with the solid .btn--primary in modal
     confirms. The previous red-text-on-light-surface treatment failed
     contrast for the delete-confirm button (smoke fix 3). */
  background: var(--err);
  border-color: var(--err);
  color: #fff;
}
.btn--danger:hover:not(.is-disabled) {
  background: #6a1212;
  border-color: #6a1212;
}
.btn--danger.is-disabled,
.btn--danger:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* insert-panel: profile selector */
.bi-insert-panel__select {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.bi-insert-panel__sel-label {
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-3);
}
.bi-insert-panel__sel {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  padding: 4px 8px;
  font: inherit;
  font-size: 12.5px;
  background: var(--surface);
}

/* ============================================================
   bid-v4 layout: ToC | content | citation panel
   ============================================================ */
.bid-v4 { display: flex; flex-direction: column; gap: var(--s-4); }

.bid-v4__head {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  /* Sit below the topbar (--topbar-h) AND the sticky .js-tabs strip
     (--js-tabs-h) so the toolbar isn't visually obscured by the tabs. */
  position: sticky; top: calc(var(--topbar-h) + var(--js-tabs-h)); z-index: 5;
}
.bid-v4__head-left { display: flex; align-items: center; gap: 12px; }
.bid-v4__head-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.mode-seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  overflow: hidden;
  background: var(--bg-soft);
}
.mode-seg__btn {
  border: 0;
  background: transparent;
  padding: 7px 16px;
  font: inherit; font-size: 13px;
  cursor: pointer;
  color: var(--ink-2);
  white-space: nowrap;
}
.mode-seg__btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.cite-toggle__dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 6px;
  vertical-align: middle;
  opacity: .35;
}
.btn.is-active .cite-toggle__dot { opacity: 1; box-shadow: 0 0 0 2px var(--accent-soft); }

.bid-v4__layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 360px;
  gap: var(--s-4);
  align-items: start;
}
.bid-v4__layout.no-panel { grid-template-columns: 220px minmax(0, 1fr); }

.bid-v4__toc {
  position: sticky; top: calc(var(--topbar-h) + var(--js-tabs-h) + 24px);
  max-height: calc(100vh - 160px);
  overflow: auto;
  padding-right: 4px;
}
.bid-v4__toc-head {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  padding: 6px 8px;
}
.bid-v4__toc-list { display: flex; flex-direction: column; gap: 1px; }
.bid-v4__toc-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: var(--r-2);
  border-left: 2px solid transparent;
}
.bid-v4__toc-item:hover {
  background: var(--bg-soft);
  color: var(--ink);
}
.bid-v4__toc-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: 0 0 auto;
}

.bid-v4__stack {
  min-width: 0;
  display: flex; flex-direction: column; gap: var(--s-5);
}

/* ============================================================
   Section (per chapter)
   ============================================================ */
.sec {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-5) var(--s-5);
  scroll-margin-top: 132px;
}
.sec__title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 0 0 var(--s-3);
}
.sec__meta {
  display: flex; flex-wrap: wrap; gap: 0 var(--s-5);
  padding: 10px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  margin-bottom: var(--s-4);
}
.sec__meta-item {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12.5px;
  padding: 4px 0;
}
.sec__meta-label {
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-3);
}
.sec__meta-val {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* read-mode body styling */
.sec__body--read,
.wys-editor {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink);
  text-wrap: pretty;
}
.sec__body--read p,
.wys-editor p { margin: 0 0 14px; }
.sec__body--read h1, .wys-editor h1,
.sec__body--read h2, .wys-editor h2,
.sec__body--read h3, .wys-editor h3,
.sec__body--read h4, .wys-editor h4 {
  margin: 18px 0 10px;
  letter-spacing: -.005em;
}
.sec__body--read h2, .wys-editor h2 { font-size: 17px; font-weight: 600; }
.sec__body--read h3, .wys-editor h3 { font-size: 15px; font-weight: 600; }
.sec__body--read ul, .wys-editor ul,
.sec__body--read ol, .wys-editor ol {
  margin: 0 0 14px; padding-left: 24px;
}
.sec__body--read li, .wys-editor li { margin: 4px 0; }
.sec__body--read blockquote, .wys-editor blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 14px;
  color: var(--ink-2);
  background: var(--accent-soft);
  margin: 0 0 14px;
  border-radius: 0 var(--r-2) var(--r-2) 0;
}
.sec__body--read table, .wys-editor table {
  border-collapse: collapse;
  width: 100%; margin: 0 0 14px;
  font-size: 13.5px;
}
.sec__body--read th, .wys-editor th,
.sec__body--read td, .wys-editor td {
  border: 1px solid var(--line-strong);
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}
.sec__body--read th, .wys-editor th {
  background: var(--bg-soft);
  font-weight: 600;
}

/* paragraph hover affordance */
[data-paragraph-id] {
  position: relative;
  border-radius: 4px;
  transition: background .12s var(--ease);
}
[data-paragraph-id]:hover {
  background: linear-gradient(to right, transparent, rgba(0,0,0,.015) 8%, rgba(0,0,0,.015) 92%, transparent);
}
[data-paragraph-id].is-pinned {
  background: var(--accent-soft) !important;
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

/* 3-state cite underlines */
.cite-state-1 {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.cite-state-2 {
  text-decoration: underline;
  text-decoration-color: #c4791b;
  text-decoration-thickness: 1.5px;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}
.cite-state-2::before {
  content: "已修改";
  display: inline-block;
  font-size: 10px;
  letter-spacing: .04em;
  color: #c4791b;
  background: #fcf2dd;
  border: 1px solid #e6c887;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: 2px;
  text-decoration: none;
  font-weight: 500;
}

/* ============================================================
   WYSIWYG editor
   ============================================================ */
.wys {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface);
  overflow: visible;
}
.wys-tb {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 8px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  position: sticky; top: 132px; z-index: 4;
}
.wys-tb__group { display: inline-flex; gap: 2px; }
.wys-tb__sep {
  width: 1px; height: 20px;
  background: var(--line);
  margin: 0 4px;
}
.wys-tb__btn {
  border: 0;
  background: transparent;
  width: 30px; height: 28px;
  border-radius: var(--r-1);
  font: inherit;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.wys-tb__btn:hover { background: var(--surface-2); color: var(--ink); }
.wys-tb__btn--bold { font-weight: 700; font-family: serif; }
.wys-tb__btn--italic { font-style: italic; font-family: serif; }
.wys-tb__select {
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  padding: 4px 8px;
  font: inherit; font-size: 12.5px;
  background: var(--surface);
  height: 28px;
  cursor: pointer;
}
.wys-tb__right { margin-left: auto; }

.wys-editor {
  padding: var(--s-4) var(--s-5);
  min-height: 240px;
  outline: none;
  caret-color: var(--accent);
}
.wys-editor:focus { outline: none; }

.sec__edit-footer {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  /* Keep "保存修改" + save-state indicator reachable while scrolling a long
     chapter in edit mode. z-index below .bid-v4__head (5) and topbar (18). */
  position: sticky; bottom: 0; z-index: 4;
}
.sec__edit-spacer { flex: 1; }

/* Save-state indicator (B-6). Pill base + dirty/saving/saved come from
   v3.css; here we hide the clean (empty) state and add the two states
   v3.css lacks: 已保存 N 秒前 (gray) and 保存失败 (red). */
.save-state:empty { display: none; }
.save-state.is-saved-ago { background: var(--bg-soft); color: var(--ink-3); }
.save-state.is-failed    { background: var(--err-soft); color: var(--err); }

/* ============================================================
   Citation panel
   ============================================================ */
.cite-panel {
  position: sticky; top: calc(var(--topbar-h) + var(--js-tabs-h) + 24px);
  max-height: calc(100vh - 160px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 0;
  display: flex; flex-direction: column;
}
.cite-panel.is-hidden { display: none; }

.cite-panel__head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--r-3) var(--r-3) 0 0;
}
.cite-panel__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.005em;
}
.cite-panel__collapse {
  margin-left: auto;
  border: 0; background: transparent;
  font-size: 18px; line-height: 1;
  color: var(--ink-3); cursor: pointer;
  width: 22px; height: 22px;
  border-radius: 50%;
}
.cite-panel__collapse:hover { background: var(--bg-soft); color: var(--ink); }

.cite-panel__body {
  padding: 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.cite-panel__hint {
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
  padding: 24px 8px;
  line-height: 1.7;
}
.cite-panel__nocite {
  font-size: 13px;
  color: var(--ink-3);
  padding: 16px 12px;
  background: var(--bg-soft);
  border-radius: var(--r-2);
  text-align: center;
}

.cite-panel__pinned-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--r-2);
}
.cite-panel__pin-tag {
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--accent-ink);
  font-weight: 600;
}
.cite-panel__unpin {
  margin-left: auto;
  border: 0; background: transparent;
  font: inherit; font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cite-panel__edited {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px;
  background: #fcf2dd;
  border: 1px solid #e6c887;
  border-radius: var(--r-2);
  font-size: 12.5px;
  line-height: 1.6;
}
.cite-panel__edited-tag {
  flex: 0 0 auto;
  font-size: 10px;
  letter-spacing: .04em;
  background: #c4791b;
  color: #fff;
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 600;
}
.cite-panel__edited-text { color: #804f0c; }

.req-card {
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: 12px 14px;
  background: var(--surface);
}
.req-card__id {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.req-card__row {
  display: flex; gap: 6px; align-items: baseline;
  margin-bottom: 8px;
  font-size: 12px;
  flex-wrap: wrap;
}
.req-card__row-label {
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: .04em;
}
.req-card__row-val {
  color: var(--ink-2);
}
.req-card__quote {
  margin: 0;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  border-radius: 0 var(--r-1) var(--r-1) 0;
  text-wrap: pretty;
}
.req-card__missing {
  font-size: 12px;
  color: var(--ink-4);
  font-style: italic;
}

/* responsive: collapse panel + ToC under 1100px */
@media (max-width: 1100px) {
  .bid-v4__layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .bid-v4__layout.no-panel { grid-template-columns: minmax(0, 1fr); }
  .bid-v4__toc, .cite-panel {
    position: static; max-height: none;
  }
  .bid-v4__toc { order: -1; }
  .cite-panel { order: 99; }
}


/* ── source: css/v5.css ── */
/* ============================================================
   v5 — auth (login + account) + auth-aware nav
   ============================================================ */

/* hide topbar on /login (full-screen card).
   NOTE: the footer is deliberately NOT hidden — a public site must
   show ICP备案号/公网安备 on every page, including login (公共合规
   页脚 .sitefoot, rendered by site-footer.js). */
body.is-auth-page .topbar { display: none; }
body.is-auth-page .view { padding: 0; max-width: none; }

/* ---------- Login page -------------------------------------- */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f3ede9, #e7ddd6);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 16px;
}
.auth-card {
  width: 100%; max-width: 480px;
  background: var(--surface);
  border: 0;
  border-radius: 18px;
  padding: 40px 44px 44px;
  box-shadow: 0 24px 60px rgba(74, 44, 32, .22);
  animation: authCardIn .35s var(--ease) both;
}
@keyframes authCardIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.auth-card__brand {
  display: block; text-align: center;
  font-size: 30px; font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}
.auth-card__sub {
  text-align: center; color: var(--ink-3);
  font-size: 14px; margin: 10px 0 26px;
}

.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.auth-tab {
  background: transparent; border: 0; cursor: pointer;
  padding: 8px 2px 12px;
  font-size: 16px; font-weight: 500;
  color: var(--ink-3);
  position: relative;
  transition: color .15s var(--ease);
}
.auth-tab:hover { color: var(--ink-2); }
.auth-tab.is-active { color: var(--ink); font-weight: 600; }
.auth-tab.is-active::after {
  content: ''; position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.auth-body { min-height: 280px; }

/* agreement */
.auth-agree {
  display: flex; align-items: flex-start; justify-content: center; gap: 10px;
  margin: 18px 0 2px;
  padding: 0;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: var(--r-2);
  line-height: 1.5;
  text-align: left;
  transition: transform .2s var(--ease);
}
.auth-agree__cb { margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.auth-agree__link { color: var(--accent); text-decoration: none; }
.auth-agree__link:hover { text-decoration: underline; }
.auth-agree.is-shake { animation: shake .35s var(--ease); }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.auth-foot {
  margin-top: 16px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 12px; color: var(--ink-4);
}
.auth-foot__link { color: var(--ink-3); }
.auth-foot__link:hover { color: var(--accent); }
.auth-foot .dot { color: var(--line-strong); }

/* ---------- WeChat QR pane --------------------------------- */
.wx-pane {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 0 4px;
}
.wx-qr {
  width: 200px; height: 200px;
  background: #fff;
  border: 1px solid #e4dad2;
  border-radius: 14px;
  padding: 14px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  color: var(--ink);
}
/* centered green WeChat-logo badge over the QR */
.wx-qr__badge {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.wx-qr__badge > svg {
  width: 22px; height: 22px;
  padding: 9px;
  box-sizing: content-box;
  background: #21b13a;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.wx-qr.is-loading,
.wx-qr.is-expired { color: var(--ink-4); }
.wx-qr__img {
  width: 100%; height: 100%;
  display: block;
  transition: filter .2s var(--ease);
}
/* real mode: the 微信 qrconnect embed shows a QR (~300px tall, needs full
   height so it isn't cropped) OR — on machines with desktop 微信 installed —
   a shorter 快捷登录 panel (~180px, top-aligned). We can't detect which
   (cross-origin) nor measure content height, so the frame is sized for the
   taller QR case. To keep the shorter 快捷登录 case from looking like a
   broken empty box, the iframe mode drops ALL box chrome (border / radius /
   padding / bg) so 微信's white content floats on the modal's white surface
   and the surplus height reads as plain whitespace, not a framed void.
   dev-mock (img) keeps the 200×200 bordered box. */
.wx-qr--iframe {
  width: 300px; height: 330px;
  padding: 0;
  /* a little breathing room up top — both QR and 快捷登录 content are
     top-aligned and otherwise sit flush against the tab bar. */
  padding-top: 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
/* real (iframe) mode: 微信's own page carries the instructions, and ALL our
   status + refresh/retry moves onto the on-QR overlay (see .wx-qr__overlay--
   active below). So hide the whole bottom caption/status/actions row — it was
   stranding 「二维码已过期」+「刷新二维码」at the modal bottom under a big gap.
   dev-mock (img) has no .wx-pane--iframe → its bottom pill + button stay. */
.wx-pane--iframe .wx-cap,
.wx-pane--iframe .wx-status,
.wx-pane--iframe .wx-actions { display: none; }
.wx-qr__frame {
  width: 100%; height: 100%;
  min-height: 0;
  border: 0;
  display: block;
}
/* agreement gate cover — shown until the user checks 用户协议 (200×200 base box) */
.wx-qr.is-gated {
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
.wx-qr.is-gated .wx-qr__badge {
  position: static;
  inset: auto;
}
.wx-qr__gate { display: flex; flex-direction: column; gap: 4px; }
.wx-qr__gate-title { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.wx-qr__gate-sub { font-size: 12px; color: var(--ink-4); }
.wx-qr.is-expired .wx-qr__img { filter: grayscale(1) blur(2px) opacity(.45); }
.wx-qr__overlay {
  position: absolute; inset: 10px;
  pointer-events: none;
}
.wx-qr.is-expired .wx-qr__overlay::after {
  content: '已过期';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--ink-2);
  background: rgba(255,255,255,.8);
  border-radius: var(--r-2);
}
/* iframe mode: on-QR status overlay — centered scrim + text + optional
   refresh/retry button, sitting on top of the (dimmed) QR / 快捷登录 so nothing
   strands at the modal bottom. Populated by page-login.js::renderFrameStatus.
   pointer-events:auto so the button is clickable. */
.wx-qr__overlay--active {
  inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, .94);
  border-radius: var(--r-2);
  pointer-events: auto;
  text-align: center;
}
.wx-qr__ov-text { font-size: 13px; color: var(--ink-2); }
.wx-qr__overlay--expired .wx-qr__ov-text,
.wx-qr__overlay--error   .wx-qr__ov-text { color: var(--warn); }
.wx-qr__overlay--confirmed .wx-qr__ov-text { color: var(--ok); }
/* when the active overlay is up, suppress the legacy 「已过期」pseudo scrim. */
.wx-qr__overlay--active::after { content: none !important; }
.wx-qr__skel {
  width: 70%; height: 70%;
  background:
    repeating-linear-gradient(45deg, var(--bg-soft) 0 6px, var(--surface-2) 6px 12px);
  border-radius: var(--r-2);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .55; } }

.wx-cap {
  margin: 16px 0 8px;
  font-size: 15px; font-weight: 500; color: var(--ink);
}
.wx-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-2);
}
.wx-status__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-4);
}
.wx-status--pending   { background: var(--bg-soft); }
.wx-status--pending   .wx-status__dot { background: var(--ink-3); animation: dotPulse 1.2s ease-in-out infinite; }
.wx-status--scanned   { background: var(--accent-soft); color: var(--accent-ink); }
.wx-status--scanned   .wx-status__dot { background: var(--accent); }
.wx-status--confirmed { background: var(--ok-soft); color: var(--ok); }
.wx-status--confirmed .wx-status__dot { background: var(--ok); }
.wx-status--expired   { background: var(--warn-soft); color: var(--warn); }
.wx-status--expired   .wx-status__dot { background: var(--warn); }
.wx-status--error     { background: var(--err-soft); color: var(--err); }
.wx-status--error     .wx-status__dot { background: var(--err); }
@keyframes dotPulse { 50% { opacity: .35; } }

.wx-actions { margin-top: 10px; min-height: 28px; }

/* ---------- SMS pane --------------------------------------- */
.sms-pane { padding: 24px 0 0; }
.sms-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--ink-3);
  margin: 0 0 8px;
  letter-spacing: .02em;
}
/* group spacing: first step tight to the tabs, later steps pushed down */
.sms-label--step { margin-top: 18px; }
.sms-pane > .sms-label--step:first-of-type { margin-top: 4px; }

/* numbered / ✓ step badge */
.sms-badge {
  flex: 0 0 auto;
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
  transition: background .15s var(--ease);
}
.sms-badge.is-done { background: var(--ok); }

.sms-row {
  display: flex; align-items: stretch; gap: 10px;
  margin-bottom: 0;
}
.sms-prefix {
  flex: 0 0 auto; width: 74px;
  display: flex; align-items: center; justify-content: center;
  background: #f4efe9;
  border: 1px solid #e4dad2;
  border-radius: var(--r-3);
  font-size: 15px; font-weight: 500; color: #5f544c;
  font-variant-numeric: tabular-nums;
}
.sms-input {
  flex: 1; min-width: 0;
  height: 50px;
  padding: 0 16px;
  border: 1px solid #e4dad2;
  border-radius: var(--r-3);
  background: var(--surface);
  color: var(--ink);
  font: inherit; font-size: 15px;
  letter-spacing: .04em;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.sms-input:focus {
  outline: none;
  border-color: #c08b82;
  box-shadow: 0 0 0 3px rgba(192, 139, 130, .18);
}
.sms-input:disabled {
  background: var(--bg-soft);
  color: var(--ink-3);
  cursor: not-allowed;
  opacity: .65;
}
.sms-input--code {
  letter-spacing: .3em;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}
/* captcha question chip — filled tile inline with input + 换一题.
   Sizes to its content (the backend question is 请计算：X + Y = ？,
   longer than a bare arithmetic string) and never wraps. */
.sms-captcha__q {
  /* sized for a short "3 + 5 =" prompt; may shrink (with ellipsis) rather
     than shove the answer input off the row if content ever runs long. */
  flex: 0 1 auto; min-width: 96px; max-width: 60%;
  display: flex; align-items: center; justify-content: center;
  padding: 0 14px;
  background: #f4efe9;
  border: 1px solid #e4dad2;
  border-radius: var(--r-3);
  font-size: 15px; font-weight: 600; color: #5f544c;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  user-select: none;
}
/* the answer input must stay usable even next to a wide prompt */
.sms-row--captcha .sms-input { min-width: 84px; }
.sms-row--captcha .btn {
  flex: 0 0 auto;
  border-radius: var(--r-3);
  border-color: #e4dad2;
  color: #7a6a5f;
  white-space: nowrap;
}

/* 获取验证码 — lives in the code row (step 3) */
.sms-send {
  flex: 0 0 auto;
  width: 118px; height: 50px;
  border: 0; border-radius: var(--r-3);
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.sms-send:hover:not(:disabled) { background: var(--accent-2); }
.sms-send:disabled { background: #eae1da; color: #b3a69d; cursor: not-allowed; }
.sms-send.is-cooling { background: #eae1da; color: #b3a69d; }
.sms-err {
  font-size: 12px; color: var(--err);
  min-height: 18px;
  margin: 2px 0 0;
}
/* dev-only chip hint (localhost) */
.sms-hint {
  font-size: 12px; color: var(--ink-4);
  margin: 6px 0 0;
  padding: 6px 10px;
  background: var(--bg-soft);
  border-radius: var(--r-2);
  display: inline-block;
}
/* state-driven step hint — plain warm text, no chip */
.sms-hint--step {
  display: block;
  min-height: 16px;
  margin: 6px 0 0;
  padding: 0;
  background: none;
  color: #b08a6a;
}
.auth-submit {
  width: 100%;
  height: 52px;
  margin-top: 22px;
  border-radius: 12px;
  font-size: 16px; font-weight: 600;
  letter-spacing: 2px;
  box-shadow: 0 8px 20px rgba(155, 61, 46, .28);
}
.auth-submit.is-disabled,
.auth-submit:disabled {
  background: #d6b5ae;
  border-color: #d6b5ae;
  color: #fff;
  box-shadow: none;
  opacity: 1;
  cursor: not-allowed;
}

/* ---------- Wechat scan & SMS modals (account binding) ----- */
.modal--wx, .modal--sms { width: min(420px, calc(100vw - 32px)); padding: 0; }
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal__head .modal__title { margin: 0; }
.modal__close {
  background: transparent; border: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1;
  color: var(--ink-3); cursor: pointer;
}
.modal__close:hover { background: var(--bg-soft); color: var(--ink); }
.modal--wx .wx-pane,
.modal--sms .sms-pane { padding: 24px 28px 28px; }

/* ---------- Auth-aware top nav ----------------------------- */
.topnav__login {
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  font-size: 13px;
  background: var(--surface);
  color: var(--ink-2);
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.topnav__login:hover { border-color: var(--accent); color: var(--accent); }
.topnav__login:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* user dropdown */
.user-dd { position: relative; }
.user-dd__trigger {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: 0;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s var(--ease);
}
.user-dd__trigger:hover { background: var(--bg-soft); }
.user-dd__av {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px;
  flex-shrink: 0;
  object-fit: cover;
}
.user-dd__av--ph { letter-spacing: 0; }
.user-dd__name {
  font-size: 13px; color: var(--ink);
  max-width: 96px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-dd__chev { color: var(--ink-3); font-size: 10px; }

.user-dd__menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  box-shadow: 0 16px 40px rgba(0,0,0,.10);
  padding: 4px;
  opacity: 0; pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .14s var(--ease), transform .14s var(--ease);
  z-index: 40;
}
.user-dd.is-open .user-dd__menu {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.user-dd__item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left;
  background: transparent; border: 0;
  padding: 8px 10px;
  font-size: 13px; color: var(--ink);
  border-radius: var(--r-2);
  cursor: pointer;
}
.user-dd__item:hover { background: var(--bg-soft); }
.user-dd__item--danger { color: var(--err); }
.user-dd__item--danger:hover { background: var(--err-soft); }
.user-dd__sep { height: 1px; background: var(--line); margin: 4px 0; }

/* logged-out state: nav has no items, push login button to the right */
#topnav:empty + #topbar-right { margin-left: auto; }

/* ---------- Account page ----------------------------------- */
.account { max-width: 760px; margin: 0 auto; }
.account__skel {
  padding: 32px;
  text-align: center;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}
.account__sec { margin-bottom: 16px; }

/* KV list */
.kv-list { display: flex; flex-direction: column; }
.kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.kv:last-child { border-bottom: 0; }
.kv__label {
  font-size: 12.5px;
  color: var(--ink-3);
  padding-top: 5px;
  letter-spacing: .02em;
}
.kv__val {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--ink);
  min-height: 28px;
}
.kv__val--ro { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.kv__display { font-size: 13.5px; }
.kv__display--empty { color: var(--ink-4); font-style: italic; }
.kv__edit {
  background: transparent; border: 0;
  padding: 2px 6px;
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  border-radius: var(--r-1);
  transition: background .12s var(--ease);
}
.kv__edit:hover { background: var(--accent-soft); }
.kv__hint { font-size: 12px; color: var(--ink-4); }
.kv__sub { width: 100%; font-size: 12px; color: var(--ink-4); margin-top: 2px; }
.kv-link { color: var(--accent); }
.kv-link:hover { text-decoration: underline; }
.kv__input {
  flex: 1; min-width: 200px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  font: inherit; font-size: 13.5px;
}
.kv__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.kv__actions { display: flex; gap: 6px; }

.kv-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.kv-avatar__img { width: 100%; height: 100%; object-fit: cover; }
.kv-avatar__ph {
  font-size: 22px; font-weight: 500;
  color: var(--accent-ink);
  background: var(--accent-soft);
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}

/* Login methods */
.lm-list { display: flex; flex-direction: column; gap: 10px; }
.lm-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface-2);
}
.lm-left { display: flex; align-items: center; gap: 12px; }
.lm-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lm-icon--wechat { background: #e8f7ec; color: #07c160; }
.lm-icon--phone  { background: var(--accent-soft); color: var(--accent-ink); }
.lm-meta { display: flex; flex-direction: column; gap: 2px; }
.lm-title { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.lm-detail { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lm-detail--empty { color: var(--ink-4); }
.lm-right { display: flex; align-items: center; gap: 10px; }
.lm-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
}
.lm-pill--linked {
  background: var(--ok-soft);
  color: var(--ok);
}
.lm-pill--linked .lm-pill__dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--ok);
}
.lm-pill--empty { background: var(--bg-soft); color: var(--ink-3); }
.lm-note {
  font-size: 12px; color: var(--ink-3);
  background: var(--warn-soft);
  border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent);
  padding: 8px 12px;
  border-radius: var(--r-2);
  margin-bottom: 12px;
}

/* Danger zone */
.account__danger { border-color: color-mix(in srgb, var(--err) 12%, var(--line)); }
.danger-block { display: flex; flex-direction: column; }
.danger-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.danger-row:last-child { border-bottom: 0; }
.danger-row__title { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.danger-row__title--err { color: var(--err); }
.danger-row__sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* Delete account modal */
.danger-modal { width: min(480px, calc(100vw - 32px)); }
.danger-modal__instr {
  font-size: 13px; color: var(--ink-2);
  margin: 4px 0 10px;
}
.danger-modal__target {
  font-family: var(--mono);
  background: var(--err-soft);
  color: var(--err);
  padding: 1px 6px;
  border-radius: var(--r-1);
  font-weight: 600;
}
.danger-modal__input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  font: inherit;
  font-family: var(--mono);
  font-size: 14px;
}
.danger-modal__input:focus {
  outline: none;
  border-color: var(--err);
  box-shadow: 0 0 0 3px var(--err-soft);
}

/* ---------- Legal placeholder pages ------------------------ */
.legal { max-width: 760px; margin: 0 auto; }
.legal__body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 32px 36px;
}
.legal__h2 {
  margin: 28px 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .02em;
}
.legal__h2:first-child { margin-top: 0; }
.legal__p {
  margin: 0 0 12px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.85;
}

/* ---------- Login modal (B-1) + nickname step (B-2b) -------- */
/* Reuses .modal-overlay (v6.css) for the backdrop and .auth-card for
   the card chrome — only the modal-specific affordances live here. */
.auth-card--modal {
  position: relative;
  margin: 0;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.auth-modal__close {
  position: absolute; top: 20px; right: 20px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer;
  font-size: 22px; line-height: 1; color: #b3a69d;
  border-radius: 8px;
  z-index: 1;
}
.auth-modal__close:hover { background: #f3ede9; color: #7a6a5f; }
.auth-modal__reason {
  margin: 4px 0 16px;
  padding: 9px 12px;
  background: var(--accent-soft);
  color: var(--ink-2);
  border-radius: 8px;
  font-size: 12.5px; text-align: center;
}
.nickname-step__actions {
  display: flex; gap: 10px; margin-top: 18px;
}
.nickname-step__actions .auth-submit { flex: 1; width: auto; margin: 0; }
.nickname-step__actions .auth-skip { flex: 0 0 auto; height: 40px; }

/* ---------- Responsive ------------------------------------- */
@media (max-width: 640px) {
  .auth-card { padding: 28px 20px 20px; }
  .kv { grid-template-columns: 1fr; gap: 4px; }
  .kv__label { padding-top: 0; }
  .lm-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .lm-right { justify-content: space-between; }
  .danger-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .user-dd__name { display: none; }
}


/* ── source: css/v6.css ── */
/* ============================================================
   v6 — credits / billing UI
   ============================================================ */

/* ---- Page head shared between v6 pages ---- */
.page-head { margin-bottom: var(--s-6); max-width: 760px; }
.page-head__title {
  font-size: 24px; font-weight: 600;
  margin: 6px 0 4px; letter-spacing: -.005em;
}
.page-head__sub { color: var(--ink-3); margin: 0; font-size: 13.5px; }
.page-head .crumb { color: var(--ink-3); transition: color .12s var(--ease); }
.page-head .crumb:hover { color: var(--accent); }

.pcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  margin-bottom: 16px;
}
.pcard__head {
  display: flex; align-items: baseline; gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.pcard__num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: .08em;
}
.pcard__title { margin: 0; font-size: 14px; font-weight: 600; }
.pcard__body { padding: 20px; }

/* ============================================================
   PAGE: /credits — wallet dashboard
   ============================================================ */
.credits { max-width: 760px; margin: 0 auto; }
.credits__skel {
  padding: 32px;
  text-align: center;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}

.bal-card {
  position: relative;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 96%, transparent) 0%,
      color-mix(in srgb, var(--accent) 78%, var(--ink) 22%) 100%);
  color: #fff;
  border-radius: var(--r-3);
  padding: 28px 32px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(15, 22, 60, .14);
}
.bal-card__main { position: relative; z-index: 2; }
.bal-card__eyebrow {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .7;
  font-weight: 500;
}
.bal-card__amount {
  display: flex; align-items: baseline; gap: 10px;
  margin: 8px 0 6px;
  font-variant-numeric: tabular-nums;
}
.bal-card__num {
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1;
}
.bal-card__unit {
  font-size: 16px;
  opacity: .85;
  font-weight: 500;
}
.bal-card__sub {
  font-size: 13px;
  opacity: .82;
  margin-bottom: 22px;
}
.bal-card__sigil {
  position: absolute;
  right: -10px; top: -28px;
  font-size: 240px;
  font-weight: 600;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", serif;
  color: rgba(255,255,255,.06);
  line-height: 1;
  pointer-events: none;
  z-index: 1;
  user-select: none;
}
.bal-card__actions {
  position: relative; z-index: 2;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.bal-card__actions .btn {
  background: rgba(255,255,255,.94);
  color: var(--accent-ink);
  border-color: transparent;
}
.bal-card__actions .btn:hover { background: #fff; }
.bal-card__actions .btn--primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.bal-card__actions .btn--primary:hover { background: var(--ink-2); border-color: var(--ink-2); }

/* recent tx list */
.tx-recent { margin-bottom: 32px; }
.tx-recent__more {
  font-size: 12px;
  color: var(--accent) !important;
  letter-spacing: 0;
  text-transform: none;
}
.tx-recent__more:hover { text-decoration: underline; }

.tx-list { list-style: none; margin: 0; padding: 0; }
.tx-list--recent .tx-row { border-bottom: 1px solid var(--line); }
.tx-list--recent .tx-row:last-child { border-bottom: 0; }

.tx-row {
  display: flex; align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 4px;
  font-size: 13px;
  color: var(--ink-2);
}
.tx-row__time {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  min-width: 132px;
}
.tx-row__sep { color: var(--ink-4); }
.tx-row__type {
  font-weight: 500;
  color: var(--ink);
  letter-spacing: .02em;
  min-width: 60px;
}
.tx-row__type--topup        { color: var(--ok); }
.tx-row__type--refund       { color: var(--warn); }
.tx-row__type--signup_bonus { color: var(--accent); }
.tx-row__type--consume      { color: var(--ink-2); }

.tx-row__amt {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 110px;
}
.tx-row__amt--pos { color: var(--ok); }
.tx-row__amt--neg { color: var(--err); }

.tx-row__rel {
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 6px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.tx-row__rel--link {
  color: var(--ink-2);
  border-bottom: 1px dashed transparent;
}
.tx-row__rel--link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* footnote */
.tx-foot {}
.tx-foot__copy {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.7;
  max-width: 640px;
}
.tx-foot__hint {
  font-size: 12px;
  color: var(--ink-4);
}

/* ============================================================
   Top-nav balance badge
   ============================================================ */
.bal-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: .01em;
}
.bal-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.bal-badge__sigil {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 600;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  flex-shrink: 0;
}
.bal-badge:hover .bal-badge__sigil {
  background: #fff;
}
.bal-badge__num { font-weight: 600; }
.bal-badge__unit { color: var(--ink-3); font-size: 11.5px; }
.bal-badge:hover .bal-badge__unit { color: var(--accent); }
.bal-badge.is-pulse { animation: balPulse .6s var(--ease); }
@keyframes balPulse {
  0% { box-shadow: 0 0 0 0 var(--accent-soft); }
  60% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* User dropdown — credits item */
.user-dd__credits-bal {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.user-dd__item:hover .user-dd__credits-bal { color: var(--accent); }

/* ============================================================
   PAGE: /credits/charge — top-up flow
   ============================================================ */
.charge { max-width: 760px; margin: 0 auto; }

.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.tier {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 6px;
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s var(--ease), background .15s var(--ease), transform .15s var(--ease);
}
.tier:hover { border-color: var(--ink-3); background: var(--surface-2); }
.tier.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.tier__cny {
  display: flex; align-items: baseline; gap: 2px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.tier__sym { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.tier__num { font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.tier__credits {
  font-size: 12.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.tier.is-active .tier__credits { color: var(--accent-ink); }
.tier__check {
  position: absolute;
  top: 10px; right: 10px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px; font-weight: 700;
  display: none;
  align-items: center; justify-content: center;
}
.tier.is-active .tier__check { display: inline-flex; }

.custom-wrap {
  margin-top: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-3);
  background: var(--surface-2);
}
.custom-toggle {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 12px 16px;
  font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
}
.custom-toggle__chev {
  display: inline-block;
  font-size: 10px; color: var(--ink-3);
  transition: transform .15s var(--ease);
}
.custom-toggle.is-open .custom-toggle__chev { transform: rotate(90deg); }
.custom-body {
  padding: 0 16px 14px;
}
.custom-label {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.custom-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  font: inherit; font-size: 14px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.custom-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.custom-live {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-2);
  min-height: 18px;
}
.custom-live strong { color: var(--accent); font-weight: 600; }
.custom-live__err { color: var(--err); }

.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.method {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.method:hover { border-color: var(--ink-3); background: var(--surface-2); }
.method.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.method__disc {
  width: 40px; height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.method__disc::before {
  content: '';
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,.7);
}
.method__disc::after {
  content: '';
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: currentColor;
  opacity: .85;
}
.method__disc--wechat {
  background: linear-gradient(135deg, #2bb673 0%, #1f9e60 100%);
  color: #2bb673;
}
.method__disc--alipay {
  background: linear-gradient(135deg, #2c80ff 0%, #1565d8 100%);
  color: #2c80ff;
}
.method__meta { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.method__label { font-size: 14px; font-weight: 500; color: var(--ink); }
.method__sub { font-size: 12px; color: var(--ink-3); }
.method__check {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: transparent;
  flex-shrink: 0;
}
.method.is-active .method__check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

/* Submit bar (sticky-feeling card at bottom of /credits/charge) */
.submit-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  margin-top: 20px;
}
.submit-bar__summary {
  display: flex; flex-direction: column; gap: 2px;
}
.submit-bar__line {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 13px;
}
.submit-bar__lab {
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: .04em;
  min-width: 56px;
}
.submit-bar__cny {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.submit-bar__credits {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.submit-bar__line--sub .submit-bar__cny { font-size: 13px; }
.submit-bar__btn { min-width: 160px; }

/* ---- Pay modal --------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 18, 25, .42);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadein .15s var(--ease);
}
.modal {
  background: var(--surface);
  border-radius: var(--r-3);
  box-shadow: 0 24px 64px rgba(15, 22, 60, .22);
  max-width: 100%;
  animation: rise .2s var(--ease);
}
.modal--pay {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
}
.pay-modal__body {
  padding: 22px 28px 24px;
  display: flex; flex-direction: column;
  align-items: stretch;
  gap: 14px;
}
.pay-modal__summary {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
}
.pay-modal__amt {
  display: flex; align-items: baseline;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.pay-modal__amt-sym { font-size: 18px; color: var(--ink-3); }
.pay-modal__amt-num { font-size: 36px; font-weight: 600; letter-spacing: -.01em; }
.pay-modal__credits {
  font-size: 12.5px;
  color: var(--ink-3);
}
.pay-modal__qr {
  width: 200px; height: 200px;
  align-self: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 12px 12px 28px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
}
.pay-modal__qr-img {
  width: 100%; height: 100%;
  display: block;
}
.pay-modal__qr.is-loading::after {
  content: '';
  position: absolute; inset: 16px;
  border: 2px solid var(--bg-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .9s linear infinite;
  width: 26px; height: 26px;
  margin: auto;
}
.pay-modal__qr-skel {
  width: 70%; height: 70%;
  background:
    repeating-linear-gradient(45deg, var(--bg-soft) 0 6px, var(--surface-2) 6px 12px);
  border-radius: var(--r-2);
  font-size: 11px;
  color: var(--ink-4);
  display: flex; align-items: center; justify-content: center;
}
.pay-modal__qr-ribbon {
  position: absolute;
  bottom: 6px; left: 12px; right: 12px;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--ink-3);
}
.pay-modal__qr--wechat {
  border-color: color-mix(in srgb, #2bb673 30%, var(--line));
}
.pay-modal__qr--wechat .pay-modal__qr-ribbon { color: #1f9e60; }
.pay-modal__qr--alipay {
  border-color: color-mix(in srgb, #2c80ff 30%, var(--line));
}
.pay-modal__qr--alipay .pay-modal__qr-ribbon { color: #1565d8; }

.pay-modal__qr.is-pulse::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: var(--r-3);
  border: 2px solid var(--accent);
  opacity: 0;
  animation: qrPulse 1.6s ease-in-out infinite;
}
@keyframes qrPulse {
  0%   { opacity: .55; transform: scale(.99); }
  60%  { opacity: 0;   transform: scale(1.04); }
  100% { opacity: 0;   transform: scale(1.04); }
}

.pay-modal__order {
  text-align: center;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-4);
  letter-spacing: .04em;
}
.pay-modal__status {
  align-self: center;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
}
.pay-modal__status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.pay-modal__status--pending {
  background: var(--bg-soft); color: var(--ink-3);
}
.pay-modal__status--pending .pay-modal__status-dot { animation: dotPulse 1.2s ease-in-out infinite; }
.pay-modal__status--scanned {
  background: var(--accent-soft); color: var(--accent-ink);
}
.pay-modal__status--paid {
  background: var(--ok-soft); color: var(--ok);
}
.pay-modal__status--failed {
  background: var(--err-soft); color: var(--err);
}
.pay-modal__note {
  text-align: center;
  font-size: 12px;
  color: var(--ink-4);
}
.pay-modal__actions {
  display: flex; justify-content: center;
  margin-top: 4px;
}

.modal--pay.pay-modal--paid .pay-modal__qr {
  border-color: var(--ok);
}
.modal--pay.pay-modal--paid .pay-modal__qr-img {
  filter: grayscale(.4) opacity(.5);
}
.modal--pay.pay-modal--paid .pay-modal__qr::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  font-weight: 700;
  color: var(--ok);
  background: rgba(255,255,255,.85);
  border-radius: var(--r-3);
  animation: rise .25s var(--ease);
}

/* ============================================================
   PAGE: /credits/history — transaction log
   ============================================================ */
.history { max-width: 1080px; margin: 0 auto; }

.flt {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  margin-bottom: 16px;
}
.flt__field { display: flex; flex-direction: column; gap: 6px; }
.flt__lab {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.flt__sel,
.flt__date,
.flt__q {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  font: inherit; font-size: 13px;
  color: var(--ink);
}
.flt__sel { min-width: 120px; padding-right: 26px; cursor: pointer; }
.flt__q { min-width: 240px; }
.flt__sel:focus,
.flt__date:focus,
.flt__q:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.flt__range { display: flex; align-items: center; gap: 6px; }
.flt__rng-sep { color: var(--ink-4); }
.flt__reset { margin-left: auto; align-self: flex-end; }

/* Table */
.tx-table-host { position: relative; }
.tx-table-host.is-loading { opacity: .55; }
.tx-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
}
.tx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tx-th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 12px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.tx-th--time { width: 152px; }
.tx-th--type { width: 100px; }
.tx-th--amt  { width: 140px; }
.tx-th--bal  { width: 110px; text-align: right; }
.tx-tr { transition: background .12s var(--ease); }
.tx-tr:hover { background: var(--surface-2); }
.tx-td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--ink-2);
}
.tx-tr:last-child .tx-td { border-bottom: 0; }
.tx-td--time {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  white-space: nowrap;
}
.tx-td--bal {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 500;
}
.tx-td__amt {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.tx-td__amt--pos { color: var(--ok); }
.tx-td__amt--neg { color: var(--err); }

.tx-badge {
  display: inline-flex; align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .02em;
  border: 1px solid transparent;
}
.tx-badge--topup        { background: var(--ok-soft);     color: var(--ok); }
.tx-badge--consume      { background: var(--bg-soft);     color: var(--ink-2); border-color: var(--line); }
.tx-badge--refund       { background: var(--warn-soft);   color: var(--warn); }
.tx-badge--signup_bonus { background: var(--accent-soft); color: var(--accent-ink); }

.tx-rel {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2);
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tx-rel--link {
  border-bottom: 1px dashed transparent;
  cursor: pointer;
}
.tx-rel--link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tx-rel--text { color: var(--ink-3); }

/* payment dot — used in row "关联" cells */
.pay-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}
.pay-dot--wechat { background: #2bb673; box-shadow: 0 0 0 2px color-mix(in srgb, #2bb673 22%, transparent); }
.pay-dot--alipay { background: #2c80ff; box-shadow: 0 0 0 2px color-mix(in srgb, #2c80ff 22%, transparent); }

/* Refund affordance — inline in the topup row's 关联 cell. */
.refund-cell { display: inline-flex; align-items: center; margin-left: 8px; }
.refund-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .12s var(--ease), color .12s var(--ease);
}
.refund-btn:hover { border-color: var(--err); color: var(--err); }
.refund-chip {
  display: inline-flex; align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid transparent;
  background: var(--bg-soft); color: var(--ink-3);
}
.refund-chip--pending { background: var(--warn-soft); color: var(--warn); }
.refund-chip--done    { background: var(--ok-soft);   color: var(--ok); }
.refund-chip--abn     { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }
.refund-chip--review  { background: var(--accent-soft); color: var(--accent-ink); }

/* Refund request modal — required-reason field. */
.refund-reason__lab {
  display: block; margin: 12px 0 6px;
  font-size: 12.5px; color: var(--ink-2);
}
.refund-reason {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: var(--r-2);
  padding: 8px 10px; font-size: 13px; font-family: inherit;
  color: var(--ink); background: var(--surface); resize: vertical;
}
.refund-reason:focus { outline: none; border-color: var(--accent); }

/* Pager */
.pager { margin-top: 16px; }
.pager__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.pager__inner { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pager__btn,
.pager__num {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: 6px 12px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  transition: border-color .12s var(--ease), color .12s var(--ease);
}
.pager__num { min-width: 32px; padding: 6px 10px; }
.pager__btn:hover,
.pager__num:hover { border-color: var(--accent); color: var(--accent); }
.pager__btn:disabled {
  opacity: .4; cursor: not-allowed;
}
.pager__btn:disabled:hover { border-color: var(--line); color: var(--ink-2); }
.pager__num.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pager__num.is-active:hover { color: #fff; }
.pager__gap { color: var(--ink-4); padding: 0 4px; }
.pager__meta { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ============================================================
   Cost preview + insufficient-balance gate
   ============================================================ */
.cost-preview {
  margin-top: 16px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: var(--r-3);
  font-size: 13px;
  color: var(--accent-ink);
  animation: fadein .25s var(--ease);
}
.cost-preview__sigil {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}
.cost-preview__credits { font-weight: 600; font-variant-numeric: tabular-nums; }
.cost-preview__sub { color: var(--ink-3); font-size: 12px; margin-left: auto; }

/* Company-info fill (Phase 1) — company-profile picker in the confirm
   card (below the cost line, above 开始生成 / 取消). Mirrors the
   公司资料-confirm.html spec: a custom dropdown (pf-dd) with avatar +
   name + meta, a popup listbox, and full keyboard nav. */
/* Constrain the confirm content (cost line + 公司资料 picker) to a
   centered column; the dropzone's pink panel stays full-width behind it. */
.confirm { max-width: 600px; margin: 0 auto; }
.confirm__cta { margin-top: 18px; }

/* 已上传 file head — icon inline next to the title (not a stacked block),
   so the top gap to the title equals the bottom gap below the CTA. */
.dropzone__filehead {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--s-2);
}
.dropzone__filehead .dropzone__title { margin: 0; }
.dropzone__fileicon {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  flex-shrink: 0;
}
.dropzone__fileicon svg { width: 20px; height: 20px; }

.confirm-field {
  margin-top: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  text-align: left;
  animation: fadein .25s var(--ease);
}
.confirm-field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.confirm-field__label { font-size: 14px; font-weight: 600; color: var(--ink); }
.confirm-field__help {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.6;
}

/* ── custom dropdown ─────────────────────────────────────────────── */
.pf-dd { position: relative; }
.pf-dd__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.pf-dd__trigger:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.pf-dd.is-open .pf-dd__trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.pf-dd__current { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.pf-dd__chev {
  display: inline-flex;
  color: var(--ink-3);
  flex-shrink: 0;
  transition: transform .18s var(--ease);
}
.pf-dd.is-open .pf-dd__chev { transform: rotate(90deg); }

.pf-dd__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}
.pf-dd__avatar--ghost {
  background: transparent;
  border: 1px dashed var(--line-strong);
  color: var(--ink-3);
}
.pf-dd__avatar--ghost svg { width: 16px; height: 16px; }
.pf-dd__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-dd__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-dd__name--muted { color: var(--ink-2); font-weight: 500; }
.pf-dd__meta {
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-dd__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
  padding: 6px;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}
.pf-dd.is-open .pf-dd__menu { display: block; animation: fadein .14s var(--ease); }
.pf-dd__group {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-4);
  letter-spacing: .03em;
  padding: 6px 10px 4px;
}
.pf-dd__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-2);
  cursor: pointer;
  transition: background .12s var(--ease);
}
.pf-dd__opt:hover, .pf-dd__opt:focus {
  background: var(--bg-soft);
  outline: none;
}
.pf-dd__opt.is-active { background: var(--accent-soft); }
.pf-dd__check {
  margin-left: auto;
  color: var(--accent);
  display: inline-flex;
  flex-shrink: 0;
}
.pf-dd__check svg { width: 16px; height: 16px; }
.pf-dd__sep { height: 1px; background: var(--line); margin: 6px 8px; }
.pf-dd__create {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  border-radius: var(--r-2);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}
.pf-dd__create:hover { background: var(--accent-soft); }
.pf-dd__create svg { width: 15px; height: 15px; flex-shrink: 0; }

.modal--gate {
  width: min(420px, calc(100vw - 32px));
  padding: 24px 28px;
}
.gate__title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.gate__body {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.7;
}
.gate__body strong { color: var(--ink); font-weight: 600; }
.gate__body .gate__cost { color: var(--err); font-weight: 600; }
.gate__numbers {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 0 0 18px;
}
.gate__num {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: 10px 12px;
  text-align: center;
}
.gate__num-lab { font-size: 11px; color: var(--ink-3); margin-bottom: 4px; letter-spacing: .04em; }
.gate__num-val {
  font-size: 18px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.gate__num--cost .gate__num-val { color: var(--ink); }
.gate__num--bal .gate__num-val { color: var(--ink); }
.gate__num--need .gate__num-val { color: var(--err); }

.gate__actions {
  display: flex; gap: 10px; justify-content: flex-end;
}

/* ============================================================
   Job page — credit-deducted line + consumed strip
   ============================================================ */
.proc-credit {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 6px;
}
.proc-credit__sigil {
  display: inline-block;
  margin-right: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 10px; font-weight: 600;
  text-align: center; line-height: 14px;
  vertical-align: -2px;
}

.detail-credit {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--ink-3);
}

/* C-3: consolidated processing card — 总体进度 + 进度条 + 已运行/预计总耗时
   meta + 预扣积分 + 取消 button, all in one .card instead of scattered. */
.processing-card { margin-top: var(--s-3); padding: 20px 24px; }
.processing-card__header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.processing-card__meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 12px;
  font-size: 13px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.processing-card__meta .sep { color: var(--ink-4); }
.processing-card__meta .proc-eta { color: var(--ink-2); }
.processing-card__credits { margin-top: 12px; }
.processing-card__hint {
  margin-top: 10px;
  font-size: 12.5px; line-height: 1.5; color: var(--ink-3);
}
.processing-card__actions { display: flex; justify-content: flex-end; margin-top: 16px; }

/* ============================================================
   Processing page — stage line + tip card
   ============================================================ */
.proc-stage {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 6px;
  font-size: 14px;
  color: var(--ink-2);
}
.proc-stage__pulse {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.55);
  animation: procStagePulse 1.6s ease-out infinite;
}
.proc-stage__label { color: var(--ink); font-weight: 500; }
@keyframes procStagePulse {
  0%   { box-shadow: 0 0 0 0   rgba(0, 102, 204, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(0, 102, 204, 0);   }
  100% { box-shadow: 0 0 0 0   rgba(0, 102, 204, 0);   }
}

.progress.is-failed, .processing-card.is-failed { opacity: 0.55; }
.progress.is-failed .progress__fill,
.processing-card.is-failed .progress__fill { background: var(--err); }

.proc-tip {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  margin-top: 16px;
  transition: opacity 0.2s ease;
  opacity: 1;
}
.proc-tip.is-fading { opacity: 0; }
.proc-tip__icon {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.proc-tip__icon svg { width: 16px; height: 16px; }
.proc-tip__body { flex: 1 1 auto; min-width: 0; }
.proc-tip__title {
  font-size: 14px; font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.proc-tip__text {
  font-size: 13px; line-height: 1.55;
  color: var(--ink-2);
}
.proc-tip--err .proc-tip__icon {
  background: rgba(220, 76, 76, 0.12);
  color: var(--err);
}
@media (max-width: 480px) {
  .proc-tip { padding: 12px 14px; }
  .proc-tip__title { font-size: 13.5px; }
  .proc-tip__text  { font-size: 12.5px; }
}

/* ============================================================
   /account — balance section
   ============================================================ */
.acc-bal-row {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}
.acc-bal-row__main { display: flex; flex-direction: column; gap: 2px; }
.acc-bal-row__amt {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.acc-bal-row__amt-unit {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
  margin-left: 4px;
}
.acc-bal-row__sub {
  font-size: 12px;
  color: var(--ink-3);
}
.acc-bal-row__sub a { color: var(--accent); }
.acc-bal-row__sub a:hover { text-decoration: underline; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
  .bal-card { padding: 22px 22px; }
  .bal-card__num { font-size: 38px; }
  .bal-card__sigil { font-size: 180px; right: -20px; }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .method-grid { grid-template-columns: 1fr; }
  .submit-bar { flex-direction: column; align-items: stretch; gap: 12px; }
  .submit-bar__btn { width: 100%; }
  .flt { gap: 10px; }
  .flt__q { min-width: 0; width: 100%; }
  .flt__field { flex: 1 1 100%; }
  .flt__reset { width: 100%; }

  .tx-table { display: block; }
  .tx-table thead { display: none; }
  .tx-table tbody, .tx-table tr, .tx-table td { display: block; width: auto; }
  .tx-tr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    display: grid !important;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
  }
  .tx-tr:last-child { border-bottom: 0; }
  .tx-td {
    padding: 0;
    border-bottom: 0;
  }
  .tx-td--time { grid-column: 1; color: var(--ink-3); font-size: 12px; }
  .tx-td--bal  { grid-column: 2; text-align: right; font-size: 12px; color: var(--ink-3); font-weight: 500; }
  .tx-td:nth-child(2) { grid-column: 1; }
  .tx-td:nth-child(3) { grid-column: 2; text-align: right; }
  .tx-td:nth-child(4) {
    grid-column: 1 / -1;
    color: var(--ink-3);
    font-size: 12.5px;
    overflow: hidden; text-overflow: ellipsis;
  }

  /* Top-nav badge collapses to icon-only on narrow viewports */
  .bal-badge { padding: 4px 6px; }
  .bal-badge__num,
  .bal-badge__unit { display: none; }
}

/* ============================================================
   Tweaks panel — credits dev controls
   ============================================================ */
.tweak-credit-row {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.tweak-credit-input {
  flex: 1;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background: var(--surface);
  font: inherit; font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Parse-only page — run-type badge (解析 vs 标书).
   Distinct from the status pill (已完成 / 生成中 / 失败): the pill
   reports lifecycle, this tag reports what KIND of run it is. Fixed
   hues (not the themeable --accent) so 解析 and 标书 stay visually
   distinct under every data-accent variant.
   ============================================================ */
.type-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: .04em;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.type-tag--parse { background: #e4eefb; color: #1f52c0; }  /* cool info blue — 解析 */
.type-tag--bid   { background: #eef0f3; color: #566270; }  /* neutral slate — 标书 */


/* ── source: css/v7.css ── */
/* v7.css — 质量 tab (quality-surfacing-arc).
 * Prefix `qchk-` is collision-free; the parse view owns `qual-`. */

.qchk { padding: var(--s-2) 0; }
.qchk__h {
  font-size: 15px; font-weight: 600; color: var(--ink);
  margin: 0 0 var(--s-3); padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--line);
}
.qchk__h--mt { margin-top: var(--s-6); }

/* summary line — shared by both blocks */
.qchk-summary {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: var(--s-2); margin-bottom: var(--s-4); font-size: 13px;
}
.qchk-summary__total { font-weight: 600; color: var(--ink); }
.qchk-summary__sep { color: var(--ink-4); }
.qchk-summary__pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500;
}
.qchk-summary__mark { font-weight: 700; }
.qchk-summary__pill--miss { background: var(--err-soft); color: var(--err); }
.qchk-summary__pill--warn { background: var(--warn-soft); color: var(--warn); }
.qchk-summary__pill--ok   { background: var(--ok-soft); color: var(--ok); }

/* check list */
.qchk-list { display: flex; flex-direction: column; gap: var(--s-2); }
.qchk-check {
  border: 1px solid var(--line); border-left-width: 3px;
  border-radius: 8px; background: #fff; overflow: hidden;
}
.qchk-check--ok   { border-left-color: var(--ok); }
.qchk-check--miss { border-left-color: var(--err); }
.qchk-check--warn { border-left-color: var(--warn); }
.qchk-check__head {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
}
.qchk-mark {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
}
.qchk-mark--ok   { background: var(--ok); }
.qchk-mark--miss { background: var(--err); }
.qchk-mark--warn { background: var(--warn); }
.qchk-check__txt { flex: 1 1 auto; min-width: 0; }
.qchk-check__label { font-weight: 600; color: var(--ink); font-size: 13.5px; }
.qchk-check__id {
  margin-left: 8px; font-size: 11px; font-weight: 400;
  color: var(--ink-4); font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.qchk-check__desc { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.qchk-check__chev { font-size: 12px; color: var(--accent); flex: 0 0 auto; }

.qchk-badge {
  flex: 0 0 auto; padding: 2px 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600;
}
.qchk-badge--ok   { background: var(--ok-soft); color: var(--ok); }
.qchk-badge--miss { background: var(--err-soft); color: var(--err); }
.qchk-badge--warn { background: var(--warn-soft); color: var(--warn); }

.qchk-check__detail {
  padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.qchk-kv { display: flex; flex-direction: column; gap: var(--s-2); }
.qchk-kv__row { font-size: 12.5px; color: var(--ink-2); }
.qchk-kv__key {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; color: var(--ink-3); margin-right: 8px;
}
.qchk-kv__list { margin: 4px 0 0; padding-left: 18px; color: var(--ink-2); }
.qchk-kv__list li { font-size: 12px; line-height: 1.5; word-break: break-all; }

/* check details — human-readable intros, tables, chips */
.qchk-detail { display: flex; flex-direction: column; gap: var(--s-3); }
.qchk-detail__intro { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.qchk-detail__note {
  font-size: 12.5px; color: var(--ink-2);
  padding: 2px 8px; border-left: 2px solid var(--line);
}
.qchk-tblwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.qchk-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.qchk-tbl th {
  text-align: left; font-weight: 600; color: var(--ink-3);
  background: var(--bg-soft); padding: 6px 10px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.qchk-tbl td {
  padding: 6px 10px; color: var(--ink-2); vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.qchk-tbl tbody tr:last-child td { border-bottom: 0; }
.qchk-tbl tbody tr:nth-child(even) td { background: rgba(0, 0, 0, 0.012); }
.qchk-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; color: var(--ink); word-break: break-all;
}
.qchk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qchk-chips--inline { display: inline-flex; }
.qchk-chip {
  display: inline-block; max-width: 100%;
  padding: 1px 8px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* edit list */
.qchk-edit-list { display: flex; flex-direction: column; gap: var(--s-2); }
.qchk-edit {
  border: 1px solid var(--line); border-radius: 8px;
  background: #fff; overflow: hidden;
}
.qchk-edit--off { opacity: 0.72; }
.qchk-edit__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3); padding: var(--s-3) var(--s-4);
}
.qchk-edit__title { font-size: 13.5px; color: var(--ink); min-width: 0; }
.qchk-edit__sid {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; color: var(--ink-3); margin-right: 4px;
}
.qchk-edit__meta { display: inline-flex; align-items: center; gap: var(--s-3); flex: 0 0 auto; }
.qchk-edit__counts {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
}
.qchk-add { color: var(--ok); font-weight: 600; }
.qchk-del { color: var(--err); font-weight: 600; }
.qchk-chg { color: var(--warn); font-weight: 600; }
.qchk-diff {
  margin: 0; padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--line); background: #1b1d21; color: #d7dae0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; line-height: 1.55; white-space: pre-wrap;
  word-break: break-all; max-height: 420px; overflow: auto;
}

/* ============================================================
   公共合规页脚 (site-footer.js — ICP备案 / 公网安备 / © / 法律链接)
   ============================================================ */
.sitefoot {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 18px var(--s-5) 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-4);
  letter-spacing: .04em;
  text-align: center;
}
.sitefoot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.sitefoot a {
  color: var(--ink-3);
  text-decoration: none;
}
.sitefoot a:hover { color: var(--accent); }
.sitefoot .dot { color: var(--ink-4); }
.sitefoot__gongan {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sitefoot__badge {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

/* ─── Layer 2 — LLM-as-judge radar (page-quality.js) ──────────────── */
.qchk-judge { margin-top: var(--s-6); }
.qchk-judge__h {
  font-size: 14px; font-weight: 600; color: var(--ink);
  margin: 0 0 var(--s-3); padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; gap: var(--s-2);
}
.qchk-judge__model {
  font-size: 11px; color: var(--ink-4);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.qchk-judge__off { font-size: 13px; padding: var(--s-3) 0; }
.qchk-judge__meta {
  display: flex; flex-wrap: wrap; gap: var(--s-2);
  margin-bottom: var(--s-4); font-size: 12px;
}
.qchk-judge__chip {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 2px var(--s-2); color: var(--ink-2);
}
.qchk-judge__chipk { color: var(--ink-4); }
.qchk-judge__grid {
  display: grid; gap: var(--s-3);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.qchk-judge__card {
  border: 1px solid var(--line); border-radius: 8px;
  padding: var(--s-3); background: var(--surface, #fff);
}
.qchk-judge__card--off { opacity: 0.6; }
.qchk-judge__ctitle {
  font-size: 13px; font-weight: 600; color: var(--ink);
  margin-bottom: var(--s-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qchk-judge__svg { display: flex; justify-content: center; }
.qchk-judge__na { font-size: 12px; text-align: center; padding: var(--s-3) 0; }
.qchk-radar { width: 100%; max-width: 220px; height: auto; overflow: visible; }
.qchk-radar__ring { fill: none; stroke: var(--line); stroke-width: 0.75; }
.qchk-radar__spoke { stroke: var(--line); stroke-width: 0.75; }
.qchk-radar__data {
  fill: var(--accent); fill-opacity: 0.18;
  stroke: var(--accent); stroke-width: 1.5;
}
.qchk-radar__lbl { font-size: 10px; fill: var(--ink-3); }
.qchk-judge__dims {
  margin-top: var(--s-2); display: flex; flex-direction: column; gap: 2px;
}
.qchk-judge__dim {
  display: flex; align-items: center; gap: var(--s-2); font-size: 11.5px;
}
.qchk-judge__dn { color: var(--ink-2); flex: 0 0 36px; }
.qchk-judge__ds {
  flex: 0 0 auto; width: 18px; text-align: center; font-weight: 700;
  border-radius: 4px; color: #fff;
}
.qchk-judge__ds--5 { background: var(--ok); }
.qchk-judge__ds--4 { background: var(--ok); opacity: 0.7; }
.qchk-judge__ds--3 { background: var(--warn); }
.qchk-judge__ds--2 { background: var(--err); opacity: 0.8; }
.qchk-judge__ds--1 { background: var(--err); }
.qchk-judge__ds--na { background: var(--ink-4); }
.qchk-judge__dr {
  color: var(--ink-4); flex: 1 1 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}


/* ── source: css/v8.css ── */
/* ============================================================
   PAGE: LANDING (#/) — marketing site (page-home.js)
   Isolated from app.css's .home__ uploader styles, which the
   generate page (#/generate) still owns. Tokens come from app.css.
   ============================================================ */

.landing {
  max-width: var(--max);
  margin: 0 auto;
}

/* ---- B. Hero ------------------------------------------------- */
.lp-hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: var(--s-7);
  align-items: center;
  padding: var(--s-7) 0 var(--s-8);
}
.lp-hero__brand {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--accent);
  margin-bottom: var(--s-3);
}
/* Reserve ~2 lines so the headline below doesn't jump as text types in. */
.lp-hero__tagline { min-height: 2.4em; }
.lp-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  background: currentColor;
  vertical-align: -2px;
  animation: lp-blink 1s steps(1, end) infinite;
}
@keyframes lp-blink { 50% { opacity: 0; } }
.lp-hero__title {
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -.01em;
  font-weight: 700;
  margin: 0 0 var(--s-4);
  text-wrap: pretty;
}
.lp-hero__sub {
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 var(--s-6);
}
.lp-hero__cta { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.lp-hero__cta .btn svg,
.lp-footcta .btn svg { margin-right: 6px; vertical-align: -3px; }
.lp-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.lp-chip {
  font-size: 12px;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}
/* Hero 3-stat row (废标率/中标率/交付周期) */
.lp-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-6);
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
}
.lp-hero-stat__num {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--accent);
}
.lp-hero-stat__label { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* Hero preview panel (capability-not-process) */
.lp-preview-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  box-shadow: 0 12px 40px -24px rgba(20, 30, 60, .35);
  overflow: hidden;
}
.lp-preview-panel__head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.lp-preview-panel__dot {
  width: 9px; height: 9px; border-radius: 999px;
  background: var(--line-strong);
}
.lp-preview-panel__label {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-3);
}
.lp-preview-panel__body { padding: var(--s-4); display: grid; gap: var(--s-3); }
.lp-status-card {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}
.lp-status-card__check {
  flex: none;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
}
.lp-status-card__check svg { width: 16px; height: 16px; }
.lp-status-card__title { font-size: 14px; font-weight: 600; }
.lp-status-card__sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }

/* ---- Shared section shell ----------------------------------- */
.lp-section {
  padding: var(--s-8) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--topbar-h) + 56px);
}
.lp-section__head { text-align: center; max-width: 640px; margin: 0 auto var(--s-6); }
.lp-section__title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: var(--s-2) 0 0;
}
.lp-section__sub { color: var(--ink-3); font-size: 15px; margin: var(--s-3) 0 0; }

/* ---- C. 核心能力 grid --------------------------------------- */
.lp-cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
}
.lp-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-5);
  transition: border-color .15s var(--ease), transform .15s var(--ease),
              box-shadow .15s var(--ease);
}
.lp-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 14px 36px -26px rgba(20, 30, 60, .4);
}
.lp-card__icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-2);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: var(--s-4);
}
.lp-card__title { font-size: 15px; font-weight: 600; margin: 0 0 var(--s-2); }
.lp-card__body { font-size: 13px; line-height: 1.65; color: var(--ink-3); margin: 0; }
/* per-card ✓ checklist */
.lp-card__list {
  list-style: none;
  margin: var(--s-3) 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.lp-card__list li {
  position: relative;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-3);
  padding-left: 20px;
}
.lp-card__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---- D. 优势对比 -------------------------------------------- */
.lp-vs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  align-items: stretch;
}
.lp-vs-col {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-6) var(--s-5);
}
.lp-vs-col--hot {
  border: 2px solid var(--accent);
  background: linear-gradient(180deg, var(--accent-soft), var(--surface) 60%);
  box-shadow: 0 18px 44px -28px rgba(30, 58, 138, .55);
  transform: translateY(-8px);
  z-index: 1;
}
.lp-vs-col__badge {
  position: absolute;
  top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  padding: 3px 12px;
  border-radius: 999px;
}
.lp-vs-col__title { font-size: 16px; font-weight: 700; margin: 0 0 var(--s-3); }
.lp-vs-col--hot .lp-vs-col__title { color: var(--accent-ink); }
.lp-vs-col__body { font-size: 13px; line-height: 1.7; color: var(--ink-3); margin: 0; }

/* ---- E. 硬核技术 -------------------------------------------- */
.lp-tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}
.lp-tile {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-5);
}
.lp-tile__icon {
  flex: none;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-2);
  background: var(--accent-soft);
  color: var(--accent);
}
.lp-tile__title { font-size: 14px; font-weight: 600; margin: 2px 0 4px; }
.lp-tile__body { font-size: 12.5px; line-height: 1.6; color: var(--ink-3); margin: 0; }
/* tag pill on tech cards (shape derived from .lp-vs-col__badge) */
.lp-tile__tag {
  display: inline-block;
  margin-top: var(--s-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 12px;
  border-radius: 999px;
}

/* ---- E2. 数据安全 -------------------------------------------- */
.lp-sec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}
.lp-sec-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-5);
}
.lp-sec-card__icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-2);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: var(--s-4);
}
.lp-sec-card__title { font-size: 15px; font-weight: 600; margin: 0 0 var(--s-2); }
.lp-sec-card__body {
  font-size: 13px; line-height: 1.7;
  color: var(--ink-3);
  margin: 0 0 var(--s-4);
}
.lp-sec-card__label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ok);
  background: var(--ok-soft);
  padding: 3px 12px;
  border-radius: 999px;
}

/* ---- F. 成果预览 — faux document window --------------------- */
.lp-doc {
  max-width: 880px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  box-shadow: 0 26px 70px -36px rgba(20, 30, 60, .5);
}
/* window chrome */
.lp-doc__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.lp-doc__dot { width: 10px; height: 10px; border-radius: 999px; background: var(--line-strong); }
.lp-doc__dot:nth-child(1) { background: #e0897e; }
.lp-doc__dot:nth-child(2) { background: #e6c07a; }
.lp-doc__dot:nth-child(3) { background: #8fbf8f; }
.lp-doc__file {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: var(--s-3);
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.lp-doc__file svg { width: 15px; height: 15px; color: var(--accent); }
.lp-doc__live {
  margin-left: auto;
  font-size: 11px; color: var(--ok);
  background: var(--ok-soft);
  padding: 2px 10px; border-radius: 999px;
}
/* two-pane body */
.lp-doc__body { display: grid; grid-template-columns: 220px 1fr; }
.lp-doc__toc {
  border-right: 1px solid var(--line);
  background: var(--surface-2);
  padding: var(--s-4);
}
.lp-doc__toc-title {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-4); margin-bottom: var(--s-3);
}
.lp-doc__toc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lp-doc__toc-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ink-3);
  padding: 6px 8px; border-radius: var(--r-1);
  line-height: 1.3;
}
.lp-doc__toc-item--active {
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 600;
}
.lp-doc__toc-check {
  flex: none; width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ok);
}
.lp-doc__toc-check svg { width: 14px; height: 14px; }
.lp-doc__toc-item--active .lp-doc__toc-check { color: var(--accent); }
/* page — top half solid, fading toward the bottom so it reads like a longer
   document continuing below. Mask only fades the content; the white window
   surface stays, so text dissolves into the page. */
.lp-doc__page {
  padding: var(--s-5) var(--s-6);
  min-width: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 50%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0, #000 50%, transparent 100%);
}
.lp-doc__chapter { font-size: 12px; letter-spacing: .04em; color: var(--ink-4); }
.lp-doc__h { font-size: 17px; font-weight: 700; margin: 4px 0 var(--s-3); }
.lp-doc__p { font-size: 13.5px; line-height: 1.8; color: var(--ink-2); margin: 0 0 var(--s-4); }
/* 评分项响应 callout */
.lp-eval {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--accent-soft);
  background: linear-gradient(90deg, var(--accent-soft), transparent);
  border-radius: var(--r-2);
  margin-bottom: var(--s-4);
}
.lp-eval__badge {
  flex: none;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: #fff; background: var(--accent);
  padding: 3px 8px; border-radius: var(--r-1);
}
.lp-eval__title { font-size: 13px; font-weight: 600; }
.lp-eval__sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.lp-eval__ok {
  flex: none; margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; color: var(--ok);
  white-space: nowrap;
}
.lp-eval__ok svg { width: 14px; height: 14px; }
/* 核心参数响应承诺表 */
.lp-doc__tabletitle { font-size: 13px; font-weight: 600; margin-bottom: var(--s-2); }
.lp-doc__tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-2); }
.lp-doc__table { width: 100%; border-collapse: collapse; font-size: 12px; }
.lp-doc__table th {
  text-align: left; font-weight: 600; color: var(--ink-3);
  background: var(--surface-2);
  padding: 8px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.lp-doc__table td {
  padding: 8px 10px; border-bottom: 1px solid var(--line);
  color: var(--ink-2); line-height: 1.5; vertical-align: top;
}
.lp-doc__table tr:last-child td { border-bottom: none; }
.lp-doc__td-n { color: var(--ink-4); font-variant-numeric: tabular-nums; }
.lp-doc__td-cite { color: var(--accent); white-space: nowrap; }
.lp-doc__cites { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.lp-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; padding: 4px 10px;
  border-radius: 999px; border: 1px solid var(--line);
}
.lp-tag svg { width: 13px; height: 13px; }
.lp-tag--cite { background: var(--surface-2); color: var(--ink-3); }
.lp-tag--cite svg { color: var(--accent); }
/* footer status strip */
.lp-doc__foot {
  display: flex; flex-wrap: wrap; gap: var(--s-5);
  padding: var(--s-4) var(--s-6);
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.lp-doc__stat { display: flex; flex-direction: column; }
.lp-doc__stat-v { font-size: 16px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.lp-doc__stat-l { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

/* ---- F2. 用户评价 ------------------------------------------- */
.lp-quote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  align-items: stretch;
}
.lp-quote-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-5);
}
.lp-quote-card__quote {
  position: relative;
  flex: 1;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-2);
  border-left: 3px solid var(--accent);
  padding-left: var(--s-4);
  margin: 0 0 var(--s-4);
}
.lp-quote-card__quote::before {
  content: "\201C";
  position: absolute;
  top: -14px;
  left: var(--s-3);
  font-size: 44px;
  line-height: 1;
  color: var(--accent-soft);
  pointer-events: none;
}
.lp-quote-card__name { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.lp-quote-card__role { font-size: 12px; color: var(--ink-4); margin-top: 2px; }
.lp-quote-card__badge {
  align-self: flex-start;
  margin-top: var(--s-3);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 12px;
  border-radius: 999px;
}

/* ---- G. 常见问题 -------------------------------------------- */
.lp-faq { max-width: 760px; margin: 0 auto; display: grid; gap: var(--s-3); }
.lp-faq__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-5);
}
.lp-faq__q {
  display: flex; align-items: center; gap: var(--s-3);
  font-size: 15px; font-weight: 600;
}
.lp-faq__qmark {
  flex: none;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-1);
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700;
}
.lp-faq__a { font-size: 13px; line-height: 1.7; color: var(--ink-3); margin: var(--s-3) 0 0 34px; }

/* ---- H. 底部 CTA -------------------------------------------- */
.lp-footcta {
  text-align: center;
  padding: var(--s-8) var(--s-5) var(--s-9);
  margin-top: var(--s-7);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--bg));
  border-radius: var(--r-3);
}
.lp-footcta__title { font-size: 26px; font-weight: 700; margin: 0 0 var(--s-3); }
.lp-footcta__sub { color: var(--ink-3); font-size: 15px; margin: 0 0 var(--s-5); }

/* ---- Responsive --------------------------------------------- */
@media (max-width: 960px) {
  .lp-hero { grid-template-columns: 1fr; gap: var(--s-6); padding-top: var(--s-5); }
  .lp-cap-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-tech-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-sec-grid, .lp-quote-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .lp-hero__brand { font-size: 28px; }
  .lp-hero__title { font-size: 24px; }
  .lp-section__title, .lp-footcta__title { font-size: 22px; }
  .lp-cap-grid, .lp-tech-grid, .lp-vs-grid { grid-template-columns: 1fr; }
  .lp-sec-grid, .lp-quote-grid { grid-template-columns: 1fr; }
  .lp-hero__stats { gap: var(--s-5); }
  .lp-vs-col--hot { transform: none; }   /* no lift when stacked */
  /* document window: stack outline above the page */
  .lp-doc__body { grid-template-columns: 1fr; }
  .lp-doc__toc { border-right: none; border-bottom: 1px solid var(--line); }
  .lp-doc__toc-list { grid-auto-flow: column; grid-auto-columns: max-content;
    overflow-x: auto; gap: var(--s-3); }
  .lp-doc__page { padding: var(--s-4); }
  .lp-eval { flex-wrap: wrap; }
  .lp-eval__ok { margin-left: 0; }
}

/* ============================================================
   Processing page (生成中) — animated progress bar + stepper /
   live-log polish.  feat/processing-page-ui, 2026-06-10.
   The animated bar is the only NEW CSS; the .stepper / .log
   classes are reused verbatim from app.css.  All rules are
   scoped to .processing-card / .proc-steps-card so the
   detail-page progress bar is untouched.
   ============================================================ */

/* Taller bar so the stripes / sweep / cap read clearly
   (app.css base .progress__bar is only 4px). */
.processing-card .progress__bar {
  height: 10px;
  background: var(--bg-soft);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
  position: relative;
}
.processing-card .progress__fill {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 1px rgba(30, 58, 138, .12);
  transition: width .9s var(--ease);
}

/* Layer 1 — moving diagonal "barber-pole" stripes inside the fill */
.processing-card .progress__fill::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    115deg,
    rgba(255, 255, 255, .18) 0 12px,
    rgba(255, 255, 255, 0) 12px 28px
  );
  background-size: 40px 100%;
  animation: procStripes 1.1s linear infinite;
}
@keyframes procStripes {
  from { background-position: 0 0; }
  to   { background-position: 40px 0; }
}

/* Layer 2 — traveling glossy highlight sweeping across the fill.
   Overrides app.css's global shimmer ::after inside our scope. */
.processing-card .progress__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, .55) 50%,
    transparent 100%
  );
  background-size: 50% 100%;
  background-repeat: no-repeat;
  animation: procSweep 1.9s var(--ease) infinite;
}
@keyframes procSweep {
  from { background-position: -60% 0; }
  to   { background-position: 160% 0; }
}

/* Leading-edge glow dot. The mockup nests this inside .progress__fill
   (which is overflow:hidden, clipping the dot's outer half); we instead
   mount it as a sibling in .progress__bar and ride the leading edge via
   a JS-set left:% so the full glow shows. */
.processing-card .progress__cap {
  position: absolute;
  top: 50%;
  width: 14px; height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 70%);
  transform: translateY(-50%);
  transition: left .9s var(--ease);
  pointer-events: none;
  z-index: 2;
  animation: procCap 1.2s ease-in-out infinite;
}
@keyframes procCap {
  0%, 100% { opacity: .35; transform: translateY(-50%) scale(.8); }
  50%      { opacity: 1;   transform: translateY(-50%) scale(1.15); }
}

/* Active step dot — gentle breathing ring */
.proc-steps-card .step.is-active .step__dot {
  animation: procDot 1.6s ease-in-out infinite;
}
@keyframes procDot {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft); }
  50%      { box-shadow: 0 0 0 8px var(--accent-soft); }
}

/* 4-step stepper (app.css base is 5 columns). Scoped above the 720px
   mobile breakpoint so it doesn't out-specify app.css's mobile rule
   (.stepper → 1fr), which collapses the stepper to stacked rows.
   Variable-driven: this more-specific + later-loading rule must honor
   `--step-count` too, or it re-pins 4 columns over the review chrome's
   inline `--step-count:5`. Fallback 4 preserves the current generate/
   parse desktop layout (neither sets the variable). */
@media (min-width: 721px) {
  .proc-steps-card .stepper { grid-template-columns: repeat(var(--step-count, 4), 1fr); }
}

/* freeze all motion + hide the cap on terminal states */
.processing-card.is-done .progress__fill::before,
.processing-card.is-done .progress__fill::after,
.processing-card.is-failed .progress__fill::before,
.processing-card.is-failed .progress__fill::after {
  animation: none;
  display: none;
}
.processing-card.is-done .progress__cap,
.processing-card.is-failed .progress__cap {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .processing-card .progress__fill::before,
  .processing-card .progress__fill::after,
  .processing-card .progress__cap,
  .proc-steps-card .step.is-active .step__dot {
    animation: none !important;
  }
}


/* ── source: css/admin.css ── */
/* ============================================================
   ADMIN CONSOLE · 运营后台
   Built on the existing institutional light palette (app.css vars).
   Operator-facing: dense, scannable, glanceable figures.
   ============================================================ */

/* ---- Shell: left rail + main ------------------------------- */
.adm-shell {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: var(--s-6);
  align-items: start;
}
.adm-rail {
  position: sticky;
  top: calc(var(--topbar-h) + var(--s-5));
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.adm-rail__brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--s-3) var(--s-3);
  border-bottom: 1px solid var(--line);
}
.adm-rail__brand-kicker {
  font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-4); font-weight: 600;
}
.adm-rail__brand-name { font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.adm-rail__nav { display: flex; flex-direction: column; gap: 2px; }
.adm-rail__link {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 9px var(--s-3);
  border-radius: var(--r-2);
  font-size: 13.5px;
  color: var(--ink-2);
  border-left: 2px solid transparent;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.adm-rail__link:hover { background: var(--surface); color: var(--ink); }
.adm-rail__link.is-active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
  border-left-color: var(--accent);
}
.adm-rail__link svg { width: 16px; height: 16px; flex: 0 0 auto; opacity: .85; }
.adm-rail__ico {
  width: 16px; height: 16px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; opacity: .85;
}

/* Server status block (reachable from every admin screen) */
.srv-status {
  margin-top: auto;
  display: flex; align-items: center; gap: var(--s-2);
  padding: 10px var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  font-size: 12.5px;
}
.srv-status__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink-4);
  flex: 0 0 auto;
  position: relative;
}
.srv-status__dot::after {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%;
  background: currentColor; opacity: .18;
}
.srv-status--ok   .srv-status__dot { background: var(--ok);   color: var(--ok); }
.srv-status--ok   .srv-status__dot { animation: srvPulse 2.4s var(--ease) infinite; }
.srv-status--slow .srv-status__dot { background: var(--warn); color: var(--warn); }
.srv-status--down .srv-status__dot { background: var(--err);  color: var(--err); }
.srv-status__label { font-weight: 600; }
.srv-status__sub { color: var(--ink-4); margin-left: auto; font-variant-numeric: tabular-nums; }
@keyframes srvPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(31,107,58,.0); } 50% { box-shadow: 0 0 0 4px rgba(31,107,58,.12); } }

/* ---- Admin page header ------------------------------------- */
.adm-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s-4); flex-wrap: wrap;
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
}
.adm-head__title { font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -.005em; }
.adm-head__kicker {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin-bottom: 4px;
}
.adm-head__right { display: flex; align-items: center; gap: var(--s-4); }
.adm-updated {
  font-size: 12px; color: var(--ink-4);
  font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; gap: 6px;
}
.adm-updated__live {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ok);
  animation: srvPulse 2.4s var(--ease) infinite; color: var(--ok);
}

/* ---- Section grouping -------------------------------------- */
.adm-section { margin-bottom: var(--s-6); }
.adm-section__label {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700;
  display: flex; align-items: baseline; gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.adm-section__hint { font-size: 11px; letter-spacing: 0; text-transform: none; color: var(--ink-4); font-weight: 400; }
.adm-section__action {
  margin-left: auto;
  font-size: 12px; letter-spacing: 0; text-transform: none;
  color: var(--accent); font-weight: 600;
}
.adm-section__action:hover { text-decoration: underline; }
.kpi-strip { margin-bottom: var(--s-5); }

/* ---- User cell + badges (用户管理) ------------------------- */
.ucell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ucell__av {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: #fff;
}
.ucell__main { min-width: 0; }
.ucell__name { font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ucell__org { font-size: 11.5px; color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.jbadge--online  { background: var(--ok-soft);     color: var(--ok); }
.jbadge--online .jbadge__dot { animation: pulse 1.6s infinite var(--ease); }
.jbadge--active  { background: var(--accent-soft); color: var(--accent-ink); }
.jbadge--dormant { background: var(--bg-soft);     color: var(--ink-3); border-color: var(--line); }
.jbadge--banned  { background: var(--err-soft);    color: var(--err); }

.tier {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-3);
}
.tier--standard   { background: var(--ok-soft);     color: var(--ok); border-color: transparent; }
.tier--enterprise { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

.user-ban-banner {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); margin-top: var(--s-3);
  background: var(--err-soft);
  border: 1px solid color-mix(in srgb, var(--err) 22%, var(--line));
  border-radius: var(--r-2); color: #5c1717; font-size: 12.5px;
}
.user-ban-banner svg { flex: 0 0 auto; color: var(--err); }
.drill__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }

/* Real app extra: system_grant tx type (admin adjustments / test seeds) */
.tx-badge--system_grant { background: var(--surface-2); color: var(--ink-3); border-color: var(--line-strong); }

/* ---- Credit ledger amounts (额度管理) --------------------- */
.adm-amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.adm-amt--pos { color: var(--ok); }
.adm-amt--neg { color: var(--err); }
.adm-rel { color: var(--ink-2); }
.adm-rel.adm-td-file__name { max-width: 260px; }

/* ---- Stat cards -------------------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-3);
}
.stat-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-4) var(--s-4) var(--s-4);
  display: flex; flex-direction: column; gap: 2px;
  min-height: 104px;
  position: relative;
}
.stat__cap { font-size: 12px; color: var(--ink-3); }
.stat__num {
  font-size: 32px; font-weight: 600; letter-spacing: -.02em;
  line-height: 1.1; margin-top: auto;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.stat__num .stat__unit { font-size: 14px; font-weight: 500; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.stat__num .stat__sym  { font-size: 18px; font-weight: 500; color: var(--ink-3); margin-right: 1px; }
.stat__sub { font-size: 11.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.stat--accent .stat__num { color: var(--accent); }
.stat--ok   .stat__num { color: var(--ok); }
.stat--err  .stat__num { color: var(--err); }
.stat--clickable { cursor: pointer; transition: border-color .12s var(--ease), box-shadow .12s var(--ease), transform .12s var(--ease); }
.stat--clickable:hover { border-color: var(--line-strong); box-shadow: 0 4px 16px rgba(20,16,8,.06); transform: translateY(-1px); }
.stat__go {
  position: absolute; top: var(--s-3); right: var(--s-3);
  font-size: 11px; color: var(--ink-4);
  display: inline-flex; align-items: center; gap: 3px;
  opacity: 0; transition: opacity .12s var(--ease);
}
.stat--clickable:hover .stat__go { opacity: 1; color: var(--accent); }

/* ---- Server health card (wider) --------------------------- */
.srv-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-5);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--s-6);
  align-items: center;
}
.srv-light {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-3);
  text-align: center;
  padding: var(--s-3);
}
.srv-light__bulb {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--ok);
  position: relative;
  box-shadow: 0 0 0 8px rgba(31,107,58,.10);
}
.srv-light__bulb::after {
  content: ""; position: absolute; top: 12px; left: 14px;
  width: 16px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,.45);
}
.srv-light--ok   .srv-light__bulb { background: var(--ok);   box-shadow: 0 0 0 8px rgba(31,107,58,.10); }
.srv-light--slow .srv-light__bulb { background: var(--warn); box-shadow: 0 0 0 8px rgba(138,90,0,.10); }
.srv-light--down .srv-light__bulb { background: var(--err);  box-shadow: 0 0 0 8px rgba(142,29,29,.10); }
.srv-light__state { font-size: 18px; font-weight: 600; }
.srv-light--ok   .srv-light__state { color: var(--ok); }
.srv-light--slow .srv-light__state { color: var(--warn); }
.srv-light--down .srv-light__state { color: var(--err); }
.srv-light__hint { font-size: 11.5px; color: var(--ink-4); }

.srv-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4) var(--s-6);
}
.srv-field { display: flex; flex-direction: column; gap: 3px; border-left: 2px solid var(--line); padding-left: var(--s-3); }
.srv-field__k { font-size: 11.5px; color: var(--ink-3); }
.srv-field__v { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.srv-field__v small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }

/* ---- Mini donut + legend (today split) -------------------- */
.split-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-4) var(--s-5);
  display: flex; align-items: center; gap: var(--s-6);
}
.donut { flex: 0 0 auto; }
.donut__track { stroke: var(--bg-soft); }
.split-legend { display: flex; flex-direction: column; gap: var(--s-2); flex: 1 1 auto; min-width: 0; }
.split-legend__row { display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: var(--s-3); font-size: 12.5px; }
.split-legend__sw { width: 10px; height: 10px; border-radius: 3px; }
.split-legend__k { color: var(--ink-2); }
.split-legend__v { font-weight: 600; font-variant-numeric: tabular-nums; }
.split-legend__pct { color: var(--ink-4); font-variant-numeric: tabular-nums; width: 44px; text-align: right; }

/* ---- Jobs toolbar ----------------------------------------- */
.adm-toolbar {
  display: flex; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-4); flex-wrap: wrap;
}
.adm-select {
  position: relative; display: inline-flex; align-items: center;
}
.adm-select select {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-size: 13px;
  padding: 8px 30px 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.adm-select select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.adm-select__chev { position: absolute; right: 10px; pointer-events: none; color: var(--ink-4); font-size: 11px; }
.adm-search { position: relative; flex: 1 1 340px; min-width: 240px; }
.adm-search input {
  width: 100%; font: inherit; font-size: 13px;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--surface); color: var(--ink);
}
.adm-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.adm-search__icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-4); pointer-events: none; display: inline-flex; }
.adm-count { font-size: 12.5px; color: var(--ink-3); margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Inline 调整额度 form inside the user drill's 额度概览 panel. */
.adm-adjust__row { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.adm-adjust__num, .adm-adjust__reason {
  font: inherit; font-size: 13px; padding: 7px 10px;
  border: 1px solid var(--line-strong); border-radius: var(--r-2);
  background: var(--surface); color: var(--ink);
}
.adm-adjust__num { width: 140px; }
.adm-adjust__reason { flex: 1 1 200px; min-width: 160px; }
.adm-adjust__num:focus, .adm-adjust__reason:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.adm-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 5px 8px 5px 10px;
  background: var(--accent-soft); color: var(--accent-ink);
  border-radius: 999px;
}
.adm-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0; opacity: .7; }
.adm-chip button:hover { opacity: 1; }

/* ---- Jobs table ------------------------------------------- */
.adm-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
}
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th {
  text-align: left; padding: 11px var(--s-3);
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  white-space: nowrap;
}
.adm-table td {
  padding: 11px var(--s-3);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.adm-table tbody tr { cursor: pointer; transition: background .1s var(--ease); }
.adm-table tbody tr:hover { background: var(--surface-2); }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.adm-table .mono { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.adm-td-file { max-width: 300px; }
.adm-td-file__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
.adm-td-time { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.adm-td-stage { color: var(--ink-2); white-space: nowrap; }
.adm-err { color: var(--err); font-size: 12.5px; }
.adm-dim { color: var(--ink-4); }

/* Status badge (5 variants) */
.jbadge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 500; letter-spacing: .02em;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid transparent; white-space: nowrap;
}
.jbadge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.jbadge--done     { background: var(--ok-soft);     color: var(--ok); }
.jbadge--failed   { background: var(--err-soft);    color: var(--err); }
.jbadge--canceled { background: var(--bg-soft);     color: var(--ink-3); border-color: var(--line); }
.jbadge--running  { background: var(--accent-soft); color: var(--accent-ink); }
.jbadge--running .jbadge__dot { animation: pulse 1.6s infinite var(--ease); }
.jbadge--queued   { background: var(--surface-2);   color: var(--ink-3); border-color: var(--line-strong); }

/* chapter mini progress */
.chprog { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.chprog__bar { width: 48px; height: 4px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.chprog__fill { height: 100%; background: var(--accent); border-radius: 999px; }
.chprog__txt { color: var(--ink-3); font-size: 12px; }

/* ---- Drilldown side panel --------------------------------- */
.drill-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15,18,25,.34);
  animation: fadein .15s var(--ease);
}
.drill {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 81;
  height: 100vh;
  width: min(540px, 96vw);
  background: var(--bg);
  border-left: 1px solid var(--line);
  box-shadow: -16px 0 48px rgba(20,16,8,.16);
  display: flex; flex-direction: column;
  animation: drillIn .24s var(--ease);
}
@keyframes drillIn { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.drill__head {
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: flex; align-items: flex-start; gap: var(--s-3);
}
.drill__head-main { min-width: 0; flex: 1 1 auto; }
.drill__crumb { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); font-weight: 600; margin-bottom: 4px; }
.drill__title { font-size: 15px; font-weight: 600; line-height: 1.4; word-break: break-all; }
.drill__id { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.drill__close {
  border: 1px solid var(--line); background: var(--surface);
  width: 30px; height: 30px; border-radius: var(--r-2);
  cursor: pointer; color: var(--ink-3); font-size: 17px; line-height: 1;
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
}
.drill__close:hover { background: var(--bg-soft); color: var(--ink); }
.drill__body { flex: 1 1 auto; overflow-y: auto; padding: var(--s-4) var(--s-5) var(--s-7); }

/* collapsible sections */
.drill-sec { border-bottom: 1px solid var(--line); }
.drill-sec__head {
  width: 100%; display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) 2px; background: transparent; border: 0; cursor: pointer;
  text-align: left; color: var(--ink);
}
.drill-sec__chev { color: var(--ink-4); transition: transform .15s var(--ease); display: inline-flex; flex: 0 0 auto; }
.drill-sec.is-open .drill-sec__chev { transform: rotate(90deg); }
.drill-sec__name { font-size: 13.5px; font-weight: 600; }
.drill-sec__meta { margin-left: auto; font-size: 11.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.drill-sec__body { display: none; padding: 0 2px var(--s-4); }
.drill-sec.is-open .drill-sec__body { display: block; animation: fadein .18s var(--ease); }

/* status snapshot grid */
.snap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); margin-bottom: var(--s-3); }
.snap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-2); padding: var(--s-3) var(--s-4);
}
.snap__k { font-size: 11px; color: var(--ink-3); margin-bottom: 3px; }
.snap__v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* 退款审批 — request-status badge + review-queue bits */
.rr-badge {
  display: inline-flex; align-items: center; padding: 2px 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 500;
  border: 1px solid transparent;
}
.rr-badge--pending  { background: var(--warn-soft, color-mix(in srgb, var(--warn) 16%, transparent)); color: var(--warn); }
.rr-badge--approved { background: var(--ok-soft,   color-mix(in srgb, var(--ok) 16%, transparent));   color: var(--ok); }
.rr-badge--rejected { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }
.rr-badge--abnormal { background: color-mix(in srgb, var(--err) 16%, transparent); color: var(--err); border-color: color-mix(in srgb, var(--err) 30%, transparent); }
.rr-status-cell { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rr-cta { color: var(--accent); font-size: 12.5px; font-weight: 500; }
.rr-cta--warn { color: var(--err); }
.rr-alert {
  display: block; width: 100%; text-align: left; cursor: pointer;
  margin-bottom: var(--s-4);
  background: color-mix(in srgb, var(--err) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--err) 30%, transparent);
  border-radius: var(--r-2); padding: var(--s-3) var(--s-4);
  color: var(--err); font-size: 13px; font-weight: 500;
}
.rr-alert:hover { background: color-mix(in srgb, var(--err) 14%, transparent); }
.adm-table tr.is-abnormal td { background: color-mix(in srgb, var(--err) 5%, transparent); }
.rr-hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; margin: 0 0 var(--s-3); }
.rr-reason {
  margin-top: var(--s-3); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-2);
  padding: var(--s-3) var(--s-4);
}
.rr-reason__lab { font-size: 11px; color: var(--ink-3); margin-bottom: 4px; }
.rr-reason__body { font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }

/* failure box */
.fail-box {
  background: var(--err-soft);
  border: 1px solid color-mix(in srgb, var(--err) 24%, var(--line));
  border-radius: var(--r-2);
  padding: var(--s-4);
  margin-top: var(--s-3);
}
.fail-box__label {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--err); font-weight: 700; margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.fail-box__type { font-weight: 600; color: var(--err); }
.fail-box__msg { font-size: 13px; color: #5c1717; line-height: 1.6; margin: 4px 0 0; font-family: var(--mono); }
.fail-actions { margin-top: var(--s-4); display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.improve-empty {
  margin-top: var(--s-3);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-2);
  padding: var(--s-4);
  text-align: center; color: var(--ink-3); font-size: 12.5px;
  background: var(--surface-2);
}
.improve-empty__title { color: var(--ink-2); font-weight: 600; margin-bottom: 4px; font-size: 13px; }
.improve-empty__tag {
  display: inline-block; margin-top: 8px;
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-4); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
}

/* collapsed-section placeholder body */
.drill-ph { color: var(--ink-4); font-size: 12.5px; padding: 4px 0 8px; }

/* tiny event timeline (sample expanded section content) */
.tl { list-style: none; margin: 0; padding: 0; }
.tl__item { display: grid; grid-template-columns: 64px 1fr; gap: var(--s-3); padding: 6px 0; font-size: 12.5px; }
.tl__t { color: var(--ink-4); font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 11.5px; }
.tl__msg { color: var(--ink-2); }
.tl__msg b { font-weight: 600; color: var(--ink); }

/* ============================================================
   SERVER monitoring page
   ============================================================ */
.srv-card--link { cursor: pointer; transition: border-color .12s var(--ease), box-shadow .12s var(--ease); }
.srv-card--link:hover { border-color: var(--line-strong); box-shadow: 0 4px 16px rgba(20,16,8,.06); }

.srv-hero {
  display: grid; grid-template-columns: 200px 1fr; gap: var(--s-6); align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); padding: var(--s-5);
}
.srv-hero__facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4) var(--s-6); }
.srv-fact { border-left: 2px solid var(--line); padding-left: var(--s-3); }
.srv-fact__k { font-size: 11.5px; color: var(--ink-3); }
.srv-fact__v { font-size: 18px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.srv-fact__sub { font-size: 11px; color: var(--ink-4); margin-top: 2px; }

.stat-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.srv-metrics .stat { min-height: 92px; }
.usage { height: 5px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; margin-top: 8px; }
.usage__fill { height: 100%; border-radius: 999px; background: var(--accent); transition: width .4s var(--ease); }
.usage__fill--ok   { background: var(--accent); }
.usage__fill--warn { background: var(--warn); }
.usage__fill--err  { background: var(--err); }

.jbadge--srv-ok   { background: var(--ok-soft);   color: var(--ok); }
.jbadge--srv-slow { background: var(--warn-soft); color: var(--warn); }
.jbadge--srv-slow .jbadge__dot { animation: pulse 1.6s infinite var(--ease); }
.jbadge--srv-down { background: var(--err-soft);  color: var(--err); }

.node-usage { display: flex; align-items: center; gap: 8px; }
.node-usage .usage { margin-top: 0; flex: 0 0 auto; }
.node-usage__n { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.node-res-list { display: flex; flex-direction: column; gap: var(--s-3); margin-bottom: var(--s-3); }
.node-res { display: flex; align-items: center; gap: var(--s-3); }
.node-res__k { font-size: 12px; color: var(--ink-3); width: 40px; flex: 0 0 auto; }
.node-res .usage { margin-top: 0; }
.node-res__v { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; width: 40px; text-align: right; flex: 0 0 auto; }

.srv-logcard .log { border: 0; border-radius: 0; max-height: 340px; }
.log__src { color: var(--ink-4); margin-right: 8px; font-weight: 600; }

.inc-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; }
.inc {
  display: grid; grid-template-columns: 10px 1fr auto auto; gap: var(--s-4); align-items: center;
  padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line);
}
.inc:last-child { border-bottom: 0; }
.inc__sev { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.inc__sev--major { background: var(--err); }
.inc__sev--minor { background: var(--warn); }
.inc__main { min-width: 0; }
.inc__title { font-size: 13.5px; font-weight: 500; }
.inc__impact { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.inc__meta { text-align: right; white-space: nowrap; }
.inc__time { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.inc__dur { font-size: 11.5px; color: var(--ink-4); }

/* ---- Responsive ------------------------------------------- */
@media (max-width: 1080px) {
  .adm-shell { grid-template-columns: 1fr; }
  .adm-rail {
    position: static; flex-direction: row; flex-wrap: wrap; align-items: center;
    gap: var(--s-3); padding-bottom: var(--s-4); border-bottom: 1px solid var(--line);
  }
  .adm-rail__brand { border-bottom: 0; padding: 0 var(--s-3) 0 0; border-right: 1px solid var(--line); }
  .adm-rail__nav { flex-direction: row; }
  .srv-status { margin-top: 0; margin-left: auto; }
  .stat-grid, .stat-grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .srv-hero { grid-template-columns: 1fr; gap: var(--s-4); }
  .srv-hero__facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .stat-grid, .stat-grid--5, .stat-grid--6 { grid-template-columns: 1fr 1fr; }
  .srv-hero__facts { grid-template-columns: 1fr 1fr; }
  .inc { grid-template-columns: 10px 1fr; }
  .inc__meta { display: none; }
  .srv-card { grid-template-columns: 1fr; gap: var(--s-4); }
  .srv-fields { grid-template-columns: 1fr; }
  .split-card { flex-direction: column; align-items: flex-start; }
  .adm-table-wrap { overflow-x: auto; }
  .adm-table { min-width: 720px; }
}
