/* PDQ-4 测评页 — PC / H5 通用，单文件样式 */
/* 主色：与 #34d399（emerald-400）同系 */
:root {
  --pdq4-accent: #34d399;
  --pdq4-accent-hover: #10b981;
  --pdq4-accent-deep: #059669;
  --pdq4-accent-shadow: rgba(52, 211, 153, 0.4);
  --pdq4-accent-shadow-hover: rgba(16, 185, 129, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #f0f2f5;
}

/* Anti-copy deterrence on protected pages */
body.anti-copy,
body.anti-copy * {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

a {
  color: var(--pdq4-accent-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.bd {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1rem 1rem 2.5rem;
}

@media (min-width: 768px) {
  .bd {
    padding: 1.5rem 1.25rem 3rem;
  }
}

header {
  margin-bottom: 1.25rem;
}

.logo {
  text-align: center;
  margin-bottom: 0.75rem;
}

.logo img {
  max-height: 48px;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.02em;
}

.succinct {
  background: #fff;
  border-radius: 12px;
  padding: 2rem 1.1rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.succinct p {
  margin: 0 0 0.65rem;
  font-size: 0.9375rem;
  color: #374151;
}

.succinct p:last-child {
  margin-bottom: 0;
}

.succinct strong {
  color: #111827;
}

section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

section li {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

section li strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

section li p {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: #4b5563;
}

/* 选项：较大点击区域，窄屏时自动换行 */
label.green.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 0.35rem;
  margin-right: 0.35rem;
  padding: 0.4rem 1rem;
  font-size: 0.9375rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  min-width: 5.5rem;
}

label.green.button:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

label.green.button:has(input:checked) {
  background: #ecfdf5;
  border-color: #34d399;
  color: #065f46;
}

label.green.button input {
  margin: 0 0.5rem 0 0;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #059669;
  flex-shrink: 0;
}

.submit {
  margin: 1.5rem 0 1rem;
  text-align: center;
}

.submit .blue.button,
.pdq4-paywall .blue.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--pdq4-accent);
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 6px var(--pdq4-accent-shadow);
  transition: background 0.15s, box-shadow 0.15s;
}

.submit .blue.button:hover,
.pdq4-paywall .blue.button:hover {
  background: var(--pdq4-accent-hover);
  text-decoration: none;
  box-shadow: 0 3px 10px var(--pdq4-accent-shadow-hover);
}

footer {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.foot {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.beian {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  align-items: center;
  font-size: 0.75rem;
  color: #6b7280;
}

.beian a {
  color: #6b7280;
}

.beian a:hover {
  color: var(--pdq4-accent-deep);
}

.beian img {
  max-height: 18px;
  width: auto;
  margin-right: 0.25rem;
  float: none;
  vertical-align: middle;
}

.beian-police {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

/* ========== 结果页（body.report-page） ========== */

body.report-page header {
  margin-bottom: 1.25rem;
}

body.report-page .logo {
  text-align: center;
  margin-bottom: 0.75rem;
}

body.report-page .logo img {
  max-height: 48px;
}

body.report-page h2.title {
  margin: 0 0 1rem;
  font-size: clamp(1.125rem, 3.5vw, 1.35rem);
  font-weight: 600;
  text-align: center;
  color: #111827;
  letter-spacing: 0.02em;
}

body.report-page .score {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.report-page .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
}

body.report-page .score-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.875rem;
}

body.report-page .score-table th,
body.report-page .score-table td {
  padding: 0.65rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

body.report-page .score-table thead th {
  font-weight: 600;
  color: #374151;
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}

body.report-page .score-table tbody tr:last-child td {
  border-bottom: none;
}

body.report-page .score-table td:nth-child(2),
body.report-page .score-table td:nth-child(3) {
  text-align: center;
  white-space: nowrap;
}

body.report-page .score-table td:nth-child(4) {
  color: #374151;
  min-width: 8rem;
}

body.report-page .reliability {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.875rem;
  color: #4b5563;
}

body.report-page .reliability b {
  color: #111827;
  font-weight: 600;
}

body.report-page .content {
  margin-top: 1.5rem;
}

body.report-page .content h2.title {
  margin-bottom: 1rem;
}

body.report-page .content > div {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

body.report-page .content strong {
  display: block;
  font-size: 0.9375rem;
  color: #111827;
  margin-bottom: 0.35rem;
}

body.report-page .content p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #4b5563;
}

body.report-page .report-back {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.9375rem;
}

body.report-page .report-back a {
  color: var(--pdq4-accent-deep);
  font-weight: 500;
}

body.report-page .report-back a:hover {
  color: var(--pdq4-accent-hover);
}

/* Payment / checkout error */
.pdq4-pay-alert {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  color: #b42318;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
}

/* Paywall after item 10 */
.pdq4-paywall {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem 1.1rem;
  margin: 1rem 0 1.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.pdq4-paywall-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
}

.pdq4-paywall-text {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: #4b5563;
  line-height: 1.55;
}

.pdq4-paywall-btn {
  width: 100%;
  max-width: 22rem;
  border: none;
  cursor: pointer;
  font: inherit;
}

/* Quiz progress */
.pdq4-progress {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0 0 0.9rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  position: sticky;
  top: 0.5rem;
  z-index: 30;
}

.pdq4-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.pdq4-progress-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pdq4-accent), var(--pdq4-accent-hover));
  transition: width 0.25s ease;
}

.pdq4-progress-text {
  margin: 0.45rem 0 0;
  font-size: 0.875rem;
  color: #4b5563;
}

/* Highlight first unanswered question when submit */
section li.pdq4-missing {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* Question pagination */
.pdq4-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1rem 0 0.25rem;
}

.pdq4-page-text {
  font-size: 0.9rem;
  color: #4b5563;
  min-width: 7.5rem;
  text-align: center;
}

.pdq4-page-btn {
  min-height: 40px;
  min-width: 92px;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 0.9rem;
  cursor: pointer;
}

.pdq4-page-btn:hover {
  background: #f9fafb;
}

.pdq4-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Legal disclaimer */
.pdq4-disclaimer {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #fde68a;
  background: #fffbeb;
  border-radius: 10px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #92400e;
}

.pdq4-disclaimer strong {
  color: #78350f;
}
