@import url("assets/design-tokens.css");

/* ========================================================
   衡以水 · AutoScreening Marketing Site
   Extends the product design system with marketing-only
   tropes: hero motion, section rhythm, decorative flourishes
   ======================================================== */

* { box-sizing: border-box; }

body {
  overflow-x: hidden;
}

/* ---------- ROOT TWEAK VARS ---------- */
:root {
  --hue-primary: #1e40af;
  --hue-primary-soft: #3b82f6;
  --hue-accent: #0369a1;
  --motion-scale: 1; /* tweak: 0..1.6 */
  --grid-line: rgba(15, 30, 60, 0.06);
}

/* ---------- TYPOGRAPHY GUARDS ---------- */
::selection {
  background: rgba(30, 64, 175, 0.18);
  color: var(--fg-strong);
}

/* ---------- LAYOUT PRIMITIVES ---------- */
.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 720px) {
  .shell { padding: 0 20px; }
}

/* =========================================================
   GLOBAL BACKGROUND — engineering grid + water-line glow
   ========================================================= */
.world-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 35% at 50% -8%, rgba(30, 64, 175, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 30% at 100% 30%, rgba(99, 130, 190, 0.08), transparent 60%),
    var(--page-bg);
}
.world-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 30%, #000 30%, transparent 75%);
  opacity: 0.7;
}

/* =========================================================
   NAVBAR
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(240, 242, 246, 0.72);
  border-bottom: 1px solid rgba(15, 30, 60, 0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 32px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}
.nav-brand-mark svg { width: 26px; height: 26px; }
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.nav-brand-mark img {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
  max-width: 32px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.nav-brand-product {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: var(--fg-strong);
}
.nav-brand-by {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-top: 2px;
}
/* nav-publisher: 出品方品牌块（衡以水），与 AutoScreening 形成"产品 · 出品方"的左侧
 * 品牌对。不可点击（role=img），与右侧功能性 nav-links / 登录 CTA 区隔。
 * 字体与页脚 .publisher-level-svg .pl-arc-zh 同源（Ma Shan Zheng / STKaiti 古文字体）。 */
.nav-publisher {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 16px;
  border-left: 1px solid rgba(15, 30, 60, 0.10);
}
.nav-publisher-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.nav-publisher-mark img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}
.nav-publisher-name {
  font-family: "Ma Shan Zheng", "STKaiti", "Kaiti SC", "KaiTi", "DFKai-SB", serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--fg-strong);
  line-height: 1;
}
.footer-product { display: flex; align-items: center; gap: 12px; }
.footer-product-logo {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px;
  max-width: 36px;
  object-fit: contain;
  display: block;
}
.footer-product-name { font-family: var(--font-title); font-weight: 600; font-size: 16px; color: var(--fg-strong); }
.footer-product-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; color: var(--fg-muted); margin-top: 2px; }

/* publisher block */
.footer-publisher {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
  max-width: 320px;
}
.footer-publisher-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-publisher-head .footer-publisher-label { display: inline-block; }
.footer-publisher { text-align: center; max-width: none; }
.footer-publisher-head { justify-content: center; align-items: baseline; margin-bottom: 14px; }
.footer-publisher-head .footer-publisher-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 500;
  line-height: 1;
}
.footer-publisher .publisher-level { margin-left: auto; margin-right: auto; margin-top: -28px; width: 280px; }
.footer-publisher-label {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
/* publisher-level: 五器图 — 取《墨子·法仪》「为方以矩、为圆以规、直以绳、衡以水、正以县」
   五器并举，中央 矩(方框) + 衡(平衡杆) + 水(气泡点)，外加 绳(横轴) + 县(垂轴+坠子)；
   两枚 规(规圆) 反向旋转，上弧「衡以水」、下弧 HENGYISHUI 沿环弧镌刻（上下对偶铭文，
   物理布局自初版即中文上、拉丁下）。 */
.publisher-level {
  display: block;
  margin-top: 14px;
  width: 110px;
  max-width: 100%;
}
.publisher-level-svg { display: block; width: 100%; height: auto; overflow: visible; }
/* publisher 块居中铺排：标签 / 题字 / 仪器三段如展品铭牌堆叠对中 */
.footer-publisher { text-align: center; }
.footer-publisher-label { display: inline-block; }
.publisher-level { margin-left: auto; margin-right: auto; }

.publisher-level-svg .pl-arc-en {
  font-family: "IBM Plex Sans Condensed", sans-serif;
  font-size: 7.8px;
  font-weight: 500;
  fill: #1e40af;
}
/* 上弧中文铭文：「衡以水」品牌正名，与下弧 HENGYISHUI 形成上下对偶。
   两弧字距均由 textPath 内 tspan dx 逐字承担（不用 letter-spacing——其末字尾空会
   破坏 middle 锚居中，历史上用 56.5% 补偿过冲致四字偏顺时针） */
.publisher-level-svg .pl-arc-zh {
  font-family: "Ma Shan Zheng", "STKaiti", "Kaiti SC", "KaiTi", "DFKai-SB", serif;
  font-size: 12px;
  font-weight: 400;
  fill: #0f172a;
}
.publisher-level-svg .pl-ring-outer,
.publisher-level-svg .pl-ring-inner {
  transform-origin: 110px 110px;
  transform-box: view-box;
  will-change: transform;
}
.publisher-level-svg .pl-ring-outer {
  animation: pl-rotate-cw 70s linear infinite;
}
.publisher-level-svg .pl-ring-inner {
  animation: pl-rotate-ccw 45s linear infinite;
}
@keyframes pl-rotate-cw {
  to { transform: rotate(360deg); }
}
@keyframes pl-rotate-ccw {
  to { transform: rotate(-360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .publisher-level-svg .pl-ring-outer,
  .publisher-level-svg .pl-ring-inner { animation: none; }
}

/* classical citation — 立社铭：整宽横向带，把《墨子·法仪》提为底部 footer 的精神锚点 */
.footer-classic {
  margin: 0 auto;
  padding: 28px 24px;
  border-top: 1px dashed rgba(15,30,60,0.12);
  border-bottom: 1px dashed rgba(15,30,60,0.12);
  max-width: 760px;
  text-align: center;
}
.footer-classic.footer-creed {
  margin-top: 8px;
  margin-bottom: 28px;
  max-width: none;
  text-align: left;
  padding: 24px 28px;
  border-top: none;
  border-bottom: none;
}
.footer-classic-text {
  font-family: "STKaiti", "Kaiti SC", "KaiTi", "楷体", "BiauKai", "DFKai-SB", "Songti SC", "STSong", serif;
  font-size: 16px;
  line-height: 1.95;
  color: var(--fg-strong);
  margin: 0;
  letter-spacing: 0.1em;
  font-weight: 500;
  text-wrap: pretty;
}
.footer-classic-text em {
  font-style: normal;
  color: var(--ink-strong);
  font-weight: 600;
}
.footer-classic-cite {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--fg-muted);
  text-transform: uppercase;
}
.footer-classic-gloss {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--fg-muted);
}
.footer-classic-gloss em {
  font-style: italic;
  color: var(--fg-main);
}
.section-tight { padding: 56px 0; }
.login-headline { text-transform: none; letter-spacing: -0.005em; font-size: clamp(28px,3.4vw,42px); font-family: var(--font-title); font-weight: 600; color: var(--fg-strong); line-height: 1.15; margin-top: 14px; }
.login-lede { margin-top: 16px; color: var(--fg-main); font-size: 15px; line-height: 1.7; max-width: 520px; }
.login-steps { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 14px; }
.login-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--fg-main); }
.login-steps li > span:last-child { flex: 1; min-width: 0; }
.login-step-num { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--ink-soft); color: var(--ink-strong); display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.login-cta-note { margin-top: 32px; font-size: 12px; color: var(--fg-muted); font-family: var(--font-mono); letter-spacing: 0.04em; line-height: 1.6; max-width: 480px; }
.nav-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 28px;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-main);
  letter-spacing: 0.03em;
  position: relative;
}
.nav-links a:hover { color: var(--ink-strong); text-decoration: none; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--ink-strong);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta {
  background: var(--ink-grad);
  color: white !important;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 3px rgba(30, 64, 175, 0.25);
  transition: transform var(--t-fast), box-shadow var(--t-normal);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(30, 64, 175, 0.32); }
