:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --ink: #161716;
  --muted: #6d716b;
  --line: rgba(22, 23, 22, 0.12);
  --panel: rgba(255, 255, 252, 0.72);
  --panel-strong: rgba(255, 255, 252, 0.92);
  --green: #10a37f;
  --green-dark: #08765c;
  --blue: #477bff;
  --amber: #d98916;
  --red: #cb3a31;
  --shadow: 0 24px 80px rgba(31, 35, 31, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 16%, rgba(16, 163, 127, 0.13), transparent 34rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(232, 228, 217, 0.54)),
    var(--bg);
}

a {
  color: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
}

.mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-strong);
  box-shadow: 0 10px 24px rgba(20, 23, 20, 0.08);
}

.mark span {
  width: 16px;
  height: 16px;
  border: 2px solid var(--green);
  border-radius: 50%;
  box-shadow:
    10px 0 0 -7px var(--green-dark),
    -10px 0 0 -7px var(--green-dark),
    0 10px 0 -7px var(--green-dark),
    0 -10px 0 -7px var(--green-dark);
}

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

h1 {
  font-size: clamp(1.45rem, 3.8vw, 2.65rem);
  font-weight: 650;
  letter-spacing: 0;
}

.hero {
  display: grid;
  justify-items: center;
  gap: 24px;
  padding: clamp(44px, 8vw, 82px) 0 34px;
}

.score-wrap {
  display: grid;
  place-items: center;
  width: min(72vw, 340px);
  aspect-ratio: 1;
}

.score-ring {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(var(--ring-color, var(--green)) calc(var(--score) * 1%), rgba(22, 23, 22, 0.08) 0),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(241, 239, 231, 0.86));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    var(--shadow);
  transition: background 700ms ease, transform 500ms ease;
}

.score-ring.is-loading {
  animation: pulse 1.4s ease-in-out infinite;
}

.score-inner {
  display: grid;
  place-items: center;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 245, 239, 0.9));
  border: 1px solid rgba(22, 23, 22, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  padding: 28px;
  text-align: center;
}

.score-label,
.score-inner span:last-child,
.eyebrow,
.metrics span,
.check-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.score-inner strong {
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 680;
  line-height: 0.96;
  letter-spacing: 0;
}

.score-inner span:last-child {
  font-weight: 650;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 168px;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: #121412;
  color: #fff;
  font: inherit;
  font-weight: 620;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(18, 20, 18, 0.2);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  background: #202420;
  box-shadow: 0 18px 34px rgba(18, 20, 18, 0.22);
}

.primary-btn:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.btn-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(16, 163, 127, 0.16);
}

.intro {
  width: min(760px, 100%);
  color: #4c514b;
  font-size: clamp(0.96rem, 2.2vw, 1.08rem);
  line-height: 1.85;
  text-align: center;
}

