/* Lawyer profile: editorial identity, real portrait and readable professional record.
   Scoped to this page so the shared navigation and team directory keep their layout. */
html body.lawyer-detail-page {
    isolation: isolate;
    background: #ffffff !important;
}

/* 彻底移除大面积暗沉山景雾化背景，保持全站通透纯白高奢杂志视觉 */
html body.lawyer-detail-page::before {
    display: none !important;
}

html body.lawyer-detail-page main#main-content {
    padding-top: 68px;
    background: #ffffff;
    color: #25282d;
    font-size: 16px;
    line-height: 1.8;
}

#lawyer-profile {
    --zeheng-type-display: 32px;
    --zeheng-type-module-title: 20px;
    --lp-ink: #1e2227;
    --lp-muted: #64748b;
    --lp-red: #79171c;
    --lp-line: rgba(15, 23, 42, 0.08);
    --lp-ease: cubic-bezier(.22, .61, .36, 1);
    width: 100%;
}

#lawyer-profile [hidden] { display: none !important; }

#lawyer-profile .lp-container {
    width: min(1200px, calc(100% - 96px));
    margin-inline: auto;
}

#lawyer-profile .lp-hero {
    background: transparent;
    padding-bottom: 56px;
}

/* 面包屑导航：紧凑、优雅、克制 */
#lawyer-profile .lp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding-top: 12px;
    margin-bottom: 20px;
    color: #64748b;
    font-size: 13px;
    letter-spacing: .02em;
}

#lawyer-profile .lp-breadcrumb a {
    display: inline-flex;
    align-items: center;
    color: #64748b;
    text-decoration: none;
    transition: color 200ms ease;
}

#lawyer-profile .lp-breadcrumb a:hover { color: var(--lp-red); }
#lawyer-profile .lp-breadcrumb [aria-current] { color: var(--lp-ink); font-weight: 500; }

/* 核心网格布局：
   左栏固定 260px（避免原 336px 肖像过大造成的严重视觉压迫），
   右栏为主阅读区，形成典雅画册双栏比例 */
#lawyer-profile .lp-hero-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: clamp(36px, 4.5vw, 64px);
    align-items: start;
}

#lawyer-profile .lp-main {
    min-width: 0;
}

/* 关键修复：消除内层 .lp-details.lp-container 导致的 56px 错位和锯齿，保证版心垂直对齐 */
#lawyer-profile .lp-main > .lp-details,
#lawyer-profile .lp-main > .lp-details.lp-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
}

#lawyer-profile .lp-sidebar {
    display: grid;
    align-content: start;
    gap: 24px;
    min-width: 0;
}

/* 肖像外框：标准 4:5 肖像比例，260px 宽度下高度约 325px，克制而尊贵 */
#lawyer-profile .lp-portrait {
    width: 100%;
    margin: 0;
    align-self: start;
    animation: lp-enter 700ms 50ms var(--lp-ease) both;
}

#lawyer-profile [data-lawyer-photo-frame] {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#lawyer-profile [data-lawyer-photo-frame] img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: var(--lawyer-photo-position, top center) !important;
    border-radius: 0 !important;
    mix-blend-mode: normal;
    filter: none !important;
    transform: none !important;
}

/* 剪影抠图兼容保持 */
html body.lawyer-detail-page #lawyer-profile [data-lawyer-photo-frame].lp-cutout-ready {
    background: transparent !important;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, rgba(0, 0, 0, .95) 82%, rgba(0, 0, 0, .36) 94%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 70%, rgba(0, 0, 0, .95) 82%, rgba(0, 0, 0, .36) 94%, transparent 100%);
}

html body.lawyer-detail-page #lawyer-profile [data-lawyer-photo-frame].lp-cutout-ready img {
    -webkit-mask-image: var(--lawyer-portrait-mask);
    mask-image: var(--lawyer-portrait-mask);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: cover;
    mask-size: cover;
    -webkit-mask-position: var(--lawyer-photo-position, top center);
    mask-position: var(--lawyer-photo-position, top center);
}

