/* LH Leaderboard 2.3 — a dark stage for the title and the top three, a white sheet for everyone else.
   Lady Hawk colours (blue to purple), Poppins for figures and names, Inter for text. */
.lhlb, .lhlb *, .lhlb *::before, .lhlb *::after { box-sizing: border-box; }
.lhlb {
	--ink: #111733;
	--body: #5a6480;
	--muted: #8a93ab;
	--line: #eceef6;
	--tint: #f6f7fc;
	--blue: var(--lh-primary, #2f57ef);
	--blue-soft: #eef2fe;
	--purple: var(--lh-secondary, #b966e7);
	--night: #0b1030;
	--night-2: #171d5a;
	--lilac: #cbbdff;
	--grad: linear-gradient(100deg, var(--blue) 0%, var(--purple) 100%);
	--gold-1: #fff3c4; --gold-2: #f2b200; --gold-3: #a86f00;
	--silver-1: #ffffff; --silver-2: #c5ccd8; --silver-3: #7b8498;
	--bronze-1: #ffd8b0; --bronze-2: #cd7f32; --bronze-3: #874c1a;
	--display: var(--lh-font-display, "Poppins", "Segoe UI", system-ui, sans-serif);
	--text: var(--lh-font-body, "Inter", "Segoe UI", system-ui, sans-serif);
	--ease: cubic-bezier(.2, .7, .2, 1);

	position: relative;
	max-width: 920px;
	margin: 0 auto;
	padding: 0 clamp(14px, 4vw, 24px) 28px;
	font-family: var(--text);
	font-size: 16px;
	line-height: 1.5;
	color: var(--body);
}
.lhlb :where(h1, h2, p, ol, li) { margin: 0; padding: 0; }
.lhlb ol { list-style: none; }
.lhlb svg { display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lhlb-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ================= the stage ================= */
.lhlb-stage {
	position: relative;
	padding: clamp(40px, 7vw, 72px) clamp(14px, 3vw, 28px) clamp(104px, 13vw, 132px);
	border-radius: 0 0 36px 36px;
	color: #fff;
	background:
		radial-gradient(52% 62% at 50% 46%, rgba(132, 104, 255, .34) 0%, rgba(132, 104, 255, 0) 70%),
		radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .08) 1px, transparent 0) 0 0 / 22px 22px,
		linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
	isolation: isolate;
}
/* On its own page the stage runs edge to edge. */
.lhlb:not([data-layout="embed"]) .lhlb-stage { margin-inline: calc(50% - 50vw); padding-inline: max(14px, calc(50vw - 50% + 14px)); }
.lhlb[data-layout="embed"] .lhlb-stage { border-radius: 32px; margin-top: 8px; }
body.lhlb-page, html.lhlb-doc, body.lhlb-doc { overflow-x: clip; }

.lhlb-head { text-align: center; max-width: 680px; margin: 0 auto; }
.lhlb-title {
	font-family: var(--display); font-weight: 700; font-size: clamp(36px, 6.4vw, 64px); line-height: 1.04;
	letter-spacing: -.035em; color: #fff; text-wrap: balance;
}
.lhlb-org {
	display: inline-flex; align-items: center; gap: 8px; margin-top: 14px !important;
	font-family: var(--display); font-weight: 500; font-size: clamp(15px, 2vw, 18px); color: var(--lilac); letter-spacing: .01em;
}

/* ---- the top three ---- */
.lhlb-podium {
	display: grid; grid-template-columns: 1fr 1.22fr 1fr; align-items: end; gap: clamp(10px, 2.2vw, 20px);
	max-width: 780px; margin: clamp(36px, 6vw, 56px) auto 0 !important;
}
.lhlb-step {
	--m1: var(--silver-1); --m2: var(--silver-2); --m3: var(--silver-3);
	position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0;
	padding: 26px clamp(8px, 1.6vw, 16px) 22px;
	border-radius: 26px;
	background: linear-gradient(180deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, .03) 100%);
	border: 1px solid rgba(255, 255, 255, .12);
	backdrop-filter: blur(6px);
	animation: lhlb-up .7s var(--ease) both;
}
.lhlb-step--3 { --m1: var(--bronze-1); --m2: var(--bronze-2); --m3: var(--bronze-3); animation-delay: .16s; }
.lhlb-step--2 { animation-delay: .08s; }
.lhlb-step--1 {
	--m1: var(--gold-1); --m2: var(--gold-2); --m3: var(--gold-3);
	padding-top: 18px; padding-bottom: 30px;
	background: linear-gradient(180deg, rgba(242, 178, 0, .22) 0%, rgba(255, 255, 255, .05) 58%);
	border-color: rgba(242, 178, 0, .5);
	box-shadow: 0 34px 70px -34px rgba(242, 178, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
}
@keyframes lhlb-up { from { opacity: 0; transform: translateY(18px); } }
.lhlb-crown { width: 34px; height: 34px; margin-bottom: 6px; color: var(--gold-2); fill: var(--gold-2); stroke: var(--gold-1); stroke-width: 1; filter: drop-shadow(0 4px 10px rgba(242, 178, 0, .55)); }
.lhlb-step-av { position: relative; display: inline-block; margin-bottom: 18px; }
.lhlb-step .lhlb-av { box-shadow: 0 0 0 4px var(--night), 0 0 0 7px var(--m2), 0 18px 34px -14px rgba(0, 0, 0, .6); }
.lhlb-medal {
	position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%);
	display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, var(--m1), var(--m2) 58%, var(--m3));
	border: 2px solid var(--night); color: #fff; font: 700 14px/1 var(--display); text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
