:root {
    /* Paramus Color Scheme */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;
    --accent: #8b5cf6;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-subtle: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    /* Carbon spacing */
    --spacing-03: 0.5rem;
    --spacing-05: 1rem;
    --spacing-06: 1.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-page);
}

.container {
    max-width: 1584px;
    margin: 0 auto;
    padding: 0 var(--spacing-05);
}

/* Header - Paramus Blue Gradient */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--spacing-05) 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header h1 {
    font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0;
}

.header-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--secondary);
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.header-link {
    color: var(--primary);
    background: white;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid white;
    border-radius: 4px;
    transition: all 0.2s;
}

.header-link:hover {
    background: var(--bg-subtle);
}

/* Content area */
.content {
    padding: var(--spacing-06) 0;
}

/* Stories Grid */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

/* Story Tile - Carbon style with Paramus colors */
.story-tile {
    display: block;
    background: var(--bg-card);
    padding: var(--spacing-05);
    min-height: 140px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.11s cubic-bezier(0.2, 0, 0.38, 0.9);
    position: relative;
    outline: none;
}

.story-tile:hover {
    background: var(--bg-subtle);
}

.story-tile:focus {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.story-tile::after {
    content: '';
    position: absolute;
    right: var(--spacing-05);
    top: var(--spacing-05);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='%232563eb'%3E%3Cpath d='M10 6v2h12.59L6 24.59 7.41 26 24 9.41V22h2V6H10z'/%3E%3C/svg%3E");
    background-size: contain;
    opacity: 0;
    transition: opacity 0.11s;
}

.story-tile:hover::after {
    opacity: 1;
}

/* Tag/Label */
.tile-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0 0.5rem;
    height: 1.25rem;
    line-height: 1.25rem;
    margin-bottom: var(--spacing-03);
}

.tile-tag.prediction { background: #dbeafe; color: #1d4ed8; }
.tile-tag.data { background: #d1fae5; color: #059669; }
.tile-tag.integrated { background: #fef3c7; color: #d97706; }
.tile-tag.chemistry { background: #fce7f3; color: #be185d; }
.tile-tag.advanced { background: #ede9fe; color: #7c3aed; }
.tile-tag.blueprint { background: #e0e7ff; color: #4f46e5; }

/* Tile Title */
.tile-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--spacing-03);
    line-height: 1.3;
}

/* Tile Description */
.tile-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--spacing-03);
}

/* Tile Metrics */
.tile-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: auto;
}

.tile-metric {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    padding: 0.125rem 0.375rem;
}

/* Section Navigation Tiles */
.nav-tile {
    display: block;
    background: var(--bg-card);
    padding: var(--spacing-06);
    text-decoration: none;
    color: inherit;
    border: 2px solid var(--border);
    border-radius: 4px;
    transition: all 0.2s;
    position: relative;
}

.nav-tile:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.nav-tile h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--spacing-03);
}

.nav-tile p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-03);
}

.nav-tile .nav-count {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Footer */
footer {
    padding: var(--spacing-06) 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
}
