:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --panel-soft: #f7f9fc;
  --line: #d7dee8;
  --line-soft: #e9eef5;
  --text: #101828;
  --muted: #667085;
  --weak: #98a2b3;
  --brand: #175cd3;
  --brand-dark: #1249a8;
  --teal: #0f766e;
  --green: #067647;
  --amber: #b54708;
  --red: #b42318;
  --purple: #6941c6;
  --shadow: 0 10px 28px rgba(16, 24, 40, .07);
  --shadow-strong: 0 22px 56px rgba(16, 24, 40, .13);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, #fbfcff 0, var(--bg) 360px, #eef2f7 100%);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #c9d3e1;
  border-radius: var(--radius);
  color: var(--text);
  background: linear-gradient(180deg, #fff, #f8fafc);
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 1px 1px rgba(16, 24, 40, .04);
  transition: border-color .16s ease, color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
button:hover { border-color: var(--brand); color: var(--brand); box-shadow: 0 8px 18px rgba(16, 24, 40, .08); transform: translateY(-1px); }
button:active { transform: translateY(0); box-shadow: 0 1px 1px rgba(16, 24, 40, .04); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(23, 92, 211, .18);
  outline-offset: 2px;
}
button.primary { color: #fff; background: linear-gradient(180deg, #2563eb, var(--brand)); border-color: var(--brand); box-shadow: 0 10px 22px rgba(23, 92, 211, .22); }
button.good { color: var(--green); background: #ecfdf3; border-color: #abefc6; }
button.warn { color: var(--amber); background: #fffaeb; border-color: #fedf89; }
button.small { min-height: 29px; padding: 4px 9px; font-size: 12px; }
input, textarea, select {
  width: 100%;
  min-height: 39px;
  padding: 8px 10px;
  border: 1px solid #c9d3e1;
  border-radius: var(--radius);
  background: #fbfcfe;
  color: var(--text);
  outline: 0;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(23, 92, 211, .12); }
label { display: block; margin-bottom: 6px; color: #344054; font-size: 12px; font-weight: 850; }
code { font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 max(18px, calc((100vw - 1500px) / 2 + 18px));
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid rgba(207, 215, 227, .86);
  backdrop-filter: blur(18px) saturate(1.35);
  box-shadow: 0 1px 0 rgba(16, 24, 40, .02);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 210px; font-size: 19px; font-weight: 950; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; color: #fff; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--teal)); box-shadow: 0 10px 24px rgba(23, 92, 211, .22); }
.brand small { display: block; margin-top: -4px; color: var(--muted); font-size: 11px; font-weight: 800; }
.nav { flex: 1; display: flex; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 11px; border-radius: 8px; color: var(--muted); font-weight: 850; white-space: nowrap; transition: color .16s ease, background .16s ease; }
.nav a:hover, .nav a.active { color: var(--brand); background: #eef4ff; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.page { width: min(1500px, calc(100% - 34px)); margin: 20px auto 52px; display: grid; gap: 18px; }
.layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 18px; align-items: start; }
.side { position: sticky; top: 90px; display: grid; gap: 12px; }
.main { display: grid; gap: 16px; min-width: 0; }
.hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(340px, .85fr); gap: 16px; align-items: stretch; }
.landing-hero {
  min-height: 470px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .8fr);
  gap: 28px;
  align-items: center;
  padding: 38px;
  border: 1px solid rgba(216, 224, 234, .85);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(238, 244, 255, .95), rgba(255, 255, 255, .72)),
    radial-gradient(circle at 78% 22%, rgba(15, 118, 110, .14), transparent 32%);
  box-shadow: 0 24px 70px rgba(16, 24, 40, .09);
}
.landing-copy h1 {
  margin: 16px 0 14px;
  max-width: 820px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: 0;
}
.landing-copy p {
  max-width: 720px;
  margin: 0;
  color: #526071;
  font-size: 17px;
  line-height: 1.8;
}
.landing-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.landing-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(207, 215, 227, .9);
  border-radius: 18px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 20px 50px rgba(16, 24, 40, .08);
}
.flow-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  color: var(--brand);
  border-radius: 12px;
  background: #eef4ff;
  font-weight: 950;
}
.showcase-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.showcase-card strong { font-size: 16px; }
.showcase-card p { margin: 7px 0 0; color: var(--muted); }
.workbench { display: grid; grid-template-columns: minmax(430px, 590px) minmax(0, 1fr); gap: 16px; align-items: start; }
.workbench.wide-left { grid-template-columns: minmax(560px, 720px) minmax(0, 1fr); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #fff, #fbfcfe);
}
[data-collapsible] .card-head { cursor: pointer; }
.card-title { font-size: 15px; font-weight: 950; }
.card-sub { margin-top: 2px; color: #758195; font-size: 12px; line-height: 1.45; }
.card-body { padding: 15px; }
.card.collapsed .card-body { display: none; }
.section-title { margin: 0 0 8px; font-size: 30px; line-height: 1.12; letter-spacing: 0; }
.muted { color: var(--muted); }
.hint { padding: 10px 12px; border: 1px solid #e4e9f2; border-radius: 8px; background: #f8fafc; color: #526071; font-size: 12px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.field.full { grid-column: 1 / -1; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }

.chip, .tag, .score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}
.chip.gray, .tag.gray { color: var(--muted); background: #f2f4f7; }
.chip.green, .tag.green, .score.high { color: var(--green); background: #ecfdf3; }
.tag.warn, .score.mid { color: var(--amber); background: #fffaeb; }
.tag.red, .score.low { color: var(--red); background: #fef3f2; }
.tag.purple { color: var(--purple); background: #f4f3ff; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.metric { min-height: 88px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.metric span { color: var(--muted); font-size: 12px; font-weight: 850; }
.metric strong { display: block; margin-top: 6px; font-size: 28px; line-height: 1; }
.metric small { display: block; margin-top: 8px; color: var(--weak); }

.module-card, .result-card, .template-card, .pricing-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.module-card h3, .result-card h3, .template-card h3, .pricing-card h3 { margin: 0 0 6px; font-size: 15px; }
.module-card p, .result-card p, .template-card p, .pricing-card p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.template-card.active, .result-card.selected { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(23, 92, 211, .1); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
table { width: 100%; min-width: 860px; border-collapse: collapse; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
th { color: var(--muted); background: #f8fafc; font-size: 12px; font-weight: 950; }
tr:last-child td { border-bottom: 0; }
.bar { height: 8px; overflow: hidden; border-radius: 999px; background: #e8edf4; }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--teal)); }

.dropzone { min-height: 150px; display: grid; place-items: center; padding: 16px; text-align: center; border: 1px dashed #aebdcc; border-radius: var(--radius); background: repeating-linear-gradient(135deg, #fbfcfe, #fbfcfe 14px, #f3f6fa 14px, #f3f6fa 28px); transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.dropzone:hover { border-color: var(--brand); background: #eef4ff; box-shadow: inset 0 0 0 1px rgba(23, 92, 211, .08); }
.dropzone strong { display: block; margin-top: 6px; }
.dropzone span { color: var(--muted); font-size: 12px; }
.api-box { min-height: 130px; padding: 12px; white-space: pre-wrap; overflow: auto; border-radius: 9px; background: #111827; color: #dbe7f3; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: none; max-width: 380px; padding: 11px 13px; border-radius: 9px; color: #fff; background: #111827; box-shadow: 0 12px 30px rgba(16, 24, 40, .25); }
.toast.show { display: block; }

.timeline { display: grid; gap: 10px; }
.timeline-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 9px; }
.timeline-dot { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 999px; color: #fff; background: var(--brand); font-size: 12px; font-weight: 950; }



.service-boundary-note {
  display: grid;
  gap: 5px;
  padding: 12px 13px;
  border: 1px solid #dbe7f0;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #f8fbff;
  color: #475467;
  font-size: 12px;
  line-height: 1.65;
}
.service-boundary-note strong {
  color: #1d2939;
  font-size: 13px;
  font-weight: 950;
}
.service-boundary-note a { color: var(--brand); font-weight: 900; }
.compliance-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 18px max(18px, calc((100vw - 1500px) / 2 + 18px));
  border-top: 1px solid var(--line);
  background: #fff;
  color: #667085;
}
.compliance-footer div {
  display: grid;
  gap: 4px;
}
.compliance-footer strong { color: #344054; }
.compliance-footer span { font-size: 12px; }
.compliance-footer nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  font-weight: 850;
}
.compliance-footer a { color: #475467; }
.compliance-footer a:hover { color: var(--brand); }
.legal-page {
  width: min(980px, calc(100% - 34px));
  margin-top: 34px;
}
.legal-hero {
  display: grid;
  gap: 12px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(238,244,255,.95), rgba(255,255,255,.88)),
    radial-gradient(circle at 86% 20%, rgba(15,118,110,.14), transparent 30%);
  box-shadow: var(--shadow);
}
.legal-hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
}
.legal-hero p {
  max-width: 780px;
  margin: 0;
  color: #526071;
  font-size: 16px;
  line-height: 1.8;
}
.legal-hero small { color: var(--muted); font-weight: 850; }
.legal-card { box-shadow: var(--shadow); }
.legal-content {
  padding: 28px;
  color: #344054;
  font-size: 15px;
  line-height: 1.9;
}
.legal-content h2 {
  margin: 22px 0 8px;
  color: #111827;
  font-size: 20px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { margin: 0; }

@media (max-width: 1120px) {
  .layout, .hero, .landing-hero, .workbench, .workbench.wide-left { grid-template-columns: 1fr; }
  .side { position: static; }
  .metric-grid, .grid4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .topbar { align-items: flex-start; flex-direction: column; padding: 12px; }
  .compliance-footer { flex-direction: column; align-items: flex-start; }
  .compliance-footer nav { justify-content: flex-start; }
  .brand { min-width: 0; }
  .top-actions { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .page { width: calc(100% - 20px); margin-top: 10px; }
  .landing-hero { padding: 20px; border-radius: 16px; }
  .grid2, .grid3, .grid4, .metric-grid { grid-template-columns: 1fr; }
}


.page-bottom-note {
  width: min(1500px, calc(100% - 28px));
  margin: 4px auto 18px;
}
