/* ============================================================
   AIDC Semantic —— /semantic 介绍页（public/semantic.html）。
   外层 .hd.sm：标题、段落、FAQ、收尾沿用 home.css 的 .hd-* 契约；
   子导航、代码块、复制按钮、圆点列表、编号步骤、分格流程复用 developer.css 的 dv-*（页面同时加载 developer.css）。
   这里只补 sm- 开头的几块；颜色一律用 site.css 的令牌。
   ============================================================ */
.sm p a, .sm li a { border-bottom: 0; }
/* 顶栏 + 子导航约 112px；.hd-sec 自带 104–176px 的上边距，锚点跳转只需再补一点 */
.sm .hd-sec[id] { scroll-margin-top: 16px; }
.sm code { background: none; border: 0; padding: 0; font-family: var(--font-mono); }

/* ---------- 首屏 ---------- */
.sm-hero { padding-top: clamp(48px, 7vw, 96px); text-align: center; }
.sm .sm-hero-icon { width: 72px; height: 72px; margin: 0 auto 20px; }
.sm-hero h1 { font-size: clamp(2.75rem, 5.6vw, 5rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.05em; }
.sm .sm-tag { margin-top: 10px; font-size: clamp(1.35rem, 2.5vw, 2.1rem); font-weight: 500; line-height: 1.3; letter-spacing: -0.03em; color: var(--mut); }
.sm .sm-hero-sub { margin: 20px auto 0; max-width: 36em; font-size: clamp(1.02rem, 1.4vw, 1.15rem); line-height: 1.7; color: var(--mut); }
.sm-hero .btn-row { margin-top: 32px; justify-content: center; }
.sm-hero-art { margin: clamp(28px, 4vw, 48px) auto 0; max-width: 1040px; }
.sm-hero-art img { width: 100%; height: auto; }
.sm-stats-wrap { margin-top: clamp(40px, 5vw, 64px); }

/* ---------- 一份数据：数据源 → Ontology → 人 / 应用 / 智能体 ---------- */
.sm-map { display: grid; grid-template-columns: minmax(0, 1fr) clamp(64px, 7vw, 96px) minmax(0, 1.25fr) clamp(64px, 7vw, 96px) minmax(0, 1fr); align-items: center; padding: clamp(20px, 3vw, 36px); border: 1px solid var(--line); border-radius: 20px; background: var(--bg-2); }
.sm-col { display: grid; gap: 8px; min-width: 0; }
.sm-col-h, .sm-kind-h { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mut-2); }
.sm-col-h { margin-bottom: 4px; }
.sm-node { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.sm-node svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--ink-strong); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sm .sm-node img { flex: none; width: 22px; height: 22px; }
.sm-node div { min-width: 0; }
.sm-node b { display: block; font-size: 0.95rem; font-weight: 600; color: var(--ink-strong); }
.sm-node span { display: block; font-size: 0.8125rem; line-height: 1.45; color: var(--mut); }

/* 连线：虚线画在背景上，::after 是指向右边的箭头，--both 再用 ::before 补一个指向左边的 */
.sm-link { position: relative; align-self: stretch; display: grid; place-items: center; min-height: 48px; background: repeating-linear-gradient(90deg, var(--signal) 0 3px, transparent 3px 7px) center / calc(100% - 16px) 2px no-repeat; }
.sm-link::after, .sm-link--both::before { content: ""; position: absolute; top: calc(50% - 4.5px); width: 9px; height: 9px; box-sizing: border-box; border-top: 2px solid var(--signal); border-right: 2px solid var(--signal); }
.sm-link::after { right: 8px; transform: rotate(45deg); }
.sm-link--both::before { left: 8px; transform: rotate(-135deg); }
.sm-link span { position: relative; max-width: calc(100% - 20px); padding: 3px 6px; border-radius: 6px; background: var(--bg-2); font-size: 0.75rem; font-weight: 500; line-height: 1.25; text-align: center; overflow-wrap: anywhere; hyphens: auto; color: var(--signal); }

