@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");
@import url("../colors.css");

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

body {
	font-family: Inter, system-ui, -apple-system, sans-serif;
	background-color: var(--bg);
	color: var(--text);
	line-height: 1.6;
	max-width: 960px;
	margin: 0 auto;
	padding: 2rem 1rem;
}

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

a:hover {
	text-decoration: underline;
}

/* Header */

header {
	margin-bottom: 2rem;
}

nav[aria-label="Breadcrumb"] {
	font-size: 0.875rem;
	color: var(--text-secondary);
	margin-bottom: 1rem;
}

header h1 {
	color: var(--primary);
	font-size: 2rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
}

header p {
	color: var(--text-secondary);
}

/* Comparison table */

section {
	margin-bottom: 3rem;
}

section h2 {
	color: var(--text);
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 0.25rem;
}

.section-subtitle {
	color: var(--text-secondary);
	font-size: 0.9rem;
	margin-bottom: 1rem;
}

.table-wrapper {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 1rem 0;
}

table {
	width: 100%;
	min-width: 1100px;
	border-collapse: collapse;
}

thead {
	background-color: var(--thead-bg);
	color: var(--thead-text);
}

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

th:first-child,
td:first-child {
	text-align: left;
}

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

.status-pass {
	color: var(--pass);
	font-weight: 700;
	font-size: 1.25rem;
}

.status-fail {
	color: var(--fail);
	font-weight: 700;
	font-size: 1.25rem;
}

.table-note {
	font-size: 0.85rem;
	color: var(--text-secondary);
	font-style: italic;
	margin-top: 0.5rem;
}

/* Brand cards */

.brand-card {
	border: 2px solid var(--border);
	border-radius: 8px;
	margin-bottom: 1.5rem;
	overflow: hidden;
}

.brand-card[open] {
	border-color: var(--accent);
}

.brand-card summary {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	padding: 1rem 1.5rem;
	cursor: pointer;
	background-color: var(--surface);
	list-style: none;
}

.brand-card summary::before {
	content: "\25B6";
	font-size: 0.75rem;
	color: var(--text-secondary);
	transition: transform 0.2s;
}

.brand-card[open] > summary::before {
	transform: rotate(90deg);
}

.brand-card summary::-webkit-details-marker {
	display: none;
}

.brand-card summary h3 {
	font-size: 1.25rem;
	color: var(--text);
	margin: 0;
}

.parent-company {
	font-size: 0.85rem;
	color: var(--text-secondary);
	font-weight: 400;
}

.brand-content {
	padding: 1rem 1.5rem 1.5rem;
}

.brand-meta {
	margin-bottom: 1rem;
	color: var(--text-secondary);
}

.brand-controversies {
	margin-top: 0.5rem;
	font-size: 0.9rem;
	border-left: 3px solid var(--fail);
	padding-left: 0.75rem;
}

.brand-products h4 {
	color: var(--primary-dark);
	font-size: 1rem;
	margin-bottom: 0.5rem;
}

.brand-products .table-wrapper {
	margin: 0.5rem 0 0;
}

.brand-products table {
	min-width: 520px;
	font-size: 0.9rem;
}

.brand-products thead {
	background-color: var(--surface);
	color: var(--text);
}

.brand-products th,
.brand-products td {
	padding: 0.5rem 0.6rem;
}

.brand-products .status-pass,
.brand-products .status-fail {
	font-size: 1.1rem;
}

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

/* Footer */

footer {
	margin-top: 4rem;
	text-align: center;
	color: var(--border);
	font-size: 0.875rem;
}

/* Responsive */

@media (width <= 600px) {
	body {
		padding: 1rem 0.75rem;
	}

	header h1 {
		font-size: 1.5rem;
	}

	th,
	td {
		padding: 0.5rem 0.6rem;
		font-size: 0.9rem;
	}

	.brand-card summary {
		padding: 0.75rem 1rem;
	}

	.brand-content {
		padding: 0.75rem 1rem 1rem;
	}
}