.nav-cta::after { display: none; }

/* 页眉登录链接: 极简 + 右上箭头 (暗示外链跳转) + 下划线 hover.
   去掉胶囊外框, 让登录按钮回归"链接"语义, 但用 ink-strong 字色 + 加粗 + 箭头 hover 微动画
   赋予设计感. 视觉层级: nav links < 登录 < 申请使用 主 CTA. */
.nav-link-login {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  padding: 6px 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--ink-strong) !important;
  letter-spacing: 0.02em !important;
  background: transparent;
  position: relative;
}
.nav-link-login-text {
  position: relative;
}
.nav-link-login-text::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1.5px;
  background: var(--ink-strong);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link-login:hover .nav-link-login-text::after { transform: scaleX(1); }
.nav-link-login-arrow {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}
.nav-link-login:hover .nav-link-login-arrow {
  transform: translate(2px, -2px); /* 右上方微移, 强化"外链/跳转"语义 */
}
/* 关掉 .nav-links a::after 的 hover 下划线 (我们已用 .nav-link-login-text::after 替代) */
.nav-link-login::after { display: none !important; }

/* ≤820 紧凑导航：隐去印章（320 下 brand+publisher 实测 ~355px 超 280 可用宽）与
   三条锚链；保留 .nav-link-login（全站唯一登录入口）与「申请邀请码」CTA（用户否决
   隐藏 CTA）。装饰副标 .nav-brand-by 同档隐去（品牌对在该宽度已简化，口径一致），
   CTA 紧凑化；断点取 820 而非 720：721-810 区间完整导航实测 ~790px > 768 可用宽 704。 */
@media (max-width: 820px) {
  .nav-inner { gap: 20px; }
  .nav-links { gap: 20px; }
  .nav-publisher { display: none; }
  .nav-brand-by { display: none; }
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-cta.nav-cta-public { padding: 7px 14px; font-size: 12px; }
}
.nav-cta-text-short { display: none; }
@media (max-width: 380px) {
  .nav-inner { gap: 12px; }
  .nav-links { gap: 12px; }
  /* 登录文字保留（唯一入口），箭头让位；登录态名字再收一档防 trigger 顶宽。
     注意必须 .nav-cta-trigger .nav-cta-name（0,2,0）：index.html 内联 <style> 的
     ≤720 name{max-width:80px}（0,1,0）文档序在后，裸类选择器会被压成死规则 */
  .nav-link-login-arrow { display: none; }
  .nav-cta-trigger .nav-cta-name { max-width: 56px; }
  /* CTA 切短文案（aria-label 恒为「申请邀请码」），320 单行闭合 277 ≤ 280 */
  .nav-cta-text-full { display: none; }
  .nav-cta-text-short { display: inline; }
}

