/**
 * Indonesian Typing Test - Stylesheet
 * Restrained palette, one purposeful accent color, clear type hierarchy.
 */

.itt-root {
	/* Every color below is independently themeable from wp-admin ->
	   Typing Test -> Settings; these are just the shipped defaults. */
	--itt-accent: #6366f1;
	--itt-accent-2: #8b5cf6;
	--itt-accent-dark: #4c4de8;
	--itt-accent-light: #eef0ff;
	--itt-bg: #ffffff;
	--itt-surface: #f7f8fb;
	--itt-border: #e3e5ec;
	--itt-text: #1c1e2b;
	--itt-text-muted: #6b7086;
	--itt-text-faint: #b6b9c9;
	--itt-error: #e5484d;
	--itt-error-bg: #fde8e8;
	--itt-success: #1a9e6f;
	--itt-gradient: linear-gradient(135deg, var(--itt-accent), var(--itt-accent-2));
	--itt-radius: 14px;
	--itt-radius-sm: 8px;
	--itt-font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--itt-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	box-sizing: border-box;
	font-family: var(--itt-font-ui);
	color: var(--itt-text);
	max-width: 900px;
	margin: 2em auto;
	line-height: 1.4;
}

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

.itt-noscript-warning {
	padding: 1em;
	background: var(--itt-error-bg);
	color: var(--itt-error);
	border-radius: var(--itt-radius-sm);
}

/* Optional "Stretch to full page width" setting (Settings -> Layout).
   Off by default: the widget normally just fills 100% of whatever column
   your theme gives it, which is what makes it look "centered" on themes
   with a narrower content area - that's the theme's page width, not a
   constraint this plugin adds. Turning this on breaks the widget out of
   that column using the standard full-bleed technique. */
.itt-root.itt-full-bleed {
	width: 100vw;
	max-width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
}

/* ---------------------------------- */
/* Language switcher                   */
/* ---------------------------------- */

/* Rendered by PHP as a plain sibling above .itt-root (real crawlable
   <a> links, no JS needed to read or use them) - deliberately styled
   with neutral colors rather than the widget's theme variables, since
   custom properties set on .itt-root by JS don't cascade to a sibling
   element outside it. */
.itt-lang-switch {
	display: flex;
	justify-content: flex-end;
	gap: 0.5em;
	align-items: center;
	margin-bottom: 0.6em;
	font-size: 0.82rem;
	font-weight: 600;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.itt-lang-switch .itt-lang-link {
	color: #6b7086;
	text-decoration: none;
	padding: 0.3em 0.6em;
	border-radius: 999px;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.itt-lang-switch .itt-lang-link:hover {
	background: #f1f2f6;
	color: #1c1e2b;
	text-decoration: underline;
}

.itt-lang-switch .itt-lang-current {
	padding: 0.3em 0.6em;
	border-radius: 999px;
	background: #eef0ff;
	color: #4c4de8;
}

.itt-app {
	position: relative;
	background: var(--itt-bg);
	border: 1px solid var(--itt-border);
	border-radius: var(--itt-radius);
	padding: 1.5em;
	box-shadow: 0 1px 2px rgba(20, 21, 40, 0.04), 0 8px 24px rgba(20, 21, 40, 0.04);
	overflow: hidden;
}

.itt-app::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: var(--itt-gradient);
}

/* ---------------------------------- */
/* Stats bar                          */
/* ---------------------------------- */

.itt-stats-bar {
	display: flex;
	align-items: stretch;
	gap: 1em;
	margin-bottom: 1.25em;
}

.itt-stat {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	padding: 0.75em 1em;
	background: var(--itt-surface);
	border: 1px solid var(--itt-border);
	border-left: 3px solid var(--itt-border);
	border-radius: var(--itt-radius-sm);
	min-width: 0;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.itt-stat--pending {
	visibility: hidden;
}

.itt-stat-value {
	font-family: var(--itt-font-mono);
	font-size: 1.85rem;
	font-weight: 800;
	line-height: 1.1;
	color: var(--itt-text);
	font-variant-numeric: tabular-nums;
}

.itt-stat-time {
	border-left-color: var(--itt-text-muted);
}

.itt-stat-time .itt-stat-value.itt-time-low {
	color: var(--itt-error);
}

.itt-stat-wpm {
	background: var(--itt-accent-light);
	border-left-color: var(--itt-accent);
}

.itt-stat-wpm .itt-stat-value {
	color: var(--itt-accent-dark);
}

.itt-stat-accuracy {
	background: #eafff5;
	border-left-color: var(--itt-success);
}

.itt-stat-accuracy .itt-stat-value {
	color: var(--itt-success);
}

.itt-stat-label {
	display: flex;
	align-items: center;
	gap: 0.3em;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--itt-text-muted);
	margin-top: 0.15em;
}

.itt-stat-icon {
	font-size: 0.95em;
	line-height: 1;
}

/* ---------------------------------- */
/* Typing text viewport                */
/* ---------------------------------- */

.itt-text-viewport {
	position: relative;
	overflow: hidden;
	background: var(--itt-surface);
	border: 1px solid var(--itt-border);
	border-radius: var(--itt-radius-sm);
	padding: 0.9em 1.1em;
	cursor: text;
	/* Height = 3 lines. Kept in sync with line-height below. */
	height: calc(3 * 2.1em);
}

.itt-text-viewport.itt-focused {
	border-color: var(--itt-accent);
	box-shadow: 0 0 0 3px var(--itt-accent-light);
}

.itt-text-track {
	will-change: transform;
	transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
	font-family: var(--itt-font-mono);
	font-size: 1.15rem;
	line-height: 2.1em;
	white-space: normal;
	word-break: keep-all;
	overflow-wrap: normal;
}

.itt-word {
	display: inline-block;
	white-space: nowrap;
}

.itt-space {
	display: inline;
	white-space: normal;
}

.itt-char {
	position: relative;
	color: var(--itt-text-faint);
	transition: color 0.05s linear;
}

.itt-char.itt-char-correct {
	color: var(--itt-text-muted);
}

.itt-char.itt-char-incorrect {
	color: var(--itt-error);
	background: var(--itt-error-bg);
	border-radius: 2px;
}

.itt-char.itt-char-missed {
	color: var(--itt-error);
	opacity: 0.5;
}

.itt-char.itt-char-extra {
	text-decoration: underline wavy var(--itt-error);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.itt-caret-el {
	display: inline-block;
	width: 2px;
	height: 1.1em;
	vertical-align: text-bottom;
	background: var(--itt-accent);
	margin: 0 -1px;
	animation: itt-blink 1s step-end infinite;
}

@keyframes itt-blink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0; }
}

