:root {
  --bg: #f4f7fc;
  --paper: #fff;
  --ink: #17243b;
  --blue: #275bd8;
  --line: #dce4ef;
  --muted: #617089;
  --error: #b42318;
  --radius: 18px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  line-height: 1.75;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #91b0ff;
  outline-offset: 3px;
}
button,
input,
textarea {
  border-radius: 10px;
}
input,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #c8d3e3;
  background: white;
  color: var(--ink);
  min-height: 48px;
}
input:focus,
textarea:focus {
  border-color: var(--blue);
}
textarea {
  resize: vertical;
  font-family: Consolas, "Cascadia Code", monospace;
}
label {
  display: block;
  font-weight: 600;
  margin: 16px 0 8px;
}
form > label:first-child {
  margin-top: 0;
}
.site-header {
  max-width: 1120px;
  padding: 24px 32px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--blue);
  color: white;
  border-radius: 9px;
  width: 32px;
  height: 32px;
  font-size: 16px;
}
.brand-secondary {
  font-weight: 400;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 10px;
}
.quiet-link {
  font-size: 13px;
  color: var(--muted);
}
main {
  max-width: 760px;
  margin: 34px auto 0;
  padding: 0 24px;
}
.intro {
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 13px;
  color: var(--blue);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}
h1 {
  font-size: 38px;
  line-height: 1.35;
  letter-spacing: -0.04em;
  margin: 0 0 12px;
  font-weight: 700;
}
h2 {
  font-size: 18px;
  margin: 0 0 14px;
}
.lead {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  margin: 20px 0;
}
.hint {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0;
}
.optional {
  border-top: 1px solid var(--line);
  margin: 22px 0;
  padding-top: 18px;
}
summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  min-height: 32px;
}
summary .hint {
  margin-left: 8px;
  font-weight: 400;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.notice {
  background: #f2f6ff;
  border-radius: 9px;
  color: #445b84;
  padding: 12px 14px;
  font-size: 13px;
  margin: 22px 0;
}
.primary,
.secondary {
  border: 0;
  min-height: 46px;
  padding: 11px 20px;
  font-weight: 600;
  transition: background 0.15s;
}
.primary {
  background: var(--blue);
  color: white;
}
.primary:hover {
  background: #1948b7;
}
.primary span {
  float: right;
}
.secondary {
  background: #edf2fa;
  color: var(--ink);
  border: 1px solid var(--line);
}
.secondary:hover {
  background: #e0e9f7;
}
.full {
  width: 100%;
  text-align: left;
}
.message {
  font-size: 14px;
  margin: 12px 0 0;
  overflow-wrap: anywhere;
}
.message.error {
  color: var(--error);
}
.how {
  margin: 32px 0;
}
.how h2 {
  font-size: 15px;
}
.how ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.how li {
  counter-increment: step;
  font-size: 13px;
  border-top: 2px solid var(--line);
  padding-top: 12px;
}
.how strong:before {
  content: counter(step) ". ";
  color: var(--blue);
}
.how strong,
.how span {
  display: block;
}
.how span {
  color: var(--muted);
  margin-top: 5px;
}
footer {
  font-size: 12px;
  text-align: center;
  color: var(--muted);
  margin: 48px 16px 28px;
  line-height: 2;
}
.back-link {
  font-size: 14px;
  display: inline-block;
  margin-bottom: 26px;
}
.result-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.result-heading h1 {
  font-size: 28px;
  overflow-wrap: anywhere;
}
.badge {
  display: inline-block;
  font-size: 12px;
  background: #e8efff;
  color: var(--blue);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.steps {
  display: flex;
  list-style: none;
  padding: 0;
  gap: 12px;
  margin: 0 0 18px;
}
.steps li {
  flex: 1;
  font-size: 13px;
  color: var(--muted);
  border-top: 3px solid var(--line);
  padding-top: 10px;
}
.steps li.active {
  color: var(--blue);
  border-color: var(--blue);
  font-weight: 600;
}
#progress-text {
  color: var(--muted);
  font-size: 14px;
}
.score-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}
.score {
  font-family: Consolas, "Cascadia Code", monospace;
  font-size: 64px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.08em;
}
.score-unit {
  letter-spacing: normal;
  color: var(--muted);
  font-size: 14px;
}
.score-line .hint {
  max-width: 230px;
}
.feedback {
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 2;
  margin: 0 0 22px;
}
.evidence-section {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.dimensions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.dimensions dt {
  font-size: 12px;
  color: var(--muted);
}
.dimensions dd {
  margin: 0;
  font-family: Consolas, monospace;
  font-size: 20px;
}
.annotation {
  border-left: 3px solid var(--blue);
  padding: 4px 0 4px 16px;
  margin: 20px 0;
}
.annotation h3 {
  font-size: 14px;
  margin: 0 0 6px;
}
.annotation p {
  font-size: 14px;
  margin: 6px 0;
}
.annotation blockquote {
  margin: 8px 0;
  background: var(--bg);
  padding: 10px;
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.annotation .hint {
  font-size: 12px;
}
#manual-form button {
  margin-top: 16px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 600px) {
  .site-header {
    padding: 20px 16px;
  }
  .brand {
    font-size: 14px;
    gap: 8px;
  }
  .brand-secondary {
    padding-left: 8px;
  }
  .quiet-link {
    font-size: 12px;
  }
  main {
    padding: 0 16px;
    margin-top: 24px;
  }
  h1 {
    font-size: 30px;
  }
  .panel {
    padding: 22px 18px;
    border-radius: 14px;
  }
  .lead {
    font-size: 14px;
  }
  .field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .how ol {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .how li {
    padding-top: 8px;
  }
  .score-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .score {
    font-size: 56px;
  }
  .score-line .hint {
    max-width: none;
  }
  .result-heading {
    align-items: flex-start;
  }
  .result-heading h1 {
    font-size: 24px;
  }
  .dimensions {
    grid-template-columns: 1fr 1fr;
  }
  .steps {
    gap: 8px;
  }
  .steps li {
    font-size: 12px;
  }
  footer {
    margin-top: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
main.admin-main {
  max-width: 1120px;
}
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.login-panel {
  max-width: 540px;
}
.login-panel button,
#admin-root form > button {
  margin-top: 16px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
select {
  font: inherit;
  width: 100%;
  min-height: 48px;
  border: 1px solid #c8d3e3;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  background: white;
}
select:focus-visible {
  outline: 3px solid #91b0ff;
  outline-offset: 3px;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13px;
}
th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.article-cell {
  max-width: 260px;
  overflow-wrap: anywhere;
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 20px;
  font-size: 14px;
}
.section-title {
  margin-top: 30px;
}
.snapshot {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 400px;
  overflow: auto;
  background: var(--bg);
  padding: 14px;
  border-radius: 10px;
  font:
    13px/1.7 Consolas,
    monospace;
}
#admin-root details {
  margin: 18px 0;
}
#admin-root p.score {
  margin: 24px 0 18px;
}
