/*
 * Typingo app and landing styles: home sections, finger colours, key chips,
 * the Journey map, day pages and app page shells. Loaded only on the home,
 * journey, contact and app views (see inc/enqueue.php).
 */

/* ---------- Finger colours ---------- */
.ty-finger--lp { --ty-f: var(--ty-f-lp); }
.ty-finger--lr { --ty-f: var(--ty-f-lr); }
.ty-finger--lm { --ty-f: var(--ty-f-lm); }
.ty-finger--li { --ty-f: var(--ty-f-li); }
.ty-finger--ri { --ty-f: var(--ty-f-ri); }
.ty-finger--rm { --ty-f: var(--ty-f-rm); }
.ty-finger--rr { --ty-f: var(--ty-f-rr); }
.ty-finger--rp { --ty-f: var(--ty-f-rp); }
.ty-finger--th { --ty-f: var(--ty-f-th); }
.ty-finger--none { --ty-f: var(--ty-line); }

/* ---------- Shared app page chrome ---------- */
.ty-app-page {
	padding-block: var(--ty-step);
}

.ty-page-intro {
	max-width: var(--ty-narrow);
	margin-bottom: 2rem;
}

.ty-page-intro__text {
	color: var(--ty-muted);
	font-size: 1.125rem;
}

.ty-section-title {
	margin-bottom: 0.75rem;
}

.ty-section-lead {
	max-width: 68ch;
	margin-bottom: 2rem;
	color: var(--ty-muted);
	font-size: 1.125rem;
}

.ty-questions {
	margin-top: 2rem;
	color: var(--ty-muted);
}

/* ---------- App container ---------- */
.typingo-app {
	position: relative;
	margin-block: 2rem;
	padding: clamp(1.25rem, 3vw, 2rem);
	border: 1px solid var(--ty-line);
	border-radius: calc(var(--ty-radius) + 4px);
	background: var(--ty-surface);
	box-shadow: var(--ty-shadow);
	scroll-margin-top: 1rem;
}

.typingo-app:focus {
	outline: none;
}

.typingo-app:focus-visible {
	outline: 3px solid var(--ty-focus);
	outline-offset: 3px;
}

/* Reserve the demo's final height before it mounts, so nothing below it jumps. */
.typingo-app[data-typingo-app="demo"]:has([data-typingo-shell]) {
	min-height: calc(min(900px, 100vw - 5rem) * 0.42 + 13rem);
}

.ty-app-shell__title {
	font-size: 1.35rem;
}

.ty-app-shell__text {
	max-width: 68ch;
	color: var(--ty-muted);
}

.ty-app-shell__points {
	display: grid;
	gap: 0.5rem;
	margin-bottom: 0;
	padding: 0;
	list-style: none;
}

.ty-app-shell__points li {
	position: relative;
	padding-left: 1.75rem;
}

.ty-app-shell__points li::before {
	content: "";
	position: absolute;
	top: 0.5em;
	left: 0.2rem;
	width: 0.7rem;
	height: 0.7rem;
	border-radius: 50%;
	background: var(--ty-accent);
}

.ty-app-shell noscript .ty-notice {
	margin: 1.25rem 0 0;
}

/* ---------- Message cards (lesson steps, empty states) ---------- */
.ty-card-note {
	padding: clamp(1.25rem, 3.5vw, 2.25rem);
	border: 1px solid var(--ty-line);
	border-radius: var(--ty-radius);
	background: var(--ty-surface);
}

.ty-card-note__title {
	font-size: 1.3rem;
}

.ty-card-note p:last-child {
	margin-bottom: 0;
}

/* ---------- Key chips ---------- */
.ty-key {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0.35rem 0.35rem 0;
	padding: 0.2rem 0.6rem 0.2rem 0.25rem;
	border: 1px solid color-mix(in srgb, var(--ty-f) 60%, var(--ty-line));
	border-radius: 999px;
	background: color-mix(in srgb, var(--ty-f) 16%, var(--ty-surface));
	font-size: 0.85rem;
	line-height: 1.2;
	white-space: nowrap;
}