#lawyer-profile [data-lawyer-photo-frame].lp-portrait-pending { opacity: 0; }

/* 左侧名片与身份区块：无任何割裂细线，抠图人物自然平滑融入 */
#lawyer-profile .lp-sidebar-identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 12px;
    border-top: none !important;
    animation: lp-enter 650ms 80ms var(--lp-ease) both;
}

#lawyer-profile .lp-sidebar-identity h1 {
    margin: 0;
    color: var(--lp-ink);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

html body.lawyer-detail-page main#main-content #lawyer-profile .lp-sidebar-identity .lp-role {
    display: block;
    margin: 6px 0 0;
    color: var(--lp-red) !important;
    font-size: 14.5px !important;
    letter-spacing: .02em;
    font-weight: 500;
}

/* 个人直连联系方式：典雅无边框纯文字排布 */
#lawyer-profile .lp-identity-contacts {
    margin-top: 14px;
    display: grid;
    gap: 8px;
    width: 100%;
}
#lawyer-profile .lp-identity-contacts[hidden] {
    display: none !important;
}
#lawyer-profile .lp-identity-contacts .lp-direct-contacts {
    display: grid;
    gap: 8px;
    width: 100%;
}
#lawyer-profile .lp-identity-contacts .lp-contact-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    align-items: baseline;
    gap: 10px;
    min-height: 28px;
    padding: 2px 0;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--lp-ink);
    text-decoration: none;
    font-size: 13.5px;
    line-height: 1.5;
    transition: color 180ms ease;
}
#lawyer-profile .lp-identity-contacts .lp-contact-label {
    color: var(--lp-muted);
    font-size: 12px;
    letter-spacing: 0.04em;
}
#lawyer-profile .lp-identity-contacts .lp-contact-value {
    color: var(--lp-ink);
    font-size: 13.5px;
    font-weight: 500;
    font-feature-settings: "tnum";
    letter-spacing: 0.02em;
    word-break: break-all;
    overflow-wrap: anywhere;
    transition: color 180ms ease;
}
#lawyer-profile .lp-identity-contacts .lp-contact-item:hover .lp-contact-value {
    color: var(--lp-red);
    text-decoration: underline;
    text-underline-offset: 3px;
}
#lawyer-profile .lp-identity-contacts .lp-contact-item:focus-visible {
    outline: 2px solid var(--lp-red);
    outline-offset: 2px;
}

/* 右侧主阅读栏：执业概述 (BIOGRAPHY) */
#lawyer-profile .lp-bio {
    max-width: 100%;
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--lp-line);
    color: #334155;
    font-size: 16px;
    line-height: 2.0;
    white-space: pre-line;
    overflow-wrap: anywhere;
    animation: lp-enter 650ms 100ms var(--lp-ease) both;
}

/* 执业概述顶部高奢英文眉标，建立自然阅读动线 */
#lawyer-profile .lp-bio::before {
    content: "BIOGRAPHY · 执业概述";
    display: block;
    margin-bottom: 12px;
    color: var(--lp-red);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 详情模块网格 */
#lawyer-profile .lp-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 36px;
    width: 100%;
    padding-block: 0 28px;
}

#lawyer-profile .lp-section-heading {
    margin-bottom: 16px;
}

#lawyer-profile .lp-section-en {
    display: block;
    margin-bottom: 6px;
    color: var(--lp-red);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    line-height: 1.4;
}

main#main-content #lawyer-profile h2 {
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--lp-ink);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
}

/* 业务领域：极简纯粹文字流（完全无胶囊药丸边框与背景，保持典雅纯白报刊感） */
#lawyer-profile .lp-practice-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

#lawyer-profile .lp-practice-list li {
    position: relative;
    padding: 4px 0 4px 14px;
    font-size: 15px;
    color: #2b3037;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    letter-spacing: .02em;
    line-height: 1.6;
    transition: color 180ms ease;
}

