/* Gokartsport – extra styles that theme.json can't express. */

:root {
	/* Extra colours used by the components. Dark mode changes these at the bottom of the file. */
	--gk-tint: #e8f1f3;
	--gk-tint-2: #f0f6f7;
	--gk-ok-bg: #eef8f1;
	--gk-ok-line: #9fd1ad;
	--gk-ok-text: #2a7a3f;
	--gk-err-bg: #fbeeec;
	--gk-err-line: #e3a79f;
	--gk-err-text: #8a2c22;
	--gk-soft-line: #c9d8dc;
	--gk-header-bg: rgba(255, 255, 255, 0.94);
	--gk-wutsum-text: #3f6b34;
}

/* ---------- Header ---------- */
.gk-topbar {
	font-size: var(--wp--preset--font-size--small);
}
.gk-topbar a {
	color: inherit;
	text-decoration: none;
}
.gk-topbar a:hover {
	text-decoration: underline;
}
/* Top bar + menu stick together at the top on every page. */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .wp-site-blocks > header.wp-block-template-part {
	top: 32px;
}
@media (max-width: 782px) {
	.admin-bar .wp-site-blocks > header.wp-block-template-part {
		top: 0;
		position: relative;
	}
}
.gk-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
	backdrop-filter: saturate(180%) blur(8px);
	background: var(--gk-header-bg) !important;
}
.gk-logo img {
	display: block;
	width: clamp(180px, 26vw, 300px);
	height: auto;
}
.gk-header .wp-block-navigation-item__content {
	padding: 0.4em 0.1em;
	border-bottom: 2px solid transparent;
	transition: border-color 0.15s ease, color 0.15s ease;
}
.gk-header .wp-block-navigation-item__content:hover,
.gk-header .current-menu-item > .wp-block-navigation-item__content {
	border-bottom-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}
.gk-header .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--line) !important;
	border-radius: 10px;
	box-shadow: var(--wp--preset--shadow--card);
	padding: 0.4rem 0;
	min-width: 230px !important;
}
.gk-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.55em 1em;
	border: 0;
}

/* ---------- Hero ---------- */
.gk-hero {
	overflow: hidden;
}
.gk-hero .wp-block-cover__inner-container > * {
	max-width: 640px;
}
.gk-hero h1,
.gk-hero p {
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
/* Phones: the text covers the whole width, so darken from the bottom instead. */
@media (max-width: 781px) {
	.gk-hero .wp-block-cover__background {
		background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.2) 100%) !important;
	}
	.gk-hero {
		min-height: 440px !important;
	}
}
.gk-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 700;
}

/* ---------- News cards ---------- */
.gk-cards .wp-block-post {
	display: flex;
}
.gk-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	overflow: hidden;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.gk-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 2px 4px rgba(28, 35, 38, 0.06), 0 14px 32px rgba(28, 35, 38, 0.12);
}
.gk-card .wp-block-post-featured-image {
	margin: 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}
.gk-card .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.gk-card .wp-block-post-featured-image a {
	display: block;
	height: 100%;
}
.gk-card:hover .wp-block-post-featured-image img {
	transform: scale(1.04);
}
.gk-card .wp-block-post-title a::after {
	/* Make the whole card clickable. */
	content: "";
	position: absolute;
	inset: 0;
}
.gk-card {
	position: relative;
}
.gk-card .wp-block-post-excerpt__excerpt {
	margin: 0;
	color: var(--wp--preset--color--muted);
}

/* One card per row: picture left, text right (stacked on phones). */
.gk-cards {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	padding: 0;
	list-style: none;
}
.gk-card,
.gk-card * {
	overflow-wrap: anywhere;
}
@media (min-width: 700px) {
	.gk-cards .gk-card {
		flex-direction: row;
		align-items: stretch;
	}
	.gk-cards .gk-card .wp-block-post-featured-image {
		flex: 0 0 38%;
		aspect-ratio: 16 / 10;
		align-self: stretch;
	}
	.gk-cards .gk-card .wp-block-post-featured-image a,
	.gk-cards .gk-card .wp-block-post-featured-image img {
		height: 100% !important;
		object-fit: cover;
	}
	.gk-cards .gk-card > .wp-block-group {
		flex: 1 1 auto;
		min-width: 0;
		align-self: center;
	}
}

/* ---------- Sidebar boxes ---------- */
.gk-box {
	border-radius: 14px;
}
.gk-sponsor {
	text-align: center;
}
.gk-sponsor-logo {
	display: block;
	padding: 0.5rem 0;
}
.gk-sponsor-logo img {
	display: block;
	width: 100%;
	max-width: 240px;
	height: auto;
	margin: 0 auto;
	transition: opacity 0.15s ease;
}
.gk-sponsor-logo:hover img {
	opacity: 0.75;
}
.gk-ad-spot {
	border: 2px dashed var(--wp--preset--color--line);
	text-align: center;
}

/* WutSum box (keeps the original green logo). */
.gk-wutsum-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.6rem;
	text-align: center;
	text-decoration: none !important;
	color: var(--wp--preset--color--contrast) !important;
}
.gk-wutsum-link img {
	width: 100%;
	max-width: 200px;
	height: auto;
	transition: transform 0.15s ease;
}
.gk-wutsum-link:hover img {
	transform: scale(1.03);
}
.gk-wutsum-kicker {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--muted);
}
.gk-wutsum-tagline {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--gk-wutsum-text);
}

/* ---------- Visitor counter ---------- */
.gk-counter {
	display: grid;
	gap: 0.5rem;
	margin: 0;
}
.gk-counter__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 0.55rem 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.gk-counter__row:last-child {
	border-bottom: 0;
}
.gk-counter dt {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	display: flex;
	align-items: center;
	gap: 0.45rem;
}
.gk-counter dd {
	margin: 0;
	font-weight: 800;
	font-size: var(--wp--preset--font-size--large);
	font-variant-numeric: tabular-nums;
	color: var(--wp--preset--color--contrast);
}
.gk-counter__row.is-total dd {
	font-size: var(--wp--preset--font-size--x-large);
	color: var(--wp--preset--color--primary);
}
.gk-live-dot {
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
	background: #2fa84f;
	box-shadow: 0 0 0 0 rgba(47, 168, 79, 0.6);
	animation: gk-pulse 2s infinite;
}
@keyframes gk-pulse {
	70% { box-shadow: 0 0 0 0.45rem rgba(47, 168, 79, 0); }
	100% { box-shadow: 0 0 0 0 rgba(47, 168, 79, 0); }
}

