
/* Platform page additions for 4-layer grid */
.platform-grid--four {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
@media (max-width: 900px) { .platform-grid--four { grid-template-columns: 1fr; } }

/* Flagship cards get extra prominence */
.platform-card--flagship {
    border-width: 2px;
    position: relative;
}
.platform-card--flagship::after {
    content: "FLAGSHIP";
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

/* Purple accent for Magic Runtime icon */
.platform-card .icon-box.purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.08));
    color: #a78bfa;
}

/* Blue-cyan accent for LLM Gateway icon */
.platform-card .icon-box.blue-cyan {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(6, 182, 212, 0.12));
    color: #67e8f9;
}

/* Flow section — aggressive overrides for external CSS conflicts */
.flow-grid,
.container .flow-grid,
.section .flow-grid,
.section-alt .flow-grid {
    display: grid !important;
    grid-template-columns: 2fr 0.5fr 2fr 0.5fr 2fr 0.5fr 2fr 0.5fr 2fr !important;
    gap: 0 !important;
    align-items: center !important;
    max-width: 1000px !important;
    margin: 0 auto !important;
    width: 100% !important;
}
@media (max-width: 900px) {
    .flow-grid { grid-template-columns: 1fr; }
    .flow-arrow { transform: rotate(90deg); }
}
.flow-step {
    text-align: center;
    padding: 1.5rem 0.75rem;
}
.flow-step .flow-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.25rem;
}
.flow-step h4 { color: #fff; font-size: 0.95rem; margin-bottom: 0.35rem; }
.flow-step p { color: #9ca3af; font-size: 0.8rem; line-height: 1.4; }
.flow-arrow {
    text-align: center;
    color: #3b82f6;
    font-size: 1.25rem;
    opacity: 0.6;
}

/* Controls strip */
.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.control-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(96, 165, 250, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: border-color 0.3s;
}
.control-item:hover { border-color: rgba(96, 165, 250, 0.3); }
.control-item i { color: #3b82f6; font-size: 1.25rem; margin-bottom: 0.5rem; display: block; }
.control-item strong { color: #fff; font-size: 0.875rem; display: block; margin-bottom: 0.25rem; }
.control-item span { color: #6b7280; font-size: 0.8rem; }

/* Accordion icon colors for new sections */
.accordion-icon-gateway { color: #67e8f9 !important; margin-right: 0.75rem; }
.accordion-icon-magic { color: #a78bfa !important; margin-right: 0.75rem; }

/* Component color system — stable, maintainable */
.platform-card--core .label { color: #60a5fa !important; }
.platform-card--reliability .label { color: #10b981 !important; }
.platform-card--gateway .label { color: #67e8f9 !important; }
.platform-card--magic .label { color: #a78bfa !important; }

/* Nav item colors — force override of external styles */
.nav-item--gateway { color: #67e8f9 !important; }
.nav-item--magic { color: #a78bfa !important; }

/* Platform card styling overrides */
.platform-card--gateway { border-color: rgba(6, 182, 212, 0.3) !important; }
.platform-card--magic { border-color: rgba(139, 92, 246, 0.3) !important; }

/* Button styling */
.ts-btn--magic-secondary {
    border-color: rgba(139, 92, 246, 0.4);
    color: #a78bfa;
}

/* CTA row spacing */
.ts-cta-row--spaced { margin-top: 2rem; }

/* Intro note styling */
.intro-note {
    margin-top: 0.75rem;
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.65);
}

/* Flow step icon colors */
.flow-icon--core { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.flow-icon--reliability { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.flow-icon--gateway { background: rgba(6, 182, 212, 0.15); color: #67e8f9; }
.flow-icon--magic { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.flow-icon--audit { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }

.platform-card--gateway {
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 0 20px rgba(6, 182, 212, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.platform-card--magic {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 0 20px rgba(139, 92, 246, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Accordion visibility and transitions */
.accordion-item:not(.open) .accordion-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

.accordion-item.open .accordion-content {
    max-height: 500px;
    opacity: 1;
    overflow: visible;
    transition: max-height 0.3s ease-in, opacity 0.3s ease-in;
}

/* Accordion spacing enhancements */
.accordion-body {
    padding-bottom: 3rem !important;
}

.accordion-item.open .accordion-body {
    margin-bottom: 1.5rem !important;
}
