/* Core styles for cyber.boards.industrial-linguistics.com */

:root {
    --primary-color: #1a365d;
    --secondary-color: #2c5282;
    --accent-color: #3182ce;
    --background-light: #f7fafc;
    --text-color: #2d3748;
    --border-color: #e2e8f0;
    --success-color: #38a169;
    --warning-color: #d69e2e;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

/* Navigation */
nav {
    background-color: var(--primary-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

nav a:hover {
    opacity: 0.8;
}

nav a.active {
    border-bottom: 2px solid #fff;
    padding-bottom: 2px;
}

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Headers */
h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.75rem;
    color: var(--secondary-color);
    margin: 2rem 0 1rem 0;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.25rem;
    color: var(--text-color);
    margin: 1.5rem 0 0.75rem 0;
}

/* Academic intro box */
.intro-box {
    background-color: var(--background-light);
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.intro-box p {
    margin-bottom: 0.75rem;
}

.intro-box p:last-child {
    margin-bottom: 0;
}

/* Transparency notice */
.transparency-notice {
    background-color: #fffbeb;
    border: 1px solid var(--warning-color);
    border-radius: 4px;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

.transparency-notice h4 {
    color: #92400e;
    margin-bottom: 0.5rem;
}

/* Statistics cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--background-light);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-card .label {
    color: #718096;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--background-light);
    font-weight: 600;
    color: var(--primary-color);
}

tr:hover {
    background-color: #f8fafc;
}

table td.number,
table th.number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Charts */
.chart-container {
    margin: 2rem 0;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.chart-container img {
    max-width: 100%;
    height: auto;
}

/* D3 visualization containers */
#timeline-chart,
#company-chart,
#tag-chart {
    width: 100%;
    min-height: 400px;
    margin: 1rem 0;
}

/* Methodology steps */
.pipeline-step {
    display: flex;
    gap: 1.5rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--background-light);
    border-radius: 8px;
}

.pipeline-step .step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.pipeline-step .step-content h3 {
    margin-top: 0;
}

/* Code blocks */
pre, code {
    font-family: 'Consolas', 'Monaco', monospace;
    background-color: #1a202c;
    color: #e2e8f0;
    border-radius: 4px;
}

code {
    padding: 0.2rem 0.4rem;
    font-size: 0.9em;
}

pre {
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

pre code {
    padding: 0;
    background: none;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: #fff;
    padding: 2rem;
    margin-top: 4rem;
}

footer .content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

footer a {
    color: #bee3f8;
}

/* Responsive */
@media (max-width: 768px) {
    nav ul {
        flex-wrap: wrap;
        gap: 1rem;
    }

    main {
        padding: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .pipeline-step {
        flex-direction: column;
    }
}

/* Interactive elements */
.company-selector {
    margin: 1rem 0;
}

.company-selector select {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
}

/* Tooltip for d3 */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 1000;
}

/* Labels legend */
.labels-legend {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--background-light);
    border-radius: 4px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.legend-color.mentions-board { background: #3182ce; }
.legend-color.regulatory { background: #38a169; }
.legend-color.specificity { background: #d69e2e; }