/* ---------- Reactions ---------- */
.gk-reactions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin-top: var(--wp--preset--spacing--40);
}
.gk-reactions__label {
	font-weight: 700;
	margin-right: 0.25rem;
}
.gk-reaction {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.45rem 0.95rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	background: var(--wp--preset--color--base);
	font: inherit;
	font-weight: 700;
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.gk-reaction:hover {
	border-color: var(--wp--preset--color--primary);
}
.gk-reaction:active {
	transform: scale(0.94);
}
.gk-reaction[aria-pressed="true"] {
	background: var(--gk-tint);
	border-color: var(--wp--preset--color--primary);
}
.gk-reaction__emoji {
	font-size: 1.2rem;
	line-height: 1;
}
.gk-reaction__count {
	font-variant-numeric: tabular-nums;
	min-width: 1ch;
}

/*
 * Reaction bar that pops up over the card's picture on hover (never over the title).
 * Wide screens: picture is on the left → bar at its bottom-left corner.
 * Narrow screens: picture is on top → bar at its top-left corner.
 * Touch screens (no hover): not shown on cards – react on the post page instead.
 */
.gk-card .gk-reactions--card {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 2; /* Above the "whole card is a link" layer, so the buttons can be clicked. */
	margin: 0;
	gap: 0.2rem;
	padding: 0.25rem;
	background: rgba(255, 255, 255, 0.96);
	border-radius: 999px;
	box-shadow: 0 6px 20px rgba(28, 35, 38, 0.22);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px) scale(0.96);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}
@media (min-width: 700px) {
	.gk-card .gk-reactions--card {
		top: auto;
		bottom: 0.75rem;
	}
}
@media (hover: hover) {
	.gk-card:hover .gk-reactions--card,
	.gk-card:focus-within .gk-reactions--card {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: opacity 0.18s ease, transform 0.18s ease;
	}
}
@media (hover: none) {
	.gk-card .gk-reactions--card {
		display: none;
	}
}
.gk-reactions--card .gk-reaction {
	padding: 0.25rem 0.55rem;
	border-color: transparent;
	font-size: var(--wp--preset--font-size--small);
	gap: 0.3rem;
}
.gk-reactions--card .gk-reaction:hover {
	transform: scale(1.1);
}
.gk-reactions--card .gk-reaction__emoji {
	font-size: 1.1rem;
}

/* Two equal buttons side by side (Startnummer page); stacked on phones. */
.gk-btn-pair {
	max-width: 600px;
}
.gk-btn-pair .wp-block-button {
	flex: 1 1 0;
}
.gk-btn-pair .wp-block-button__link {
	width: 100%;
}
@media (max-width: 600px) {
	.gk-btn-pair {
		flex-direction: column;
		align-items: stretch;
	}
}
.gk-small-note {
	color: var(--wp--preset--color--muted);
}

/* ---------- Single post ---------- */
.gk-single-image img {
	border-radius: 14px;
}
.wp-block-post-content img {
	border-radius: 8px;
	height: auto;
}
.wp-block-post-content .wp-block-gallery img {
	border-radius: 6px;
}

/* ---------- Footer ---------- */
.gk-footer a {
	color: inherit;
}
.gk-footer a:hover {
	color: var(--wp--preset--color--accent);
}
/* ---------- Accessibility ---------- */
:where(a, button, input, textarea, select):focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		animation: none !important;
	}
}

/* ---------- Comment form ---------- */
.gk-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.comment-respond label {
	display: block;
	font-weight: 700;
	margin-bottom: 0.3rem;
}
.comment-respond input[type="text"],
.comment-respond textarea {
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 10px;
	font: inherit;
	background: var(--wp--preset--color--base);
}
.comment-respond input[type="text"]:focus,
.comment-respond textarea:focus {
	border-color: var(--wp--preset--color--primary);
	outline: 2px solid rgba(61, 107, 120, 0.25);
	outline-offset: 0;
}
.comment-respond .comment-form-author input {
	max-width: 22rem;
}
.comment-notes {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

/* WutSum box: small line under the tagline. */
.gk-wutsum-note {
	margin-top: -0.4rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

/* Footer credit: "Nettside og logo av" + Nordecal logo in white. */
.gk-credit {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	color: #9aa7ab !important;
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none !important;
	opacity: 0.85;
	transition: opacity 0.15s ease;
}
.gk-credit:hover {
	opacity: 1;
}
.gk-credit img {
	filter: brightness(0) invert(1);
	height: 18px;
	width: auto;
}

/* ---------- Kartingkalender ---------- */
.gk-cal__month {
	margin: var(--wp--preset--spacing--50) 0 var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--primary);
}
.gk-cal__month:first-child {
	margin-top: 0;
}
.gk-cal__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.6rem;
}
.gk-cal__item {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	padding: 0.85rem 1rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	background: var(--wp--preset--color--base);
}
.gk-cal__item.is-past {
	opacity: 0.55;
}
.gk-cal__date {
	flex: 0 0 4.2rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0.4rem 0.2rem;
	border-radius: 10px;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	line-height: 1.1;
	text-align: center;
}
.gk-cal__days {
	font-weight: 800;
	font-size: 1.15rem;
	font-variant-numeric: tabular-nums;
}
.gk-cal__mon {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.gk-cal__info {
	min-width: 0;
}
.gk-cal__name {
	margin: 0;
	font-size: var(--wp--preset--font-size--medium);
}
.gk-cal__venue,
.gk-cal__note,
.gk-cal__links {
	margin: 0.15rem 0 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.gk-cal__note {
	color: var(--wp--preset--color--contrast);
}
.gk-cal__links a {
	color: var(--wp--preset--color--primary);
}
.gk-cal__links .gk-cal__entry {
	font-weight: 700;
	color: var(--gk-ok-text);
}
.gk-cal__item.is-cancelled .gk-cal__name {
	text-decoration: line-through;
	color: var(--wp--preset--color--muted);
}
.gk-cal__tag.is-cancelled {
	background: var(--gk-err-bg);
	color: var(--gk-err-text);
	text-decoration: none;
}
.gk-cal__tag {
	display: inline-block;
	margin-left: 0.4rem;
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	background: var(--gk-tint);
	color: var(--wp--preset--color--primary-dark);
	font-size: 0.72rem;
	font-weight: 700;
	vertical-align: middle;
}
.gk-cal__empty,
.gk-cal__updated {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}
.gk-cal__updated {
	margin-top: var(--wp--preset--spacing--40);
}

/* ---------- Race page (/lop/…) ---------- */
.gk-cal__name a {
	color: inherit;
	text-decoration: none;
}
.gk-cal__name a:hover {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
}
.gk-race__hero {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	min-height: 320px;
	display: flex;
	align-items: flex-end;
	background: var(--wp--preset--color--contrast) center / cover no-repeat;
}
.gk-race__hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.35) 55%, rgba(0, 0, 0, 0.1) 100%);
}
.gk-race__hero-inner {
	position: relative;
	padding: var(--wp--preset--spacing--50);
	color: #fff;
}
.gk-race__title {
	margin: 0.4rem 0 0.3rem;
	color: #fff;
	font-size: clamp(1.9rem, 4vw, 3rem);
	line-height: 1.1;
}
.gk-race__when {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	opacity: 0.95;
}
.gk-race__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
}
.gk-badge {
	display: inline-block;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--wp--preset--color--primary-dark);
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.gk-badge.is-live { background: #2fa84f; color: #fff; }
.gk-badge.is-cancelled { background: #b23a2e; color: #fff; }
.gk-badge.is-done { background: rgba(255, 255, 255, 0.7); }
.gk-race__grid {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	margin-top: var(--wp--preset--spacing--50);
}
@media (min-width: 900px) {
	.gk-race__grid {
		grid-template-columns: minmax(0, 1fr) 360px;
	}
}
.gk-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0 0 var(--wp--preset--spacing--40);
}
.gk-btn {
	display: inline-block;
	padding: 0.65rem 1.2rem;
	border: 2px solid var(--wp--preset--color--primary);
	border-radius: 999px;
	color: var(--wp--preset--color--primary) !important;
	font-weight: 700;
	text-decoration: none !important;
	transition: background 0.15s ease, color 0.15s ease;
}
.gk-btn:hover {
	background: var(--gk-tint);
}
.gk-btn.is-primary {
	background: var(--wp--preset--color--primary);
	color: #fff !important;
}
.gk-btn.is-primary:hover {
	background: var(--wp--preset--color--primary-dark);
	border-color: var(--wp--preset--color--primary-dark);
}
.gk-subhead {
	margin: var(--wp--preset--spacing--50) 0 var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--large);
}
.gk-facts {
	margin: 0;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	overflow: hidden;
	background: var(--wp--preset--color--base);
}
.gk-facts__row {
	display: grid;
	grid-template-columns: 9rem minmax(0, 1fr);
	gap: 1rem;
	padding: 0.65rem 1rem;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.gk-facts__row:last-child {
	border-bottom: 0;
}
.gk-facts dt {
	color: var(--wp--preset--color--muted);
	font-weight: 600;
}
.gk-facts dd {
	margin: 0;
	overflow-wrap: anywhere;
}
.gk-facts.is-small {
	border: 0;
	background: none;
	font-size: var(--wp--preset--font-size--small);
}
.gk-facts.is-small .gk-facts__row {
	grid-template-columns: 5.5rem minmax(0, 1fr);
	padding: 0.35rem 0;
}
.gk-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.gk-chips li {
	padding: 0.3rem 0.75rem;
	border-radius: 999px;
	background: var(--gk-tint);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
}
.gk-chips span {
	color: var(--wp--preset--color--muted);
	font-weight: 400;
}
.gk-docs {
	margin: 0;
	padding-left: 1.1rem;
}
.gk-race__official,
.gk-credit-line {
	margin-top: var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}
.gk-track-card {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
	overflow: hidden;
	background: var(--wp--preset--color--base);
}
.gk-track-card__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}
.gk-track-card__body {
	padding: var(--wp--preset--spacing--40);
}
.gk-track-card h2 {
	margin: 0.2rem 0 0.5rem;
	font-size: var(--wp--preset--font-size--large);
}
.gk-back {
	margin-top: var(--wp--preset--spacing--40);
}
.gk-mini-list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.gk-mini-list li {
	padding: 0.4rem 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.gk-mini-list span {
	display: block;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}
.gk-minihead {
	margin: var(--wp--preset--spacing--30) 0 0.2rem;
	font-size: var(--wp--preset--font-size--small);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--muted);
}
.gk-more summary {
	cursor: pointer;
	padding: 0.5rem 0;
	color: var(--wp--preset--color--primary);
	font-weight: 600;
}

