:root {
  --ink: #17202a;
  --muted: #5c6b7a;
  --line: #d5dee7;
  --paper: #eef2f5;
  --card: #ffffff;
  --brand: #0c3b5e;
  --brand-2: #14527f;
  --accent: #b4531a;
  --ok: #1f7a45;
  --bad: #9d2430;
  --warn: #8a5a00;
  --shadow: 0 10px 30px rgba(18, 38, 58, 0.06);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.45;
}
a { color: var(--brand-2); }
.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 22px;
  background: var(--brand);
  color: white;
}
.brand { color: white; text-decoration: none; font-weight: 700; letter-spacing: 0.02em; }
.brand span { font-weight: 500; opacity: 0.8; }
.top nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.top nav a, .linkish { color: white; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
main { width: min(1080px, calc(100% - 28px)); margin: 22px auto 48px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.narrow { width: min(520px, 100%); margin: 0 auto; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 12px; }
h2 { font-size: 1.15rem; }
.kicker { color: var(--muted); margin: 0 0 6px; font-size: 0.92rem; }
.lede, .hint { color: var(--muted); }
.stack label, label.block { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; font-weight: 600; }
input, select, textarea, button, .button, .linkbox {
  font: inherit;
  border-radius: 10px;
}
input, select, textarea, .linkbox {
  width: 100%;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}
textarea { resize: vertical; }
button, .button {
  border: 1px solid var(--brand);
  background: white;
  color: var(--brand);
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
}
button.primary, .primary { background: var(--brand); color: white; }
.actions, .inline, .spread, .filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }
.filters input, .filters select { width: auto; min-width: 140px; }
table { width: 100%; border-collapse: collapse; margin-top: 14px; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.msg { padding: 10px 12px; border-radius: 10px; background: #e7f5ec; color: var(--ok); }
.msg.error, .msg.bad { background: #fdecee; color: var(--bad); }
.status { font-weight: 700; }
.status.pending { color: var(--warn); }
.status.ok { color: var(--ok); }
.status.bad { color: var(--bad); }
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  background: #e7eef5;
  color: var(--brand);
  font-size: 0.78rem;
  margin-right: 4px;
}
.badge.warn { background: #fff1df; color: var(--accent); }
.qlist { list-style: none; padding: 0; }
.qlist li { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 12px 0; }
.choices { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-weight: 500; }
.choice input { width: auto; margin-top: 4px; }
.fields label { margin: 8px 0; }
.hidden { display: none; }
.zoom summary { cursor: zoom-in; list-style: none; }
.zoom img, .drawing { display: block; max-width: 100%; height: auto; border-radius: 12px; background: white; }
.zoom-full { margin-top: 8px; }
.reminder {
  border-left: 4px solid var(--accent);
  background: #fff6ee;
  padding: 12px 14px;
  font-weight: 700;
}
.answer { border-top: 1px solid var(--line); padding: 14px 0; }
.answer.open { background: #f7fbff; border-radius: 12px; padding: 12px; }
.prompt { white-space: pre-wrap; }
.answer-text { white-space: pre-wrap; font-family: inherit; background: #f6f8fa; padding: 10px; border-radius: 10px; }
.row { display: grid; grid-template-columns: 70px 1fr auto auto; gap: 8px; margin: 6px 0; align-items: center; }
.pos { width: 70px; }
.check { font-weight: 500; display: flex; gap: 6px; align-items: center; }
.check input { width: auto; }
.linkbox { font-size: 0.85rem; }
fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 16px 0; }
@media (max-width: 720px) {
  .qlist li, .top { flex-direction: column; align-items: flex-start; }
  .row { grid-template-columns: 1fr; }
  .actions button, .actions .button, button.primary { width: 100%; justify-content: center; }
}
