:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #586574;
  --line: #d8e0e8;
  --surface: #ffffff;
  --wash: #f4f7fb;
  --blue: #1f5eff;
  --blue-soft: #e8efff;
  --green: #19764a;
  --amber: #9a5a00;
  --red: #b63737;
  --shadow: 0 16px 34px rgba(27, 45, 70, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--wash);
  color: var(--ink);
  font-family:
    Inter, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand-mark::before {
  width: 11px;
  height: 28px;
  margin-right: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1f5eff, #1a8f62);
  content: "";
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav-links a {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  border-color: rgba(31, 94, 255, 0.28);
  background: var(--blue-soft);
  color: var(--blue);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.eyebrow,
.label {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(1.65rem, 3vw, 2.65rem);
  line-height: 1.08;
}

h2 {
  margin-bottom: 10px;
  font-size: 1.55rem;
  line-height: 1.18;
}

h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.lede {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  white-space: nowrap;
}

.status-strip span {
  color: var(--muted);
  font-size: 0.9rem;
}

.status-strip strong {
  color: var(--green);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.control-panel,
.summary-band,
.metric-grid article,
.output-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.control-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 15px;
  padding: 18px;
}

.field {
  display: grid;
  gap: 7px;
}

label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

select,
input[type="number"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.primary-btn,
.secondary-btn {
  min-height: 44px;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.primary-btn {
  border: 0;
  background: var(--blue);
  color: #fff;
}

.secondary-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.primary-btn:hover,
.secondary-btn:hover {
  filter: brightness(0.97);
}

.output-area {
  display: grid;
  gap: 16px;
}

.summary-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  gap: 18px;
  align-items: stretch;
  min-height: 202px;
  padding: 22px;
}

.summary-band p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.signal-panel {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 154px;
  border-radius: 8px;
  background: var(--blue-soft);
  padding: 18px;
}

.signal-panel span {
  color: var(--muted);
  font-weight: 800;
}

.signal-panel strong {
  color: var(--blue);
  font-size: 2rem;
  line-height: 1;
}

.signal-panel small {
  color: var(--muted);
  line-height: 1.5;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-grid article {
  min-height: 86px;
  padding: 14px;
}

.metric-grid span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.88rem;
}

.metric-grid strong {
  display: block;
  color: var(--amber);
  font-size: 1.24rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.output-card {
  min-height: 210px;
  padding: 18px;
}

.output-card p,
.output-card li {
  color: var(--muted);
  line-height: 1.7;
}

.output-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 19px;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
}

#copyState {
  color: var(--green);
  font-weight: 700;
}

.danger {
  color: var(--red);
}

.public-shell {
  max-width: 1180px;
}

.entry-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.66fr);
  gap: 22px;
  align-items: stretch;
  min-height: 470px;
  margin-bottom: 18px;
}

.entry-copy {
  display: grid;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(232, 239, 255, 0.82), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at 20% 18%, rgba(31, 94, 255, 0.13), transparent 28%);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 54px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.assistant-preview {
  display: grid;
  align-content: space-between;
  gap: 16px;
  border: 1px solid #263241;
  border-radius: 8px;
  background: #101820;
  box-shadow: var(--shadow);
  color: #e7edf5;
  padding: 18px;
}

.preview-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #2bd179;
  box-shadow: 0 0 0 5px rgba(43, 209, 121, 0.14);
}

.preview-message {
  border: 1px solid rgba(216, 224, 232, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
}

.preview-message span {
  display: block;
  margin-bottom: 8px;
  color: #95a6ba;
  font-size: 0.82rem;
  font-weight: 800;
}

.preview-message p {
  margin-bottom: 0;
  color: #e7edf5;
  line-height: 1.65;
}

.preview-message.answer {
  background: rgba(43, 209, 121, 0.08);
}

.preview-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.preview-metrics div {
  min-height: 78px;
  border: 1px solid rgba(216, 224, 232, 0.14);
  border-radius: 8px;
  padding: 12px;
}

.preview-metrics strong,
.preview-metrics span {
  display: block;
}

.preview-metrics strong {
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1;
}

.preview-metrics span {
  margin-top: 8px;
  color: #95a6ba;
  font-size: 0.8rem;
}

.section-band,
.table-section,
.admin-header {
  margin-top: 16px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

.feature-grid,
.pricing-grid,
.task-list,
.admin-grid,
.file-grid {
  display: grid;
  gap: 12px;
}

.feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-card {
  min-height: 160px;
}

.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-card {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.price-card.featured {
  border-color: rgba(31, 94, 255, 0.4);
  background: linear-gradient(180deg, #ffffff, #eef4ff);
}

.price-card span,
.price-card p,
.price-card li {
  color: var(--muted);
  line-height: 1.65;
}

.price-card strong {
  display: block;
  margin: 10px 0;
  color: var(--blue);
  font-size: 2rem;
  line-height: 1;
}

.price-card ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}

.task-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.task-item {
  position: relative;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.task-item pre {
  margin: 0;
  white-space: pre-wrap;
  color: var(--muted);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.65;
}

.icon-copy {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
  color: var(--blue);
  cursor: pointer;
  font-weight: 800;
}

.boundary-band {
  display: grid;
  grid-template-columns: minmax(240px, 0.5fr) minmax(0, 1fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff7ec;
  padding: 22px;
}

.boundary-list,
.plain-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
}

.boundary-list li,
.muted-text,
.plain-list li {
  color: var(--muted);
  line-height: 1.65;
}

.apply-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.52fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.apply-form {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  resize: vertical;
}

#leadState {
  min-height: 22px;
  color: var(--green);
  font-weight: 800;
}

.admin-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.wide-card {
  grid-column: 1 / -1;
}

.status-bars {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
}

.bar-row span,
.bar-row strong {
  color: var(--muted);
  font-size: 0.9rem;
}

.bar-row div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--blue-soft);
}

.bar-row i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
}

.file-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.file-input {
  display: grid;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px;
}

.file-input input {
  max-width: 100%;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

td {
  color: var(--ink);
  font-size: 0.92rem;
}

tr:last-child td {
  border-bottom: 0;
}

.split-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 900px) {
  .topbar,
  .workspace,
  .summary-band,
  .metric-grid,
  .output-grid,
  .entry-hero,
  .feature-grid,
  .pricing-grid,
  .task-list,
  .boundary-band,
  .apply-layout,
  .admin-header,
  .admin-grid,
  .file-grid,
  .split-tables {
    grid-template-columns: 1fr;
  }

  .control-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 1200px);
    padding-top: 18px;
  }

  .status-strip {
    width: 100%;
    justify-content: space-between;
  }

  .site-nav,
  .action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-links {
    justify-content: stretch;
  }

  .nav-links a {
    flex: 1;
    text-align: center;
  }

  .secondary-btn {
    width: 100%;
  }
}