/* ---------- Track list (/baner/) ---------- */
.gk-track-count {
	color: var(--wp--preset--color--muted);
}
.gk-tracks__region {
	margin: var(--wp--preset--spacing--50) 0 var(--wp--preset--spacing--20) !important;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--primary);
}
.gk-track-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 0.8rem !important;
	margin: 0 !important;
	padding: 0;
	list-style: none;
}
.gk-track-list > li {
	margin: 0 !important;
}
.gk-track-item__link {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	height: 100%;
	padding: 1rem 1.1rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	background: var(--wp--preset--color--base);
	color: inherit !important;
	text-decoration: none !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gk-track-item__link:hover {
	border-color: var(--wp--preset--color--primary);
	box-shadow: var(--wp--preset--shadow--card);
}
.gk-track-item__img {
	width: calc(100% + 2.2rem);
	max-width: none;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	margin: -1rem -1.1rem 0.6rem;
	border-radius: 12px 12px 0 0;
}
.gk-track-item__name {
	font-weight: 800;
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--contrast);
}
.gk-track-item__meta {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}
.gk-track-item__next {
	margin-top: 0.4rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--primary);
}

/* Room between the facts table and the buttons under it (track page side box, race page). */
.gk-facts + .gk-actions {
	margin-top: var(--wp--preset--spacing--40);
}

/* ---------- Guides (tables, notes, quick start) ---------- */
.gk-table table {
	border-collapse: collapse;
	width: 100%;
	font-size: var(--wp--preset--font-size--small);
}
.gk-table th,
.gk-table td {
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--wp--preset--color--line);
	text-align: left;
	vertical-align: top;
}
.gk-table thead th {
	background: var(--wp--preset--color--surface);
	font-weight: 700;
}
.gk-note {
	padding: 0.8rem 1rem;
	border-left: 3px solid var(--wp--preset--color--primary);
	background: var(--gk-tint-2);
	border-radius: 0 10px 10px 0;
	font-size: var(--wp--preset--font-size--small);
}
.gk-quickstart ol {
	margin-bottom: 0;
}
.gk-quickstart li {
	margin: 0.3rem 0;
}
.wp-block-post-content h2[id] {
	scroll-margin-top: 140px; /* Sticky header must not hide headings when jumping to them. */
}

