/* --- LLM ON PREMISE THEME (Design Tokens) --- */
.llm-onpremise-section {
    /* Brand Colors */
    --onprem-green: #39FF14;
    --onprem-green-dim: rgba(57, 255, 20, 0.15);
    --onprem-green-glow: rgba(57, 255, 20, 0.5);
    --onprem-orange: #FF6B35;
    --onprem-cyan: #00FFFF;
    --onprem-amber: gold;
    --onprem-text-dim: #aaa;
    --onprem-border: #444444;
    
    /* Surface Colors (Dark Mode System) */
    --op-surface-0: #050505;   /* Deepest background */
    --op-surface-1: #0f1115;   /* Standard card/section */
    --op-surface-2: #161b22;   /* Hover state / elevated */
    --op-border: #444444;      /* Rack metal border */
    --op-border-dim: #2a2a2a;
    
    /* Typography */
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --font-sans: 'Inter', system-ui, sans-serif;
    
    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
}

/* Global On-Premise Overrides */
.llm-onpremise-section body {
    background-color: var(--op-surface-0);
    color: #e0e0e0;
    font-family: var(--font-sans);
}

.llm-onpremise-section h1, 
.llm-onpremise-section h2, 
.llm-onpremise-section h3, 
.llm-onpremise-section .mono {
    font-family: var(--font-mono);
}

/* LLMOnPremise Header with Server Core Logo */
.onprem-header {
    border-bottom: 1px solid var(--op-border);
    padding: 1.2rem 0;
    margin-bottom: var(--space-lg);
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.onprem-logo-block {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.onprem-logo-text {
    display: flex;
    flex-direction: column;
}

.onprem-logo-main {
    font-size: 1.3rem;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    letter-spacing: -1px;
}

.onprem-logo-main .accent-llm {
    color: var(--onprem-green);
}

.onprem-logo-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Server Rack Pattern Background */
.onprem-hero {
    background: 
        linear-gradient(90deg, var(--op-border-dim) 1px, transparent 1px),
        linear-gradient(180deg, var(--op-border-dim) 1px, transparent 1px);
    background-color: var(--op-surface-0);
    background-size: 40px 40px;
    border: 1px solid var(--op-border);
    border-radius: 8px;
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    position: relative;
    overflow: hidden;
}

.onprem-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        var(--onprem-green) 0%, 
        transparent 50%, 
        var(--onprem-green) 100%);
    animation: server-pulse 3s infinite;
}

@keyframes server-pulse {
    0%, 100% { opacity: 0.3; width: 80%; margin-left: 10%; }
    50% { opacity: 1; width: 100%; margin-left: 0; }
}

.onprem-hero.small {
    padding: var(--space-md) var(--space-lg);
    background-size: 20px 20px;
}

.onprem-hero h1 {
    font-size: 2.2rem;
    margin-bottom: var(--space-md);
    color: #fff;
    letter-spacing: -1px;
}

.onprem-hero p {
    font-size: 1.1rem;
    color: #999;
    max-width: 700px;
    line-height: 1.6;
}

/* Hardware Status Cards */
.hardware-card {
    background: var(--op-surface-1);
    border: 1px solid var(--op-border);
    border-left: 3px solid var(--onprem-green);
    border-radius: 6px;
    padding: var(--space-md);
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.hardware-card:hover {
    background: var(--op-surface-2);
    border-left-width: 5px;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hardware-card h3 {
    margin-top: 0.5rem;
    font-size: 1.2rem;
}

.hardware-card h3 a {
    color: #fff;
    text-decoration: none;
}

.hardware-card p {
    color: #aaa;
    font-size: 0.95rem;
    flex-grow: 1;
}

.hardware-tag {
    align-self: flex-start;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    color: var(--onprem-green);
    background: var(--onprem-green-dim);
    border: 1px solid var(--onprem-green);
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.card-meta {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--op-border-dim);
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
}
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.08em;
}

.hardware-tag.tag-gpu {
    color: var(--onprem-orange);
    border-color: var(--onprem-orange);
    background: rgba(255, 107, 53, 0.15);
}

/* Server Specs Display */
.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.spec-item {
    background: var(--rack-metal);
    border: 1px solid var(--rack-border);
    border-radius: 6px;
    padding: 1.2rem;
    text-align: center;
}

.spec-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.spec-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--onprem-green);
    font-family: 'JetBrains Mono', monospace;
}