.sm-core { min-width: 0; padding: 20px 20px 16px; border: 1px solid color-mix(in srgb, var(--signal) 45%, transparent); border-radius: 16px; background: var(--bg); box-shadow: 0 0 0 4px var(--signal-soft), var(--hd-shadow); }
.sm-core-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 18px; }
.sm-core-h b { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink-strong); }
.sm-core-h span { font-family: var(--font-mono); font-size: 0.72rem; color: var(--mut-2); }
/* 5 列 × 3 行：对象 · 横线 · 对象 · 横线 · 对象 / 三条竖线 / 对象 · 空 · 对象 · 空 · 对象 */
.sm-graph { display: grid; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr) 14px minmax(0, 1fr); grid-template-rows: auto 20px auto; align-items: center; justify-items: center; }
.sm-o { justify-self: stretch; min-width: 0; padding: 6px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); font-size: 0.8125rem; font-weight: 500; text-align: center; color: var(--ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-o--hot { border-color: var(--signal); background: var(--signal-soft); color: var(--signal); }
.sm-e { justify-self: stretch; height: 1.5px; background: var(--mut-2); }
.sm-v { width: 1.5px; height: 100%; background: var(--mut-2); }
.sm .sm-core-f { margin-top: 16px; font-size: 0.8125rem; text-align: center; color: var(--mut); }

.sm-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--hd-gap); margin-top: clamp(28px, 4vw, 44px); }
.sm-facts > div { padding-top: 16px; border-top: 1.5px solid var(--ink-strong); }
.sm-facts b { display: block; font-size: 1.0625rem; font-weight: 600; color: var(--ink-strong); }
.sm-facts span { display: block; margin-top: 4px; line-height: 1.65; color: var(--mut); }

/* ---------- Ontology：Object Type 的属性表 + 名词 / 动词 ---------- */
.sm-onto { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--hd-gap); align-items: start; }
.sm-win { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); box-shadow: var(--hd-shadow); overflow: hidden; }
.sm-win-bar { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.sm-win-bar i { flex: none; width: 10px; height: 10px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line); }
.sm-win-bar span { min-width: 0; margin-left: 10px; font-size: 0.8125rem; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-win-bar b { font-weight: 600; color: var(--ink-strong); }
.sm-tabs { display: flex; gap: 20px; padding: 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.sm-tabs span { flex: none; padding: 11px 0 9px; border-bottom: 2px solid transparent; font-size: 0.8125rem; color: var(--mut); }
.sm-tabs .on { border-bottom-color: var(--signal); font-weight: 600; color: var(--ink-strong); }
.sm-table-wrap { overflow-x: auto; }
.sm-props { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.sm-props th { padding: 10px 16px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; white-space: nowrap; color: var(--mut-2); }
.sm-props td { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; line-height: 1.5; color: var(--mut); }
.sm-props td:first-child code { font-weight: 500; color: var(--ink-strong); }
.sm-props td:nth-child(2) { font-family: var(--font-mono); font-size: 0.8rem; white-space: nowrap; color: var(--ink); }
.sm-props code { font-size: 0.8rem; }
.sm-props em { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 999px; background: var(--bg-3); font-size: 0.72rem; font-style: normal; font-weight: 600; color: var(--ink-strong); }
.sm-props em.sm-pk { background: var(--ink-strong); color: var(--bg); }
.sm-props em.sm-dv { background: var(--signal-soft); color: var(--signal); }
.sm-win-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 12px 16px; background: var(--bg-2); font-size: 0.8125rem; color: var(--mut); }
.sm-win-foot code { padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 0.75rem; color: var(--ink); }

.sm-kinds { display: grid; gap: 10px; align-content: start; min-width: 0; }
.sm-kinds .sm-kind-h:not(:first-child) { margin-top: 10px; }
.sm-cons { display: grid; gap: 1px; border: 1px solid var(--line); border-radius: 16px; background: var(--line); overflow: hidden; }
.sm-cons > div { padding: 14px 18px 15px; background: var(--bg); }
.sm .sm-cons h3 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.sm .sm-cons p { margin-top: 3px; font-size: 0.875rem; line-height: 1.6; color: var(--mut); }
.sm-cons--verbs { border-color: color-mix(in srgb, var(--signal) 45%, transparent); background: color-mix(in srgb, var(--signal) 30%, transparent); }
.sm .sm-cons--verbs h3 { color: var(--signal); }

/* ---------- 图 + 文 ---------- */
.sm-split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--hd-gap); align-items: center; }
.sm-art img { width: 100%; height: auto; }
.sm-art--wide { max-width: 980px; margin: 0 auto clamp(28px, 4vw, 48px); }
.sm-art--sm { max-width: 440px; }

/* ---------- 数据库 ---------- */
.sm-sql { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--hd-gap); align-items: start; }
.sm-sql-main, .sm-sql-side { min-width: 0; }
.sm .sm-code { margin: 0; border: 0; border-radius: 0; background: var(--bg); font-size: 0.84rem; white-space: pre; overflow-x: auto; }
.sm-result { border-top: 1px solid var(--line); }
.sm-result > div { display: grid; grid-template-columns: 2fr 1.4fr 1fr; gap: 16px; padding: 9px 16px; border-bottom: 1px solid var(--line-soft); }
.sm-result-h span { font-family: var(--font-mono); font-size: 0.75rem; color: var(--mut-2); }
.sm-result i { display: block; width: var(--w); height: 8px; border-radius: 999px; background: var(--bg-3); }
.sm-win-foot--sql { justify-content: space-between; }
.sm .sm-conn { max-width: none; margin-top: 12px; }
.sm-sql-side .dv-list { margin-top: 20px; }
.sm .dv-list b { font-weight: 600; color: var(--ink-strong); }