/* ---------- Results page ---------- */
.gk-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.8rem 1rem;
	margin: 0 0 var(--wp--preset--spacing--30);
	padding: 1rem;
	border-radius: 12px;
	background: var(--wp--preset--color--surface);
}
.gk-filter label {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	color: var(--wp--preset--color--muted);
}
.gk-filter select,
.gk-filter input {
	min-width: 9rem;
	padding: 0.5rem 0.6rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	background: var(--wp--preset--color--base);
	font: inherit;
	font-weight: 400;
	color: var(--wp--preset--color--contrast);
}
.gk-filter .gk-btn {
	padding: 0.5rem 1.2rem;
	cursor: pointer;
}
.gk-filter__reset {
	align-self: center;
	font-size: var(--wp--preset--font-size--small);
}
.gk-results__count {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}
.gk-results__list {
	display: grid;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.gk-results__item {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	padding: 0.85rem 1rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	background: var(--wp--preset--color--base);
}
.gk-results__info {
	min-width: 0;
}
.gk-results__info .gk-chips {
	margin-top: 0.5rem;
}
.gk-chips.is-links li {
	padding: 0;
}
.gk-chips.is-links a {
	display: inline-block;
	padding: 0.3rem 0.75rem;
	color: var(--wp--preset--color--primary-dark);
	text-decoration: none;
}
.gk-chips.is-links a:hover {
	text-decoration: underline;
}
.gk-chips.is-links .gk-results__laps {
	padding-left: 0;
	margin-left: -0.4rem;
}
.gk-results__champ {
	padding: var(--wp--preset--spacing--40);
	border-radius: 14px;
	background: var(--wp--preset--color--surface);
}
.gk-results__champ .gk-subhead {
	margin-top: 0;
}
.gk-results__champ .gk-chips.is-links li {
	background: var(--wp--preset--color--base);
}

/* ---------- Kartingguiden: rule vs tip boxes, article cards ---------- */
.gk-rule,
.gk-tip {
	margin-block: var(--wp--preset--spacing--30) !important;
	padding: 1rem 1.2rem 0.4rem;
	border-radius: 12px;
}
.gk-rule {
	border: 2px solid var(--wp--preset--color--primary);
	background: var(--gk-tint-2);
}
.gk-tip {
	border: 2px dashed var(--gk-soft-line);
	background: var(--wp--preset--color--base);
}
.gk-box-label {
	display: inline-block;
	margin: 0 0 0.4rem !important;
	padding: 0.15rem 0.7rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.gk-rule .gk-box-label {
	background: var(--wp--preset--color--primary);
	color: #fff;
}
.gk-rule .gk-box-label::before {
	content: "§ ";
}
.gk-tip .gk-box-label {
	background: var(--gk-tint);
	color: var(--wp--preset--color--primary-dark);
}
.gk-tip .gk-box-label::before {
	content: "✓ ";
}
.gk-box-source {
	margin-top: 0.4rem !important;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.gk-rule .gk-table td,
.gk-rule .gk-table th {
	background: var(--wp--preset--color--base);
}
.gk-guide-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 0.9rem;
}
.gk-guide-card {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	height: 100%;
	padding: 1.1rem 1.2rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
	background: var(--wp--preset--color--base);
	color: inherit !important;
	text-decoration: none !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.gk-guide-card:hover {
	border-color: var(--wp--preset--color--primary);
	box-shadow: var(--wp--preset--shadow--card);
	transform: translateY(-2px);
}
.gk-guide-card__title {
	font-weight: 800;
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--contrast);
}
.gk-guide-card__text {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}
.gk-guide-card__more {
	margin-top: auto;
	padding-top: 0.4rem;
	font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--primary);
}
.gk-guide-cards > * {
	margin: 0 !important;
}
.gk-box-label + * {
	margin-top: 0.3rem !important;
}

/* ---------- Karting Toolbox & cost calculator ---------- */
.gk-tool {
	margin-block: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
	padding: var(--wp--preset--spacing--40);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 16px;
	background: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--card);
}
.gk-tool input[type="text"],
.gk-tool input[type="number"],
.gk-tool input[type="date"],
.gk-tool select,
.gk-tool textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 0.55rem 0.65rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	background: var(--wp--preset--color--base);
	font: inherit;
	color: var(--wp--preset--color--contrast);
}
.gk-tool textarea {
	font-family: ui-monospace, Menlo, Consolas, monospace;
}
.gk-tool__form {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 0.8rem 1rem;
	margin: 0 0 1rem;
}
.gk-tool__form label,
.gk-laps__inputs label {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	color: var(--wp--preset--color--muted);
}
.gk-tool__form .is-wide {
	grid-column: 1 / -1;
	margin: 0;
}
.gk-tool__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 1rem 0 0;
}
.gk-tool button.gk-btn {
	cursor: pointer;
	background: var(--wp--preset--color--base);
	font: inherit;
	font-weight: 700;
}
.gk-tool button.gk-btn.is-primary {
	background: var(--wp--preset--color--primary);
}
.gk-tool__privacy,
.gk-tool__hint {
	margin: 1rem 0 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.gk-stat {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.9rem 1.1rem;
	border-radius: 12px;
	background: var(--wp--preset--color--surface);
}
.gk-stat__label {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	color: var(--wp--preset--color--muted);
}
.gk-stat__value {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 800;
	color: var(--wp--preset--color--primary);
	font-variant-numeric: tabular-nums;
}
.gk-stat.is-total {
	background: var(--wp--preset--color--primary);
}
.gk-stat.is-total .gk-stat__label,
.gk-stat.is-total .gk-stat__value {
	color: #fff;
}

/* Checklist */
.gk-checklist__top {
	position: sticky;
	top: 110px;
	z-index: 3;
	margin: -0.5rem 0 1rem;
	padding: 0.5rem 0;
	background: var(--wp--preset--color--base);
}
.gk-progress {
	height: 10px;
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	overflow: hidden;
}
.gk-progress__bar {
	display: block;
	width: 0;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--wp--preset--color--primary), #2fa84f);
	transition: width 0.25s ease;
}
.gk-checklist__status {
	margin: 0.4rem 0 0;
	font-weight: 800;
}
.gk-checklist__group {
	margin: 0 0 1rem;
	padding: 0.4rem 0 0;
	border: 0;
	border-top: 1px solid var(--wp--preset--color--line);
}
.gk-checklist__group legend,
.gk-cost fieldset legend {
	padding: 0 0.4rem 0 0;
	font-weight: 800;
	color: var(--wp--preset--color--primary-dark);
}
.gk-check {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.45rem 0.2rem;
	cursor: pointer;
}
.gk-check input {
	width: 1.25rem;
	height: 1.25rem;
	accent-color: var(--wp--preset--color--primary);
	flex: none;
}
.gk-check input:checked + span {
	color: var(--wp--preset--color--muted);
	text-decoration: line-through;
}
.gk-check__del {
	margin-left: auto;
	padding: 0 0.5rem;
	border: 0;
	background: none;
	color: var(--wp--preset--color--muted);
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
}
.gk-check__del:hover {
	color: var(--gk-err-text);
}
.gk-inline-form {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.4rem;
}

/* Gearing */
.gk-gear__result,
.gk-cost__cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 0.8rem;
	margin-bottom: 1rem;
}
.gk-gear__table,
.gk-cost__table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--small);
}
.gk-gear__table caption {
	padding-bottom: 0.4rem;
	text-align: left;
	font-weight: 700;
}
.gk-gear__table th,
.gk-gear__table td,
.gk-cost__table td {
	padding: 0.5rem 0.7rem;
	border-bottom: 1px solid var(--wp--preset--color--line);
	text-align: left;
}
.gk-gear__table tr.is-current td {
	background: var(--gk-tint);
	font-weight: 800;
}

/* Tyre log */
.gk-tyrelog__list {
	overflow-x: auto;
}
.gk-tyrelog__list table {
	min-width: 720px;
}

/* Lap times */
.gk-laps__inputs,
.gk-laps__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1rem;
}
.gk-laps__result {
	margin-top: 1rem;
}
.gk-laps__col h3 {
	margin: 0 0 0.5rem;
}
.gk-laps__stats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.4rem;
	margin: 0 0 0.8rem;
}
.gk-laps__stats div {
	padding: 0.5rem 0.7rem;
	border-radius: 8px;
	background: var(--wp--preset--color--surface);
}
.gk-laps__stats dt {
	font-size: 0.75rem;
	color: var(--wp--preset--color--muted);
}
.gk-laps__stats dd {
	margin: 0;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}