.ty-key kbd {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.9rem;
	height: 1.9rem;
	padding: 0 0.4rem;
	border-radius: 6px;
	background: var(--ty-f);
	color: #1b1f2a;
	font-size: 1rem;
	font-weight: 600;
	box-shadow: inset 0 -2px 0 rgb(0 0 0 / 15%);
}

.ty-key__who {
	font-weight: 600;
}

/* ---------- Home: hero ---------- */
.ty-hero {
	padding-block: clamp(2.5rem, 7vw, 5.5rem);
	border-bottom: 1px solid var(--ty-line);
	background:
		radial-gradient(60rem 30rem at 85% -10%, color-mix(in srgb, var(--ty-primary) 12%, transparent), transparent 70%),
		var(--ty-bg);
}

.ty-hero__inner {
	display: grid;
	align-items: center;
	gap: 2.5rem;
}

@media (min-width: 960px) {
	.ty-hero__inner {
		grid-template-columns: 1.05fr 1fr;
	}
}

.ty-hero__title {
	max-width: 18ch;
	font-size: clamp(2.2rem, 5.5vw, 3.6rem);
	line-height: 1.08;
	letter-spacing: -0.025em;
}

.ty-hero__lead {
	max-width: 44ch;
	color: var(--ty-muted);
	font-size: clamp(1.1rem, 2vw, 1.3rem);
}

.ty-hero__reassure {
	margin: 0;
	color: var(--ty-muted);
	font-size: 0.95rem;
}

/* ---------- Home: home row illustration ---------- */
.ty-home-row {
	margin: 0;
	padding: clamp(1rem, 3vw, 1.75rem);
	border: 1px solid var(--ty-line);
	border-radius: calc(var(--ty-radius) + 6px);
	background: var(--ty-surface);
	box-shadow: var(--ty-shadow);
}

.ty-home-row__keys {
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	gap: clamp(0.25rem, 1vw, 0.6rem);
}

.ty-home-row__key,
.ty-home-row__space {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	min-width: 0;
}

.ty-home-row__key:nth-child(4) {
	margin-right: clamp(0.25rem, 2vw, 1rem);
}

.ty-home-row__key kbd,
.ty-home-row__space kbd {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1;
	border: 1px solid color-mix(in srgb, var(--ty-f) 70%, #000);
	border-radius: 10px;
	background: color-mix(in srgb, var(--ty-f) 30%, var(--ty-surface));
	color: var(--ty-ink);
	font-size: clamp(1rem, 2.6vw, 1.5rem);
	font-weight: 600;
	box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--ty-f) 55%, transparent);
}

.ty-home-row__key.has-bump kbd {
	position: relative;
}

.ty-home-row__key.has-bump kbd::after {
	content: "";
	position: absolute;
	bottom: 10%;
	left: 50%;
	width: 26%;
	height: 3px;
	border-radius: 2px;
	background: currentcolor;
	transform: translateX(-50%);
	opacity: 0.55;
}

.ty-home-row__space {
	grid-column: 3 / span 4;
	margin-top: 0.5rem;
}

.ty-home-row__space kbd {
	aspect-ratio: auto;
	height: clamp(2.25rem, 5vw, 3rem);
	font-size: 0.95rem;
}

.ty-home-row__who {
	max-width: 100%;
	font-size: clamp(0.6rem, 1.25vw, 0.8rem);
	font-weight: 600;
	line-height: 1.15;
	text-align: center;
	overflow-wrap: anywhere;
}

.ty-home-row figcaption {
	margin-top: 1rem;
	text-align: center;
}

/* ---------- Home: sections ---------- */
.ty-section {
	padding-block: var(--ty-step);
}

.ty-section--tint {
	background: var(--ty-surface-2);
}

.ty-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
	gap: 1.25rem;
	padding: 0;
	list-style: none;
	counter-reset: ty-step;
}

.ty-step {
	padding: 1.5rem;
	border: 1px solid var(--ty-line);
	border-radius: var(--ty-radius);
	background: var(--ty-surface);
}

