/* ========================================
   MOBILE NAVIGATION
   ======================================== */

.hamburger-menu {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
    margin-right: 12px;
}

.hamburger-menu span {
    width: 100%;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    transition: all 0.3s ease;
}

[data-theme="light"] .hamburger-menu span {
    background-color: #1d1d1f;
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Slide-out Menu */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: rgba(18, 18, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2001;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .mobile-nav {
    background: rgba(255, 255, 255, 0.95);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-nav.active {
    transform: translateX(280px);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .mobile-nav-header {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.mobile-nav-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

[data-theme="light"] .mobile-nav-title {
    color: #1d1d1f;
}

.close-menu {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

[data-theme="light"] .close-menu {
    color: rgba(0, 0, 0, 0.6);
}

.mobile-nav-links {
    list-style: none;
    padding: 20px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s ease;
    display: block;
    padding: 8px 0;
}

[data-theme="light"] .nav-link {
    color: rgba(0, 0, 0, 0.7);
}

.nav-link:hover, .nav-link:active {
    color: #fff;
}

[data-theme="light"] .nav-link:hover, [data-theme="light"] .nav-link:active {
    color: #000;
}

.nav-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

[data-theme="light"] .nav-separator {
    background: rgba(0, 0, 0, 0.1);
}

.highlight-link {
    color: #818cf8; /* Indigo-400 */
    font-weight: 700;
}

[data-theme="light"] .highlight-link {
    color: #4f46e5; /* Indigo-600 */
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }
}

/* ========================================
   STICKY HEADER
   ======================================== */

.sticky-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(12, 12, 12, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sticky-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    width: 100%;
}

.sticky-header-content::after {
    content: '';
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), transparent);
}

.sticky-logo {
    height: 32px;
    width: 80px;
    object-fit: cover;
    object-position: center;
    opacity: 0.95;
    transition: opacity 0.2s ease;
    border-radius: 2px;
    overflow: hidden;
}

.sticky-logo:hover {
    opacity: 1;
}

/* Logo theme switching */
.logo-dark {
    display: block;
}

.logo-light {
    display: none;
}

[data-theme="light"] .logo-dark {
    display: none;
}

[data-theme="light"] .logo-light {
    display: block;
}

.sticky-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    position: relative;
    padding-left: 16px;
}

.sticky-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 16px;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.6), rgba(139, 92, 246, 0.2));
    border-radius: 2px;
}

/* ========================================
   ROADMAP / DIAGRAM LAYOUT
   ======================================== */

/* Override container width for roadmap */
.container {
    padding: 20px !important;
}

/* Main Diagram Grid - 2 Column Layout */
.roadmap-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    margin-top: 0;
    margin-bottom: 20px;
    align-items: start;
}

/* Main Column */
.main-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Roadmap Section Blocks */
.roadmap-block {
    background: rgba(30, 30, 50, 0.6);
    border: 2px solid rgba(139, 92, 246, 0.4);
    border-radius: 6px;
    overflow: hidden;
}