.itt-hidden-input {
	position: absolute;
	opacity: 0;
	height: 1px;
	width: 1px;
	pointer-events: none;
	left: -9999px;
}

.itt-ready-hint {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	text-align: center;
	background: var(--itt-accent-light);
	color: var(--itt-accent-dark);
	border-radius: var(--itt-radius-sm);
	padding: 0.6em 1em;
	margin-bottom: 1em;
	font-size: 0.88rem;
	font-weight: 600;
}

.itt-ready-hint .itt-ready-hint-sub {
	font-weight: 500;
	color: var(--itt-accent-dark);
	opacity: 0.8;
}

.itt-ready-hint.itt-hidden {
	display: none;
}

/* ---------------------------------- */
/* Controls                            */
/* ---------------------------------- */

.itt-controls {
	display: flex;
	gap: 0.75em;
	margin-top: 1.25em;
}

.itt-btn {
	font-family: var(--itt-font-ui);
	font-size: 0.95rem;
	font-weight: 600;
	padding: 0.65em 1.3em;
	border-radius: var(--itt-radius-sm);
	border: 1px solid transparent;
	cursor: pointer;
	position: relative;
	transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease, color 0.15s ease;
}

.itt-btn:active {
	transform: translateY(1px);
}

.itt-btn:focus-visible {
	outline: 2px solid var(--itt-accent);
	outline-offset: 2px;
}

/* Primary call-to-action buttons: gradient fill + a soft shimmer sweep
   on hover for a bit of life without being distracting. */
.itt-btn-stop,
.itt-btn-tryagain {
	background: var(--itt-gradient);
	color: #ffffff;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(20, 21, 40, 0.16);
}

.itt-btn-stop::after,
.itt-btn-tryagain::after {
	content: '';
	position: absolute;
	top: 0;
	left: -60%;
	width: 40%;
	height: 100%;
	background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
	transform: skewX(-20deg);
	transition: left 0.55s ease;
	pointer-events: none;
}

.itt-btn-stop:hover,
.itt-btn-tryagain:hover {
	box-shadow: 0 6px 18px rgba(20, 21, 40, 0.24);
}

.itt-btn-stop:hover::after,
.itt-btn-tryagain:hover::after {
	left: 130%;
}