.ty-step p:last-child {
	margin-bottom: 0;
}

.ty-step__range {
	margin-bottom: 0.25rem;
	color: var(--ty-primary);
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

@media (prefers-color-scheme: dark) {
	.ty-step__range {
		color: var(--ty-link);
	}
}

.ty-characters {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ty-character {
	padding: 1.25rem;
	border: 1px solid var(--ty-line);
	border-top: 6px solid var(--ty-f);
	border-radius: var(--ty-radius);
	background: var(--ty-surface);
}

.ty-character .ty-avatar {
	display: block;
	margin-bottom: 0.5rem;
}

.ty-character__name {
	margin-bottom: 0.1rem;
}

.ty-character__finger {
	margin-bottom: 0.5rem;
	color: var(--ty-muted);
	font-size: 0.9rem;
}

.ty-character__keys {
	margin-bottom: 0.5rem;
	font-family: var(--ty-font-mono);
	font-weight: 600;
	word-spacing: 0.2em;
}

.ty-character__line {
	margin: 0;
	font-size: 0.95rem;
}

.ty-features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	gap: 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ty-features p {
	margin: 0;
	color: var(--ty-muted);
}

.ty-teaser {
	display: grid;
	align-items: center;
	gap: 1rem 2rem;
}

@media (min-width: 800px) {
	.ty-teaser {
		grid-template-columns: 1fr auto;
	}
}

.ty-teaser p {
	max-width: 62ch;
}

.ty-faq__item {
	border-bottom: 1px solid var(--ty-line);
}

.ty-faq__item summary {
	position: relative;
	padding: 1rem 2.25rem 1rem 0;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

.ty-faq__item summary::-webkit-details-marker {
	display: none;
}

.ty-faq__item summary::after {
	content: "+";
	position: absolute;
	top: 0.8rem;
	right: 0.25rem;
	color: var(--ty-muted);
	font-size: 1.4rem;
	line-height: 1;
}

.ty-faq__item[open] summary::after {
	content: "−";
}

.ty-faq__item p {
	color: var(--ty-muted);
}

/* ---------- Journey map ---------- */
.ty-week {
	margin-bottom: 2.5rem;
}

.ty-week .ty-section-title {
	font-size: 1.3rem;
}

.ty-day-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ty-day-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 1.1rem 1.2rem;
	border: 1px solid var(--ty-line);
	border-radius: var(--ty-radius);
	background: var(--ty-surface);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ty-day-card:hover,
.ty-day-card:focus-within {
	border-color: var(--ty-primary);
	box-shadow: var(--ty-shadow);
}

.ty-day-card--checkpoint,
.ty-day-card--graduation {
	background: color-mix(in srgb, var(--ty-accent) 8%, var(--ty-surface));
}

.ty-day-card__number {
	margin: 0 0 0.2rem;
	color: var(--ty-muted);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ty-day-card__title {
	margin-bottom: 0.6rem;
	font-size: 1.05rem;
}

.ty-day-card__title a {
	color: var(--ty-ink);
	text-decoration: none;
}

/* Whole card is clickable; the link stays the only focusable element. */
.ty-day-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.ty-day-card__keys {
	margin-bottom: 0.4rem;
}

.ty-day-card__target {
	margin: auto 0 0;
	color: var(--ty-muted);
	font-size: 0.88rem;
}

/* Progress states added by the journey script. */
.ty-journey-banner {
	margin-bottom: 2rem;
	padding: 1.25rem 1.5rem;
	border-radius: var(--ty-radius);
	background: color-mix(in srgb, var(--ty-primary) 8%, var(--ty-surface));
}

.ty-journey-banner[hidden] {
	display: none;
}

.ty-journey-banner__title {
	margin-bottom: 0.4rem;
	font-size: 1.15rem;
	font-weight: 600;
}

.ty-journey-banner__base {
	color: var(--ty-muted);
}

.ty-journey-banner .ty-actions {
	margin: 0.75rem 0 0;
}

.ty-day-card__status {
	align-self: flex-start;
	margin-bottom: 0.4rem;
	padding: 0.1rem 0.55rem;
	border-radius: 999px;
	background: var(--ty-surface-2);
	color: var(--ty-muted);
	font-size: 0.75rem;
	font-weight: 600;
}

.ty-day-card.is-done {
	border-color: color-mix(in srgb, var(--ty-accent) 55%, var(--ty-line));
}

.ty-day-card.is-done .ty-day-card__status {
	background: color-mix(in srgb, var(--ty-accent) 18%, var(--ty-surface));
	color: var(--ty-ink);
}

.ty-day-card.is-current {
	border: 2px solid var(--ty-primary);
	box-shadow: var(--ty-shadow);
}

.ty-day-card.is-current .ty-day-card__status {
	background: var(--ty-primary);
	color: var(--ty-on-primary);
}

.ty-day-card.is-locked {
	opacity: 0.62;
}

/* ---------- Day page ---------- */
.ty-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
	color: var(--ty-muted);
	font-size: 0.92rem;
}

.ty-breadcrumbs li + li::before {
	content: "›";
	margin-right: 0.25rem;
}

.ty-lesson__header {
	margin-bottom: 2rem;
}

.ty-lesson__title {
	max-width: 24ch;
}

.ty-lesson__focus {
	max-width: 60ch;
	color: var(--ty-muted);
	font-size: 1.15rem;
}

.ty-lesson__facts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 2rem;
}

.ty-lesson__facts p {
	margin: 0;
}

.ty-lesson__label {
	display: block;
	margin-bottom: 0.3rem;
	color: var(--ty-muted);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ty-lesson__target {
	font-weight: 600;
}

.ty-lesson__body {
	display: grid;
	gap: 1.5rem 3rem;
}

@media (min-width: 960px) {
	.ty-lesson__body {
		grid-template-columns: minmax(0, 1fr) 340px;
		align-items: start;
	}
}

.ty-lesson__steps {
	padding: 1.25rem 1.4rem;
	border-radius: var(--ty-radius);
	background: var(--ty-surface-2);
	font-size: 0.95rem;
}

.ty-lesson__steps-title {
	font-size: 1.05rem;
}

.ty-lesson__steps ol {
	margin: 0;
	padding-left: 1.2rem;
}

.ty-lesson__steps li + li {
	margin-top: 0.35rem;
}

.ty-day-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
	font-weight: 600;
}

.ty-day-nav a {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
}

.ty-day-nav__map {
	margin-inline: auto;
}

/* ---------- Job-Ready presets ---------- */
.ty-preset-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	gap: 1rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}

.ty-preset {
	padding: 1.25rem;
	border: 1px solid var(--ty-line);
	border-radius: var(--ty-radius);
	background: var(--ty-surface);
}

.ty-preset__title {
	font-size: 1.1rem;
}

.ty-preset__facts {
	display: grid;
	gap: 0.35rem;
	margin: 0;
}

.ty-preset__facts div {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding-bottom: 0.35rem;
	border-bottom: 1px dashed var(--ty-line);
}

.ty-preset__facts dt {
	color: var(--ty-muted);
}

.ty-preset__facts dd {
	margin: 0;
	font-weight: 600;
}

/* ---------- Contact ---------- */
.ty-contact-card {
	margin-top: 2rem;
	padding: 1.5rem;
	border: 1px solid var(--ty-line);
	border-radius: var(--ty-radius);
	background: var(--ty-surface);
}

.ty-contact-card__hint {
	margin: 0;
	color: var(--ty-muted);
	font-size: 0.95rem;
}

/* color-mix() fallback for older browsers: solid soft tints. */
@supports not (background: color-mix(in srgb, red 10%, white)) {
	.ty-key,
	.ty-home-row__key kbd,
	.ty-home-row__space kbd {
		background: var(--ty-surface-2);
		border-color: var(--ty-f);
	}

	.ty-day-card--checkpoint,
	.ty-day-card--graduation {
		background: var(--ty-surface);
	}
}

/* ---------- Journey banner progress bar ---------- */
.ty-journey-banner__bar,
.ty-pnext__bar {
	height: 8px;
	margin: 0.25rem 0 0.75rem;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--ty-accent) calc(var(--ty-progress, 0) * 100%), color-mix(in srgb, var(--ty-ink) 10%, transparent) 0);
}

