/* ============================================================
   TruthNote · web 端落地页样式
   主视觉：小T 检测仪基调 —— 白底 #FFFFFF + 黑结构 #000000，
   三判定色（真/假/无法核实）是唯一彩色，蓝 #4A90D9 = live/检测 强调点。
   全站直角/极小圆角，呼应插件卡片规范。
   卡片本身复用 render-cards.css，本文件只管页面骨架 + 流程图 + 设备框。
   ============================================================ */

/* ---- 动效令牌：render-cards.css 依赖这些变量（原在插件 content.css，web 端补齐）---- */
:root {
  --tn-mo-fast: 150ms;
  --tn-mo-enter: 240ms;
  --tn-mo-final: 360ms;
  --tn-mo-chain: 200ms;
  --tn-mo-breathe: 5.5s;
  --tn-mo-steppulse: 2.6s;
  --tn-mo-cardrest: 7s;
  --tn-mo-lumen: 6s;
  --tn-mo-glow: 4s;
  --tn-ease-enter: cubic-bezier(.16,1,.3,1);
  --tn-ease-spring: cubic-bezier(.34,1.56,.64,1);
  --tn-ease-sine: ease-in-out;
  --tn-ease-out: cubic-bezier(0,0,.2,1);
  --tn-stagger-step: 55ms;

  --site-max: 1120px;
  --ink: #000000;
  --ink-2: #444444;
  --ink-3: #888888;
  --line: #E5E5E5;
  --line-2: #EEEEEE;
  --paper: #FFFFFF;
  --wash: #F5F6F7;
  --live: #4A90D9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Alibaba PuHuiTi", "Source Han Sans", "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  background: var(--wash);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--site-max); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-size: 12px; letter-spacing: 2px; color: var(--ink-3);
  text-transform: uppercase; font-weight: 700;
}

/* ===================== 顶栏 ===================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; height: 60px; gap: 14px; }
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-mark { width: 28px; height: 28px; display: block; }
.nav-name { font-weight: 800; font-size: 17px; letter-spacing: .5px; }
.nav-name .en { color: var(--ink); }
.nav-name .cn { color: var(--ink-3); font-weight: 600; font-size: 13px; margin-left: 6px; }
.nav-pills { margin-left: auto; display: flex; gap: 8px; }
.nav-pill {
  font-size: 12px; color: var(--ink-2); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: 2px; background: #fff; white-space: nowrap;
}
.nav-cta {
  font-size: 13px; font-weight: 700; color: #fff; background: var(--ink);
  padding: 8px 16px; border-radius: 2px; border: 1px solid var(--ink);
  transition: opacity var(--tn-mo-fast) var(--tn-ease-out);
}
.nav-cta:hover { opacity: .82; }
@media (max-width: 760px){ .nav-pills{ display:none; } }

/* ===================== Hero ===================== */
.hero { padding: 64px 0 40px; }
.hero .wrap {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center;
}
.hero h1 {
  font-size: 44px; line-height: 1.18; font-weight: 800; letter-spacing: -.5px;
  margin: 14px 0 0;
}
.hero h1 .hl {
  background: linear-gradient(transparent 60%, #FFE08044 60%);
  padding: 0 2px;
}
.hero .sub {
  font-size: 16px; color: var(--ink-2); margin-top: 18px; max-width: 540px;
}
.hero .sub b { color: var(--ink); font-weight: 700; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; padding: 12px 22px; border-radius: 2px;
  border: 1px solid var(--ink); cursor: pointer;
  transition: transform var(--tn-mo-fast) var(--tn-ease-out), opacity var(--tn-mo-fast);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { opacity: .85; }
.btn-ghost { background: #fff; color: var(--ink); }
.btn-ghost:hover { background: var(--wash); }
.btn .tri { color: var(--live); font-size: 12px; }
.btn-primary .tri { color: #fff; }

.hero-meta { display: flex; gap: 22px; margin-top: 26px; flex-wrap: wrap; }
.hero-meta .m { display: flex; flex-direction: column; }
.hero-meta .m-num { font-size: 22px; font-weight: 800; }
.hero-meta .m-lab { font-size: 12px; color: var(--ink-3); }

/* ---- Hero 右侧：小T 主视觉 + 网页选词演示 ---- */
.hero-visual { position: relative; display: flex; flex-direction: column; align-items: center; }
.mascot-stage {
  position: relative; width: 220px; height: 220px;
  display: flex; align-items: center; justify-content: center;
}
.mascot { width: 168px; height: 168px; display: block; }
/* 眼睛眨动（CSS scaleY 脉冲） */
.mascot .eye { transform-box: fill-box; transform-origin: center; animation: tn-blink 5.2s var(--tn-ease-sine) infinite; }
@keyframes tn-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(.12); }
}
/* live 蓝点（检测仪心跳） */
.mascot-live {
  position: absolute; top: 14px; right: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: var(--live);
  background: #fff; border: 1px solid #DCEAF7; padding: 4px 9px; border-radius: 20px;
}
.mascot-live .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--live);
  animation: tn-livepulse 1.8s var(--tn-ease-sine) infinite;
}
@keyframes tn-livepulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,144,217,.5); }
  60% { box-shadow: 0 0 0 7px rgba(74,144,217,0); }
}

