/* Passion8 模型检测记录
   纯白工作面。层次靠字号与间距的档位建立，不靠边框和底色。
   灰阶四级，全部 >=4.5:1；时间线色条按 brief 锁定，另加同色深描边补足边界辨识。 */

@font-face { font-family: ChineseUI; src: local("PingFang SC"); }
@font-face { font-family: LatinUI;   src: local("Inter"), local("Avenir Next"); }

:root {
  /* 面 */
  --surface: #fff;
  --surface-sunken: #f7f7f8;
  --line: #e5e7eb;
  --line-soft: #f0f1f3;

  /* 字 —— 取 status.openai.com 的中性冷灰，压到 >=4.5:1 于白底 */
  --ink: #161618;      /* 18.07:1  标题、数值 */
  --strong: #3f3f47;   /* 10.43:1  卡片标题、当前导航 */
  --muted: #5f5f68;    /*  6.32:1  正文、次级说明 */
  --subtle: #6b6b75;   /*  5.27:1  最小号标签 */

  /* 状态文字 */
  --text-pass: #15846a;
  --text-fail: #b8503a;
  --text-error: #8a6416;

  /* 时间线色条 —— status.openai.com 原色 */
  --bar-pass: #24c19a;
  --bar-fail: #f5785c;
  --bar-error: #fbbf24;
  --bar-missing: #e4e4e7;
  --bar-running: #7a7ae0;

  /* 字号档位 */
  --t-label: 11px;     /* 标签、脚注 */
  --t-body: 12px;      /* 正文 */
  --t-item: 13px;      /* 卡片标题、区块小标题 */
  --t-metric: 15px;    /* 次级数值 */
  --t-section: 17px;   /* 区块标题 */
  --t-lead: 24px;      /* 主数值 */
  --t-page: 24px;      /* 页标题 */

  --radius: 9px;
  --radius-sm: 5px;
  --shadow: 0 18px 70px #16161826;
  --font: LatinUI, ChineseUI, "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
}