#lawyer-profile .lp-practice-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: var(--lp-red);
    display: block !important;
}

#lawyer-profile .lp-practice-list li:hover {
    color: var(--lp-red);
    background: transparent !important;
}

/* 执业经历与代表工作列表 */
#lawyer-profile .lp-experience-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--lp-line);
}

#lawyer-profile .lp-experience-list li {
    position: relative;
    padding: 16px 0 16px 20px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    color: #374151;
    font-size: 15px;
    line-height: 1.85;
    overflow-wrap: anywhere;
    transition: background-color 150ms ease;
}

#lawyer-profile .lp-experience-list li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 25px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--lp-red);
    opacity: 0.8;
}

#lawyer-profile .lp-full-profile {
    color: #374151;
    font-size: 15.5px;
    line-height: 1.95;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

#lawyer-profile .lp-introduction + .lp-experience:not([hidden]) {
    margin-top: 36px;
}

#lawyer-profile .lp-honors {
    margin-top: 36px;
}

/* 《执业者说》访谈模块（严格保持无边框页内播放） */
#lawyer-videos-title { scroll-margin-top: 112px; }
#lawyer-profile .lp-interviews {
    width: 100%;
}
#lawyer-profile .lp-interview-card {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--lp-ink);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
#lawyer-profile .lp-interview-card + .lp-interview-card { margin-top: 16px; }
#lawyer-profile .lp-video-thumbnail {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0 !important;
    background: #dde1e2;
}
#lawyer-profile .lp-video-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#lawyer-profile .lp-video-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, .14);
    transition: background-color 180ms ease;
}
#lawyer-profile .lp-interview-card:hover .lp-video-play {
    background: rgba(121, 23, 28, 0.3);
}
#lawyer-profile .lp-video-play::after {
    content: "";
    width: 0;
    height: 0;
    border-block: 6px solid transparent;
    border-left: 10px solid #fff;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}
#lawyer-profile .lp-video-copy { display: grid; gap: 4px; min-width: 0; padding: 0; }
#lawyer-profile .lp-video-kicker { color: var(--lp-red); font-size: 11px; font-weight: 500; line-height: 1.4; }
#lawyer-profile .lp-video-title {
    color: var(--lp-ink);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
#lawyer-profile .lp-video-action { color: var(--lp-red); font-size: 11px; line-height: 1.4; font-weight: 500; }
#lawyer-profile .lp-interview-card:hover .lp-video-action { text-decoration: underline; text-underline-offset: 3px; }
#lawyer-profile .lp-interview-card:focus-visible { outline: 2px solid var(--lp-red); outline-offset: 3px; }

/* 页内播放状态：完全无边框、无内边距，原生纯粹嵌入 */
#lawyer-profile .lp-inline-interview {
    display: grid;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
#lawyer-profile .lp-inline-interview + .lp-inline-interview { margin-top: 24px; }
#lawyer-profile .lp-inline-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 0 !important;
    overflow: hidden;
    background: #12171b;
    border: none !important;
}
#lawyer-profile .lp-inline-player {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
}
#lawyer-profile .lp-preview-start {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}
#lawyer-profile .lp-preview-start:focus-visible { outline: 2px solid var(--lp-red); outline-offset: 2px; }
#lawyer-profile .lp-inline-error { margin: 0; font-size: 12px; line-height: 1.6; color: var(--lp-muted); }
#lawyer-profile .lp-inline-interview .lp-video-source {
    display: inline-flex;
    align-items: center;
    color: var(--lp-red);
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
}
#lawyer-profile .lp-inline-interview .lp-video-source:hover { text-decoration: underline; }