.block-header {
    background: rgba(139, 92, 246, 0.2);
    padding: 8px 16px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.block-title {
    font-size: 13px;
    font-weight: 600;
    color: #e9d5ff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.block-description {
    font-size: 11px;
    font-weight: 400;
    color: rgba(233, 213, 255, 0.6);
    text-transform: none;
    letter-spacing: 0;
    margin-left: auto;
}

.block-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

/* Stack Layers */
.stack-layer {
    padding: 12px 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.layer-label {
    font-size: 10px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Center Logo Badge */
.center-logo {
    position: absolute;
    top: 50%;
    right: -60px;
    transform: translateY(-50%);
    z-index: 100;
}

.center-logo-inner {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(200, 200, 210, 0.95) 0%, rgba(150, 150, 160, 0.9) 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 0 40px rgba(139, 92, 246, 0.4),
        0 0 80px rgba(139, 92, 246, 0.2),
        inset 0 2px 20px rgba(255, 255, 255, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.center-logo-img {
    width: 50px;
    height: auto;
    margin-bottom: 4px;
    filter: brightness(0) invert(0.2);
}

.center-logo-text {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    letter-spacing: -0.02em;
}

.highlight-ai {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Right Sidebar */
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-block {
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Tooling Block - Purple theme like main blocks */
.tooling-block {
    background: rgba(30, 30, 50, 0.6);
    border: 2px solid rgba(139, 92, 246, 0.4);
}

/* Models Block - Pink themed */
.models-block {
    background: rgba(219, 39, 119, 0.15);
    border: 2px solid rgba(219, 39, 119, 0.4);
}

.sidebar-block-header {
    background: rgba(139, 92, 246, 0.2);
    padding: 8px 16px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
}

.models-block .sidebar-block-header {
    background: rgba(219, 39, 119, 0.2);
    border-bottom: 1px solid rgba(219, 39, 119, 0.3);
}

.sidebar-block-header h2 {
    font-size: 12px;
    color: #e9d5ff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    margin: 0;
}

.models-block .sidebar-block-header h2 {
    color: #fce7f3;
}

/* Sidebar content area */

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}

.sidebar-sublabel {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 600;
    padding-bottom: 4px;
    margin-bottom: 4px;
}

/* Tooling block sublabels - purple theme */
.tooling-block .sidebar-sublabel {
    color: #e9d5ff;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

/* Models block sublabels - pink theme */
.models-block .sidebar-sublabel {
    color: #fce7f3;
    border-bottom: 1px solid rgba(219, 39, 119, 0.2);
}

.grid-2-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

/* Stack Items (Pills/Boxes) - General */
.stack-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 8px 6px;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease, margin 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    word-break: break-word;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
    gap: 6px;
}

/* Stack items with logos - keep center aligned */
.stack-item:has(.brand-logo) {
    justify-content: center;
    text-align: center;
    padding: 8px 6px;
    flex-direction: column;
    gap: 3px;
}

.brand-logo {
    height: 14px;
    width: auto;
    max-width: 60px;
    flex-shrink: 0;
    object-fit: contain;
    transition: opacity 0.2s ease, filter 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    opacity: 0.95;
}

/* Tesco logo specific sizing - very wide logo needs constraint */
.brand-logo[alt="Tesco"] {
    height: 12px;
    max-width: 50px;
}

/* WPP logo specific sizing */
.brand-logo[alt="WPP"] {
    height: 14px;
    max-width: 40px;
}

/* SVG logo styling */
.brand-logo[src$=".svg"] {
    width: auto;
}

/* Dark mode logo styling - logos may have white/light backgrounds, make them stand out */
.brand-logo {
    filter: brightness(1.05) contrast(1.05) saturate(1.1);
}

/* Light mode logo styling - add background for visibility */
[data-theme="light"] .brand-logo {
    opacity: 0.95;
    filter: brightness(0.7) contrast(1.2) saturate(1.15);
    background: rgba(255, 255, 255, 0.95);
    padding: 3px 5px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Hover states for logos */
.stack-item:hover .brand-logo {
    opacity: 1;
    filter: brightness(1.1) contrast(1.1) saturate(1.15);
}

[data-theme="light"] .stack-item:hover .brand-logo {
    opacity: 1;
    filter: brightness(0.65) contrast(1.25) saturate(1.2);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.stack-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
    z-index: 5;
}

/* Tool Items */
.tool-item {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #a7f3d0;
}

/* Model Items - Pink theme */
.model-item {
    background: rgba(219, 39, 119, 0.2);
    border-color: rgba(219, 39, 119, 0.4);
    color: #fce7f3;
}

/* Flex Row Layout */
.flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.flex-row .stack-item {
    flex: 1;
    min-width: 90px;
}

/* Grid Layouts */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.grid-8 {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
}

.full-width {
    grid-column: 1 / -1;
    width: 100%;
}

/* Agent Items - Purple theme */
.agent-green {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
    color: #e9d5ff;
    font-size: 9px;
    padding: 6px 4px;
}

/* Service Layer Items - Blue theme */
.access-layer .stack-item,
.integration-layer .stack-item {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #bfdbfe;
}

/* Connect Layer Highlights */
.highlight-yellow {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #bfdbfe;
}

.highlight-tan {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* Data Layer Styles */
.data-layer {
    padding: 0;
    background: transparent;
    border: none;
}

.data-split {
    display: flex;
    gap: 16px;
    width: 100%;
}

.data-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.column-header-pill {
    padding: 6px 12px;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.structured-pill {
    background: rgba(6, 182, 212, 0.2);
    color: #67e8f9;
    border: 1px solid rgba(6, 182, 212, 0.4);
}

.unstructured-pill {
    background: rgba(168, 85, 247, 0.2);
    color: #c4b5fd;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

/* Structured data items - cyan */
.data-column.structured .stack-item {
    background: rgba(6, 182, 212, 0.12);
    border-color: rgba(6, 182, 212, 0.25);
    color: #a5f3fc;
}

.data-column.structured .stack-item:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: rgba(6, 182, 212, 0.4);
}

/* Unstructured data items - purple */
.data-column.unstructured .stack-item {
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(168, 85, 247, 0.25);
    color: #d8b4fe;
}

.data-column.unstructured .stack-item:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.4);
}

.grid-4-small {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.data-cyan {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.3);
    color: #a5f3fc;
    font-size: 9px;
    padding: 5px 3px;
}

/* Cloud Platforms */
.cloud-platforms {
    display: flex;
    gap: 8px;
    flex-direction: row !important;
}

.cloud-item {
    flex: 1;
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    color: #e9d5ff;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Footer */
.footer {
    text-align: center;
    padding: 16px 0;
    color: var(--text-tertiary);
    font-size: var(--text-xs);
    border-top: 1px solid var(--glass-border);
    margin-top: 20px;
}

/* ========================================
   THEME TOGGLE BUTTON
   ======================================== */

.roadmap-controls {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Add Agent button (plus) in Agent Orchestration header */
.block-header {
    position: relative;
}

.add-agent-plus {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.add-agent-plus:hover {
    transform: translateY(-50%) scale(1.05);
    background: rgba(139, 92, 246, 0.18);
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 0 10px 26px rgba(139, 92, 246, 0.18);
}

.add-agent-plus:active {
    transform: translateY(-50%) scale(0.98);
}

.add-agent-plus:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.35), 0 10px 26px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .add-agent-plus {
    color: #111827;
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.18);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .add-agent-plus:hover {
    background: rgba(99, 102, 241, 0.10);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.14);
}

.roadmap-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.roadmap-toggle-input {
    position: relative;
    width: 44px;
    height: 24px;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.roadmap-toggle-input::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.roadmap-toggle-input:checked {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.5);
}

.roadmap-toggle-input:checked::before {
    left: 22px;
    background: #22c55e;
}

.roadmap-toggle-text {
    font-weight: 500;
}

/* Phase Timeline Section */
.phase-timeline-section {
    margin-top: 0;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 6px 6px;
}

.phase-timeline-header {
    margin-bottom: 12px;
}

.phase-timeline-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.phase-timeline {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    padding-top: 8px;
    padding-bottom: 8px;
    margin-top: -8px;
    margin-bottom: -8px;
}

.phase-timeline::-webkit-scrollbar {
    height: 4px;
}

.phase-timeline::-webkit-scrollbar-track {
    background: transparent;
}

.phase-timeline::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.phase-timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1 1 0;
    min-width: 0;
    width: 0;
    text-align: center;
    box-sizing: border-box;
}

.phase-timeline-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.phase-timeline-item.selected {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

.phase-number {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3px;
    white-space: nowrap;
}

.phase-title {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    hyphens: auto;
}

.phase-timeline-item.selected .phase-number {
    color: #c4b5fd;
}

.phase-timeline-item.selected .phase-title {
    color: rgba(255, 255, 255, 0.9);
}

.phase-timeline-separator {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
    padding: 0 2px;
    user-select: none;
    flex-shrink: 0;
}

/* Modern Theme Toggle - Sun/Moon Pill */
.theme-toggle {
    position: relative;
    width: 56px;
    height: 28px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    padding: 3px;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 8px rgba(253, 160, 133, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* Stars decoration for dark mode */
.theme-toggle::after {
    content: '✦';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8px;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    opacity: 1;
}

.theme-toggle:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(139, 92, 246, 0.2);
}

.theme-toggle:hover::before {
    box-shadow: 
        0 2px 12px rgba(253, 160, 133, 0.7),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.theme-icon {
    display: none;
}

/* ========================================
   ROADMAP STATUS STYLING
   ======================================== */

/* Status-based block coloring */
.stack-item.status-green {
    background: rgba(34, 197, 94, 0.2) !important;
    border-color: rgba(34, 197, 94, 0.4) !important;
    color: #86efac !important;
}

.stack-item.status-yellow {
    background: rgba(234, 179, 8, 0.2) !important;
    border-color: rgba(234, 179, 8, 0.4) !important;
    color: #fde047 !important;
}

.stack-item.status-red {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #fca5a5 !important;
}

/* Phase highlighting */
.stack-item.phase-highlighted {
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.6), 0 4px 12px rgba(139, 92, 246, 0.2) !important;
    transform: scale(1.05);
    z-index: 10;
    position: relative;
    margin: 8px 4px !important;
    padding: 12px 10px !important;
}

/* Ensure grid container has enough space for scaled items */
.agents-layer .layer-content {
    padding: 8px 4px;
    margin: -8px -4px;
}

.stack-item.has-roadmap-status {
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Phase badge */
.phase-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.25);
    border: 1.5px solid rgba(139, 92, 246, 0.5);
    color: #c4b5fd;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
    z-index: 5;
    line-height: 1;
    white-space: nowrap;
}

/* Agent item with roadmap status */
.stack-item.has-roadmap-status {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 26px 8px 6px;
    position: relative;
    transition: all 0.3s ease;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Business Grouping Styles */
.business-grouped {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px;
    grid-template-columns: none !important;
    width: 100%;
}

.business-group-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.business-group-header {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 12px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 4px;
    margin-bottom: 4px;
    width: 100%;
    box-sizing: border-box;
}

.business-group-items {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    width: 100%;
}

/* Light mode status colors */
[data-theme="light"] .stack-item.status-green {
    background: rgba(34, 197, 94, 0.15) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
    color: #15803d !important;
}

[data-theme="light"] .stack-item.status-yellow {
    background: rgba(234, 179, 8, 0.15) !important;
    border-color: rgba(234, 179, 8, 0.3) !important;
    color: #a16207 !important;
}

[data-theme="light"] .stack-item.status-red {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #dc2626 !important;
}

[data-theme="light"] .stack-item.phase-highlighted {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5), 0 4px 12px rgba(99, 102, 241, 0.15) !important;
}

[data-theme="light"] .phase-badge {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
    color: #6366f1;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .roadmap-toggle-label {
    color: var(--text-primary);
}

[data-theme="light"] .roadmap-toggle-input {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .roadmap-toggle-input:checked {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
}

[data-theme="light"] .phase-timeline-section {
    background: rgba(255, 255, 255, 0.4);
    border-top-color: rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .phase-timeline-item {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .phase-timeline-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.25);
}

[data-theme="light"] .phase-timeline-item.selected {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .phase-number {
    color: var(--text-primary);
}

[data-theme="light"] .phase-title {
    color: var(--text-secondary);
}

[data-theme="light"] .phase-timeline-item.selected .phase-number {
    color: #6366f1;
}

[data-theme="light"] .phase-timeline-item.selected .phase-title {
    color: var(--text-primary);
}

[data-theme="light"] .phase-timeline-separator {
    color: rgba(99, 102, 241, 0.4);
}

[data-theme="light"] .phase-timeline-label {
    color: var(--text-secondary);
    font-weight: 600;
}

[data-theme="light"] .business-group-header {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.25);
    color: var(--text-primary);
}

/* ========================================
   LIGHT MODE STYLES
   ======================================== */

[data-theme="light"] .sticky-header {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .sticky-header-content::after {
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.25), transparent);
}

[data-theme="light"] .sticky-title {
    color: var(--text-primary);
}

/* Light mode theme toggle */
[data-theme="light"] .theme-toggle {
    background: linear-gradient(135deg, #87CEEB 0%, #E0F4FF 100%);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.5),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .theme-toggle::before {
    left: calc(100% - 23px);
    background: linear-gradient(135deg, #c7d2fe 0%, #818cf8 100%);
    box-shadow: 
        0 2px 8px rgba(129, 140, 248, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .theme-toggle::after {
    content: '☀';
    left: 8px;
    right: auto;
    font-size: 10px;
    color: rgba(251, 191, 36, 0.9);
    opacity: 1;
}

[data-theme="light"] .theme-toggle:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.5),
        0 2px 8px rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .theme-toggle:hover::before {
    box-shadow: 
        0 2px 12px rgba(129, 140, 248, 0.7),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .roadmap-block {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .block-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-bottom-color: rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .block-title {
    color: #4f46e5;
    font-weight: 700;
}

[data-theme="light"] .block-description {
    color: rgba(79, 70, 229, 0.65);
    font-weight: 500;
}

[data-theme="light"] .stack-layer {
    background: rgba(248, 250, 252, 0.8);
    border-color: rgba(99, 102, 241, 0.12);
}

[data-theme="light"] .layer-label {
    color: rgba(15, 23, 42, 0.7);
    font-weight: 600;
}

[data-theme="light"] .stack-item {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.15);
    color: var(--text-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .stack-item:hover {
    transform: translateY(-2px);
    background: #f8fafc;
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .access-layer .stack-item,
[data-theme="light"] .integration-layer .stack-item {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(37, 99, 235, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.3);
    color: #1e40af;
    font-weight: 600;
}

[data-theme="light"] .access-layer .stack-item:hover,
[data-theme="light"] .integration-layer .stack-item:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.15) 100%);
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    color: #1e3a8a;
}

[data-theme="light"] .highlight-yellow {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.1) 100%);
    border-color: rgba(59, 130, 246, 0.35);
    color: #1e3a8a;
    font-weight: 600;
}

[data-theme="light"] .highlight-yellow:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.22) 0%, rgba(37, 99, 235, 0.16) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.22);
    color: #1e3a8a;
}

[data-theme="light"] .highlight-tan {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, rgba(245, 158, 11, 0.08) 100%);
    border-color: rgba(251, 191, 36, 0.3);
    color: #92400e;
    font-weight: 600;
}

[data-theme="light"] .highlight-tan:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.15) 100%);
    border-color: rgba(251, 191, 36, 0.45);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.22);
    color: #78350f;
}

[data-theme="light"] .agent-green {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(124, 58, 237, 0.1) 100%);
    border-color: rgba(139, 92, 246, 0.35);
    color: #5b21b6;
    font-weight: 600;
}

[data-theme="light"] .agent-green:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.22) 0%, rgba(124, 58, 237, 0.16) 100%);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.22);
    color: #4c1d95;
}

