:root {
  --card: rgba(255, 250, 240, .86);
  --ink: #20231f;
  --muted: #69645b;
  --line: rgba(47, 38, 26, .14);
  --red: #a8322d;
  --jade: #23685c;
  --gold: #b9852c;
  --blue: #29486f;
  --plum: #6f3f63;
  --shadow: 0 16px 36px rgba(52, 34, 17, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  background:
    radial-gradient(circle at 8% 10%, rgba(184, 133, 44, .18), transparent 26rem),
    radial-gradient(circle at 92% 16%, rgba(35, 104, 92, .14), transparent 24rem),
    linear-gradient(150deg, #fbf7ef 0%, #f1e0c4 52%, #eaf0ec 100%);
  letter-spacing: 0;
}

a, button, select, input { font: inherit; }
a { color: inherit; }

.tool-shell {
  width: min(1100px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 44px;
}

.tool-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 900;
}

.brand span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #fffaf0;
  border: 1px solid rgba(168, 50, 45, .24);
  color: var(--red);
}

nav, .action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

nav a, .ghost-link, .primary-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, .72);
  text-decoration: none;
  font-weight: 800;
}

.primary-link {
  border-color: var(--red);
  background: var(--red);
  color: white;
}

.hero {
  padding: clamp(24px, 5vw, 46px);
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(32, 35, 31, .86), rgba(32, 35, 31, .48)),
    repeating-linear-gradient(45deg, rgba(255, 250, 240, .06) 0 11px, transparent 11px 22px),
    linear-gradient(135deg, #5d241f, #1f5b51 58%, #263f61);
  color: #fffaf0;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: #d9af66;
  font-size: 14px;
  font-weight: 900;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 14px;
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.1;
}

.hero p:last-child {
  max-width: 800px;
  margin-bottom: 0;
  color: rgba(255, 250, 240, .86);
  font-size: 19px;
  line-height: 1.75;
}

.panel {
  margin-top: 16px;
  padding: clamp(18px, 4vw, 28px);
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

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

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

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

select, input {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fffaf0;
  padding: 0 12px;
}

button, .primary, .ghost {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
}

.primary {
  background: var(--red);
  color: #fff;
}

.ghost {
  background: #fffaf0;
  border-color: var(--line);
  color: var(--ink);
}

.progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fffaf0;
  margin: 12px 0 18px;
}

.progress div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--jade));
  transition: width .2s ease;
}

.meta-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
}

.options {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.option {
  width: 100%;
  min-height: 58px;
  padding: 13px 15px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fffaf0;
  text-align: left;
  cursor: pointer;
}

.option.is-selected, .chip.is-active {
  border-color: rgba(168, 50, 45, .45);
  box-shadow: 0 10px 20px rgba(100, 60, 20, .1);
}

.score-grid, .card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.score-grid div, .card {
  padding: 16px;
  border-radius: 8px;
  background: #fffaf0;
  border: 1px solid var(--line);
}

.score-grid strong {
  display: block;
  color: var(--red);
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1;
}

.score-grid span, .chip {
  color: var(--muted);
  font-weight: 800;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffaf0;
  padding: 0 12px;
  cursor: pointer;
}

.list {
  display: grid;
  gap: 12px;
}

.list-item {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fffaf0;
}

.list-item strong {
  color: var(--jade);
}

.knowledge-box {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(35, 104, 92, .16);
  background: rgba(35, 104, 92, .07);
}

.knowledge-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.knowledge-box span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-right: 8px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fffaf0;
  color: var(--jade);
  font-size: 13px;
  font-weight: 900;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
}

@media (max-width: 860px) {
  .control-grid, .score-grid, .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .tool-header, .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .hero p:last-child {
    font-size: 17px;
  }

  .action-row > *, .primary-link, .ghost-link {
    width: 100%;
  }
}
