/* ===========================================================================
   普通页面：超时 / 帮助 / 关于 / 404 / 摄像头诊断
   与扫码页、结果页共用同一套品牌令牌（css/base.css），不引入新颜色。
   =========================================================================== */

/* ── 超时页 ─────────────────────────────────────────────────────────────── */
/* 页头是 fixed 且占了 --nav-h，所以这两页的"满屏"要把页头高度减掉，
   否则会出现一条永远滚不到底的多余空白。 */
.timeout-default {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h));
  padding: 40px 24px;
  background: var(--light-grey);
}

.timeout-default h2 {
  margin: 0 0 32px;
  font-size: 2.4rem;
  line-height: 3.2rem;
}

.pills {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 440px;
}

.pill {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  text-align: start;
}

.pill-icon {
  width: 5rem;
  height: 5rem;
  object-fit: contain;
  flex-shrink: 0;
}

.pill-text {
  margin: 0;
  font-size: 1.6rem;
  line-height: 2.4rem;
  color: var(--dark-grey);
}

/* 超时页同时给出手动输入与重新扫码两条出路，所以按钮排成一行 */
.timeout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

.timeout-actions .btn-primary {
  margin-top: 0;
}

/* ── 通用内容页（帮助 / 关于）──────────────────────────────────────────── */
.page {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.page h1 {
  font-size: 3.2rem;
  line-height: 3.8rem;
  margin: 0 0 24px;
}

.page h2 {
  font-size: 2.2rem;
  margin: 32px 0 12px;
}

.page h3 {
  margin: 28px 0 8px;
}

.page p,
.page li {
  color: var(--dark-grey);
  line-height: 1.7;
}

.page ul,
.page ol {
  padding-inline-start: 2.2rem;
}

.page a {
  color: var(--navy);
}

.page .lead {
  font-size: 1.8rem;
  color: #000;
}

/* 帮助页的入口卡片列表 */
.help-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.help-menu a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--light-grey);
  border-radius: 10px;
  text-decoration: none;
  color: #000;
  font-size: 1.7rem;
  font-weight: 600;
}

.help-menu img {
  width: 3.6rem;
  height: 3.6rem;
  object-fit: contain;
}

/* 「回到扫码页」这种结尾动作 */
.page-back {
  margin-top: 40px;
  font-weight: 600;
}

/* ── 关于页 ─────────────────────────────────────────────────────────────── */
.about-brand {
  display: flex;
  justify-content: center;
  margin: 0;                 /* 它是 h1，要压掉 .page h1 的默认外边距 */
  padding: 16px 0 8px;
}

.about-brand .wordmark {
  font-size: 6rem;
}

.about-subtitle {
  text-align: center;
  font-style: italic;
  font-size: 2rem;
  color: var(--dark-grey);
  margin: 0 0 8px;
}

.video-grid {
  display: grid;
  gap: 16px;
  margin: 24px 0 8px;
}

.video-card {
  margin: 0;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
}

.video-card a {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  color: #fff;
  overflow: hidden;
}

.video-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card .play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 42px;
  border-radius: 10px;
  background: #f03;
  display: grid;
  place-items: center;
}

.video-card .play::after {
  content: "";
  margin-inline-start: 5px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-inline-start: 16px solid #fff;
}

/* 官网入口：与结果页那颗金色胶囊按钮同一套视觉 */
.site-button {
  display: block;
  margin-top: 24px;
  padding: 14px 18px;
  border-radius: 3.35rem;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
}

/* ── 404 ────────────────────────────────────────────────────────────────── */
.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h));
  padding: 40px 24px;
}

.notfound .code {
  font-size: 6rem;
  font-weight: 300;
  color: var(--mid-grey);
  line-height: 1;
  margin-bottom: 8px;
}

/* ── 摄像头诊断页 ─────────────────────────────────────────────────────────
   这一页的用途就是把浏览器侧的状态原样列出来，所以用等宽字体、允许长字符串折行。
   它只给排查问题的人看，不追求品牌版式。 */
.diag {
  font-family: Menlo, Consolas, monospace;
  font-size: 1.35rem;
  line-height: 1.7;
}

.diag .row {
  padding: 8px 0;
  border-bottom: 1px solid var(--light-grey);
}

.diag .k {
  display: inline-block;
  min-width: 22rem;
  padding-inline-end: 8px;
  color: var(--dark-grey);
}

.diag .ok { color: var(--green); font-weight: 700; }
.diag .no { color: var(--red); font-weight: 700; }

.diag pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 6px 0 0;
  background: var(--light-grey);
  padding: 10px;
  border-radius: 6px;
  font-size: 1.25rem;
}

.verdict {
  padding: 16px;
  border-radius: 8px;
  margin: 24px 0;
  font-size: 1.6rem;
  line-height: 2.4rem;
}

.verdict.good { background: #e6f4ea; }
.verdict.bad  { background: #fdecea; }

@media (max-width: 480px) {
  .diag .k { min-width: 0; display: block; }
}