.spec-unit {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-left: 0.3rem;
}

/* Navigation Pills - OnPrem Style */
.onprem-nav-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.onprem-nav-pills a {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--rack-border);
    background: var(--rack-metal);
    transition: all 0.2s;
}

.onprem-nav-pills a:hover,
.onprem-nav-pills a.active {
    color: var(--onprem-green);
    border-color: var(--onprem-green);
    background: var(--onprem-green-dim);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.2);
}

/* Hexagon Badge (from logo concept) */
.hexagon-badge {
    width: 50px;
    height: 50px;
    position: relative;
    display: inline-block;
}

.hexagon-badge svg {
    width: 100%;
    height: 100%;
}

/* Infrastructure Grid */
.infra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Cross-link to AI-Radar */
.cross-link-banner {
    background: linear-gradient(135deg, var(--bg-card), var(--rack-metal));
    border: 1px solid var(--border-dim);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 3rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cross-link-banner .icon {
    font-size: 2rem;
}

.cross-link-banner a {
    color: var(--neon-cyan);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.cross-link-banner a:hover {
    border-bottom-color: var(--neon-cyan);
}

/* Responsive */
/* --- RESPONSIVE DESIGN FOR LLMONPREMISE --- */

/* Tablet Portrait / Small Desktop (below 900px) */
@media (max-width: 900px) {
    .onprem-hero {
        padding: 1.5rem;
    }
    
    .onprem-hero h1 {
        font-size: 1.6rem;
    }
    
    .spec-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .infra-grid, .onprem-grid-3 {
        grid-template-columns: 1fr;
    }
    
    /* Decision tools cards */
    .decision-card, .tool-card {
        padding: 1.2rem;
    }
    
    /* Hardware matrix adjustments */
    .hardware-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Large (below 768px) */
@media (max-width: 768px) {
    /* Typography */
    .onprem-hero h1 {
        font-size: 1.4rem;
        line-height: 1.3;
    }
    
    .onprem-hero h2 {
        font-size: 1.2rem;
    }
    
    /* Header */
    .onprem-header {
        padding: 1rem 0;
    }
    
    .onprem-logo-main {
        font-size: 1.1rem;
    }
    
    .onprem-logo-sub {
        font-size: 0.7rem;
    }
    
    /* Hero section */
    .onprem-hero {
        padding: 1.2rem;
        background-size: 30px 30px; /* Smaller grid pattern */
    }
    
    /* Cards and containers */
    .terminal-card, .onprem-card {
        padding: 1rem;
        border-radius: 6px;
    }
    
    .spec-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    /* Navigation and buttons */
    .terminal-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
        display: inline-block;
        width: auto;
    }
    
    /* Ask mode */
    .ask-form textarea {
        min-height: 120px;
        font-size: 0.9rem;
    }
    
    .scenario-selector {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .scenario-selector button {
        width: 100%;
    }
    
    /* Hardware matrix tables */
    .comparison-table {
        font-size: 0.8rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem;
    }
    
    /* Checklists */
    .checklist-section {
        padding: 1rem;
    }
    
    .checklist-item {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    /* Tables - horizontal scroll */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Architecture cards */
    .architecture-card, .pattern-card {
        padding: 1rem;
    }
    
    /* Footer navigation sections */
    .related-tools, .decision-tools-nav {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* Mobile Small (below 480px) */
@media (max-width: 480px) {
    /* Typography further reduction */
    .onprem-hero h1 {
        font-size: 1.2rem;
        line-height: 1.3;
    }
    
    .onprem-hero h2 {
        font-size: 1.05rem;
    }
    
    .onprem-hero h3 {
        font-size: 0.95rem;
    }
    
    /* Hero section */
    .onprem-hero {
        padding: 1rem;
        background-size: 20px 20px; /* Even smaller grid */
    }
    
    /* Cards */
    .terminal-card, .onprem-card {
        padding: 0.75rem;
    }
    
    /* Buttons - stack vertically */
    .terminal-btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.5rem;
        text-align: center;
    }
    
    /* Logo adjustments */
    .onprem-logo-block {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    /* Hardware specs */
    .spec-item {
        font-size: 0.8rem;
    }
    
    /* Navigation menu */
    nav ul {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    nav ul li {
        width: 100%;
    }
    
    nav ul li a {
        display: block;
        padding: 0.5rem;
    }
    
    /* Ask interface */
    .ask-container {
        padding: 0.75rem;
    }
    
    .ask-response {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    /* Comparison tables */
    .comparison-table {
        font-size: 0.75rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.3rem;
    }
    
    /* Checklists */
    .checklist-item {
        font-size: 0.8rem;
        padding: 0.4rem;
    }
    
    /* Code blocks */
    pre, code {
        font-size: 0.75rem;
        overflow-x: auto;
    }
    
    /* Scenario cards */
    .scenario-card h3 {
        font-size: 1rem;
    }
    
    .scenario-card p {
        font-size: 0.85rem;
    }
}

/* Touch device optimizations for LLMOnPremise */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .terminal-btn, .onprem-btn, button {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    /* Checkbox labels */
    .checklist-item label {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 0.5rem;
    }
    
    /* Remove hover effects */
    .terminal-card:hover,
    .onprem-card.hover-glow:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Tap feedback */
    .terminal-btn:active,
    .onprem-card:active {
        opacity: 0.8;
    }
    
    /* Scenario selector buttons */
    .scenario-selector button {
        min-height: 50px;
        font-size: 0.9rem;
    }
}

/* Landscape phone optimization */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    .onprem-hero {
        padding: 1rem;
    }
    
    .onprem-hero h1 {
        font-size: 1.3rem;
    }
    
    /* Compact navigation */
    .onprem-header {
        position: static;
    }
}

/* --- Added for EPIC-LLM-M1 --- */

/* Generic Card */
.onprem-card {
    background: var(--bg-card);
    border: 1px solid var(--rack-border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
}

.onprem-card.hover-glow:hover {
    border-color: var(--onprem-green);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.1);
    transform: translateY(-2px);
}

.onprem-card.alpha-disabled {
    opacity: 0.5;
    background: rgba(42, 42, 42, 0.3);
    border-style: dashed;
}

/* Three column grid */
.onprem-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Utilities */
.infra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

/* Terminal Buttons */
.terminal-btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    margin-right: 1rem;
    border-radius: 4px;
    transition: all 0.2s;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.terminal-btn.primary {
    background: var(--onprem-green);
    color: #000;
    border: 1px solid var(--onprem-green);
}

.terminal-btn.primary:hover {
    box-shadow: 0 0 15px var(--onprem-green);
    background: #5eff3d;
}

.terminal-btn.secondary {
    background: transparent;
    color: var(--onprem-green);
    border: 1px solid var(--onprem-green);
}

.terminal-btn.secondary:hover {
    background: rgba(57, 255, 20, 0.1);
}

/* Link Arrow */
.link-arrow {
    display: inline-block;
    margin-top: 1rem;
    color: var(--onprem-green);
    font-weight: bold;
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    border-bottom: 2px solid transparent;
}

.link-arrow:hover {
    border-bottom-color: var(--onprem-green);
}

/* Status Badge */
.status-badge {
    font-size: 0.7rem;
    background: #333;
    color: #999;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    margin-top: 1rem;
    display: inline-block;
}

