*
{
	box-sizing: border-box;
}
:root
{
	--bg: #0b0d10;
	--header-bg: #0f1216;
	--panel: #12161b;
	--panel-2: #181d23;
	--panel-answer: #14191f;
	--border: #343b44;
	--border-answer: #414952;
	--text: #f5f5f5;
	--muted: #a7adb5;
	--accent: #d92f36;
	--accent-hover: #ef3b42;
	--danger-bg: #361519;
	--view-speed: 160ms;
}
html
{
	min-height: 100%;
	background: var(--bg);
}
body
{
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	background: var(--bg);
	color: var(--text);
	font-family: Arial, Helvetica, sans-serif;
}
body.modal-open
{
	overflow: hidden;
}
button,
select,
input
{
	font: inherit;
}
button,
select,
a,
label
{
	-webkit-tap-highlight-color: transparent;
}
a
{
	color: inherit;
}
[hidden],
.hide,
.preload,
.view-hidden
{
	display: none !important;
}
.sr-only
{
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
/* ****************************************
   APP VIEW TRANSITIONS
**************************************** */
.app-view
{
	opacity: 0;
	transform: translateY(6px) scale(.995);
	transition: opacity var(--view-speed) ease, transform var(--view-speed) ease;
}
.app-view.is-active
{
	opacity: 1;
	transform: translateY(0) scale(1);
}
.app-view.is-leaving
{
	opacity: 0;
	transform: translateY(-4px) scale(.995);
}
/* ****************************************
   SETUP SCREEN
**************************************** */
.setup-view
{
    display: flex;
    flex-direction: column;
    min-height: 98vh;
    min-height: 98dvh;
    height: auto;
    overflow: visible;
}
/* ****************************************
   SETUP HEADER
**************************************** */
.site-header
{
	width: min(92%, 650px);
	margin: 0 auto;
	padding: 30px 0 20px;
}
.brand
{
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}
.brand h1
{
	margin: 0;
	font-size: clamp(1.9rem, 5vw, 2.6rem);
	letter-spacing: .02em;
}
.brand p
{
	margin: 6px 0 0;
	color: var(--muted);
	font-size: .95rem;
}
/* ****************************************
   SETUP AREA
**************************************** */
.setup-main
{
	flex: 1;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	width: 100%;
	padding: 6px 20px 20px;
}
.setup-panel
{
	width: min(100%, 560px);
	padding: 30px 28px;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 18px;
	box-shadow: 0 14px 40px rgba(0, 0, 0, .25);
}
.setup-panel h2
{
	margin: 0;
	font-size: 1.35rem;
	text-align: center;
}
/* ****************************************
   TUTORIAL INTRO LINK
**************************************** */
.tutorial-intro
{
	margin: 7px 0 28px;
	color: var(--muted);
	font-size: .82rem;
	text-align: center;
}
.tutorial-link
{
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #d3d7dc;
	font-size: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: #555d67;
	text-underline-offset: 3px;
	cursor: pointer;
	transition: color 150ms, text-decoration-color 150ms;
}
.tutorial-link:hover
{
	color: white;
	text-decoration-color: var(--accent);
}
/* ****************************************
   SETUP FORM
**************************************** */
#practice-setup
{
	display: grid;
	gap: 32px;
}
.field-group
{
	margin: 0;
	padding: 0;
	border: 0;
}
.field-group > label,
.field-group legend
{
	display: block;
	margin: 0 0 11px;
	padding: 0;
	color: var(--text);
	font-size: .95rem;
	font-weight: 700;
}
select
{
	width: 100%;
	min-height: 52px;
	padding: 0 14px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--panel-2);
	color: var(--text);
	outline: none;
	cursor: pointer;
	transition: border-color 150ms, background-color 150ms;
}
select:hover
{
	border-color: #4a535e;
}
select:focus,
button:focus-visible,
a:focus-visible,
.mode-radio:focus-visible + .mode-choice
{
	outline: 3px solid rgba(217, 47, 54, .35);
	outline-offset: 2px;
}
/* ****************************************
   NUMBER RANGE
**************************************** */
.range-controls
{
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 14px;
}
.range-controls span
{
	color: var(--muted);
}
/* ****************************************
   PRACTICE MODE
**************************************** */
.mode-options
{
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}
.mode-radio
{
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.mode-choice
{
	display: flex;
	min-height: 82px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 8px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--panel-2);
	text-align: center;
	cursor: pointer;
	transition: border-color 150ms, background-color 150ms, transform 100ms;
}
.mode-choice:hover
{
	border-color: #4a535e;
}
.mode-choice:active
{
	transform: scale(.985);
}
.mode-choice strong
{
	font-size: 1rem;
}
.mode-choice span
{
	color: var(--muted);
	font-size: .75rem;
}
.mode-radio:checked + .mode-choice
{
	border-color: var(--accent);
	background: var(--accent);
}
.mode-radio:checked + .mode-choice span
{
	color: white;
}
/* ****************************************
   BUTTONS
**************************************** */
.setup-actions
{
	display: grid;
	grid-template-columns: 65fr 35fr;
	gap: 12px;
}
.start-button,
.view-stack-button,
#practice-action
{
	width: 100%;
	min-height: 56px;
	border: 0;
	border-radius: 10px;
	background: var(--accent);
	color: white;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 150ms, transform 100ms;
}
.view-stack-button
{
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--border);
	background: var(--panel-soft);
	color: var(--text);
	text-decoration: none;
}
.view-stack-button:hover
{
	border-color: #4a535e;
	background: #1d232a;
}
.start-button:hover,
#practice-action:hover
{
	background: var(--accent-hover);
}
.start-button:active,
.view-stack-button:active,
#practice-action:active
{
	transform: scale(.985);
}
.remember-note
{
	margin: -15px 0 0;
	color: var(--muted);
	font-size: .82rem;
	text-align: center;
}
/* ****************************************
   ERRORS
**************************************** */
.error
{
	margin: -10px 0 0;
	padding: 12px 14px;
	border: 1px solid #7a2b31;
	border-radius: 10px;
	background: var(--danger-bg);
	color: #ffd9dc;
	font-size: .9rem;
	text-align: center;
}
/* ****************************************
   SETUP FOOTER
**************************************** */
.site-footer
{
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	padding: 0 20px 12px;
	color: var(--muted);
	font-size: .85rem;
}
.site-footer a,
.footer-link
{
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--muted);
	font-size: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: color 150ms;
}
.site-footer a:hover,
.footer-link:hover
{
	color: var(--text);
}
/* ****************************************
   PRACTICE SCREEN
**************************************** */
.practice-screen
{
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
}
.practice-shell
{
	flex-direction: column;
	width: 100%;
	height: 98vh;
	height: 98dvh;
	margin: 0 auto;
}
.practice-shell:not(.view-hidden)
{
	display: flex;
}
/* ****************************************
   PRACTICE HEADER
**************************************** */
.practice-header
{
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	min-height: 76px;
	padding: 12px clamp(16px, 4vw, 36px);
	background: var(--header-bg);
	border-bottom: 1px solid #2a3037;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .22);
}
.setup-link
{
	justify-self: start;
	padding: 10px 0;
	color: #c0c5cb;
	text-decoration: none;
	font-size: .95rem;
	transition: color 150ms, transform 150ms;
}
.setup-link:hover
{
	color: var(--text);
	transform: translateX(-2px);
}
.practice-meta
{
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	text-align: left;
}
.stack-creator
{
	width: 50px;
	height: 50px;
	flex: 0 0 50px;
	object-fit: cover;
	border: 1px solid var(--border);
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.practice-meta-text
{
	text-align: left;
}
.practice-meta h1
{
	margin: 0;
	font-size: clamp(1.05rem, 4vw, 1.35rem);
	text-transform: capitalize;
}
.practice-meta p
{
	margin: 4px 0 0;
	color: var(--muted);
	font-size: .9rem;
}
.practice-spacer
{
	width: 54px;
	justify-self: end;
}
/* ****************************************
   MAIN PLAY AREA
**************************************** */
.practice-stage
{
	flex: 1;
	display: flex;
	min-height: 0;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: clamp(18px, 3vh, 28px);
	width: min(calc(100% - 40px), 900px);
	margin: 14px auto;
	padding: 26px 20px;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 18px;
	box-shadow: 0 14px 40px rgba(0, 0, 0, .38);
	text-align: center;
	transition: background-color 200ms, border-color 200ms, box-shadow 200ms;
}
.practice-stage.answer-shown
{
	background: var(--panel-answer);
	border-color: var(--border-answer);
	box-shadow: 0 16px 46px rgba(0, 0, 0, .44);
}
.practice-prompt
{
	margin: 0;
	font-size: clamp(1.15rem, 4vw, 1.6rem);
}
.practice-target
{
	display: flex;
	min-height: 220px;
	align-items: center;
	justify-content: center;
	gap: clamp(24px, 6vw, 70px);
	width: min(100%, 850px);
	cursor: pointer;
}
.stack-number
{
	font-size: clamp(6rem, 24vw, 14rem);
	font-weight: 700;
	line-height: .9;
	letter-spacing: 0;
}
.card-image
{
	display: block;
	width: auto;
	max-width: min(72vw, 340px);
	max-height: 52vh;
	border-radius: 12px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, .32);
}
.practice-stage.answer-shown .practice-target
{
	min-height: 260px;
}
.practice-stage.answer-shown .stack-number
{
	font-size: clamp(4.5rem, 13vw, 8rem);
}
.practice-stage.answer-shown .card-image
{
	max-width: min(54vw, 275px);
	max-height: 43vh;
}
.practice-hint
{
	margin: 0;
	color: var(--muted);
	font-size: .95rem;
}
/* ****************************************
   PRACTICE FOOTER
**************************************** */
.practice-footer
{
	width: min(100%, 520px);
	margin: 0 auto;
	padding: 0 20px 16px;
}
#practice-action
{
	min-height: 52px;
}
.keyboard-hint
{
	margin: 12px 0 0;
	color: var(--muted);
	font-size: .82rem;
	text-align: center;
}
kbd
{
	padding: 2px 6px;
	border: 1px solid var(--border);
	border-bottom-width: 2px;
	border-radius: 5px;
	background: var(--panel-2);
	color: var(--text);
	font-family: inherit;
	font-size: .8rem;
}
/* ****************************************
   TUTORIAL MODAL
**************************************** */
.tutorial-modal
{
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	transition: opacity 160ms ease;
}
.tutorial-modal.is-open
{
	opacity: 1;
}
.tutorial-backdrop
{
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .82);
	backdrop-filter: blur(3px);
}
.tutorial-window
{
	position: relative;
	z-index: 1;
	width: min(100%, 900px);
	overflow: hidden;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 16px;
	box-shadow: 0 20px 70px rgba(0, 0, 0, .65);
	transform: translateY(8px) scale(.99);
	transition: transform 160ms ease;
}
.tutorial-modal.is-open .tutorial-window
{
	transform: translateY(0) scale(1);
}
.tutorial-header
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 14px 16px;
	background: var(--header-bg);
	border-bottom: 1px solid var(--border);
}
.tutorial-header h2
{
	margin: 0;
	font-size: 1.05rem;
}
.tutorial-close
{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--muted);
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 150ms, color 150ms;
}
.tutorial-close:hover
{
	background: var(--panel-2);
	color: white;
}
.tutorial-video
{
	width: 100%;
	aspect-ratio: 16 / 9;
	background: black;
}
.tutorial-video iframe
{
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}
/* ****************************************
   CREDITS PAGE COMPATIBILITY
**************************************** */
body#credits
{
	padding: 20px;
}
body#credits > main
{
	width: min(100%, 1000px);
	margin: 0 auto;
}
body#credits h1
{
	text-align: center;
}
body#credits > main > section
{
	margin-bottom: 20px;
	padding: 20px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--panel);
}
body#credits h2
{
	margin-top: 0;
}
body#credits ul
{
	padding-left: 24px;
}
body#credits li
{
	margin: 12px 0;
	line-height: 1.5;
}
body#credits a
{
	color: #ff7278;
}
body#credits small
{
	color: var(--muted);
}
.nav
{
	display: inline-block;
	margin: 10px 0;
	color: var(--text);
	text-decoration: none;
}
/* ****************************************
   MOBILE
**************************************** */
@media (max-width: 600px)
{
	.site-header
	{
		padding: 22px 0 17px;
	}
	.brand h1
	{
		font-size: 2rem;
	}
	.brand p
	{
		font-size: .88rem;
	}
	.setup-main
	{
		padding: 4px 14px 14px;
	}
	.setup-panel
	{
		padding: 24px 16px;
		border-radius: 14px;
	}
	.tutorial-intro
	{
		margin-bottom: 24px;
	}
	#practice-setup
	{
		gap: 28px;
	}
	.setup-actions
	{
		grid-template-columns: 1fr;
	}
	.mode-options
	{
		gap: 7px;
	}
	.mode-choice
	{
		min-height: 74px;
		padding: 10px 5px;
	}
	.mode-choice strong
	{
		font-size: .92rem;
	}
	.mode-choice span
	{
		font-size: .66rem;
	}
	.site-footer
	{
		padding-bottom: 8px;
	}
	.practice-header
	{
		min-height: 68px;
		padding: 8px 14px;
	}
	.setup-link
	{
		font-size: .85rem;
	}
	.practice-meta
	{
		gap: 8px;
	}
	.stack-creator
	{
		width: 44px;
		height: 44px;
		flex-basis: 44px;
	}
	.practice-spacer
	{
		width: 42px;
	}
	.practice-stage
	{
		width: calc(100% - 20px);
		margin: 8px auto;
		gap: 18px;
		padding: 20px 14px;
		border-radius: 14px;
	}
	.practice-target
	{
		min-height: 190px;
		flex-direction: column;
		gap: 16px;
	}
	.card-image
	{
		max-width: min(68vw, 285px);
		max-height: 46vh;
	}
	.practice-stage.answer-shown .practice-target
	{
		min-height: 250px;
	}
	.practice-stage.answer-shown .card-image
	{
		max-width: min(52vw, 230px);
		max-height: 35vh;
	}
	.practice-stage.answer-shown .stack-number
	{
		font-size: clamp(4rem, 20vw, 6rem);
	}
	.practice-footer
	{
		padding: 0 14px 12px;
	}
	.keyboard-hint
	{
		margin-top: 8px;
	}
	.tutorial-modal
	{
		padding: 10px;
	}
	.tutorial-window
	{
		border-radius: 12px;
	}
	.tutorial-header
	{
		padding: 10px 12px;
	}
}
/* ****************************************
   SHORT LANDSCAPE SCREENS
**************************************** */
@media (max-height: 650px) and (orientation: landscape)
{
	.practice-header
	{
		min-height: 54px;
		padding-top: 5px;
		padding-bottom: 5px;
	}
	.stack-creator
	{
		width: 40px;
		height: 40px;
		flex-basis: 40px;
	}
	.practice-stage
	{
		flex-direction: row;
		flex-wrap: wrap;
		gap: 12px 24px;
		margin-top: 6px;
		margin-bottom: 6px;
		padding: 12px 20px;
	}
	.practice-prompt,
	.practice-hint
	{
		flex-basis: 100%;
	}
	.practice-target
	{
		min-height: 140px;
	}
	.card-image,
	.practice-stage.answer-shown .card-image
	{
		max-height: 39vh;
		max-width: 180px;
	}
	.stack-number,
	.practice-stage.answer-shown .stack-number
	{
		font-size: clamp(4rem, 16vh, 7rem);
	}
	.practice-footer
	{
		padding: 0 20px 8px;
	}
	.keyboard-hint
	{
		margin-top: 6px;
	}
	.tutorial-window
	{
		width: min(80%, 760px);
	}
}
/* ****************************************
   QUESTION / ANSWER ANIMATIONS
**************************************** */
.question-animate
{
	animation: question-in 180ms ease-out;
}
.answer-animate
{
	animation: answer-in 220ms ease-out;
}
.text-animate
{
	animation: text-in 160ms ease-out;
}
@keyframes question-in
{
	from
	{
		opacity: 0;
		transform: scale(.98);
	}
	to
	{
		opacity: 1;
		transform: scale(1);
	}
}
@keyframes answer-in
{
	from
	{
		opacity: 0;
		transform: translateY(8px);
	}
	to
	{
		opacity: 1;
		transform: translateY(0);
	}
}
@keyframes text-in
{
	from
	{
		opacity: 0;
	}
	to
	{
		opacity: 1;
	}
}
/* ****************************************
   REDUCED MOTION
**************************************** */
@media (prefers-reduced-motion: reduce)
{
	.app-view,
	.tutorial-modal,
	.tutorial-window
	{
		transition: none;
	}
	.question-animate,
	.answer-animate,
	.text-animate
	{
		animation: none;
	}
}
/* ****************************************
   SUBPAGE HEADER
**************************************** */
.subpage-header
{
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	min-height: 82px;
	padding: 12px clamp(16px, 4vw, 36px);
	background: var(--header-bg);
	border-bottom: 1px solid #2a3037;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .22);
}
.subpage-header > div
{
	text-align: center;
}
.subpage-header h1
{
	margin: 0;
	font-size: 1.5rem;
}
.subpage-header p
{
	margin: 4px 0 0;
	color: var(--muted);
	font-size: .82rem;
}
.subpage-back
{
	justify-self: start;
	color: #c0c5cb;
	font-size: .9rem;
	text-decoration: none;
	transition: color 150ms, transform 150ms;
}
.subpage-back:hover
{
	color: white;
	transform: translateX(-2px);
}
.subpage-spacer
{
	width: 80px;
}
/* ****************************************
   CREDITS PAGE
**************************************** */
body#credits
{
	min-height: 100vh;
	min-height: 100dvh;
	padding: 0;
	background: var(--bg);
}
.credits-main
{
	width: min(calc(100% - 40px), 900px);
	margin: 28px auto;
	padding-bottom: 30px;
}
.credits-section
{
	margin-bottom: 24px;
	overflow: hidden;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 16px;
	box-shadow: 0 14px 40px rgba(0, 0, 0, .25);
}
.credits-section-header
{
	padding: 16px 20px;
	background: var(--header-bg);
	border-bottom: 1px solid var(--border);
}
.credits-section-header h2
{
	margin: 0;
	font-size: 1.1rem;
}
.credits-section-body
{
	display: grid;
	gap: 12px;
	padding: 16px;
}
.credit-item,
.stack-credit
{
	padding: 16px;
	background: var(--panel-2);
	border: 1px solid var(--border);
	border-radius: 10px;
}
.credit-item p
{
	margin: 0;
	line-height: 1.55;
}
.credit-item a,
.stack-credit a
{
	color: #ff747a;
	text-decoration: none;
}
.credit-item a:hover,
.stack-credit a:hover
{
	text-decoration: underline;
	text-underline-offset: 3px;
}
/* STACK CREDITS */
.stack-credit
{
	display: flex;
	align-items: flex-start;
	gap: 16px;
}
.credit-creator
{
	width: 58px;
	height: 58px;
	flex: 0 0 58px;
	object-fit: cover;
	border: 1px solid var(--border);
	border-radius: 50%;
	box-shadow: 0 3px 10px rgba(0, 0, 0, .35);
}
.stack-credit-copy
{
	flex: 1;
	min-width: 0;
}
.stack-credit h3
{
	margin: 0 0 6px;
	font-size: 1.05rem;
}
.stack-credit p
{
	margin: 0;
	color: #d8dbe0;
	line-height: 1.5;
}
.credit-sources
{
	display: flex;
	gap: 8px;
	margin-top: 10px;
	color: var(--muted);
	font-size: .88rem;
}
.credit-sources > div
{
	display: flex;
	flex-wrap: wrap;
	gap: 5px 12px;
}
.credit-sources sup
{
	margin-left: -9px;
	color: var(--muted);
}
.affiliate-note
{
	margin: -4px 0 0;
	color: var(--muted);
	font-size: .78rem;
	text-align: center;
}
/* ****************************************
   CREDITS MOBILE
**************************************** */
@media (max-width: 600px)
{
	.subpage-header
	{
		min-height: 72px;
		padding: 8px 14px;
	}
	.subpage-header h1
	{
		font-size: 1.25rem;
	}
	.subpage-header p
	{
		display: none;
	}
	.subpage-back
	{
		font-size: .8rem;
	}
	.subpage-spacer
	{
		width: 62px;
	}
	.credits-main
	{
		width: calc(100% - 20px);
		margin: 10px auto 20px;
	}
	.credits-section
	{
		margin-bottom: 14px;
		border-radius: 12px;
	}
	.credits-section-header
	{
		padding: 13px 14px;
	}
	.credits-section-body
	{
		padding: 10px;
		gap: 10px;
	}
	.credit-item,
	.stack-credit
	{
		padding: 13px;
	}
	.credit-creator
	{
		width: 48px;
		height: 48px;
		flex-basis: 48px;
	}
	.stack-credit
	{
		gap: 12px;
	}
	.credit-sources
	{
		flex-direction: column;
		gap: 4px;
	}
}
/* ****************************************
   STATS PAGE
**************************************** */
body#stats
{
	min-height: 100vh;
	min-height: 100dvh;
	padding: 0;
	background: var(--bg);
}
.stats-main
{
	width: min(calc(100% - 40px), 900px);
	margin: 28px auto;
	padding-bottom: 30px;
}
.stats-groups
{
	display: grid;
	grid-template-columns: repeat( 2, minmax(0, 1fr) );
	align-items: start;
	gap: 20px;
}
.stats-section
{
	margin-bottom: 20px;
	overflow: hidden;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 16px;
	box-shadow: 0 14px 40px rgba(0, 0, 0, .25);
}
.stats-section-header
{
	padding: 16px 20px;
	background: var(--header-bg);
	border-bottom: 1px solid var(--border);
}
.stats-section-header h2
{
	margin: 0;
	font-size: 1.05rem;
}
.stats-section-body
{
	padding: 10px;
}
/* ****************************************
   STATS TABLE
**************************************** */
.stats-table
{
	width: 100%;
	border-spacing: 0;
	border-collapse: separate;
	color: var(--text);
	font-size: .92rem;
}
.stats-table th
{
	padding: 10px 12px;
	color: var(--muted);
	font-size: .75rem;
	font-weight: 600;
	text-align: left;
	text-transform: uppercase;
	letter-spacing: .04em;
	border-bottom: 1px solid var(--border);
}
.stats-table th:last-child
{
	text-align: right;
}
.stats-table th a
{
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: inherit;
	text-decoration: none;
	transition: color 150ms;
}
.stats-table th a:hover
{
	color: var(--text);
}
.stats-table td
{
	position: relative;
	height: 56px;
	padding: 10px 12px;
	border-bottom: 1px solid #252b32;
	vertical-align: middle;
}
.stats-table tr:last-child td
{
	border-bottom: 0;
}
/* ****************************************
   STACK SUMMARY
**************************************** */
.stats-stack
{
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
}
.stats-creator
{
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	object-fit: cover;
	border: 1px solid var(--border);
	border-radius: 50%;
}
/* ****************************************
   PRACTICE TYPE
**************************************** */
.stats-mode
{
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.stats-mode strong
{
	font-size: .9rem;
}
.stats-mode span
{
	color: var(--muted);
	font-size: .72rem;
}
/* ****************************************
   USAGE BAR
**************************************** */
.usage-cell
{
	position: relative;
	min-width: 110px;
	overflow: hidden;
	padding: 9px 10px;
	background: var(--panel-2);
	border: 1px solid #292f36;
	border-radius: 7px;
	text-align: right;
}
.usage-bar
{
	position: absolute;
	inset: 0 auto 0 0;
	width: var(--usage);
	background: rgba( 217, 47, 54, .22 );
	border-right: 1px solid rgba( 217, 47, 54, .35 );
}
.usage-cell span
{
	position: relative;
	z-index: 1;
	font-weight: 700;
}
/* ****************************************
   SORT ARROWS
**************************************** */
.asc-arrow,
.desc-arrow
{
	display: inline-block;
	color: #69717b;
	font-size: 1rem;
	line-height: 1;
	text-decoration: none;
}
.asc-arrow
{
	transform: rotate(-90deg);
}
.desc-arrow
{
	transform: rotate(90deg);
}
.clicked
{
	color: var(--accent);
}
/* ****************************************
   FULL STATS DETAILS
**************************************** */
.stats-table-scroll
{
	overflow-x: auto;
}
.stats-total
{
	font-weight: 700;
}
.stats-delete
{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	background: #37171a;
	color: #ff858a;
	border: 1px solid #633036;
	border-radius: 6px;
	font-size: 1.3rem;
	line-height: 1;
	text-decoration: none;
}
.stats-delete:hover
{
	background: var(--accent);
	color: white;
}
/* ****************************************
   STATS MOBILE
**************************************** */
@media (max-width: 700px)
{
	.stats-main
	{
		width: calc(100% - 20px);
		margin: 10px auto 20px;
	}
	.stats-groups
	{
		grid-template-columns: 1fr;
		gap: 0;
	}
	.stats-section
	{
		margin-bottom: 14px;
		border-radius: 12px;
	}
	.stats-section-header
	{
		padding: 13px 14px;
	}
	.stats-section-body
	{
		padding: 8px;
	}
	.stats-table th
	{
		padding: 8px;
		font-size: .68rem;
	}
	.stats-table td
	{
		height: 52px;
		padding: 8px;
	}
	.stats-creator
	{
		width: 30px;
		height: 30px;
		flex-basis: 30px;
	}
	.usage-cell
	{
		min-width: 90px;
	}
}/* ****************************************
   VIEW / PRINT STACK
**************************************** */
body#stack-view
{
	min-height: 100vh;
	min-height: 100dvh;
	padding: 0;
	background: var(--bg);
}
.stack-view-main
{
	width: min(calc(100% - 40px), 1180px);
	margin: 24px auto 40px;
}
.stack-view-controls
{
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 18px;
}
.stack-view-controls form
{
	display: flex;
	align-items: center;
	gap: 10px;
}
.stack-view-controls label
{
	font-size: .9rem;
	font-weight: 700;
}
.stack-view-controls select
{
	width: 220px;
	min-height: 44px;
}
.print-stack-button,
.stack-view-controls noscript button
{
	min-height: 44px;
	padding: 0 20px;
	border: 0;
	border-radius: 9px;
	background: var(--accent);
	color: white;
	font-weight: 700;
	cursor: pointer;
}
.print-stack-button:hover,
.stack-view-controls noscript button:hover
{
	background: var(--accent-hover);
}
.stack-sheet
{
	padding: 24px;
	background: #f4f4f1;
	border-radius: 14px;
	box-shadow: 0 14px 40px rgba(0, 0, 0, .28);
	color: #111;
}
.stack-sheet-header
{
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-bottom: 18px;
	text-align: center;
}
.stack-sheet-header h2
{
	margin: 0;
	font-size: 1.8rem;
	line-height: 1;
}
.stack-sheet-header p
{
	margin: 5px 0 0;
	color: #555;
	font-size: .88rem;
}
.stack-sheet-header img
{
	width: 46px;
	height: 46px;
	object-fit: cover;
	border: 1px solid #bbb;
	border-radius: 50%;
}
.stack-card-grid
{
	display: grid;
	grid-template-columns: repeat(13, 1fr);
	gap: 8px;
}
.stack-card
{
	min-width: 0;
	text-align: center;
}
.stack-card span
{
	display: block;
	margin-bottom: 4px;
	font-size: .82rem;
	font-weight: 700;
}
.stack-card img
{
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid #aaa;
	border-radius: 4px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, .14);
}
.stack-sheet-footer
{
	margin-top: 15px;
	color: #777;
	font-size: .68rem;
	text-align: center;
}
@media (max-width: 850px)
{
	.stack-card-grid
	{
		grid-template-columns: repeat(8, 1fr);
	}
}
@media (max-width: 600px)
{
	.stack-view-main
	{
		width: calc(100% - 20px);
		margin: 10px auto 20px;
	}
	.stack-view-controls
	{
		align-items: stretch;
		flex-direction: column;
	}
	.stack-view-controls form
	{
		align-items: stretch;
		flex-direction: column;
		gap: 6px;
	}
	.stack-view-controls select,
	.print-stack-button
	{
		width: 100%;
	}
	.stack-sheet
	{
		padding: 14px 10px;
		border-radius: 10px;
	}
	.stack-sheet-header
	{
		margin-bottom: 14px;
	}
	.stack-sheet-header h2
	{
		font-size: 1.45rem;
	}
	.stack-sheet-header img
	{
		width: 40px;
		height: 40px;
	}
	.stack-card-grid
	{
		grid-template-columns: repeat(6, 1fr);
		gap: 8px 5px;
	}
	.stack-card span
	{
		font-size: .72rem;
	}
}
@page
{
	size: landscape;
	margin: .45in .55in;
}
@media print
{
	html,
	body#stack-view
	{
		background: white;
	}
	.stack-view-header,
	.stack-view-controls
	{
		display: none !important;
	}
	.stack-view-main
	{
		width: 100%;
		margin: 0;
	}
	.stack-sheet
	{
		padding: .08in 0 0;
		border-radius: 0;
		box-shadow: none;
	}
	.stack-sheet-header
	{
		margin-bottom: .28in;
	}
	.stack-sheet-header h2
	{
		font-size: 18pt;
	}
	.stack-sheet-header p
	{
		font-size: 8pt;
	}
	.stack-sheet-header img
	{
		width: .4in;
		height: .4in;
	}
	.stack-card-grid
	{
		grid-template-columns: repeat(13, 1fr);
		column-gap: .07in;
		row-gap: .44in;
	}
	.stack-card
	{
		break-inside: avoid;
	}
	.stack-card span
	{
		margin-bottom: .04in;
		font-size: 10pt;
	}
	.stack-card img
	{
		border: .5pt solid #999;
		border-radius: 2px;
		box-shadow: none;
	}
	.stack-sheet-footer
	{
		margin-top: .08in;
		font-size: 6pt;
	}
}