.function-chip {
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--pillar-color, #2B6CB0) 24%, #dbe5f0);
    border-radius: 10px;
    padding: 0.65rem;
    background: color-mix(in srgb, var(--pillar-color, #2B6CB0) 7%, #f7fafc);
    color: #071b36;
    font: inherit;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.function-chip:hover,
.function-chip:focus-visible {
    transform: translateY(-2px);
    border-color: var(--pillar-color, #2B6CB0);
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(7, 27, 54, 0.1);
    outline: none;
}
.pillar-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 7000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(7, 27, 54, 0.62);
    backdrop-filter: blur(8px);
}
.pillar-detail-modal.active {
    display: flex;
}
.pillar-detail-card {
    width: min(920px, 100%);
    max-height: min(86vh, 860px);
    overflow: auto;
    background: #ffffff;
    color: #102033;
    border: 1px solid #dbe5f0;
    border-top: 7px solid var(--pillar-color, #2B6CB0);
    border-radius: 18px;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.28);
}
.pillar-detail-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: start;
    padding: 1.4rem;
    background: linear-gradient(135deg, #071b36, var(--pillar-color, #0d2f5f));
    color: #ffffff;
    border-bottom: 4px solid var(--pillar-color, #2B6CB0);
}
.pillar-detail-header h2 {
    color: #ffffff;
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    line-height: 1.08;
}
.pillar-detail-header p {
    color: #dbeafe;
    margin: 0.4rem 0 0;
}
.pillar-detail-close {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.12);
    color: #ffffff;
    font-size: 1.4rem;
    cursor: pointer;
}
.pillar-detail-body {
    padding: 1.4rem;
}
.detail-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.2rem;
}
.detail-toolbar label {
    display: block;
    color: #071b36;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-size: 0.74rem;
    margin-bottom: 0.35rem;
}
.detail-toolbar select {
    width: min(280px, 100%);
    border: 2px solid #dbe5f0;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    font: inherit;
    color: #102033;
    background: #f7fafc;
}
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.detail-box {
    border: 1px solid #dbe5f0;
    border-radius: 14px;
    background: #f7fafc;
    padding: 1rem;
}
.detail-box.full {
    grid-column: 1 / -1;
}
.detail-box h3 {
    color: #071b36;
    margin: 0 0 0.55rem;
    font-size: 1rem;
}
.detail-box p,
.detail-box li {
    color: #5b6b80;
    margin-top: 0;
    line-height: 1.5;
}
.detail-box ul {
    margin: 0;
    padding-left: 1.1rem;
}
.state-note {
    border-left: 4px solid var(--pillar-color, #2B6CB0);
    background: #ffffff;
}
.detail-disclaimer {
    color: #64748b;
    font-size: 0.82rem;
    margin: 1rem 0 0;
}
@media (max-width: 760px) {
    .pillar-detail-modal {
        align-items: flex-end;
        padding: 0;
    }
    .pillar-detail-card {
        max-height: 92vh;
        border-radius: 18px 18px 0 0;
    }
    .pillar-detail-header,
    .detail-toolbar,
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .detail-toolbar select {
        width: 100%;
    }
}
