:root {
  color-scheme: light;
  --ink: #182126;
  --muted: #5f6b72;
  --line: #d7dde0;
  --surface: #ffffff;
  --soft: #f3f5f6;
  --blue: #1668c1;
  --green: #16734a;
  --amber: #a85b00;
  --red: #b3261e;
  --dark: #17242a;
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  letter-spacing: 0;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #f7f8f8; color: var(--ink); }
body { line-height: 1.55; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.topbar { min-height: 64px; padding: 10px max(20px, calc((100% - 1240px) / 2)); display: flex; align-items: center; justify-content: space-between; background: var(--dark); color: white; }
.topbar div { display: flex; flex-direction: column; }
.topbar strong { font-size: 1.12rem; }
.topbar span { color: #b9c8cf; font-size: .84rem; }
.topbar a { color: white; text-decoration: none; border: 1px solid #5c7079; padding: 8px 12px; border-radius: 4px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 1240px; margin: 0 auto; border-bottom: 1px solid var(--line); background: var(--surface); }
.generator-steps { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.step { border: 0; border-bottom: 3px solid transparent; background: transparent; padding: 14px 8px; color: var(--muted); white-space: nowrap; }
.step span { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 7px; border: 1px solid #aab5ba; border-radius: 50%; }
.step.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 650; }
.step.active span { background: var(--blue); color: white; border-color: var(--blue); }
main { max-width: 1240px; margin: 0 auto; padding: 28px 24px 70px; }
.page-step { display: none; }
.page-step.active { display: block; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 1.7rem; line-height: 1.25; margin-bottom: 6px; }
h2 { font-size: 1.13rem; line-height: 1.35; margin-bottom: 14px; }
p { color: var(--muted); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading.compact { margin-bottom: 16px; }
.local-badge { background: #e4f4eb; color: var(--green); padding: 6px 10px; border-radius: 4px; font-size: .85rem; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 900px; }
.form-grid.compact { margin-top: 18px; }
.connection-grid { max-width: 920px; }
label { display: flex; flex-direction: column; gap: 7px; font-weight: 600; color: #2b3439; min-width: 0; }
label.wide { grid-column: 1 / -1; }
input, select, textarea { width: 100%; min-height: 44px; padding: 9px 11px; color: var(--ink); border: 1px solid #aeb8bd; border-radius: 4px; background: white; outline: none; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #dceafa; }
small { color: var(--muted); font-weight: 400; }
.actions { display: flex; gap: 10px; margin-top: 26px; }
.actions.vertical { flex-direction: column; }
.actions button, .primary, .secondary, .danger { min-height: 42px; padding: 8px 15px; border-radius: 4px; border: 1px solid transparent; }
.primary { background: var(--blue); color: white; }
.primary:hover { background: #0f589f; }
.secondary { background: white; color: var(--ink); border-color: #aab5ba; }
.danger { background: white; color: var(--red); border-color: #d28b87; }
button:disabled { opacity: .48; cursor: not-allowed; }
.control-band { display: flex; align-items: flex-end; gap: 34px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.control-label { display: block; color: var(--muted); font-size: .84rem; margin-bottom: 7px; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(100px, auto); gap: 4px; }
.segmented button { min-height: 42px; padding: 8px 14px; border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 4px; }
.segmented button.selected { border-color: var(--blue); color: var(--blue); background: #edf5fe; font-weight: 650; }
.warning-banner { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 14px 16px; margin: 18px 0; background: #fff1dc; border-left: 4px solid var(--amber); color: #70400a; }
.hidden { display: none !important; }
.layout-two { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 30px; margin-top: 24px; }
.plain-section { padding: 4px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.section-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.file-action { color: var(--blue); font-size: .88rem; display: inline-block; cursor: pointer; font-weight: 600; }
.download-link { color: var(--blue); font-weight: 650; text-decoration: none; }
.download-link:hover { text-decoration: underline; }
.file-action input { display: none; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check-row { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 3px 9px; align-items: center; min-height: 58px; padding: 9px 10px; background: white; border: 1px solid var(--line); border-radius: 4px; font-weight: 600; }
.check-row input { width: 20px; min-height: 20px; grid-row: 1 / 3; }
.check-row span { color: var(--muted); font-size: .8rem; font-weight: 400; }
.probe-list { border-top: 1px solid var(--line); }
.probe-row { border-bottom: 1px solid var(--line); background: white; }
.probe-summary { display: grid; grid-template-columns: 28px minmax(150px, 1.5fr) minmax(90px, .6fr) minmax(130px, 1fr) 34px; gap: 10px; align-items: center; min-height: 62px; padding: 10px 8px; }
.probe-summary input { width: 20px; min-height: 20px; }
.probe-name { font-weight: 650; }
.probe-type { color: var(--blue); font-size: .84rem; }
.probe-setting { color: var(--muted); font-size: .85rem; }
.expand-probe { width: 32px; height: 32px; border: 0; background: transparent; font-size: 1.1rem; }
.probe-details { display: none; padding: 13px 46px 17px; background: var(--soft); border-top: 1px solid var(--line); }
.probe-row.open .probe-details { display: block; }
.probe-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.remove-probe { align-self: end; width: 44px; min-height: 44px; padding: 0; font-size: 1.25rem; }
.summary-panel { align-self: start; position: sticky; top: 18px; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 6px; }
.summary-panel dl { margin: 0; }
.summary-panel dl div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 9px 0; }
.summary-panel dd { margin: 0; font-weight: 700; }
.cost-warning { margin: 14px 0; padding: 11px; color: #743d00; background: #fff1dc; border-radius: 4px; }
.retention-toggle { margin-top: 16px; }
.status-strip { display: flex; flex-wrap: wrap; gap: 18px; padding: 12px 14px; background: white; border: 1px solid var(--line); }
.status-dot { font-weight: 700; }
.status-dot.running { color: var(--blue); }
.status-dot.complete { color: var(--green); }
.progress-track { width: 100%; height: 10px; margin: 18px 0 24px; background: #dde3e6; overflow: hidden; border-radius: 3px; }
.progress-track > div { height: 100%; background: var(--blue); transition: width .25s ease; }
.run-grid, .metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric { padding: 14px; background: white; border: 1px solid var(--line); border-radius: 4px; }
.metric span { display: block; color: var(--muted); font-size: .82rem; }
.metric strong { font-size: 1.35rem; }
.log-panel, .technical, .advanced { margin-top: 20px; background: white; border: 1px solid var(--line); padding: 12px 14px; border-radius: 4px; }
summary { cursor: pointer; font-weight: 650; }
pre { max-width: 100%; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; color: #344148; background: #f2f4f5; padding: 12px; }
.empty-state { padding: 60px 20px; text-align: center; }
.verdict-band { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 22px; border-left: 6px solid var(--green); background: white; }
.verdict-band.alert { border-left-color: var(--red); }
.verdict-band.warning { border-left-color: var(--amber); }
.eyebrow { color: var(--muted); font-size: .8rem; }
.report-section { padding: 24px 0; border-bottom: 1px solid var(--line); }
.fingerprint-section { padding-top: 30px; }
.fingerprint-section > .section-heading p { max-width: 760px; margin-bottom: 0; }
.fingerprint-status { padding: 7px 11px; color: var(--amber); border: 1px solid #d9a363; background: #fff8ee; border-radius: 4px; white-space: nowrap; }
.fingerprint-status.strong { color: var(--green); border-color: #7eb99e; background: #edf8f2; }
.reference-note { margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); background: white; }
.reference-note p:last-child { margin-bottom: 0; }
.analysis-block { padding: 20px 0 26px; border-bottom: 1px solid var(--line); }
.analysis-block h2 { margin-bottom: 0; }
.report-list { display: grid; gap: 8px; }
.report-item { padding: 12px 14px; background: white; border: 1px solid var(--line); border-radius: 4px; overflow-wrap: anywhere; }
.fingerprint-bars { display: grid; gap: 14px; }
.probability-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 230px; align-items: center; gap: 12px; }
.bar { height: 16px; background: #dfe4e6; border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--blue); }
.probability-value { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.probability-value small { font-size: .75rem; white-space: nowrap; }
.data-table { overflow-x: auto; }
.data-table table { width: 100%; min-width: 720px; border-collapse: collapse; background: white; }
#juice-result table { min-width: 820px; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { color: var(--muted); font-size: .82rem; }
.plan-preview, .export-box { margin-top: 20px; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 4px; }
#toast { position: fixed; right: 18px; bottom: 18px; max-width: min(420px, calc(100% - 36px)); padding: 11px 14px; background: var(--dark); color: white; border-radius: 4px; opacity: 0; pointer-events: none; transition: opacity .2s; }
#toast.show { opacity: 1; }

@media (max-width: 840px) {
  :root { font-size: 17px; }
  main { padding: 20px 16px 60px; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .generator-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step { padding: 11px 4px; white-space: normal; font-size: .9rem; }
  .step span { width: 25px; height: 25px; margin-right: 4px; }
  .layout-two { grid-template-columns: 1fr; }
  .summary-panel { position: static; }
  .run-grid, .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .probe-summary { grid-template-columns: 28px minmax(150px, 1fr) 34px; }
  .probe-type, .probe-setting { grid-column: 2; }
  .expand-probe { grid-column: 3; grid-row: 1 / 3; }
  .probe-details { padding-left: 18px; padding-right: 18px; }
  .probe-fields { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .topbar { padding: 10px 14px; }
  .topbar span { display: none; }
  .form-grid, .option-grid { grid-template-columns: 1fr; }
  label.wide { grid-column: auto; }
  .section-heading, .verdict-band, .control-band { flex-direction: column; }
  .segmented { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .probability-row { grid-template-columns: 60px minmax(0, 1fr); }
  .probability-row .probability-value { grid-column: 1 / -1; justify-content: flex-start; }
  .run-grid, .metrics { grid-template-columns: 1fr; }
}
