:root {
  --bg-0: #eef2f7;
  --bg-1: #e8edf5;
  --bg-2: #e2e9f2;
  --bg-3: #d9e2ef;
  --card: #ffffff;
  --card-soft: #f8fbff;
  --card-line: #d5deea;
  --card-line-strong: #c3d0df;
  --text-main: #1d2b3f;
  --text-sub: #607388;
  --title: #132034;
  --brand: #2f6d9b;
  --brand-dark: #25557b;
  --accent: #2f9d8f;
  --warn: #e3b24b;
  --danger: #de6b73;
  --safe: #4cae74;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  font-family: "HarmonyOS Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 8% -10%, rgba(47, 109, 155, 0.14), transparent 36%),
    radial-gradient(circle at 100% 0%, rgba(47, 157, 143, 0.1), transparent 34%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1) 44%, var(--bg-2) 72%, var(--bg-3));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
  background-image:
    linear-gradient(rgba(120, 147, 176, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 147, 176, 0.12) 1px, transparent 1px);
  background-size: 30px 30px;
}

.page {
  position: relative;
  width: min(1180px, 94vw);
  margin: 24px auto 40px;
  display: grid;
  gap: 14px;
}

.hero,
.card {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--card-line);
  background: var(--card);
  box-shadow: 0 10px 26px rgba(44, 68, 97, 0.12);
  animation: rise 0.45s ease both;
  overflow: hidden;
}

.hero::before,
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background: linear-gradient(125deg, rgba(86, 127, 172, 0.08), transparent 32%, rgba(47, 157, 143, 0.06));
}