.gk-laps__bars {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--small);
	font-variant-numeric: tabular-nums;
}
.gk-laps__bars li {
	display: grid;
	grid-template-columns: 1.8rem 1fr 4.8rem;
	align-items: center;
	gap: 0.5rem;
	padding: 0.15rem 0;
}
.gk-laps__bar {
	height: 0.7rem;
	border-radius: 999px;
	background: var(--gk-soft-line);
}
.gk-laps__bars li.is-best .gk-laps__bar {
	background: #2fa84f;
}
.gk-laps__bars li.is-best .gk-laps__t {
	font-weight: 800;
	color: var(--gk-ok-text);
}
.gk-laps__n {
	color: var(--wp--preset--color--muted);
	text-align: right;
}
.gk-laps__diff {
	margin-top: 1rem;
	padding: 0.8rem 1rem;
	border-radius: 10px;
	background: var(--gk-tint-2);
	font-weight: 700;
}

/* Cost calculator */
.gk-cost__form {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1rem 1.4rem;
	margin-bottom: 1.4rem;
}
.gk-cost fieldset {
	margin: 0;
	padding: 0;
	border: 0;
}
.gk-choice {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.25rem 0;
	cursor: pointer;
}
.gk-choice input {
	accent-color: var(--wp--preset--color--primary);
	width: 1.1rem;
	height: 1.1rem;
}
.gk-range {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	font-weight: 700;
}
.gk-range input {
	accent-color: var(--wp--preset--color--primary);
}
.gk-cost__details summary {
	cursor: pointer;
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	padding: 0.4rem 0;
}

/* Print: only the checklist, clean. */
@media print {
	.wp-site-blocks > header,
	.wp-site-blocks > footer,
	.gk-tool__actions,
	.gk-inline-form,
	.gk-check__del,
	.gk-guide-cards {
		display: none !important;
	}
	.gk-tool {
		box-shadow: none;
		border: 0;
		padding: 0;
	}
	.gk-checklist__top {
		position: static;
	}
}
.gk-inline-form .gk-btn {
	white-space: nowrap;
}
.gk-cost__cards .gk-stat__value {
	font-size: var(--wp--preset--font-size--large);
}

/* ---------- Notices ---------- */
.gk-notice {
	margin: 0 0 1.2rem;
	padding: 1rem 1.2rem;
	border-radius: 12px;
	border: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--surface);
}
.gk-notice.is-ok {
	border-color: var(--gk-ok-line);
	background: var(--gk-ok-bg);
}
.gk-notice.is-error {
	border-color: var(--gk-err-line);
	background: var(--gk-err-bg);
}
.gk-notice h2 {
	margin-top: 0;
	font-size: var(--wp--preset--font-size--large);
}
.gk-copy {
	overflow-wrap: anywhere;
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: var(--wp--preset--font-size--small);
}
.gk-inline {
	display: inline;
}

/* ---------- Marketplace ---------- */
.gk-ad-form {
	display: grid;
	gap: 1rem;
	max-width: 820px;
}
.gk-ad-form fieldset {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 0.8rem 1rem;
	margin: 0;
	padding: 1rem 1.2rem 1.2rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
}
.gk-ad-form legend {
	padding: 0 0.4rem;
	font-weight: 800;
	color: var(--wp--preset--color--primary-dark);
}
.gk-ad-form label {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	color: var(--wp--preset--color--muted);
}
.gk-ad-form label.gk-check {
	flex-direction: row;
	font-weight: 400;
	color: var(--wp--preset--color--contrast);
}
.gk-ad-form .is-wide {
	grid-column: 1 / -1;
}
.gk-ad-form input:not([type="checkbox"]):not([type="file"]),
.gk-ad-form select,
.gk-ad-form textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 0.6rem 0.7rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	font: inherit;
	font-weight: 400;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
}
.gk-ad-form button {
	cursor: pointer;
	font: inherit;
	font-weight: 700;
}
.gk-form-help {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.gk-ads__top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}
.gk-ads__top .gk-filter {
	margin: 0;
}
.gk-ads__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 1rem;
	margin: 0 0 var(--wp--preset--spacing--50);
	padding: 0;
	list-style: none;
}
.gk-ad-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
	overflow: hidden;
	background: var(--wp--preset--color--base);
	color: inherit !important;
	text-decoration: none !important;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.gk-ad-card:hover {
	box-shadow: var(--wp--preset--shadow--card);
	transform: translateY(-2px);
}
.gk-ad-card__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	background: var(--wp--preset--color--surface);
}
.gk-ad-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.8rem 1rem 1rem;
}
.gk-ad-card__price {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 800;
	color: var(--wp--preset--color--primary);
}
.gk-ad-card__title {
	font-weight: 700;
}
.gk-ad-card__meta {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.gk-ad-card.is-sold {
	opacity: 0.6;
}
.gk-ad {
	display: grid;
	gap: var(--wp--preset--spacing--50);
}
@media (min-width: 900px) {
	.gk-ad {
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	}
	.gk-ad__body,
	.gk-ad__contact,
	.gk-ad .gk-back {
		grid-column: 1 / -1;
	}
	.gk-ad__contact {
		max-width: 820px;
	}
}
.gk-ad__main {
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	background: var(--wp--preset--color--surface);
}
.gk-ad__main.is-empty {
	display: grid;
	place-items: center;
	aspect-ratio: 4 / 3;
	color: var(--wp--preset--color--muted);
}
.gk-ad__img {
	display: block;
	width: 100%;
	height: auto;
}
.gk-ad__sold {
	position: absolute;
	top: 1rem;
	left: 1rem;
	padding: 0.3rem 0.9rem;
	border-radius: 999px;
	background: #b23a2e;
	color: #fff;
	font-weight: 800;
}
.gk-ad__thumbs {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.5rem;
}
.gk-ad__thumbs img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 8px;
}
.gk-ad__title {
	margin: 0.2rem 0;
	font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.gk-ad__price {
	margin: 0 0 1rem;
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 800;
	color: var(--wp--preset--color--primary);
}
.gk-ad-safety {
	margin-top: 1.4rem !important;
}
.gk-ad-safety ul {
	margin: 0.3rem 0 0.6rem;
}

/* ---------- Race weekend sections ---------- */
.gk-race__nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0 0 var(--wp--preset--spacing--30);
	padding: 0;
	list-style: none;
}
.gk-race__nav a {
	display: inline-block;
	padding: 0.35rem 0.9rem;
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--primary-dark);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
}
.gk-race__nav a:hover {
	background: var(--gk-tint);
}
.gk-race__section {
	scroll-margin-top: 140px;
}
.gk-program {
	margin: 0;
	padding: 0;
	list-style: none;
	border-left: 3px solid var(--wp--preset--color--primary);
}
.gk-program li {
	padding: 0.4rem 0 0.4rem 1rem;
}
.gk-program strong {
	display: inline-block;
	min-width: 8.5rem;
	color: var(--wp--preset--color--primary-dark);
}
.gk-weather {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.gk-weather li {
	display: grid;
	gap: 0.15rem;
	padding: 0.9rem 1rem;
	border-radius: 12px;
	background: var(--wp--preset--color--surface);
	text-align: center;
}
.gk-weather__day {
	font-weight: 700;
}
.gk-weather__icon {
	font-size: 2rem;
	line-height: 1.2;
}
.gk-weather__label,
.gk-weather__rain {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.gk-weather__temp {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 800;
}

/* ---------- Big race weekends in the calendar ---------- */
.gk-weekends {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 0.9rem;
	margin: 0 0 var(--wp--preset--spacing--40);
	padding: 0;
	list-style: none;
}
.gk-weekend {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 170px;
	border-radius: 14px;
	overflow: hidden;
	background: var(--wp--preset--color--contrast) center / cover no-repeat;
	color: #fff !important;
	text-decoration: none !important;
}
.gk-weekend::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.1));
}
.gk-weekend__body {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	padding: 1rem 1.1rem;
}
.gk-weekend__date {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	opacity: 0.9;
}
.gk-weekend__name {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 800;
}
.gk-weekend__place {
	font-size: var(--wp--preset--font-size--small);
	opacity: 0.85;
}
.gk-facts + .gk-race__nav {
	margin-top: var(--wp--preset--spacing--40);
}