/* 侧栏相关文章动态 */
#lawyer-profile .lp-sidebar .lp-related-section {
    padding-top: 18px;
    border-top: 1px solid var(--lp-line);
}
#lawyer-profile .lp-related-list { display: grid; gap: 16px; }
#lawyer-profile .lp-related-row { display: grid; gap: 4px; min-width: 0; }
#lawyer-profile .lp-related-row h3 {
    margin: 0;
    color: var(--lp-ink);
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
#lawyer-profile .lp-related-row a { color: inherit; text-decoration: none; }
#lawyer-profile .lp-related-row a:hover { color: var(--lp-red); text-decoration: underline; text-underline-offset: 3px; }
#lawyer-profile .lp-related-row a:focus-visible { outline: 2px solid var(--lp-red); outline-offset: 2px; }
#lawyer-profile .lp-related-meta { color: var(--lp-muted); font-size: 12px; }
#lawyer-profile .lp-related-row .lp-related-description {
    margin: 0;
    color: #4b5563;
    font-size: 13.5px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

/* 动效 */
@keyframes lp-enter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}


/* 响应式断点：平板 (<= 1024px) */
@media (max-width: 1024px) {
    #lawyer-profile .lp-container { width: calc(100% - 64px); }
    #lawyer-profile .lp-hero-grid { grid-template-columns: 240px minmax(0, 1fr); gap: 36px; }
    #lawyer-profile .lp-bio { font-size: 15.5px; }
}

/* 响应式断点：移动端 (<= 768px) */
@media (max-width: 768px) {
    #lawyer-profile .lp-container { width: calc(100% - 32px); }
    #lawyer-profile .lp-hero { padding-bottom: 32px; }
    #lawyer-profile .lp-breadcrumb { min-height: 40px; font-size: 12px; margin-bottom: 12px; }
    
    /* 移动端顶部名片卡紧凑双列排列 */
    #lawyer-profile .lp-hero-grid {
        grid-template-columns: minmax(0, 1fr) 120px;
        grid-template-areas: "identity portrait" "bio bio";
        gap: 20px 16px;
        align-items: center;
    }
    #lawyer-profile .lp-main, #lawyer-profile .lp-sidebar { display: contents; }
    #lawyer-profile .lp-sidebar-identity {
        grid-area: identity;
        border-top: none;
        padding-top: 0;
    }
    #lawyer-profile .lp-sidebar-identity h1 { font-size: 24px; }
    html body.lawyer-detail-page main#main-content #lawyer-profile .lp-role { font-size: 13px !important; margin-top: 4px; }
    #lawyer-profile .lp-portrait {
        grid-area: portrait;
        width: 120px;
        justify-self: end;
    }
    #lawyer-profile .lp-bio {
        grid-area: bio;
        max-width: none;
        padding-top: 18px;
        font-size: 15px;
        line-height: 1.85;
        margin-bottom: 24px;
    }
    #lawyer-profile .lp-identity-contacts {
        margin-top: 10px;
        gap: 6px;
    }
    #lawyer-profile .lp-identity-contacts .lp-contact-item {
        padding: 5px 8px;
        font-size: 12px;
    }
    #lawyer-profile .lp-identity-contacts .lp-contact-label { font-size: 11px; }
    #lawyer-profile .lp-identity-contacts .lp-contact-value { font-size: 12px; }
    
    #lawyer-profile .lp-interviews,
    #lawyer-profile .lp-sidebar > .lp-related-section {
        grid-area: auto;
        grid-column: 1 / -1;
    }
    #lawyer-profile .lp-details {
        grid-area: auto;
        grid-column: 1 / -1;
        gap: 28px;
    }
    main#main-content #lawyer-profile h2 { font-size: 18px; }
    #lawyer-profile .lp-practice-list { gap: 6px 20px; }
    #lawyer-profile .lp-practice-list li { font-size: 13.5px; padding: 3px 0 3px 12px; }
    #lawyer-profile .lp-experience-list li { font-size: 14px; padding-block: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    #lawyer-profile *, #lawyer-profile *::before { animation: none !important; transition: none !important; }
}
