/* processDetail.css — 对齐 samples/*/preview.html 视觉 */

:root {
    --pd-ink: #12151a;
    --pd-muted: #5c6775;
    --pd-line: #dbe1e8;
    --pd-bg: #eef1f5;
    --pd-accent: #4338ca;
    --pd-card: #fff;
    /* 默认也不用死黑：偏主题色的深蓝紫 */
    --pd-dark: #312e81;
    --pd-tint: #a5b4fc;
}

/* 页面底色 + 取消百科外层白卡套娃；宽度跟百科详情一致（container2 ≈1440） */
.encyclopedia-detail-container.process-detail-page {
    background: transparent;
    padding-bottom: 60px;
}

.encyclopedia-detail-container.process-detail-page > .container2 {
    /* 不收窄到 1000：与百科详情同宽，避免两侧大空白 */
    max-width: 1440px;
}

.encyclopedia-detail-container.process-detail-page .encyclopedia-detail-content {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 24px;
    margin: 0;
    line-height: 1.6;
    color: var(--pd-ink);
    /* 正文基准：百科默认 16px，工艺块里勿再用 .8x rem 压到 13px */
    font-size: 16px;
}

.encyclopedia-detail-container.process-detail-page .encyclopedia-detail-content h2 {
    margin: 0 0 8px;
    color: var(--pd-accent);
    font-size: 1.22rem;
    font-weight: 700;
}

.encyclopedia-detail-container.process-detail-page .encyclopedia-detail-content h3 {
    margin: 0 0 6px;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.encyclopedia-detail-container.process-detail-page .encyclopedia-detail-footer {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    margin: 18px 0 0;
    padding: 20px 8px;
    border-top: 1px solid var(--pd-line);
}

/* ---------- Hero（对齐 preview .hero） ---------- */
.encyclopedia-detail-header.process-hero {
    position: relative;
    min-height: 400px;
    background: linear-gradient(135deg, var(--pd-dark) 0%, var(--pd-accent) 100%);
    color: #fff;
    display: flex;
    align-items: flex-end;
    padding: 40px 32px 44px;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

/* 轻纹理，不用死黑遮罩（对齐 samples preview.html） */
.encyclopedia-detail-header.process-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 70% at 12% 8%, rgba(255,255,255,.12), transparent 55%),
        repeating-linear-gradient(90deg, transparent, transparent 36px,
            rgba(255,255,255,.04) 36px, rgba(255,255,255,.04) 37px);
    pointer-events: none;
}

/* 有背景图时才略压暗以保证标题可读；无图时几乎透明，露出主题色 */
.encyclopedia-detail-header.process-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(15,23,42,.35) 0%, rgba(15,23,42,.12) 55%, transparent 100%);
    opacity: 0;
    pointer-events: none;
}

.encyclopedia-detail-header.process-hero.has-hero-img::after {
    opacity: 1;
}

.pd-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.pd-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .45;
}

.pd-hero-bg.no-cover {
    background: transparent;
}

.pd-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 860px;
}

.pd-kicker {
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--pd-tint);
    margin-bottom: 10px;
}

.encyclopedia-detail-header.process-hero .encyclopedia-detail-title {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: clamp(1.65rem, 3.3vw, 2.05rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 12px;
}

.encyclopedia-detail-header.process-hero .encyclopedia-detail-summary {
    color: #fff;
    opacity: .92;
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0 0 18px;
    background: transparent;
    border-radius: 0;
    padding: 0;
}

.process-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.process-hero-tag {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.25);
    color: #e2e8f0;
}

.encyclopedia-detail-header.process-hero .encyclopedia-detail-info,
.encyclopedia-detail-header.process-hero .encyclopedia-detail-meta {
    display: none;
}

