/* ============================================================================
 * 保险 AI 场景演示中心 —— 视觉样式
 * 设计基调沿用《保险AI三大场景解决方案》展会一页纸：
 *   深蓝 #0b5cad（主）/ 绿 #1a9e4b（服务）/ 橙 #e67e22（理赔·强调）
 * 全部内联、零外部依赖（无 CDN 字体/图标），保证离线环境可用。
 * ========================================================================== */

:root {
  --brand: #0b5cad;
  --brand-dark: #083f79;
  --brand-soft: #e8f1fb;
  --accent: #e67e22;
  --accent-soft: #fdf1e3;
  --green: #1a9e4b;
  --green-soft: #e8f7ee;
  /* 价值链六环节各自的标识色（同一明度/饱和度档位，保证并排时不打架） */
  --indigo: #5b5bd6;
  --indigo-soft: #eeeefb;
  --teal: #0e8f9e;
  --teal-soft: #e5f5f7;
  --purple: #7c5cbf;
  --purple-soft: #f1ecfa;

  --ink: #16232f;
  --ink-2: #4a5b6b;
  --ink-3: #7d8b99;
  --line: #dde5ee;
  --line-2: #eef2f7;
  --bg: #f1f5f9;
  --card: #ffffff;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-1: 0 1px 2px rgba(16, 40, 70, .06), 0 2px 8px rgba(16, 40, 70, .05);
  --shadow-2: 0 6px 16px rgba(16, 40, 70, .10), 0 2px 6px rgba(16, 40, 70, .06);
  --shadow-3: 0 16px 36px rgba(16, 40, 70, .16), 0 4px 10px rgba(16, 40, 70, .08);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  /* 吸顶区高度。价值链导航的吸顶位置与锚点偏移都由它们派生，
     保证两个吸顶栏滚动后严丝合缝、不露缝也不互相压住。 */
  --topbar-h: 63px;
  --flowbar-h: 57px;
}

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

/* hidden 属性必须优先：卡片/节点是 flex 容器，会盖掉 UA 的 [hidden]{display:none} */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + var(--flowbar-h) + 18px); }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.wrap { width: min(1240px, 100% - 48px); margin: 0 auto; }

