/* 
 * Deep Review specific styles 
 * Extracted from AIx styles.css
 */
:root {
    --border-glass: rgba(255,255,255,0.05);
    --accent-yellow: #eab308;
    --bg-red-dark: #1f0505;
}

.mt-20 { margin-top: 20px; }

.mt-30 { margin-top: 30px; }

.mt-40 { margin-top: 40px; }

.mb-20 { margin-bottom: 20px; }

.mb-30 { margin-bottom: 30px; }

.mb-40 { margin-bottom: 40px; }

.mb-50 { margin-bottom: 50px; }

.mb-60 { margin-bottom: 60px; }

.m-0 { margin: 0 !important; }

.mt-2 { margin-top: 0.5rem; }

.mt-4 { margin-top: 1rem; }

.mt-6 { margin-top: 1.5rem; }

.mt-8 { margin-top: 2rem; }

.mb-2 { margin-bottom: 0.5rem; }

.mb-3 { margin-bottom: 0.75rem; }

.mb-4 { margin-bottom: 1rem; }

.mb-6 { margin-bottom: 1.5rem; }

.mb-8 { margin-bottom: 2rem; }

.p-4 { padding: 1rem; }

.pb-3 { padding-bottom: 0.75rem; }

.text-center { text-align: center; }

.text-white { color: #fff; }

.gold-text { color: var(--accent-gold); }

.highlight-text { color: var(--accent-red); font-weight: bold; }

.mt-20 { margin-top: 20px; }

.mb-60 { margin-bottom: 60px; }

section {
    padding: 100px 0;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 50px;
    letter-spacing: -1px;
}

.lead {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.bg-dark-red { background-color: var(--bg-red-dark); border-bottom: 1px solid #3f0f0f; }

.bg-black-gold { background-color: var(--bg-darker); border-bottom: 1px solid #423000; }

.bg-dark { background-color: var(--bg-darker); }

.bg-red-black { background: linear-gradient(180deg, var(--bg-dark) 0%, #1a0505 100%); }

.hero {
    padding: 150px 0 100px;
    background: radial-gradient(circle at center, #1a1a1a 0%, var(--bg-dark) 100%);
    border-bottom: 1px solid var(--border-color);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,100,100,0.3);
    box-shadow: 0 8px 20px rgba(185, 28, 28, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(185, 28, 28, 0.5);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn-primary.large {
    padding: 20px 40px;
    font-size: 1.2rem;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-3px);
}

.btn-outline.large {
    padding: 20px 40px;
    font-size: 1.2rem;
}

.grid-3 {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: stretch;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-header {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.toc-case-card {
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 30px;
    margin-top: 25px;
    text-align: left;
}

.toc-header {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #444;
}

.toc-header .tag {
    background: var(--accent-red);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 10px;
}

.toc-step {
    margin-bottom: 35px;
}

.toc-step:last-child {
    margin-bottom: 0;
}

.toc-step h4 {
    color: var(--text-main);
    font-size: 1.15rem;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-red);
    padding-left: 12px;
}

.toc-cloud-diagram {
    background: #000;
    padding: 25px 25px 20px 25px;
    border-radius: 6px;
    margin-bottom: 30px;
    overflow-x: auto;
    border: 1px solid #222;
}

.cloud-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 10px 0;
}

.cloud-node {
    background: #1a1a1a;
    border: 1px solid #444;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #ccc;
    position: relative;
    width: 150px;
}

.cloud-node.goal { border-color: var(--accent-gold); color: var(--accent-gold); width: 120px; }

.cloud-node.goal strong { display: block; margin-bottom: 5px; color: #fff; }

.cloud-node.bad { border-color: #ef4444; }

.col-goal {
    display: flex;
    align-items: center;
}

.col-req {
    display: flex;
    flex-direction: column;
    gap: 90px;
    position: relative;
}

.col-action {
    display: flex;
    flex-direction: column;
    position: relative;
}

.col-arrows-1, .col-arrows-2 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 155px;
    align-items: center;
}

.diag-arrow {
    font-size: 2rem;
    color: #666;
    font-weight: bold;
    line-height: 0;
}

.horiz-arrow {
    font-size: 1.5rem;
    color: #666;
    font-weight: bold;
    line-height: 0;
}

.conflict-marker {
    display: flex;
    flex-direction: row;
    align-items: center;
    color: var(--accent-red);
}

.conflict-marker .arrow {
    font-size: 1.6rem;
    line-height: 1;
}

.conflict-marker .text {
    font-size: 0.9rem;
    font-weight: 800;
    background: #000;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--accent-red);
    margin-left: 8px;
}

.redline-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.redline-table th, .redline-table td {
    padding: 15px 20px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.redline-table th { background: #111; color: var(--accent-red); font-weight: 700; }

.redline-table td:first-child { color: var(--text-muted); }

.redline-table td:last-child { font-weight: 600; }

@media (max-width: 768px) {
.grid-3 { flex-direction: column; }
.toc-cloud-diagram { padding: 15px 5px; }
.cloud-grid { gap: 6px; padding: 5px 0; }
.cloud-node { width: 95px; padding: 10px 5px; font-size: 0.75rem; }
.cloud-node.goal { width: 85px; }
.col-req { gap: 40px; }
.col-arrows-1, .col-arrows-2 { height: 110px; }
.diag-arrow { font-size: 1.2rem; }
.horiz-arrow { font-size: 1.2rem; }
.conflict-marker .arrow { font-size: 1rem; }
.conflict-marker .text { font-size: 0.7rem; padding: 2px 4px; margin-left: 4px; letter-spacing: -0.5px; }
}

.sticky-toc {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    left: 40px;
    z-index: 1000;
    width: 200px;
}

.sticky-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.sticky-toc li {
    margin-bottom: 25px;
}

.toc-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-left: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.toc-link span {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.75rem;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.3);
}

.toc-link::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    height: 100%;
    width: 2px;
    background-color: transparent;
    transition: all 0.3s ease;
}

.toc-link:hover {
    color: #fff;
}

.toc-link.active {
    color: var(--text-main);
    font-weight: 700;
}

.toc-link.active span {
    color: var(--accent-gold);
}

.toc-link.active::before {
    background-color: var(--accent-red);
}

@media (max-width: 1300px) {
.sticky-toc {
        display: none;
    }
}

.mt-10 { margin-top: 10px; }

.btn-primary.small {
    padding: 8px 16px;
    font-size: 0.95rem;
}

.mobile-bottom-toc {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999;
}

.toc-scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 12px 15px;
    gap: 10px;
    scrollbar-width: none;
}

.toc-scroll-container::-webkit-scrollbar {
    display: none;
}

.toc-scroll-container .toc-link {
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.toc-scroll-container .toc-link::before {
    display: none;
}

.toc-scroll-container .toc-link.active {
    color: #000;
    background: var(--accent-gold);
    font-weight: 700;
    border-color: var(--accent-gold);
}

@media (max-width: 768px) {
.mobile-bottom-toc {
        display: block;
    }
.btn-primary.small {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.sd-chart-container {
    position: relative;
    width: 100%;
    min-width: 800px;
    height: 700px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 30px 0;
    overflow: hidden;
}

.sd-title {
    position: absolute;
    top: 30px;
    left: 30px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-gold);
    z-index: 10;
}

.sd-dash-h {
    position: absolute;
    top: 45%;
    left: 20%;
    width: 30%;
    height: 1px;
    border-top: 2px dashed #63b3ed;
    z-index: 2;
}

.sd-dash-v {
    position: absolute;
    top: 45%;
    left: 50%;
    height: 25%;
    width: 1px;
    border-left: 2px dashed #63b3ed;
    z-index: 2;
}

.sd-node {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 3px solid;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.sd-text {
    position: absolute;
    font-size: 1rem;
    color: #fff;
    white-space: nowrap;
    z-index: 5;
}

.sd-curve-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.sd-annotation {
    position: absolute;
    padding: 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #cbd5e0;
    line-height: 1.6;
    z-index: 10;
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.sd-annotation h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sd-annotation p {
    margin: 0;
}

.formula-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    margin-top: 2rem;
}

.formula-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 20px;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    padding-bottom: 12px;
}

.formula-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.formula-term {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0,0,0,0.3);
    padding: 16px 24px;
    border-radius: 6px;
    border-top: 3px solid transparent;
    flex: 1;
    min-width: 120px;
}

.formula-term.blue { border-top-color: #3182ce; }

.formula-term.purple { border-top-color: #9f7aea; }

.formula-term.green { border-top-color: #48bb78; }

.formula-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(236, 201, 75, 0.1);
    padding: 16px 32px;
    border-radius: 6px;
    border: 1px solid #ecc94b;
    flex: 1;
    min-width: 120px;
}

.formula-term .keyword, .formula-result .keyword {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 6px;
    white-space: nowrap;
}

.formula-result .keyword {
    color: #ecc94b;
    font-size: 1.2rem;
}

.formula-term .desc {
    font-size: 0.85rem;
    color: #a0aec0;
    text-align: center;
}

.formula-operator {
    font-size: 2rem;
    color: #718096;
    font-weight: 300;
}

.tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.tab-item {
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #a0aec0;
    background: rgba(255,255,255,0.05);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.tab-item:hover {
    background: rgba(255,255,255,0.1);
    color: #e2e8f0;
}

.tab-item.active {
    background: rgba(49, 130, 206, 0.2);
    color: #63b3ed;
    border: 1px solid rgba(49, 130, 206, 0.4);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.stakeholder-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
}

.sh-table {
    width: 100%;
    border-collapse: collapse;
}

.sh-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #e2e8f0;
    font-size: 0.9rem;
    vertical-align: top;
}

.sh-table tr:last-child td {
    border-bottom: none;
}

.badge-l1, .badge-l2, .badge-l3 {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.badge-l1 { background: rgba(229, 62, 62, 0.2); color: #fc8181; border: 1px solid rgba(229, 62, 62, 0.4); }

.badge-l2 { background: rgba(221, 107, 32, 0.2); color: #f6ad55; border: 1px solid rgba(221, 107, 32, 0.4); }

.badge-l3 { background: rgba(56, 161, 105, 0.2); color: #68d391; border: 1px solid rgba(56, 161, 105, 0.4); }

.svg-icon {
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.2em;
    display: inline-block;
    flex-shrink: 0;
}



.mobile-bottom-toc {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999;
}

.toc-scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 12px 15px;
    gap: 10px;
    scrollbar-width: none;
}

.toc-scroll-container::-webkit-scrollbar {
    display: none;
}

.toc-scroll-container .toc-link {
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.toc-scroll-container .toc-link::before {
    display: none;
}

.toc-scroll-container .toc-link.active {
    color: #000;
    background: var(--accent-gold);
    font-weight: 700;
    border-color: var(--accent-gold);
}

@media (max-width: 1024px) {
.mobile-bottom-toc {
        display: block;
    }
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 25px;
    position: relative;
    
}

@media (max-width: 768px) {
    /* Responsive Redline Table - Convert to Cards */
    .redline-table:not(.matrix-table) {
        min-width: 0 !important;
        width: 100% !important;
    }
    
    .redline-table:not(.matrix-table), 
    .redline-table:not(.matrix-table) thead, 
    .redline-table:not(.matrix-table) tbody, 
    .redline-table:not(.matrix-table) th, 
    .redline-table:not(.matrix-table) td, 
    .redline-table:not(.matrix-table) tr {
        display: block;
    }
    
    .redline-table:not(.matrix-table) thead {
        display: none;
    }
    
    .redline-table:not(.matrix-table) tr {
        margin-bottom: 24px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 10px;
        background: rgba(20, 20, 20, 0.95);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        overflow: hidden;
    }
    
    .redline-table:not(.matrix-table) td {
        border: none !important;
        padding: 16px 20px !important;
        position: relative;
        width: 100% !important; /* Fix the 40% width bug */
        box-sizing: border-box;
    }
    
    /* First child acts as Card Header */
    .redline-table:not(.matrix-table) td:first-child {
        background: linear-gradient(90deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
        font-size: 1.2rem;
        color: #fff;
        position: static !important;
        border-right: none;
        padding: 16px 20px !important;
        display: flex;
        flex-direction: column;
    }
    
    .redline-table:not(.matrix-table) td:first-child::before {
        color: var(--accent-gold);
        font-size: 0.75rem;
        letter-spacing: 1px;
        margin-bottom: 6px;
    }
    
    /* Other cells act as list items */
    .redline-table:not(.matrix-table) td:not(:first-child) {
        border-bottom: 1px dashed rgba(255, 255, 255, 0.05) !important;
        font-size: 1.05rem;
    }
    .redline-table:not(.matrix-table) td:last-child {
        border-bottom: none !important;
    }
    
    .redline-table:not(.matrix-table) td:not(:first-child)::before {
        display: block;
        font-size: 0.8rem;
        color: #888;
        margin-bottom: 6px;
        text-transform: uppercase;
        font-weight: 500;
        letter-spacing: 0.5px;
    }
    
    /* Inject headers for Compare Table */
    .compare-table td:nth-child(1)::before { content: "维度"; }
    .compare-table td:nth-child(2)::before { content: "传统咨询/软件"; }
    .compare-table td:nth-child(3)::before { content: "AIPM 模式"; color: var(--accent-gold); }
    
    /* Inject headers for Industry Table */
    .industry-table td:nth-child(1)::before { content: "行业"; color: var(--text-muted); }
    .industry-table td:nth-child(2)::before { content: "冲突的两端"; }
    .industry-table td:nth-child(3)::before { content: "被锁死的假设"; }
}

.step-divider {
    text-align: center;
    padding: 24px 16px;
    border: 1px dashed rgba(251, 191, 36, 0.3);
    border-left: none;
    border-right: none;
    margin: 30px 0;
}

.step-hook {
    color: #e2e8f0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 8px;
}

.step-method {
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.85;
}

@media (max-width: 768px) {
.step-hook {
        font-size: 1.05rem;
    }
.step-method {
        font-size: 0.8rem;
    }
}

.bg-dark-red { background-color: var(--bg-red-dark); border-bottom: 1px solid #3f0f0f; }

.bg-dark { background-color: var(--bg-darker); }

.bg-dark-red { background-color: var(--bg-red-dark); border-bottom: 1px solid #3f0f0f; }

.bg-black-gold { background-color: var(--bg-darker); border-bottom: 1px solid #423000; }

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.glitch-text {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.glitch-text { font-size: 2.5rem; }

.glitch-text { font-size: 2.5rem !important; }

@media (max-width: 768px) {
    .grid-3 { flex-direction: column; }
    .roles-target { flex-direction: column; }
    .role-item { width: 100%; }
    .rules-grid { flex-direction: column; }
    .rule { width: 100%; }
    .cta-criteria { flex-direction: column; }
    .outputs-list { flex-direction: column; }
    .output-item { width: 100%; }
    .contract-paper { padding: 30px 20px; }
    .contract-footer { flex-direction: column; }
    .sign-block { width: 100%; margin-bottom: 20px; }
    .glitch-text { font-size: 2.5rem; }
    .conviction-block { flex-direction: column; }
    .timeline-compare { flex-direction: column; align-items: flex-start; gap: 10px; }
    .tc-arrow { transform: rotate(90deg); }
    .hide-on-mobile { display: none; }
    
    
    .mega-warning { font-size: 1.8rem !important; }
    .error-red { font-size: 2.5rem !important; }
    .glitch-text { font-size: 2.5rem !important; }

    
    table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
    .diff-table th, .diff-table td { padding: 10px; width: auto; font-size: 0.85rem; }

    
    .toc-cloud-diagram { padding: 15px 5px; }
    .cloud-grid { gap: 6px; padding: 5px 0; }
    .cloud-node { width: 95px; padding: 10px 5px; font-size: 0.75rem; }
    .cloud-node.goal { width: 85px; }
    .col-req { gap: 40px; }
    .col-arrows-1, .col-arrows-2 { height: 110px; }
    .diag-arrow { font-size: 1.2rem; }
    .horiz-arrow { font-size: 1.2rem; }
    .conflict-marker-wrapper { height: 40px; }
    .conflict-marker .arrow { font-size: 1rem; }
    .conflict-marker .text { font-size: 0.7rem; padding: 2px 4px; margin-left: 4px; letter-spacing: -0.5px; }
}


.sticky-toc {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    left: 40px;
    z-index: 1000;
    width: 200px;
}
.icon svg {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.125em;
    stroke: currentColor;
}
.sticky-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}
.sticky-toc li {
    margin-bottom: 25px;
}
.toc-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-left: 20px;
    position: relative;
    transition: all 0.3s ease;
}
.toc-link span {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.75rem;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.3);
}
.toc-link::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    height: 100%;
    width: 2px;
    background-color: transparent;
    transition: all 0.3s ease;
}
.toc-link:hover {
    color: #fff;
}
.toc-link.active {
    color: var(--text-main);
    font-weight: 700;
}
.toc-link.active span {
    color: var(--accent-gold);
}
.toc-link.active::before {
    background-color: var(--accent-red);
}

@media (max-width: 1300px) {
    .sticky-toc {
        display: none;
    }
}


.history-intro {
    padding: 40px 0 20px;
}
.era-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.red-text { color: var(--accent-red) !important; letter-spacing: 2px; }
.era-body {
    font-size: 1.3rem;
    line-height: 2;
    margin-bottom: 20px;
    color: var(--text-main);
}
.era-body.muted { color: var(--text-muted); font-size: 1.1rem; }
.era-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 30px 0;
    letter-spacing: -1px;
}
.era-divider {
    margin: 40px auto;
    max-width: 400px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    color: var(--text-muted);
    font-size: 1rem;
    letter-spacing: 2px;
}
.era-now {
    padding: 60px 0 40px;
}
.accent-em {
    font-style: normal;
    color: var(--accent-red);
    font-size: 1.1em;
}
.gold-heavy {
    color: var(--accent-gold) !important;
    font-weight: 700;
}


.conviction-block {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    padding: 50px 0;
    border-bottom: 1px solid #3a1010;
}
.conviction-block:last-child { border-bottom: none; }
.conviction-number {
    font-size: 5rem;
    font-weight: 900;
    color: #3a1010;
    line-height: 1;
    min-width: 100px;
    text-align: right;
    padding-top: 5px;
    letter-spacing: -4px;
}
.conviction-content { flex: 1; }
.conviction-content h3 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.3;
}
.conviction-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 15px;
}
.conviction-content p strong { color: var(--text-main); }

.conviction-compare {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}
.compare-bad, .compare-good {
    padding: 15px 20px;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.6;
}
.compare-bad { background: rgba(239,68,68,0.08); border-left: 3px solid #7f1d1d; color: #fca5a5; }
.compare-good { background: rgba(16,185,129,0.08); border-left: 3px solid #065f46; color: #6ee7b7; }


.timeline-compare {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}
.tc-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    min-width: 130px;
}
.tc-now { border-color: var(--accent-gold); background: rgba(251,191,36,0.08); }
.tc-later { border-color: var(--border-color); }
.tc-too-late { border-color: #7f1d1d; background: rgba(239,68,68,0.06); }
.tc-year { font-weight: 800; font-size: 1.1rem; margin-bottom: 6px; }
.tc-now .tc-year { color: var(--accent-gold); }
.tc-too-late .tc-year { color: var(--accent-red); }
.tc-desc { font-size: 0.85rem; color: var(--text-muted); text-align: center; }
.tc-arrow { font-size: 1.5rem; color: var(--border-color); }
.conviction-warning {
    background: rgba(251,191,36,0.06);
    border: 1px solid rgba(251,191,36,0.2);
    padding: 15px 20px;
    border-radius: 4px;
    color: var(--accent-gold) !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin-top: 15px;
}


.diff-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    font-size: 0.95rem;
}
.diff-table th, .diff-table td {
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    text-align: left;
    width: 50%;
}
.diff-table th:first-child { background: #1a0505; color: #f87171; }
.diff-table th:last-child { background: #0a1a12; color: #6ee7b7; }
.diff-table td:first-child { color: var(--text-muted); }
.diff-table td:last-child { color: var(--text-main); font-weight: 600; }
.analogy-bad { color: var(--text-muted); font-style: italic; }
.analogy-good { color: var(--accent-gold) !important; font-style: italic; font-size: 1.05rem; }


.win-card h4 { font-size: 1.1rem; color: var(--accent-gold); margin-bottom: 15px; }
.win-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 2; }


.mt-10 { margin-top: 10px; }


.era-comparison {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}
.era-block {
    text-align: center;
    padding: 50px 40px;
    border-radius: 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    width: 100%;
}


.jtbd-tag {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 8px;
    background: rgba(234, 179, 8, 0.15);
    color: var(--accent-gold);
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: normal;
}
.ude-resolution {
    margin-top: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ccc;
    background: rgba(0,0,0,0.2);
    padding: 10px 15px;
    border-left: 3px solid rgba(255,255,255,0.1);
}
.ude-resolution s {
    color: #888;
    text-decoration-color: rgba(239, 68, 68, 0.5);
}
.ude-resolution strong {
    color: #fff;
}


.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: #111;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 40px;
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover {
    color: #fff;
}
.modal-content h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}
.modal-desc {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 25px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #ccc;
    text-align: left;
}
.form-group .required {
    color: var(--accent-red);
}
.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 12px 15px;
    color: #fff;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-red);
    background: rgba(239, 68, 68, 0.05);
}
.w-100 {
    width: 100%;
}
.success-msg {
    margin-top: 15px;
    padding: 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}


.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease, border-color 0.3s ease;
}
.site-header.scrolled {
    background: rgba(5, 5, 5, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.global-nav {
    display: flex;
    gap: 25px;
    align-items: center;
}
.global-nav a {
    color: #a1a1aa;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.3s ease;
}
.global-nav a:hover, .global-nav a.active {
    color: #fff;
}


.header-brand-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
}
.btn-primary.small {
    padding: 8px 16px;
    font-size: 0.95rem;
}


.war-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 20px;
}
.war-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-red) 0%, var(--accent-gold) 50%, #333 100%);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}
.timeline-phase {
    position: relative;
    padding-left: 50px;
    margin-bottom: 40px;
}
.timeline-phase:last-child {
    margin-bottom: 0;
}
.phase-marker {
    position: absolute;
    left: -19px; 
    top: 0;
    background: #000;
    color: var(--accent-gold);
    font-size: 0.75rem;
    font-weight: 800;
    border: 2px solid var(--accent-gold);
    padding: 2px 8px;
    border-radius: 12px;
    z-index: 2;
    white-space: nowrap;
}
.timeline-phase:nth-child(1) .phase-marker {
    border-color: var(--accent-red);
    color: var(--accent-red);
}
.phase-content {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.phase-content:hover {
    transform: translateX(10px);
    border-color: rgba(255, 255, 255, 0.2);
}
.phase-content h3 {
    margin-top: 0;
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.phase-time {
    font-size: 0.9rem;
    color: var(--accent-gold);
    font-weight: 400;
}
.phase-content p {
    margin: 5px 0;
    font-size: 0.95rem;
    line-height: 1.6;
}
.phase-content .phase-desc {
    color: #aaa;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}
.conviction-warning {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--accent-red);
    padding: 15px 20px;
    color: #ffbaba;
    font-weight: 600;
    border-radius: 0 8px 8px 0;
}


.mobile-bottom-toc {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999;
}
.toc-scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 12px 15px;
    gap: 10px;
    scrollbar-width: none;
}
.toc-scroll-container::-webkit-scrollbar {
    display: none;
}
.toc-scroll-container .toc-link {
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.toc-scroll-container .toc-link::before {
    display: none;
}
.toc-scroll-container .toc-link.active {
    color: #000;
    background: var(--accent-gold);
    font-weight: 700;
    border-color: var(--accent-gold);
}

@media (max-width: 768px) {
    .mobile-bottom-toc {
        display: block;
    }
    body {
        padding-bottom: 70px;
    }
    
.global-nav {
    display: flex;
    gap: 25px;
    align-items: center;
}
.global-nav a {
    color: #a1a1aa;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.3s ease;
}
.global-nav a:hover, .global-nav a.active {
    color: #fff;
}


.header-brand-text {
        font-size: 1rem;
    }
    .btn-primary.small {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}
.btn-secondary:hover {
    background: #333;
    transform: translateY(-2px);
}


.battlemap-timeline {
    position: relative;
    max-width: 900px;
    margin: 60px auto;
}

.battlemap-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 120px;
    width: 2px;
    background: var(--border-color);
}

.timeline-block {
    position: relative;
    margin-bottom: 50px;
    display: flex;
}

.timeline-time {
    width: 100px;
    padding-right: 20px;
    text-align: right;
    font-weight: 700;
    color: var(--accent-gold);
    font-size: 1.1rem;
    padding-top: 20px;
}

.timeline-dot {
    position: absolute;
    left: 113px;
    top: 24px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 3px solid var(--accent-red);
    z-index: 2;
}

.timeline-content {
    margin-left: 50px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    width: calc(100% - 150px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-2px);
    border-color: #4a4a4a;
}

.timeline-content h3 {
    margin-top: 0;
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.deliverable-box {
    background: rgba(239, 68, 68, 0.05);
    border-left: 3px solid var(--accent-red);
    padding: 15px;
    margin-top: 20px;
}

.deliverable-box h4 {
    color: var(--accent-red);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.deliverable-box p {
    color: #e4e4e7;
    font-weight: 500;
    margin: 0;
}

.milestone-block {
    margin: 60px 0;
    text-align: center;
    position: relative;
}

.milestone-block::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    z-index: 1;
}

.milestone-content {
    display: inline-block;
    background: var(--bg-dark);
    padding: 10px 30px;
    border: 1px solid var(--accent-gold);
    border-radius: 30px;
    color: var(--accent-gold);
    font-weight: 700;
    position: relative;
    z-index: 2;
}


.loop-diagram {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.loop-step {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 30px 20px;
    text-align: center;
    border-radius: 8px;
    position: relative;
}

.loop-step:not(:last-child)::after {
    content: '→';
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--text-muted);
}

.loop-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.loop-title {
    color: #fff;
    font-weight: 700;
    margin-bottom: 10px;
}

.loop-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}


.redline-warning {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--accent-red);
    padding: 40px;
    border-radius: 8px;
    max-width: 800px;
    margin: 0 auto;
}

.redline-warning h3 {
    color: var(--accent-red);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.redline-list {
    list-style: none;
    padding: 0;
}

.redline-list li {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: #e4e4e7;
    font-size: 1.1rem;
}

.redline-icon {
    flex-shrink: 0;
    color: var(--accent-red);
    font-weight: bold;
}

@media (max-width: 768px) {
    .loop-diagram {
        grid-template-columns: 1fr 1fr;
    }
    .loop-step:not(:last-child)::after {
        display: none;
    }
    .battlemap-timeline::before {
        left: 20px;
    }
    .timeline-time {
        display: none;
    }
    .timeline-dot {
        left: 11px;
    }
    .timeline-content {
        width: calc(100% - 50px);
        margin-left: 50px;
    }
}


.philosophy-quote {
    font-size: 1.5rem;
    font-style: italic;
    color: var(--text-muted);
    border-left: 4px solid var(--accent-red);
    padding-left: 20px;
    margin: 40px auto;
    max-width: 800px;
    line-height: 1.6;
}

.portfolio-card {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 60px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
}

.portfolio-card.reverse {
    flex-direction: row-reverse;
}

.portfolio-image {
    width: 45%;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.portfolio-card.reverse .portfolio-image {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.portfolio-content {
    width: 55%;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portfolio-title {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 15px;
}

.portfolio-mapping {
    display: inline-block;
    background: rgba(251, 191, 36, 0.1);
    color: var(--accent-gold);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.portfolio-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.7;
}

.portfolio-feature {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.portfolio-feature .icon {
    color: var(--accent-red);
    font-weight: bold;
    font-size: 1.2rem;
}

.portfolio-feature p {
    color: #e4e4e7;
    margin: 0;
}

@media (max-width: 900px) {
    .portfolio-card, .portfolio-card.reverse {
        flex-direction: column;
    }
    .portfolio-image {
        width: 100%;
        height: 250px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .portfolio-card.reverse .portfolio-image {
        border-left: none;
    }
    .portfolio-content {
        width: 100%;
        padding: 30px;
}
}




.loop-diagram {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.loop-step {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 30px 20px;
    text-align: center;
    border-radius: 8px;
    position: relative;
}

.loop-step:not(:last-child)::after {
    content: '→';
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--text-muted);
}

.loop-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.loop-title {
    color: #fff;
    font-weight: 700;
    margin-bottom: 10px;
}

.loop-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}


.redline-warning {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--accent-red);
    padding: 40px;
    border-radius: 8px;
    max-width: 800px;
    margin: 0 auto;
}

.redline-warning h3 {
    color: var(--accent-red);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.redline-list {
    list-style: none;
    padding: 0;
}

.redline-list li {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: #e4e4e7;
    font-size: 1.1rem;
}

.redline-icon {
    flex-shrink: 0;
    color: var(--accent-red);
    font-weight: bold;
}

@media (max-width: 768px) {
    .loop-diagram {
        grid-template-columns: 1fr 1fr;
    }
    .loop-step:not(:last-child)::after {
        display: none;
    }
    .battlemap-timeline::before {
        left: 20px;
    }
    .timeline-time {
        display: none;
    }
}


/* Appended Missing Supply-Demand Curve CSS */
/* Axes */
.sd-axis-line {
    position: absolute;
    background: #3182ce;
    z-index: 2;
}

.sd-axis-x {
    top: 70%;
    left: 20%;
    width: 65%;
    height: 2px;
}

.sd-axis-x::after {
    content: '';
    position: absolute;
    right: -10px;
    top: -4px;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 10px solid #3182ce;
}

.sd-axis-y {
    top: 15%;
    left: 20%;
    height: 55%;
    width: 2px;
}

.sd-axis-y::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -4px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 10px solid #3182ce;
}

/* Labels */
.sd-label-y {
    position: absolute;
    top: 12%;
    left: 20%;
    transform: translate(-50%, -100%);
    color: var(--accent-gold);
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.sd-label-x {
    position: absolute;
    top: 70%;
    left: 88%;
    transform: translateY(-50%);
    color: var(--accent-gold);
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Dashed Lines */
.sd-dash-h {
    position: absolute;
    top: 45%;
    left: 20%;
    width: 30%;
    height: 1px;
    border-top: 2px dashed #63b3ed;
    z-index: 2;
}

.sd-dash-v {
    position: absolute;
    top: 45%;
    left: 50%;
    height: 25%;
    width: 1px;
    border-left: 2px dashed #63b3ed;
    z-index: 2;
}

/* Nodes */
.sd-node {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 3px solid;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.sd-node-demand {
    top: 45%;
    left: 20%;
    border-color: #3182ce;
    box-shadow: 0 0 15px rgba(49, 130, 206, 0.6);
}

.sd-node-supply {
    top: 70%;
    left: 50%;
    border-color: #9f7aea;
    box-shadow: 0 0 15px rgba(159, 122, 234, 0.6);
}

.sd-node-connect {
    top: 45%;
    left: 50%;
    border-color: #48bb78;
    box-shadow: 0 0 15px rgba(72, 187, 120, 0.6);
}

/* Texts */
.sd-text {
    position: absolute;
    font-size: 1rem;
    color: #fff;
    white-space: nowrap;
    z-index: 5;
}

.sd-text-demand {
    top: 45%;
    left: 18%;
    transform: translate(-100%, -50%);
    text-align: right;
    line-height: 1.4;
}

.sd-text-supply {
    top: 73%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    line-height: 1.4;
}

.sd-text-connect {
    top: 38%;
    left: 50%;
    transform: translate(-50%, -100%);
    text-align: center;
    line-height: 1.4;
}

.sd-curve-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.sd-annotation {
    position: absolute;
    padding: 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #cbd5e0;
    line-height: 1.6;
    z-index: 10;
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.sd-anno-demand {
    top: 60%;
    left: 3%;
    width: 280px;
    border-top: 3px solid #3182ce;
}

.sd-anno-supply {
    top: 80%;
    left: 50%;
    transform: translateX(-50%);
    width: 360px;
    border-top: 3px solid #9f7aea;
}

.sd-anno-connect {
    top: 35%;
    left: 55%;
    width: 280px;
    border-top: 3px solid #48bb78;
}


/* Appended Phase Timeline CSS */
/* Phase Timeline Grid Layout */
.phase-timeline {
    margin-top: 2rem;
    position: relative;
}

/* Header Row */
.timeline-header-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    position: sticky;
    top: 0;
    background: var(--bg-dark);
    z-index: 10;
    padding-top: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
}

.timeline-header-col {
    text-align: center;
    font-weight: bold;
    font-size: 0.95rem;
    padding: 10px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.05);
}

/* Header Colors */
.th-sales { color: #63b3ed; border-top: 3px solid #3182ce; }
.th-management { color: #f6ad55; border-top: 3px solid #dd6b20; }
.th-buyer { color: #fc8181; border-top: 3px solid #e53e3e; }
.th-factory { color: #68d391; border-top: 3px solid #38a169; }
.th-crm { color: #b794f4; border-top: 3px solid #9f7aea; }

/* Phase Step Container */
.phase-step {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    margin-bottom: 32px;
    overflow: hidden;
}

/* Phase Header */
.phase-header {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.phase-header h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.phase-header span {
    font-size: 0.9rem;
    font-weight: normal;
    color: #a0aec0;
}

.phase-badge {
    background: #2d3748;
    color: #e2e8f0;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: bold;
    margin-right: 16px;
    font-size: 0.9rem;
}

.phase-p0 { background: linear-gradient(90deg, rgba(45,55,72,0.8), transparent); border-left: 4px solid #a0aec0; }
.phase-p1 { background: linear-gradient(90deg, rgba(49,130,206,0.2), transparent); border-left: 4px solid #3182ce; }
.phase-p2 { background: linear-gradient(90deg, rgba(159,122,234,0.2), transparent); border-left: 4px solid #9f7aea; }
.phase-p3 { background: linear-gradient(90deg, rgba(72,187,120,0.2), transparent); border-left: 4px solid #48bb78; }

/* Phase Body & Grid */
.phase-body {
    padding: 24px;
}

.phase-goal {
    color: #e2e8f0;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    border-left: 2px solid var(--accent-gold);
}

.stakeholder-gates {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

/* Stakeholder Cards in Grid */
.sg-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 16px;
    position: relative;
}

/* Grid Column Placements */
.sg-col-1 { grid-column: 1; }
.sg-col-2 { grid-column: 2; }
.sg-col-3 { grid-column: 3; }
.sg-col-4 { grid-column: 4; }
.sg-col-5 { grid-column: 5; }

/* Card Colors */
.sg-blue { border-top: 3px solid #3182ce; }
.sg-orange { border-top: 3px solid #dd6b20; }
.sg-red { border-top: 3px solid #e53e3e; background: rgba(229, 62, 62, 0.05); }
.sg-green { border-top: 3px solid #38a169; }
.sg-purple { border-top: 3px solid #9f7aea; }

.sg-icon {
    font-weight: bold;
    font-size: 0.95rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
}

.sg-blue .sg-icon { color: #63b3ed; }
.sg-orange .sg-icon { color: #f6ad55; }
.sg-red .sg-icon { color: #fc8181; }
.sg-green .sg-icon { color: #68d391; }
.sg-purple .sg-icon { color: #b794f4; }

.sg-content {
    font-size: 0.85rem;
    color: #cbd5e0;
    line-height: 1.5;
}

/* Phase Gate (The conclusion row) */
.phase-gate {
    background: rgba(236, 201, 75, 0.05);
    border: 1px solid rgba(236, 201, 75, 0.3);
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.phase-gate span:first-child {
    font-size: 1.2rem;
}

.phase-gate div {
    font-size: 0.9rem;
    color: var(--accent-gold);
}

/* SVG Icons */
.svg-icon {
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.2em;
    display: inline-block;
    flex-shrink: 0;
}

/* Execution Matrix Table Enhancements */
.w-full {
    width: 100%;
}

.matrix-table {
    table-layout: fixed;
}

.matrix-table th, .matrix-table td {
    padding: 20px 16px;
    vertical-align: top;
    line-height: 1.6;
}

.matrix-table thead th {
    font-size: 1.05rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    text-align: left;
}

.matrix-table thead th:first-child {
    width: 12%;
    text-align: center;
}

.matrix-table thead th span {
    font-size: 0.85rem;
    font-weight: normal;
    color: #a0aec0;
    display: block;
    margin-top: 4px;
}

.matrix-table tbody th {
    text-align: center;
    vertical-align: middle;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    background: transparent;
}

.matrix-table tbody td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px dashed rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    font-size: 0.95rem;
}

.matrix-table tbody td:last-child {
    border-right: none;
}

.matrix-table .badge {
    display: inline-block;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
    white-space: pre-wrap;
    line-height: 1.4;
}


/* Redline Showcase Styling */
.redline-showcase {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}

.redline-item {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.redline-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.redline-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.r-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.r-icon {
    font-size: 1rem;
}

.r-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge-reject {
    background: rgba(229, 62, 62, 0.15);
    color: #fc8181;
    border: 1px solid rgba(229, 62, 62, 0.3);
}

.badge-pause {
    background: rgba(221, 107, 32, 0.15);
    color: #fbd38d;
    border: 1px solid rgba(221, 107, 32, 0.3);
}

.badge-veto {
    background: rgba(155, 44, 44, 0.2);
    color: #feb2b2;
    border: 1px solid rgba(155, 44, 44, 0.4);
}

.redline-compare-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: stretch;
}

.r-box {
    padding: 16px 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.r-box p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cbd5e0;
}

.r-box strong {
    color: #fff;
}

.r-box-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.r-negative {
    background: linear-gradient(135deg, rgba(229, 62, 62, 0.05) 0%, transparent 100%);
    border-left: 3px solid rgba(229, 62, 62, 0.5);
}

.r-negative .r-box-title {
    color: #fc8181;
}

.r-positive {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.05) 0%, transparent 100%);
    border-left: 3px solid rgba(72, 187, 120, 0.5);
}

.r-positive .r-box-title {
    color: #68d391;
}

.r-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .redline-compare-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .r-divider {
        transform: rotate(90deg);
        padding: 8px 0;
    }
    .redline-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* UDE Diagnostic List Styling */
.ude-diagnostic-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 16px;
    margin-top: 24px;
}

.ude-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.2s ease;
}

.ude-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.ude-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.2);
    min-width: 28px;
}

.ude-text {
    font-size: 0.95rem;
    color: #cbd5e0;
    line-height: 1.5;
}

.warning-card {
    background: rgba(229, 62, 62, 0.05);
    border-color: rgba(229, 62, 62, 0.2);
}

.warning-card .ude-num {
    color: #fc8181;
}

.warning-card .ude-text {
    color: #fff;
    font-weight: 500;
}

/* Vanish List Styling */
.ude-vanish-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}
.vanish-wave {
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(20,20,20,0.4);
}
.wave-header {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: bold;
    color: #fff;
    background: rgba(255,255,255,0.05);
}
.wave-1-bg { border-left: 4px solid #fc8181; }
.wave-2-bg { border-left: 4px solid #fbd38d; }
.wave-3-bg { border-left: 4px solid #68d391; }
.vanish-items {
    display: flex;
    flex-direction: column;
}
.vanish-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px dashed rgba(255,255,255,0.05);
}
.vanish-item:first-child { border-top: none; }
.v-ude {
    flex: 1;
    color: #fc8181;
    font-size: 0.9rem;
    line-height: 1.4;
}
.v-arrow {
    color: rgba(255,255,255,0.3);
    font-size: 0.8rem;
}
.v-logic {
    flex: 1.2;
    color: #68d391;
    font-size: 0.9rem;
    line-height: 1.4;
}
@media (max-width: 768px) {
    .vanish-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .v-arrow {
        transform: rotate(90deg);
        margin-left: 8px;
    }
}

/* Speed Card List Styling */
.speed-card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.speed-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.speed-metric {
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.speed-data {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.speed-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.s-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.s-val {
    font-size: 0.95rem;
    color: #cbd5e0;
}

.speed-manual .s-val {
    color: #fc8181;
}

.speed-ai .s-val {
    color: #68d391;
    font-weight: 500;
}

.speed-multiplier {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding-left: 16px;
    border-left: 1px dashed rgba(255, 255, 255, 0.1);
}

.speed-multiplier .m-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    line-height: 1;
}

.speed-multiplier .m-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 4px;
}

@media (max-width: 768px) {
    .speed-data {
        flex-wrap: wrap;
    }
    .speed-col {
        flex: 1 1 40%;
    }
    .speed-multiplier {
        flex: 1 1 100%;
        border-left: none;
        border-top: 1px dashed rgba(255, 255, 255, 0.1);
        padding-left: 0;
        padding-top: 12px;
        margin-top: 8px;
        align-items: center;
        flex-direction: row;
        gap: 8px;
    }
    .speed-multiplier .m-label {
        margin-top: 0;
    }
}

/* Accounting Card List Styling */
.accounting-card-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.accounting-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ac-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.ac-element {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.ac-sub {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: normal;
}

.ac-impact {
    font-size: 0.95rem;
    font-weight: bold;
    color: #48bb78;
    background: rgba(72, 187, 120, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.ac-mapping {
    font-size: 0.9rem;
    color: #cbd5e0;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 16px;
    border-radius: 6px;
}

.ac-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.ac-before, .ac-after {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ac-before .ac-label {
    color: #fc8181;
    font-size: 0.85rem;
    font-weight: bold;
}

.ac-after .ac-label {
    color: #48bb78;
    font-size: 0.85rem;
    font-weight: bold;
}

.ac-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #e2e8f0;
}

@media (max-width: 768px) {
    .ac-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .ac-comparison {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .ac-before {
        padding-bottom: 16px;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    }
}

/* Verify Card List Styling */
.verify-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.verify-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vc-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.vc-role {
    font-weight: bold;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.vc-ude {
    color: #e2e8f0;
    font-size: 1rem;
    font-weight: 500;
}

.vc-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vc-step {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    padding: 12px;
}

.vc-step .vc-label {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vc-step .vc-text {
    font-size: 0.95rem;
    color: #cbd5e0;
}

.vc-arrow {
    text-align: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 1.2rem;
    line-height: 1;
}

.vc-footer {
    padding: 16px;
    background: rgba(72, 187, 120, 0.05);
    border-top: 1px solid rgba(72, 187, 120, 0.2);
    margin-top: auto;
}

.vc-footer .vc-label {
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.vc-conclusion {
    font-weight: bold;
    font-size: 1.05rem;
}

@media (max-width: 768px) {
    .formula-content {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 12px;
    }
    .formula-term, .formula-result {
        width: 100%;
    }
    .formula-operator {
        font-size: 1.8rem;
        padding: 4px 0;
    }
}

/* Business Design Card List */
.bd-card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.bd-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bd-module {
    font-size: 1.15rem;
    font-weight: bold;
    color: #fc8181;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.bd-comparison {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bd-before, .bd-after {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    padding: 16px;
    border-radius: 6px;
    border-left: 3px solid rgba(255,255,255,0.1);
}

.bd-after {
    background: rgba(236, 201, 75, 0.05);
    border-left: 3px solid #ecc94b;
}

.bd-label {
    font-size: 0.8rem;
    color: #a0aec0;
    font-weight: bold;
    text-transform: uppercase;
}

.bd-text {
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 1.5;
}

.bd-after .bd-text {
    color: #fff;
}

.bd-arrow {
    text-align: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 1.2rem;
    line-height: 1;
}

@media (min-width: 769px) {
    .bd-comparison {
        flex-direction: row;
        align-items: stretch;
    }
    .bd-before, .bd-after {
        flex: 1;
    }
    .bd-arrow {
        display: flex;
        align-items: center;
    }
}

@media (max-width: 768px) {
    /* Hide the global timeline header on mobile */
    .timeline-header-row {
        display: none;
    }
    
    /* Convert the matrix grid to a vertical flex stack */
    .stakeholder-gates {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    /* Remove strict grid column assignments so cards stack naturally */
    .sg-col-1, .sg-col-2, .sg-col-3, .sg-col-4, .sg-col-5 {
        grid-column: auto;
    }
    
    /* Ensure the cards look great when vertically stacked */
    .sg-card {
        width: 100%;
        margin-bottom: 0;
    }
    
    .phase-gate {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Matrix Table Responsive Mobile Layout */
@media (max-width: 768px) {
    .matrix-table, .matrix-table thead, .matrix-table tbody, .matrix-table th, .matrix-table td, .matrix-table tr {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }
    .matrix-table {
        min-width: 0 !important; /* Override .redline-table min-width: 600px */
    }
    .matrix-table thead {
        display: none; /* Hide header completely on mobile, use pseudo-elements for labels */
    }
    .matrix-table tbody tr {
        margin-bottom: 24px;
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 8px;
        background: rgba(0,0,0,0.2);
        overflow: hidden;
    }
    .matrix-table tbody th {
        background: rgba(255,255,255,0.05);
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding: 16px;
        text-align: center;
        border-right: none;
    }
    .matrix-table tbody th .badge {
        display: inline-block;
        margin: 0 auto;
        writing-mode: horizontal-tb; /* Fix any vertical text */
    }
    .matrix-table tbody td {
        padding: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        border-right: none !important;
        position: relative;
        text-align: left !important;
    }
    .matrix-table tbody td:last-child {
        border-bottom: none;
    }
    
    /* Add labels using nth-child pseudo elements */
    .matrix-table tbody td:nth-child(2)::before { content: "🎯 全局统筹"; font-weight: bold; color: var(--accent-gold); display: block; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px dashed rgba(255,255,255,0.1); }
    .matrix-table tbody td:nth-child(3)::before { content: "⚔️ 分战役① 技术壁垒"; font-weight: bold; color: #fc8181; display: block; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px dashed rgba(255,255,255,0.1); }
    .matrix-table tbody td:nth-child(4)::before { content: "⚔️ 分战役② 销售赋能"; font-weight: bold; color: #f6ad55; display: block; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px dashed rgba(255,255,255,0.1); }
    .matrix-table tbody td:nth-child(5)::before { content: "⚔️ 分战役③ 生态联盟"; font-weight: bold; color: #68d391; display: block; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px dashed rgba(255,255,255,0.1); }
}

/* Clean Matrix Row Titles */
.matrix-row-title {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--accent-gold);
    letter-spacing: 1px;
}

@media (min-width: 769px) {
    .matrix-row-title {
        writing-mode: vertical-rl;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .matrix-row-title {
        font-size: 1.2rem;
        padding-bottom: 8px;
        border-bottom: 2px solid rgba(255,255,255,0.1);
        margin-bottom: 8px;
        display: inline-block;
    }
}

/* Ratchet Card List Styling */
.ratchet-card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.ratchet-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.rc-header {
    background: rgba(255, 255, 255, 0.02);
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.rc-stage {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--accent-red);
}

.rc-stage-desc {
    font-size: 0.85rem;
    color: #888;
}

.rc-content {
    display: flex;
    flex-direction: column;
}

.rc-feedback, .rc-cost {
    padding: 16px 20px;
}

.rc-feedback {
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.rc-label {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-bottom: 8px;
    font-weight: bold;
}

.rc-text {
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 1.5;
}

.rc-cost {
    background: rgba(239, 68, 68, 0.02);
}

.rc-cost .rc-label {
    color: #fc8181;
}

@media (min-width: 769px) {
    .rc-content {
        flex-direction: row;
    }
    .rc-feedback, .rc-cost {
        flex: 1;
        border-bottom: none;
    }
    .rc-feedback {
        border-right: 1px dashed rgba(255, 255, 255, 0.1);
    }
}

/* Intro Card Advanced Styling */
.intro-card {
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.08) 0%, rgba(14, 165, 233, 0.02) 100%);
    border: 1px solid rgba(14, 165, 233, 0.15);
    padding: 40px;
    border-radius: 12px;
    text-align: left;
    max-width: 800px;
    margin: 32px auto 0;
    box-shadow: 0 10px 40px rgba(14, 165, 233, 0.05);
    position: relative;
    overflow: hidden;
}

.intro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #38bdf8, #0284c7);
}

.intro-title {
    color: #38bdf8;
    margin-bottom: 24px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.intro-text {
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.intro-text:first-of-type {
    color: #e2e8f0;
}

.intro-highlight {
    color: #38bdf8;
    font-weight: 600;
}

.intro-list {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.9;
    padding-left: 24px;
    margin-bottom: 24px;
}

.intro-list li strong {
    color: #e2e8f0;
    font-weight: 500;
}

.intro-tip {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid rgba(56, 189, 248, 0.4);
    border-radius: 6px;
    font-size: 0.95rem;
    color: #94a3b8;
    line-height: 1.7;
}

.intro-tip strong {
    color: #e2e8f0;
    font-weight: 500;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .intro-card {
        padding: 24px 20px;
        margin: 24px 16px 0; /* Add horizontal margins to avoid touching edges */
        width: auto;
    }
    
    .intro-title {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    .intro-text {
        font-size: 1rem;
    }
    
    .intro-list {
        font-size: 0.95rem;
    }
    
    .intro-tip {
        padding: 14px 16px;
    }
}

/* ==========================================================================
   GLOBAL MOBILE OPTIMIZATIONS (Resolving excessive padding and margins)
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. Maximize usable screen width */
    .container {
        padding: 0 12px !important;
    }
    
    /* Global sections */
    section {
        padding: 60px 0 !important;
    }
    
    .hero {
        padding: 100px 0 60px !important;
    }

    /* 2. Fix Card "Padding Trap" (Double padding reduction) */
    .card,
    .toc-case-card,
    .output-item,
    .criteria-box,
    .audit-paper,
    .contract-paper {
        padding: 16px 14px !important;
    }
    
    /* 3. Aggressively target deeply nested inline-styled cards */
    .toc-step .card > div > div,
    .grid-2 > div,
    .grid-3 > div {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    div[style*="padding: 20px"],
    div[style*="padding: 25px"],
    div[style*="padding: 30px"],
    div[style*="padding: 35px"],
    div[style*="padding: 40px"] {
        /* If an element has inline padding, tone it down on mobile */
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    /* 4. Fix specific tight-padding lists and boxes (Screenshot 3) */
    .pruning-list li,
    .assumption-pointer,
    .solution-content {
        padding: 14px 12px !important;
    }

    /* 5. Validation Card / Root Cause layout (Screenshot 2) */
    .vc-step {
        padding: 12px !important;
        margin-left: 10px !important;
    }
    .vc-label {
        font-size: 0.85rem !important;
        margin-bottom: 4px !important;
    }
    
    /* 6. Ensure Grid and Flex rows break gracefully into columns */
    .grid-2,
    .grid-3,
    .roles-target,
    .rules-grid,
    .outputs-list,
    .cta-criteria {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    /* 7. Smart width matching (avoid fixed 30% or 400px limits) */
    .rule,
    .role-item,
    .output-item,
    .criteria-box,
    .sign-block {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* 8. Text wrapping fix (Prevent breaking out of containers) */
    .text,
    p,
    li,
    strong,
    span,
    h3,
    h4 {
        word-break: break-word;
    }
    
    /* 9. Timeline paddings */
    .timeline {
        padding-left: 20px !important;
        margin-left: 10px !important;
    }
}