/* ---------- My Progress ---------- */
.ty-progress {
	display: grid;
	gap: 2.5rem;
}

.ty-progress__body {
	display: grid;
	gap: 2.5rem;
}

.ty-progress__or {
	align-self: center;
	color: var(--ty-muted);
}

.ty-psection__title {
	margin-bottom: 0.35rem;
	font-size: 1.35rem;
}

.ty-psection__lead {
	max-width: 68ch;
	margin-bottom: 1.1rem;
	color: var(--ty-muted);
}

.ty-pnext {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	padding: clamp(1.1rem, 3vw, 1.6rem);
	border-radius: var(--ty-radius);
	background: color-mix(in srgb, var(--ty-primary) 8%, var(--ty-surface));
}

.ty-pnext__text {
	flex: 1 1 320px;
}

.ty-pnext__eyebrow {
	margin: 0 0 0.2rem;
	color: var(--ty-muted);
	font-size: 0.9rem;
}

.ty-pnext__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
}

.ty-pnext__bar {
	margin: 0.75rem 0 0;
}

.ty-pstats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
	gap: 1rem;
}

.ty-pstat {
	padding: 1.1rem 1.2rem;
	border: 1px solid var(--ty-line);
	border-radius: 16px;
	background: var(--ty-surface);
}

.ty-pstat p {
	margin: 0;
}

