/* =========================================================================
   Labouchere page (/roulette-strategies/labouchere/): the line tracker and
   the starting-line chart. Loaded after sys.css.
   ========================================================================= */

/* ---------- Tracker ---------- */

.lt {
	margin-top: 28px;
	padding: 24px;
	background: var(--rw-white);
	border: 1px solid var(--rw-line);
	border-radius: 20px;
	box-shadow: 0 18px 40px -30px rgba(14, 16, 19, .35);
}

.lt__controls {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: 18px 28px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--rw-line);
}

.lt__field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.lt__label {
	color: var(--rw-muted);
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.lt__label + .lt__pills + .lt__label {
	margin-top: 6px;
}

.lt__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.rw-home .lt__pills button {
	min-height: 40px;
	margin: 0;
	padding: 8px 14px;
	background: var(--rw-white);
	border: 1px solid var(--rw-line);
	border-radius: 999px;
	color: var(--rw-text);
	font-family: var(--rw-body);
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

.rw-home .lt__pills button:hover,
.rw-home .lt__pills button:focus {
	background: var(--rw-white);
	border-color: var(--rw-ink);
	color: var(--rw-ink);
}

.rw-home .lt__pills button[aria-pressed="true"] {
	background: var(--rw-ink);
	border-color: var(--rw-ink);
	color: #FFFFFF;
}

.rw-home .lt__pills button:focus-visible {
	outline: 3px solid var(--rw-gold);
	outline-offset: 2px;
}

.lt__own {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	color: var(--rw-text-2);
	font-size: 14px;
	font-weight: 700;
}

.rw-home .lt__own input {
	width: 190px;
	max-width: 100%;
	min-height: 40px;
	margin: 0;
	padding: 8px 12px;
	background: var(--rw-paper);
	border: 1px solid var(--rw-line);
	border-radius: 10px;
	color: var(--rw-ink);
	font-family: var(--rw-body);
	font-size: 15px;
	font-weight: 700;
}

.rw-home .lt__own input:focus {
	border-color: var(--rw-ink);
	outline: none;
	box-shadow: 0 0 0 3px rgba(212, 168, 75, .35);
}

.rw-home .lt__own input.is-bad {
	border-color: var(--rw-bad);
}

.lt__note {
	color: var(--rw-muted);
	font-size: 12.5px;
	line-height: 1.4;
}

.lt__note.is-bad {
	color: var(--rw-bad);
	font-weight: 700;
}

.lt__main {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 24px;
	align-items: start;
	margin-top: 22px;
}

.lt__play {
	min-width: 0;
	padding: 22px;
	background: radial-gradient(120% 140% at 50% 0, #1E7A52 0, #145C3E 70%);
	border: 6px solid #3B2A17;
	border-radius: 18px;
	color: #FFFFFF;
}

.rw-home .lt__k {
	color: rgba(255, 255, 255, .75);
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.rw-home .lt__k--gold {
	color: var(--rw-gold);
}

/* The line: numbers as chips; crossed-off numbers fade and strike through. */
.rw-home .lt__line {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	min-height: 52px;
	margin: 12px 0 18px;
	padding: 0;
	list-style: none;
}

.lt__num {
	position: relative;
	display: grid;
	place-items: center;
	min-width: 46px;
	height: 46px;
	padding: 0 10px;
	background: rgba(0, 0, 0, .28);
	border: 2px solid rgba(255, 255, 255, .55);
	border-radius: 999px;
	color: #FFFFFF;
	font-family: var(--rw-display);
	font-size: 18px;
	font-weight: 800;
	line-height: 1;
	transition: opacity .2s ease, transform .2s ease;
}

.lt__num.is-end {
	background: var(--rw-gold);
	border-color: #F3E6C4;
	color: var(--rw-ink);
	box-shadow: 0 0 0 3px rgba(212, 168, 75, .35);
}

.lt__num.is-added {
	border-style: dashed;
}

.lt__num.is-added.is-end {
	border-style: dashed;
	border-color: var(--rw-ink);
}

.lt__num.is-crossed {
	opacity: .35;
	background: transparent;
	box-shadow: none;
}

.lt__num.is-crossed::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 6px;
	right: 6px;
	height: 2px;
	background: #FFFFFF;
	transform: rotate(-20deg);
}

.lt__num.is-new {
	animation: lt-pop .3s ease;
}

@keyframes lt-pop {
	from {
		transform: scale(.6);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}

.lt__next {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 14px;
	padding: 14px 16px;
	background: rgba(0, 0, 0, .3);
	border-radius: 14px;
}

.rw-home .lt__next-k {
	color: rgba(255, 255, 255, .75);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.lt__next strong {
	color: #FFFFFF;
	font-family: var(--rw-display);
	font-size: 34px;
	font-weight: 800;
	line-height: 1;
}

.rw-home .lt__next-how {
	color: rgba(255, 255, 255, .8);
	font-size: 14px;
}

.lt__btns {
	display: grid;
	grid-template-columns: 1fr 1fr 1.2fr;
	gap: 10px;
	margin-top: 16px;
}

.rw-home .lt__btn {
	min-height: 52px;
	margin: 0;
	padding: 10px 14px;
	border: 0;
	border-radius: 12px;
	font-family: var(--rw-body);
	font-size: 16px;
	font-weight: 800;
	line-height: 1.2;
	cursor: pointer;
	transition: transform .1s ease, filter .15s ease;
}

.rw-home .lt__btn:hover:not(:disabled),
.rw-home .lt__btn:focus:not(:disabled) {
	filter: brightness(1.08);
}

.rw-home .lt__btn:active:not(:disabled) {
	transform: translateY(1px);
}

.rw-home .lt__btn:focus-visible {
	outline: 3px solid var(--rw-gold);
	outline-offset: 2px;
}

.rw-home .lt__btn:disabled {
	opacity: .4;
	cursor: not-allowed;
}

.rw-home .lt__btn--win,
.rw-home .lt__btn--win:hover,
.rw-home .lt__btn--win:focus {
	background: #2FAE73;
	color: #FFFFFF;
}

.rw-home .lt__btn--loss,
.rw-home .lt__btn--loss:hover,
.rw-home .lt__btn--loss:focus {
	background: var(--rw-red);
	color: #FFFFFF;
}

.rw-home .lt__btn--spin,
.rw-home .lt__btn--spin:hover,
.rw-home .lt__btn--spin:focus {
	background: var(--rw-white);
	color: var(--rw-ink);
}

.lt__minor {
	display: flex;
	gap: 18px;
	margin-top: 12px;
}

.rw-home .lt__link {
	margin: 0;
	padding: 4px 0;
	background: none;
	border: 0;
	color: rgba(255, 255, 255, .85);
	font-family: var(--rw-body);
	font-size: 14px;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.rw-home .lt__link:hover,
.rw-home .lt__link:focus {
	background: none;
	color: #FFFFFF;
}

.rw-home .lt__link:disabled {
	opacity: .4;
	cursor: not-allowed;
}

.rw-home .lt__status {
	margin-top: 14px;
	padding: 12px 14px;
	background: rgba(255, 255, 255, .1);
	border-left: 3px solid var(--rw-gold);
	border-radius: 0 10px 10px 0;
	color: #FFFFFF;
	font-size: 14.5px;
	line-height: 1.5;
}

.lt__status.is-done {
	background: rgba(47, 174, 115, .25);
	border-left-color: #4FD39A;
}

.lt__status.is-bust {
	background: rgba(200, 16, 46, .3);
	border-left-color: #FF8A99;
}

.rw-home .lt__hist {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}

.rw-home .lt__hist:empty {
	display: none;
}

.lt__hist li {
	display: grid;
	place-items: center;
	min-width: 30px;
	height: 26px;
	padding: 0 6px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 800;
}

.lt__hist li.is-w {
	background: #2FAE73;
	color: #FFFFFF;
}

.lt__hist li.is-l {
	background: rgba(0, 0, 0, .45);
	color: #FFB3BE;
}

.lt__hist li.is-sep {
	min-width: 0;
	padding: 0 4px;
	background: none;
	color: var(--rw-gold);
}

/* Stats card */
.lt__card {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 22px;
	background: var(--rw-ink);
	border-radius: 18px;
	color: var(--rw-on-dark);
}

.rw-home .lt__facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin: 0;
}

.lt__facts div {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
	padding: 12px;
	background: var(--rw-ink-3);
	border: 1px solid var(--rw-ink-line);
	border-radius: 12px;
}

.lt__facts div:nth-child(3) {
	grid-column: auto;
}

.lt__facts dt {
	color: var(--rw-on-dark-2);
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.lt__facts dd {
	margin: 0;
	color: #FFFFFF;
	font-family: var(--rw-display);
	font-size: 22px;
	font-weight: 800;
	line-height: 1.15;
	overflow-wrap: anywhere;
}

.lt__facts dd.is-up {
	color: #4FD39A;
}

.lt__facts dd.is-down {
	color: #FF8A99;
}

.lt__facts small {
	color: var(--rw-on-dark-3);
	font-size: 12.5px;
	line-height: 1.35;
}

.rw-home .lt__cta {
	color: var(--rw-gold);
	font-size: 14.5px;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.rw-home .lt__cta:hover {
	color: #FFFFFF;
}

/* ---------- Starting-line chart ---------- */

.rw-home .lt-lines__rows {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lt-lines__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) 170px;
	gap: 18px;
	align-items: center;
	padding: 12px 14px;
	background: rgba(255, 255, 255, .03);
	border: 1px solid var(--rw-ink-line);
	border-radius: 12px;
}

.lt-lines__name {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.lt-lines__name strong {
	color: #FFFFFF;
	font-family: var(--rw-display);
	font-size: 17px;
}

.lt-lines__name span,
.lt-lines__out span {
	color: var(--rw-on-dark-3);
	font-size: 12.5px;
	line-height: 1.35;
}

.lt-lines__bar {
	height: 12px;
	background: rgba(200, 16, 46, .45);
	border-radius: 999px;
	overflow: hidden;
}

.lt-lines__bar span {
	display: block;
	height: 100%;
	background: #2FAE73;
	border-radius: 999px 0 0 999px;
}

.lt-lines__out {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	text-align: right;
}

.lt-lines__out strong {
	color: #FFFFFF;
	font-family: var(--rw-display);
	font-size: 22px;
	font-weight: 800;
	line-height: 1.05;
}

/* Labouchere in the next-bet chart, and four result cards in a row. */
.scn__row--labouchere .scn__bar {
	background: #7FA8E8;
}

.mg-outcomes.mg-outcomes--4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

@media (max-width: 1080px) {
	.lt__main {
		grid-template-columns: minmax(0, 1fr);
	}

	.rw-home .lt__facts {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.lt__facts div:nth-child(3) {
		grid-column: auto;
	}

	.mg-outcomes.mg-outcomes--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	.lt__controls {
		grid-template-columns: minmax(0, 1fr);
	}

	.lt-lines__row {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 8px 14px;
	}

	.lt-lines__bar {
		grid-column: 1 / -1;
		grid-row: 2;
	}
}

@media (max-width: 640px) {
	.lt {
		padding: 16px;
		border-radius: 16px;
	}

	.lt__play {
		padding: 16px;
		border-width: 5px;
	}

	.lt__num {
		min-width: 40px;
		height: 40px;
		font-size: 16px;
	}

	.lt__btns {
		grid-template-columns: 1fr 1fr;
	}

	.rw-home .lt__btn--spin {
		grid-column: 1 / -1;
	}

	.rw-home .lt__facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.lt__facts div:nth-child(3) {
		grid-column: auto;
	}

	.lt__card {
		padding: 18px;
	}

	.mg-outcomes.mg-outcomes--4 {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.lt__num,
	.lt__num.is-new {
		transition: none;
		animation: none;
	}
}