/* ============================ 顶栏 ============================ */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; gap: 18px;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--brand) 0%, #2f8ae0 100%);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 4px 10px rgba(11, 92, 173, .32);
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-text { min-width: 0; }
.brand-title {
  font-size: 15px; font-weight: 700; letter-spacing: .3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-sub {
  font-size: 11px; color: var(--ink-3); letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.pill-env { background: var(--brand-soft); border-color: #cfe1f5; color: var(--brand); }
.pill-count .dot { background: var(--green); }
.pill-count .dot.is-zero { background: var(--ink-3); }
.pill-host { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }

/* ============================ Hero ============================ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 340px at 88% -12%, rgba(230, 126, 34, .30) 0%, transparent 62%),
    radial-gradient(760px 300px at 4% 0%, rgba(47, 138, 224, .38) 0%, transparent 60%),
    linear-gradient(135deg, #0b5cad 0%, #083f79 58%, #062f5c 100%);
  color: #fff;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85), transparent 88%);
}
.hero-inner { position: relative; z-index: 1; padding: 46px 0 40px; }
.hero h1 {
  font-size: clamp(24px, 3.1vw, 37px);
  font-weight: 800; letter-spacing: .6px; line-height: 1.25;
}
.hero h1 em { font-style: normal; color: #ffc978; }
.hero p.lead {
  margin-top: 13px; max-width: 760px;
  font-size: 14.5px; line-height: 1.75; color: rgba(255, 255, 255, .84);
}
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 26px;
  margin-top: 26px; padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}
.hero-stat b {
  display: block; font-size: 25px; font-weight: 800; letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
}
.hero-stat b em { font-style: normal; font-size: 14px; color: #ffc978; }
.hero-stat span { font-size: 12px; color: rgba(255, 255, 255, .68); }

.hero-notice {
  position: relative; z-index: 1;
  display: flex; gap: 9px; align-items: flex-start;
  margin-top: 24px; padding: 11px 14px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius-sm);
  font-size: 12.5px; color: rgba(255, 255, 255, .85);
}
.hero-notice svg { width: 15px; height: 15px; flex: none; margin-top: 3px; opacity: .85; }

/* ============================ 价值链导航 ============================ */
/* 六个环节横向铺开；窄屏改为横向滚动（比换行更省竖向空间，吸顶区不会被撑高） */
.flowbar {
  position: sticky; top: var(--topbar-h); z-index: 50;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.flowbar-inner {
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
  height: var(--flowbar-h); overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.flowbar-inner::-webkit-scrollbar { display: none; }

.flow-step {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  transition: all .18s ease;
}
.flow-step:hover { border-color: #b9d3ee; color: var(--brand); background: var(--brand-soft); }
.flow-step .no {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: var(--ink-3);
}
.flow-step .cnt {
  font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px;
  background: var(--line-2); color: var(--ink-3);
}
.flow-arrow { flex: none; color: #c3d0dd; display: grid; place-items: center; }
.flow-arrow svg { width: 15px; height: 15px; }

/* 工具条放在 Hero 里而不是吸顶栏：六个环节已经占满一行，
   搜索是一次性动作，不需要一直吸在顶上。 */
.hero-tools {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 24px;
}
.hero-tools .pill-live {
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .24);
  color: rgba(255, 255, 255, .92);
}
.hero-tools .search {
  background: #fff; border-color: transparent;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .16);
}
.hero-tools .btn-ghost {
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .26);
  color: #fff;
}
.hero-tools .btn-ghost:hover {
  background: rgba(255, 255, 255, .26);
  border-color: rgba(255, 255, 255, .45);
  color: #fff;
}
.hero-tools .btn-ghost.is-on {
  background: #fff; border-color: #fff; color: var(--brand);
}
.search {
  display: flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  transition: border-color .18s, box-shadow .18s;
}
.search:focus-within { border-color: #9dc4e8; box-shadow: 0 0 0 3px rgba(11, 92, 173, .10); }
.search svg { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.search input {
  border: 0; outline: 0; background: transparent;
  font-size: 13px; width: 150px; color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); }

.btn-ghost {
  height: 34px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .18s ease;
}
.btn-ghost:hover { border-color: #b9d3ee; color: var(--brand); background: var(--brand-soft); }
.btn-ghost:disabled { opacity: .55; cursor: default; }
.btn-ghost svg { width: 14px; height: 14px; }
.btn-ghost .spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================ 业务流节点 ============================ */
main { padding: 30px 0 10px; }

.stage {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  margin-bottom: 22px;
  overflow: hidden;
}
.stage[data-accent="indigo"] { --sc: var(--indigo); --sc-soft: var(--indigo-soft); }
.stage[data-accent="blue"]   { --sc: var(--brand);  --sc-soft: var(--brand-soft); }
.stage[data-accent="teal"]   { --sc: var(--teal);   --sc-soft: var(--teal-soft); }
.stage[data-accent="orange"] { --sc: var(--accent); --sc-soft: var(--accent-soft); }
.stage[data-accent="green"]  { --sc: var(--green);  --sc-soft: var(--green-soft); }
.stage[data-accent="purple"] { --sc: var(--purple); --sc-soft: var(--purple-soft); }

.stage-head {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--sc-soft) 0%, rgba(255, 255, 255, 0) 100%);
  border-left: 4px solid var(--sc);
}
.stage-no {
  flex: none; width: 42px; height: 42px; border-radius: 12px;
  background: var(--sc); color: #fff;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 15px; font-weight: 700;
  box-shadow: 0 4px 10px rgba(16, 40, 70, .16);
}
.stage-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.stage-title h2 { font-size: 18px; font-weight: 800; letter-spacing: .4px; }
.stage-title .en {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .8px; text-transform: uppercase; color: var(--sc);
  padding: 2px 8px; border-radius: 999px; background: var(--sc-soft);
}
.stage-summary { margin-top: 4px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.stage-side { margin-left: auto; flex: none; text-align: right; }
.stage-side .num {
  font-size: 22px; font-weight: 800; color: var(--sc);
  font-variant-numeric: tabular-nums;
}
.stage-side .num small { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.stage-side .lab { font-size: 11.5px; color: var(--ink-3); }

/* 卡片网格 */
.cards {
  display: grid; gap: 16px; padding: 18px 22px 22px;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
}

.card {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 18px 15px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card::before {
  content: ""; position: absolute; left: 18px; right: 18px; top: -1px; height: 3px;
  border-radius: 0 0 3px 3px; background: var(--line);
}
.card[data-status="online"]::before  { background: linear-gradient(90deg, var(--green), #45c079); }
.card[data-status="beta"]::before    { background: linear-gradient(90deg, var(--accent), #f0a75a); }
.card[data-status="online"]:hover,
.card[data-status="beta"]:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-3);
  border-color: #c7dcf0;
}
.card[data-status="planned"] {
  background: #fbfcfe;
  border-style: dashed;
  border-color: #d6dee7;
}
.card[data-status="planned"] .card-icon,
.card[data-status="planned"] .card-name { opacity: .62; }

.card-top { display: flex; align-items: flex-start; gap: 12px; }
.card-icon {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--sc-soft); color: var(--sc);
  border: 1px solid rgba(255, 255, 255, .8);
}
.card-icon svg { width: 21px; height: 21px; }
.card[data-status="online"] .card-icon { background: var(--green-soft); color: var(--green); }
.card[data-status="planned"] .card-icon { background: #eef2f6; color: #8f9dab; }

.card-heading { min-width: 0; flex: 1; }
.card-name { font-size: 15.5px; font-weight: 700; letter-spacing: .2px; }
.card-en {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .4px;
  color: var(--ink-3); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 状态徽章 */
.badge {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; }
.badge-online  { background: var(--green-soft); color: #12703a; }
.badge-online .dot { background: var(--green); box-shadow: 0 0 0 0 rgba(26, 158, 75, .6); animation: pulse 2s infinite; }
@keyframes pulse {
  70%  { box-shadow: 0 0 0 6px rgba(26, 158, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 158, 75, 0); }
}
.badge-beta    { background: var(--accent-soft); color: #a1570d; }
.badge-beta .dot { background: var(--accent); }
.badge-planned { background: #eef2f6; color: #6d7c8b; }
.badge-planned .dot { background: #a9b6c3; }

.card-desc {
  margin-top: 12px; font-size: 12.8px; line-height: 1.72; color: var(--ink-2);
  flex: 1;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.tag {
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 6px;
  background: var(--line-2); color: var(--ink-2); border: 1px solid #e6ecf3;
}

.card-foot {
  display: flex; align-items: center; gap: 9px;
  margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line-2);
}
.card-path {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.btn-enter {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 15px; border-radius: 8px; border: 0;
  background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 600;
  transition: background .18s ease, transform .18s ease;
}
.btn-enter:hover { background: var(--brand-dark); }
.btn-enter:active { transform: translateY(1px); }
.btn-enter svg { width: 15px; height: 15px; }
.card[data-status="online"] .btn-enter { background: var(--green); }
.card[data-status="online"] .btn-enter:hover { background: #14803c; }

.btn-locked {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 8px;
  border: 1px dashed #cdd8e3; background: transparent;
  font-size: 12.5px; font-weight: 600; color: var(--ink-3);
  cursor: not-allowed;
}
.btn-locked svg { width: 14px; height: 14px; }

/* 在线探测：卡片右上角状态点 */
.card-health {
  position: absolute; top: 14px; right: 14px;
  display: none; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700;
}
.card[data-status="online"] .card-health { display: inline-flex; }
.card-health .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #c3ccd6;
}
.card-health[data-state="ok"]   { color: #12703a; }
.card-health[data-state="ok"] .dot   { background: var(--green); }
.card-health[data-state="fail"] { color: #b3382e; }
.card-health[data-state="fail"] .dot { background: #dc4b3e; }
/* 有探测点时徽章下移，避免与探测点重叠 */
.card[data-status="online"] .badge-online { margin-right: 62px; }

/* 无结果 */
.empty {
  padding: 70px 20px; text-align: center; color: var(--ink-3);
  background: #fff; border: 1px dashed var(--line); border-radius: var(--radius);
  font-size: 14px;
}
.empty b { color: var(--ink-2); }

/* ============================ 能力底座 ============================ */
.foundation {
  margin: 26px 0 34px;
  background: linear-gradient(135deg, #10456f 0%, #0b3060 100%);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  color: #fff;
  position: relative; overflow: hidden;
}
.foundation::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 38px 38px; pointer-events: none;
}
.foundation-head { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.foundation-head h2 { font-size: 16.5px; font-weight: 800; letter-spacing: .4px; }
.foundation-head p { font-size: 12.5px; color: rgba(255, 255, 255, .68); }
.foundation-grid {
  position: relative; z-index: 1;
  display: grid; gap: 12px; margin-top: 18px;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}
.fnd {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  transition: background .2s ease;
}
.fnd:hover { background: rgba(255, 255, 255, .12); }
.fnd-top { display: flex; align-items: center; gap: 9px; }
.fnd-top svg { width: 17px; height: 17px; color: #7fbdf0; flex: none; }
.fnd-top b { font-size: 13.5px; font-weight: 700; }
.fnd p { margin-top: 7px; font-size: 12px; line-height: 1.65; color: rgba(255, 255, 255, .70); }

/* ============================ 页脚 ============================ */
.footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 20px 0 28px;
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center;
  font-size: 12px; color: var(--ink-3);
}
.footer-inner code {
  font-family: var(--mono); font-size: 11.5px;
  background: var(--line-2); padding: 2px 7px; border-radius: 5px; color: var(--ink-2);
}
.footer-hint { margin-left: auto; }

/* ============================ Toast ============================ */
.toast {
  position: fixed; left: 50%; bottom: 34px; z-index: 90;
  transform: translate(-50%, 14px);
  display: flex; align-items: center; gap: 9px;
  max-width: min(560px, calc(100vw - 40px));
  padding: 11px 17px; border-radius: 10px;
  background: #16232f; color: #fff;
  font-size: 13px; box-shadow: var(--shadow-3);
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 16px; height: 16px; flex: none; color: #ffc978; }

.noscript {
  max-width: 760px; margin: 40px auto; padding: 22px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 14px;
}
.noscript h3 { margin-bottom: 10px; }
.noscript li { margin: 6px 0 6px 20px; }

/* ============================ 交互状态 ============================ */
/* 业务流导航：当前所在节点高亮 */
.flow-step.is-active {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 4px 12px rgba(11, 92, 173, .28);
}
.flow-step.is-active .no { color: rgba(255, 255, 255, .72); }
.flow-step.is-active .cnt { background: rgba(255, 255, 255, .24); color: #fff; }
.flow-step.is-active:hover { color: #fff; }

/* 工具按钮：激活态 */
.btn-ghost.is-on { background: var(--brand-soft); border-color: #b9d3ee; color: var(--brand); }

/* 在线探测：检测中 */
.card-health[data-state="waiting"] { color: var(--ink-3); }
.card-health[data-state="waiting"] .dot { background: #d9a441; animation: pulse 1.4s infinite; }

/* ============================ 响应式 ============================ */
@media (max-width: 900px) {
  :root { --topbar-h: 57px; }
  .wrap { width: calc(100% - 30px); }
  .topbar-inner { height: 56px; }
  .brand-sub, .pill-host, .pill-env { display: none; }
  .hero-tools { gap: 8px; }
  .hero-tools .search { flex: 1 1 150px; }
  .hero-tools .search input { width: 100%; }
  .hero-tools .pill-live { order: 3; flex: 1 1 100%; }
  /* 六个环节在窄屏改为横向滚动，不换行 —— 换行会把吸顶区撑得很高 */
  .flowbar-inner { gap: 8px; }
  .flow-step { padding: 0 11px; font-size: 12.5px; }
  .stage-head { flex-wrap: wrap; padding: 15px 16px; }
  .stage-side { margin-left: 0; text-align: left; width: 100%; }
  .cards { padding: 14px 16px 18px; }
  .hero-inner { padding: 32px 0 28px; }
  .hero-stats { gap: 20px; }
  .foundation { padding: 22px 18px 18px; }
}

/* 窄屏才退化为单列，平板宽度仍保持多列以充分利用空间 */
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .stage-no { width: 36px; height: 36px; border-radius: 10px; font-size: 14px; }
  .stage-title h2 { font-size: 16.5px; }
  .hero-stat b { font-size: 22px; }
  .card[data-status="online"] .badge-online { margin-right: 58px; }
}