/* prefers-reduced-motion: 保留状态变化，去除周期动画 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  padding: 80px 0 96px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

.eyebrow-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-strong);
  box-shadow: 0 1px 3px rgba(15, 30, 60, 0.04);
}
.eyebrow-row .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-strong);
  box-shadow: 0 0 0 0 rgba(30, 64, 175, 0.6);
  animation: dotPulse 2.4s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(30, 64, 175, 0.6); }
  50% { box-shadow: 0 0 0 6px rgba(30, 64, 175, 0); }
}

.hero h1 {
  margin-top: 28px;
  font-size: clamp(36px, 5.4vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-weight: 600;
  /* 自动折行点更均衡（手动 <br> 不受影响；不支持的浏览器自动降级） */
  text-wrap: balance;
}
@media (max-width: 380px) {
  /* 36px 下首行 8 字 ≈288px > 320 可用宽 280，收一档让首行单行容纳 */
  .hero h1 { font-size: 30px; }
}
.hero h1 .ink-grad {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero h1 .strike-block {
  display: inline-block;
  position: relative;
}
.hero h1 .strike-block::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%;
  bottom: 8%;
  height: 14px;
  background: linear-gradient(90deg, rgba(30, 64, 175, 0.18), rgba(14, 165, 233, 0.05));
  z-index: -1;
  border-radius: 2px;
}

.hero-subtitle {
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg-main);
  max-width: 520px;
}

.hero-classic {
  margin-top: 28px;
  padding: 14px 18px;
  border-left: 2px solid var(--ink-strong);
  background: linear-gradient(90deg, rgba(30, 64, 175, 0.04), transparent);
  border-radius: 0 6px 6px 0;
  max-width: 520px;
}
.hero-classic-zh {
  font-family: var(--font-title);
  font-weight: 500;
  color: var(--fg-strong);
  letter-spacing: 0.04em;
  font-size: 14px;
}
.hero-classic-zh strong { color: var(--ink-strong); font-weight: 600; }
.hero-classic-en {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--t-fast), box-shadow var(--t-normal), background var(--t-normal);
  text-decoration: none;
}
.btn-primary {
  background: var(--ink-grad);
  color: white;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--ink-grad-hover);
  box-shadow: 0 6px 22px rgba(30, 64, 175, 0.32);
  color: white;
  text-decoration: none;
}
.btn-secondary {
  background: white;
  color: var(--fg-strong);
  border-color: var(--panel-border);
  box-shadow: var(--shadow);
}
.btn-secondary:hover {
  border-color: var(--panel-border-hover);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--ink-strong);
}
.btn .arrow {
  transition: transform var(--t-fast);
}
.btn:hover .arrow { transform: translateX(3px); }

.hero-stats {
  margin-top: 56px;
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}
@media (max-width: 720px) {
  /* 首个 stat 块被长 label 撑宽，数字行块内居中看似右移；小屏堆叠时左对齐 */
  .hero-stat { text-align: left; }
}
.hero-stat-num {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 600;
  color: var(--fg-strong);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hero-stat-num span { color: var(--ink-strong); }
.hero-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}

/* =========================================================
   HERO VISUAL — animated water-level instrument
   ========================================================= */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 540px;
  justify-self: center;
  width: 100%;
}
.hero-orbit {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(30, 64, 175, 0.18);
  border-radius: 50%;
  animation: rotate 60s linear infinite;
}
.hero-orbit-2 {
  position: absolute;
  inset: 14%;
  border: 1px dashed rgba(30, 64, 175, 0.12);
  border-radius: 50%;
  animation: rotate 90s linear infinite reverse;
}
@keyframes rotate {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}
.hero-orbit-tick {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--ink-strong);
  top: -5px; left: 50%;
  margin-left: -5px;
  box-shadow: 0 0 0 6px rgba(30, 64, 175, 0.06);
}
.hero-orbit-tick.t2 { background: var(--ink-strong); border-color: white; }

.water-instrument {
  position: absolute;
  inset: 22%;
  background: white;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  box-shadow:
    0 1px 3px rgba(15, 30, 60, 0.06),
    0 18px 48px rgba(15, 30, 60, 0.10);
  overflow: hidden;
  display: grid;
  grid-template-rows: 28px 1fr 28px;
}
.water-instrument-header,
.water-instrument-footer {
  background: var(--page-bg);
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.water-instrument-footer {
  border-bottom: none;
  border-top: 1px solid var(--panel-border);
}
.water-instrument-body {
  position: relative;
  background: linear-gradient(180deg, #fafbfd 0%, #eef2f8 100%);
  overflow: hidden;
}
.water-tube {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 88%;
  height: 14px;
  background: white;
  border: 1px solid rgba(15, 30, 60, 0.18);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(15, 30, 60, 0.05);
}
.water-tube-fluid {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.18) 0%, rgba(30, 64, 175, 0.32) 100%);
}
.water-tube-fluid::before {
  content: "";
  position: absolute;
  top: 0; left: -50%;
  width: 200%;
  height: 100%;
  background:
    radial-gradient(ellipse 60% 200% at 30% 50%, rgba(255,255,255,0.6), transparent 60%);
  animation: waterShimmer 4s ease-in-out infinite;
}
@keyframes waterShimmer {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(20%); }
}
.water-tube-bubble {
  position: absolute;
  width: 32px; height: 8px;
  background: white;
  border: 1px solid rgba(30, 64, 175, 0.4);
  border-radius: 999px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: bubbleSettle 6s ease-in-out infinite;
  box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.04);
}
@keyframes bubbleSettle {
  0%, 100% { transform: translate(calc(-50% + 18px), -50%); }
  25% { transform: translate(calc(-50% - 22px), -50%); }
  50% { transform: translate(calc(-50% + 8px), -50%); }
  75% { transform: translate(calc(-50% - 6px), -50%); }
}