.network-preview {
  display: grid;
  justify-items: center;
  gap: 5px;
  width: min(680px, 100%);
  border: 1px solid rgba(22, 23, 22, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  padding: 16px 18px;
  text-align: center;
  box-shadow: 0 18px 48px rgba(31, 35, 31, 0.07);
}

.network-preview span {
  color: var(--muted);
  font-size: 0.86rem;
}

.network-preview p {
  display: none;
}

.network-preview strong {
  color: var(--ink);
  font-size: clamp(1.15rem, 2.8vw, 1.55rem);
  font-weight: 720;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(31, 35, 31, 0.08);
  backdrop-filter: blur(20px);
}

.results {
  display: grid;
  gap: 22px;
  padding: clamp(20px, 4vw, 30px);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin-bottom: 6px;
  font-weight: 700;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  font-weight: 650;
}

.pill {
  flex: 0 0 auto;
  border: 1px solid rgba(16, 163, 127, 0.2);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(16, 163, 127, 0.1);
  color: var(--green-dark);
  font-size: 0.84rem;
  font-weight: 700;
}

.risk-grid {
  display: grid;
  gap: 10px;
}

.risk-grid article {
  min-width: 0;
  border: 1px solid rgba(22, 23, 22, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

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

.risk-grid article {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px;
}

.service-dot {
  display: block;
  width: 12px;
  height: 12px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--green);
}

.service-dot.claude {
  background: #b36b45;
}

.service-dot.gemini {
  background: var(--blue);
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 700;
}

.risk-grid p,
.sources p {
  color: #555b54;
  line-height: 1.65;
}

.risk-grid p {
  display: grid;
  gap: 8px;
}

.service-score {
  color: var(--ink);
  font-size: 2.2rem;
  font-weight: 760;
  line-height: 1;
}

.service-level {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
}

.service-bar {
  display: block;
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(22, 23, 22, 0.09);
}

.service-bar i {
  display: block;
  width: calc(var(--service-score) * 1%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #35b8ff);
}

.service-note,
.service-cuts {
  display: block;
  color: #555b54;
  font-size: 0.9rem;
  line-height: 1.55;
}

.service-cuts {
  color: var(--muted);
  font-size: 0.82rem;
}

.factor-list {
  display: grid;
  gap: 10px;
}

.factor {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(22, 23, 22, 0.08);
  padding-top: 12px;
}

.factor-badge {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(16, 163, 127, 0.12);
  color: var(--green-dark);
  font-weight: 800;
}

.factor strong {
  display: block;
  margin-bottom: 2px;
}

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

.factor em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.detail-section {
  display: grid;
  gap: 14px;
  padding-top: 8px;
}

.score-first {
  padding-top: 0;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(22, 23, 22, 0.08);
  padding-top: 18px;
}

.section-title h2 {
  font-size: clamp(1.08rem, 2.2vw, 1.35rem);
}

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

.check-card {
  min-width: 0;
  border: 1px solid rgba(22, 23, 22, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  padding: 15px;
}

.check-card strong {
  display: block;
  margin: 7px 0 8px;
  overflow-wrap: anywhere;
}

.check-card p {
  color: #555b54;
  font-size: 0.92rem;
  line-height: 1.55;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 760;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status.good {
  background: rgba(16, 163, 127, 0.11);
  color: var(--green-dark);
}

.status.warn {
  background: rgba(217, 137, 22, 0.13);
  color: #9b5f08;
}

.status.bad {
  background: rgba(203, 58, 49, 0.12);
  color: #9e241d;
}

.status.info {
  background: rgba(71, 123, 255, 0.11);
  color: #315ed0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(22, 23, 22, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.score-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

.score-table th,
.score-table td {
  border-bottom: 1px solid rgba(22, 23, 22, 0.08);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.score-table th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.score-table td {
  color: #3e443f;
  line-height: 1.45;
}

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

.delta {
  display: inline-flex;
  min-width: 48px;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 800;
}

.delta.plus {
  background: rgba(16, 163, 127, 0.12);
  color: var(--green-dark);
}

.delta.minus {
  background: rgba(203, 58, 49, 0.12);
  color: #9e241d;
}

.delta.zero {
  background: rgba(22, 23, 22, 0.08);
  color: var(--muted);
}

.score-progress {
  display: grid;
  gap: 7px;
  min-width: 150px;
}

.score-progress strong {
  font-size: 0.92rem;
}

.score-track {
  display: block;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(22, 23, 22, 0.09);
}

.score-track i {
  display: block;
  width: calc(var(--row-score) * 1%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #35b8ff);
}

.score-detail {
  display: grid;
  gap: 8px;
}

.score-detail strong {
  color: var(--ink);
}

.score-detail span {
  color: var(--muted);
  font-size: 0.88rem;
}

.comparison-list {
  display: grid;
  gap: 6px;
}

.comparison-row {
  display: grid;
  grid-template-columns: 128px minmax(130px, 1fr) minmax(110px, 0.8fr);
  align-items: center;
  gap: 10px;
  border-radius: 6px;
  background: rgba(22, 23, 22, 0.045);
  padding: 7px 9px;
}

.comparison-row b {
  color: var(--ink);
  font-size: 0.86rem;
}

.comparison-row span,
.comparison-row em {
  color: var(--muted);
  font-size: 0.84rem;
  font-style: normal;
  overflow-wrap: anywhere;
}

.advice-panel {
  display: grid;
  gap: 14px;
}

.advice-list {
  display: grid;
  gap: 10px;
}

.advice-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  border: 1px solid rgba(22, 23, 22, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  padding: 15px;
}

.severity {
  align-self: start;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.severity.high {
  background: rgba(203, 58, 49, 0.12);
  color: #9e241d;
}

.severity.medium {
  background: rgba(217, 137, 22, 0.13);
  color: #9b5f08;
}

.severity.low {
  background: rgba(16, 163, 127, 0.11);
  color: var(--green-dark);
}

.advice-item strong {
  display: block;
  margin-bottom: 4px;
}

.advice-item p {
  color: #555b54;
  line-height: 1.55;
}

.sources {
  margin-top: 18px;
  padding: 18px;
}

.credits {
  margin-top: 16px;
  color: rgba(22, 23, 22, 0.42);
  font-size: 0.82rem;
  text-align: center;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.source-links a {
  border: 1px solid rgba(22, 23, 22, 0.1);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.56);
  color: #2f3430;
  font-size: 0.9rem;
  text-decoration: none;
}

@keyframes pulse {
  50% {
    transform: scale(0.985);
  }
}

@media (max-width: 820px) {
  .risk-grid,
  .check-grid {
    grid-template-columns: 1fr 1fr;
  }

  .risk-grid article:last-child {
    grid-column: 1 / -1;
  }
}

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

  .topbar {
    justify-content: flex-start;
  }

  .hero {
    gap: 20px;
    padding-top: 34px;
  }

  .score-wrap {
    width: min(86vw, 320px);
  }

  .risk-grid,
  .check-grid {
    grid-template-columns: 1fr;
  }

  .risk-grid article:last-child {
    grid-column: auto;
  }

  .panel-head,
  .factor,
  .advice-item {
    grid-template-columns: 1fr;
  }

  .comparison-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .panel-head {
    display: grid;
  }
}