/* ---------- 基础 ---------- */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 25px; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* 浏览器自带表面也归入设计系统 */
::selection { background: #cdeee4; color: #0f4a3c; }
:focus-visible { outline: 2px solid var(--text-pass); outline-offset: 3px; border-radius: 3px; }
* { scrollbar-color: #c9c9cf transparent; scrollbar-width: thin; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link {
  position: fixed; z-index: 10; top: 0; left: 20px;
  padding: 12px; background: var(--ink); color: #fff;
  transform: translateY(-110%);
}
.skip-link:focus { transform: none; }

/* ---------- 页头 ---------- */

.site-header {
  height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 max(32px, calc((100vw - 1200px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.brand-logo { width: 36px; height: 36px; border-radius: var(--radius); object-fit: cover; }
.brand strong { font-size: 20px; font-weight: 650; letter-spacing: -.7px; }
.brand-section {
  font-size: var(--t-body); font-weight: 400; color: var(--muted);
  margin-left: 9px; padding-left: 18px; border-left: 1px solid var(--line);
}
.header-right { display: flex; align-items: center; gap: 25px; font-size: var(--t-body); color: var(--muted); }
.header-right a { padding: 14px 0; }
.header-right a:hover { color: var(--ink); }
.header-right .nav-active { color: var(--strong); font-weight: 600; }
.status-link { display: flex; align-items: center; gap: 7px; }
.status-link svg { width: 14px; height: 14px; }

/* ---------- 页标题 ---------- */

.page { max-width: 1264px; margin: 0 auto; padding: 26px 32px 0; }
.page-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-bottom: 19px;
}
.page-heading h1 {
  font-size: var(--t-page); font-weight: 600;
  letter-spacing: -.02em; line-height: 1.35;
  margin: 0 0 6px; text-wrap: balance;
}
.page-heading p { margin: 0; font-size: var(--t-body); color: var(--muted); line-height: 1.7; }
.preview-mode {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--t-label); color: var(--subtle); white-space: nowrap;
}
.preview-mode > span { width: 6px; height: 6px; background: #b0b0b8; border-radius: 50%; }
.heading-aside { display: inline-flex; align-items: center; gap: 16px; white-space: nowrap; }
.refresh-button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--muted); font-size: var(--t-label);
  transition: background .15s, border-color .15s, color .15s;
}
.refresh-button svg { width: 13px; height: 13px; color: var(--subtle); }
.refresh-button:hover { background: var(--surface-sunken); border-color: #d4d4d9; color: var(--ink); }
.refresh-button:hover svg { color: var(--strong); }
.refresh-button:active svg { transform: rotate(-180deg); transition: transform .4s cubic-bezier(.2, .8, .3, 1); }

/* ---------- 检测概况 ---------- */

.monitor {
  padding: 19px 22px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  scroll-margin-top: 25px;
}
.monitor-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.monitor-name { display: flex; align-items: center; gap: 10px; }
.model-symbol {
  display: flex; align-items: center; justify-content: center;
  width: 33px; height: 33px; border-radius: 7px;
  background: var(--surface-sunken); border: 1px solid var(--line);
  color: var(--strong);
}
.model-symbol svg { width: 19px; height: 19px; }
.monitor h2 {
  margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px;
  font-size: var(--t-section); font-weight: 600; letter-spacing: -.025em;
}
.model-group { font-size: var(--t-body); font-weight: 400; color: var(--muted); white-space: nowrap; letter-spacing: 0; }
.model-group > span { margin-left: 6px; color: var(--subtle); }
.sample-label {
  font-size: var(--t-label); font-weight: 400; letter-spacing: 0;
  padding: 2px 6px; border-radius: 4px;
  background: #f2f2f4; color: var(--muted);
}
.monitor-name p {
  display: flex; align-items: center; gap: 6px;
  margin: 3px 0 0; font-size: var(--t-label); color: var(--muted);
}
.monitor-name p strong { font-weight: 500; color: var(--strong); }
.current-status {
  display: flex; align-items: center; gap: 7px;
  font-size: var(--t-label); font-weight: 500; color: var(--text-pass);
  white-space: nowrap;
}
.current-status > span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--bar-pass);
}

/* 统计：通过率领读，其余三项成组收在右侧 */
.monitor-stats {
  display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px 40px;
  margin: 18px 0 17px; padding-bottom: 17px;
  border-bottom: 1px solid var(--line-soft);
}
.stat-lead { display: flex; flex-direction: column; gap: 3px; }
.stat-lead > span { font-size: var(--t-label); color: var(--muted); }
.stat-lead strong {
  font-size: var(--t-lead); font-weight: 600;
  letter-spacing: -.035em; line-height: 1.1; color: var(--text-pass);
}
.stat-lead small { font-size: var(--t-label); color: var(--subtle); }
.stat-group { display: flex; flex-wrap: wrap; gap: 12px 44px; margin-left: auto; }
.stat-group > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.stat-group > div > span { font-size: var(--t-label); color: var(--muted); }
.stat-group strong {
  font-size: var(--t-metric); font-weight: 550;
  letter-spacing: -.01em; line-height: 1.3; white-space: nowrap;
}
.stat-group em {
  font-style: normal; font-size: var(--t-label); font-weight: 400;
  letter-spacing: 0; color: var(--subtle); margin-left: 3px;
}
.stat-group small { font-size: var(--t-label); color: var(--subtle); white-space: nowrap; }

/* 时间线 */
.timeline-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 10px;
}
.timeline-heading h3 { margin: 0; font-size: var(--t-body); font-weight: 500; color: var(--strong); }
.timeline-heading > span { font-size: var(--t-label); color: var(--subtle); }