.water-scale {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  margin-top: -34px;
  display: flex;
  justify-content: space-between;
  padding: 0 6%;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
}
.water-scale span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.water-scale span::before {
  content: "";
  width: 1px;
  height: 14px;
  background: rgba(15, 30, 60, 0.2);
}
.water-scale span.major::before { height: 22px; background: var(--ink-strong); }

.water-bubble-readout {
  position: absolute;
  top: 12%;
  right: 6%;
  background: white;
  border: 1px solid var(--panel-border);
  padding: 6px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-strong);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow);
}
.water-bubble-readout .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--no-hit);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15);
}
.water-bubble-readout .label { color: var(--fg-muted); font-size: 8px; text-transform: uppercase; letter-spacing: 0.1em; }

/* Floating chips around the instrument */
.float-chip {
  position: absolute;
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-strong);
  box-shadow: 0 4px 14px rgba(15, 30, 60, 0.08);
  animation: floaty 8s ease-in-out infinite;
}
.float-chip .pip {
  width: 6px; height: 6px; border-radius: 50%;
}
.float-chip.s-hit .pip { background: var(--hit); box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12); }
.float-chip.s-no { .pip { background: var(--no-hit); } background: white; }
.float-chip.s-no .pip { background: var(--no-hit); box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.12); }
.float-chip.s-rev .pip { background: var(--review); box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.12); }
.float-chip.s-ind .pip { background: var(--indirect-hit); box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.12); }
.float-chip.s-time .pip { background: var(--ink-strong); box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12); }

.float-chip.fc-1 { top: 4%; left: 3%; animation-delay: 0s; }
.float-chip.fc-2 { top: 14%; right: 0%; animation-delay: -2s; }
.float-chip.fc-3 { bottom: 18%; left: -2%; animation-delay: -4s; }
.float-chip.fc-4 { bottom: 4%; right: 6%; animation-delay: -6s; }
.float-chip.fc-5 { top: 48%; left: -8%; animation-delay: -3s; }
.float-chip.fc-6 { top: 56%; right: -4%; animation-delay: -5s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 720px) {
  .float-chip.fc-5, .float-chip.fc-6 { display: none; }
}

/* =========================================================
   SECTION CHROME
   ========================================================= */
section { position: relative; }
.section {
  padding: 96px 0;
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 56px;
  max-width: 780px;
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-strong);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--ink-strong);
}
.section h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.005em;
  text-transform: none;
  line-height: 1.15;
}
.section-sub {
  color: var(--fg-main);
  font-size: 16px;
  line-height: 1.7;
  max-width: 640px;
  margin-top: 6px;
}

/* =========================================================
   PILLARS GRID
   ========================================================= */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 980px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .pillars { grid-template-columns: 1fr; } }

.pillar {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-normal), border-color var(--t-normal), box-shadow var(--t-normal);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 240px;
}
.pillar::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--ink-strong);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--t-normal);
}
.pillar:hover { transform: translateY(-4px); border-color: var(--panel-border-hover); box-shadow: var(--shadow-hover); }
.pillar:hover::before { transform: scaleY(1); }
.pillar-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  text-transform: uppercase;
}
.pillar h3 {
  font-size: 18px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
  color: var(--fg-strong);
  font-family: var(--font-body);
}
.pillar p {
  font-size: 14px;
  color: var(--fg-main);
  line-height: 1.65;
  margin: 0;
}
.pillar-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.06), rgba(99, 130, 190, 0.04));
  border: 1px solid rgba(30, 64, 175, 0.10);
  border-radius: 10px;
  color: var(--ink-strong);
}
.pillar-icon svg { width: 22px; height: 22px; }

/* =========================================================
   SOURCES BAND
   ========================================================= */
.sources {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(30, 64, 175, 0.06), transparent),
    linear-gradient(180deg, transparent, white 30%, white 70%, transparent);
  padding: 96px 0;
  border-top: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
}
/* ============================================================
   Sources carousel — 横向滚动卡片
   中央卡片 ~520px 聚焦, 左右各露半张（mask 渐隐), 自动每 3.5s 向左滚动；
   hover 暂停; 左右箭头 + 底部 dots + 键盘 ←/→ 手动控制
   ============================================================ */
.sources-carousel {
  margin-top: 40px;
  position: relative;
  /* 让外侧箭头不被 shell padding 切掉 —— shell padding=32px, 箭头位于 shell 外 12px */
}
.sources-carousel-viewport {
  /* mask 渐隐左右两侧让边缘的"半张卡"自然 fade —— 中央 70% 全实，
     左右各 ~15% 渐隐到透明 */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 14%, black 86%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, black 14%, black 86%, transparent 100%);
  overflow: hidden;
  /* 让 viewport 比 shell 略宽 — 用负 margin 把可视区拓到 shell padding 外侧，
     这样左右半张卡不会被 shell 截断 */
  margin: 0 -32px;
  padding: 24px 0 32px;
}
@media (max-width: 720px) {
  .sources-carousel-viewport { margin: 0 -20px; }
}
.sources-carousel-track {
  display: flex;
  gap: 24px;
  align-items: center; /* 让不同高度的卡垂直居中, 避免 stretch 把所有卡拉成最高那张 */
  /* JS 控制 transform: translateX(...) 把当前 index 卡片居中 */
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* 箭头 */
.sources-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--panel-border);
  color: var(--fg-strong);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(15,30,60,0.10);
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.sources-carousel-arrow:hover { background: var(--ink-soft); border-color: var(--ink-strong); color: var(--ink-strong); transform: translateY(-50%) scale(1.05); }
.sources-carousel-arrow:disabled { opacity: 0.35; cursor: not-allowed; transform: translateY(-50%); }
.sources-carousel-arrow-prev { left: -10px; }
.sources-carousel-arrow-next { right: -10px; }
@media (max-width: 540px) {
  .sources-carousel-arrow { width: 36px; height: 36px; }
}