[data-theme="light"] .tool-item {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.35);
    color: #065f46;
    font-weight: 600;
}

[data-theme="light"] .tool-item:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.16) 100%);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.22);
    color: #064e3b;
}

[data-theme="light"] .model-item {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(219, 39, 119, 0.1) 100%);
    border-color: rgba(236, 72, 153, 0.35);
    color: #831843;
    font-weight: 600;
}

[data-theme="light"] .model-item:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.22) 0%, rgba(219, 39, 119, 0.16) 100%);
    border-color: rgba(236, 72, 153, 0.5);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.22);
    color: #701a75;
}

[data-theme="light"] .data-cyan {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(2, 132, 199, 0.1) 100%);
    border-color: rgba(14, 165, 233, 0.35);
    color: #0c4a6e;
    font-weight: 600;
}

[data-theme="light"] .data-cyan:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.22) 0%, rgba(2, 132, 199, 0.16) 100%);
    border-color: rgba(14, 165, 233, 0.5);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.22);
    color: #075985;
}

[data-theme="light"] .column-header-pill.structured-pill {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(2, 132, 199, 0.15) 100%);
    border-color: rgba(14, 165, 233, 0.4);
    color: #075985;
    font-weight: 700;
}

[data-theme="light"] .column-header-pill.unstructured-pill {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-color: rgba(168, 85, 247, 0.4);
    color: #6b21a8;
    font-weight: 700;
}

