:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --people-color: #10b981;
    --planet-color: #059669;
    --profit-color: #f59e0b;
    --background: #f9fafb;
    --surface: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    padding: 3rem 0;
}

section {
    background: var(--surface);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.pillar {
    padding: 1.5rem;
    border-radius: 8px;
    background: var(--background);
    border-left: 4px solid var(--primary-color);
}

.pillar:nth-child(1) {
    border-left-color: var(--people-color);
}

.pillar:nth-child(2) {
    border-left-color: var(--planet-color);
}

.pillar:nth-child(3) {
    border-left-color: var(--profit-color);
}

.pillar h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.pillar p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.table-header h2 {
    margin-bottom: 0;
}

.last-updated {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.table-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

#search {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

#sort {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--background);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

tr:hover {
    background: var(--background);
}

.rank-col {
    width: 60px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
}

.company-col {
    min-width: 200px;
}

.company-col strong {
    display: block;
    margin-bottom: 0.25rem;
}

.sector {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.score-col {
    width: 100px;
    text-align: center;
}

.score {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    background: var(--background);
}

.score-col.people .score {
    background: rgba(16, 185, 129, 0.1);
    color: var(--people-color);
}

.score-col.planet .score {
    background: rgba(5, 150, 105, 0.1);
    color: var(--planet-color);
}

.score-col.profit .score {
    background: rgba(245, 158, 11, 0.1);
    color: var(--profit-color);
}

.metric-col {
    text-align: center;
    color: var(--text-secondary);
}

.placeholder-message {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--background);
}

.placeholder-message p {
    margin-bottom: 0.5rem;
}

.methodology ul {
    margin-left: 1.5rem;
    margin-top: 1rem;
}

.methodology li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

footer p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    section {
        padding: 1.5rem;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }

    .score-col, .metric-col {
        font-size: 0.9rem;
    }
}