/* dot 指示器 */
.sources-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.sources-carousel-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(15,30,60,0.18);
  cursor: pointer;
  padding: 0;
  transition: background var(--t-fast), transform var(--t-fast), width var(--t-fast);
}
.sources-carousel-dots button:hover { background: rgba(15,30,60,0.32); }
.sources-carousel-dots button.is-active {
  background: var(--ink-strong);
  width: 22px;
  border-radius: 4px;
}

/* ============================================================
   Source card — 在 carousel 中是 flex item, 固定宽度 + 自然高度
   ============================================================ */
.source-card {
  flex: 0 0 440px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 18px 20px 16px;
  background: white;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  /* 不再强制 min-height, 让卡按内容自然 sizing —— UFLPA/EU/UK/UN 单 chip 卡
     不再被填充空旷; 多 chip 卡也维持紧凑高度 */
  box-shadow: 0 4px 18px rgba(15,30,60,0.06);
  transition: transform var(--t-normal), border-color var(--t-normal), box-shadow var(--t-normal), opacity var(--t-normal);
  /* 非中央卡片视觉权重弱化 —— JS 动态加 .is-center 类 */
  opacity: 0.55;
  transform: scale(0.94);
}
.source-card.is-center {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 12px 36px rgba(15,30,60,0.12);
}
@media (max-width: 720px) {
  .source-card { flex: 0 0 86vw; min-height: 280px; padding: 22px 22px 18px; }
}

/* 国旗水印 —— 每张卡 inline `--card-flag-url` 指向自己的国旗 SVG, 旋转 -6° + opacity 0.05
   作背景层暗示国家身份。所有内容元素需 position: relative + z-index >= 2 才会盖在水印之上 */
.source-card::before {
  content: "";
  position: absolute;
  top: -40px; right: -100px;
  width: 480px; height: 320px;
  background: var(--card-flag-url) center/cover no-repeat;
  opacity: 0.05;
  pointer-events: none;
  z-index: 1;
  transform: rotate(-6deg);
}
.source-card > * { position: relative; z-index: 2; }

/* Header zone · 左右分布: 国旗+jurisdiction 在左, 来源名+描述在右 */
.source-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 2px 2px 10px;
  border-bottom: 1px solid rgba(15,30,60,0.06);
  margin-bottom: 10px;
}

/* 左半 · 国旗 + jurisdiction caption */
.source-card-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.source-card-flag {
  width: 56px;
  height: 38px;
  border-radius: 4px;
  /* 1px 灰边 —— 美国国旗白条纹 / 联合国白底地球落在白卡上才不会消失 */
  box-shadow: 0 0 0 1px rgba(15,30,60,0.12), 0 2px 6px rgba(15,30,60,0.08);
  object-fit: cover;
  flex-shrink: 0;
}
.source-card-juris {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  text-transform: uppercase;
  font-weight: 600;
}

/* 右半 · source name + desc */
.source-card-title {
  text-align: left;
  padding: 0;
  border-bottom: none;
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.source-name {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 19px;
  color: var(--fg-strong);
  letter-spacing: 0.01em;
  margin: 0 0 3px;
  line-height: 1.2;
  text-transform: none;
}
.source-desc {
  font-size: 11.5px;
  color: var(--fg-muted);
  line-height: 1.4;
  margin: 0;
}

/* Subclist chip area · 自然 sizing, 不再 flex grow 填满空间.
   max-width 360px 让 chip 在卡内居中聚拢, 避免稀疏排版. */
.source-card-sublists {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
  flex: 0 1 auto; /* 不 grow, 按内容自然占高 */
  justify-content: center;
  max-width: 360px;
  margin: 0 auto;
}
.source-card-sublists-single {
  align-content: center;
}
.sub-chip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  background: var(--ink-soft);
  color: var(--ink-strong);
  border-radius: 4px;
  white-space: nowrap;
  border: 1px solid rgba(30,64,175,0.12);
}
.sub-chip-aggregated {
  font-size: 12px;
  padding: 7px 14px;
  background: white;
  color: var(--fg-strong);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  letter-spacing: 0.05em;
}
/* 保护性清单芯片（CNRL 阻断禁令 / 禁执令）：绿色系 = 受我国法律保护、命中不计风险，
   与风险子清单的藏青配色区分；与 fn-6 脚注「以绿色标注」互证 */
.sub-chip-protective {
  background: rgba(21,128,61,0.08);
  color: var(--no-hit);
  border-color: rgba(21,128,61,0.25);
}

/* ============ 双环心跳脉冲 ============
   内环：实色固定 dot；外环：scale + opacity 循环外扩，1.6s 周期。
   绿色 = 已上线（全部 7 源均已上线；曾有琥珀「规划中」变体，CNRL 上线后随 badge 一并退役）。 */