.timeline-scroll { position: relative; }
.timeline {
  display: grid;
  grid-template-columns: repeat(var(--timeline-count, 144), minmax(0, 1fr));
  gap: 3px;
  padding: 4px 0;
}
.timeline-bar {
  height: 26px; min-width: 0; padding: 0; border: 0; border-radius: 2px;
  position: relative;
  background: var(--bar-missing);

  transition: transform .14s cubic-bezier(.2, .8, .3, 1), filter .14s;
}
.timeline-bar.passed  { background: var(--bar-pass); }
.timeline-bar.failed  { background: var(--bar-fail); }
.timeline-bar.error   { background: var(--bar-error); }
.timeline-bar.running { background: var(--bar-running); }
.timeline-bar::after { content: ""; position: absolute; inset: -8px 0; }
.timeline-bar:hover,
.timeline-bar[aria-pressed="true"] { transform: scaleY(1.2); filter: brightness(.93); }
.timeline-bar[aria-pressed="true"] { filter: brightness(.86); }
.timeline-bar:focus-visible { outline-offset: 2px; z-index: 2; }

/* 悬停提示：替掉浏览器默认 title 气泡 */
.timeline-tip {
  position: absolute; bottom: calc(100% + 6px);
  transform: translateX(-50%);
  padding: 5px 9px; border-radius: var(--radius-sm);
  background: var(--ink); color: #f4f4f6;
  font-size: var(--t-label); line-height: 1.5; white-space: nowrap;
  pointer-events: none; z-index: 3;
  opacity: 0; transition: opacity .12s;
}
.timeline-tip.visible { opacity: 1; }
.timeline-tip b { font-weight: 500; margin-left: 7px; }
.timeline-tip[data-state="passed"] b  { color: var(--bar-pass); }
.timeline-tip[data-state="failed"] b  { color: var(--bar-fail); }
.timeline-tip[data-state="error"] b   { color: var(--bar-error); }

/* 刻度轴 */
.timeline-axis {
  position: relative; height: 22px; margin-top: 4px;
  font-size: var(--t-label); color: var(--subtle);
}
.timeline-axis .tick { position: absolute; top: 0; white-space: nowrap; }
.timeline-axis .tick::before {
  content: ""; position: absolute; top: -4px; left: 50%;
  width: 1px; height: 4px; background: var(--line);
}
.timeline-axis .tick.start { left: 0; }
.timeline-axis .tick.start::before { left: 0; }
.timeline-axis .tick.end { right: 0; }
.timeline-axis .tick.end::before { left: auto; right: 0; }
.timeline-axis .tick.mid { transform: translateX(-50%); }
/* 窄屏下隐去次要刻度，避免标签互相压住 */
.timeline-range {
  display: none;
  justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 7px; font-size: var(--t-label); color: var(--subtle);
}

.timeline-detail {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-top: 12px; padding: 12px 14px;
  background: var(--surface-sunken); border-radius: 7px;
}
.timeline-detail strong { font-size: var(--t-body); font-weight: 550; }
.timeline-detail p { margin: 5px 0 0; font-size: var(--t-body); color: var(--muted); line-height: 1.7; }

.monitor-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line-soft);
}
.timeline-legend {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  font-size: var(--t-label); color: var(--muted);
}
.timeline-legend > span { display: flex; align-items: center; gap: 6px; }
.timeline-legend i { width: 8px; height: 8px; border-radius: 2px; }
.timeline-legend .passed  { background: var(--bar-pass); }
.timeline-legend .failed  { background: var(--bar-fail); }
.timeline-legend .error   { background: var(--bar-error); }
.timeline-legend .missing { background: var(--bar-missing); }
.timeline-legend .running { background: var(--bar-running); }
.monitor-footer > a { font-size: var(--t-label); color: var(--muted); white-space: nowrap; }
.monitor-footer > a:hover { color: var(--ink); }
.monitor-footer > a span { margin-left: 4px; }

/* ---------- 检测题目（入口 + 弹窗） ---------- */