/* ---------- Banekart by Daniel Raastad (iframe) ---------- */
.gk-dd iframe {
	display: block;
	width: 100%;
	height: 860px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
	background: #eef1ee;
}
.gk-dd.is-all iframe {
	height: 1100px;
}
@media (max-width: 700px) {
	.gk-dd iframe,
	.gk-dd.is-all iframe {
		height: 760px;
	}
}
.gk-dd__credit {
	margin: 0.5rem 0 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.gk-dd__intro {
	color: var(--wp--preset--color--muted);
}
.gk-dd-section {
	margin-bottom: var(--wp--preset--spacing--50);
}
.gk-tabs {
	display: flex;
	width: fit-content;
	margin-left: 0 !important;
	box-sizing: border-box;
	gap: 0.25rem;
	margin: 0 0 var(--wp--preset--spacing--40);
	padding: 0.25rem;
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
}
.gk-tab {
	padding: 0.5rem 1.2rem;
	border: 0;
	border-radius: 999px;
	background: none;
	font: inherit;
	font-weight: 700;
	color: var(--wp--preset--color--primary-dark);
	cursor: pointer;
}
.gk-tab.is-active {
	background: var(--wp--preset--color--primary);
	color: #fff;
}

/* Track page: back link + "Løp på banen" in the side column */
.gk-backlink {
	margin: 0 0 0.6rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
}
.gk-backlink a {
	text-decoration: none;
}
.gk-backlink a:hover {
	text-decoration: underline;
}
.gk-track-races {
	margin-top: var(--wp--preset--spacing--40) !important;
}
.gk-track-races:not(:has(.gk-subhead)) {
	display: none;
}
.gk-track-races .gk-subhead {
	margin-top: 0.4rem;
}
.gk-track-races .gk-mini-list li {
	padding: 0.5rem 0;
}
.gk-dd-section .gk-subhead {
	margin-top: 0;
}

/* ---------- Hero: text lines up with the page content on wide screens ---------- */
.gk-hero.gk-hero .wp-block-cover__inner-container {
	box-sizing: border-box;
	width: 100% !important; /* WordPress shrinks it to the text width for "bottom left" covers. */
	max-width: 1240px;
	margin-inline: auto !important;
}
.gk-hero.gk-hero .wp-block-cover__inner-container > * {
	margin-left: 0 !important; /* Beat WordPress' own centring rule. */
	margin-right: auto !important;
}
.gk-hero-photos {
	margin-top: var(--wp--preset--spacing--40) !important;
	color: rgba(255, 255, 255, 0.88);
}
.gk-hero-photos a {
	color: #fff;
	font-weight: 700;
}

/* ---------- Front page: boxes in all columns start on the same line ---------- */
.gk-news-head {
	height: 3.2rem;
	box-sizing: border-box;
	align-items: flex-end !important;
}
.gk-news-head h2 {
	margin: 0;
	line-height: 1.1;
}
@media (min-width: 782px) {
	/* The sidebar box starts level with the first news card (below the "Siste nyheter" row). */
	.gk-side-col {
		padding-top: calc(3.2rem + var(--wp--preset--spacing--40));
	}
}

@media (min-width: 1290px) {
	/* Exact line-up with the logo and the boxes below. */
	.gk-hero.gk-hero .wp-block-cover__inner-container {
		padding-inline: 0 !important;
	}
}

/* ---------- Footer always at the bottom, also on short pages ---------- */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
.admin-bar .wp-site-blocks {
	min-height: calc(100vh - 32px);
}
.wp-site-blocks > footer {
	margin-top: auto !important;
}

/* ---------- Hero: photo appeal in the bottom right corner ---------- */
@media (min-width: 782px) {
	.gk-hero.gk-hero .wp-block-cover__inner-container {
		position: relative;
	}
	.gk-hero .gk-hero-photos {
		position: absolute;
		right: 0;
		bottom: 0;
		max-width: 300px !important;
		margin: 0 !important;
		margin-left: auto !important;
		padding: 0.7rem 0.9rem;
		border-radius: 12px;
		background: rgba(0, 0, 0, 0.45);
		backdrop-filter: blur(4px);
		text-align: right;
		line-height: 1.45;
	}
}

/* ---------- Startnummer check ---------- */
.gk-sn__form {
	display: grid;
	gap: 1.2rem;
}
.gk-sn__classes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	border: 0;
}
.gk-sn__classes legend,
.gk-sn__number > span {
	display: block;
	width: 100%;
	margin-bottom: 0.5rem;
	font-weight: 800;
	color: var(--wp--preset--color--primary-dark);
}
.gk-sn__class input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.gk-sn__class span {
	display: inline-block;
	padding: 0.5rem 1rem;
	border: 2px solid var(--wp--preset--color--line);
	border-radius: 999px;
	background: var(--wp--preset--color--base);
	font-weight: 700;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.gk-sn__class span:hover {
	border-color: var(--wp--preset--color--primary);
}
.gk-sn__class input:checked + span {
	border-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--primary);
	color: #fff;
}
.gk-sn__class input:focus-visible + span {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}
.gk-sn__number input {
	box-sizing: border-box;
	width: 100%;
	max-width: 12rem;
	padding: 0.7rem 0.9rem;
	border: 2px solid var(--wp--preset--color--line);
	border-radius: 12px;
	font: inherit;
	font-size: 1.6rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}
.gk-sn__number input:focus {
	border-color: var(--wp--preset--color--primary);
	outline: none;
}
.gk-sn__result:not(:empty) {
	margin-top: 1.2rem;
}
.gk-sn__answer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 1rem;
	padding: 1rem 1.2rem;
	border-radius: 12px;
	font-size: var(--wp--preset--font-size--large);
}
.gk-sn__answer.is-free {
	border: 2px solid var(--gk-ok-line);
	background: var(--gk-ok-bg);
}
.gk-sn__answer.is-free strong {
	color: var(--gk-ok-text);
}
.gk-sn__answer.is-taken {
	border: 2px solid var(--gk-err-line);
	background: var(--gk-err-bg);
}
.gk-sn__answer.is-taken strong {
	color: var(--gk-err-text);
}
.gk-sn__answer .gk-btn {
	font-size: var(--wp--preset--font-size--small);
}
/* Padding/border inside the max width (otherwise notes stick out of the content column). */
.gk-note,
.gk-rule,
.gk-tip {
	box-sizing: border-box;
}