/* A real heartbeat has a "lub-dub" double-beat rhythm, not a plain sine
   pulse - this keyframe mimics that so the call-to-action feels alive
   without being distracting between beats. */
.itt-btn-tryagain {
	animation: itt-btn-heartbeat 1.8s ease-in-out infinite;
}

.itt-btn-tryagain:hover {
	animation-play-state: paused;
}

@keyframes itt-btn-heartbeat {
	0%, 100% { transform: scale(1); }
	14% { transform: scale(1.09); }
	28% { transform: scale(1); }
	42% { transform: scale(1.09); }
	70% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
	.itt-btn-tryagain {
		animation: none;
	}
	.itt-btn-stop::after,
	.itt-btn-tryagain::after {
		display: none;
	}
}

.itt-btn-restart {
	background: var(--itt-bg);
	color: var(--itt-text);
	border-color: var(--itt-border);
}

.itt-btn-restart:hover {
	border-color: var(--itt-accent);
	color: var(--itt-accent);
}

/* ---------------------------------- */
/* Results dashboard                   */
/* ---------------------------------- */

.itt-results {
	margin-top: 0.5em;
	transform: translateY(36px);
	opacity: 0;
	transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.itt-results.itt-results-in {
	transform: translateY(0);
	opacity: 1;
}

.itt-results[hidden] {
	display: none;
}

/* Once the results are showing, the typing area behind them is no longer
   relevant - hide it so the dashboard is the only thing on screen instead
   of competing with the (now finished) word list and stat bar above it. */
.itt-app.itt-showing-results .itt-stats-bar,
.itt-app.itt-showing-results .itt-ready-hint,
.itt-app.itt-showing-results .itt-text-viewport {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.itt-results {
		transition: none;
	}
}

.itt-results-header {
	margin-bottom: 1.4em;
}

.itt-results-title {
	font-size: 1.4rem;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.itt-dashboard-grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 1.25em;
}

.itt-card {
	grid-column: span 12;
	background: var(--itt-bg);
	border: 1px solid var(--itt-border);
	border-radius: var(--itt-radius);
	padding: 1.5em;
	animation: itt-card-in 0.4s ease both;
}

@keyframes itt-card-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

.itt-dashboard-grid .itt-card:nth-child(1) { animation-delay: 0s; }
.itt-dashboard-grid .itt-card:nth-child(2) { animation-delay: 0.05s; }
.itt-dashboard-grid .itt-card:nth-child(3) { animation-delay: 0.1s; }
.itt-dashboard-grid .itt-card:nth-child(4) { animation-delay: 0.15s; }
.itt-dashboard-grid .itt-card:nth-child(5) { animation-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
	.itt-card {
		animation: none;
	}
}

.itt-card-title {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--itt-text-muted);
	margin: 0 0 0.9em;
}

.itt-card-subtitle {
	font-size: 0.82rem;
	color: var(--itt-text-muted);
	margin: -0.6em 0 1em;
}

/* Card: headline */
.itt-card-headline {
	grid-column: span 5;
	display: flex;
	flex-direction: column;
	gap: 1em;
}

.itt-headline-primary {
	display: flex;
	align-items: baseline;
	gap: 0.6em;
}

.itt-headline-wpm {
	font-family: var(--itt-font-mono);
	font-size: 3.4rem;
	font-weight: 800;
	line-height: 1;
	color: var(--itt-accent); /* fallback for browsers without background-clip: text */
	background: var(--itt-gradient);
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.itt-headline-wpm-label {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--itt-text-muted);
}

.itt-headline-secondary {
	display: flex;
	align-items: center;
	gap: 1em;
	flex-wrap: wrap;
}

.itt-headline-accuracy {
	font-family: var(--itt-font-mono);
	font-size: 1.4rem;
	font-weight: 700;
}

.itt-headline-accuracy-label {
	font-size: 0.8rem;
	color: var(--itt-text-muted);
	display: block;
	font-weight: 600;
}

.itt-headline-summary {
	margin: 0.2em 0 0;
	font-size: 0.9rem;
	color: var(--itt-text-muted);
	line-height: 1.5;
}

.itt-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	padding: 0.35em 0.9em;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	animation: itt-badge-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
	animation-delay: 0.2s;
}

.itt-badge-icon {
	font-size: 0.95em;
	line-height: 1;
}

@keyframes itt-badge-in {
	from { opacity: 0; transform: scale(0.6); }
	to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
	.itt-badge {
		animation: none;
	}
}

/* Skill badges use a deliberate traffic-light ramp so the result reads
   instantly - red (needs work) through gold (top tier) - independent of
   whatever accent color the site owner has configured. */