.prompt-entry {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0; border: 0; background: none;
  font-size: var(--t-label); color: var(--muted); white-space: nowrap;
}
.prompt-entry span { color: var(--strong); font-weight: 500; }
.prompt-entry svg { width: 13px; height: 13px; color: var(--subtle); }
.prompt-entry:hover { color: var(--ink); }
.prompt-entry:hover svg { color: var(--strong); }

.prompt-list { padding: 4px 28px 24px; display: flex; flex-direction: column; gap: 20px; }
.prompt-block { display: flex; flex-direction: column; }
.prompt-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.prompt-top h3 { margin: 0; font-size: var(--t-item); font-weight: 600; }
.test-cadence { font-size: var(--t-label); color: var(--muted); }
.prompt-text {
  margin: 0; padding: 14px; border-radius: 7px;
  background: var(--surface-sunken); color: #3f3f47;
  font: var(--t-body) / 1.85 var(--font-mono);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.prompt-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 10px; }
.prompt-foot dl { margin: 0; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.prompt-foot dl > div { display: flex; gap: 8px; font-size: var(--t-label); }
.prompt-foot dt { color: var(--subtle); white-space: nowrap; }
.prompt-foot dd { margin: 0; color: var(--strong); }
.prompt-foot .button { flex-shrink: 0; min-height: 31px; padding: 6px 11px; font-size: var(--t-label); }

/* ---------- 记录 ---------- */

#records { margin-top: 30px; }
.record-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.gallery-heading h2 {
  margin: 0; display: flex; align-items: center; gap: 8px;
  font-size: var(--t-section); font-weight: 600; letter-spacing: -.02em;
}
.gallery-heading h2 > span {
  font-size: var(--t-label); font-weight: 400; letter-spacing: 0;
  padding: 2px 6px; border-radius: 4px;
  background: #f2f2f4; color: var(--muted);
}
.record-note { font-size: var(--t-label); color: var(--subtle); white-space: nowrap; }

.record-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 20px; margin-top: 15px; }
.record-card { min-width: 0; }

.preview-button {
  position: relative; display: block; width: 100%;
  padding: 30px 0 0; text-align: left;
  background: transparent; border: 0; border-radius: var(--radius);
}
.preview-canvas {
  position: relative; display: block; aspect-ratio: 5 / 4; overflow: hidden;
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: var(--surface-sunken);
}
.preview-button img { width: 100%; height: 100%; object-fit: contain; display: block; }
.preview-button iframe {
  position: absolute; top: 0; left: 0;
  width: 1000px; height: 800px; display: block; border: 0; pointer-events: none;
  zoom: var(--preview-scale, 1);
}
.preview-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: var(--t-body); }
.preview-tag {
  position: absolute; top: 6px; left: 0;
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--subtle); font-size: var(--t-label);
}
.preview-tag svg { width: 11px; height: 11px; }
.preview-open {
  position: absolute; top: 0; right: 0;
  display: flex; align-items: center; justify-content: center;
  width: 27px; height: 27px; border-radius: var(--radius-sm);
  background: transparent; color: var(--subtle);
  transition: background .15s, color .15s;
}
.preview-open svg { width: 15px; height: 15px; }
.preview-button:hover .preview-open { background: var(--surface-sunken); color: var(--ink); }

/* 卡片正文：标题组 / 来源 / 时间 三层 */
.record-body { padding: 10px 0 0; }
.record-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.record-title {
  border: 0; background: transparent; padding: 0; text-align: left;
  font-size: var(--t-item); font-weight: 600; line-height: 1.6;
  color: var(--ink);
  min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.record-title:hover { color: var(--text-pass); }
.result { display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-label); white-space: nowrap; flex-shrink: 0; }
.result::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.result.passed { color: var(--text-pass); }
.result.failed { color: var(--text-fail); }
.result.error { color: var(--text-error); }
.result.generated { color: var(--subtle); }