.source-pulse-wrap {
  position: absolute;
  top: 18px; right: 12px;
  transform: translateY(-50%); /* 视觉中心对齐到 y=18 这条水平线（卡片标题行中线） */
  width: 12px; height: 12px;
  pointer-events: none;
}
.source-pulse-dot {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--no-hit);
  box-shadow: 0 0 0 1.5px white;
  z-index: 2;
}
.source-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--no-hit);
  opacity: 0.6;
  animation: sourceHeartbeat 1.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  z-index: 1;
}
@keyframes sourceHeartbeat {
  0% { transform: scale(0.6); opacity: 0.85; }
  70% { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .source-pulse-ring { animation: none; opacity: 0; }
}

/* =========================================================
   DEMO SECTION
   ========================================================= */
.demo-frame {
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow:
    0 1px 3px rgba(15, 30, 60, 0.06),
    0 24px 64px rgba(15, 30, 60, 0.10);
  overflow: hidden;
}
.demo-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--page-bg);
  border-bottom: 1px solid var(--panel-border);
}
.demo-titlebar .dots {
  display: flex; gap: 6px;
}
.demo-titlebar .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(15, 30, 60, 0.12);
}
.demo-titlebar .dot:nth-child(1) { background: rgba(185, 28, 28, 0.30); }
.demo-titlebar .dot:nth-child(2) { background: rgba(180, 83, 9, 0.30); }
.demo-titlebar .dot:nth-child(3) { background: rgba(21, 128, 61, 0.32); }
.demo-titlebar-url {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  text-align: center;
  letter-spacing: 0.04em;
}
.demo-body {
  padding: 28px 28px 32px;
}

/* =========================================================
   FLOW / PROCESS
   ========================================================= */
.flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}
@media (max-width: 900px) { .flow { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .flow { grid-template-columns: 1fr; } }

.flow-step {
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 18px;
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform var(--t-normal);
}
.flow-step:hover { transform: translateY(-3px); }
.flow-step-no {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-strong);
  text-transform: uppercase;
}
.flow-step h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-strong);
}
.flow-step p {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin: 0;
}

/* =========================================================
   COMPARISON TABLE
   ========================================================= */
.compare {
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  overflow: hidden;
}
.compare table { width: 100%; border-collapse: collapse; font-size: 13px; }
.compare th, .compare td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--panel-border);
}
.compare th {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: var(--panel-bg-alt);
}
.compare td.col-name { font-weight: 500; color: var(--fg-strong); }
.compare td.cell-yes {
  color: var(--no-hit);
  font-family: var(--font-mono);
  font-size: 16px;
}
.compare td.cell-no { color: var(--fg-muted); font-family: var(--font-mono); }
.compare td.cell-mid { color: var(--warn); font-size: 12px; }
.compare tr:last-child td { border-bottom: none; }
.compare-product {
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.04), transparent);
}

/* =========================================================
   SEC LOGIN
   ========================================================= */
.login-section {
  padding: 96px 0;
  background:
    radial-gradient(ellipse 60% 70% at 30% 20%, rgba(30, 64, 175, 0.07), transparent),
    radial-gradient(ellipse 60% 70% at 80% 80%, rgba(14, 165, 233, 0.06), transparent);
}
.login-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) { .login-grid { grid-template-columns: 1fr; gap: 32px; } }

.login-card {
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 36px;
  box-shadow: 0 24px 64px rgba(15, 30, 60, 0.10);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--ink-grad);
}
.login-tabs {
  display: flex;
  background: var(--page-bg);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 24px;
}
.login-tab {
  flex: 1;
  text-align: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all var(--t-fast);
  user-select: none;
}
.login-tab.active {
  background: white;
  color: var(--fg-strong);
  box-shadow: 0 1px 3px rgba(15, 30, 60, 0.08);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.field-input {
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--fg-strong);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
}
.field-input:focus {
  outline: none;
  border-color: var(--ink-strong);
  box-shadow: var(--ink-glow);
}
.field-input.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 6px;
  font-size: 13px;
  color: var(--fg-main);
  line-height: 1.5;
}
.checkbox-row input { margin-top: 3px; accent-color: var(--ink-strong); }
.checkbox-row a { font-weight: 500; }

.login-submit {
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  background: var(--ink-grad);
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-normal);
  font-family: var(--font-body);
}
.login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(30, 64, 175, 0.32);
}
.login-submit:disabled { opacity: 0.45; cursor: not-allowed; }

.login-footnote {
  margin-top: 16px;
  font-size: 11px;
  color: var(--fg-muted);
  text-align: center;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.invite-status {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 16px;
}
/* 空状态塌缩：避免占位 24px 把分割线推得过远 */
.invite-status:empty {
  margin-top: 0;
  min-height: 0;
}
.consent-block {
  /* divider 上下视觉对称：field 自带 6px flex gap + 16px margin-bottom，需负 margin 抵消，
     但留 6-8px 视觉余地补偿 input box-shadow 视觉压缩 */
  margin-top: -2px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 30, 60, 0.18);
}
.invite-status.ok { color: var(--no-hit); }
.invite-status.bad { color: var(--hit); }
.invite-status.idle { color: var(--fg-muted); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: linear-gradient(180deg, transparent, rgba(15, 30, 60, 0.02));
  border-top: 1px solid var(--panel-border);
  padding: 64px 0 28px;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  grid-template-areas:
    "fn    fn    fn    fn"
    "brand col1  col2  col3"
    "brand creed creed base";
  column-gap: 48px;
  row-gap: 32px;
  margin-bottom: 40px;
  align-items: start;
}
.footer-brand                              { grid-area: brand; }
.footer-grid > .footer-col:nth-child(2)    { grid-area: col1; }
.footer-grid > .footer-col:nth-child(3)    { grid-area: col2; }
.footer-grid > .footer-col:nth-child(4)    { grid-area: col3; }
.footer-disclosures                        { grid-area: fn; }
.footer-grid > .footer-classic.footer-creed { grid-area: creed; align-self: center; margin: 0; justify-self: start; text-align: left; padding-left: 0; padding-right: 0; }
.footer-grid > .footer-base                { grid-area: base; align-self: center; justify-self: end; }
@media (max-width: 900px) {
  /* 引文小屏强制两行（拆分点固定在「为圆以规，」后），杜绝任意换行点 */
  .footer-creed-l1,
  .footer-creed-l2 { display: block; }
  .footer-grid {
    /* 三模块横排、子链接竖排：1fr 等宽三轨让 fn/brand/creed/base 跨行保持全宽
       （auto 轨会把跨行项也压到轨簇宽），各列组内居中——中间列落在页面中线，
       消除「全体偏左 + 右侧空气墙」 */
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
      "fn fn fn"
      "brand brand brand"
      "col1 col2 col3"
      "creed creed creed"
      "base base base";
    row-gap: 32px;
    column-gap: 16px;
  }
  .footer-grid > .footer-col { justify-self: center; }
  /* 引文与底带小屏居中——必须复制桌面基线的完整高特异性选择器，裸类压不过 */
  .footer-grid > .footer-classic.footer-creed { justify-self: center; text-align: center; }
  .footer-grid > .footer-base { justify-self: center; }
}

