:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #60708a;
  --primary: #2457d6;
  --primary-dark: #1a3f9e;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --border: #dce3ee;
  --success: #18794e;
  --warning: #9a6700;
  --danger: #b42318;
  --manual: #6d3fc0;
  font-family: Inter, "Noto Sans HK", "Microsoft JhengHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); line-height: 1.5; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { background: #102147; color: white; padding: .85rem 0; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar a { color: white; }
.brand { font-weight: 750; letter-spacing: .01em; }
.wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
main.wrap { padding: 2rem 0 4rem; }
.panel, .card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 7px 24px rgba(37, 55, 88, .06); }
.panel { padding: 1.4rem; }
.card { padding: 1.2rem; margin: 1rem 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.full { grid-column: 1 / -1; }
label { display: block; font-weight: 650; margin-bottom: .35rem; }
input, select, textarea { width: 100%; padding: .65rem .7rem; border: 1px solid #bcc7d8; border-radius: 8px; background: white; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 3px solid #dbe7ff; border-color: var(--primary); }
input[type="checkbox"] { width: auto; }
textarea { min-height: 6rem; resize: vertical; }
button, .button { display: inline-block; border: 0; border-radius: 8px; padding: .62rem .9rem; background: var(--primary); color: white; font-weight: 650; cursor: pointer; }
button:hover, .button:hover { background: var(--primary-dark); text-decoration: none; }
.button.secondary, button.secondary { background: #e9eef7; color: #263653; }
.button.danger, button.danger { background: var(--danger); }
.inline { display: inline; }
.actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin: 1rem 0; }
.badge { display: inline-flex; align-items: center; padding: .22rem .55rem; border-radius: 999px; font-size: .83rem; font-weight: 700; background: #e9eef7; }
.badge.passed, .badge.approved, .badge.exported { color: var(--success); background: #e4f6ed; }
.badge.warning { color: var(--warning); background: #fff4d6; }
.badge.failed { color: var(--danger); background: #ffe9e6; }
.badge.manual_required { color: var(--manual); background: #f1eaff; }
.badge.pending, .badge.manual_review { color: #46556f; background: #edf1f7; }
.notice { padding: .85rem 1rem; border-left: 4px solid var(--primary); background: #eaf1ff; border-radius: 6px; margin: 1rem 0; }
.notice.error { border-color: var(--danger); background: #fff0ef; }
.notice.warning { border-color: var(--warning); background: #fff8e6; }
.muted { color: var(--muted); }
.question.failed, .question.manual_required { border-left: 5px solid var(--danger); }
.question.warning { border-left: 5px solid #d59b00; }
.question.passed { border-left: 5px solid var(--success); }
.question h3 { margin-top: 0; }
.options { list-style: none; padding: 0; }
.options li { padding: .2rem 0; }
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.review-box { background: #f8fafc; border-radius: 9px; padding: .8rem; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .7rem .55rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: #43506a; font-size: .87rem; }
.login { width: min(420px, calc(100% - 2rem)); margin: 12vh auto; }
.login h1 { font-size: 1.4rem; }
.progress-steps { display: grid; gap: .55rem; padding-left: 0; list-style: none; }
.progress-steps li { padding: .7rem 1rem; border-radius: 8px; background: #eef2f8; }
.progress-steps li.active { background: #dce8ff; color: #173d95; font-weight: 700; }
code { background: #eef2f8; padding: .12rem .3rem; border-radius: 4px; }
@media (max-width: 760px) { .grid, .grid-3, .review-grid { grid-template-columns: 1fr; } .full { grid-column: auto; } }