[data-theme="light"] .column-header-pill.structured-pill:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.28) 0%, rgba(2, 132, 199, 0.2) 100%);
    border-color: rgba(14, 165, 233, 0.55);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
}

[data-theme="light"] .column-header-pill.unstructured-pill:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.28) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-color: rgba(168, 85, 247, 0.55);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.2);
}

/* Light mode data items */
[data-theme="light"] .data-column.structured .stack-item {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.25);
    color: #0369a1;
}

[data-theme="light"] .data-column.structured .stack-item:hover {
    background: rgba(14, 165, 233, 0.18);
    border-color: rgba(14, 165, 233, 0.4);
}

[data-theme="light"] .data-column.unstructured .stack-item {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.25);
    color: #7c3aed;
}

[data-theme="light"] .data-column.unstructured .stack-item:hover {
    background: rgba(168, 85, 247, 0.18);
    border-color: rgba(168, 85, 247, 0.4);
}

[data-theme="light"] .cloud-item {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(79, 70, 229, 0.1) 100%);
    border-color: rgba(99, 102, 241, 0.35);
    color: #4338ca;
    font-weight: 700;
}

[data-theme="light"] .cloud-item:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(79, 70, 229, 0.16) 100%);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.22);
    color: #3730a3;
}

[data-theme="light"] .sidebar-block {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .tooling-block {
    border-color: rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, #ffffff 100%);
}

[data-theme="light"] .models-block {
    background: linear-gradient(135deg, rgba(253, 244, 255, 0.6) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-color: rgba(236, 72, 153, 0.3);
}

[data-theme="light"] .sidebar-block-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-bottom-color: rgba(99, 102, 241, 0.25);
}

[data-theme="light"] .models-block .sidebar-block-header {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(219, 39, 119, 0.1) 100%);
    border-bottom-color: rgba(236, 72, 153, 0.25);
}

