/* Layout */
.ai-layout-3col {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    /* Force strict equal width */
    gap: 0.6vw;
    flex: 1;
    min-height: 0;
    padding-bottom: 0.4vh;
}

.panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.panel-header {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 0.4vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4vw;
    padding-bottom: 0.4vh;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Common Card Styles */
.design-card,
.flow-node,
.innovation-item {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Left Panel: Design Logic */
.design-panel {
    gap: 0.5vh;
}

.design-card {
    padding: 1vh 1vw;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4vh;
}

.card-title {
    font-size: 14px;
    /* Standardized Header */
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
}

.card-desc {
    font-size: 13px;
    /* Standardized Body */
    color: var(--text-secondary);
    line-height: 1.35;
    margin: 0;
    text-align: center;
}

.code-block {
    background: #0f172a;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    /* Standardized Code */
    padding: 1.2vh 1vw;
    border-radius: 4px;
    line-height: 1.5;
    white-space: pre-line;
    /* CHANGED: Collapses indentation but keeps newlines */
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);

    text-align: left;
    width: 100%;
    margin-top: auto;
}

.code-block .keyword {
    color: #c084fc;
}

.code-block .method {
    color: #60a5fa;
}

.code-block .func {
    color: #38bdf8;
}

.comparison-box {
    margin-top: 0.2vh;
    padding: 0.6vh 0.6vw;
    border-radius: 4px;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    gap: 0.2vh;
}

.comparison-box.generic {
    background: #fff1f2;
    border: 1px solid #fee2e2;
    color: #9f1239;
    margin-bottom: 0.2vh;
}

.comparison-box.learner {
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    color: #047857;
}

.comp-label {
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.comp-result {
    opacity: 0.9;
}

.comparison-box .code {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(0, 0, 0, 0.06);
    padding: 0 3px;
    border-radius: 2px;
    font-weight: 600;
}

/* Center Panel: Flow */
.flow-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0;
    gap: 0.4vh;
}

.flow-node {
    padding: 1.2vh 1vw;
    text-align: center;
    font-size: 14px;
    /* Standardized Header */
    font-weight: 700;
    color: var(--text-primary);
    width: 100%;
    position: relative;
    border-bottom-width: 3px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.flow-node.start {
    background: var(--bg-muted);
    border-color: rgba(0, 0, 0, 0.1);
}

.flow-node.end {
    background: #f0f9ff;
    border-color: var(--accent-light);
    color: var(--accent);
}

.node-sub {
    display: block;
    font-size: 13px;
    /* Standardized Subtext (matched to others) */
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.4vh;
    opacity: 0.8;
}

.fan-out-container {
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    padding: 0.8vh 1vw;
    width: 100%;
    border: 1px dashed rgba(0, 0, 0, 0.1);
}

.fan-out-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.6vh;
}

.fan-out-branches {
    display: flex;
    gap: 0.6vw;
    justify-content: space-between;
}

.branch {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    padding: 0.6vh 0.4vw;
    text-align: center;
    flex: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.branch-node {
    font-size: 13px;
    /* Increased from 12px */
    font-weight: 800;
    color: var(--text-primary);
}

.branch-desc {
    font-size: 12px;
    /* Increased from 10px */
    color: var(--text-muted);
    font-weight: 500;
}

.flow-arrow {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1;
    font-weight: 300;
}

/* Right Panel: Innovations */
.innovations-list {
    display: flex;
    flex-direction: column;
    gap: 0.4vh;
    /* Reduced gap from 0.5vh */
    flex: 1;
}

.innovation-item {
    padding: 0 1vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    border-left: 3px solid transparent;
}

.innovation-item:nth-child(1) {
    border-left-color: #3b82f6;
}

.innovation-item:nth-child(2) {
    border-left-color: #8b5cf6;
}

.innovation-item:nth-child(3) {
    border-left-color: #ec4899;
}

.innovation-item:nth-child(4) {
    border-left-color: #f59e0b;
}

.item-content h3 {
    font-size: 14px;
    /* Standardized Header */
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    margin-bottom: 0.3vh;
}

.item-content p {
    font-size: 13px;
    /* Standardized Body */
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.3;
}

.outcome-box {
    margin-top: 0.8vh;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-lg);
    padding: 2.2vh 1vw;
    /* Increased padding from 1.2vh */
    text-align: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(1, 186, 239, 0.1);
}

.outcome-box h3 {
    font-size: 12px;
    /* Slightly bumped for prominence */
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.4vh;
}

.outcome-box p {
    font-size: 14px;
    /* Slightly bumped */
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0;
}