/* ==========================================================================
   政府版 · 产业大脑 · 六维闭环飞轮（模块样式）
   作用域：.sd（六维模块根容器）——不污染平台既有样式
   令牌：全部取自平台主题层（wb.theme.css / wb.content.css），不引入新色
   维度色：取自体系原型（六维各有标识色，随数据内联下发）
   ========================================================================== */

/* ---------- 主页面：飞轮 + 关系列（两列） ---------- */
.sd-cols {
    display: grid;
    grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
    gap: var(--gap, 16px);
    align-items: start;
}

.sd-fw-box {
    padding: 6px 10px 10px;
    border-radius: var(--r-md, 10px);
    background: linear-gradient(180deg, #FBFCFF 0%, #F5F7FA 100%);
    border: 1px solid var(--line-2, #EFF2F8);
}
.sd-svg { width: 100%; height: auto; display: block; }
.sd-node { cursor: pointer; }
.sd-node circle.sd-hit { transition: opacity .15s ease; }
.sd-node:hover circle.sd-hit { opacity: .14; }
.sd-node text { pointer-events: none; }
.sd-center-t { font-weight: 700; }

/* ---------- 六维入口卡片 ---------- */
.sd-dims {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.sd-dim {
    position: relative;
    overflow: hidden;
    padding: 14px 16px 14px 20px;
    background: var(--card, #fff);
    border: 1px solid var(--line, #E6EAF2);
    border-radius: var(--r-md, 10px);
    cursor: pointer;
    transition: transform .18s cubic-bezier(.22, 1, .36, 1), box-shadow .18s ease, border-color .18s ease;
}
@media (hover: hover) and (pointer: fine) {
    .sd-dim:hover { transform: translateY(-2px); box-shadow: var(--sh-md, 0 12px 30px rgba(11,18,32,.07)); }
}
.sd-dim .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.sd-dim .no { font-size: 11px; letter-spacing: 1px; color: var(--ink-3, #8A93A6); }
.sd-dim h4 { font-size: 15px; font-weight: 700; color: var(--ink, #0B1220); margin: 2px 0 1px; }
.sd-dim .en { font-size: 11px; color: var(--ink-3, #8A93A6); margin-bottom: 8px; }
.sd-dim .tag { font-size: 12.5px; font-weight: 600; color: var(--ink-2, #3A4457); }
.sd-dim .role {
    display: inline-block; font-size: 11px; font-weight: 600;
    padding: 2px 9px; border-radius: 999px; margin-top: 10px;
}
.sd-dim .go {
    position: absolute; right: 12px; top: 12px;
    font-size: 11.5px; color: var(--ink-3, #8A93A6);
    display: flex; align-items: center; gap: 2px;
}

/* ---------- 详情页：维度头 ---------- */
.sd-back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 500; color: var(--primary, #085BFF);
    cursor: pointer; margin-bottom: 14px; user-select: none;
}
.sd-back:hover { text-decoration: underline; }
.sd-crumb { font-size: 12.5px; color: var(--ink-3, #8A93A6); margin-left: 12px; }

.sd-dimhead {
    background: var(--card, #fff);
    border: 1px solid var(--line, #E6EAF2);
    border-radius: var(--r-lg, 14px);
    padding: 18px 20px;
    margin-bottom: var(--gap, 16px);
    box-shadow: var(--sh-sm, 0 2px 10px rgba(11,18,32,.05));
}
.sd-dimhead .row1 { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.sd-dimhead .badge {
    width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 15px; text-align: center; line-height: 1.15;
}
.sd-dimhead h2 { font-size: 20px; font-weight: 700; line-height: 1.25; }
.sd-dimhead .en { font-size: 12px; color: var(--ink-3, #8A93A6); }
.sd-dimhead .tagline { font-size: 14px; font-weight: 600; margin-top: 4px; }
.sd-dimhead .roles { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.sd-pill {
    font-size: 11.5px; padding: 4px 11px; border-radius: 999px;
    font-weight: 600; border: 1px solid var(--line, #E6EAF2); white-space: nowrap;
}
.sd-dimhead .pos {
    margin-top: 12px; padding-top: 12px;
    border-top: 1px dashed var(--line, #E6EAF2);
    font-size: 13px; color: var(--ink-2, #3A4457); line-height: 1.75;
}

/* ---------- 详情页：八大模块页签 ---------- */
.sd-tabs {
    display: flex; flex-wrap: wrap; gap: 4px;
    background: var(--card, #fff);
    border: 1px solid var(--line, #E6EAF2);
    border-bottom: none;
    border-radius: var(--r-lg, 14px) var(--r-lg, 14px) 0 0;
    padding: 8px 10px 0;
    margin-bottom: 0;
}
.sd-tab {
    border: none; background: none; font-family: inherit;
    padding: 8px 14px; font-size: 13px; color: var(--ink-2, #3A4457);
    cursor: pointer; border-radius: 8px 8px 0 0;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color .15s ease, background .15s ease;
    white-space: nowrap;
}
.sd-tab:hover { background: #F5F7FA; color: var(--ink, #0B1220); }
.sd-tab.on { font-weight: 700; border-bottom-color: var(--primary, #085BFF); background: var(--primary-light, #EDF3FF); }
.sd-panel-wrap {
    background: var(--card, #fff);
    border: 1px solid var(--line, #E6EAF2);
    border-radius: 0 0 var(--r-lg, 14px) var(--r-lg, 14px);
    padding: 18px 20px;
    margin-bottom: var(--gap, 16px);
}

/* ---------- 内容原子 ---------- */
.sd-sec { margin-bottom: 18px; }
.sd-sec:last-child { margin-bottom: 0; }
.sd-h4 {
    font-size: 13.5px; font-weight: 700; color: var(--ink, #0B1220);
    margin-bottom: 8px; display: flex; align-items: center; gap: 7px;
}
.sd-h4::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--primary, #085BFF); }
.sd-h5 { font-size: 13px; font-weight: 700; color: var(--ink, #0B1220); margin: 14px 0 6px; }
.sd-p { font-size: 13.4px; color: var(--ink-2, #3A4457); line-height: 1.8; margin-bottom: 8px; text-align: justify; }
.sd-p:last-child { margin-bottom: 0; }

.sd-list { list-style: none; }
.sd-list li {
    font-size: 13.3px; color: var(--ink-2, #3A4457); line-height: 1.75;
    padding: 7px 0 7px 18px; position: relative;
    border-bottom: 1px dashed var(--line-2, #EFF2F8);
}
.sd-list li:last-child { border-bottom: none; }
.sd-list li::before {
    content: ""; position: absolute; left: 4px; top: 15px;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--primary, #085BFF); opacity: .5;
}

.sd-steps { list-style: none; counter-reset: sd; }
.sd-steps li {
    counter-increment: sd; position: relative;
    padding: 9px 0 9px 36px;
    border-bottom: 1px dashed var(--line-2, #EFF2F8);
}
.sd-steps li:last-child { border-bottom: none; }
.sd-steps li::before {
    content: counter(sd); position: absolute; left: 0; top: 10px;
    width: 23px; height: 23px; border-radius: 50%;
    background: var(--primary-light, #EDF3FF); color: var(--primary, #085BFF);
    font-size: 11.5px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.sd-steps li b { display: block; font-size: 13.4px; font-weight: 700; color: var(--ink, #0B1220); }
.sd-steps li span { font-size: 13px; color: var(--ink-2, #3A4457); line-height: 1.7; }

/* 内容表（长文本）：不用 .tbl（固定行高 48px 会挤压） */
.sd-tw {
    overflow: auto; max-height: 560px;
    border: 1px solid var(--line, #E6EAF2);
    border-radius: var(--r-md, 10px);
}
.sd-tb { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.sd-tb th {
    position: sticky; top: 0; z-index: 1;
    background: var(--c-tile, #F7F6F2);
    text-align: left; padding: 9px 12px;
    font-weight: 700; color: var(--ink, #0B1220);
    border-bottom: 1px solid var(--line, #E6EAF2);
    white-space: nowrap;
}
.sd-tb td {
    padding: 9px 12px; border-bottom: 1px solid var(--line-2, #EFF2F8);
    color: var(--ink-2, #3A4457); vertical-align: top; line-height: 1.7;
    /* 覆盖平台全局 td 的「单行省略」——本模块的表是长文本表，必须换行 */
    white-space: normal; overflow: visible; text-overflow: clip; max-width: none;
}
.sd-tb tbody tr:last-child td { border-bottom: none; }
.sd-tb tbody tr:hover td { background: #FAFBFC; }
.sd-tb td.sd-strong { font-weight: 600; color: var(--ink, #0B1220); white-space: nowrap; }

.sd-note {
    font-size: 12.4px; color: var(--ink-2, #3A4457); line-height: 1.75;
    background: #F8FAFC; border: 1px solid var(--line-2, #EFF2F8);
    border-left: 3px solid var(--primary, #085BFF);
    padding: 9px 12px; border-radius: 0 8px 8px 0;
    margin-top: 10px;
}
.sd-box {
    background: #FAFBFC; border: 1px solid var(--line-2, #EFF2F8);
    border-radius: 8px; padding: 12px 14px; margin-bottom: 10px;
}
.sd-box:last-child { margin-bottom: 0; }
.sd-box .bt { font-size: 13px; font-weight: 700; color: var(--ink, #0B1220); margin-bottom: 5px; }
.sd-box .bc { font-size: 13px; color: var(--ink-2, #3A4457); line-height: 1.78; text-align: justify; }
.sd-box.warn { background: #FFFAF3; border-color: #F5E3C8; }
.sd-box.info { background: #F3F7FF; border-color: #D8E5FB; }

.sd-case {
    border: 1px solid var(--line, #E6EAF2); border-left-width: 3px;
    border-radius: 8px; padding: 12px 14px; margin-bottom: 10px;
}
.sd-case:last-child { margin-bottom: 0; }
.sd-case .ct { font-size: 13.2px; font-weight: 700; margin-bottom: 4px; }
.sd-case .cc { font-size: 13px; color: var(--ink-2, #3A4457); line-height: 1.78; text-align: justify; }

.sd-kv { display: flex; gap: 12px; font-size: 13px; padding: 8px 0; border-bottom: 1px dashed var(--line-2, #EFF2F8); }
.sd-kv:last-child { border-bottom: none; }
.sd-kv .k { flex: 0 0 170px; color: var(--ink-3, #8A93A6); font-size: 12.5px; }
.sd-kv .v { color: var(--ink-2, #3A4457); line-height: 1.7; }

.sd-link {
    border-radius: 8px; padding: 13px 15px;
    font-size: 13.2px; line-height: 1.8; text-align: justify;
    color: var(--ink-2, #3A4457);
}
.sd-tagx {
    display: inline-block; font-size: 11px; font-weight: 600;
    padding: 2px 9px; border-radius: 999px; white-space: nowrap;
}

/* ---------- 上一维 / 下一维 ---------- */
.sd-nav2 { display: flex; gap: 12px; margin-top: 4px; }
.sd-nav2 > * { flex: 1 1 0; min-width: 0; }
.sd-nav2 .sd-navbtn {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px; cursor: pointer;
    background: var(--card, #fff);
    border: 1px solid var(--line, #E6EAF2);
    border-radius: var(--r-md, 10px);
    transition: transform .18s cubic-bezier(.22, 1, .36, 1), box-shadow .18s ease;
}
@media (hover: hover) and (pointer: fine) {
    .sd-nav2 .sd-navbtn:hover { transform: translateY(-2px); box-shadow: var(--sh-md, 0 12px 30px rgba(11,18,32,.07)); }
}
.sd-nav2 .t { font-size: 13.5px; font-weight: 700; color: var(--ink, #0B1220); }
.sd-nav2 .s { font-size: 11.5px; color: var(--ink-3, #8A93A6); }
.sd-nav2 .next { justify-content: flex-end; text-align: right; }

/* ---------- 飞轮临界点判定 ---------- */
.sd-th { display: grid; grid-template-columns: 1fr 150px 86px; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--line-2, #EFF2F8); }
.sd-th:last-of-type { border-bottom: none; }
.sd-th .lb { font-size: 13.2px; font-weight: 600; color: var(--ink, #0B1220); }
.sd-th .cd { font-size: 11.5px; color: var(--ink-3, #8A93A6); }
.sd-th input {
    width: 100%; height: 34px; font-family: inherit; font-size: 13px;
    border: 1px solid var(--line, #E6EAF2); border-radius: 8px; padding: 0 10px;
    outline: none; color: var(--ink, #0B1220); background: #fff;
}
.sd-th input:focus { border-color: var(--primary, #085BFF); box-shadow: 0 0 0 3px rgba(8, 91, 255, .08); }
.sd-th .st { font-size: 12px; font-weight: 700; padding: 5px 0; text-align: center; border-radius: 6px; }
.sd-th .st.pass { background: #E7F6EF; color: #0FA968; }
.sd-th .st.fail { background: #FDECEC; color: #E5484D; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
    .sd-cols { grid-template-columns: 1fr; }
    .sd-dims { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sd-nav2 { flex-direction: column; }
}
@media (max-width: 760px) {
    .sd-dims { grid-template-columns: 1fr; }
    .sd-th { grid-template-columns: 1fr; }
    .sd-kv .k { flex: 0 0 110px; }
}
