:root {
  color-scheme: light;
  --ink: #14213d;
  --muted: #667085;
  --line: #dfe5ef;
  --surface: #ffffff;
  --soft: #f3f6fb;
  --blue: #2457d6;
  --blue-dark: #173e9f;
  --teal: #0f8f83;
  --success: #138a55;
  --warning: #a45f08;
  --shadow: 0 20px 60px rgba(30, 55, 100, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(36, 87, 214, 0.12), transparent 27rem),
    radial-gradient(circle at 88% 20%, rgba(15, 143, 131, 0.1), transparent 24rem),
    #f7f9fc;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 36px;
}

.hero {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 30px;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 78px;
  height: 78px;
  border-radius: 22px;
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(145deg, var(--blue), var(--teal));
  box-shadow: 0 14px 28px rgba(36, 87, 214, 0.25);
}

.eyebrow, .account-label {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(32px, 5vw, 50px); line-height: 1.08; letter-spacing: -0.04em; }
.subtitle { margin-bottom: 0; color: var(--muted); font-size: 17px; line-height: 1.75; }

.search-card, .result-card {
  border: 1px solid rgba(212, 220, 233, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-card { padding: 28px; }
.search-copy h2 { margin-bottom: 6px; font-size: 22px; }
.search-copy p { margin-bottom: 20px; color: var(--muted); }

.query-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.input-wrap { position: relative; }
.at {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blue);
  font-weight: 800;
}

input {
  width: 100%;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 18px 0 42px;
  color: var(--ink);
  background: var(--soft);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(36, 87, 214, 0.12); }
button {
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  padding: 0 22px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.query-form button {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 10px 24px rgba(36, 87, 214, 0.24);
}

button:hover { transform: translateY(-1px); }
button:disabled { cursor: wait; opacity: 0.7; transform: none; }

.recent { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.recent-list { display: flex; flex-wrap: wrap; gap: 8px; }
.recent-list button { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--blue-dark); background: #fff; font-size: 13px; }

.status { min-height: 62px; display: grid; place-items: center; color: var(--muted); text-align: center; }
.status.error { color: #b42318; }
.status.loading::before {
  content: "";
  width: 22px;
  height: 22px;
  margin-right: 10px;
  border: 3px solid #dce5fa;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.status.loading { display: flex; justify-content: center; }
@keyframes spin { to { transform: rotate(360deg); } }

.result-card { padding: 32px; animation: reveal 260ms ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }
.result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.identity { display: flex; align-items: center; gap: 16px; }
.avatar { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; color: #fff; font-size: 20px; font-weight: 800; background: linear-gradient(145deg, var(--blue), var(--teal)); }
.identity h2 { margin-bottom: 4px; font-size: 28px; }
.checked-at { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.badge { display: inline-flex; align-items: center; min-height: 36px; border-radius: 999px; padding: 0 14px; color: var(--blue-dark); background: #eaf0ff; font-size: 13px; font-weight: 800; }
.badge.done { color: #08643d; background: #dcf8e9; }

.progress-block { margin-top: 32px; }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: 14px; }
.progress-meta strong { color: var(--ink); }
.progress-track { height: 14px; overflow: hidden; border-radius: 999px; background: #e9edf4; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--teal)); transition: width 500ms cubic-bezier(.2,.8,.2,1); }
.primary-metric { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 26px; }
.primary-metric span { font-size: clamp(42px, 8vw, 68px); font-weight: 850; letter-spacing: -0.055em; }
.primary-metric small { color: var(--muted); font-size: 18px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.metrics article { min-height: 116px; border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: var(--soft); }
.metrics p { margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.metrics strong { font-size: 22px; }
.result-actions { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.secondary { color: var(--blue-dark); background: #eaf0ff; }
footer { padding: 26px 8px 0; color: var(--muted); font-size: 12px; text-align: center; }
footer p { margin-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.installer-shell { max-width: 860px; }
.install-result { text-align: center; }
.primary-link { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; border-radius: 14px; padding: 0 22px; color: #fff; text-decoration: none; font-weight: 750; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); }
.requirement-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0 24px; }
.requirement { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--soft); }
.requirement span { border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 800; }
.requirement.passed span { color: #08643d; background: #dcf8e9; }
.requirement.failed span { color: #9b1c1c; background: #fee4e2; }
.install-errors { margin: 18px 0; border: 1px solid #f3b6b2; border-radius: 14px; padding: 14px 16px; color: #9b1c1c; background: #fff1f0; }
.install-errors p { margin: 0 0 6px; }
.install-errors p:last-child { margin-bottom: 0; }
.install-form { display: grid; gap: 20px; }
.form-section { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; border-top: 1px solid var(--line); padding-top: 20px; }
.form-section h3 { grid-column: 1 / -1; margin: 0; }
.form-section label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 650; }
.form-section input { padding-left: 16px; }
.install-form > button { color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); }

@media (max-width: 680px) {
  .shell { padding-top: 34px; }
  .hero { align-items: flex-start; }
  .brand-mark { flex-basis: 58px; height: 58px; border-radius: 17px; font-size: 20px; }
  .query-form { grid-template-columns: 1fr; }
  .requirement-grid, .form-section { grid-template-columns: 1fr; }
  .search-card, .result-card { padding: 22px; border-radius: 20px; }
  .result-head { flex-direction: column; }
  .metrics { grid-template-columns: 1fr; }
  .metrics article { min-height: 92px; }
  .result-actions { align-items: stretch; flex-direction: column; }
  .result-actions > * { width: 100%; }
}