.footer-brand p {
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--fg-muted);
  max-width: 320px;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 14px 0;
  font-weight: 500;
  line-height: 1;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13px; color: var(--fg-main); }
.footer-col a:hover { color: var(--ink-strong); text-decoration: none; }
.footer-col li { white-space: nowrap; }
.footer-col a { white-space: nowrap; }

.footer-mail-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.footer-mail-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.75;
  transform: translateY(-0.5px);
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.footer-mail-link:hover .footer-mail-icon {
  opacity: 1;
  transform: translate(1px, -1.5px);
}

.footer-base {
  border-top: 1px solid var(--panel-border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
}
.footer-legal a { color: var(--fg-muted); }
.footer-legal a:hover { color: var(--ink-strong); text-decoration: none; }
.footer-legal .sep { opacity: 0.4; }
.footer-icp-icon {
  width: 12px; height: 12px;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 4px;
}

/* =========================================================
   MISC: badges
   ========================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid;
}
.badge-hit { color: var(--hit); background: var(--hit-bg); border-color: var(--hit-border); }
.badge-no  { color: var(--no-hit); background: var(--no-hit-bg); border-color: var(--no-hit-border); }
.badge-rev { color: var(--review); background: var(--review-bg); border-color: var(--review-border); }
.badge-ind { color: var(--indirect-hit); background: var(--indirect-hit-bg); border-color: var(--indirect-hit-border); }
.badge-warn{ color: var(--warn); background: var(--warn-bg); border-color: var(--warn-border); }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   DEMO SCREENING ANIMATION
   ========================================================= */
.demo-input-row {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--page-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 10px 14px;
}
.demo-input-row .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  flex-shrink: 0;
}
.demo-input-row .target {
  flex: 1;
  font-family: var(--font-body);
  color: var(--fg-strong);
  font-weight: 500;
  font-size: 14px;
}
.demo-input-row .target .cursor {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: var(--ink-strong);
  margin-left: 2px;
  vertical-align: -2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.demo-sources-row {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
@media (max-width: 720px) { .demo-sources-row { grid-template-columns: repeat(3, 1fr); } }

.demo-source {
  background: var(--panel-bg-alt);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  min-height: 92px;
}
.demo-source-name {
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-strong);
  letter-spacing: 0.04em;
}
.demo-source-status {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.demo-source-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  background: var(--ink-strong);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}
.demo-source-bar.run { width: 100%; }
.demo-source-result {
  margin-top: auto;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* Ownership tree mini */
.ownership-mini {
  margin-top: 16px;
  padding: 16px;
  background: var(--panel-bg-alt);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
}
.ownership-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-strong);
  padding: 6px 0;
  border-bottom: 1px dashed var(--panel-border);
}
.ownership-row:last-child { border-bottom: none; }
.ownership-row .indent { color: var(--fg-muted); }
.ownership-row .name { flex: 1; font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--fg-strong); }
.ownership-row .pct { color: var(--ink-strong); font-weight: 600; min-width: 60px; text-align: right; }
.ownership-row .badges { display: flex; gap: 4px; }

/* =========================================================
   COUNCIL PROOFS (testimonials-but-not)
   ========================================================= */
.proof-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 32px;
}
@media (max-width: 900px) { .proof-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .proof-row { grid-template-columns: 1fr; } }