.itt-badge-pemula {
	background: var(--itt-error);
	color: #ffffff;
}

.itt-badge-menengah {
	background: #f59e0b;
	color: #ffffff;
}

.itt-badge-mahir {
	background: var(--itt-success);
	color: #ffffff;
}

.itt-badge-ahli {
	background: linear-gradient(135deg, #fbbf24, #f59e0b);
	color: #5b3a00;
	box-shadow: 0 2px 12px rgba(245, 158, 11, 0.4);
}

/* Card: speed breakdown */
.itt-card-breakdown {
	grid-column: span 7;
}

.itt-breakdown-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1em;
}

.itt-breakdown-item {
	display: flex;
	flex-direction: column;
	gap: 0.2em;
	padding: 0.7em 0.8em;
	border-radius: var(--itt-radius-sm);
	background: var(--itt-surface);
	border: 1px solid var(--itt-border);
}

.itt-breakdown-value {
	font-family: var(--itt-font-mono);
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--itt-text);
}

.itt-breakdown-label {
	font-size: 0.78rem;
	color: var(--itt-text-muted);
	font-weight: 700;
}

.itt-breakdown-sub {
	font-size: 0.72rem;
	color: var(--itt-text-faint);
}

/* Each metric gets a background/text color relevant to what it means,
   instead of four identical gray boxes. */
.itt-breakdown-item-accent {
	background: var(--itt-accent-light);
	border-color: transparent;
}

.itt-breakdown-item-accent .itt-breakdown-value {
	color: var(--itt-accent-dark);
}

.itt-breakdown-item-warn {
	background: #fff4e5;
	border-color: transparent;
}

.itt-breakdown-item-warn .itt-breakdown-value {
	color: #b45309;
}

.itt-breakdown-item-info {
	background: #eaf2ff;
	border-color: transparent;
}

.itt-breakdown-item-info .itt-breakdown-value {
	color: #2563eb;
}

/* Card: WPM over time chart */
.itt-card-chart {
	grid-column: span 12;
}

.itt-chart {
	display: flex;
	align-items: flex-end;
	gap: 0.5em;
	height: 140px;
	border-bottom: 1px solid var(--itt-border);
	padding-bottom: 2px;
}

.itt-chart-bar-wrap {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	height: 100%;
	gap: 0.4em;
}

.itt-chart-bar {
	width: 100%;
	max-width: 34px;
	border-radius: 4px 4px 0 0;
	background: var(--itt-accent);
	position: relative;
	min-height: 3px;
	transition: height 0.3s ease;
}

.itt-chart-bar.itt-chart-bar-low {
	background: var(--itt-error);
}

.itt-chart-bar-value {
	position: absolute;
	top: -1.3em;
	left: 50%;
	transform: translateX(-50%);
	font-size: 0.68rem;
	font-weight: 700;
	color: var(--itt-text-muted);
	font-family: var(--itt-font-mono);
	white-space: nowrap;
}

.itt-chart-bar-flag {
	font-size: 0.6rem;
	color: var(--itt-error);
	font-weight: 700;
	text-align: center;
	line-height: 1.2;
}

.itt-chart-axis {
	display: flex;
	gap: 0.5em;
	margin-top: 0.5em;
}

.itt-chart-axis-label {
	flex: 1;
	text-align: center;
	font-size: 0.65rem;
	color: var(--itt-text-faint);
}

.itt-chart-avg-line {
	position: relative;
}

/* Card: keyboard heatmap */
.itt-card-heatmap {
	grid-column: span 7;
}

.itt-keyboard {
	display: flex;
	flex-direction: column;
	gap: 0.35em;
	font-family: var(--itt-font-mono);
}

.itt-kb-row {
	display: flex;
	gap: 0.35em;
	justify-content: center;
}

.itt-kb-key {
	flex: 1;
	max-width: 46px;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--itt-surface);
	border: 1px solid var(--itt-border);
	border-radius: 6px;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--itt-text-muted);
	text-transform: uppercase;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.itt-kb-key.itt-kb-key-hot {
	color: #ffffff;
}

.itt-kb-legend {
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin-top: 0.9em;
	font-size: 0.75rem;
	color: var(--itt-text-muted);
}

.itt-kb-legend-swatch {
	display: inline-block;
	width: 90px;
	height: 8px;
	border-radius: 4px;
	background: linear-gradient(to right, var(--itt-surface), var(--itt-error));
	border: 1px solid var(--itt-border);
}

