/* Article tables on regular posts: same look as the statistics tables
   (assets/statistics.css "Data table"). Markup: figure.inn-table >
   div.inn-table-scroll > table, added by inc/tables.php (classic tables) and
   inc/statistics.php (Table block).
   The theme's .prose table rules use !important and long selectors, so these
   rules use three classes plus !important where the theme does. */

.inn-content .inn-table.inn-table {
	margin: 32px 0 !important;
	border: 1px solid #d4d4d8;
	border-radius: var(--radius-2xl, 1rem);
	background: #fff;
	overflow: hidden;
	max-width: 100%;
	float: none;
}
.inn-content .inn-table .inn-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}
.inn-content .inn-table .inn-table-scroll table {
	display: table;
	width: 100%;
	margin: 0;
	border: 0 !important;
	border-collapse: collapse !important;
	font-size: 15px;
	line-height: 22px;
	font-variant-numeric: tabular-nums;
}

/* Header row: navy, mono uppercase. */
.inn-content .inn-table .inn-table-scroll thead tr {
	background: var(--color-secondary);
}
.inn-content .inn-table .inn-table-scroll thead th,
.inn-content .inn-table .inn-table-scroll thead td {
	background: var(--color-secondary) !important;
	color: #fff !important;
	font-family: var(--font-mono);
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: left;
	padding: 11px 16px !important;
	border: 0 !important;
	vertical-align: middle;
}
.inn-content .inn-table .inn-table-scroll thead :is(a, strong, b) {
	color: inherit;
	font-weight: inherit;
}

/* Body rows: zebra, teal hover. Also undoes the theme's "first row looks like
   a header" style on tables that have no <thead>. */
.inn-content .inn-table .inn-table-scroll tbody td,
.inn-content .inn-table .inn-table-scroll tbody th {
	padding: 11px 16px !important;
	border: 0 !important;
	border-top: 1px solid #e4e4e7 !important;
	text-align: left;
	vertical-align: top;
	color: #18181b;
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: 22px;
	letter-spacing: 0;
	text-transform: none;
}
.inn-content .inn-table .inn-table-scroll tbody tr:first-child > * {
	border-top: 0 !important;
}
.inn-content .inn-table .inn-table-scroll thead + tbody tr:first-child > * {
	border-top: 0 !important;
}
.inn-content .inn-table .inn-table-scroll tbody th {
	font-weight: 600;
}
.inn-content .inn-table .inn-table-scroll tbody tr:nth-child(odd) > * {
	background: #fff !important;
}
.inn-content .inn-table .inn-table-scroll tbody tr:nth-child(even) > * {
	background: #fafafa !important;
}
.inn-content .inn-table .inn-table-scroll tbody tr:hover > * {
	background: color-mix(in srgb, var(--color-tertiary) 9%, #fff) !important;
}
.inn-content .inn-table .inn-table-scroll :is(td, th) p {
	margin: 0;
}
.inn-content .inn-table .inn-table-scroll :is(td, th) p + p {
	margin-top: 4px;
}

/* Title row of old tables, moved into <caption>. */
.inn-content .inn-table .inn-table-scroll caption {
	caption-side: top;
	padding: 12px 16px;
	text-align: left;
	font-size: 15px;
	font-weight: 600;
	line-height: 22px;
	color: #18181b;
	background: #f4f4f5;
	border-bottom: 1px solid #e4e4e7;
}

/* "Source: ..." row at the bottom of old tables. */
.inn-content .inn-table .inn-table-scroll tbody tr.inn-table-note > * {
	background: #fff !important;
	color: #52525b;
	font-size: 13px;
	line-height: 20px;
	padding-top: 9px !important;
	padding-bottom: 9px !important;
}

/* Table block caption. */
.inn-content .inn-table.inn-table > figcaption {
	margin: 0;
	padding: 10px 16px;
	border-top: 1px solid #e4e4e7;
	text-align: left;
	color: #52525b;
	font-size: 13px;
	line-height: 20px;
}

.inn-content .inn-table + * {
	margin-top: 40px !important;
}

@media (max-width: 640px) {
	.inn-content .inn-table .inn-table-scroll thead th,
	.inn-content .inn-table .inn-table-scroll thead td,
	.inn-content .inn-table .inn-table-scroll tbody td,
	.inn-content .inn-table .inn-table-scroll tbody th {
		padding: 10px 12px !important;
	}
	.inn-content .inn-table .inn-table-scroll caption {
		padding: 10px 12px;
	}
	/* Phones: no squeezed fixed-layout columns or words broken mid-way; tables with
	   3+ columns scroll sideways instead (as on the statistics pages). */
	.inn-content .inn-table .inn-table-scroll table {
		table-layout: auto !important;
	}
	.inn-content .inn-table .inn-table-scroll table:has(tr > :nth-child(3)) {
		min-width: 560px;
	}
	.inn-content .inn-table .inn-table-scroll :is(td, th) {
		overflow-wrap: normal;
		word-break: normal;
	}
}
