:root {
  --ink: #182125;
  --muted: #617077;
  --paper: #f6f4ef;
  --panel: #fffdf8;
  --line: #d8d2c6;
  --basalt: #2f3a3d;
  --cinnabar: #b84a37;
  --moss: #66785f;
  --amber: #d8a746;
  --blue: #2f6780;
  --focus: #0f6f8d;
  --shadow: 0 16px 40px rgba(38, 41, 36, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(47, 58, 61, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(47, 58, 61, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(360px, 460px) minmax(0, 1fr);
  min-height: 100vh;
}

.intake-panel {
  padding: 28px;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(8px);
}

.brand-strip,
.result-head,
.section-title,
.actions,
.metric-row,
.path-visual,
.output-grid {
  display: flex;
}

.brand-strip,
.result-head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.2;
}

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

.stamp {
  min-width: 76px;
  border: 1px solid var(--basalt);
  padding: 8px 10px;
  text-align: center;
  color: var(--basalt);
  font-weight: 700;
  background: #efe7d6;
}

.intake-form {
  margin-top: 28px;
}

.section-title {
  align-items: center;
  gap: 10px;
  margin: 26px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.section-title:first-child {
  padding-top: 0;
  border-top: 0;
}

.section-title span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--basalt);
  color: var(--basalt);
  font-size: 12px;
  font-weight: 700;
  background: #f0eadf;
}

.section-title h2 {
  font-size: 16px;
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
select {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.actions {
  gap: 10px;
  margin-top: 24px;
}

button {
  height: 40px;
  border: 1px solid var(--basalt);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--ink);
  background: #f0eadf;
  cursor: pointer;
}

button:hover {
  background: #e4dac9;
}

.plan-panel {
  padding: 28px;
  overflow: auto;
}

.result-head {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.score-block {
  min-width: 160px;
  border-left: 4px solid var(--moss);
  padding-left: 14px;
}

.score-block span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.score-block strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

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

.metric {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
  line-height: 1.1;
}

.path-visual {
  position: relative;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ece7dc;
  overflow: hidden;
}

.rail {
  position: absolute;
  left: 9%;
  right: 9%;
  top: 38px;
  height: 2px;
  background: var(--basalt);
}

.stop {
  position: relative;
  z-index: 1;
  width: 24%;
  padding-top: 36px;
  text-align: center;
}

.stop::before {
  content: "";
  position: absolute;
  top: 12px;
  left: calc(50% - 13px);
  width: 26px;
  height: 26px;
  border: 2px solid var(--basalt);
  border-radius: 50%;
  background: var(--panel);
}

.stop.active::before {
  background: var(--amber);
}

.stop span,
.stop small {
  display: block;
}

.stop span {
  font-weight: 700;
}

.stop small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.output-section,
.source-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
}

.output-section ul,
.output-section ol {
  margin: 0;
  padding-left: 19px;
}

.output-section li {
  margin: 9px 0;
  line-height: 1.55;
}

.cost-table {
  display: grid;
  gap: 8px;
}

.cost-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.cost-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.cost-row span {
  color: var(--muted);
}

.cost-row strong {
  text-align: right;
}

.source-strip {
  margin-top: 14px;
  border-left: 4px solid var(--cinnabar);
}

.source-strip p {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.source-strip p:last-child {
  margin-bottom: 0;
}

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

  .intake-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .intake-panel,
  .plan-panel {
    padding: 18px;
  }

  .field-grid,
  .metric-row,
  .output-grid {
    grid-template-columns: 1fr;
  }

  .brand-strip,
  .result-head {
    display: grid;
  }

  .path-visual {
    display: grid;
    gap: 16px;
  }

  .rail {
    display: none;
  }

  .stop {
    width: 100%;
    min-height: 56px;
    padding: 0 0 0 46px;
    text-align: left;
  }

  .stop::before {
    left: 4px;
    top: 2px;
  }
}
