/*
 * Red Pen game.
 *
 * The report is the design: a plain sheet of paper with one color on it.
 * Red appears only where a reader's pen would. Button colors use !important
 * because themes style buttons at high specificity.
 */

.irp {
	--irp-ink: #1a1a1a;
	--irp-muted: #5f6368;
	--irp-line: #d8dde3;
	--irp-navy: #1f3a5f;
	--irp-navy-dark: #14283f;
	--irp-red: #c1121f;
	--irp-green: #246147;
	--irp-display: Georgia, 'Iowan Old Style', 'Apple Garamond', serif;

	width: 100%;
	max-width: 760px;
	margin: 2rem auto;
	color: var(--irp-ink);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
	line-height: 1.5;
}

.irp *,
.irp *::before,
.irp *::after {
	box-sizing: border-box;
}

.irp h2,
.irp h3,
.irp p {
	margin: 0;
	padding: 0;
	border: 0;
	letter-spacing: normal;
	text-transform: none;
}

.irp h2:focus {
	outline: none;
}

.irp .irp__title {
	font-family: var(--irp-display);
	font-size: clamp(2.5rem, 8vw, 3.5rem);
	font-weight: 700;
	font-style: italic;
	line-height: 1.05;
	color: var(--irp-red);
	margin-bottom: 0.625rem;
}

.irp .irp__lede {
	font-size: 1.125rem;
	max-width: 36em;
}

/* Report list */

.irp .irp__menu {
	list-style: none;
	margin: 1.25rem 0 0;
	padding: 0;
}

.irp__menu li {
	margin: 0 0 0.5rem;
}

.irp .irp__pick {
	display: block;
	width: 100%;
	padding: 0.875rem 1rem;
	border: 1px solid var(--irp-line) !important;
	border-radius: 4px;
	background: #fff !important;
	color: var(--irp-ink) !important;
	font: inherit;
	line-height: 1.4;
	text-align: left;
	cursor: pointer;
}

.irp__pick-title,
.irp__pick-summary,
.irp__pick-meta {
	display: block;
}

.irp__pick-title {
	font-family: var(--irp-display);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--irp-navy);
}

.irp__pick-meta {
	color: var(--irp-muted);
	font-size: 0.875rem;
}

/* Report */

.irp .irp__report-title {
	font-family: var(--irp-display);
	font-size: clamp(1.75rem, 6vw, 2.25rem);
	font-weight: 700;
	line-height: 1.12;
	color: var(--irp-navy);
}

.irp .irp__edition {
	color: var(--irp-muted);
	font-size: 0.9375rem;
}

.irp .irp__rule {
	font-size: 0.9375rem;
	margin-top: 0.625rem;
	max-width: 40em;
}

.irp__paper {
	margin-top: 1rem;
	padding: 1.25rem 1.5rem 1.5rem;
	background: #fff;
	border: 1px solid var(--irp-line);
	color: var(--irp-ink);
}

.irp .irp__section {
	color: var(--irp-navy);
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 700;
	margin: 1rem 0 0.25rem;
}

.irp .irp__section:first-child {
	margin-top: 0;
}

.irp .irp__body {
	font-family: var(--irp-display);
	font-size: 1.0625rem;
	line-height: 1.75;
}

.irp__s {
	cursor: pointer;
	border-radius: 2px;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	-webkit-tap-highlight-color: transparent;
}

.irp__s:focus-visible {
	outline: 2px solid var(--irp-navy);
	outline-offset: 1px;
}

/* The pen mark. Wavy underline, like a reviewer's hand. */
.irp__s[aria-pressed='true'] {
	color: var(--irp-red);
	text-decoration: underline wavy var(--irp-red) 1.5px;
	text-underline-offset: 3px;
}

@media (hover: hover) {
	.irp__s:hover {
		background: #fbeced;
	}

	.irp .irp__pick:hover {
		border-color: var(--irp-navy) !important;
	}
}

/* Sticks to the bottom of the screen while the long report scrolls. */
.irp__bar {
	position: sticky;
	bottom: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.5rem 0.75rem;
	background: #fff;
	border: 1px solid var(--irp-line);
	border-top-color: var(--irp-navy);
	font-size: 0.875rem;
	line-height: 1.3;
}

/* Buttons */

.irp .irp__btn:not(.irp__pick) {
	display: inline-block;
	min-height: 44px;
	margin: 0;
	padding: 0.625rem 1rem;
	border: 1px solid var(--irp-navy) !important;
	border-radius: 4px;
	box-shadow: none;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.irp .irp__btn:focus-visible {
	outline: 3px solid var(--irp-navy);
	outline-offset: 2px;
}

.irp__bar .irp__btn {
	flex-shrink: 0;
}

.irp .irp__btn--primary {
	background: var(--irp-navy) !important;
	color: #fff !important;
}

.irp .irp__btn--primary:disabled {
	background: #8a97a8 !important;
	border-color: #8a97a8 !important;
	color: #fff !important;
	cursor: not-allowed;
}

.irp .irp__btn--secondary {
	background: #fff !important;
	color: var(--irp-navy) !important;
}

/* Results */

.irp .irp__score {
	font-family: var(--irp-display);
	font-size: clamp(2.25rem, 8vw, 3.25rem);
	font-weight: 700;
	line-height: 1.08;
	color: var(--irp-navy);
	margin-bottom: 0.25rem;
}

.irp .irp__extra {
	color: var(--irp-muted);
	font-size: 0.9375rem;
	margin-top: 0.25rem;
}

.irp__item {
	margin-top: 0.625rem;
	padding-left: 0.875rem;
	border-left: 3px solid var(--irp-line);
}

.irp__item.is-found {
	border-left-color: var(--irp-green);
}

.irp__item.is-missed {
	border-left-color: var(--irp-red);
}

.irp .irp__tag {
	font-size: 0.875rem;
	font-weight: 700;
}

.irp__item.is-found .irp__tag {
	color: var(--irp-green);
}

.irp__item.is-missed .irp__tag {
	color: var(--irp-red);
}

.irp__item.is-extra .irp__tag {
	color: var(--irp-muted);
}

.irp .irp__quote {
	font-family: var(--irp-display);
	font-size: 1rem;
	font-style: italic;
	margin-top: 0.125rem;
}

.irp .irp__why {
	font-size: 0.9375rem;
	margin-top: 0.25rem;
}

.irp__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin-top: 1.25rem;
}

.irp .irp__disclaimer {
	color: var(--irp-muted);
	font-size: 0.8125rem;
	margin-top: 1.25rem;
}

@media (max-width: 480px) {
	.irp__paper {
		padding: 1rem;
	}

	.irp .irp__body {
		font-size: 1rem;
	}
}
