:root {
  --bg: #f4f6f7;
  --panel: #ffffff;
  --ink: #162126;
  --muted: #5c6970;
  --line: #d8e0e3;
  --teal: #008c95;
  --teal-dark: #00656d;
  --red: #d83a32;
  --steel: #66767e;
  --shadow: 0 12px 30px rgba(18, 31, 38, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 40px;
  background: #11191d;
  color: #fff;
}

.brand {
  font-size: 13px;
  color: #8bd6dc;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 3px;
  font-size: 24px;
  font-weight: 760;
}

.source {
  color: #c8d1d5;
  font-size: 13px;
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px 28px 36px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  min-height: 300px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 42px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.eyebrow {
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
}

.hero h2 {
  max-width: 720px;
  font-size: 38px;
  line-height: 1.16;
  font-weight: 780;
}

.hero p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.72;
}

.hero-visual {
  min-height: 300px;
  overflow: hidden;
  background: #eef2f3;
  border-left: 1px solid var(--line);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  border: 1px solid var(--line);
  background: var(--line);
}

.guide-step {
  min-height: 106px;
  display: flex;
  gap: 16px;
  padding: 22px;
  background: #fff;
}

.guide-step span {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--teal);
  font-weight: 700;
}

.guide-step strong {
  display: block;
  margin-bottom: 7px;
}

.guide-step p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.selector {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  margin-top: 22px;
}

.filters,
.results {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.filters {
  align-self: start;
  position: sticky;
  top: 16px;
  padding: 20px;
}

.filter-head,
.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.filter-head h2,
.result-head h2 {
  font-size: 20px;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

button:hover {
  border-color: var(--teal);
}

#resetBtn {
  height: 34px;
  padding: 0 12px;
  color: var(--teal-dark);
  font-weight: 700;
}

.field {
  display: block;
  margin-top: 20px;
}

.field > span,
.sorter span {
  display: block;
  margin-bottom: 9px;
  color: #3e4d54;
  font-size: 13px;
  font-weight: 700;
}

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

input:focus,
select:focus {
  outline: 2px solid rgba(0, 140, 149, 0.22);
  border-color: var(--teal);
}

.quick-torque {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.quick-torque button,
.scenario-list button {
  min-height: 34px;
  color: var(--steel);
}

.scenario-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.scenario-list button {
  text-align: left;
  padding: 0 10px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.segmented button {
  min-height: 38px;
  padding: 0 10px;
  text-align: left;
}

.segmented button.active {
  border-color: var(--teal);
  background: #e8f7f8;
  color: var(--teal-dark);
  font-weight: 700;
}

.checks {
  display: grid;
  gap: 9px;
}

.checks label {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.checks input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.results {
  min-width: 0;
  padding: 22px;
}

.result-head {
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.result-head p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
}

.sorter {
  min-width: 190px;
}

#count {
  color: var(--teal-dark);
}

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

.rec {
  padding: 14px;
  border-left: 4px solid var(--teal);
  background: #f7fbfc;
}

.rec strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.rec span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.tool-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 16px;
}

.tool-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.type {
  font-size: 16px;
  font-weight: 760;
  line-height: 1.35;
  word-break: break-word;
}

.badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: #fff;
  background: var(--teal);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.badge.ec {
  background: var(--steel);
}

.badge small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  opacity: 0.82;
}

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

.spec {
  padding: 10px;
  background: #f6f8f9;
}

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

.spec strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag {
  padding: 5px 8px;
  background: #eef2f3;
  color: #46565d;
  font-size: 12px;
}

.empty {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed #aab6bb;
  color: var(--muted);
  background: #fafcfc;
  padding: 28px;
}

footer {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 0 28px 32px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .topbar,
  .hero,
  .guide,
  .selector {
    display: block;
  }

  .topbar {
    padding: 16px 20px;
  }

  main {
    padding: 18px 16px 28px;
  }

  .hero-copy {
    padding: 28px 22px;
  }

  .hero h2 {
    font-size: 28px;
  }

  .hero-visual {
    min-height: 180px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .guide-step + .guide-step {
    border-top: 1px solid var(--line);
  }

  .filters {
    position: static;
    margin-bottom: 18px;
  }

  .result-head {
    display: block;
  }

  .sorter {
    display: block;
    margin-top: 14px;
  }

  .recommendations {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .specs,
  .quick-torque {
    grid-template-columns: 1fr;
  }
}