/* ---------- Menu: "Startnummer 2027" as a teal button ---------- */
.gk-header .gk-nav-cta > .wp-block-navigation-item__content,
.gk-header .gk-nav-cta.current-menu-item > .wp-block-navigation-item__content {
	padding: 0.5em 1.1em !important;
	border: 0 !important;
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
	color: #fff !important;
	transition: background 0.15s ease, transform 0.15s ease;
}
.gk-header .gk-nav-cta > .wp-block-navigation-item__content:hover,
.gk-header .gk-nav-cta.current-menu-item > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--primary-dark);
	color: #fff !important;
}
.gk-header .gk-nav-cta > .wp-block-navigation-item__content:hover {
	transform: translateY(-1px);
}

/* ---------- Kartinghistorie ---------- */
.gk-timeline {
	position: relative;
	margin: 0;
	padding: 0 0 0 1.4rem;
	list-style: none;
	border-left: 3px solid var(--wp--preset--color--line);
}
.gk-timeline li {
	position: relative;
	display: grid;
	grid-template-columns: 4.5rem minmax(0, 1fr);
	gap: 0.8rem;
	padding: 0.55rem 0;
}
.gk-timeline li::before {
	content: "";
	position: absolute;
	left: calc(-1.4rem - 8px);
	top: 0.95rem;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px var(--wp--preset--color--base);
}
.gk-timeline__year {
	font-weight: 800;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--primary);
	font-variant-numeric: tabular-nums;
}
.gk-timeline__src {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.gk-nm__year {
	margin: 0 0 0.6rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
	background: var(--wp--preset--color--base);
	overflow: hidden;
}
.gk-nm__year summary {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	padding: 0.8rem 1.1rem;
	cursor: pointer;
	list-style-position: inside;
}
.gk-nm__y {
	font-weight: 800;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--primary);
}
.gk-nm__where {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}
.gk-nm__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 0.8rem;
	padding: 0 1.1rem 1.1rem;
}
.gk-nm__class {
	padding: 0.8rem 1rem;
	border-radius: 12px;
	background: var(--wp--preset--color--surface);
}
.gk-nm__class h3 {
	margin: 0 0 0.4rem;
	font-size: var(--wp--preset--font-size--medium);
}
.gk-nm__class ol {
	margin: 0 0 0.4rem;
	padding: 0;
	list-style: none;
}
.gk-nm__class li {
	display: grid;
	grid-template-columns: 1.6rem minmax(0, 1fr);
	column-gap: 0.4rem;
	padding: 0.2rem 0;
}
.gk-nm__medal {
	grid-row: span 2;
	font-size: 1.2rem;
}
.gk-nm__name {
	font-weight: 700;
}
.gk-nm__class li.is-1 .gk-nm__name {
	color: var(--wp--preset--color--primary-dark);
}
.gk-nm__club,
.gk-nm__pdf,
.gk-nm__none {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.gk-nm__none {
	padding: 0 1.1rem 1rem;
	margin: 0;
}
.gk-otd {
	margin: 0;
	padding: 0;
	list-style: none;
}
.gk-otd li {
	padding: 0.45rem 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.gk-otd li:last-child {
	border-bottom: 0;
}
.gk-otd__ago {
	display: block;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}
.gk-otd a {
	font-weight: 600;
}

/* ---------- Flags (Karting for foreldre) ---------- */
.gk-flags {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 0.7rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.gk-flag {
	display: flex;
	gap: 0.9rem;
	align-items: flex-start;
	padding: 0.8rem 0.9rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	background: var(--wp--preset--color--base);
}
.gk-flag__swatch {
	flex: 0 0 56px;
	height: 40px;
	border-radius: 4px;
	border: 1px solid rgba(0, 0, 0, 0.25);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.gk-flag__body {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	font-size: var(--wp--preset--font-size--small);
}
.gk-flag__body strong {
	font-size: var(--wp--preset--font-size--medium);
}
.gk-flag__body em {
	font-style: normal;
	font-weight: 700;
	color: var(--wp--preset--color--primary-dark);
}
.gk-flag--green { background: #1f9d48; }
.gk-flag--yellow { background: #f6d21b; }
.gk-flag--blue { background: #1d5fd1; }
.gk-flag--red { background: #d42a20; }
.gk-flag--white { background: #fff; }
.gk-flag--black { background: #111; }
.gk-flag--yellowred { background: repeating-linear-gradient(90deg, #f6d21b 0 8px, #d42a20 8px 16px); }
.gk-flag--blackwhite { background: linear-gradient(135deg, #fff 50%, #111 50%); }
.gk-flag--blackorange { background: radial-gradient(circle, #f28c18 0 30%, #111 31%); }
.gk-flag--checkered {
	background-color: #fff;
	background-image: linear-gradient(45deg, #111 25%, transparent 25%, transparent 75%, #111 75%), linear-gradient(45deg, #111 25%, transparent 25%, transparent 75%, #111 75%);
	background-size: 16px 16px;
	background-position: 0 0, 8px 8px;
}
.gk-flag--greencross { background: linear-gradient(45deg, transparent 44%, #f6d21b 44% 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, #f6d21b 44% 56%, transparent 56%), #1f9d48; }
.gk-flag--bluered { background: linear-gradient(45deg, transparent 44%, #d42a20 44% 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, #d42a20 44% 56%, transparent 56%), #1d5fd1; }

/* ---------- Finn din klasse ---------- */
.gk-class__q[hidden] {
	display: none;
}
.gk-class__age {
	font-size: var(--wp--preset--font-size--large);
}
.gk-class__result h3 {
	margin: 1rem 0 0.4rem;
	font-size: var(--wp--preset--font-size--medium);
}
.gk-class__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.gk-class__list li {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.7rem 0.9rem;
	border-radius: 12px;
	border: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--surface);
	font-size: var(--wp--preset--font-size--small);
}
.gk-class__list li.is-yes {
	border-color: var(--gk-ok-line);
	background: var(--gk-ok-bg);
}
.gk-class__list li strong {
	font-size: var(--wp--preset--font-size--medium);
}
.gk-class__list li.is-yes strong {
	color: var(--gk-ok-text);
}
.gk-class fieldset {
	margin: 0;
	padding: 0;
	border: 0;
}
.gk-class legend {
	padding: 0 0 0.2rem;
	font-weight: 800;
	color: var(--wp--preset--color--primary-dark);
}
.gk-class .gk-range select {
	box-sizing: border-box;
	width: 100%;
	padding: 0.55rem 0.65rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	font: inherit;
}

/* ---------- Shortcut tiles at the top of the right panel ---------- */
.gk-tiles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.7rem;
}
.gk-tile {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.15rem;
	padding: 0.9rem 0.95rem 0.95rem;
	border-radius: 14px;
	background: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--card);
	color: inherit !important;
	text-decoration: none !important;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.gk-tile:hover {
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgba(28, 35, 38, 0.06), 0 12px 26px rgba(28, 35, 38, 0.12);
}
.gk-tile__icon {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-bottom: 0.45rem;
	border-radius: 12px;
	color: #fff;
	background: linear-gradient(135deg, var(--wp--preset--color--primary), var(--wp--preset--color--primary-dark));
	transition: transform 0.2s ease;
}
.gk-tile:hover .gk-tile__icon {
	transform: rotate(-5deg) scale(1.05);
}
.gk-tile__title {
	font-weight: 800;
	line-height: 1.2;
	color: var(--wp--preset--color--contrast);
}
.gk-tile__sub {
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.3;
	color: var(--wp--preset--color--muted);
}

/* Track list: disclaimer under both tabs */
.gk-track-disclaimer {
	margin: 1.5rem 0 0;
	font-size: var(--wp--preset--font-size--small);
	font-style: italic;
	color: var(--wp--preset--color--muted);
}

/* =====================================================================
   Dark mode
   html[data-theme="dark"] is set by a tiny script in <head> (functions.php):
   the visitor's own choice (sun/moon button) or else the device setting.
   ===================================================================== */
:root[data-theme="dark"] {
	color-scheme: dark;
	--wp--preset--color--base: #1b2529;
	--wp--preset--color--surface: #11181b;
	--wp--preset--color--line: #2c3a3f;
	--wp--preset--color--contrast: #e3eaec;
	--wp--preset--color--muted: #9db0b6;
	--wp--preset--color--primary: #4a8494;
	--wp--preset--color--primary-dark: #a9d3dd;
	--wp--preset--shadow--card: 0 1px 2px rgba(0, 0, 0, 0.45), 0 6px 18px rgba(0, 0, 0, 0.35);
	--gk-tint: #223439;
	--gk-tint-2: #1d2b30;
	--gk-ok-bg: #15281d;
	--gk-ok-line: #2f6a43;
	--gk-ok-text: #8fd6a6;
	--gk-err-bg: #2f1b19;
	--gk-err-line: #7a3a33;
	--gk-err-text: #f2a69c;
	--gk-soft-line: #34474d;
	--gk-header-bg: rgba(22, 31, 35, 0.94);
	--gk-wutsum-text: #9fd08f;
}
/* Links: a lighter teal that is easy to read on dark backgrounds. */
:where([data-theme="dark"]) a:where(:not(.wp-element-button)) {
	color: #8fc4d2;
}
/* Colours with two jobs: "base" is also white text on teal/photos, "primary-dark" also a dark background. */
[data-theme="dark"] .has-base-color,
[data-theme="dark"] .wp-element-button,
[data-theme="dark"] .wp-block-button__link,
[data-theme="dark"] .gk-cal__date {
	color: #fff !important;
}
[data-theme="dark"] .has-primary-dark-background-color {
	background-color: #0c1416 !important;
}
[data-theme="dark"] .gk-btn.is-primary:hover,
[data-theme="dark"] .gk-header .gk-nav-cta > .wp-block-navigation-item__content:hover,
[data-theme="dark"] .gk-header .gk-nav-cta.current-menu-item > .wp-block-navigation-item__content {
	background: #2d5560;
	border-color: #2d5560;
}
[data-theme="dark"] .gk-tile__icon {
	background: linear-gradient(135deg, #4a8494, #2d5560);
}
/* Teal used as text: a lighter teal in dark mode, so it is easy to read. */
[data-theme="dark"] .gk-header .wp-block-navigation-item__content:hover,
[data-theme="dark"] .gk-header .current-menu-item > .wp-block-navigation-item__content,
[data-theme="dark"] .gk-counter__row.is-total dd,
[data-theme="dark"] .gk-cal__month,
[data-theme="dark"] .gk-cal__links a,
[data-theme="dark"] .gk-cal__name a:hover,
[data-theme="dark"] .gk-btn,
[data-theme="dark"] .gk-more summary,
[data-theme="dark"] .gk-tracks__region,
[data-theme="dark"] .gk-track-item__next,
[data-theme="dark"] .gk-guide-card__more,
[data-theme="dark"] .gk-stat__value,
[data-theme="dark"] .gk-cost__details summary,
[data-theme="dark"] .gk-ad-card__price,
[data-theme="dark"] .gk-ad__price,
[data-theme="dark"] .gk-timeline__year,
[data-theme="dark"] .gk-nm__y,
[data-theme="dark"] .has-primary-color {
	color: #8fc4d2 !important;
}
/* The footer uses the "contrast" colour as background: keep it dark. */
[data-theme="dark"] .has-contrast-background-color {
	background-color: #0c1416 !important;
}
/* Light badges over race photos keep dark text. */
[data-theme="dark"] .gk-badge:not(.is-live):not(.is-cancelled) {
	color: #24434c;
}
/* Box borders written straight into the templates. */
[data-theme="dark"] .has-border-color[style*="#dfe6e9"] {
	border-color: var(--wp--preset--color--line) !important;
}
/* Sponsor logos (Nordecal, WutSum): all white in dark mode. */
[data-theme="dark"] .gk-sponsor-logo img,
[data-theme="dark"] .gk-wutsum-link img {
	filter: brightness(0) invert(1);
}
/* Logo: the light version in dark mode. */
.gk-logo .gk-logo__dark,
[data-theme="dark"] .gk-logo .gk-logo__light {
	display: none;
}
[data-theme="dark"] .gk-logo .gk-logo__dark {
	display: block;
}

/* Sun/moon button in the top bar (text says what you switch to) */
.gk-topbar__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}
.gk-topbar__row p {
	margin: 0;
	text-align: right;
}
.gk-theme-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	flex: 0 0 auto;
	padding: 0.15rem 0.7rem 0.15rem 0.5rem;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease;
}
.gk-theme-toggle:hover {
	background: rgba(255, 255, 255, 0.12);
}
.gk-theme-toggle:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}
.gk-theme-toggle .gk-icon-sun,
.gk-theme-toggle__light,
[data-theme="dark"] .gk-theme-toggle .gk-icon-moon,
[data-theme="dark"] .gk-theme-toggle__dark {
	display: none;
}
[data-theme="dark"] .gk-theme-toggle .gk-icon-sun,
[data-theme="dark"] .gk-theme-toggle__light {
	display: inline;
}
@media (max-width: 600px) {
	/* Phones: icon only, so the contact line still fits. */
	.gk-theme-toggle {
		padding: 0.3rem;
	}
	.gk-theme-toggle__dark,
	.gk-theme-toggle__light,
	[data-theme="dark"] .gk-theme-toggle__light {
		display: none;
	}
}

/* Dark mode: WordPress gives dropdowns and the phone menu a fixed white background. */
[data-theme="dark"] .gk-header .wp-block-navigation__submenu-container,
[data-theme="dark"] .gk-header .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--contrast) !important;
}

/* Phone menu: the header's blur (backdrop-filter) traps the full-screen menu inside the
   header strip. Switch the blur off while the menu is open. */
.gk-header:has(.wp-block-navigation__responsive-container.is-menu-open),
.wp-site-blocks > header:has(.is-menu-open) {
	backdrop-filter: none !important;
}