/* ---------- Section 卡（对齐 preview .section，仅此一层） ---------- */
.pd-section {
    background: var(--pd-card);
    margin: 18px 0 0;
    border-radius: 14px;
    border: 1px solid #cfd6df;
    padding: 26px 28px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.pd-section h2 {
    font-size: 1.22rem;
    color: var(--pd-accent);
    margin: 0 0 8px;
    font-weight: 700;
}

.pd-section .pd-lead {
    font-size: 1rem;
    color: var(--pd-muted);
    margin: 0 0 18px;
    max-width: 760px;
    line-height: 1.65;
}

/* rich lead：并入首块，不再单独成卡 */
.process-rich-lead {
    display: none;
}

/* ---------- Insight tri ---------- */
.pd-tri {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 800px) {
    .pd-tri { grid-template-columns: 1fr; }
}

.pd-insight {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #c5cdd8;
    background: #f8fafc;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}

.pd-insight-vis {
    min-height: 148px;
    background: linear-gradient(155deg, var(--pd-dark) 0%, var(--pd-accent) 100%);
    color: var(--pd-tint);
    display: flex;
    align-items: stretch;
    justify-content: center;
    text-align: center;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.pd-insight-vis.has-media {
    min-height: 168px;
}

.pd-insight-vis.has-media > .pd-art-fallback {
    display: none;
}

.pd-insight-vis > img {
    width: 100%;
    height: 100%;
    min-height: 168px;
    object-fit: cover;
    display: block;
}

.pd-art-fallback {
    position: relative;
    width: 100%;
    min-height: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px 18px 32px;
    background:
        radial-gradient(ellipse 90% 70% at 18% 12%, rgba(255, 255, 255, .14), transparent 55%),
        radial-gradient(ellipse 80% 55% at 88% 88%, rgba(255, 255, 255, .08), transparent 50%),
        linear-gradient(155deg, var(--pd-dark) 0%, var(--pd-accent) 100%);
    overflow: hidden;
}

.pd-art-fallback::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            -18deg,
            transparent,
            transparent 14px,
            rgba(255, 255, 255, .03) 14px,
            rgba(255, 255, 255, .03) 15px
        );
    pointer-events: none;
}

.pd-art-kicker {
    position: relative;
    z-index: 1;
    font-size: 11px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--pd-tint);
    opacity: .9;
    font-weight: 600;
}

.pd-art-title {
    position: relative;
    z-index: 1;
    font-size: clamp(1.75rem, 3.2vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.12;
    color: #f8fafc;
    text-transform: none;
    max-width: 92%;
    word-break: break-word;
}

.pd-art-mark {
    position: absolute;
    right: 10px;
    bottom: -6px;
    z-index: 0;
    font-size: clamp(3.5rem, 8vw, 5.5rem);
    font-weight: 800;
    line-height: 1;
    color: #fff;
    opacity: .1;
    letter-spacing: -0.04em;
    pointer-events: none;
    user-select: none;
}

.pd-insight-body {
    padding: 16px 16px 18px;
}

.pd-insight-body h3 {
    font-size: 1.05rem;
    margin: 0 0 8px;
    color: var(--pd-ink);
}

.pd-insight-body p {
    font-size: 15px;
    color: #3d4a5c;
    margin: 0;
    line-height: 1.6;
}

/* ---------- Specs ---------- */
.pd-facts {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    margin: 8px 0 4px;
}

.pd-facts th,
.pd-facts td {
    border: 1px solid var(--pd-line);
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    line-height: 1.55;
}

.pd-facts th {
    background: #f8fafc;
    width: 28%;
    color: var(--pd-accent);
    font-weight: 600;
}

/* ---------- Steps ---------- */
.pd-steps {
    display: grid;
    gap: 14px;
}

.pd-step {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    border: 1px solid #c5cdd8;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

@media (max-width: 720px) {
    .pd-step { grid-template-columns: 1fr; }
}

.pd-step-visual {
    min-height: 220px;
    background: linear-gradient(155deg, var(--pd-dark) 0%, var(--pd-accent) 100%);
    color: var(--pd-tint);
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    padding: 0;
    overflow: hidden;
}

.pd-step-visual.has-media {
    min-height: 240px;
}

.pd-step-visual.has-media > .pd-art-fallback {
    display: none;
}

.pd-step-visual > img {
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
    display: block;
}

.pd-step-visual .pd-art-fallback {
    min-height: 220px;
}

.pd-step-visual .pd-art-title {
    font-size: clamp(1.55rem, 2.6vw, 2.1rem);
}

/* 无图占位时用大号底纹序号即可，不再叠圆形 badge */
.pd-step-visual:not(.has-media) .pd-step-badge {
    display: none;
}

.pd-step-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    background: var(--pd-accent);
    color: #fff;
    z-index: 1;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}

.pd-step-body {
    padding: 18px 20px;
}

.pd-step-body h3 {
    font-size: 1.12rem;
    margin: 0 0 8px;
    color: var(--pd-ink);
}

.pd-step-body p {
    font-size: 15px;
    color: #3d4a5c;
    margin: 0;
    line-height: 1.6;
}

/* ---------- Note cards / split ---------- */
.pd-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 720px) {
    .pd-split { grid-template-columns: 1fr; }
}

