:root {
  --blue: #3d95d5;
  --label-blue: #b9ddf5;
  --bg: #ffffff;
  --line: #d9e6f0;
  --text: #1f2d3a;
  --muted: #555;
  --danger: #d9534f;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 12px;
  background: var(--blue);
  color: #fff;
}

.top h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.back {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 40px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

/* ---------- layout ---------- */
.wrap {
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 0;
}

/* ---------- search ---------- */
.search-card {
  padding: 16px 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.search-tip {
  margin: 0 0 16px;
  color: #222;
  font-size: 17px;
  text-align: center;
  letter-spacing: 0.3px;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-form input {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  outline: none;
  background: #fff;
  color: #111;
  font-size: 17px;
}

.search-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(61, 149, 213, 0.12);
}

.search-form button {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 4px;
  background: var(--blue);
  color: #fff;
  font-size: 19px;
  letter-spacing: 2px;
  cursor: pointer;
}

.search-form button:active { background: #2f7db5; }

.tip {
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

/* ---------- result table ---------- */
.cert-card {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.cert-row {
  display: grid;
  grid-template-columns: 34% 66%;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.cert-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px 8px;
  border-right: 1px solid var(--line);
  background: var(--label-blue);
  color: #143a55;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.3px;
}

.cert-value {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 10px 12px;
  background: #fff;
  color: #1f2d3a;
  line-height: 1.5;
  word-break: break-word;
}

.cert-value.is-mono {
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 15px;
}

.cert-value.is-empty { color: #aaa; }

@media (min-width: 700px) {
  .wrap {
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    min-height: 100vh;
  }
}
