/* ===========================================================================
 * 化学品数据共享平台 /share —— 页面专属样式（fix102）
 *
 * 只放本页独有的结构样式；颜色、圆角、阴影全部走 design-tokens 的 CSS 变量，
 * 保证与站点其它页面（资讯中心、环评提取等）视觉一致。
 * 复用：.page-header / .card-panel / .form-control-green / .note-box / .share-table
 * ======================================================================== */

/* ---------- 通用：小节标题 ---------- */
.share-section-head {
    text-align: center;
    margin: 2.6rem 0 1.6rem;
}
.share-section-head h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ink, #1d2822);
    margin: 0 0 .45rem;
    letter-spacing: .5px;
}
.share-section-head p {
    font-size: .92rem;
    color: var(--muted, #74837a);
    margin: 0;
}

/* ---------- 双路径选择卡 ---------- */
.share-paths {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}
.share-path-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line, #e2eae4);
    border-radius: var(--radius, 14px);
    padding: 1.6rem 1.6rem 1.4rem;
    box-shadow: 0 3px 14px -6px rgba(15, 60, 30, .12);
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
    position: relative;
    overflow: hidden;
}
/* 顶部主色条：区分两条业务线 */
.share-path-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--green, #2f7d4f), #3f9b64);
}
.share-path-card:hover {
    box-shadow: 0 12px 30px -12px rgba(15, 60, 30, .28);
    transform: translateY(-2px);
    border-color: var(--green-l, #eaf4ee);
}
.share-path-card h3 {
    font-size: 1.24rem;
    font-weight: 800;
    color: var(--ink, #1d2822);
    margin: 0 0 .7rem;
}
.share-path-tag {
    display: inline-block;
    align-self: flex-start;
    font-size: .78rem;
    font-weight: 600;
    color: var(--green-d, #215c3a);
    background: var(--green-l, #eaf4ee);
    border-radius: 999px;
    padding: .22rem .75rem;
    margin-bottom: 1rem;
}
.share-path-desc {
    font-size: .92rem;
    line-height: 1.75;
    color: var(--ink-2, #44514a);
    margin: 0 0 1.1rem;
}
.share-path-points {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}
.share-path-points li {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .9rem;
    color: var(--ink-2, #44514a);
    line-height: 1.7;
    margin-bottom: .45rem;
}
.share-path-points li:last-child { margin-bottom: 0; }
.share-path-points i {
    color: var(--green, #2f7d4f);
    font-size: .95rem;
    line-height: 1.7;
    flex: 0 0 auto;
}
/* 按钮统一沉到卡片底部，两卡按钮对齐 */
.share-path-btn {
    margin-top: auto;
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: .72rem 1rem;
    font-size: .98rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(120deg, var(--green, #2f7d4f), #3f9b64);
    box-shadow: 0 6px 16px -6px rgba(47, 125, 79, .55);
    transition: filter .18s ease, box-shadow .18s ease, transform .18s ease;
}
.share-path-btn:hover {
    color: #fff;
    filter: brightness(1.06);
    box-shadow: 0 10px 22px -8px rgba(47, 125, 79, .65);
    transform: translateY(-1px);
}
.share-path-btn:active { transform: translateY(0); }
.share-path-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

/* ---------- 页头（承载平台介绍） ----------
 *
 * `.page-header` 是全站共用组件（资讯中心 / 使用说明 / 重置密码都在用），
 * 🔴 不能改它的全局样式。所有增强都限定在 `.share-hero` 内，绝不外溢。
 *
 * fix102v4：页头简化为「标题 + 一段平台介绍」，
 * 用完整的平台介绍文案替换了原来那句「仅注册用户可提交…」。
 *
 * 🔴 不要给这段加 max-width。
 *   初版限制 42em（约 632px）本意是控制中文行长，但页头是通栏绿条（约 1030px），
 *   结果文字只占左侧六成、右边空一大块，看起来像"内容没铺满"。
 *   通栏容器里的正文应当自然撑满，靠 line-height 与字号控制可读性即可。
 */
.share-hero {
    padding: 1.8rem 2rem 1.7rem;
}
.share-hero h1 {
    margin-bottom: .6rem;
}
.share-hero .share-hero-lead {
    margin: 0 !important;
    font-size: .94rem !important;
    line-height: 1.85;
    opacity: .95;
}
@media (max-width: 767.98px) {
    .share-hero {
        padding: 1.35rem 1.15rem 1.25rem;
    }
    .share-hero .share-hero-lead {
        font-size: .885rem !important;
        line-height: 1.8;
    }
}

/* ---------- 平台价值（4 图） ----------
 *
 * fix102v10：底色对齐站点主视觉（资讯中心 / 功能区所在层级）。
 *
 * 前几版试过 #eaf4ee（浅绿，与墨绿页头同色系 → 分不出板块）、
 * #eef1f6（冷灰蓝 → 偏冷，与全站暖绿调不搭）。
 *
 * 现在改用 **#fafbf9** —— 近乎白的中性浅色，带极淡暖调：
 *   · 与顶部墨绿页头形成明确明度差（L 差 > 40），板块边界一眼可见
 *   · 与卡片纯白只差 5 个色阶，卡片靠阴影浮起，不会"糊成一块"
 *   · 不引入新色相，与站点主色（墨绿）保持同一调性
 *
 * 通栏做法沿用 calc(50% - 50vw)，不受 .main-container 的 max-width 影响。
 */
.share-value {
    background: #fafbf9;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 2rem;
    padding: 2.6rem calc((100vw - min(1200px, 100vw)) / 2) 2.8rem;
    box-sizing: border-box;
    /* 与上方白卡之间需要一道极淡的分隔，否则两块白连成一片 */
    border-top: 1px solid var(--line, #e2eae4);
}
.share-value .share-section-head {
    margin-top: 0;
}
@media (max-width: 767.98px) {
    .share-value {
        margin-top: 1.5rem;
        padding: 2rem 0.6rem 2.2rem;
        max-width: 100vw;
    }
}

.share-value-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}
.share-value-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line, #e2eae4);
    border-radius: var(--radius, 14px);
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}
.share-value-card:hover {
    box-shadow: 0 14px 32px -14px rgba(15, 60, 30, .3);
    transform: translateY(-3px);
}
.share-value-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eef2ef;
}
.share-value-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.share-value-card:hover .share-value-media img { transform: scale(1.04); }
/* fix103：卡片没配图时的占位（后台允许留空，前台不能出现破图图标） */
.share-value-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef4f0, #e3ece6);
    color: #9db3a6;
    font-size: 2rem;
}
.share-value-body { padding: 1rem 1.1rem 1.2rem; }
.share-value-body h4 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink, #1d2822);
    margin: 0 0 .5rem;
}
.share-value-body p {
    font-size: .855rem;
    line-height: 1.75;
    color: var(--ink-2, #44514a);
    margin: 0;
}

/* ---------- 弹窗 ---------- */
body.share-modal-open { overflow: hidden; }

.share-modal-mask {
    position: fixed;
    inset: 0;
    z-index: 1080;
    background: rgba(16, 32, 24, .55);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 3rem 1rem;
    overflow-y: auto;
}
.share-modal {
    width: 100%;
    max-width: 860px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 30px 70px -20px rgba(0, 30, 15, .45);
    overflow: hidden;
    animation: shareModalIn .22s ease-out;
}
@keyframes shareModalIn {
    from { opacity: 0; transform: translateY(-12px) scale(.99); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.share-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.7rem 1.1rem;
    border-bottom: 1px solid var(--line, #e2eae4);
}
.share-modal-head h3 {
    font-size: 1.28rem;
    font-weight: 800;
    color: var(--ink, #1d2822);
    margin: 0;
}
.share-modal-close {
    border: none;
    background: transparent;
    color: var(--muted, #74837a);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.share-modal-close:hover {
    background: var(--green-l, #eaf4ee);
    color: var(--green-d, #215c3a);
}
.share-modal-body { padding: 1.5rem 1.7rem .4rem; }
.share-modal-foot {
    padding: 1rem 1.7rem 1.5rem;
    border-top: 1px solid var(--line, #e2eae4);
    background: #fbfdfc;
}
.share-modal-foot .share-path-btn { margin-top: 0; }

/* 表单标签 */
.share-modal .form-label {
    font-size: .9rem;
    font-weight: 700;
    color: var(--ink, #1d2822);
    margin-bottom: .4rem;
}
.share-opt {
    font-weight: 400;
    color: var(--muted, #74837a);
    font-size: .84rem;
}
.share-hint {
    font-size: .78rem;
    color: var(--muted, #74837a);
    margin-top: .35rem;
}

/* 胶囊选项（是/否、数据类型） */
.share-radio-pills,
.share-check-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}
.share-pill {
    border: 1px solid var(--line, #e2eae4);
    background: #fff;
    color: var(--ink-2, #44514a);
    border-radius: 999px;
    padding: .5rem 1.25rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .16s ease;
    line-height: 1.3;
}
.share-pill:hover {
    border-color: var(--green, #2f7d4f);
    color: var(--green-d, #215c3a);
    background: var(--green-l, #eaf4ee);
}
.share-pill.active {
    background: var(--green, #2f7d4f);
    border-color: var(--green, #2f7d4f);
    color: #fff;
    box-shadow: 0 4px 12px -5px rgba(47, 125, 79, .6);
}
.share-pill:focus-visible {
    outline: 2px solid var(--green, #2f7d4f);
    outline-offset: 2px;
}

/* 提交结果提示 */
.share-form-msg {
    margin: 1rem 0 .2rem;
    padding: .65rem .9rem;
    border-radius: 9px;
    font-size: .88rem;
    line-height: 1.6;
}
.share-form-msg.err {
    background: #fdf1f0;
    color: #b3261e;
    border: 1px solid #f7d5d2;
}
.share-form-msg.ok {
    background: var(--green-l, #eaf4ee);
    color: var(--green-d, #215c3a);
    border: 1px solid #cfe6d8;
}

/* ---------- 我的提交：类型标签 ---------- */
.share-type-tag {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    border-radius: 6px;
    padding: .16rem .5rem;
    white-space: nowrap;
}
.share-type-tag.joint {
    background: #eaf1fb;
    color: #1f5fa8;
}
.share-type-tag.data {
    background: var(--green-l, #eaf4ee);
    color: var(--green-d, #215c3a);
}

/* ---------- 响应式 ---------- */
@media (max-width: 991.98px) {
    .share-value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .share-paths { grid-template-columns: 1fr; gap: 1.1rem; }
    .share-section-head { margin: 2rem 0 1.2rem; }
    .share-section-head h2 { font-size: 1.32rem; }
    .share-value-grid { grid-template-columns: 1fr; }
    .share-modal-mask { padding: 1rem .6rem 2rem; }
    .share-modal-head { padding: 1.1rem 1.15rem .9rem; }
    .share-modal-body { padding: 1.2rem 1.15rem .3rem; }
    .share-modal-foot { padding: .9rem 1.15rem 1.15rem; }
    .share-modal-head h3 { font-size: 1.1rem; }
}
