body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    color: #111;
}

header {
    padding: 24px 16px;
    text-align: center;
    background: #333;
    color: #fff;
}

.comparison-container {
    width: min(1200px, calc(100vw - 32px));
    margin: 24px auto 88px;
}

.comparison-table {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.group-section {
    margin-top: 20px;
}

.group-row {
    padding: 12px 16px;
    background: #222;
    color: #fff;
    border-top: 3px solid #111;
}

.group-row h2 {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.comparison-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(72px, 120px) minmax(0, 1fr) minmax(120px, 180px) minmax(0, 1fr) minmax(72px, 120px);
    align-items: center;
    border: 0;
    padding: 0;
    background: #fff;
    text-align: center;
}

.comparison-row > div {
    padding: 12px 10px;
}

.comparison-row:nth-child(even) {
    background: #f9f9f9;
}

.header-row {
    font-size: 2rem;
    font-weight: 700;
    text-decoration: underline;
    background: #ddd;
}

.comparison-row-main {
    cursor: pointer;
}

.comparison-row-static {
    cursor: default;
}

.comparison-row-main:disabled {
    color: inherit;
}

.component-name {
    font-weight: 700;
}

.component-type {
    text-decoration: underline;
}

.component-image img {
    max-width: 100px;
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.image-placeholder {
    color: #666;
    font-weight: 700;
}

.details {
    max-height: 0;
    overflow: hidden;
    padding: 0;
}

.details > div {
    padding-top: 0;
    padding-bottom: 0;
}

.details.open {
    max-height: 500px;
    border-left: 2px solid #888;
    border-right: 2px solid #888;
}

.details.open > div {
    padding-top: 10px;
    padding-bottom: 10px;
}

.comparison-row-main.is-open + .details.open {
    border-top: 2px solid #888;
}

.details.open:last-of-type {
    margin-bottom: 20px;
    border-bottom: 2px solid #888;
}

.error-message {
    padding: 16px;
    background: #fff1f1;
    border: 1px solid #d88;
    color: #8a1f1f;
}

footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px;
    text-align: center;
    background: #333;
    color: #fff;
}

footer a {
    color: #00bcd4;
    text-decoration: none;
}

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

@media (max-width: 900px) {
    .comparison-container {
        width: calc(100vw - 16px);
        margin-top: 8px;
    }

    .comparison-row {
        grid-template-columns: 72px 1fr 96px 1fr 72px;
        font-size: 0.9rem;
    }

    .header-row {
        font-size: 1.4rem;
    }

    .group-row h2 {
        font-size: 1rem;
    }
}