.pd-note-card {
    border: 1px solid #c5cdd8;
    border-radius: 12px;
    padding: 16px 18px;
    background: #f8fafc;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.pd-note-card h3 {
    font-size: 1rem;
    margin: 0 0 6px;
    color: var(--pd-accent);
}

.pd-note-card p {
    font-size: 15px;
    color: #3d4a5c;
    margin: 0;
    line-height: 1.6;
}

/* ---------- Spec board ---------- */
.pd-board {
    border: 1px dashed #94a3b8;
    border-radius: 12px;
    padding: 20px 24px;
    background: #f8fafc;
    text-align: center;
    color: var(--pd-muted);
    font-size: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.pd-board strong {
    display: block;
    color: var(--pd-ink);
    margin-bottom: 8px;
    font-size: 15px;
}

/* ---------- Gallery ---------- */
.pd-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 720px) {
    .pd-gallery { grid-template-columns: 1fr 1fr; }
}

.pd-gallery-item {
    aspect-ratio: 4/3;
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #c5cdd8;
    background: #e2e8f0;
    position: relative;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.pd-gallery-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Checklist / fail ---------- */
.pd-fail {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 800px) {
    .pd-fail { grid-template-columns: 1fr; }
}

.pd-fail-card {
    border-radius: 12px;
    border: 1px solid #c5cdd8;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}

.pd-fail-vis {
    height: 110px;
    background: linear-gradient(135deg, var(--pd-accent), var(--pd-dark));
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    padding: 12px;
}

.pd-fail-txt {
    padding: 12px 14px 14px;
}

.pd-fail-txt h3 {
    font-size: 1rem;
    margin: 0 0 6px;
    color: var(--pd-ink);
}

.pd-fail-txt p {
    font-size: 14px;
    color: #3d4a5c;
    margin: 0;
    line-height: 1.55;
}

/* ---------- FAQ（preview 无此块，轻量保留） ---------- */
.pd-faq details {
    border: 1px solid var(--pd-line);
    border-radius: 10px;
    margin: 10px 0 0;
    padding: 0 16px;
    background: #f8fafc;
}

.pd-faq summary {
    cursor: pointer;
    padding: 14px 0;
    font-weight: 600;
    color: var(--pd-ink);
    list-style: none;
}

.pd-faq summary::-webkit-details-marker { display: none; }

.pd-faq summary::after {
    content: "+";
    float: right;
    font-size: 18px;
    color: var(--pd-muted);
}

.pd-faq details[open] summary::after { content: "−"; }

.pd-faq .pd-faq-answer {
    padding: 0 0 14px;
    color: #3d4a5c;
    font-size: 15px;
    line-height: 1.65;
}

/* ---------- Related ---------- */
.pd-related {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pd-related a {
    text-decoration: none;
    color: var(--pd-accent);
    font-size: 14px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 8px;
}

.pd-related a:hover {
    background: #eef2ff;
}

/* ---------- CTA ---------- */
.encyclopedia-detail-container.process-detail-page a.pd-cta-btn,
.pd-cta-btn {
    display: inline-block;
    margin-top: 6px;
    background: var(--pd-accent);
    color: #fff !important;
    text-decoration: none !important;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: .95rem;
    border: none;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
    transition: background .2s ease, transform .15s ease;
}

.encyclopedia-detail-container.process-detail-page a.pd-cta-btn:hover,
.encyclopedia-detail-container.process-detail-page a.pd-cta-btn:visited,
.encyclopedia-detail-container.process-detail-page a.pd-cta-btn:active,
.pd-cta-btn:hover,
.pd-cta-btn:visited,
.pd-cta-btn:active {
    background: var(--pd-dark);
    color: #fff !important;
    text-decoration: none !important;
}

@media (max-width: 768px) {
    .encyclopedia-detail-header.process-hero {
        min-height: 320px;
        padding: 28px 20px;
    }

    .pd-section {
        margin: 14px 0 0;
        padding: 20px;
    }

    .pd-facts th,
    .pd-facts td {
        display: block;
        width: auto;
    }

    .pd-facts th {
        border-bottom: none;
        padding-bottom: 4px;
    }

    .pd-facts td {
        padding-top: 4px;
    }
}