.ty-pstat__label {
	color: var(--ty-muted);
	font-size: 0.9rem;
}

.ty-pstat__value {
	font-size: 1.9rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	line-height: 1.3;
}

.ty-pstat__note {
	color: var(--ty-muted);
	font-size: 0.82rem;
}

.ty-pdays {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ty-pdays__day a,
.ty-pdays__day span {
	display: grid;
	place-items: center;
	aspect-ratio: 1;
	min-height: 44px;
	border: 1px solid var(--ty-line);
	border-radius: 12px;
	background: var(--ty-surface);
	color: var(--ty-ink);
	font-weight: 500;
	text-decoration: none;
}

.ty-pdays__day.is-done a {
	border-color: transparent;
	background: color-mix(in srgb, var(--ty-accent) 80%, #000);
	color: #fff;
}

.ty-pdays__day.is-current a {
	border: 2px solid var(--ty-primary);
	color: var(--ty-link);
	font-weight: 700;
}

.ty-pdays__day.is-locked span {
	color: var(--ty-muted);
	background: var(--ty-surface-2);
}

.ty-pdays__day a:hover {
	border-color: var(--ty-primary);
}

.ty-pcharts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
	gap: 1rem;
}

.ty-pchart {
	margin: 0;
	padding: 1rem 1.1rem 0.6rem;
	border: 1px solid var(--ty-line);
	border-radius: 16px;
	background: var(--ty-surface);
}

.ty-pchart__title {
	margin-bottom: 0.3rem;
	color: var(--ty-ink);
	font-size: 0.95rem;
	font-weight: 600;
}

.ty-chart {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.ty-chart__grid {
	stroke: var(--ty-line);
	stroke-width: 1;
}

.ty-chart__tick {
	fill: var(--ty-muted);
	font-family: var(--ty-font-sans);
	font-size: 12px;
}

.ty-chart {
	--ty-tone: var(--ty-primary);
}

.ty-chart--accent {
	--ty-tone: var(--ty-accent);
}

.ty-chart__line {
	fill: none;
	stroke: var(--ty-tone);
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ty-chart__area {
	fill: color-mix(in srgb, var(--ty-tone) 12%, transparent);
}

.ty-chart__dot {
	fill: var(--ty-surface);
	stroke: var(--ty-tone);
	stroke-width: 2;
}

.ty-chart__dot.is-last {
	fill: var(--ty-tone);
}

.ty-ptable {
	margin-top: 1rem;
}

.ty-ptable summary {
	font-weight: 600;
	cursor: pointer;
}

.ty-ptable table {
	margin-top: 0.75rem;
	font-size: 0.95rem;
	font-variant-numeric: tabular-nums;
}

.ty-ptable th {
	color: var(--ty-muted);
	font-weight: 500;
}

.ty-pletters {
	display: grid;
	gap: 0.45rem;
	max-width: 640px;
}

.ty-pletters__row {
	display: flex;
	gap: 0.45rem;
}

.ty-pletters__row:nth-child(2) {
	padding-left: 3%;
}

.ty-pletters__row:nth-child(3) {
	padding-left: 8%;
}

.ty-pletter {
	display: grid;
	flex: 0 1 56px;
	place-items: center;
	aspect-ratio: 1;
	border: 1px solid var(--ty-line);
	border-bottom: 4px solid var(--ty-f);
	border-radius: 12px;
	background: var(--ty-surface);
	color: var(--ty-muted);
	font-family: var(--ty-font-mono);
	font-size: clamp(0.95rem, 2.5vw, 1.25rem);
	font-weight: 500;
}

.ty-pletter.is-learning {
	background: color-mix(in srgb, var(--ty-f) 22%, var(--ty-surface));
	color: var(--ty-ink);
}

.ty-pletter.is-mastered {
	border-color: color-mix(in srgb, var(--ty-f) 70%, #000);
	background: var(--ty-f);
	color: #1a1d2e;
	font-weight: 700;
}

.ty-plegend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
	color: var(--ty-muted);
	font-size: 0.9rem;
}

.ty-plegend li {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}

.ty-plegend__swatch {
	width: 1rem;
	height: 1rem;
	border: 1px solid var(--ty-line);
	border-radius: 4px;
	background: var(--ty-surface);
}

.ty-plegend .is-learning .ty-plegend__swatch {
	background: color-mix(in srgb, var(--ty-f-ri) 22%, var(--ty-surface));
}

.ty-plegend .is-mastered .ty-plegend__swatch {
	background: var(--ty-f-ri);
}

.ty-pfingers {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ty-pfinger {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.35rem 0.75rem;
	padding: 0.9rem 1rem;
	border: 1px solid var(--ty-line);
	border-left: 5px solid var(--ty-f);
	border-radius: 14px;
	background: var(--ty-surface);
}

.ty-pfinger__who {
	font-weight: 600;
}

.ty-pfinger__keys {
	color: var(--ty-muted);
	font-family: var(--ty-font-mono);
	font-size: 0.85rem;
	text-align: right;
}

.ty-pfinger__meter {
	grid-column: 1 / -1;
	height: 8px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--ty-f) calc(var(--ty-progress, 0) * 100%), var(--ty-surface-2) 0);
}

.ty-pfinger__value {
	grid-column: 1 / -1;
	color: var(--ty-muted);
	font-size: 0.85rem;
}

.ty-pdata__import {
	position: relative;
}

.ty-pdata__import:focus-within {
	outline: 3px solid var(--ty-focus);
	outline-offset: 2px;
}

.ty-pdata__confirm {
	margin-top: 1rem;
}

.ty-pdata__confirm[hidden],
.ty-pmessage[hidden] {
	display: none;
}

.ty-pdata__danger {
	border-color: var(--ty-bad);
	background: var(--ty-bad);
	box-shadow: none;
}

.ty-pdata__danger:hover {
	box-shadow: none;
}

.ty-pmessage {
	margin-top: 1rem;
}

.ty-psync__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	margin-top: 1rem;
}

.ty-psync {
	margin: 0;
	color: var(--ty-muted);
}

.ty-psync[data-status="error"],
.ty-psync[data-status="offline"] {
	color: var(--ty-bad);
}

/* The progress page is a set of cards itself, so its app container is not boxed. */
.typingo-app[data-typingo-app="progress"] {
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
}