.proof {
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 18px;
}
.proof-num {
  font-family: var(--font-title);
  font-size: 36px;
  font-weight: 600;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.proof-num .sub { color: var(--fg-muted); font-size: 14px; font-weight: 500; margin-left: 4px; }
.proof-label {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}
.proof-desc {
  margin-top: 6px;
  font-size: 12px;
  color: var(--fg-main);
  line-height: 1.5;
}

/* =========================================================
   FINAL CTA
   ========================================================= */
.final-cta {
  margin: 96px 0 0;
  padding: 64px 32px;
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(30, 64, 175, 0.12), transparent 60%),
    linear-gradient(180deg, var(--page-bg), white);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.final-cta h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  text-transform: none;
  letter-spacing: -0.005em;
  font-weight: 600;
  line-height: 1.2;
}
.final-cta p {
  margin: 16px auto 28px;
  max-width: 540px;
  font-size: 15px;
  color: var(--fg-main);
}
.final-cta .actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.final-quote {
  margin: 40px auto 0;
  padding: 20px 24px 0;
  max-width: 520px;
  border-top: 1px solid rgba(15,30,60,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.final-quote-text {
  font-family: var(--font-title);
  font-size: 16px;
  font-style: italic;
  color: var(--fg-strong);
  letter-spacing: 0.02em;
}
.final-quote-cite {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  text-transform: uppercase;
}

/* =========================================================
   FOOTER FINE-PRINT · footnote disclosures + sup refs
   ========================================================= */
html { scroll-behavior: smooth; }

/* superscript ref in body content — used as
   <sup class="fn-ref"><a href="#fn-N" id="ref-N">N</a></sup> */
.fn-ref {
  font-family: var(--font-mono);
  font-size: 10px;
  vertical-align: super;
  line-height: 0;
  margin-left: 2px;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.fn-ref a {
  color: var(--ink-strong);
  text-decoration: none;
  padding: 1px 3px;
  border-radius: 3px;
  border-bottom: 1px dotted transparent;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.fn-ref a:hover {
  background: rgba(30, 64, 175, 0.10);
  border-bottom-color: var(--ink-strong);
  text-decoration: none;
}

/* footer disclosures container — sits in grid-area "fn"
   spanning cols 2-4 below the nav/contact columns */
.footer-disclosures {
  border-top: none;
  border-bottom: 1px solid rgba(15, 30, 60, 0.08);
  padding-top: 28px;
  padding-bottom: 36px;
  margin-top: 16px;
  align-self: end;
}
.footer-disclosures-eyebrow {
  margin-bottom: 18px;
  color: var(--fg-muted);
}
.footer-fn-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer-fn {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 6px 10px;
  margin: -6px -10px;
  border-radius: 6px;
}
.footer-fn-num {
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--ink-strong);
  font-weight: 500;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}
.footer-fn-body {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--fg-muted);
  text-wrap: pretty;
}
.footer-fn-body strong {
  color: var(--fg-main);
  font-weight: 500;
}
.footer-fn-back {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  color: var(--ink-strong);
  opacity: 0.5;
  text-decoration: none;
  transition: opacity 0.12s ease;
}
.footer-fn-back:hover { opacity: 1; text-decoration: none; }

/* Anchor scroll offset — sticky nav 占 64px，再加 16px 视觉 buffer，
   让任何 hash 跳转（脚注 ref / ↑ back-link / nav 链接）的目标都不被 nav 遮住。
   作用于 html 元素，全局 in-page anchor scroll 统一生效。 */
html { scroll-padding-top: 80px; }

/* hash 跳转落点统一规范：所有 nav 链接 / footer 脚注 ↑ / footer quick-link 跳到
   的 section，"标题行"统一落在视口顶 96px（64px nav 下 32px 呼吸感），消除上一
   版块漏出、给本版块动画/grid 让出整屏视口。
   公式：标题视口 Y = scroll-padding-top(80) + scroll-margin-top + 标题距 section 顶
   要让 = 96，则 scroll-margin-top = 16 − (标题距 section 顶)
   - .section / .sources：标题距 section 顶 96 → scroll-margin-top: -80
   - .anim-section：       标题距 section 顶 80 → scroll-margin-top: -64
   - .hero：               h1   距 section 顶 126 → scroll-margin-top: -110 */
#sources, #flow {
  scroll-margin-top: -80px;
}
#anim-domestic, #anim-ownership, #anim-name, #anim-evidence {
  scroll-margin-top: -64px;
}
#hero-matrix {
  scroll-margin-top: -110px;
}

/* :target highlight — flashes the destination footnote when
   navigated to via fn-ref click.
   时序：0.4s delay 等 smooth-scroll 接近完成 → 0.3s 渐入到峰值蓝 → 1.7s 渐退回透明。
   总长 2.4s。1.4s 旧时序在 hash change 那一刻就开始播，但浏览器 smooth-scroll 滚到
   footer 通常 500-1200ms，用户视线追到 fn 时动画多半已经播完——所以拆成「等滚动 +
   渐入 + 慢退」三段，让峰值出现在用户视线到达之后。 */
.footer-fn:target { animation: fnTargetFlash 2s ease-out 0.4s forwards; }
@keyframes fnTargetFlash {
  0%   { background: rgba(30, 64, 175, 0.00); }
  15%  { background: rgba(30, 64, 175, 0.22); }
  100% { background: rgba(30, 64, 175, 0.00); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .footer-fn:target { animation: none; }
}

/* =========================================================
   POLICY OVERLAY (modal for ToS / Privacy)
   ========================================================= */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 60, 0.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.overlay.open { display: flex; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.overlay-card {
  background: white;
  border-radius: 16px;
  max-width: 720px;
  width: 100%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(15, 30, 60, 0.30);
  overflow: hidden;
}
.overlay-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.overlay-head h3 {
  text-transform: none;
  letter-spacing: 0;
  font-size: 18px;
  font-family: var(--font-title);
}
.overlay-close {
  border: none;
  background: var(--page-bg);
  width: 32px; height: 32px; border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  color: var(--fg-muted);
  transition: all var(--t-fast);
}
.overlay-close:hover { background: var(--ink-soft); color: var(--ink-strong); }
.overlay-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg-main);
}
.overlay-body h4 {
  font-family: var(--font-title);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 13px;
  margin: 24px 0 8px;
  color: var(--fg-strong);
}
.overlay-body h4:first-child { margin-top: 0; }
.overlay-body p { margin: 0 0 12px; color: var(--fg-main); font-size: 13px; text-align: justify; text-justify: inter-ideograph; }
/* 协议长条款渲染为 <li>（131-224 字多行项），与段落同款两端对齐，避免同窗 p 齐 li 不齐 */
.overlay-body li { text-align: justify; text-justify: inter-ideograph; }
.overlay-body strong { font-weight: 700; color: var(--fg-strong); }
.overlay-body u { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }

/* =========================================================
   TOAST
   ========================================================= */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 80px);
  background: var(--fg-strong);
  color: white;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 200;
  box-shadow: 0 8px 30px rgba(15, 30, 60, 0.30);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-body);
}
.toast.show { transform: translate(-50%, 0); }
