/* ============================================================
   Hold The Line — duel styles

   These deliberately inherit the theme's CSS variables. Every
   var() carries a fallback, so the game still looks right if
   the plugin is used on a different theme.
   ============================================================ */

.htl-board,
.htl-duel,
.htl-tomorrow,
.htl-history {
	--_bg: var(--bg, #0b0d12);
	--_panel: var(--panel, #12151d);
	--_panel2: var(--panel-2, #171b26);
	--_line: var(--line, #262c3b);
	--_ink: var(--ink, #eef1f7);
	--_muted: var(--muted, #8a92a6);
	--_hum: var(--hum, #ffb454);
	--_humdeep: var(--hum-deep, #e08a2c);
	--_mach: var(--mach, #4fd8eb);
	--_win: var(--win, #4fe3a1);
	--_radius: var(--radius, 18px);
	--_shadow: var(--shadow, 0 26px 60px -26px rgba(0, 0, 0, .9));
	font-family: "Inter", system-ui, sans-serif;
	color: var(--_ink);
	box-sizing: border-box;
}

.htl-board *,
.htl-duel *,
.htl-tomorrow * { box-sizing: border-box; }

/* ---------- scoreboard ---------- */
.htl-board {
	border: 1px solid var(--_line);
	border-radius: var(--_radius);
	background: linear-gradient(180deg, var(--_panel2), var(--_panel));
	box-shadow: var(--_shadow);
	overflow: hidden;
	margin: 0 0 16px;
}
.htl-board-top {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: stretch;
}
.htl-side { padding: 20px 14px 16px; text-align: center; }
.htl-side.humanity { background: linear-gradient(180deg, rgba(255, 180, 84, .09), transparent); }
.htl-side.machine { background: linear-gradient(180deg, rgba(79, 216, 235, .09), transparent); }
.htl-side .who {
	font-family: "Unbounded", sans-serif;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: .22em;
}
.htl-side.humanity .who { color: var(--_hum); }
.htl-side.machine .who { color: var(--_mach); }
.htl-side .num {
	font-family: "JetBrains Mono", monospace;
	font-weight: 800;
	font-size: 56px;
	line-height: 1;
	margin-top: 6px;
	font-variant-numeric: tabular-nums;
}
.htl-side.humanity .num { color: var(--_hum); text-shadow: 0 0 26px rgba(255, 180, 84, .35); }
.htl-side.machine .num { color: var(--_mach); text-shadow: 0 0 26px rgba(79, 216, 235, .35); }

.htl-divider {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 0 12px;
	border-left: 1px solid var(--_line);
	border-right: 1px solid var(--_line);
}
.htl-divider .day {
	font-family: "JetBrains Mono", monospace;
	font-size: 11px;
	color: var(--_muted);
	letter-spacing: .14em;
}
.htl-divider .d-num { font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 18px; }

.htl-ticker {
	border-top: 1px solid var(--_line);
	padding: 10px 14px;
	text-align: center;
	font-family: "JetBrains Mono", monospace;
	font-size: 12px;
	color: var(--_muted);
	line-height: 1.5;
}
.htl-ticker--machine { color: var(--_mach); }
.htl-ticker--human { color: var(--_hum); }

/* ---------- duel card ---------- */
.htl-duel {
	border: 1px solid var(--_line);
	border-radius: var(--_radius);
	background: linear-gradient(180deg, var(--_panel2), var(--_panel));
	box-shadow: var(--_shadow);
	padding: 26px 24px;
	margin: 0 0 16px;
}
.htl-duel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
	gap: 12px;
}
.htl-duel-no {
	font-family: "JetBrains Mono", monospace;
	font-size: 12px;
	color: var(--_muted);
	letter-spacing: .16em;
}
.htl-duel-type {
	font-family: "Unbounded", sans-serif;
	font-weight: 700;
	font-size: 11px;
	letter-spacing: .2em;
	color: var(--_hum);
	border: 1px solid rgba(255, 180, 84, .4);
	border-radius: 20px;
	padding: 5px 12px;
	background: rgba(255, 180, 84, .07);
	white-space: nowrap;
}
.htl-q {
	font-family: "Unbounded", sans-serif;
	font-weight: 700;
	font-size: clamp(19px, 3.4vw, 24px);
	line-height: 1.35;
	letter-spacing: -.01em;
	margin: 0 0 8px;
	color: var(--_ink);
}
.htl-q-sub { color: var(--_muted); font-size: 14px; line-height: 1.6; margin: 0 0 20px; }
.htl-q-sub b { color: var(--_ink); }

/* entry */
.htl-entry { display: flex; gap: 10px; }
.htl-entry input {
	flex: 1;
	min-width: 0;
	font-family: "JetBrains Mono", monospace;
	font-size: 18px;
	font-weight: 700;
	background: rgba(0, 0, 0, .32);
	border: 1.5px solid var(--_line);
	border-radius: 13px;
	color: var(--_ink);
	padding: 15px 16px;
}
.htl-entry input:focus { outline: none; border-color: var(--_hum); }
.htl-entry input::placeholder { color: #525a6e; font-weight: 400; }
.htl-go {
	font-family: "Unbounded", sans-serif;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: .06em;
	color: #1a1206;
	border: none;
	border-radius: 13px;
	cursor: pointer;
	padding: 0 22px;
	background: linear-gradient(180deg, #ffc670, var(--_humdeep));
	box-shadow: 0 12px 26px -12px rgba(255, 180, 84, .65);
	transition: transform .1s, filter .15s;
}
.htl-go:hover { filter: brightness(1.07); }
.htl-go:active { transform: translateY(1px); }
.htl-go:disabled { opacity: .5; cursor: default; }
.htl-go:focus-visible { outline: 3px solid var(--_mach); outline-offset: 2px; }
.htl-entry-note { margin: 10px 0 0; font-size: 12px; color: var(--_muted); }
.htl-error { margin: 8px 0 0; font-size: 13px; color: #f26d6d; min-height: 18px; }
.htl-locked { color: var(--_muted); font-size: 14.5px; line-height: 1.6; }

/* rows */
.htl-rows { margin-top: 6px; }
.htl-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	border: 1px solid var(--_line);
	border-radius: 13px;
	padding: 14px 16px;
	margin-bottom: 10px;
	background: rgba(0, 0, 0, .2);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .4s ease, transform .4s ease;
}
.htl-row.in { opacity: 1; transform: none; }
.htl-row .lab { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; }
.htl-row .lab .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--_ink); flex: 0 0 auto; }
.htl-row.crowd { border-color: rgba(255, 180, 84, .4); }
.htl-row.crowd .dot { background: var(--_hum); }
.htl-row.mach { border-color: rgba(79, 216, 235, .4); }
.htl-row.mach .dot { background: var(--_mach); }
.htl-row.truth { border-color: var(--_win); background: rgba(79, 227, 161, .06); }
.htl-row.truth .dot { background: var(--_win); }
.htl-row .val {
	font-family: "JetBrains Mono", monospace;
	font-weight: 800;
	font-size: 18px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.htl-row .off { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--_muted); margin-left: 8px; font-weight: 400; }

/* banner */
.htl-banner {
	margin: 16px 0 6px;
	border-radius: 14px;
	padding: 18px 16px;
	text-align: center;
	opacity: 0;
	transform: scale(.97);
	transition: opacity .45s ease, transform .45s cubic-bezier(.2, 1.2, .35, 1);
}
.htl-banner.in { opacity: 1; transform: none; }
.htl-banner.hum-win { background: linear-gradient(180deg, rgba(255, 180, 84, .18), rgba(255, 180, 84, .06)); border: 1px solid rgba(255, 180, 84, .55); }
.htl-banner.mach-win { background: linear-gradient(180deg, rgba(79, 216, 235, .18), rgba(79, 216, 235, .06)); border: 1px solid rgba(79, 216, 235, .55); }
.htl-banner.pending { background: rgba(255, 255, 255, .04); border: 1px solid var(--_line); }
.htl-banner .b-title { font-family: "Unbounded", sans-serif; font-weight: 900; font-size: 18px; letter-spacing: .04em; }
.htl-banner.hum-win .b-title { color: var(--_hum); }
.htl-banner.mach-win .b-title { color: var(--_mach); }
.htl-banner .b-sub { font-size: 13px; color: var(--_muted); margin-top: 6px; line-height: 1.6; }
.htl-banner .b-sub b { color: var(--_ink); }

/* personal */
.htl-personal {
	margin-top: 12px;
	border-top: 1px dashed var(--_line);
	padding-top: 14px;
	font-size: 14px;
	line-height: 1.7;
	color: var(--_muted);
	opacity: 0;
	transition: opacity .4s ease;
}
.htl-personal.in { opacity: 1; }
.htl-personal b { color: var(--_ink); }
.htl-personal .beat { color: var(--_win); font-weight: 700; }
.htl-personal .lost { color: var(--_mach); font-weight: 700; }

/* share */
.htl-share { margin-top: 16px; opacity: 0; transition: opacity .4s ease; }
.htl-share.in { opacity: 1; }
.htl-share-box {
	font-family: "JetBrains Mono", monospace;
	font-size: 13px;
	line-height: 1.8;
	background: rgba(0, 0, 0, .32);
	border: 1px solid var(--_line);
	border-radius: 13px;
	padding: 15px;
	white-space: pre-wrap;
	user-select: all;
	margin-bottom: 12px;
	word-break: break-word;
}
.htl-btn-copy {
	width: 100%;
	border: none;
	color: #12151c;
	font-family: "Unbounded", sans-serif;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: .05em;
	padding: 14px;
	border-radius: 12px;
	cursor: pointer;
	background: linear-gradient(90deg, var(--_hum), var(--_mach));
	transition: filter .15s, transform .1s;
}
.htl-btn-copy:hover { filter: brightness(1.08); }
.htl-btn-copy:active { transform: translateY(1px); }
.htl-btn-copy:focus-visible { outline: 3px solid var(--_ink); outline-offset: 2px; }

/* empty state */
.htl-duel--empty { text-align: center; padding: 44px 24px; }
.htl-empty-mark { font-size: 42px; margin-bottom: 10px; }
.htl-duel--empty h2 { font-family: "Unbounded", sans-serif; font-size: 20px; margin: 0 0 8px; }
.htl-duel--empty p { color: var(--_muted); margin: 0; font-size: 14px; }

/* tomorrow */
.htl-tomorrow {
	border: 1px dashed var(--_line);
	border-radius: var(--_radius);
	padding: 18px 20px;
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--_muted);
}
.htl-tomorrow .clock { font-size: 26px; }
.htl-tomorrow .t-lbl { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: .18em; color: var(--_mach); }
.htl-tomorrow .t-txt { font-size: 14px; color: var(--_ink); margin-top: 3px; line-height: 1.5; }

/* history */
.htl-hist-row {
	display: grid;
	grid-template-columns: 60px 1fr auto;
	gap: 12px;
	align-items: center;
	border: 1px solid var(--_line);
	border-radius: 12px;
	padding: 12px 14px;
	margin-bottom: 8px;
	background: var(--_panel);
	font-size: 14px;
}
.htl-hist-row .d { font-family: "JetBrains Mono", monospace; color: var(--_muted); font-size: 12px; }
.htl-hist-row .w { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: .1em; white-space: nowrap; }
.htl-hist-row.hum { border-left: 3px solid var(--_hum); }
.htl-hist-row.mach { border-left: 3px solid var(--_mach); }

@media (max-width: 520px) {
	.htl-side .num { font-size: 42px; }
	.htl-entry { flex-direction: column; }
	.htl-go { padding: 14px; }
	.htl-duel { padding: 22px 18px; }
	.htl-hist-row { grid-template-columns: 50px 1fr; }
	.htl-hist-row .w { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
	.htl-row, .htl-banner, .htl-personal, .htl-share {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}


/* ---------- reminders ---------- */
.htl-remind {
	--_line: var(--line, #262c3b);
	--_ink: var(--ink, #eef1f7);
	--_muted: var(--muted, #8a92a6);
	--_hum: var(--hum, #ffb454);
	border: 1px solid var(--_line);
	border-radius: var(--radius, 18px);
	background: var(--panel, #12151d);
	padding: 26px 24px;
	margin: 16px 0 0;
	text-align: center;
	font-family: "Inter", system-ui, sans-serif;
	color: var(--_ink);
	box-sizing: border-box;
}
.htl-remind * { box-sizing: border-box; }
.htl-remind-title {
	font-family: "Archivo", "Unbounded", sans-serif;
	font-weight: 800;
	font-size: 13px;
	letter-spacing: .24em;
	margin: 0 0 6px;
	color: var(--_ink);
}
.htl-remind-sub { color: var(--_muted); font-size: 13.5px; margin: 0 0 18px; }
.htl-remind-row { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; }
.htl-remind-row input {
	flex: 1;
	min-width: 0;
	font-family: "Inter", sans-serif;
	font-size: 15px;
	background: rgba(0, 0, 0, .32);
	border: 1.5px solid var(--_line);
	border-radius: 13px;
	color: var(--_ink);
	padding: 13px 15px;
}
.htl-remind-row input:focus { outline: none; border-color: var(--_ink); }
.htl-remind-row input::placeholder { color: #525a6e; }
.htl-remind-row input:disabled { opacity: .5; }
.htl-remind-go {
	font-family: "Archivo", "Unbounded", sans-serif;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: .12em;
	border: none;
	border-radius: 13px;
	cursor: pointer;
	padding: 0 20px;
	color: #12151c;
	background: var(--_hum);
	transition: filter .15s, transform .1s;
	white-space: nowrap;
}
.htl-remind-go:hover { filter: brightness(1.08); }
.htl-remind-go:active { transform: translateY(1px); }
.htl-remind-go:disabled { opacity: .55; cursor: default; }
.htl-remind-go:focus-visible { outline: 3px solid var(--_ink); outline-offset: 2px; }
.htl-remind-note { font-size: 12px; color: var(--_muted); margin: 11px 0 0; min-height: 18px; }
.htl-remind-note.good { color: var(--win, #4fe3a1); }
.htl-remind-note.bad { color: #f26d6d; }
.htl-remind-alt { font-size: 13px; color: var(--_muted); margin: 16px 0 0; line-height: 1.6; }
.htl-remind-alt a { color: var(--_ink); }
.htl-remind-done {
	border: 1px solid var(--win, #4fe3a1);
	background: rgba(79, 227, 161, .08);
	border-radius: 12px;
	padding: 12px;
	margin: 0 0 18px;
	font-size: 14px;
}
@media (max-width: 520px) {
	.htl-remind-row { flex-direction: column; }
	.htl-remind-go { padding: 14px; }
}

/* ---------- today's live figures ---------- */
.htl-today {
	display: flex;
	align-items: stretch;
	border-top: 1px solid var(--_line, #262c3b);
	font-family: "JetBrains Mono", monospace;
}
.htl-today-side {
	flex: 1;
	padding: 9px 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}
.htl-today-side .lbl {
	font-size: 8.5px;
	letter-spacing: .2em;
	color: var(--_muted, #8a92a6);
}
.htl-today-side .val {
	font-size: 15px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}
.htl-today-side.hum .val { color: var(--_hum, #ffb454); }
.htl-today-side.mach .val { color: var(--_mach, #4fd8eb); }
.htl-today-mid {
	display: flex;
	align-items: center;
	padding: 0 12px;
	font-size: 9px;
	letter-spacing: .18em;
	color: var(--_muted, #8a92a6);
	border-left: 1px solid var(--_line, #262c3b);
	border-right: 1px solid var(--_line, #262c3b);
	white-space: nowrap;
}
.htl-today.leading-human .htl-today-mid { color: var(--_hum, #ffb454); }
.htl-today.leading-machine .htl-today-mid { color: var(--_mach, #4fd8eb); }
.htl-live-count { color: var(--_ink, #eef1f7); }

/* ---------- today's turnout ---------- */
.htl-turnout {
	border-top: 1px solid var(--_line, #262c3b);
	padding: 11px 14px;
	text-align: center;
	font-family: "JetBrains Mono", monospace;
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 8px;
}
.htl-turnout-num {
	font-size: 17px;
	font-weight: 800;
	color: var(--_ink, #eef1f7);
	font-variant-numeric: tabular-nums;
}
.htl-turnout-lbl {
	font-size: 10.5px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--_muted, #8a92a6);
}
