:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #f2f5f8;
  color: #18212b;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top, #ffffff 0, #f2f5f8 48%, #e9eef3 100%); }
.shell { width: min(900px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 80px; }
.card { background: rgba(255,255,255,.96); border: 1px solid #dfe6ed; border-radius: 20px; padding: 30px; box-shadow: 0 18px 50px rgba(31,48,66,.08); }
.hero h1, .topbar h1 { margin: 8px 0 12px; font-size: clamp(30px, 5vw, 48px); letter-spacing: -.03em; }
.lead { font-size: 18px; line-height: 1.75; color: #4b5b6b; max-width: 720px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #476b8f; }
.grid { display: grid; gap: 18px; margin-top: 26px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid > div { padding: 18px; border-radius: 14px; background: #f7f9fb; border: 1px solid #e5ebf0; }
code { display: block; overflow-x: auto; padding: 12px; border-radius: 8px; background: #17212b; color: #eaf2f8; }
.notice, .error { margin-top: 22px; padding: 14px 16px; border-radius: 12px; background: #eef6ff; border: 1px solid #d5e7fb; }
.error { background: #fff0f0; border-color: #f4caca; color: #8d2424; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: #27394b; color: white; font-weight: 750; text-decoration: none; cursor: pointer; }
.button.primary { width: 100%; min-height: 52px; font-size: 16px; background: #1769aa; }
.button.secondary { background: #e8eef4; color: #27394b; }
.auth-card { max-width: 580px; margin: 10vh auto 0; }
.auth-card h1, .admin-header h1 { margin: 10px 0 12px; font-size: clamp(30px, 5vw, 48px); }
.stack-form, .admin-form { display: grid; gap: 16px; margin-top: 24px; }
label { display: grid; gap: 8px; color: #3d5062; font-weight: 700; }
input { width: 100%; padding: 12px 13px; border: 1px solid #ccd7e0; border-radius: 10px; font: inherit; background: #fff; }
.hint { color: #657586; line-height: 1.65; font-size: 14px; }
.admin-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; margin-bottom: 26px; }
.admin-header .lead { margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric { padding: 18px 20px; }
.metric span { color: #657586; font-size: 13px; }
.metric strong { display: block; margin-top: 7px; font-size: 28px; color: #27394b; }
.metric.good strong { color: #16854e; }
.metric.warn strong { color: #b36c15; }
.admin-panel { margin-top: 18px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-heading h2 { margin: 7px 0 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 1080px; border-collapse: collapse; font-size: 13px; }
th, td { padding: 13px 10px; border-bottom: 1px solid #e3e9ef; text-align: left; vertical-align: top; }
th { color: #657586; font-size: 12px; white-space: nowrap; }
.subline { margin-top: 5px; color: #7a8996; font-size: 11px; }
.token { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: #f1f5f8; color: #536678; padding: 4px 6px; border-radius: 5px; }
.account-input { width: 130px; padding: 5px 7px; font-size: 12px; }
.bar { width: 120px; height: 7px; overflow: hidden; margin-top: 8px; border-radius: 99px; background: #e3e9ef; }
.bar i { display: block; height: 100%; border-radius: inherit; background: #1769aa; }
.status { display: inline-block; padding: 5px 8px; border-radius: 999px; font-size: 11px; line-height: 1.35; }
.status.ready { color: #166b43; background: #e5f6ec; }
.status.needs-work { color: #87540e; background: #fff2d9; }
details { margin-top: 8px; color: #657586; font-size: 11px; }
.dimension-row { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; border-bottom: 1px solid #edf1f4; white-space: nowrap; }
.button.small { min-height: 30px; padding: 0 9px; margin: 0 4px 5px 0; font-size: 11px; }
.admin-form { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.admin-form .primary { width: auto; }
.loading { grid-column: 1 / -1; }
@media (max-width: 900px) { .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .admin-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .admin-header { flex-direction: column; } .metric-grid, .admin-form { grid-template-columns: 1fr; } }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 14px; }
.progress-copy { font-size: 20px; font-weight: 800; color: #476177; }
.progress { height: 8px; overflow: hidden; border-radius: 100px; background: #dfe6ed; margin-bottom: 22px; }
.progress span { display: block; height: 100%; border-radius: inherit; background: #1769aa; transition: width .3s ease; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.pill { display: inline-flex; padding: 6px 10px; border-radius: 100px; background: #e7f2fc; color: #155987; font-size: 12px; font-weight: 750; }
.pill.muted { background: #eff2f5; color: #556575; }
.question-card h2 { margin: 24px 0 12px; font-size: 20px; line-height: 1.5; }
.scenario { padding: 18px; border-left: 4px solid #6d8da8; border-radius: 8px; background: #f6f8fa; font-size: 16px; line-height: 1.85; }
fieldset { border: 0; padding: 0; margin: 22px 0; }
legend { margin-bottom: 10px; font-weight: 750; }
.option { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0; padding: 14px; border: 1px solid #dce4eb; border-radius: 12px; cursor: pointer; background: #fff; }
.option:hover { border-color: #8fb2ce; background: #f8fbfe; }
.option input { margin-top: 3px; }
.field { display: block; margin: 22px 0; }
.field > span { display: block; margin-bottom: 9px; font-weight: 750; }
textarea { width: 100%; resize: vertical; padding: 14px; border: 1px solid #ccd7e0; border-radius: 12px; font: inherit; line-height: 1.65; background: #fff; }
textarea:focus, input:focus { outline: 3px solid rgba(23,105,170,.16); border-color: #1769aa; }
.confidence input { width: 100%; }
.hint { color: #657586; line-height: 1.65; font-size: 14px; }
.completed { text-align: center; padding: 55px 30px; }
.success-mark { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #e6f6ed; color: #16854e; font-size: 32px; font-weight: 900; }
@media (max-width: 680px) {
  .shell { width: min(100% - 20px, 900px); padding-top: 20px; }
  .card { padding: 20px; border-radius: 16px; }
  .grid.two { grid-template-columns: 1fr; }
}
