/*
 * Always on screen: masthead logo, page rail, "Fix my website" button.
 * Phones: the rail becomes a thin segmented bar along the top.
 */

.jb-logo {
	position: fixed;
	top: var(--jb-space-4);
	left: var(--jb-margin);
	z-index: var(--jb-z-rail);
	display: inline-block;
	padding: 0.2rem 0.6rem 0.1rem;
	background: var(--jb-red);
	color: var(--jb-white);
	border: 3px solid var(--jb-ink);
	box-shadow: 3px 3px 0 var(--jb-ink);
	font-family: var(--jb-font-sfx);
	font-size: 1.35rem;
	letter-spacing: 0.04em;
	line-height: 1.1;
	text-decoration: none;
	transform: rotate(-2deg);
}
.jb-logo b { font-weight: 400; color: var(--jb-yellow); }

/* Page rail */
.jb-rail {
	position: fixed;
	top: 50%;
	right: var(--jb-space-4);
	z-index: var(--jb-z-rail);
	transform: translateY(-50%);
}
.jb-rail ol { display: grid; gap: 0.7rem; }
.jb-rail a {
	position: relative;
	display: block;
	width: 16px;
	height: 16px;
	border: 3px solid var(--jb-ink);
	border-radius: 50%;
	background: var(--jb-white);
}
.jb-rail a.is-current { background: var(--jb-red); }
.jb-rail a span {
	position: absolute;
	right: calc(100% + 10px);
	top: 50%;
	transform: translateY(-50%);
	padding: 2px 8px;
	background: var(--jb-ink);
	color: var(--jb-white);
	font-family: var(--jb-font-comic);
	font-weight: 700;
	font-size: 0.8125rem;
	text-transform: uppercase;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 150ms;
}
.jb-rail a:is(:hover, :focus-visible) span { opacity: 1; }

/* Fixed call to action */
.jb-cta-fixed {
	position: fixed;
	right: var(--jb-space-5);
	bottom: var(--jb-space-5);
	z-index: var(--jb-z-cta);
}

@media (min-width: 48em) {
	.jb-rail ~ main .jb-wrap { padding-right: max(var(--jb-margin), 4.5rem); }
}

@media (max-width: 47.99em) {
	.jb-logo { top: 12px; left: var(--jb-space-4); font-size: 1.1rem; }
	.jb-rail { top: 0; left: 0; right: 0; transform: none; padding: 0; }
	.jb-rail ol { display: flex; gap: 2px; }
	.jb-rail li { flex: 1; }
	.jb-rail a { width: auto; height: 5px; border: 0; border-radius: 0; background: rgba(17, 17, 17, 0.18); }
	.jb-rail a.is-current { background: var(--jb-red); }
	.jb-rail a span { display: none; }
	.jb-cta-fixed { right: var(--jb-space-4); bottom: var(--jb-space-4); min-height: 44px; padding: 0.55rem 1rem; font-size: 0.9375rem; }
}

/* Cookie banner (CookieYes plugin): comic panel look. Colours and wording are set by bin/setup-consent.php. */
.cky-consent-container .cky-consent-bar,
.cky-modal .cky-preference-center {
	border: 3px solid var(--jb-ink) !important;
	border-radius: 0 !important;
	box-shadow: 6px 6px 0 var(--jb-ink) !important;
	font-family: var(--jb-font-text);
}
.cky-consent-container .cky-title,
.cky-modal .cky-preference-title {
	font-family: var(--jb-font-display);
	font-weight: 800;
	letter-spacing: -0.01em;
}
.cky-consent-container .cky-btn,
.cky-modal .cky-btn {
	border-radius: 999px !important;
	border-width: 2px !important;
	font-family: var(--jb-font-display);
	font-weight: 700;
	min-height: 44px;
}
.cky-consent-container .cky-btn-accept { background: var(--jb-yellow) !important; color: var(--jb-ink) !important; }
.cky-consent-container .cky-btn-reject { background: var(--jb-white) !important; color: var(--jb-ink) !important; }
.cky-btn-revisit-wrapper { background: var(--jb-ink) !important; }