[data-theme="light"] .sidebar-block-header h2 {
    color: #4f46e5;
    font-weight: 700;
}

[data-theme="light"] .models-block .sidebar-block-header h2 {
    color: #be185d;
    font-weight: 700;
}

[data-theme="light"] .tooling-block .sidebar-sublabel {
    color: #6366f1;
    border-bottom-color: rgba(99, 102, 241, 0.2);
    font-weight: 700;
}

[data-theme="light"] .models-block .sidebar-sublabel {
    color: #db2777;
    border-bottom-color: rgba(236, 72, 153, 0.2);
    font-weight: 700;
}

[data-theme="light"] .footer {
    border-top-color: rgba(99, 102, 241, 0.15);
    color: rgba(15, 23, 42, 0.6);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1400px) {
    .grid-8, .business-group-items {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .center-logo {
        display: none;
    }
}

@media (max-width: 1200px) {
    .grid-8, .business-group-items {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .roadmap-grid {
        grid-template-columns: 1fr 240px;
    }
}

@media (max-width: 1024px) {
    .roadmap-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-right {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .sidebar-right > * {
        flex: 1 1 calc(50% - 8px);
        min-width: 280px;
    }
    
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-4-small {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-8, .business-group-items {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    /* ===== MOBILE HEADER - Clean layout ===== */
    .sticky-header {
        padding: 12px 0 !important;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    
    .sticky-header-content {
        display: flex !important;
        flex-wrap: wrap !important;
        padding: 0 16px !important;
        gap: 10px !important;
        align-items: center !important;
    }
    
    /* Logo */
    .sticky-logo {
        height: 32px !important;
        width: 80px !important;
        flex-shrink: 0 !important;
    }
    
    /* Hide title completely on mobile */
    .sticky-title {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    .sticky-title::before {
        display: none !important;
    }
    
    .theme-toggle {
        width: 48px;
        height: 26px;
        padding: 3px;
        flex-shrink: 0;
        margin-left: auto;
    }
    
    .theme-toggle::before {
        width: 18px;
        height: 18px;
        top: 3px;
        left: 3px;
    }
    
    .theme-toggle::after {
        font-size: 8px;
        right: 8px;
    }
    
    [data-theme="light"] .theme-toggle::before {
        left: calc(100% - 21px);
    }
    
    [data-theme="light"] .theme-toggle::after {
        left: 6px;
        font-size: 9px;
    }
    
    /* Second row: Controls - full width */
    .roadmap-controls {
        flex-basis: 100%;
        order: 10;
        display: flex;
        justify-content: center;
        gap: 12px;
        padding-top: 10px;
        margin-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    [data-theme="light"] .roadmap-controls {
        border-top-color: rgba(99, 102, 241, 0.12);
    }
    
    .roadmap-toggle-label {
        font-size: 12px;
        padding: 8px 16px;
        border-radius: 20px;
        gap: 8px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    [data-theme="light"] .roadmap-toggle-label {
        background: rgba(99, 102, 241, 0.06);
        border-color: rgba(99, 102, 241, 0.15);
    }
    
    .roadmap-toggle-input {
        width: 38px;
        height: 20px;
    }
    
    .roadmap-toggle-input::before {
        width: 14px;
        height: 14px;
    }
    
    .roadmap-toggle-input:checked::before {
        left: 20px;
    }
    
    .roadmap-toggle-text {
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.3px;
    }
    
    /* ===== MOBILE LAYOUT - Single column stacked ===== */
    .container {
        padding: 12px !important;
        max-width: 100% !important;
        overflow-x: hidden;
    }
    
    .roadmap-grid {
        display: block !important;
        width: 100% !important;
    }
    
    .main-column {
        display: block !important;
        width: 100% !important;
        float: none !important;
    }
    
    .sidebar-right {
        display: block !important;
        width: 100% !important;
        float: none !important;
        margin-top: 16px;
    }
    
    .sidebar-right > * {
        margin-bottom: 16px;
    }
    
    /* Block styling - Beautiful cards */
    .roadmap-block {
        margin-bottom: 16px;
        border-radius: 10px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    }
    
    .block-header {
        padding: 12px 14px;
        border-radius: 10px 10px 0 0;
    }
    
    .block-title {
        font-size: 15px;
        font-weight: 700;
        letter-spacing: -0.2px;
    }
    
    .block-description {
        font-size: 11px;
        margin-top: 4px;
        line-height: 1.3;
    }
    
    .block-content {
        padding: 12px;
    }
    
    /* Grid adjustments - 3 columns for iPhone */
    .grid-8,
    .grid-4,
    .grid-4-small,
    .business-group-items,
    .tool-list,
    .model-list {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    
    .grid-2-sidebar {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    /* Stack items - Perfect sizing for 3-column grid */
    .stack-item {
        padding: 8px 4px;
        font-size: 9px;
        min-height: 50px;
        height: auto;
        min-width: 0;
        border-radius: 6px;
        font-weight: 500;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.25;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        writing-mode: horizontal-tb;
        -webkit-writing-mode: horizontal-tb;
    }
    
    /* Logo items - consistent sizing */
    .stack-item:has(.brand-logo) {
        flex-direction: column;
        gap: 2px;
        padding: 6px 4px;
        min-height: 50px;
    }
    
    .brand-logo {
        height: 12px !important;
        max-width: 45px !important;
        flex-shrink: 0;
    }
    
    .brand-logo[alt="Tesco"] {
        height: 10px !important;
        max-width: 40px !important;
    }
    
    .brand-logo[alt="WPP"] {
        height: 12px !important;
        max-width: 35px !important;
    }
    
    /* Ensure sidebar items also use 3 columns */
    .sidebar-block .tool-list,
    .sidebar-block .model-list {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .stack-item.has-roadmap-status {
        padding: 12px 28px 12px 8px;
    }
    
    .phase-badge {
        width: 18px;
        height: 18px;
        font-size: 10px;
        top: 4px;
        right: 4px;
    }
    
    /* Layer labels */
    .layer-label {
        font-size: 13px;
        padding: 10px 14px;
        margin-bottom: 12px;
        border-radius: 8px;
        font-weight: 600;
    }
    
    /* Data split */
    .data-split {
        flex-direction: column;
        gap: 20px;
    }
    
    .data-column {
        width: 100%;
    }
    
    .column-header-pill {
        font-size: 12px;
        padding: 10px 14px;
        margin-bottom: 12px;
        border-radius: 8px;
        font-weight: 600;
    }
    
    /* Phase timeline - Horizontal scroll on mobile */
    .phase-timeline-section {
        padding: 12px !important;
        margin-top: 12px;
        border-radius: 0 0 10px 10px;
        overflow: hidden;
    }
    
    .phase-timeline-header {
        margin-bottom: 10px;
    }
    
    .phase-timeline-label {
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.5px;
    }
    
    .phase-timeline {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        padding: 4px 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
    }
    
    .phase-timeline::-webkit-scrollbar {
        display: none;
    }
    
    .phase-timeline-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px 12px !important;
        min-width: 100px !important;
        max-width: 120px !important;
        flex-shrink: 0 !important;
        border-radius: 8px;
        scroll-snap-align: start;
        writing-mode: horizontal-tb !important;
    }
    
    .phase-number {
        font-size: 11px !important;
        margin-bottom: 4px;
        font-weight: 700;
        white-space: nowrap !important;
    }
    
    .phase-title {
        font-size: 8px !important;
        line-height: 1.2 !important;
        text-align: center !important;
        white-space: normal !important;
        word-break: normal !important;
        hyphens: none !important;
        writing-mode: horizontal-tb !important;
    }
    
    .phase-timeline-separator {
        font-size: 14px !important;
        padding: 0 2px !important;
        flex-shrink: 0 !important;
        align-self: center;
        color: rgba(255, 255, 255, 0.3);
    }
    
    /* Business grouping - full width sections, 3-column agents */
    .business-grouped {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        gap: 20px !important;
        width: 100% !important;
    }
    
    .business-group-section {
        display: flex !important;
        flex-direction: column !important;
        margin-bottom: 0;
        width: 100% !important;
        gap: 10px;
    }
    
    .business-group-header {
        font-size: 12px;
        padding: 10px 14px;
        margin-bottom: 0;
        border-radius: 8px;
        font-weight: 700;
        letter-spacing: 0.5px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .business-group-items {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
    }
    
    .business-group-items .stack-item {
        min-height: 50px;
        min-width: 0;
        width: 100%;
        padding: 8px 6px;
        font-size: 9px;
        line-height: 1.25;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        writing-mode: horizontal-tb !important;
        -webkit-writing-mode: horizontal-tb !important;
        box-sizing: border-box;
        text-align: center;
    }
    
    .business-group-items .stack-item.has-roadmap-status {
        padding: 8px 26px 8px 6px;
    }
    
    /* Cloud platforms */
    .cloud-platforms {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .cloud-item {
        flex-basis: calc(50% - 6px);
        padding: 14px;
        font-size: 13px;
        border-radius: 10px;
        font-weight: 600;
    }
    
    /* Flex row adjustments */
    .flex-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    /* Sidebar sections */
    .sidebar-section {
        margin-bottom: 20px;
    }
    
    .sidebar-sublabel {
        font-size: 12px;
        padding: 10px 14px;
        margin-bottom: 12px;
        border-radius: 8px;
        font-weight: 600;
    }
    
    /* Brand logos */
    .brand-logo {
        height: 14px !important;
        max-width: 50px !important;
    }
    
    .logo-item {
        padding: 8px 6px;
    }
    
    /* Highlighted items spacing */
    .stack-item.phase-highlighted {
        margin: 4px 2px !important;
        padding: 10px 8px !important;
        border-radius: 8px;
    }
    
    /* Touch optimizations */
    .stack-item,
    .phase-timeline-item,
    .cloud-item {
        -webkit-tap-highlight-color: rgba(139, 92, 246, 0.2);
    }
    
    /* Light mode controls border */
    [data-theme="light"] .roadmap-controls {
        border-top-color: rgba(99, 102, 241, 0.15);
    }
    
    /* Safe area for iPhone notch */
    @supports (padding: max(0px)) {
        .container {
            padding-left: max(12px, env(safe-area-inset-left));
            padding-right: max(12px, env(safe-area-inset-right));
        }
        
        .sticky-header-content {
            padding-left: max(12px, env(safe-area-inset-left));
            padding-right: max(12px, env(safe-area-inset-right));
        }
    }
}

@media (max-width: 480px) {
    /* iPhone SE and smaller - Optimized 3 columns */
    .sticky-header {
        padding: 8px 0;
    }
    
    .sticky-header-content {
        padding: 0 10px;
        gap: 6px;
    }
    
    .sticky-logo {
        height: 26px;
        width: 65px;
    }
    
    .sticky-title {
        display: none;
    }
    
    .container {
        padding: 12px 10px;
    }
    
    .roadmap-grid {
        gap: 14px;
    }
    
    .roadmap-block {
        margin-bottom: 14px;
        border-radius: 8px;
    }
    
    .block-header {
        padding: 10px 12px;
        border-radius: 8px 8px 0 0;
    }
    
    .block-title {
        font-size: 14px;
    }
    
    .block-description {
        font-size: 10px;
        display: none;
    }
    
    .block-content {
        padding: 10px;
    }
    
    /* 3 columns with tighter spacing */
    .grid-8, .grid-4, .grid-4-small, .business-group-items {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px;
    }
    
    .stack-item {
        font-size: 8px;
        padding: 6px 3px;
        min-height: 44px;
        border-radius: 5px;
        line-height: 1.2;
        hyphens: auto;
        -webkit-hyphens: auto;
    }
    
    .stack-item.has-roadmap-status {
        padding: 6px 20px 6px 3px;
    }
    
    .phase-badge {
        width: 12px;
        height: 12px;
        font-size: 7px;
        top: 2px;
        right: 2px;
    }
    
    .layer-label {
        font-size: 11px;
        padding: 8px 10px;
        margin-bottom: 8px;
    }
    
    .column-header-pill {
        font-size: 10px;
        padding: 8px 10px;
        margin-bottom: 8px;
    }
    
    .phase-timeline-section {
        padding: 10px !important;
    }
    
    .phase-timeline-item {
        min-width: 80px !important;
        max-width: 100px !important;
        padding: 8px !important;
    }
    
    .phase-number {
        font-size: 10px !important;
    }
    
    .phase-title {
        font-size: 7px !important;
        display: none; /* Hide title on very small screens, just show phase number */
    }
    
    .cloud-platforms {
        gap: 8px;
    }
    
    .cloud-item {
        flex-basis: calc(50% - 4px);
        padding: 10px;
        font-size: 11px;
    }
    
    .roadmap-controls {
        gap: 4px;
    }
    
    .roadmap-toggle-label {
        padding: 5px 8px;
        font-size: 10px;
        gap: 3px;
    }
    
    .roadmap-toggle-input {
        width: 32px;
        height: 18px;
    }
    
    .roadmap-toggle-input::before {
        width: 12px;
        height: 12px;
    }
    
    .roadmap-toggle-input:checked::before {
        left: 16px;
    }
    
    .roadmap-toggle-text {
        font-size: 10px;
    }
    
    .theme-toggle {
        width: 42px;
        height: 22px;
        padding: 2px;
    }
    
    .theme-toggle::before {
        width: 16px;
        height: 16px;
        top: 2px;
        left: 2px;
    }
    
    .theme-toggle::after {
        font-size: 6px;
        right: 7px;
    }
    
    [data-theme="light"] .theme-toggle::before {
        left: calc(100% - 18px);
    }
    
    [data-theme="light"] .theme-toggle::after {
        left: 5px;
        font-size: 7px;
    }
    
    /* Brand logos smaller */
    .brand-logo {
        height: 10px !important;
        max-width: 38px !important;
    }
    
    .brand-logo[alt="Tesco"] {
        height: 8px !important;
        max-width: 32px !important;
    }
    
    .brand-logo[alt="WPP"] {
        height: 10px !important;
        max-width: 28px !important;
    }
    
    /* Logo items consistent sizing */
    .stack-item:has(.brand-logo) {
        min-height: 44px;
        padding: 5px 3px;
        gap: 2px;
    }
    
    /* Business grouping */
    /* Business grouping - smaller screens */
    .business-grouped {
        gap: 16px !important;
    }
    
    .business-group-header {
        font-size: 10px;
        padding: 8px 12px;
        margin-bottom: 0;
    }
    
    .business-group-section {
        gap: 8px;
    }
    
    .business-group-items {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px !important;
        width: 100% !important;
    }
    
    .business-group-items .stack-item {
        min-height: 44px;
        min-width: 0;
        width: 100%;
        padding: 6px 4px;
        font-size: 8px;
        line-height: 1.2;
        word-break: break-word;
        overflow-wrap: break-word;
        writing-mode: horizontal-tb !important;
        -webkit-writing-mode: horizontal-tb !important;
        box-sizing: border-box;
        text-align: center;
    }
    
    .business-group-items .stack-item.has-roadmap-status {
        padding: 6px 20px 6px 4px;
    }
    
    /* Sidebar blocks */
    .sidebar-block {
        padding: 10px;
        border-radius: 8px;
    }
    
    .sidebar-block-header {
        padding: 8px 10px;
    }
    
    .sidebar-block-header h2 {
        font-size: 13px;
    }
    
    .sidebar-sublabel {
        font-size: 10px;
        padding: 6px 10px;
        margin-bottom: 8px;
    }
    
    .sidebar-section {
        margin-bottom: 12px;
    }
    
    /* Footer */
    .footer {
        padding: 8px;
        font-size: 9px;
    }
}
