/*
 * AI Dysregulation — small layer on top of your theme.
 * Colours and fonts come from the theme; only the "facts" label has its own look,
 * because it is meant to read like a printed food label.
 */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* ---------- The definition ---------- */

.asr-definition {
	border-left: 4px solid currentColor;
	padding: 0.25em 0 0.25em 1.25em;
	margin-block: 1.5em 2em;
}

.asr-definition > * {
	margin-block: 0;
}

.asr-definition .asr-term {
	font-size: 1.15em;
}

.asr-definition .asr-term em {
	font-weight: 400;
	opacity: 0.7;
	margin-left: 0.35em;
}

.asr-definition .asr-meaning {
	font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem);
	line-height: 1.4;
	margin-top: 0.4em;
}

.asr-definition .asr-credit {
	font-size: 0.875em;
	opacity: 0.75;
	margin-top: 0.8em;
}

/* ---------- Sugar rush facts label ---------- */

.asr-label {
	--asr-ink: #000;
	--asr-paper: #fff;
	background: var(--asr-paper);
	color: var(--asr-ink);
	border: 2px solid var(--asr-ink);
	padding: 0.5rem 0.6rem 0.6rem;
	max-width: 22rem;
	margin: 2.5em 0;
	font-family: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
	font-size: 15px;
	line-height: 1.3;
	box-sizing: border-box;
}

.asr-label * {
	color: var(--asr-ink);
}

.asr-label p {
	margin: 0;
}

.asr-label__title {
	font-family: "Helvetica Neue", "Arial Black", Arial, sans-serif;
	font-weight: 900;
	font-size: 2.05em;
	line-height: 1;
	letter-spacing: -0.02em;
	padding-bottom: 0.15em;
	border-bottom: 1px solid var(--asr-ink);
}

.asr-label__serving {
	padding: 0.3em 0;
	border-bottom: 10px solid var(--asr-ink);
}

.asr-label__table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
	border: 0;
	font-size: 1em;
}

.asr-label__table th,
.asr-label__table td {
	border: 0;
	border-bottom: 1px solid var(--asr-ink);
	padding: 0.28em 0;
	text-align: left;
	background: none;
}

.asr-label__table td {
	text-align: right;
	font-weight: 700;
}

.asr-label__table tbody th {
	font-weight: 700;
}

.asr-label__section {
	font-weight: 900 !important;
	font-size: 0.95em;
}

.asr-label__section--dv {
	border-top: 5px solid var(--asr-ink);
	text-align: right !important;
}

.asr-label__ingredients {
	padding: 0.45em 0;
	border-top: 10px solid var(--asr-ink);
	margin-top: -1px !important;
	font-size: 0.85em;
}

.asr-label__note {
	border-top: 1px solid var(--asr-ink);
	padding-top: 0.35em;
	font-size: 0.8em;
}

/* ---------- Self-check ---------- */

.asr-check fieldset {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.asr-check__list {
	list-style: none;
	padding: 0;
	margin: 0 0 1em;
}

.asr-check__list li {
	display: flex;
	gap: 0.7em;
	align-items: flex-start;
	padding: 0.55em 0;
	border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.asr-check__list input {
	flex: none;
	width: 1.15em;
	height: 1.15em;
	margin: 0.2em 0 0;
	accent-color: currentColor;
	cursor: pointer;
}

.asr-check__list label {
	cursor: pointer;
}

.asr-check__result {
	font-size: 1.05em;
	padding: 0.8em 1em;
	border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
}

.asr-check__count {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	margin-right: 0.35em;
}

/* ---------- Series list ---------- */

.asr-series {
	list-style: none;
	counter-reset: asr-ep;
	padding: 0;
	margin: 1.5em 0;
}

.asr-series__item {
	counter-increment: asr-ep;
	display: grid;
	grid-template-columns: 2.25em 1fr;
	column-gap: 0.5em;
	padding: 0.9em 0;
	border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.asr-series__item::before {
	content: counter(asr-ep);
	grid-row: 1 / span 3;
	font-weight: 700;
	font-size: 1.25em;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
}

.asr-series__title {
	font-weight: 700;
}

.asr-series__summary,
.asr-series__links {
	grid-column: 2;
}

.asr-series__links {
	font-size: 0.9em;
	margin-top: 0.25em;
}

.asr-series__links a + a {
	margin-left: 1em;
}

.asr-series__item--soon .asr-series__links {
	opacity: 0.6;
}

/* ---------- Follow links and waitlist ---------- */

.asr-follow a + a {
	margin-left: 1.25em;
}

.asr-follow--empty,
.asr-waitlist--empty {
	opacity: 0.8;
	font-style: italic;
}

@media (prefers-reduced-motion: no-preference) {
	.asr-check__result {
		transition: background-color 0.2s ease;
	}
}

/* ---------- Health note ---------- */

.asr-note {
	border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
	padding: 0.75em 1em;
	margin-block: 1.5em;
}

.asr-note p {
	margin: 0;
}