.record-bottom {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 7px;
  font-size: var(--t-label); color: var(--subtle);
}
.duration { display: flex; align-items: center; gap: 5px; }
.duration svg { width: 12px; height: 12px; }

.records-end {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  margin: 21px 0 24px; font-size: var(--t-label); color: var(--subtle);
}
.records-end p { margin: 0; }
.record-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.page-button { min-width: 44px; min-height: 44px; padding: 8px 12px; }
.page-button[aria-current="page"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }

/* 答题卡与失败卡 —— 接入服务端检测后启用 */
.answer-preview {
  width: 100%; height: 100%; padding: 30px 27px 22px;
  background: #f3f1eb;
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
}
.answer-preview .question { font-size: var(--t-body); line-height: 1.7; color: #5c5a4e; max-width: 32ch; }
.answer-preview strong {
  font-size: 38px; font-weight: 500; line-height: 1;
  letter-spacing: -.04em; color: #33513c;
}
.answer-preview strong.wrong { color: #8c4149; }
.answer-preview .answer-label {
  font-size: var(--t-label); margin-left: 10px;
  letter-spacing: 0; color: #6b6656; vertical-align: middle;
}
.error-preview {
  width: 100%; height: 100%; padding: 35px 20px 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  background: #f6f2e9; color: #7a6440;
}
.error-preview > svg { width: 28px; height: 28px; margin-bottom: 2px; }
.error-preview strong { font-size: var(--t-item); font-weight: 500; }
.error-preview span { font-size: var(--t-label); color: #756851; }

/* ---------- 检测说明 ---------- */

.method {
  display: grid; grid-template-columns: 1fr 1.65fr; gap: 28px;
  padding: 20px 0 18px; border-top: 1px solid var(--line);
}
.method h2 { margin: 0 0 7px; font-size: var(--t-item); font-weight: 500; color: var(--strong); }
.method p { margin: 0; font-size: var(--t-label); line-height: 1.85; color: var(--muted); }
.method dl { margin: 0; }
.method dl > div { display: grid; grid-template-columns: 75px 1fr; gap: 10px; margin: 0 0 7px; }
.method dt { display: flex; align-items: center; gap: 7px; font-size: var(--t-label); color: var(--strong); }
.method dd { margin: 0; font-size: var(--t-label); line-height: 1.8; color: var(--muted); }
.legend-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.green { color: var(--text-pass); }
.rose { color: var(--text-fail); }
.amber { color: var(--text-error); }

.site-footer {
  display: flex; justify-content: space-between; gap: 18px;
  max-width: 1200px; margin: auto; padding: 17px 0 22px;
  border-top: 1px solid var(--line);
  font-size: var(--t-label); color: var(--muted);
}
.footer-dot { margin: 0 8px; color: var(--subtle); }

/* ---------- 控件 ---------- */

.icon-button {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 0; border-radius: var(--radius-sm);
  background: #f2f2f4; color: var(--muted);
  transition: background .15s, color .15s;
}
.icon-button:hover { background: #e8e8ec; color: var(--ink); }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 37px; padding: 8px 13px;
  border: 1px solid #dededf; border-radius: 6px;
  background: var(--surface); color: var(--strong);
  font-size: var(--t-body); white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.button:hover { background: #f4f4f6; border-color: #cbcbd1; }
.button.primary { background: #29292f; border-color: #29292f; color: #fafafb; }
.button.primary:hover { background: #3f3f47; border-color: #3f3f47; }
.button svg { width: 14px; height: 14px; }

/* ---------- 详情 ---------- */

dialog {
  width: min(880px, calc(100vw - 40px));
  max-height: calc(100dvh - 48px);
  padding: 0; border: 0; border-radius: 14px;
  background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow);
  overflow-y: auto; overscroll-behavior: contain;
}
dialog::backdrop { background: #16161855; backdrop-filter: blur(3px); }
.detail-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px 16px; }
.detail-id { font-size: var(--t-label); color: var(--subtle); }
.detail-header h2 { margin: 5px 0 0; font-size: 22px; font-weight: 550; letter-spacing: -.03em; }
.detail-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
  padding: 0 28px 23px; font-size: var(--t-label); color: var(--muted);
}
.detail-tabs { display: flex; gap: 27px; padding: 0 28px; border-bottom: 1px solid var(--line); }
.detail-tabs button {
  border: 0; border-bottom: 2px solid transparent; padding: 0 0 12px;
  background: transparent; color: var(--muted); font-size: var(--t-body);
}
.detail-tabs button:hover:not(:disabled) { color: var(--ink); }
.detail-tabs button.active { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.detail-content {
  min-height: 320px; max-height: 64dvh; overflow: auto;
  padding: 24px 28px; background: var(--surface);
}
.detail-content iframe { width: 100%; height: 470px; border: 0; border-radius: 8px; display: block; }
.detail-content pre {
  margin: 0; white-space: pre-wrap; overflow-wrap: anywhere;
  font: var(--t-body) / 1.85 var(--font-mono); color: #4a4a53;
}
.detail-content .prompt-text {
  padding: 14px; border-radius: 7px;
  background: var(--surface-sunken); color: #3f3f47;
}
.detail-content h3 { margin: 22px 0 10px; font-size: var(--t-body); font-weight: 600; }
.detail-content h3:first-child { margin-top: 0; }
.detail-content p { font-size: var(--t-body); line-height: 1.9; color: var(--muted); max-width: 70ch; }
.detail-content .answer-value { font-size: var(--t-body); margin: 15px 0; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.detail-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 17px 28px; border-top: 1px solid var(--line); background: #fafafb;
}
.detail-footer > span { font-size: var(--t-label); color: var(--muted); }
.detail-footer > div { display: flex; gap: 8px; }

.toast {
  position: fixed; bottom: 28px; left: 50%; z-index: 10;
  transform: translate(-50%, 15px);
  padding: 12px 20px; border-radius: 8px;
  background: var(--ink); color: #fafafb; font-size: var(--t-body);
  opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .18s cubic-bezier(.2, .8, .3, 1);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 自适应 ---------- */

@media (max-width: 1100px) {
  .site-header { padding: 0 24px; }
  .page { padding: 24px 24px 0; }
  .stat-group { gap: 12px 20px; }
  .stat-group small { display: none; }
  .site-footer { margin: 0 24px; }
}

@media (max-width: 1000px) {
  .record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .monitor { padding: 19px 18px 15px; }
  .header-right { gap: 20px; }
  .timeline { gap: 2.5px; }
  .method { grid-template-columns: 1fr 1.5fr; gap: 24px; }
}

@media (max-width: 800px) {
  .timeline-axis .tick.low { display: none; }
}

@media (max-width: 650px) {
  .site-header { height: 60px; padding: 0 16px; }
  .brand { gap: 8px; }
  .brand-logo { width: 32px; height: 32px; border-radius: 8px; }
  .brand strong { font-size: 18px; }
  .brand-section { display: none; }
  .header-right { gap: 15px; font-size: var(--t-label); }
  .header-right > a:first-child { display: none; }

  .page { padding: 22px 16px 0; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 17px; }
  .heading-aside { width: 100%; justify-content: space-between; gap: 8px; }
  .page-heading h1 { font-size: 22px; line-height: 1.35; margin-bottom: 5px; }
  .page-heading p { font-size: var(--t-label); max-width: 24em; }
  .preview-mode { margin-top: 0; }

  .monitor { padding: 16px 14px 13px; border-radius: 8px; }
  .monitor-heading { gap: 10px; }
  .monitor-name { gap: 8px; min-width: 0; }
  .monitor-name > div { min-width: 0; }
  .model-symbol { width: 29px; height: 29px; border-radius: 6px; flex-shrink: 0; }
  .model-symbol svg { width: 17px; height: 17px; }
  .monitor h2 { font-size: var(--t-item); gap: 4px 7px; }
  .monitor-name p { gap: 5px; }
  .current-status { gap: 5px; }

  .monitor-stats { gap: 14px 22px; margin: 15px 0 13px; padding-bottom: 13px; }
  .stat-lead strong { font-size: 21px; }
  .stat-group { width: 100%; margin-left: 0; gap: 12px 22px; }
  .stat-group > div { flex: 1; }
  .stat-group small { display: none; }

  .timeline-heading { gap: 5px; margin-bottom: 9px; }
  .timeline-heading h3 { font-size: var(--t-label); }
  .timeline-heading > span { font-size: 10px; }
  .timeline { grid-template-columns: repeat(48, minmax(0, 1fr)); gap: 5px 2px; }
  .timeline-bar { height: 22px; border-radius: 1px; }
  .timeline-bar::after { inset: -3px 0; }
  .timeline-axis { display: none; }
  .timeline-range { display: flex; margin-top: 8px; }
  .timeline-tip { display: none; }

  .monitor-footer { margin-top: 12px; padding-top: 11px; gap: 6px; align-items: flex-start; }
  .timeline-legend { gap: 8px 11px; font-size: 10px; }
  .timeline-legend i { width: 6px; height: 6px; }
  .monitor-footer > a { font-size: 10px; }
  .timeline-detail { padding: 12px; gap: 12px; }
  .timeline-detail .icon-button { width: 28px; height: 28px; flex-shrink: 0; }
  .timeline-detail .icon-button svg { width: 15px; height: 15px; }

  #records { margin-top: 24px; }
  .prompt-list { padding: 4px 18px 20px; gap: 16px; }
  .prompt-text { padding: 12px; }
  .prompt-foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .prompt-entry { gap: 6px; }
  .record-toolbar { align-items: baseline; gap: 10px; }
  .gallery-heading h2 { font-size: 16px; }
  .record-note { font-size: 10px; white-space: normal; text-align: right; }
  .record-grid { grid-template-columns: 1fr; gap: 22px; margin-top: 13px; }

  .method { grid-template-columns: 1fr; gap: 15px; padding: 18px 0; }
  .method dl > div { grid-template-columns: 65px 1fr; }
  .site-footer { flex-direction: column; gap: 7px; margin: 0 16px; padding: 16px 0 23px; }
  .records-end { margin: 20px 0 23px; }

  dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 24px); border-radius: 12px; }
  .detail-header { padding: 20px 18px 14px; }
  .detail-header h2 { font-size: 20px; }
  .detail-meta { padding: 0 18px 18px; gap: 10px; }
  .detail-tabs { padding: 0 18px; gap: 25px; }
  .detail-content { padding: 18px; min-height: 250px; max-height: 60dvh; }
  .detail-content iframe { height: 340px; }
  .detail-footer { flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 18px; }
  .detail-footer > div { width: 100%; }
  .detail-footer .button { flex: 1; }
  .toast { max-width: 90vw; width: max-content; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .timeline-bar:hover, .timeline-bar[aria-pressed="true"] { transform: none; }
}

.current-status[data-state="missing"] { color: var(--subtle); }
.current-status[data-state="missing"] > span { background: var(--bar-missing); }
.current-status[data-state="error"] > span { background: var(--bar-error); }
.current-status[data-state="error"] { color: var(--text-error); }
.current-status[data-state="failed"] > span { background: var(--bar-fail); }
.current-status[data-state="failed"] { color: var(--text-fail); }
.current-status[data-state="running"] > span { background: var(--bar-running); }
.current-status[data-state="running"], .result.running { color: #5c55a2; }
.running-preview, .running-preview span { background: #f5f4fa; color: #5c55a2; }
#timeline-detail-body > span { display: block; margin-top: 6px; }
#records-end .button { margin-left: 12px; }