.hero {
  padding: 24px 26px;
  color: #eef5ff;
  border-color: rgba(255, 255, 255, 0.15);
  background:
    linear-gradient(130deg, #223f5e, #2f5a82 56%, #36607f),
    radial-gradient(circle at 86% 14%, rgba(198, 224, 255, 0.24), transparent 36%);
}

.hero::after {
  content: "";
  position: absolute;
  right: -52px;
  top: -56px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  border: 1px solid rgba(210, 229, 255, 0.25);
  box-shadow: inset 0 0 35px rgba(186, 216, 255, 0.12);
  pointer-events: none;
}

.eyebrow {
  margin: 0;
  font-size: 0.76rem;
  color: #d7e8ff;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.hero h1 {
  margin: 10px 0 8px;
  color: #f6faff;
  font-size: clamp(1.62rem, 1.38rem + 1vw, 2.28rem);
  letter-spacing: 0.01em;
}

.hero-desc {
  margin: 0;
  color: #dbe9fb;
}

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

.hero-tags span {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(213, 230, 255, 0.32);
  background: rgba(255, 255, 255, 0.11);
  color: #eff6ff;
  font-size: 0.84rem;
}

.hero-grid {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.hero-grid div {
  border: 1px solid rgba(218, 232, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
}

.hero-grid p {
  margin: 0;
  color: #d3e5fb;
  font-size: 0.74rem;
}

.hero-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 0.9rem;
}

.card {
  padding: 18px 20px;
}

.card-head {
  margin-bottom: 12px;
}

.card-head h2 {
  margin: 0 0 4px;
  color: var(--title);
  font-size: 1.16rem;
}

.card-head p {
  margin: 0;
  color: var(--text-sub);
  font-size: 0.91rem;
}

.grid {
  display: grid;
  gap: 11px;
}

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

.is-hidden {
  display: none !important;
}

.span-3 {
  grid-column: 1 / -1;
}

.art-panel {
  border: 1px solid var(--card-line);
  border-radius: 12px;
  background: var(--card-soft);
  padding: 12px;
}

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

label {
  display: grid;
  gap: 6px;
  font-size: 0.91rem;
  color: var(--text-sub);
}

label span {
  color: #546b83;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--card-line-strong);
  background: #ffffff;
  color: var(--text-main);
  padding: 10px 11px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(47, 109, 155, 0.62);
  box-shadow: 0 0 0 3px rgba(47, 109, 155, 0.14);
}

textarea {
  min-height: 118px;
  resize: vertical;
  margin-top: 12px;
}

input[readonly] {
  background: #f3f8ff;
  border-color: rgba(47, 109, 155, 0.4);
  color: #2b5b82;
  font-weight: 700;
}

.action-row {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.formula-note,
.action-row p {
  margin: 0;
  color: var(--text-sub);
  font-size: 0.85rem;
}

.formula-note {
  margin-top: 10px;
}

button {
  min-height: 44px;
  border: none;
  border-radius: 10px;
  padding: 11px 22px;
  color: #f7fbff;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  background: linear-gradient(120deg, var(--brand), var(--brand-dark));
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(37, 85, 123, 0.28);
}

.error-card {
  border-color: rgba(222, 107, 115, 0.45);
  background: #fff4f5;
}

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

.kpi {
  border-radius: 12px;
  border: 1px solid var(--card-line);
  background: var(--card-soft);
  padding: 10px 12px;
}

.kpi-label {
  margin: 0;
  color: var(--text-sub);
  font-size: 0.8rem;
}

.kpi-value {
  margin: 4px 0 0;
  color: var(--title);
  font-size: 1.08rem;
  font-weight: 700;
}

.tier-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tier-filter {
  border: 1px solid var(--card-line-strong);
  border-radius: 999px;
  padding: 7px 14px;
  min-height: 38px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #3b526d;
  background: #f3f8ff;
  cursor: pointer;
}

.tier-filter:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(47, 109, 155, 0.48);
}

.tier-filter.active {
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(44, 68, 97, 0.18);
}

.tier-filter.active.crash {
  background: linear-gradient(120deg, #e58a65, #d76577);
}

.tier-filter.active.steady {
  color: #5c4300;
  background: linear-gradient(120deg, #f3d27f, var(--warn));
}

.tier-filter.active.safe {
  color: #154d2d;
  background: linear-gradient(120deg, #9ad8b1, var(--safe));
}

.tier-filter.active[data-tier-filter="全部"] {
  background: linear-gradient(120deg, var(--brand), var(--brand-dark));
  color: #f6fbff;
}

.tier-filter-status {
  margin: 8px 0 0;
  color: var(--text-sub);
  font-size: 0.88rem;
}

.prob-guide {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.guide-item {
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid var(--card-line);
  background: #fbfdff;
}

.guide-item p {
  margin: 0;
  color: #4f6f93;
  font-size: 0.74rem;
}

.guide-item strong {
  display: block;
  margin: 2px 0;
  color: #203247;
  font-size: 0.9rem;
}

.guide-item span {
  color: var(--text-sub);
  font-size: 0.78rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--card-line);
  border-radius: 12px;
  background: #ffffff;
}

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

th,
td {
  padding: 10px 12px;
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(195, 208, 223, 0.6);
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f1f6fc;
  color: #365171;
  font-weight: 700;
}

tbody tr:nth-child(odd) {
  background: #f9fbfe;
}

tbody tr:hover {
  background: #edf4fc;
}

tbody tr.is-row-hidden {
  display: none;
}

.prob-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  border-radius: 999px;
  border: 1px solid rgba(95, 131, 170, 0.42);
  background: #f0f6ff;
  color: #284866;
  padding: 3px 10px;
  cursor: help;
}

.prob-chip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: 228px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(27, 45, 66, 0.96);
  border: 1px solid rgba(162, 188, 217, 0.4);
  color: #eff6ff;
  font-size: 0.77rem;
  line-height: 1.35;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 10px 20px rgba(15, 25, 38, 0.32);
  transition: opacity 0.12s ease;
  z-index: 4;
}

.prob-chip:hover::after {
  opacity: 1;
}

.tier-pill {
  display: inline-flex;
  min-width: 34px;
  justify-content: center;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.82rem;
  font-weight: 700;
}

.tier-crash {
  color: #fff7f7;
  background: #d87079;
}

.tier-steady {
  color: #5e4100;
  background: #f1c96d;
}

.tier-safe {
  color: #174d2d;
  background: #8ecea5;
}

.empty {
  color: var(--text-sub);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .span-3 {
    grid-column: auto;
  }

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

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

  .prob-guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  body::before,
  .hero::after {
    display: none;
  }

  .hero-tags,
  .tier-row {
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 4px;
  }

  .hero-tags span,
  .tier-filter {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .table-wrap {
    overflow: visible;
    border: none;
    background: transparent;
  }

  table {
    min-width: 0;
    width: 100%;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 10px;
  }

  tbody tr {
    display: block;
    border: 1px solid var(--card-line);
    border-radius: 12px;
    background: #ffffff;
    padding: 8px;
  }

  tbody tr:nth-child(odd),
  tbody tr:hover {
    background: #ffffff;
  }

  td {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    border-bottom: 1px dashed rgba(195, 208, 223, 0.8);
    padding: 7px 6px;
    font-size: 0.88rem;
  }

  td:last-child {
    border-bottom: none;
  }

  td::before {
    content: attr(data-label);
    color: var(--text-sub);
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .prob-chip {
    justify-self: start;
  }
}

@media (max-width: 680px) {
  .page {
    width: 95vw;
    margin-top: 14px;
    margin-bottom: 24px;
  }

  .hero,
  .card {
    border-radius: 14px;
    padding: 14px;
  }

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

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

  .prob-guide {
    grid-template-columns: 1fr;
  }

  .action-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

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