:root {
  --primary: #14539a;
  --primary-dark: #0e3e75;
  --primary-light: #e8f1fb;
  --accent: #c8102e;
  --bg: #f2f5f9;
  --card: #ffffff;
  --border: #dde4ec;
  --text: #1f2937;
  --text-2: #5b6675;
  --text-3: #8a94a3;
  --ok: #1a7f52;
  --ok-bg: #e6f5ee;
  --warn: #b7791f;
  --warn-bg: #fdf4e3;
  --danger: #c0392b;
  --danger-bg: #fdecea;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(16, 34, 60, .08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  font-size: 14px; line-height: 1.6;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }
#app.loading { padding: 80px; text-align: center; color: var(--text-3); display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- 登录页 ---------------- */
.login-wrap {
  position: relative;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #14539a 0%, #0e3e75 55%, #0a2d55 100%);
  padding: 24px;
}
@media (max-width: 660px) {
  .login-wrap { padding: 22px 16px; }
}
.login-box {
  width: 100%; max-width: 420px; background: #fff; border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28); overflow: hidden;
}
.login-head {
  position: relative; padding: 34px 32px 32px; text-align: center;
  background: linear-gradient(180deg, #f7fafd 0%, #e9f1fa 100%);
}
.login-divider { display: flex; align-items: center; justify-content: center; gap: 8px; width: 160px; margin: 13px auto 0; }
.login-divider i { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(185,203,227,0), #b9cbe3); }
.login-divider i:last-of-type { background: linear-gradient(90deg, #b9cbe3, rgba(185,203,227,0)); }
.login-divider b { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); opacity: .5; flex: none; }
.login-head h1 {
  font-size: 18px; font-weight: 700; margin: 0; color: var(--primary-dark);
  line-height: 1.6; letter-spacing: 1px;
}
.login-wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 22px; display: block; }
.login-body { padding: 22px 32px 24px; }
.login-foot {
  padding: 14px 32px 16px; text-align: center;
  background: #f7f9fc; border-top: 1px solid var(--border);
}
.login-foot .org-row {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; color: var(--text-2); line-height: 1.9;
}
.login-foot .lab {
  flex: none; min-width: 34px; padding: 1px 0; border-radius: 3px;
  background: var(--primary-light); color: var(--primary-dark);
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
}
.login-foot .name { font-weight: 700; color: var(--primary-dark); letter-spacing: 1px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 83, 154, .12);
}
.login-tip { margin-top: 14px; font-size: 12px; color: var(--text-3); text-align: center; }

/* 登录卡片内的涉密提醒条 */
.login-secret {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 0 24px;
  padding: 11px 14px;
  border-radius: 6px;
  background: #fff8e6;
  border: 1px solid #f0ddb2;
  color: #7a5b1a;
  font-size: 12.5px; line-height: 1.75; text-align: left;
}
.login-secret svg { flex: none; width: 16px; height: 16px; margin-top: 3px; color: #d99a2b; }
.login-secret b { color: #6b4a0e; font-weight: 700; }
.login-secret .sec-warn { color: #c0392b; font-weight: 700; }
@media (max-width: 660px) {
  .login-secret { font-size: 12px; padding: 10px 13px; margin: 0 16px; }
}

/* ---------------- 布局 ---------------- */
.topbar {
  height: 58px; background: var(--primary-dark); color: #fff;
  display: flex; align-items: center; padding: 0 20px; gap: 14px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .18); position: sticky; top: 0; z-index: 40;
}
.topbar .title { font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.topbar .sub { font-size: 12px; opacity: .75; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 13px; opacity: .92; }
.topbar button.ghost {
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .35);
  color: #fff; padding: 5px 12px; border-radius: var(--radius); cursor: pointer; font-size: 13px;
}
.topbar button.ghost:hover { background: rgba(255, 255, 255, .22); }

.shell { display: flex; flex: 1; min-height: calc(100vh - 58px); }
.sidebar {
  width: 200px; background: #fff; border-right: 1px solid var(--border);
  padding: 14px 0; flex-shrink: 0;
}
.sidebar .nav-title { font-size: 11px; color: var(--text-3); padding: 8px 18px 6px; letter-spacing: 1px; }
.sidebar a.nav {
  display: block; padding: 9px 18px; color: var(--text-2); font-size: 14px;
  border-left: 3px solid transparent; cursor: pointer;
}
.sidebar a.nav:hover { background: #f6f8fb; color: var(--primary); }
.sidebar a.nav.active {
  background: var(--primary-light); color: var(--primary-dark);
  border-left-color: var(--primary); font-weight: 600;
}
.main { flex: 1; padding: 20px 24px 48px; min-width: 0; }

/* ---------------- 通用组件 ---------------- */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 18px; color: var(--text); }
.page-head .desc { font-size: 12px; color: var(--text-3); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card-head {
  padding: 11px 16px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 14px;
  display: flex; align-items: center; gap: 10px; background: #fafbfd; border-radius: var(--radius) var(--radius) 0 0;
}
.card-body { padding: 16px; }
.card-head .spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: #fff; color: var(--text); cursor: pointer; font-size: 13px;
  font-family: inherit; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn.danger { color: var(--danger); border-color: #f0c6c0; }
.btn.danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-row .spacer { flex: 1; }

table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th, table.grid td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.grid th { background: #f7f9fc; color: var(--text-2); font-weight: 600; white-space: nowrap; }
table.grid tbody tr:hover { background: #fafcfe; }
table.grid td.num, table.grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
/* 操作列：按钮始终排在同一行，并固定在表格右侧，页面变窄/横向滚动时也不会被切掉或换行 */
table.grid th.acts, table.grid td.acts {
  white-space: nowrap;
  width: 1%;                       /* 让该列按内容收窄，把空间让给项目名称等长列 */
  position: sticky; right: 0;      /* 固定在最右侧，表格横向滚动时始终可见 */
  z-index: 2;
  box-shadow: -8px 0 8px -8px rgba(20, 40, 70, .18);
}
table.grid th.acts { background: #f7f9fc; }
table.grid td.acts { background: #fff; }
table.grid tbody tr:hover td.acts { background: #fafcfe; }
table.grid td.acts .btn { margin-left: 6px; }
table.grid td.acts .btn:first-child { margin-left: 0; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; line-height: 19px; white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.danger { background: var(--danger-bg); color: var(--danger); }
.tag.info { background: var(--primary-light); color: var(--primary-dark); }
.tag.mute { background: #eef1f5; color: var(--text-3); }

.bar { height: 7px; background: #e9edf3; border-radius: 4px; overflow: hidden; min-width: 70px; }
.bar > i { display: block; height: 100%; background: var(--primary); }
.bar.full > i { background: var(--ok); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 15px; box-shadow: var(--shadow);
}
.stat .k { font-size: 12px; color: var(--text-3); }
.stat .v { font-size: 24px; font-weight: 700; color: var(--primary-dark); line-height: 1.3; }
.stat .v small { font-size: 13px; font-weight: 400; color: var(--text-3); }

.empty { padding: 40px 16px; text-align: center; color: var(--text-3); font-size: 13px; }

.notice-item { padding: 12px 16px; border-bottom: 1px dashed var(--border); }
.notice-item:last-child { border-bottom: none; }
.notice-item .t { font-weight: 600; margin-bottom: 4px; }
.notice-item .m { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.notice-item .c { white-space: pre-wrap; color: var(--text-2); font-size: 13px; }

/* 资料清单上传 */
.cat-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.cat-head { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; background: #fafbfd; }
.cat-code {
  flex-shrink: 0; width: 34px; height: 24px; line-height: 24px; text-align: center; border-radius: 3px;
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 700;
}
.cat-title { flex: 1; min-width: 0; }
.cat-title .n { font-weight: 600; font-size: 13.5px; }
.cat-title .d { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.cat-head .acts { flex-shrink: 0; display: flex; gap: 6px; align-items: center; }
.cat-files { padding: 8px 12px 12px 56px; }
.cat-files ul { margin: 0; padding: 0; list-style: none; }
.cat-files li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px dashed #eef1f5; font-size: 13px; }
.cat-files li:first-child { border-top: none; }
.cat-files .fname { flex: 1; min-width: 0; word-break: break-all; }
.cat-files .fsize { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.upload-progress { margin-top: 8px; font-size: 12px; color: var(--primary); }

/* 被省厅退回的文件 */
.cat-files li.is-returned { background: #fff8ec; border-radius: 4px; padding-left: 6px; margin-left: -6px; }
.cat-files li.ret-reason {
  display: block; border-top: none; padding: 0 0 6px 6px; margin-top: -2px;
  font-size: 12.5px; color: #b7791f; background: #fff8ec; line-height: 1.7;
}

/* 抽查表 */
.review-group { margin-bottom: 18px; }
.review-group > h4 { margin: 0 0 8px; font-size: 14px; color: var(--primary-dark); }
.review-row { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.review-row.on { border-color: #e8b4ae; background: #fffaf9; }
.review-row .q { display: flex; gap: 8px; font-size: 13.5px; margin-bottom: 8px; }
.review-row .q .idx { flex-shrink: 0; color: var(--text-3); font-variant-numeric: tabular-nums; }
.review-row .opts { display: flex; gap: 14px; font-size: 13px; margin-bottom: 6px; flex-wrap: wrap; }
.review-row .opts label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.review-row .detail { display: none; margin-top: 6px; }
.review-row.on .detail { display: block; }
.review-row textarea { width: 100%; min-height: 52px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 4px; font-family: inherit; font-size: 13px; resize: vertical; }
.review-row .lbl { font-size: 12px; color: var(--text-2); margin: 5px 0 3px; }
.conclusion-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.conclusion-row:last-child { border-bottom: none; }
.conclusion-row .cl { width: 110px; font-weight: 600; font-size: 13px; }
.conclusion-row label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-size: 13px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 25, 40, .45); display: flex;
  align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal {
  background: #fff; border-radius: 8px; width: 100%; max-width: 520px; max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.modal.wide { max-width: 860px; }
.modal-head { padding: 14px 18px; border-bottom: 1px solid var(--border); font-weight: 600; display: flex; align-items: center; }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 18px; overflow: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.modal .x { border: none; background: none; font-size: 20px; color: var(--text-3); cursor: pointer; line-height: 1; }
.modal .x:hover { color: var(--text); }

/* Toast */
#toast-root { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #22303f; color: #fff; padding: 9px 18px; border-radius: 20px; font-size: 13px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25); animation: tin .2s ease;
}
.toast.ok { background: var(--ok); }
.toast.err { background: var(--danger); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.mono { font-family: Consolas, "Courier New", monospace; font-size: 12.5px; }
.legend { font-size: 12px; color: var(--text-3); }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); display: flex; overflow-x: auto; padding: 6px; }
  .sidebar .nav-title { display: none; }
  .sidebar a.nav { border-left: none; border-bottom: 2px solid transparent; white-space: nowrap; padding: 8px 14px; }
  .sidebar a.nav.active { border-bottom-color: var(--primary); }
  .main { padding: 14px; }
}

/* ---------------- 手机端（≤660px） ---------------- */
@media (max-width: 660px) {
  .pv-box { padding: 8px; }
  .pv-img { max-height: 46vh; }
  .pv-frame { height: 52vh; }
  .pv-text { height: 52vh; font-size: 12px; }
  .topbar { height: auto; min-height: 52px; padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .topbar .title { font-size: 14px; letter-spacing: 0; flex: 1 1 auto; min-width: 0; line-height: 1.35; }
  .topbar .sub { display: none; }
  .topbar .who { order: 3; width: 100%; font-size: 12px; opacity: .8; }
  .topbar button.ghost { padding: 5px 10px; font-size: 12px; }
  .main { padding: 12px; }
  .page-head h2 { font-size: 16px; }
  .card-head { padding: 10px 12px; font-size: 13px; flex-wrap: wrap; }
  .card-body { padding: 12px; }
  .btn { padding: 8px 13px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat .v { font-size: 20px; }
  .modal { max-width: 96vw; max-height: 92vh; }
  .modal-body { padding: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .cat-files { padding: 8px 12px 12px; }
  .review-row .opts { gap: 10px; }
  .login-head { padding: 26px 20px 26px; }
  .login-head h1 { font-size: 16px; letter-spacing: .5px; }
  .login-body { padding: 20px 20px 22px; }
  .login-foot { padding: 12px 20px 14px; }
}

/* ---------------- 文件在线预览 ---------------- */
.pv-box {
  background: #f1f4f8;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px;
}
.pv-img-box { text-align: center; }
.pv-img {
  display: inline-block;
  max-width: 100%;
  max-height: 62vh;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.pv-frame {
  display: block;
  width: 100%;
  height: 62vh;
  border: 0;
  background: #fff;
  border-radius: 4px;
}
.pv-text {
  margin: 0;
  max-height: 62vh;
  overflow: auto;
  background: #fff;
  border: 1px solid #e3e8ee;
  border-radius: 4px;
  padding: 12px 14px;
  white-space: pre-wrap;
  word-break: break-all;
  font: 13px/1.9 Consolas, "Courier New", "Microsoft YaHei", monospace;
  color: #2c3542;
}

/* ---------------- 省级评审工作台（文件列表 · 在线预览 · 审核意见） ---------------- */
.ws {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr) 372px;
  gap: 12px;
  align-items: stretch;
  margin-top: 14px;
}
.ws-list, .ws-preview, .ws-op {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); height: calc(100vh - 210px); min-height: 420px;
  display: flex; flex-direction: column; overflow: hidden;
}
/* 左侧资料清单 */
.ws-list { overflow-y: auto; padding: 6px; }
.ws-group {
  font-size: 11.5px; color: var(--text-3); padding: 9px 8px 5px; letter-spacing: .5px;
  font-weight: 600; position: sticky; top: 0; background: #fff; z-index: 1;
}
.ws-item {
  display: flex; align-items: center; gap: 7px; padding: 8px 9px; border-radius: 5px;
  cursor: pointer; font-size: 13px; color: var(--text-2); border: 1px solid transparent;
}
.ws-item:hover { background: #f6f8fb; }
.ws-item.active { background: var(--primary-light); color: var(--primary-dark); border-color: #cfe0f3; font-weight: 600; }
.ws-item .ws-ico {
  flex: none; min-width: 34px; height: 20px; line-height: 20px; padding: 0 4px; text-align: center;
  border-radius: 3px; background: #eef1f5; color: var(--text-3); font-size: 10.5px; font-weight: 700;
}
.ws-item.active .ws-ico { background: var(--primary); color: #fff; }
.ws-item .ws-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-item .ws-flag { flex: none; font-size: 11px; padding: 0 6px; border-radius: 9px; line-height: 17px; display: none; }
.ws-item .ws-flag:not(:empty) { display: inline-block; }
.ws-item .ws-flag.ok { background: var(--ok-bg); color: var(--ok); }
.ws-item .ws-flag.warn { background: var(--warn-bg); color: var(--warn); }
.ws-item .ws-flag.danger { background: var(--danger-bg); color: var(--danger); }
.ws-item .ws-flag.info { background: var(--primary-light); color: var(--primary-dark); }
.ws-overall .ws-ico { background: #fff3d6; color: #b7791f; }

/* 中间预览 */
.ws-preview { overflow: hidden; }
.ws-preview .pv-title {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; background: #fafbfd;
}
.ws-preview .pv-tname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-preview .pv-title .spacer { flex: 1; }
.ws-preview .pv-box { margin: 12px; height: calc(100% - 58px); overflow: auto; }
.ws-preview .pv-frame { height: calc(100vh - 300px); min-height: 380px; }
.ws-preview .pv-img { max-height: calc(100vh - 320px); }
.ws-preview .pv-text { max-height: calc(100vh - 320px); }
.ws-placeholder {
  margin: 14px; padding: 26px 18px; text-align: center; color: var(--text-3); font-size: 13px;
  line-height: 1.9; background: #f7f9fc; border: 1px dashed var(--border); border-radius: var(--radius);
}

/* 右侧意见编辑 */
.ws-op { padding: 14px; overflow-y: auto; }
.ws-op .op-head { font-weight: 600; font-size: 14px; margin-bottom: 10px; color: var(--text); }
.ws-op .op-verdict { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ws-op .vd {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border: 1px solid var(--border);
  border-radius: 16px; font-size: 13px; cursor: pointer; background: #fff;
}
.ws-op .vd:hover { border-color: var(--primary); }
.ws-op .vd.on { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.ws-op textarea {
  width: 100%; min-height: 200px; padding: 10px 11px; border: 1px solid var(--border); border-radius: var(--radius);
  font-family: inherit; font-size: 13.5px; line-height: 1.8; resize: vertical; color: var(--text);
}
.ws-op textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 83, 154, .12); }
.ws-op .op-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.ws-op .op-foot .spacer { flex: 1; }

/* 评审意见汇总（管理员） */
.op-rev { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.op-rev-h {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #fafbfd;
  font-weight: 600; font-size: 13.5px; border-bottom: 1px solid var(--border);
}
.op-rev-h .legend { margin-left: auto; }
.op-block { padding: 10px 12px; background: #fcfdff; border-bottom: 1px dashed var(--border); }
.op-block-h { font-size: 13px; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.op-block-h .legend { font-weight: 400; }
.op-block-b { white-space: pre-wrap; font-size: 13px; color: var(--text-2); }

.prog-cell { display: flex; flex-direction: column; gap: 4px; min-width: 110px; }

@media (max-width: 1100px) {
  .ws { grid-template-columns: 220px minmax(0, 1fr) 320px; }
}
@media (max-width: 900px) {
  .ws { grid-template-columns: 1fr; }
  .ws-list, .ws-preview, .ws-op { height: auto; min-height: 0; }
  .ws-list { max-height: 300px; }
  .ws-preview .pv-box { height: auto; }
  .ws-preview .pv-frame, .ws-preview .pv-img, .ws-preview .pv-text { height: auto; max-height: 60vh; }
}

#site-footer {
  flex: none;
  text-align: center;
  padding: 12px 16px;
  font-size: 12.5px;
  color: var(--text-3);
  background: #f5f7fa;
  border-top: 1px solid var(--border);
}
#site-footer a { color: inherit; text-decoration: none; }
#site-footer a:hover { text-decoration: underline; }

