:root {
  --bg: #fff;
  --fg: #000;
  --muted: #555;
  --line: #d8d8d8;
  --soft: #f6f6f6;
  --strong: #111;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}
a { color: var(--fg); }
code { border: 1px solid var(--line); padding: 2px 5px; background: var(--soft); }
.muted { color: var(--muted); }
.card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 18px;
}
.notice, .error {
  border: 1px solid var(--fg);
  padding: 12px 14px;
  margin: 14px 0;
  border-radius: 12px;
  background: #fff;
}
.error { font-weight: 600; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #000;
  border-radius: 999px;
  background: #000;
  color: #fff;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.btn.secondary {
  background: #fff;
  color: #000;
}
.login-page, .install-page { min-height: 100vh; display: grid; place-items: start center; padding: 26px 14px; }
.login-wrap, .install-wrap { width: min(100%, 520px); }
.install-wrap.wide { width: min(100%, 1180px); }
h1 { margin: 0 0 12px; line-height: 1.2; font-size: clamp(26px, 6vw, 42px); }
h2 { margin-top: 28px; }
.form-card { display: grid; gap: 16px; }
label { display: grid; gap: 7px; font-weight: 700; }
input, textarea {
  width: 100%;
  border: 1px solid #000;
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  background: #fff;
  color: #000;
  outline: none;
}
textarea { resize: vertical; min-height: 160px; line-height: 1.7; }
input:focus, textarea:focus { box-shadow: 0 0 0 2px #000 inset; }
.checkline { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.checkline input { width: auto; }
.codebox { min-height: 260px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid #000;
  background: #fff;
}
.icon-btn { border: 1px solid #000; background: #fff; color: #000; width: 40px; height: 40px; border-radius: 50%; font-size: 20px; }
.top-title { font-weight: 800; flex: 1; }
.logout { text-decoration: none; font-weight: 700; }
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 58px); }
.sidebar { border-right: 1px solid #000; padding: 16px; background: #fff; overflow-y: auto; }
.sidebar-head { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.suite-label { margin: 18px 0 8px; font-weight: 900; }
.nav-link { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin: 7px 0; text-decoration: none; }
.nav-link.active { border-color: #000; background: #000; color: #fff; }
.content { padding: 18px; max-width: 900px; width: 100%; margin: 0 auto; }
.question-head { margin-bottom: 16px; }
.eyebrow { font-weight: 900; margin-bottom: 8px; }
.question-head h1 { font-size: clamp(21px, 5vw, 34px); }
.cue-box { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.cue-box ul { margin: 8px 0 0; padding-left: 22px; }
.answer-card { margin: 16px 0; }
.question-no { display: inline-block; font-size: 14px; border: 1px solid #000; border-radius: 999px; padding: 2px 10px; margin-bottom: 8px; }
.question-text { display: block; font-size: 18px; line-height: 1.7; }
.answer-card textarea { margin-top: 12px; }
.pager { position: sticky; bottom: 0; margin-top: 18px; display: grid; gap: 14px; border-radius: 18px 18px 0 0; }
.save-status { color: var(--muted); }
.pager-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
.done-text { font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 900px; }
th, td { border: 1px solid #000; padding: 10px; vertical-align: top; text-align: left; }
th { background: #fff; }
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; top: 58px; bottom: 0; left: 0; width: 82%; max-width: 320px; transform: translateX(-105%); transition: transform .18s ease; z-index: 30; border-right: 1px solid #000; }
  .sidebar.open { transform: translateX(0); }
  .content { padding: 12px; }
  .card { border-radius: 16px; padding: 15px; }
  .pager-actions { justify-content: stretch; }
  .pager-actions .btn { flex: 1; }
  .question-text { font-size: 16px; }
}