.lhlb-step--1 .lhlb-medal { width: 36px; height: 36px; font-size: 16px; bottom: -14px; }
.lhlb-step-name {
	max-width: 100%; color: #fff; font: 600 clamp(14px, 1.9vw, 17px)/1.25 var(--display); letter-spacing: -.01em;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.lhlb-step--1 .lhlb-step-name { font-size: clamp(16px, 2.4vw, 21px); }
.lhlb-step.is-me .lhlb-step-name, .lhlb-step.is-shared .lhlb-step-name { color: var(--lilac); }
.lhlb-figs { display: flex; justify-content: center; align-items: baseline; margin-top: 12px; font-size: 12.5px; color: rgba(255, 255, 255, .66); }
.lhlb-figs > span { white-space: nowrap; }
.lhlb-figs > span + span { margin-left: 12px; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .2); }
.lhlb-figs b { margin-right: 3px; font: 700 18px/1 var(--display); color: #fff; font-variant-numeric: tabular-nums; }
.lhlb-step--1 .lhlb-figs b { font-size: 21px; color: var(--gold-1); }

/* avatars */
.lhlb-av {
	position: relative; flex: none; display: inline-grid; place-items: center; overflow: hidden;
	width: 40px; height: 40px; border-radius: 50%;
	font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .02em;
}
.lhlb-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lhlb-av--l { width: 84px; height: 84px; font-size: 26px; }
.lhlb-av--xl { width: 112px; height: 112px; font-size: 34px; }
.lhlb-hue0 { background: var(--blue-soft); color: var(--blue); }
.lhlb-hue1 { background: #f6eefd; color: #8a3fc0; }
.lhlb-hue2 { background: #fff0ec; color: #d4553a; }
.lhlb-hue3 { background: #e8f7f1; color: #0f8a66; }

/* ================= the sheet ================= */
.lhlb-sheet {
	position: relative; z-index: 2;
	margin: calc(-1 * clamp(72px, 9vw, 92px)) auto 0; max-width: 860px;
	padding: 14px clamp(6px, 1.4vw, 12px) 10px;
	border-radius: 28px; background: #fff;
	box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 0 0 1px var(--line), 0 40px 80px -44px rgba(11, 16, 48, .45);
}
.lhlb-shared { margin: 4px 8px 12px !important; padding: 12px 16px; border-radius: 16px; background: #f6eefd; color: var(--ink); font-weight: 500; text-align: center; }
.lhlb-empty { text-align: center; padding: 44px 20px 40px; }
.lhlb-empty h2 { font: 600 22px/1.3 var(--display); color: var(--ink); margin-bottom: 6px; }

.lhlb-list-head, .lhlb-row { display: grid; grid-template-columns: 48px 44px minmax(0, 1fr) 130px 104px; align-items: center; column-gap: 14px; }
.lhlb-list-head { padding: 6px 18px 10px 8px; font: 500 12px/1 var(--text); color: var(--muted); letter-spacing: .02em; }
.lhlb-list-head span:first-child { text-align: center; }
.lhlb-list-head span:nth-child(2) { grid-column: 2 / 4; }
.lhlb-list-head span:nth-child(3), .lhlb-list-head span:nth-child(4) { text-align: right; }
.lhlb-list { display: flex; flex-direction: column; }
.lhlb-row { position: relative; padding: 12px 18px 12px 8px; border-radius: 16px; transition: background-color .2s; }
.lhlb-row + .lhlb-row::before { content: ""; position: absolute; left: 64px; right: 18px; top: 0; border-top: 1px solid var(--line); }
.lhlb-row:hover { background: var(--tint); }
.lhlb-row:hover::before, .lhlb-row:hover + .lhlb-row::before { opacity: 0; }
.lhlb-rank { font: 600 15px/1 var(--display); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.lhlb-who { display: flex; flex-direction: column; min-width: 0; }
.lhlb-name { font: 600 15.5px/1.3 var(--display); color: var(--ink); letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lhlb-row .lhlb-av { width: 44px; height: 44px; font-size: 15px; }
.lhlb-stats { display: contents; }
.lhlb-stat { display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; font-variant-numeric: tabular-nums; }
.lhlb-stat b { font: 700 19px/1 var(--display); color: var(--ink); letter-spacing: -.02em; }
.lhlb-stat svg { width: 17px; height: 17px; stroke-width: 1.8; }
.lhlb-stat--cert svg { color: var(--blue); }
.lhlb-stat--badge svg { color: var(--gold-2); }
.lhlb-stat-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lhlb-you {
	display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; vertical-align: 2px;
	background: var(--grad); color: #fff; font-style: normal; font-family: var(--text); font-weight: 600; font-size: 11px; line-height: 18px;
}
.lhlb-row.is-me { background: linear-gradient(90deg, var(--blue-soft), #f7f1fe); }
.lhlb-row.is-me::after { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--grad); }
.lhlb-row.is-me::before, .lhlb-row.is-me + .lhlb-row::before { opacity: 0; }
.lhlb-row.is-me .lhlb-rank { color: var(--blue); }
.lhlb-row.is-shared { box-shadow: inset 0 0 0 1.5px var(--purple); }
.lhlb-row:target { scroll-margin: 120px; }

/* Fewer than three on the board: the leaders keep their medals in the list. */
.lhlb-row--top .lhlb-rank { display: grid; place-items: center; width: 32px; height: 32px; margin: 0 auto; border-radius: 50%; color: #fff; font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.lhlb-row--1 .lhlb-rank { background: radial-gradient(circle at 35% 30%, var(--gold-1), var(--gold-2) 58%, var(--gold-3)); }
.lhlb-row--2 .lhlb-rank { background: radial-gradient(circle at 35% 30%, var(--silver-1), var(--silver-2) 58%, var(--silver-3)); }
.lhlb-row--3 .lhlb-rank { background: radial-gradient(circle at 35% 30%, var(--bronze-1), var(--bronze-2) 58%, var(--bronze-3)); }
.lhlb-row--top.is-me .lhlb-rank { color: #fff; }

.lhlb-near { margin-top: 2px; }
.lhlb-gap { display: flex; align-items: center; gap: 12px; margin: 8px 18px !important; font-size: 12.5px; color: var(--muted); }
.lhlb-gap::before, .lhlb-gap::after { content: ""; flex: 1; border-top: 2px dotted var(--line); }

/* ================= your rank ================= */
.lhlb-you-bar {
	position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 30;
	display: flex; align-items: center; gap: 16px; max-width: 860px;
	margin: 22px auto 0; padding: 10px 10px 10px 20px;
	border-radius: 22px;
	background: rgba(255, 255, 255, .86); color: var(--body);
	-webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
	border: 1px solid rgba(214, 220, 240, .9);
	box-shadow: 0 22px 50px -22px rgba(17, 23, 51, .45), 0 2px 6px rgba(17, 23, 51, .06);
}
.lhlb-yb-rank { display: flex; flex-direction: column; flex: none; padding-right: 16px; border-right: 1px solid var(--line); text-decoration: none; line-height: 1.1; }
.lhlb-yb-rank small { font-size: 12px; color: var(--muted); }
.lhlb-yb-rank b {
	font: 700 30px/1.05 var(--display); letter-spacing: -.03em;
	background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--blue);
}
.lhlb-yb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; line-height: 1.4; }
.lhlb-yb-text b { color: var(--ink); font-weight: 600; font-size: 15px; }
.lhlb-of { font-weight: 400; color: var(--muted); }
.lhlb-btn {
	flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 20px; border: 0; border-radius: 14px; cursor: pointer;
	background: var(--grad); color: #fff !important; text-decoration: none !important;
	font: 600 15px/1.2 var(--text); box-shadow: 0 10px 22px -10px rgba(47, 87, 239, .7);
	transition: filter .2s, transform .2s;
}
.lhlb-btn:hover { filter: brightness(1.08); }
.lhlb-btn:active { transform: translateY(1px); }
.lhlb-btn svg { width: 18px; height: 18px; }
.lhlb-btn--wide { width: 100%; }
.lhlb a:focus-visible, .lhlb button:focus-visible, .lhlb input:focus-visible, .lhlb-dialog :is(a, button):focus-visible { outline: 3px solid #9db0ff; outline-offset: 2px; }

/* ---- share dialog ---- */
.lhlb-dialog {
	width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 24px;
	background: #fff; color: var(--body); box-shadow: 0 40px 80px -24px rgba(11, 16, 48, .5);
	font-family: var(--text);
}
.lhlb-dialog::backdrop { background: rgba(11, 16, 48, .55); backdrop-filter: blur(3px); }
.lhlb-dialog[open] { animation: lhlb-pop .28s var(--ease); }
@keyframes lhlb-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.lhlb-dialog-in { padding: 18px 20px 20px; margin: 0; }
.lhlb-dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.lhlb-dialog-head h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 19px; color: var(--heading); }
.lhlb-x { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--tint); color: var(--heading); cursor: pointer; }
.lhlb-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.lhlb-card-wrap { border-radius: 16px; overflow: hidden; background: var(--tint); aspect-ratio: 4 / 5; max-height: 46dvh; margin: 0 auto 14px; }
.lhlb-card { display: block; width: 100%; height: 100%; object-fit: contain; }
.lhlb-share-native { margin-bottom: 10px; }
.lhlb-share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lhlb-share-grid > * {
	display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px;
	border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer;
	font: 500 13px/1.2 var(--text); color: var(--heading) !important; text-decoration: none !important;
	transition: border-color .2s, background-color .2s;
}
.lhlb-share-grid > *:hover { border-color: var(--blue); background: var(--blue-soft); }
.lhlb-share-grid svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.lhlb-share-grid [data-act] svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lhlb-share-grid [data-net="whatsapp"] svg { color: #1fa855; }
.lhlb-share-grid [data-net="linkedin"] svg { color: #0a66c2; }
.lhlb-share-grid [data-net="facebook"] svg { color: #1877f2; }
.lhlb-share-grid .is-done { border-color: #12a67a; background: #e8f7f1; }
.lhlb-share-note { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---- full-screen page ---- */
html.lhlb-doc, body.lhlb-doc { margin: 0; padding: 0; background: #fff; -webkit-text-size-adjust: 100%; }
body.lhlb-doc { font-family: "Inter", "Segoe UI", system-ui, sans-serif; background: linear-gradient(180deg, #f6f7fd 0, #fff 420px) no-repeat; }
.lhlb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 920px; margin: 0 auto; padding: 16px clamp(16px, 4vw, 24px); }
.lhlb-bar-brand { display: inline-flex; align-items: center; gap: 10px; color: #192335; text-decoration: none; font: 600 16px/1.2 "Poppins", "Segoe UI", sans-serif; }
.lhlb-bar-brand img { width: 36px; height: 36px; object-fit: contain; }
.lhlb-close { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px 9px 12px; border-radius: 99px; border: 1px solid #e6e9f4; background: #fff; color: #192335; text-decoration: none; font: 600 14px/1 "Inter", sans-serif; }
.lhlb-close:hover { border-color: #2f57ef; color: #2f57ef; }
.lhlb-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
body.lhlb-doc .lhlb { padding-top: clamp(12px, 3vw, 28px); }

/* full-screen style: the stage sits right under the slim bar */
body.lhlb-doc { background: #fff; }
body.lhlb-doc .lhlb-bar { position: relative; z-index: 3; }

/* ---- inside the theme ---- */
.lhlb-main { display: block; }
body.lhlb-page .lh-totop { display: none !important; } /* the rank bar sits where the back-to-top button would */
body.lhlb-page .lhlb-main { background: #fff; }

/* ---- small screens ---- */
/* column heads: words on wide screens, icons on phones */
.lhlb-list-head span { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.lhlb-list-head span:nth-child(2) { justify-content: flex-start; }
.lhlb-list-head svg { display: none; width: 15px; height: 15px; }
.lhlb-list-head i { font-style: normal; }
.lhlb-list-head span:nth-child(3) svg { color: var(--blue); }
.lhlb-list-head span:nth-child(4) svg { color: var(--gold-2); }

@media (max-width: 640px) {
	.lhlb-list-head svg { display: block; }
	.lhlb-list-head span:nth-child(n+3) i { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.lhlb-stage { border-radius: 0 0 26px 26px; padding-bottom: 96px; }
	.lhlb-podium { grid-template-columns: 1fr 1.12fr 1fr; gap: 8px; }
	.lhlb-step { padding: 18px 6px 16px; border-radius: 18px; }
	.lhlb-step--1 { padding-top: 12px; padding-bottom: 20px; }
	.lhlb-crown { width: 26px; height: 26px; margin-bottom: 4px; }
	.lhlb-av--l { width: 58px; height: 58px; font-size: 19px; }
	.lhlb-av--xl { width: 76px; height: 76px; font-size: 24px; }
	.lhlb-medal { width: 24px; height: 24px; font-size: 12px; bottom: -10px; }
	.lhlb-step--1 .lhlb-medal { width: 28px; height: 28px; font-size: 13px; bottom: -11px; }
	.lhlb-step-av { margin-bottom: 14px; }
	.lhlb-step-name { font-size: 13px; }
	.lhlb-step--1 .lhlb-step-name { font-size: 14.5px; }
	.lhlb-figs { flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; }
	.lhlb-figs > span + span { margin: 0; padding: 0; border: 0; }
	.lhlb-figs b { font-size: 15px; }
	.lhlb-step--1 .lhlb-figs b { font-size: 17px; }
	.lhlb-sheet { margin-top: -64px; border-radius: 22px; padding: 10px 4px 6px; }
	.lhlb-list-head, .lhlb-row { grid-template-columns: 30px 36px minmax(0, 1fr) 46px 38px; column-gap: 10px; }
	.lhlb-list-head { padding: 4px 12px 8px 4px; font-size: 11px; }
	.lhlb-row { padding: 10px 12px 10px 4px; border-radius: 14px; }
	.lhlb-row + .lhlb-row::before { left: 44px; right: 12px; }
	.lhlb-row .lhlb-av { width: 36px; height: 36px; font-size: 13px; }
	.lhlb-name { font-size: 14px; }
	.lhlb-stat { gap: 4px; }
	.lhlb-stat svg { width: 14px; height: 14px; }
	.lhlb-stat b { font-size: 16px; }
	.lhlb-rank { font-size: 14px; }
	.lhlb-row--top .lhlb-rank { width: 28px; height: 28px; font-size: 13px; }
	.lhlb-you-bar { gap: 12px; padding: 8px 8px 8px 14px; border-radius: 20px; }
	.lhlb-yb-rank { padding-right: 12px; }
	.lhlb-yb-rank b { font-size: 25px; }
	.lhlb-yb-text { font-size: 12.5px; }
	.lhlb-yb-text b { font-size: 14px; }
	.lhlb-of { display: block; font-size: 12.5px; }
	.lhlb-you-bar .lhlb-btn { padding: 11px 14px; }
	.lhlb-you-bar.is-ranked .lhlb-yb-text > span { display: none; }
	.lhlb-you-bar.is-ranked .lhlb-btn { width: 48px; height: 48px; padding: 0; border-radius: 50%; }
	.lhlb-you-bar.is-ranked .lhlb-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.lhlb-you-bar.is-ranked .lhlb-btn svg { width: 20px; height: 20px; }
	}
@media (prefers-reduced-motion: reduce) {
	.lhlb *, .lhlb-dialog { animation: none !important; transition: none !important; }
}
