:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --ink: #1f2328;
  --ink-2: #57606a;
  --line: #d8dee4;
  --primary: #1f6feb;
  --primary-2: #1550c0;
  --warn: #b35900;
  --ok: #1a7f37;
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.brand { font-weight: 600; }

.progress { color: var(--ink-2); font-size: 13px; }

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

.step.hidden { display: none; }
.hidden { display: none !important; }

h1 {
  font-size: 24px;
  margin: 0 0 8px;
}

h2 {
  font-size: 17px;
  margin: 0 0 10px;
}

h3 {
  font-size: 15px;
  margin: 0 0 6px;
}

.lead {
  color: var(--ink-2);
  margin: 0 0 22px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 16px;
}

.card p { margin: 0 0 10px; }
.card p:last-child { margin-bottom: 0; }

.warn { color: var(--warn); font-weight: 600; }
.note { color: var(--ink-2); font-size: 13px; }
em { color: var(--ink-2); font-style: normal; background: #fff8e1; padding: 0 3px; }

.cost { margin: 0; }
.cost dt {
  font-weight: 600;
  margin-top: 10px;
}
.cost dt:first-child { margin-top: 0; }
.cost dd {
  margin: 2px 0 0 0;
  color: var(--ink-2);
}

ul.plain {
  margin: 0;
  padding-left: 20px;
}
ul.plain li { margin-bottom: 4px; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) {
  .two-col { grid-template-columns: 1fr; }
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tbl th, .tbl td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.tbl th {
  background: #f0f3f6;
  font-weight: 600;
}
.tbl .hl { color: var(--primary); font-weight: 600; }

.more-row {
  margin-top: 22px;
  text-align: center;
}
.more-row .btn {
  font-size: 14px;
  color: var(--ink-2);
  border-style: dashed;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: .15s;
}
.btn.primary {
  background: var(--primary);
  color: #fff;
}
.btn.primary:hover { background: var(--primary-2); }
.btn.ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.btn.ghost:hover { background: #f0f3f6; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.modes {
  display: grid;
  gap: 12px;
}
.mode {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
}
.mode:hover { border-color: var(--primary); }
.mode input { margin-top: 6px; }
.mode p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }

.qlist { display: grid; gap: 16px; }

.q {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.q .qtext {
  font-weight: 600;
  margin-bottom: 10px;
}
.q .opts { display: grid; gap: 6px; }
.q .opt {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.q .opt:hover { background: #f5f7fa; }
.q .opt input { margin-top: 5px; }
.q .opt span { color: var(--ink); font-size: 14px; }
.q .opt.checked { background: #e8f0fe; }

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}

textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

input[type="text"], input[type="file"] {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
}

.resume-result {
  margin-top: 12px;
  padding: 12px;
  background: #f7f9fb;
  border-radius: 8px;
  font-size: 14px;
}
.resume-result.hidden { display: none; }
.tag {
  display: inline-block;
  background: #e8f0fe;
  color: var(--primary-2);
  border-radius: 4px;
  padding: 1px 7px;
  margin: 2px 4px 2px 0;
  font-size: 13px;
}

.linkbox {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}
.linkbox input {
  flex: 1;
  font-family: ui-monospace, Consolas, monospace;
}

.foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 860px;
  margin: 0 auto;
  padding: 14px 20px 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12px;
}

.center { text-align: center; }
.mono { font-family: ui-monospace, Consolas, monospace; }

blockquote.quote {
  margin: 10px 0;
  padding: 10px 14px;
  background: #f7f9fb;
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  color: var(--ink);
  font-size: 14px;
}

/* ==========================================================
   移动端适配（窄屏）
   原则：表格转卡片、按钮加大到 44px、主操作按钮置顶
   ========================================================== */

@media (max-width: 720px) {
  html, body { font-size: 15px; }

  .top {
    padding: 10px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .brand { font-size: 14px; }
  .progress { font-size: 12px; }

  .wrap { padding: 18px 14px 32px; }

  h1 { font-size: 20px; margin-bottom: 6px; }
  h2 { font-size: 16px; }
  h3 { font-size: 15px; }

  .lead { font-size: 14px; margin-bottom: 12px; }

  .card {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
  }
  .card h2 { margin-bottom: 8px; }
  .card p { margin-bottom: 8px; }
  .note { font-size: 12.5px; }

  /* 表格 → 卡片 */
  table.tbl {
    display: block;
    border: none;
    font-size: 14px;
  }
  table.tbl thead { display: none; }
  table.tbl tbody,
  table.tbl tr,
  table.tbl td {
    display: block;
    width: 100%;
  }
  table.tbl tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #fff;
  }
  table.tbl tr:last-child { margin-bottom: 0; }
  table.tbl td {
    border: none;
    padding: 3px 0;
    display: flex;
    gap: 10px;
    align-items: baseline;
  }
  table.tbl td::before {
    content: attr(data-label);
    flex: 0 0 76px;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
  }
  table.tbl td:first-child {
    font-weight: 700;
    color: var(--ink);
    border-bottom: 1px solid #eef1f4;
    padding-bottom: 7px;
    margin-bottom: 5px;
  }
  table.tbl td:first-child::before { display: none; }
  table.tbl td.hl { color: var(--primary); }

  /* 对比表（UL 两个赛项 / UL vs UC）保持三列横向对齐，不拆成竖排卡片 */
  table.tbl.cmp {
    display: table;
    table-layout: fixed;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.45;
  }
  table.tbl.cmp thead { display: table-header-group; }
  table.tbl.cmp tbody { display: table-row-group; }
  table.tbl.cmp tr {
    display: table-row;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    background: none;
  }
  table.tbl.cmp th,
  table.tbl.cmp td {
    display: table-cell;
    width: auto;
    border: 1px solid var(--line);
    padding: 5px 6px;
    vertical-align: top;
  }
  table.tbl.cmp th {
    background: #f0f3f6;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
  }
  table.tbl.cmp td::before { content: none; }
  table.tbl.cmp td:first-child {
    width: 17%;
    font-weight: 700;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    padding-bottom: 5px;
    margin-bottom: 0;
  }
  table.tbl.cmp td.hl { color: var(--primary); font-weight: 600; }

  /* 四列对照表（机器人清单）：压缩前三列，把宽度让给技术重点 */
  table.tbl.cmp.four td:first-child { width: 19%; }
  table.tbl.cmp.four th:nth-child(2),
  table.tbl.cmp.four td:nth-child(2) { width: 12%; }
  table.tbl.cmp.four th:nth-child(3),
  table.tbl.cmp.four td:nth-child(3) { width: 24%; }

  /* 单元格内的补充说明，窄屏时独立成行，避免被拦腰折断 */
  .sub { display: block; font-size: 11px; color: var(--ink-2); }

  /* 按钮：44px 触控高度 */
  .btn {
    padding: 12px 18px;
    font-size: 15px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .actions {
    flex-direction: column-reverse;
    gap: 8px;
    margin-top: 20px;
  }
  .actions .btn { width: 100%; }

  .more-row { margin-top: 16px; }
  .more-row .btn { width: 100%; font-size: 13.5px; }

  /* 选项：整行可点 */
  .q { padding: 14px; }
  .q .qtext { font-size: 15px; margin-bottom: 8px; }
  .q .opts { gap: 4px; }
  .q .opt {
    padding: 11px 10px;
    min-height: 44px;
    align-items: center;
    border-radius: 6px;
  }
  .q .opt input { margin-top: 0; flex: 0 0 auto; }
  .q .opt span { font-size: 14px; line-height: 1.55; }

  .two-col { grid-template-columns: 1fr; gap: 12px; }

  .modes { gap: 10px; }
  .mode { padding: 14px; }
  .mode input { margin-top: 2px; }

  .linkbox {
    flex-direction: column;
    gap: 8px;
  }
  .linkbox input { width: 100%; font-size: 12px; }

  textarea { font-size: 14px; }

  .row { gap: 8px; }
  input[type="file"] { max-width: 100%; font-size: 13px; }

  blockquote.quote {
    padding: 10px 12px;
    font-size: 13px;
    border-left-width: 3px;
  }

  .cost dt { margin-top: 12px; font-size: 15px; }
  .cost dd { font-size: 14px; }

  .foot {
    padding: 12px 14px 20px;
    font-size: 11px;
    flex-direction: column;
    gap: 4px;
  }
}

/* 超窄屏（小屏手机竖握） */
@media (max-width: 380px) {
  table.tbl td {
    flex-direction: column;
    gap: 1px;
  }
  table.tbl td::before { flex: none; }
  .btn { font-size: 14px; }
  h1 { font-size: 18px; }
}

/* 报告页在窄屏下的数字排版 */
@media (max-width: 720px) {
  .score-big { font-size: 36px; }
  .bar-row {
    grid-template-columns: 76px 1fr 40px !important;
    font-size: 13px;
    gap: 8px;
  }
}
.foot .icp { color: var(--ink-2); text-decoration: none; }
.foot .icp:hover { text-decoration: underline; }