/* ---------- 智能体建模：四步 ---------- */
.sm .dv-flow { border-radius: 16px; }
.sm .dv-flow h3 { font-weight: 600; letter-spacing: -0.015em; }
.sm .sm-flow4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- 分享 ---------- */
.sm-levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sm-levels > div { padding: 22px 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.sm-levels span { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.12em; color: var(--mut-2); }
.sm .sm-levels h3 { margin-top: 10px; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; }
.sm .sm-levels p { margin-top: 6px; line-height: 1.65; color: var(--mut); }
.sm-levels > div:last-child { border-color: color-mix(in srgb, var(--signal) 60%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--signal) 60%, transparent), var(--hd-shadow); }
.sm-levels > div:last-child span { color: var(--signal); }
.sm-roles-wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--hd-gap); align-items: start; margin-top: clamp(28px, 4vw, 44px); }
.sm-roles { width: 100%; border-collapse: collapse; }
.sm-roles th { padding: 0 16px 10px 0; border-bottom: 1.5px solid var(--ink-strong); font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.12em; text-align: left; text-transform: uppercase; color: var(--mut-2); }
.sm-roles td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.6; color: var(--mut); }
.sm-roles td:first-child { width: 8.5em; font-weight: 600; white-space: nowrap; color: var(--ink-strong); }
.sm-roles-wrap .dv-list { margin-top: 0; }

/* ---------- 开发者：四张代码卡 ---------- */
.sm-dev { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sm-codecard { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); overflow: hidden; }
.sm-codecard-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px 9px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.sm-codecard-h b { font-size: 0.9375rem; font-weight: 600; color: var(--ink-strong); }
.sm .sm-codecard .dv-code { flex: 1; margin: 0; border: 0; border-radius: 0; background: none; font-size: 0.78rem; line-height: 1.7; }
.sm .sm-more { margin-top: 28px; }

/* ---------- AIDC 自己的 Ontology ---------- */
.sm-aidc { display: grid; gap: 22px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: 20px; background: var(--bg-2); }
.sm-aidc-g { display: grid; gap: 10px; }
.sm-kind-h--pub { color: var(--signal); }
.sm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sm-chips > span { display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.sm-chips b { font-size: 0.9375rem; font-weight: 600; color: var(--ink-strong); }
.sm-chips code { font-size: 0.75rem; color: var(--mut-2); }
.sm-chips--pub > span { border-color: color-mix(in srgb, var(--signal) 45%, transparent); }
.sm-counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: 12px; background: var(--line); overflow: hidden; }
.sm-counts div { padding: 14px 16px; background: var(--bg); }
.sm-counts b { display: block; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.03em; color: var(--ink-strong); font-feature-settings: "tnum" 1; }
.sm-counts span { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; color: var(--mut); }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .sm-onto, .sm-sql, .sm-split, .sm-roles-wrap { grid-template-columns: minmax(0, 1fr); }
  .sm-split .sm-art { max-width: 560px; }
  .sm .sm-flow4, .sm-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  /* 一份数据：竖排，连线转成竖向，箭头朝下（--both 另有一个朝上） */
  .sm-map { grid-template-columns: minmax(0, 1fr); }
  .sm-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm-col-h { grid-column: 1 / -1; }
  .sm-link { min-height: 64px; background: repeating-linear-gradient(180deg, var(--signal) 0 3px, transparent 3px 7px) center / 2px calc(100% - 16px) no-repeat; }
  .sm-link::after, .sm-link--both::before { top: auto; left: calc(50% - 4.5px); right: auto; }
  .sm-link::after { bottom: 8px; transform: rotate(135deg); }
  .sm-link--both::before { top: 8px; transform: rotate(-45deg); }
}
@media (max-width: 720px) {
  .sm-facts, .sm-levels, .sm-dev { grid-template-columns: minmax(0, 1fr); }
  .sm .sm-flow4 { grid-template-columns: minmax(0, 1fr); }
  .sm-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm-counts div:last-child { grid-column: 1 / -1; }
  .sm-props th, .sm-props td { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 480px) {
  .sm-col { grid-template-columns: minmax(0, 1fr); }
  /* 手机上属性表只留 API name 与说明两列，说明里的长 API name 可以断行 */
  .sm-props th:nth-child(2), .sm-props td:nth-child(2) { display: none; }
  .sm-props td:last-child code { overflow-wrap: anywhere; }
  .sm-roles td:first-child { width: auto; }
}
