:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #132033;
  --muted: #667085;
  --line: #d9e2ef;
  --blue: #1766c2;
  --red: #c92f2f;
  --orange: #c36512;
  --amber: #a97700;
  --green: #17805f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.card {
  width: min(860px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 16px 45px rgba(30, 48, 80, 0.08);
}

.card-header {
  display: grid;
  grid-template-columns: 150px 1fr 150px;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.company-mark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 46px;
  border-left: 4px solid var(--blue);
  padding-left: 12px;
  color: #0f3566;
}

.company-mark strong {
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0;
}

.company-mark span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: 28px;
  text-align: center;
}

.search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 120px;
  gap: 10px;
}

input, button {
  min-height: 48px;
  border-radius: 8px;
  font: inherit;
}

input {
  border: 1px solid #cbd6e6;
  padding: 0 14px;
  outline: none;
  background: #fff;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 102, 194, 0.12);
}

button {
  border: 0;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.result {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}

.placeholder {
  color: var(--muted);
  text-align: center;
}

.risk-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.risk-title h2 {
  margin: 0;
  font-size: 28px;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
}

.badge {
  border-radius: 999px;
  color: #fff;
  padding: 7px 13px;
  font-weight: 800;
  white-space: nowrap;
}

.extreme .badge { background: var(--red); }
.high .badge { background: var(--orange); }
.medium .badge { background: var(--amber); }
.low .badge { background: var(--green); }

.extreme { border-color: #f2b7b7; background: #fff7f7; }
.high { border-color: #efc39f; background: #fff9f3; }
.medium { border-color: #ead39a; background: #fffbea; }
.low { border-color: #abdcca; background: #f4fbf8; }

.summary {
  margin: 0 0 12px;
  font-weight: 700;
  line-height: 1.55;
}

.result-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.label { color: var(--muted); }
.value { font-weight: 700; }

.hit-list {
  margin: 0;
  padding-left: 18px;
}

.hit-list li {
  margin: 0 0 8px;
  line-height: 1.5;
}

.hit-list li:last-child { margin-bottom: 0; }
.hit-list span, .hit-list em, .hit-list small { margin-left: 6px; }
.hit-list em { color: var(--muted); font-style: normal; }
.hit-list small { color: var(--muted); font-weight: 700; }

.advice .value { font-size: 18px; }

.official-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.official-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid #cbd6e6;
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  padding: 8px 10px;
}

@media (max-width: 760px) {
  .card { padding: 20px; }
  .card-header {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .company-mark {
    align-items: center;
    border-left: 0;
    border-top: 4px solid var(--blue);
    padding: 8px 0 0;
  }
  .header-spacer { display: none; }
  .search { grid-template-columns: 1fr; }
  .risk-title { align-items: flex-start; flex-direction: column; }
  .result-row { grid-template-columns: 1fr; gap: 4px; }
}