/* Card: missed words */
.itt-card-missed {
	grid-column: span 5;
}

.itt-chip-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

.itt-chip {
	font-family: var(--itt-font-mono);
	font-size: 0.85rem;
	padding: 0.35em 0.75em;
	background: var(--itt-error-bg);
	color: var(--itt-error);
	border-radius: 6px;
	font-weight: 600;
}

.itt-empty-state {
	display: flex;
	align-items: center;
	gap: 0.6em;
	color: var(--itt-success);
	font-weight: 600;
	background: #eafff5;
	padding: 0.75em 1em;
	border-radius: var(--itt-radius-sm);
}

.itt-results-actions {
	margin-top: 1.5em;
	display: flex;
	justify-content: center;
}

.itt-btn-tryagain {
	padding: 0.75em 2em;
	font-size: 1rem;
}

/* ---------------------------------- */
/* Finish celebration (confetti)       */
/* ---------------------------------- */

/* Fixed (not absolute) so the celebration covers the whole viewport, not
   just the widget's own box - a small confetti pop trapped inside a
   300px-tall card reads as broken, not celebratory. Fixed-position
   escapes the widget's own overflow:hidden automatically (the browser
   only clips a fixed element if an ANCESTOR sets transform/filter/
   perspective, which this plugin never does), so this works even though
   .itt-celebration sits nested inside .itt-app in the markup. The one
   exception is a theme/page-builder wrapper somewhere up the page that
   applies its own transform (e.g. some "reveal on scroll" effects) -
   that would re-scope "fixed" to that wrapper instead of the viewport. */
.itt-celebration {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--itt-bg);
	cursor: pointer;
	animation: itt-celebration-in 0.2s ease both;
}

.itt-celebration[hidden] {
	display: none;
}

.itt-celebration.itt-celebration-out {
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
}

@keyframes itt-celebration-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

.itt-confetti-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.itt-celebration-message {
	position: relative;
	z-index: 1;
	max-width: 90%;
	text-align: center;
	font-size: 1.9rem;
	font-weight: 800;
	color: var(--itt-text);
	padding: 0 1em;
	animation: itt-celebration-msg-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
	animation-delay: 0.1s;
}

.itt-celebration-message[hidden] {
	display: none;
}

.itt-celebration-emoji {
	display: block;
	font-size: 4rem;
	line-height: 1;
	margin-bottom: 0.25em;
}

@media (max-width: 480px) {
	.itt-celebration-message {
		font-size: 1.4rem;
	}
	.itt-celebration-emoji {
		font-size: 3rem;
	}
}

@keyframes itt-celebration-msg-in {
	from { opacity: 0; transform: scale(0.7) translateY(10px); }
	to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.itt-celebration,
	.itt-celebration-message {
		animation: none;
	}
}

/* ---------------------------------- */
/* Responsive                          */
/* ---------------------------------- */

@media (max-width: 720px) {
	.itt-card-headline,
	.itt-card-breakdown,
	.itt-card-heatmap,
	.itt-card-missed,
	.itt-card-chart {
		grid-column: span 12;
	}
}

@media (max-width: 560px) {
	.itt-root {
		margin: 1em auto;
		font-size: 0.95rem;
	}

	.itt-app {
		padding: 1em;
		border-radius: 10px;
	}

	.itt-stats-bar {
		flex-wrap: wrap;
		gap: 0.6em;
	}

	.itt-stat {
		flex: 1 1 calc(33% - 0.6em);
		padding: 0.6em 0.7em;
	}

	.itt-stat-value {
		font-size: 1.3rem;
	}

	.itt-text-viewport {
		height: calc(3 * 1.9em);
		padding: 0.7em 0.8em;
	}

	.itt-text-track {
		font-size: 1rem;
		line-height: 1.9em;
	}

	.itt-controls {
		flex-direction: column;
	}

	.itt-btn {
		width: 100%;
		text-align: center;
	}

	.itt-breakdown-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.itt-headline-wpm {
		font-size: 2.6rem;
	}

	.itt-chart {
		height: 110px;
	}

	.itt-chart-bar-value {
		font-size: 0.58rem;
	}

	.itt-kb-key {
		max-width: 30px;
		font-size: 0.62rem;
		border-radius: 4px;
	}

	.itt-kb-row {
		gap: 0.2em;
	}

	.itt-keyboard {
		gap: 0.2em;
	}
}

@media (max-width: 380px) {
	.itt-stat {
		flex: 1 1 100%;
	}

	.itt-headline-wpm {
		font-size: 2.2rem;
	}
}