/* 网页选词小演示卡 */
.pick-demo {
  width: 300px; margin-top: 6px; background: #fff;
  border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px;
  box-shadow: var(--tn-shadow-card);
}
.pick-demo .url {
  font-size: 11px; color: var(--ink-3); font-family: var(--tn-font-mono);
  border-bottom: 1px solid var(--line-2); padding-bottom: 8px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.pick-demo .url .lock { color: var(--ink-3); }
.pick-demo .line { height: 8px; background: #EFEFEF; border-radius: 2px; margin: 9px 0; }
.pick-demo .line.short { width: 62%; }
.pick-demo .sel {
  display: inline; background: #FFE489; box-shadow: 0 0 0 2px #FFE489;
  font-size: 13px; color: #222; padding: 1px 2px; border-radius: 2px;
}
.pick-demo .ctx {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: #fff; background: var(--ink); padding: 6px 11px; border-radius: 3px;
  animation: tn-floaty 3.4s var(--tn-ease-sine) infinite;
}
@keyframes tn-floaty { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-3px);} }
.ctx-eyes { letter-spacing: 1px; }

/* ===================== 通用 section ===================== */
.section { padding: 56px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 38px; }
.section-head h2 { font-size: 30px; font-weight: 800; letter-spacing: -.3px; margin-top: 10px; }
.section-head p { font-size: 15px; color: var(--ink-2); margin-top: 12px; }
.section--wash { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ===================== 核查流程图（4 阶段）===================== */
.flowmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; align-items: stretch; }
.fstage {
  position: relative; padding: 0 16px;
  border-left: 1px solid var(--line);
}
.fstage:first-child { border-left: none; }
.fstage-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.fstage-idx {
  font-size: 13px; font-weight: 800; color: #fff; background: var(--ink);
  width: 22px; height: 22px; border-radius: 2px; display: inline-flex;
  align-items: center; justify-content: center; flex-shrink: 0;
  transition: background var(--tn-mo-fast), transform var(--tn-mo-fast) var(--tn-ease-spring);
}
.fstage-title { font-size: 15px; font-weight: 800; }
.fstage-desc { font-size: 12px; color: var(--ink-3); margin: 6px 0 14px; min-height: 32px; }
.fnodes { display: flex; flex-direction: column; gap: 8px; }
.fnode {
  border: 1px solid var(--line); border-radius: 3px; padding: 9px 11px; background: #fff;
  transition: border-color var(--tn-mo-fast), box-shadow var(--tn-mo-fast), transform var(--tn-mo-fast) var(--tn-ease-out);
  position: relative;
}
.fnode-name { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.fnode-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #CFCFCF; flex-shrink: 0;
  transition: background var(--tn-mo-fast), box-shadow var(--tn-mo-fast);
}
.fnode-desc { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; line-height: 1.45; }

/* live：阶段被激活 */
.fstage.is-active .fstage-idx { background: var(--live); transform: scale(1.08); }
.fstage.is-done .fstage-idx { background: #2E7D32; }
.fnode.is-active {
  border-color: var(--live); box-shadow: 0 0 0 3px rgba(74,144,217,.14);
  transform: translateY(-1px);
}
.fnode.is-active .fnode-dot {
  background: var(--live); box-shadow: 0 0 0 4px rgba(74,144,217,.18);
  animation: tn-livepulse 1.6s var(--tn-ease-sine) infinite;
}
.fnode.is-done { border-color: #CDE6D0; }
.fnode.is-done .fnode-dot { background: #2E7D32; box-shadow: none; animation: none; }
.fnode-check {
  position: absolute; top: 9px; right: 10px; font-size: 11px; color: #2E7D32;
  opacity: 0; transform: scale(.6); transition: opacity var(--tn-mo-fast), transform var(--tn-mo-fast) var(--tn-ease-spring);
}
.fnode.is-done .fnode-check { opacity: 1; transform: scale(1); }

@media (max-width: 900px){
  .flowmap { grid-template-columns: 1fr 1fr; gap: 22px 0; }
  .fstage { border-left: 1px solid var(--line); }
  .fstage:nth-child(odd){ border-left: none; }
}
@media (max-width: 560px){
  .flowmap { grid-template-columns: 1fr; }
  .fstage, .fstage:nth-child(odd){ border-left: none; border-top: 1px solid var(--line); padding-top: 16px; }
  .fstage:first-child{ border-top: none; }
}

/* ===================== 现场核查 demo ===================== */
.demo-controls {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  justify-content: center; margin-bottom: 22px;
}
.tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tab {
  font-size: 13px; font-weight: 600; color: var(--ink-2); background: #fff;
  border: 1px solid var(--line); border-radius: 2px; padding: 8px 14px; cursor: pointer;
  transition: all var(--tn-mo-fast) var(--tn-ease-out); white-space: nowrap;
}
.tab:hover { border-color: #BBB; }
.tab.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab .v { font-size: 11px; opacity: .7; margin-left: 6px; }

.demo-stage {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 24px; align-items: start;
}

/* 左：被核查的原文 + 流程提示 */
.demo-source {
  background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  position: sticky; top: 76px;
}
.demo-source-head {
  display: flex; align-items: center; gap: 8px; padding: 11px 16px;
  border-bottom: 1px solid var(--line-2); font-size: 12px; color: var(--ink-3);
  font-family: var(--tn-font-mono);
}
.demo-source-head .dots { display: flex; gap: 5px; }
.demo-source-head .dots i { width: 9px; height: 9px; border-radius: 50%; background: #E2E2E2; }
.demo-source-body { padding: 18px 18px 20px; }
.demo-source-label { font-size: 11px; letter-spacing: 1px; color: var(--ink-3); font-weight: 700; }
.demo-source-text {
  font-size: 16px; line-height: 1.7; color: #1a1a1a; margin-top: 10px;
  border-left: 3px solid var(--ink); padding-left: 14px;
}
.demo-source-text.sel-hl { background: linear-gradient(transparent 58%, #FFE08066 58%); }
.demo-source-img { width: 100%; border-radius: 4px; margin-top: 14px; border: 1px solid var(--line-2); display: block; }
.demo-source-cap { font-size: 11.5px; color: var(--ink-3); margin-top: 7px; }

.demo-run {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
}
.demo-run-label { font-size: 12px; color: var(--ink-3); }
.demo-run-label b { color: var(--live); }
.replay {
  font-size: 13px; font-weight: 700; color: #fff; background: var(--ink);
  border: 1px solid var(--ink); border-radius: 2px; padding: 8px 16px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: opacity var(--tn-mo-fast);
}
.replay:hover { opacity: .85; }
.replay .tri { color: var(--live); font-size: 11px; }
.replay[disabled] { opacity: .45; cursor: default; }

/* 右：插件侧栏（设备框）+ 卡片瀑布 */
.panel-frame {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,.08); overflow: hidden; display: flex; flex-direction: column;
  min-height: 560px; max-height: 78vh;
}
.panel-top {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--line-2); flex-shrink: 0;
}
.panel-top .pmark { width: 22px; height: 22px; }
.panel-top .ptitle { font-weight: 800; font-size: 14px; }
.panel-top .pstatus {
  margin-left: auto; font-size: 11.5px; color: var(--live); font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
}
.panel-top .pstatus .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--live);
  animation: tn-livepulse 1.6s var(--tn-ease-sine) infinite;
}
.panel-top .pstatus.is-idle { color: var(--ink-3); }
.panel-top .pstatus.is-idle .dot { background: #CCC; animation: none; }
.panel-top .pstatus.is-done { color: #2E7D32; }
.panel-top .pstatus.is-done .dot { background: #2E7D32; animation: none; }

/* 进度条 */
.panel-prog { height: 3px; background: var(--line-2); flex-shrink: 0; }
.panel-prog-fill {
  height: 100%; width: 0; background: var(--live);
  transition: width 420ms var(--tn-ease-out);
}

/* 结果横幅（done 时填入） */
.result-banner {
  margin: 0; padding: 0; max-height: 0; overflow: hidden;
  border-bottom: 0 solid var(--line-2);
  transition: max-height var(--tn-mo-final) var(--tn-ease-enter), padding var(--tn-mo-final);
  flex-shrink: 0;
}
.result-banner.show { max-height: 140px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.result-banner-zh { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.result-banner-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.result-stamp {
  font-size: 12px; font-weight: 800; color: #fff; padding: 3px 10px; border-radius: 2px;
}
.result--false .result-stamp { background: var(--tn-false); }
.result--true  .result-stamp { background: var(--tn-true); }
.result--unverified .result-stamp { background: var(--tn-unverified); }
.result--false .result-banner-zh { color: var(--tn-false); }
.result--true  .result-banner-zh { color: #2E7D32; }
.result--unverified .result-banner-zh { color: #B7791F; }

/* 卡片瀑布滚动区 */
.stream {
  flex: 1; overflow-y: auto; padding: 16px 16px 28px; background: var(--wash);
  scroll-behavior: smooth;
}
.stream::-webkit-scrollbar { width: 8px; }
.stream::-webkit-scrollbar-thumb { background: #D5D5D5; border-radius: 4px; }
.stream-empty {
  height: 100%; min-height: 380px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; color: var(--ink-3); gap: 14px;
}
.stream-empty .em-mark { width: 64px; height: 64px; opacity: .85; }
.stream-empty .em-title { font-weight: 700; color: var(--ink-2); font-size: 15px; }
.stream-empty .em-sub { font-size: 12.5px; max-width: 260px; }

@media (max-width: 900px){
  .demo-stage { grid-template-columns: 1fr; }
  .demo-source { position: static; }
  .panel-frame { max-height: none; }
}

/* ===================== 为什么可信 ===================== */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.why-card {
  background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 22px 20px;
  transition: transform var(--tn-mo-fast) var(--tn-ease-out), box-shadow var(--tn-mo-fast);
}
.why-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.07); }
.why-ico {
  width: 38px; height: 38px; border: 1px solid var(--ink); border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 19px; margin-bottom: 14px;
}
.why-card h3 { font-size: 16px; font-weight: 800; }
.why-card p { font-size: 13px; color: var(--ink-2); margin-top: 8px; line-height: 1.6; }
@media (max-width: 900px){ .why-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px){ .why-grid { grid-template-columns: 1fr; } }

/* ===================== 页脚 ===================== */
.footer { border-top: 1px solid var(--line); background: #fff; padding: 40px 0; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.footer-brand img { width: 26px; height: 26px; }
.footer-note { font-size: 12px; color: var(--ink-3); max-width: 560px; line-height: 1.6; }

/* ===================== 在线检测：输入栏 ===================== */
.checkbar { margin-top: 26px; max-width: 560px; }
.checkbar-box {
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: var(--tn-shadow-card); overflow: hidden;
  transition: border-color var(--tn-mo-fast), box-shadow var(--tn-mo-fast);
}
.checkbar-box:focus-within { border-color: var(--live); box-shadow: 0 0 0 3px rgba(74,144,217,.14); }
.checkbar textarea {
  width: 100%; border: 0; resize: none; outline: none;
  font: inherit; font-size: 15px; line-height: 1.6; color: var(--ink);
  padding: 14px 16px; min-height: 84px; background: transparent;
}
.checkbar textarea::placeholder { color: var(--ink-3); }
.checkbar-foot {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 16px; border-top: 1px solid var(--line-2);
}
.checkbar-count { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.checkbar-count.over { color: var(--tn-false); }
.checkbar-go {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: #fff; background: var(--ink);
  border: 1px solid var(--ink); border-radius: 2px; padding: 10px 22px; cursor: pointer;
  transition: opacity var(--tn-mo-fast);
}
.checkbar-go .tri { color: var(--live); font-size: 12px; }
.checkbar-go:hover { opacity: .85; }
.checkbar-go[disabled] { opacity: .45; cursor: default; }

.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.examples-label { font-size: 12px; color: var(--ink-3); }
.example {
  font-size: 12.5px; color: var(--ink-2); background: #fff;
  border: 1px solid var(--line); border-radius: 20px; padding: 6px 13px; cursor: pointer;
  transition: all var(--tn-mo-fast) var(--tn-ease-out);
}
.example:hover { border-color: var(--ink); color: var(--ink); }

/* 内测提示条 */
.notice {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  font-size: 12.5px; color: #8a6d1a; background: var(--tn-unverified-bg);
  border: 1px solid #FFE3A8; border-radius: 4px; padding: 8px 13px; max-width: 560px;
}
.notice .ic { flex-shrink: 0; }

/* 忙线 / 错误 提示（面板内） */
.panel-toast {
  margin: 0; max-height: 0; overflow: hidden; padding: 0 16px;
  transition: max-height var(--tn-mo-final) var(--tn-ease-enter), padding var(--tn-mo-final);
  flex-shrink: 0; border-bottom: 0 solid var(--line-2);
}
.panel-toast.show { max-height: 180px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.panel-toast--busy { background: var(--tn-unverified-bg); }
.panel-toast--error { background: var(--tn-false-bg); }
.panel-toast-title { font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.panel-toast--busy .panel-toast-title { color: #8a6d1a; }
.panel-toast--error .panel-toast-title { color: var(--tn-false); }
.panel-toast-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; line-height: 1.55; }

/* 等待时脉冲点（真核查 ~60s，给"在干活"的信号） */
.thinking { display: inline-flex; gap: 4px; }
.thinking i { width: 5px; height: 5px; border-radius: 50%; background: var(--live); animation: tn-think 1.2s var(--tn-ease-sine) infinite; }
.thinking i:nth-child(2){ animation-delay: .2s; }
.thinking i:nth-child(3){ animation-delay: .4s; }
@keyframes tn-think { 0%,100%{ opacity:.25; transform: translateY(0);} 50%{ opacity:1; transform: translateY(-3px);} }

/* reduce motion */
@media (prefers-reduced-motion: reduce){
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
